From eed27d3000e127c433fd45609d0d5e5d06b7868c Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期二, 26 十二月 2023 11:14:28 +0800
Subject: [PATCH] Merge branch 'dev' of http://192.168.5.5:10010/r/web/crm-web into dev

---
 src/common/untils/request.js                                 |   10 ++--
 src/store/index.js                                           |   10 ++++
 src/views/other/payment/collectionPlan/AddCollectionPlan.vue |    6 +-
 src/views/sales/salesDetails/AddSalesDetailsDialog.vue       |   14 ++++++
 src/components/layout/components/appsidebar/index.vue        |   47 ++++++++++++-----------
 src/views/sales/contractManage/DetailContractManage.vue      |    2 
 src/router/index.js                                          |    2 +
 src/views/sales/contractManage/index.vue                     |   12 ++----
 8 files changed, 61 insertions(+), 42 deletions(-)

diff --git a/src/common/untils/request.js b/src/common/untils/request.js
index 9b321b2..209035a 100644
--- a/src/common/untils/request.js
+++ b/src/common/untils/request.js
@@ -33,7 +33,7 @@
         prod:`//${window.location.hostname}:9080`,
         test:`//192.168.20.119:9080`,
         // 鎯宠烦鍒版湰鍦板惎鍔ㄧ殑鐧诲綍椤电殑璇濋渶瑕佹妸dev鏀规垚浣犳湰鍦伴」鐩矾寰�
-        dev: `//192.168.8.111:8081`
+        dev: `//192.168.20.158:8080`
     }
 
     return loginPathMap[environmentType()]
