Browse Source

采购询价单-销售询价单带出字段调整

jingbb 5 months ago
parent
commit
b6e1f3abf8

+ 11 - 3
src/views/purchase/purchaseInquiryForm/components/PurchaseInquiryFormForm.vue

@@ -57,8 +57,7 @@
 						</a-col>
             <a-col :span="12">
 							<a-form-item label="付款条件(payment terms)" v-bind="validateInfos.paymentTerms" id="quotationFormForm-paymentTerms" name="paymentTerms" >
-                <JDictSelectTag v-model:value="formData.paymentTerms" placeholder="请选择" dictCode="payment_terms" style="width: 49%;margin-right: 1%;"/>
-                <a-input v-model:value="formData.paymentTermsInfo" placeholder=""  allow-clear style="width: 49%" AutoComplete="off"></a-input>
+                <JDictSelectTag v-model:value="formData.paymentTerms" placeholder="请选择" dictCode="payment_terms" style="width: 100%;margin-right: 1%;"/>
 							</a-form-item>
 						</a-col>
             <!-- <a-col :span="12">
@@ -413,6 +412,7 @@
         
       }
       function addProductFromCustomer(data){
+        debugger
         data.map(item=>{
           item.productClass = item.productClass
           item.productCode = item.productCode
@@ -423,6 +423,12 @@
         })
         var arrProduct = data.concat(PuechaseInquiryFormProductTable.dataSource)
         notAllowEdit.value=true
+        inquiryPeriod.value[0]=data[0].inquiryPeriodBegin?moment(data[0].inquiryPeriodBegin):''
+        inquiryPeriod.value[1]=data[0].inquiryPeriodEnd?moment(data[0].inquiryPeriodEnd):''
+        console.log(inquiryPeriod);
+        debugger
+        formData.inquiryPeriodBegin=data[0].inquiryPeriodBegin?moment(data[0].inquiryPeriodBegin):''
+        formData.inquiryPeriodEnd=data[0].inquiryPeriodEnd?moment(data[0].inquiryPeriodEnd):''
         PuechaseInquiryFormProductTable.dataSource=arrProduct     
         formData.inquiryProject = data[0].inquiryProject
         formData.projectName = data[0].projectName
@@ -488,7 +494,8 @@
                   res.result.records.forEach(element => {
                       var obj = {
                         label: element.name?element.name:'无名称请维护',
-                        value: element.id?element.id:''
+                        value: element.id?element.id:'',
+                        paymentTerms:element.paymentTerms?element.paymentTerms:''
                       };
                       supplierOption.value.push( obj)
                   });    
@@ -511,6 +518,7 @@
           supplierOption.value.map(item=>{
             if(item.value==prop){
               formData.suppilerName = item.label
+              formData.paymentTerms = item.paymentTerms
             }
           })
         }else{