|  | @@ -63,25 +63,29 @@
 | 
	
		
			
				|  |  |                                  <ApiSelect
 | 
	
		
			
				|  |  |                                      :api="supplierOption"
 | 
	
		
			
				|  |  |                                      showSearch
 | 
	
		
			
				|  |  | -                                    v-model:value="queryParams.supplierName"
 | 
	
		
			
				|  |  | +                                    v-model:value="queryParams.supplierId"
 | 
	
		
			
				|  |  |                                      optionFilterProp="label"
 | 
	
		
			
				|  |  |                                      resultField="records"
 | 
	
		
			
				|  |  |                                      labelField="name"
 | 
	
		
			
				|  |  | -                                    valueField="name"
 | 
	
		
			
				|  |  | +                                    valueField="id"
 | 
	
		
			
				|  |  |                                      :params='{pageSize:-1}'
 | 
	
		
			
				|  |  | +                                    :disabled="fatherSupplier!==''"
 | 
	
		
			
				|  |  |                                      />
 | 
	
		
			
				|  |  |                              </a-form-item>
 | 
	
		
			
				|  |  |                          </a-col>
 | 
	
		
			
				|  |  |                          <a-col :md="6" :sm="8" v-if="showCustomer=='yes'">
 | 
	
		
			
				|  |  | -                            <a-form-item label="客户(supplier)">
 | 
	
		
			
				|  |  | +                            <a-form-item label="客户(customer)">
 | 
	
		
			
				|  |  |                                  <ApiSelect
 | 
	
		
			
				|  |  |                                      :api="CustomerOption"
 | 
	
		
			
				|  |  |                                      showSearch
 | 
	
		
			
				|  |  | -                                    v-model:value="queryParams.customerName"
 | 
	
		
			
				|  |  | +                                    v-model:value="queryParams.customer"
 | 
	
		
			
				|  |  |                                      optionFilterProp="label"
 | 
	
		
			
				|  |  |                                      resultField="records"
 | 
	
		
			
				|  |  | -                                    labelField="abbreviation"
 | 
	
		
			
				|  |  | -                                    valueField="name"
 | 
	
		
			
				|  |  | +                                    labelField="name"
 | 
	
		
			
				|  |  | +                                    valueField="id"
 | 
	
		
			
				|  |  | +                                    :params='{pageSize:-1}'
 | 
	
		
			
				|  |  | +                                    allowClear
 | 
	
		
			
				|  |  | +                                    @change="changeCustmer"
 | 
	
		
			
				|  |  |                                      />
 | 
	
		
			
				|  |  |                              </a-form-item>
 | 
	
		
			
				|  |  |                          </a-col>
 | 
	
	
		
			
				|  | @@ -174,9 +178,9 @@
 | 
	
		
			
				|  |  |      var visible = ref(false)
 | 
	
		
			
				|  |  |      var fatherProject = ref('')
 | 
	
		
			
				|  |  |      var fatherSourceCode = ref('')
 | 
	
		
			
				|  |  | -    var fatherSupplierName =ref('')
 | 
	
		
			
				|  |  | +    var fatherSupplier =ref('')
 | 
	
		
			
				|  |  |      var fatherType = ref('')
 | 
	
		
			
				|  |  | -    var fatherCustomerName=ref('')
 | 
	
		
			
				|  |  | +    var fatherCustomer=ref('')
 | 
	
		
			
				|  |  |      var showCustomer = ref('no')
 | 
	
		
			
				|  |  |      var columns=[]
 | 
	
		
			
				|  |  |      var columns1 = [
 | 
	
	
		
			
				|  | @@ -339,7 +343,7 @@
 | 
	
		
			
				|  |  |          productionClass:'',
 | 
	
		
			
				|  |  |          priority:'',
 | 
	
		
			
				|  |  |          supplierId:'',
 | 
	
		
			
				|  |  | -        supplierName:'',
 | 
	
		
			
				|  |  | +        supplier:'',
 | 
	
		
			
				|  |  |          headModel:'',
 | 
	
		
			
				|  |  |          englishName:'',
 | 
	
		
			
				|  |  |          productCode:'',
 | 
	
	
		
			
				|  | @@ -349,7 +353,6 @@
 | 
	
		
			
				|  |  |          saleDepartment:'',
 | 
	
		
			
				|  |  |          salesman:'',
 | 
	
		
			
				|  |  |          customer:'',
 | 
	
		
			
				|  |  | -        customerName:''
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |      let pagination = ref({
 | 
	
		
			
				|  |  |        current: 1,
 | 
	
	
		
			
				|  | @@ -388,15 +391,15 @@
 | 
	
		
			
				|  |  |          }else {
 | 
	
		
			
				|  |  |              queryParams.value.project = params.project
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        if(fatherSupplierName.value&&fatherSupplierName.value!==''){
 | 
	
		
			
				|  |  | -            queryParams.value.supplierName = fatherSupplierName.value
 | 
	
		
			
				|  |  | +        if(fatherSupplier.value&&fatherSupplier.value!==''){
 | 
	
		
			
				|  |  | +            queryParams.value.supplierId = fatherSupplier.value
 | 
	
		
			
				|  |  |          }else {
 | 
	
		
			
				|  |  | -            queryParams.value.supplierName = params.supplierName
 | 
	
		
			
				|  |  | +            queryParams.value.supplierId = params.supplierId
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        if(fatherCustomerName.value&&fatherCustomerName.value!==''){
 | 
	
		
			
				|  |  | -            queryParams.value.customerName = fatherCustomerName.value
 | 
	
		
			
				|  |  | +        if(fatherCustomer.value&&fatherCustomer.value!==''){
 | 
	
		
			
				|  |  | +            queryParams.value.customer = fatherCustomer.value
 | 
	
		
			
				|  |  |          }else {
 | 
	
		
			
				|  |  | -            queryParams.value.customerName = params.customerName
 | 
	
		
			
				|  |  | +            queryParams.value.customer = params.customer
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          return filterObj(params);
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -419,7 +422,7 @@
 | 
	
		
			
				|  |  |              productionClass:'',
 | 
	
		
			
				|  |  |              priority:'',
 | 
	
		
			
				|  |  |              supplierId:'',
 | 
	
		
			
				|  |  | -            supplierName:'',
 | 
	
		
			
				|  |  | +            supplier:'',
 | 
	
		
			
				|  |  |              headModel:'',
 | 
	
		
			
				|  |  |              englishName:'',
 | 
	
		
			
				|  |  |              productCode:'',
 | 
	
	
		
			
				|  | @@ -429,7 +432,6 @@
 | 
	
		
			
				|  |  |              saleDepartment:'',
 | 
	
		
			
				|  |  |              salesman:'',
 | 
	
		
			
				|  |  |              customer:'',
 | 
	
		
			
				|  |  | -            customerName:''
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          pagination.value.current =1;
 | 
	
		
			
				|  |  |          pagination.value.pageSize = 10; 
 | 
	
	
		
			
				|  | @@ -448,22 +450,19 @@
 | 
	
		
			
				|  |  |              handleCancel()
 | 
	
		
			
				|  |  |          }else{
 | 
	
		
			
				|  |  |              var arr = [],
 | 
	
		
			
				|  |  | -            arrSupplierName=[]
 | 
	
		
			
				|  |  | +            arrSupplier=[]
 | 
	
		
			
				|  |  |              selectedRows.value.map(item=>{
 | 
	
		
			
				|  |  |                  arr.push(item.billCode)
 | 
	
		
			
				|  |  | -                arrSupplierName.push(item.supplierName)
 | 
	
		
			
				|  |  | +                arrSupplier.push(item.supplierId)
 | 
	
		
			
				|  |  |              })
 | 
	
		
			
				|  |  |              if(fatherSourceCode.value&&fatherSourceCode.value!==''){
 | 
	
		
			
				|  |  |                  arr.push(fatherSourceCode.value)
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            if(fatherSupplierName.value&&fatherSupplierName.value!==''){
 | 
	
		
			
				|  |  | -                arrSupplierName.push(fatherSupplierName.value)
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  |              if(selectedRowKeys.value.length==0){
 | 
	
		
			
				|  |  |                  message.error('请勾选数据');
 | 
	
		
			
				|  |  |              }else if(new Set(arr).size!==1){
 | 
	
		
			
				|  |  |                  message.error('请勾选订单编号相同的数据');
 | 
	
		
			
				|  |  | -            }else if(new Set(arrSupplierName).size!==1){
 | 
	
		
			
				|  |  | +            }else if(new Set(arrSupplier).size!==1){
 | 
	
		
			
				|  |  |                  message.error('请勾选供应商相同的数据');
 | 
	
		
			
				|  |  |              }else{
 | 
	
		
			
				|  |  |                  emit('selectSaleOrder', selectedRows.value)
 | 
	
	
		
			
				|  | @@ -484,7 +483,7 @@
 | 
	
		
			
				|  |  |              productionClass:'',
 | 
	
		
			
				|  |  |              priority:'',
 | 
	
		
			
				|  |  |              supplierId:'',
 | 
	
		
			
				|  |  | -            supplierName:'',
 | 
	
		
			
				|  |  | +            supplier:'',
 | 
	
		
			
				|  |  |              headModel:'',
 | 
	
		
			
				|  |  |              englishName:'',
 | 
	
		
			
				|  |  |              productCode:'',
 | 
	
	
		
			
				|  | @@ -494,7 +493,6 @@
 | 
	
		
			
				|  |  |              saleDepartment:'',
 | 
	
		
			
				|  |  |              salesman:'',
 | 
	
		
			
				|  |  |              customer:'',
 | 
	
		
			
				|  |  | -            customerName:''
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          pagination.value.current =1;
 | 
	
		
			
				|  |  |          pagination.value.pageSize = 10; 
 | 
	
	
		
			
				|  | @@ -521,22 +519,23 @@
 | 
	
		
			
				|  |  |          if(data=='delivery'){
 | 
	
		
			
				|  |  |              showCustomer.value = 'yes'
 | 
	
		
			
				|  |  |              columns= columns1.filter(function(value, i) {
 | 
	
		
			
				|  |  | -                return i !== 3;
 | 
	
		
			
				|  |  | +                return i !== 4;
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  | -            if(formData.supplierName&&formData.supplierName!==''){
 | 
	
		
			
				|  |  | -                fatherCustomerName.value = formData.supplierName
 | 
	
		
			
				|  |  | +            if(formData.customer&&formData.customer!==''){
 | 
	
		
			
				|  |  | +                
 | 
	
		
			
				|  |  | +                fatherCustomer.value = formData.customer
 | 
	
		
			
				|  |  |              }else{
 | 
	
		
			
				|  |  | -                fatherCustomerName.value = ''
 | 
	
		
			
				|  |  | +                fatherCustomer.value = ''
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }else{
 | 
	
		
			
				|  |  |              showCustomer.value = 'no'
 | 
	
		
			
				|  |  |              columns= columns1.filter(function(value, i) {
 | 
	
		
			
				|  |  | -                return i !== 4;
 | 
	
		
			
				|  |  | +                return i !== 5;
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  |              if(formData.supplierName&&formData.supplierName!==''){
 | 
	
		
			
				|  |  | -                fatherSupplierName.value = formData.supplierName
 | 
	
		
			
				|  |  | +                fatherSupplier.value = formData.supplier
 | 
	
		
			
				|  |  |              }else{
 | 
	
		
			
				|  |  | -                fatherSupplierName.value = ''
 | 
	
		
			
				|  |  | +                fatherSupplier.value = ''
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          loadData()
 | 
	
	
		
			
				|  | @@ -565,6 +564,10 @@
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +    function changeCustmer(value){
 | 
	
		
			
				|  |  | +        queryParams.value.customer = queryParams.value.customer
 | 
	
		
			
				|  |  | +        fatherCustomer.value=''
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |      defineExpose({
 | 
	
		
			
				|  |  |        getTable,
 | 
	
		
			
				|  |  |        getTableFromSalePayRequestForm
 |