Explorar el Código

选择弹窗-赋值执行顺序调整

jingbb hace 5 meses
padre
commit
4618f180f2

+ 2 - 2
src/views/inventiry/inventoryCheck/components/inventoryCheckForm.vue

@@ -261,8 +261,7 @@
         formData.goodsAllocation = data[0].goodsAllocation
         formData.warehouse = data[0].warehouse
         formData.productionClass = data[0].productionClass
-        var arr = data.concat(stockDetailsTable.dataSource)
-        arr.map(item=>{
+        data.map(item=>{
           item.model = item.childModel
           item.batchId = item.id
           item.productClass = item.productionClass_dictText
@@ -270,6 +269,7 @@
           item.countedQuantity = 0
           item.inventory = Number(item.countedQuantity)-Number(item.inventoryQuantity)
         })
+        var arr = data.concat(stockDetailsTable.dataSource)
         stockDetailsTable.dataSource=arr  
       }
       function changeValues(prop){

+ 1 - 1
src/views/inventiry/otherIn/components/otherInForm.vue

@@ -348,8 +348,8 @@
         SelectShipSModalRef.value.getTable()
       }
       function addShip(data){
+        data.map(item=>item.shipowner = item.relateCustomer)
         var arr = data.concat(otherInShipTable.dataSource)
-        arr.map(item=>item.shipowner = item.relateCustomer)
         otherInShipTable.dataSource=arr        
         
       }

+ 2 - 2
src/views/inventiry/otherOut/components/otherOutForm.vue

@@ -240,14 +240,14 @@
         formData.goodsAllocation = data[0].goodsAllocation
         formData.warehouse = data[0].warehouse
         formData.productionClass = data[0].productionClass
-        var arr = data.concat(otherOutTable.dataSource)
-        arr.map(item=>{
+        data.map(item=>{
           item.model = item.childModel
           item.batchId = item.id
           item.productClass = item.productionClass_dictText
           item.stockOutQuantity = item.quantity
           item.inventorySelection = item.batchCode
         })
+        var arr = data.concat(otherOutTable.dataSource)
         otherOutTable.dataSource=arr  
       }
       /**

+ 2 - 2
src/views/purchase/freightPurchaseOrder/components/FreightPurOrderForm.vue

@@ -305,12 +305,12 @@
         if(data.length!==1){
           message.warning('请勾选一条数据!')
         }else{
-          var arrProduct = data.concat(FreightProductDetailsTable.dataSource)
-          arrProduct.map(item=>{
+          data.map(item=>{
             item.productClass = item.classId_dictText
             item.productCode = item.code
             item.productId = item.id
           })
+          var arrProduct = data.concat(FreightProductDetailsTable.dataSource)
           FreightProductDetailsTable.dataSource=arrProduct  
         }
       }

+ 0 - 1
src/views/purchase/purchaseInquiryForm/components/PurchaseInquiryFormForm.vue

@@ -418,7 +418,6 @@
         
       }
       function addProductFromCustomer(data){
-        debugger
         data.map(item=>{
           item.productClass = item.productClass
           item.productCode = item.productCode

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

@@ -470,8 +470,8 @@
       }
       //增行-船明细
       function addShip(data){
+        data.map(item=>item.shipowner = item.relateCustomer)
         var arr = data.concat(saleQuotationFormShipTable.dataSource)
-        arr.map(item=>item.shipowner = item.relateCustomer)
         saleQuotationFormShipTable.dataSource=arr             
       }
       //增行-产品明细

+ 0 - 1
src/views/saleCode/receiptOrder/components/receiptOrderForm.vue

@@ -231,7 +231,6 @@
         formData.saleOrderId = data[0].id
       }
       function addInvoice(data){
-        debugger
         formData.invoice = data[0].invoiceCode
         formData.invoiceId = data[0].id
         formData.invoiceAmount = data[0].taxMoney

+ 3 - 3
src/views/saleCode/saleInquiryForm/components/SaleInquiryFormForm.vue

@@ -379,20 +379,20 @@
         SelectShipSModalRef.value.getTable()
       }
       function addShip(data){
+        data.map(item=>item.shipowner = item.relateCustomer)
         var arr = data.concat(saleInquiryFormShipTable.dataSource)
-        arr.map(item=>item.shipowner = item.relateCustomer)
         saleInquiryFormShipTable.dataSource=arr        
         
       }
       function addProduct(data){
-        var arrProduct = data.concat(saleInquiryFormProductTable.dataSource)
-        arrProduct.map(item=>{
+        data.map(item=>{
           item.productClass = item.classId_dictText
           item.productCode = item.code
           item.unit = item.measurementUnit
           item.productId = item.id
           item.qualityGrade = formData.qualityGradeHead!==''?formData.qualityGradeHead:''
         })
+        var arrProduct = data.concat(saleInquiryFormProductTable.dataSource)
         saleInquiryFormProductTable.dataSource=arrProduct      
       }
       function addProject(data) {