@@ -74,8 +74,8 @@
       return res
     } else if([2012,2013,2014,2015].includes(res.data.code)){
       if (isDev){
-        alert("JWT澶辨晥")
-        // window.location = getApsPage()+'/'
+        alert("JWT澶辨晥,鍗冲皢璺宠浆鑷崇櫥褰曢〉..")
+        window.location = getApsPage()+'/login'
       }else {
         //   JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉
         window.location = getApsPage()+'/login'
@@ -93,8 +93,8 @@
   (error) => {
     if (error.response.status === 401){
       if (isDev){
-        alert("JWT澶辨晥")
-        // window.location = getApsPage()+'/'
+        alert("JWT澶辨晥,鍗冲皢璺宠浆鑷崇櫥褰曢〉..")
+        window.location = getApsPage()+'/login'
       }else {
         //   JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉
         window.location = getApsPage()+'/login'
diff --git a/src/components/layout/components/appsidebar/index.vue b/src/components/layout/components/appsidebar/index.vue
index 7be1f15..89b72f6 100644
--- a/src/components/layout/components/appsidebar/index.vue
+++ b/src/components/layout/components/appsidebar/index.vue
@@ -36,12 +36,12 @@
           <el-menu-item index="/backgroundConfig/rolePermssion">瑙掕壊鏉冮檺</el-menu-item>
         </el-submenu> -->
       </el-menu>
+      <el-empty v-if="this.menus===null||this.menus===undefined||this.menus.length===0" :image-size="130" description="娌℃湁渚ф爮鑿滃崟"></el-empty>
     </div>
   </div>
 </template>
 
 <script>
-import {getMenuTreeByRole} from "@/api/menus/index"
 export default {
   name: "AppSidebar",
   props: {},
@@ -62,28 +62,22 @@
   },
   methods: {
     getMenuTreeByRole(){
-      getMenuTreeByRole().then((res)=>{
-        console.log(res.data.list,"crm鑿滃崟")
-        res.data.list.map((item)=>{
-          if(item.systemType===2){
-            let newList= JSON.parse(JSON.stringify([...item.menus]))
-            // 闅愯棌浜� 鐢熸垚璁″垝 鍜� 鏈嶅姟鏀惰垂绠$悊妯″潡
-            if(newList[1]){
-              const found = newList[1].children.find(obj => obj.title === "鐢熸垚璁″垝")
-              if(found){
-                newList[1].children=[...newList[1].children.slice(0, -1)];  
-              }
-            }
-            if(newList[2]){
-              const found1 = newList[2].children.find(obj => obj.title === "鏈嶅姟鏀惰垂绠$悊")
-              if(found1){
-                newList[2].children=[...newList[2].children.slice(0, -1)];  
-              }
-            }
-            this.menus=newList
-          }
-        }) 
-      })
+      let newList=this.$store.state.menus
+      console.log(newList,"newList")
+      // 闅愯棌浜� 鐢熸垚璁″垝 鍜� 鏈嶅姟鏀惰垂绠$悊妯″潡
+      if(newList[1]){
+        const found = newList[1].children.find(obj => obj.title === "鐢熸垚璁″垝")
+        if(found){
+          newList[1].children=[...newList[1].children.slice(0, -1)];  
+        }
+      }
+      if(newList[2]){
+        const found1 = newList[2].children.find(obj => obj.title === "鏈嶅姟鏀惰垂绠$悊")
+        if(found1){
+          newList[2].children=[...newList[2].children.slice(0, -1)];  
+        }
+      }
+      this.menus=newList
     },
     // 鐩戝惉璺敱
     initNavMenu() {
@@ -100,4 +94,11 @@
 <!-- Add "scoped" attribute to limit CSS to this component only -->
 <style lang="scss" scoped>
 @import "./index.scss";
+::v-deep .el-empty{
+  .el-empty__description{
+    p{
+      color: #dddd;
+    }
+  }
+}
 </style>
diff --git a/src/router/index.js b/src/router/index.js
index e0ed381..87e40de 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -6,6 +6,7 @@
 import salesRouter from "./sales/index.js"
 import serviceRouter from "./service/index.js"
 import {getMenuTreeByRole} from "@/api/menus/index"
+import store from '@/store/index.js'; 
 // import backgroundConfigRouter from "./backgroundConfig/index.js"
 
 Vue.use(Router)
@@ -120,6 +121,7 @@
     };
     const foundObject = res.data.list.find(obj => obj.systemType === 2);
     if (foundObject) {
+      store.commit('setMenus', foundObject.menus); 
       foundObject.menus.forEach(item => {
         const nextPath = item.children.find(obj => obj.path === routePath);
         if (nextPath) {
diff --git a/src/store/index.js b/src/store/index.js
index 1d8741c..68e35eb 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -4,7 +4,15 @@
 
 Vue.use(Vuex)
 export default new Vuex.Store({
+  state:{
+    menus:[]
+  },
+  mutations: {
+    setMenus(state, payload) {  
+      state.menus = payload;  
+    },
+  },
   modules: {
     getClientName
-  }
+  },
 })
diff --git a/src/views/other/payment/collectionPlan/AddCollectionPlan.vue b/src/views/other/payment/collectionPlan/AddCollectionPlan.vue
index b36e2ac..25b144d 100644
--- a/src/views/other/payment/collectionPlan/AddCollectionPlan.vue
+++ b/src/views/other/payment/collectionPlan/AddCollectionPlan.vue
@@ -198,7 +198,7 @@
       amount: 130,
       sourceType: this.editCommonConfig.sourceType, // 婧愬崟绫诲瀷 1閿�鍞槑缁�2鏈嶅姟鍚堝悓3閿�鍞彂绁�
       sourceId: this.editCommonConfig.infomation.id,
-      principalId:0,
+      principalId: '',
       planAmount: 0, // 璁″垝閲戦
       firstDate: this.getCurrentDate(1),
       collectionType: 1,
@@ -237,7 +237,7 @@
         collectionType: this.collectionType,
         moneyType: "浜烘皯甯�",
         amountTotal: this.editCommonConfig.infomation.amountTotal,
-        principalId:0
+        principalId:''
       }
     },
     getCommonData() {
@@ -344,7 +344,7 @@
           id: 0,
           moneyType: "浜烘皯甯�",
           percent: ratio,
-          principalId: this.principalId,
+          principalId: Number(this.principalId),
           remark: "",
           sourceId: this.sourceId,
           sourceType: this.sourceType,
diff --git a/src/views/sales/contractManage/DetailContractManage.vue b/src/views/sales/contractManage/DetailContractManage.vue
index 8f8c860..c9f97a4 100644
--- a/src/views/sales/contractManage/DetailContractManage.vue
+++ b/src/views/sales/contractManage/DetailContractManage.vue
@@ -10,7 +10,7 @@
       <template slot="title">
         <div class="header">
           <span class="header-label">鍚堝悓绠$悊</span>
-          <span class="header-title">{{ detailConfig.infomation.number }}</span>
+          <span class="header-title">{{ detailConfig.infomation.contractName }}</span>
         </div>
       </template>
       <div class="content">
diff --git a/src/views/sales/contractManage/index.vue b/src/views/sales/contractManage/index.vue
index 1866304..75bafd9 100644
--- a/src/views/sales/contractManage/index.vue
+++ b/src/views/sales/contractManage/index.vue
@@ -7,7 +7,7 @@
           :show-download="false"
           :amount-view="false"
           :show-action-btn="false"
-          placeholder="璇疯緭鍏ュ崟鎹紪鍙�"
+          placeholder="璇疯緭鍏ュ悎鍚屽悕绉版垨鍗曟嵁缂栧彿"
           @searchClick="onFilterSearch"
         >
           <template slot="leftButton">
@@ -102,18 +102,14 @@
       },
       selValueList: [],
       search_map: {},
-      searchSel: {
-        value: "number",
-        label: "鍗曟嵁缂栧彿"
-      },
       tableColumn: [
-        { label: "鍗曟嵁缂栧彿", prop: "number", min: 120, isCommonClick: true, default: true },
+        { label: "鍚堝悓鍚嶇О", prop: "contractName", min: 120, isCommonClick: true, default: true },
         { label: "璐熻矗浜�", prop: "member_name", min: 90 },
         { label: "瀹㈡埛鍚嶇О", prop: "client_name" },
         { label: "鍚堝悓鐘舵��", prop: "serviceContractStatus_name", min: 100 },
         { label: "鍒涘缓鏃堕棿", prop: "created_at" }
       ],
-      showCol: ["鍗曟嵁缂栧彿", "璐熻矗浜�", "瀹㈡埛鍚嶇О", "鍚堝悓鐘舵��", "鍒涘缓鏃堕棿"],
+      showCol: ["鍚堝悓鍚嶇О", "璐熻矗浜�", "瀹㈡埛鍚嶇О", "鍚堝悓鐘舵��", "鍒涘缓鏃堕棿"],
       keyword:''
     }
   },
@@ -246,7 +242,7 @@
     },
     // 鍚堝悓绠$悊璇︽儏
     selCommonClick(row) {
-      console.log(row)
+      console.log(row,"鍚堝悓璇︽儏")
       this.contractDetail.visible = true
       this.contractDetail.infomation = { ...row }
     }
diff --git a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue
index cc89b4a..3933f47 100644
--- a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue
+++ b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue
@@ -208,6 +208,7 @@
                     placeholder="閫夋嫨鏃ユ湡"
                     style="width: 100%"
                     :disabled="isView"
+                    :picker-options="pickerOptionsBefore"
                   >
                   </el-date-picker>
                 </el-form-item>
@@ -235,6 +236,7 @@
                     placeholder="閫夋嫨鏃ユ湡"
                     style="width: 100%"
                     :disabled="isView"
+                    :picker-options="pickerOptions"
                   >
                   </el-date-picker>
                 </el-form-item>
@@ -601,7 +603,17 @@
       quotationId: this.editCommonConfig.infomation.quotationId,
       tableData: [],
       isView: this.editCommonConfig.title === "鏌ョ湅",
-      thatMember: {}
+      thatMember: {},
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() <  Date.now() - 8.64e7;
+        },
+      },
+      pickerOptionsBefore:{
+        disabledDate(time) {
+          return time.getTime() >  Date.now();
+        },
+      }
     }
   },
   created() {

--
Gitblit v1.8.0