lilei před 2 roky
rodič
revize
9d9667acc5

+ 5 - 1
src/views/common/custList.vue

@@ -16,7 +16,7 @@
     allowClear
   >
     <a-spin v-if="fetching" slot="notFoundContent" size="small" />
-    <a-select-option v-for="item in data" :key="item.customerSn" :value="item.customerName" :disabled="isValidateEnabled ? item.enabledFlag=='0' : false">
+    <a-select-option v-for="item in data" :key="item.customerSn" :value="item.customerName" :disabled="(isValidateEnabled ? item.enabledFlag=='0' : false) || (dealerDisabled?item.dealerFlag==1:false)">
       {{ item.customerName }}
       <span v-if="isValidateEnabled && item.enabledFlag=='0'">(已禁用)</span>
     </a-select-option>
@@ -50,6 +50,10 @@ export default {
     satelliteFlag: {
       type: Boolean,
       default: false
+    },
+    dealerDisabled: {
+      type: Boolean,
+      default: false
     }
   },
   data () {

+ 7 - 7
src/views/customerManagement/customerInfo/mergeCustomerModal.vue

@@ -22,7 +22,7 @@
           <div>{{ mainCustomerName }}</div>
         </a-form-model-item>
         <a-form-model-item label="被合并的客户名称:" prop="customerSnSource">
-          <custList ref="custList" @change="custChange" placeholder="输入客户名称搜索"></custList>
+          <custList ref="custList" dealerDisabled @change="custChange" placeholder="输入客户名称搜索"></custList>
         </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
@@ -48,7 +48,7 @@ export default {
     },
     params: {
       type: Object,
-      default(){
+      default () {
         return {}
       }
     }
@@ -61,8 +61,8 @@ export default {
         wrapperCol: { span: 16 }
       },
       form: {
-        customerSnTarget: '', // 主体客户sn 
-        customerSnSource: '', // 被合并客户sn
+        customerSnTarget: '', // 主体客户sn
+        customerSnSource: '' // 被合并客户sn
       },
       mainCustomerName: '', // 主体客户名称
       rules: {
@@ -102,9 +102,9 @@ export default {
         cancelText: '取消',
         onOk () {
           custMerge(_this.form).then(res => {
-            if(res.status == 200){
+            if (res.status == 200) {
               _this.$message.info(res.message)
-              _this.$emit('close',true)
+              _this.$emit('close', true)
             }
           })
         },
@@ -127,7 +127,7 @@ export default {
         this.form.customerSnTarget = undefined
         this.mainCustomerName = undefined
         this.$refs.custList.setData(undefined)
-      }else{
+      } else {
         this.mainCustomerName = this.params.customerName
         this.form.customerSnTarget = this.params.customerSn
       }