chenrui 2 lat temu
rodzic
commit
423bddee20

+ 10 - 6
src/views/common/chooseDealer.vue

@@ -56,7 +56,7 @@
       size="small"
       :rowKey="(record) => record.dealerSn"
       rowKeyName="dealerSn"
-      :row-selection="{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: !!record.subareaAreaSn } }) }"
+      :row-selection="{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: pageType=='viewDealers'?!!record.subareaAreaSn: !!record.chooseId} }) }"
       @rowSelection="rowSelectionFun"
       :columns="columns"
       :data="loadData"
@@ -138,7 +138,7 @@ export default {
                 data.list[i].no = no + i + 1
                 _this.chooseInfo.forEach(con => {
                   if (data.list[i].dealerSn == con) {
-                    data.list[i].subareaAreaSn = con
+                    data.list[i].chooseId = con
                   }
                 })
               }
@@ -165,8 +165,8 @@ export default {
         arr.splice(5, 0, { title: '当前所属区域', scopedSlots: { customRender: 'areas' }, width: '30%', align: 'center' })
         arr.splice(6, 0, { title: '操作', scopedSlots: { customRender: 'action' }, width: '20%', align: 'center' })
       } else {
-        arr.splice(4, 0, { title: '所在区域', dataIndex: 'subareaArea.subareaName', width: '20%', align: 'center', customRender: function (text) { return text&&text[0] || '--' }})
-        arr.splice(5, 0, { title: '所在分区', dataIndex: 'subareaArea.subareaAreaName', width: '20%', align: 'center', customRender: function (text) { return text&&text[1] || '--' }})
+        arr.splice(4, 0, { title: '所在区域', dataIndex: 'subareaArea.subareaName', width: '20%', align: 'center', customRender: function (text) { return text && text[0] || '--' } })
+        arr.splice(5, 0, { title: '所在分区', dataIndex: 'subareaArea.subareaAreaName', width: '20%', align: 'center', customRender: function (text) { return text && text[1] || '--' } })
       }
       return arr
     },
@@ -208,10 +208,11 @@ export default {
           subareaAreaSn: undefined
         }
       }
-      if(this.pageType!='viewDealers'){
+      if (this.pageType != 'viewDealers') {
         this.$refs.subarea.clearData()
+      } else {
+        this.$refs.areaList.clearData()
       }
-      this.$refs.areaList.clearData()
       this.$refs.table.refresh(true)
       this.$refs.table.clearSelected()
     },
@@ -263,6 +264,9 @@ export default {
   mounted () {
     this.pageInit()
   },
+  activated () {
+    this.pageInit()
+  },
   watch: {
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 1 - 1
src/views/dealerManagement/businessOwnerSettings/categorySet.vue

@@ -134,7 +134,7 @@ export default {
             productTypeList: [],
             productBrandList: []
           }
-          _this.dataSource.unShift(newData)
+          _this.dataSource.unshift(newData)
         }
         _this.spinning = false
         _this.disabled = false

+ 2 - 0
src/views/dealerManagement/businessOwnerSettings/settingsIndex.vue

@@ -244,6 +244,8 @@ export default {
         const newCheckedArr = [...new Set(checkedArr)]
         console.log('end choose:', newCheckedArr)
         this.newChooseData.checked = newCheckedArr
+      } else {
+        this.newChooseData.checked = []
       }
       _this.$nextTick(() => {
         _this.openChooseArea = true

+ 1 - 1
src/views/dealerManagement/dealerZoneSearch/list.vue

@@ -6,7 +6,7 @@
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="所区域/分区">
+              <a-form-model-item label="所区域/分区">
                 <subarea id="dealerZoneSearch-subareaSn" ref="subarea" @change="subareaChange"></subarea>
               </a-form-model-item>
             </a-col>