chenrui 3 anni fa
parent
commit
0c3bbc2d50

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

@@ -12,8 +12,9 @@
     allowClear
     allowClear
   >
   >
     <a-spin v-if="fetching" slot="notFoundContent" size="small" />
     <a-spin v-if="fetching" slot="notFoundContent" size="small" />
-    <a-select-option v-for="item in data" :key="item.customerSn" :value="item.customerSn">
+    <a-select-option v-for="item in data" :key="item.customerSn" :value="item.customerSn" :disabled="isValidateEnabled ? item.enabledFlag=='0' : false">
       {{ item.customerName }}
       {{ item.customerName }}
+      <span v-if="isValidateEnabled && item.enabledFlag=='0'">(已禁用)</span>
     </a-select-option>
     </a-select-option>
   </a-select>
   </a-select>
 </template>
 </template>
@@ -22,6 +23,10 @@ import debounce from 'lodash/debounce'
 import { custList } from '@/api/customer'
 import { custList } from '@/api/customer'
 export default {
 export default {
   props: {
   props: {
+    isValidateEnabled: {
+      type: Boolean,
+      default: false
+    }
   },
   },
   data () {
   data () {
     this.lastFetchId = 0
     this.lastFetchId = 0

+ 1 - 1
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -21,7 +21,7 @@
         <a-row :gutter="15">
         <a-row :gutter="15">
           <a-col :span="16">
           <a-col :span="16">
             <a-form-model-item label="客户名称" prop="buyerSn" :labelCol="{ span: 3 }" :wrapperCol="{ span: 20 }">
             <a-form-model-item label="客户名称" prop="buyerSn" :labelCol="{ span: 3 }" :wrapperCol="{ span: 20 }">
-              <custList ref="custList" id="chooseCustom-buyerSn" @change="custChange" v-model="form.buyerSn"></custList>
+              <custList ref="custList" :isValidateEnabled="true" id="chooseCustom-buyerSn" @change="custChange" v-model="form.buyerSn"></custList>
             </a-form-model-item>
             </a-form-model-item>
           </a-col>
           </a-col>
           <a-col :span="8" v-if="$hasPermissions('B_customer_customerInfo_add')">
           <a-col :span="8" v-if="$hasPermissions('B_customer_customerInfo_add')">

+ 1 - 1
src/views/salesManagement/salesReturn/chooseCustomModal.vue

@@ -21,7 +21,7 @@
         <a-row :gutter="15">
         <a-row :gutter="15">
           <a-col :span="16">
           <a-col :span="16">
             <a-form-model-item label="客户名称" prop="buyerSn" :labelCol="{ span: 3 }" :wrapperCol="{ span: 20 }">
             <a-form-model-item label="客户名称" prop="buyerSn" :labelCol="{ span: 3 }" :wrapperCol="{ span: 20 }">
-              <custList ref="custList" @change="custChange" v-model="form.buyerSn"></custList>
+              <custList ref="custList" :isValidateEnabled="true" @change="custChange" v-model="form.buyerSn"></custList>
             </a-form-model-item>
             </a-form-model-item>
           </a-col>
           </a-col>
           <!-- <a-col :span="16">
           <!-- <a-col :span="16">