Kaynağa Gözat

Merge branch 'develop' of http://code.dashoo.cn/chengjian/opms_frontend into develop

liuyaqi 2 yıl önce
ebeveyn
işleme
29ce1c4578

+ 2 - 1
src/store/modules/user.js

@@ -1,6 +1,7 @@
 /**
  * @description 登录、获取用户信息、退出登录、清除token逻辑,不建议修改
  */
+import to from 'await-to-js'
 import Vue from 'vue'
 import userApi from '@/api/system/user'
 import { getToken, removeToken, setToken } from '@/utils/token'
@@ -153,7 +154,7 @@ const actions = {
    * @param {*} { dispatch }
    */
   async logout({ dispatch }) {
-    await userApi.logout()
+    await to(userApi.logout())
     await dispatch('resetAll')
   },
   /**

+ 2 - 2
src/views/base/distributor/components/DistrEdit.vue

@@ -231,11 +231,11 @@
       },
       selectUser(userList) {
         this.userList = userList
-        this.form.belongSale = userList.map((item) => item.userName).join()
+        this.form.belongSale = userList.map((item) => item.nickName).join()
       },
       async handleSubmit() {
         this.form.belongSaleId = this.userList[0].id
-        this.form.belongSale = this.userList[0].userName
+        this.form.belongSale = this.userList[0].nickName
       },
     },
   }

+ 3 - 10
src/views/base/distributor/index.vue

@@ -135,7 +135,7 @@
         columns: [
           {
             label: '经销商名称',
-            width: '120px',
+            width: '160px',
             prop: 'distName',
             sortable: false,
           },
@@ -147,7 +147,7 @@
           },
           {
             label: '归属销售',
-            width: 'auto',
+            width: '100px',
             prop: 'belongSale',
             sortable: false,
             disableCheck: true,
@@ -161,18 +161,11 @@
           },
           {
             label: '负责人',
-            width: 'auto',
+            width: '100px',
             prop: 'distBoss',
             sortable: false,
             disableCheck: true,
           },
-          {
-            label: '归属销售',
-            width: 'auto',
-            prop: 'belongSale',
-            sortable: false,
-            disableCheck: true,
-          },
         ],
 
         regionOptions: undefined,

+ 5 - 0
src/views/proj/business/components/BusinessEdit.vue

@@ -427,6 +427,11 @@
         } else {
           this.title = '编辑'
           this.form = Object.assign({}, row)
+          this.queryContact.custId = this.form.custId
+          this.customerInfo = {
+            custId: this.form.custId,
+            custName: this.form.custName,
+          }
           this.getProductData(row.id)
         }
         this.dialogFormVisible = true

+ 6 - 1
src/views/system/menu/index.vue

@@ -23,7 +23,7 @@
       v-loading="listLoading"
       border
       :data="list"
-      default-expand-all
+      :expand-row-keys="expandRow"
       :height="$noPagingTableHeight(1)"
       row-key="id"
       :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
@@ -126,6 +126,7 @@
         },
         list: [],
         listLoading: true,
+        expandRow: [],
       }
     },
     async created() {
@@ -154,6 +155,10 @@
         this.listLoading = true
         const { data: data } = await menuApi.getList({ role })
         this.list = this.translateDataToTree(data)
+        this.$nextTick(() => {
+          this.expandRow = this.list.map((item) => String(item.id))
+          console.log(this.expandRow)
+        })
         this.listLoading = false
       },
       handleNodeClick({ role }) {