瀏覽代碼

修改bug

Qukatie 1 年之前
父節點
當前提交
8c5900b998

+ 23 - 20
src/views/exportTrade/customerInquiry/components/goodsInfo.vue

@@ -62,7 +62,7 @@
                 {{ row.productPrice | decimalFormat2 }}
             </template>
             <template slot="outFactoryPrice" slot-scope="{row}">
-                {{ row.outFactoryPrice}}
+                {{ row.outFactoryPrice }}
             </template>
             <template slot="shareAmount" slot-scope="{row}">
                 {{ row.shareAmount | decimalFormat2 }}
@@ -664,7 +664,7 @@ export default {
                     row.itemType = e.specs;
                     row.tradeTerms = null;
                     row.productPrice = productCal(e.purchaseAmount, 0, this.form.coefficient);
-                    row.outFactoryPrice = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate,3);
+                    row.outFactoryPrice = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate, 3);
                     row.shareAmount = 0;
                     row.internationalAmount = 0;
                     row.orderQuantity = 1;
@@ -841,10 +841,10 @@ export default {
                 cancelButtonText: "取消",
                 type: "warning"
             }).then(() => {
-                let obj={}
-                obj={
-                    id:this.form.id,
-                    srcBillType:'BJ'
+                let obj = {}
+                obj = {
+                    id: this.form.id,
+                    srcBillType: 'BJ'
                 }
                 saveShipping(obj).then(res => {
                     if (res.data.code == 200) {
@@ -856,18 +856,21 @@ export default {
         },
         cnameData() {
             this.goodsoptions = []
-            getGoods(1, 10).then(res => {
-                if (res.data.data.total > 0) {
-                    this.goodsoptions = res.data.data.records;
-                    if (Math.ceil(res.data.data.total / 10) > 1) {
-                        for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
-                            getGoods(i, 10).then(e => {
-                                this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
-                            });
-                        }
-                    }
-                }
-            });
+            getPricebankAll({ billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(res => {
+                this.goodsoptions = res.data.data
+            })
+            // getGoods(1, 10).then(res => {
+            //     if (res.data.data.total > 0) {
+            //         this.goodsoptions = res.data.data.records;
+            //         if (Math.ceil(res.data.data.total / 10) > 1) {
+            //             for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+            //                 getGoods(i, 10).then(e => {
+            //                     this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
+            //                 });
+            //             }
+            //         }
+            //     }
+            // });
         },
         oceanUSD() {
             this.$confirm('是否将应付的海运费(USD)复制到应收?', '提示', {
@@ -1020,7 +1023,7 @@ export default {
         submitPriceAD() {
             this.visible = false;
             this.data.forEach(e => {
-                e.outFactoryPrice = priceaAjustment(e.outFactoryPrice, this.priceAD,3)
+                e.outFactoryPrice = priceaAjustment(e.outFactoryPrice, this.priceAD, 3)
                 e.totalValue = multiply(e.outFactoryPrice, e.orderQuantity)
                 e.price = addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount)
                 e.amount = amountCal(
@@ -1062,7 +1065,7 @@ export default {
                 row.partsPrice,
                 this.form.coefficient
             );
-            row.outFactoryPrice = sellingCal(row.productPrice, this.form.exchangeRate,3);
+            row.outFactoryPrice = sellingCal(row.productPrice, this.form.exchangeRate, 3);
             row.price = addPrice(
                 row.outFactoryPrice,
                 row.shareAmount,

+ 35 - 35
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -2024,24 +2024,24 @@ export default {
               if (this.data[i].corpId == null) {
                 return this.$message.error(`请输入第${i + 1}行的供应商`);
               }
-              amountSum = _.add(
-                amountSum,
-                _.multiply(
-                  numCal(this.data[i].amount),
-                  numCal(this.data[i].exchangeRate)
-                )
-              );
+              // amountSum = _.add(
+              //   amountSum,
+              //   _.multiply(
+              //     numCal(this.data[i].amount),
+              //     numCal(this.data[i].exchangeRate)
+              //   )
+              // );
 
-              costSum = _.add(
-                costSum,
-                _.multiply(
-                  _.add(
-                    numCal(this.data[i].purchaseAmount),
-                    numCal(this.data[i].partsPrice)
-                  ),
-                  numCal(this.data[i].orderQuantity)
-                )
-              );
+              // costSum = _.add(
+              //   costSum,
+              //   _.multiply(
+              //     _.add(
+              //       numCal(this.data[i].purchaseAmount),
+              //       numCal(this.data[i].partsPrice)
+              //     ),
+              //     numCal(this.data[i].orderQuantity)
+              //   )
+              // );
             }
           }
           for (let i = 0; i < orderFeesList.length; i++) {
@@ -2060,24 +2060,24 @@ export default {
             if (!orderFeesList[i].exchangeRate) {
               return this.$message.error(`请正确输入第${i + 1}行的汇率`);
             }
-            if (orderFeesList[i].feesType == 1) {
-              reSum = _.add(
-                reSum,
-                _.multiply(
-                  numCal(orderFeesList[i].amount),
-                  numCal(orderFeesList[i].exchangeRate)
-                )
-              );
-            }
-            if (orderFeesList[i].feesType == 2) {
-              paySum = _.add(
-                paySum,
-                _.multiply(
-                  numCal(orderFeesList[i].amount),
-                  numCal(orderFeesList[i].exchangeRate)
-                )
-              );
-            }
+            // if (orderFeesList[i].feesType == 1) {
+            //   reSum = _.add(
+            //     reSum,
+            //     _.multiply(
+            //       numCal(orderFeesList[i].amount),
+            //       numCal(orderFeesList[i].exchangeRate)
+            //     )
+            //   );
+            // }
+            // if (orderFeesList[i].feesType == 2) {
+            //   paySum = _.add(
+            //     paySum,
+            //     _.multiply(
+            //       numCal(orderFeesList[i].amount),
+            //       numCal(orderFeesList[i].exchangeRate)
+            //     )
+            //   );
+            // }
           }
           // this.form.singleTicketMargin = STGPCal(
           //   amountSum,

+ 3 - 12
src/views/exportTrade/salesContract/components/goodsInfo.vue

@@ -939,18 +939,9 @@ export default {
     },
     cnameData() {
       this.goodsoptions = []
-      getGoods(1, 10).then(res => {
-        if (res.data.data.total > 0) {
-          this.goodsoptions = res.data.data.records;
-          if (Math.ceil(res.data.data.total / 10) > 1) {
-            for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
-              getGoods(i, 10).then(e => {
-                this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
-              });
-            }
-          }
-        }
-      });
+      getPricebankAll({ billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(res => {
+        this.goodsoptions = res.data.data
+      })
     },
     pleaseCheck() {
       this.$parent.pleaseCheck()