Browse Source

销售报价单/采购报价单-主表币种设置为不可填

jingbb 2 tháng trước cách đây
mục cha
commit
aa185758c0

+ 13 - 3
src/views/purchase/purchaseQuotationFrm/components/PurchaseQuotationFormForm.vue

@@ -166,7 +166,7 @@
 						</a-col>
             <a-col :span="12">
               <a-form-item label="币种(currency)" v-bind="validateInfos.currency" id="PuechaseQuotationFormForm-currency" name="currency">
-                <JDictSelectTag v-model:value="formData.currency" placeholder="请选择" dictCode="currency" />
+                <JDictSelectTag v-model:value="formData.currency" placeholder="请选择" dictCode="currency" disabled/>
               </a-form-item>
             </a-col>
             <a-col :span="12">
@@ -552,7 +552,7 @@
         });
         PuechaseQuotationFormProductTable.dataSource = arrProduct;
       }
-      function addProductFromCustomer(data) {
+       function addProductFromCustomer(data) {
         data.map((item) => {
           item.productClass = item.productClass;
           item.productCode = item.productCode;
@@ -582,6 +582,14 @@
         formData.qualityGradeHead = data[0].qualityGradeHead;
         // formData.saleAttachs =data[0].attachs
         getShipList(data[0].headId);
+        if(formData.quotationSuppiler&& formData.quotationSuppiler!==''){
+          getSupplierCurreny(formData.quotationSuppiler)
+        }
+        
+      }
+      async function getSupplierCurreny(id){
+        var obj = await supplierOption({id:id})
+        formData.currency = obj.records[0].currency
       }
       function getShipList(id) {
         let params = { id: id };
@@ -609,6 +617,7 @@
             var obj = await supplierOption(params)
             formData.suppilerName = obj.records[0].name
             formData.paymentTerms = obj.records[0].paymentTerms
+            getSupplierCurreny(prop)
           }else{
             formData.quotationSuppiler = ''
             formData.suppilerName = ''
@@ -690,7 +699,8 @@
         changeValues,
         setDiscountForSonList,
         SetSonListRef,
-        setSonListFiled
+        setSonListFiled,
+        getSupplierCurreny
       };
     },
   });

+ 1 - 1
src/views/saleCode/quotation/components/quotationFormForm.vue

@@ -124,7 +124,7 @@
                 :labelCol="formItemLayout.labelCol1"
                 :wrapperCol="formItemLayout.wrapperCol1"
               >
-                <JDictSelectTag v-model:value="formData.currency" placeholder="请选择" dictCode="currency" @select="changeExchangeRate" />
+                <JDictSelectTag v-model:value="formData.currency" placeholder="请选择" dictCode="currency" @select="changeExchangeRate" disabled/>
               </a-form-item>
             </a-col>
             <a-col :span="12">