소스 검색

福达复制单据 2023-12-22

caojunjie 1 년 전
부모
커밋
43eb4eabcf
2개의 변경된 파일16개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 1
      src/views/exportTrade/salesContract/components/goodsInfo.vue
  2. 10 2
      src/views/exportTrade/salesContract/detailsPage.vue

+ 6 - 1
src/views/exportTrade/salesContract/components/goodsInfo.vue

@@ -196,7 +196,7 @@
       <template slot="outFactoryPriceForm" slot-scope="{type,disabled}">
         <el-input v-model="goodsForm.outFactoryPrice" size="small"
           oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
-          @change="priceChange(goodsForm)"></el-input>
+          @change="priceChange(goodsForm)" @input="outFactoryPriceInput(goodsForm)"></el-input>
       </template>
       //分摊金额
       <template slot="shareAmountForm" slot-scope="{type,disabled}">
@@ -1001,6 +1001,10 @@ export default {
         this.form.exchangeRate
       );
     },
+      outFactoryPriceInput(row){
+          console.log(row,1005)
+          this.$set(row,'outFactoryChange',true)
+      },
     priceChange(row) {
       row.totalValue = multiply(row.outFactoryPrice, row.orderQuantity)
       row.price = addPrice(row.outFactoryPrice, row.shareAmount, row.internationalAmount)
@@ -1015,6 +1019,7 @@ export default {
         console.log(row.partsPrice,'partsPrice')
         console.log(row.outFactoryPrice,'outFactoryPrice')
         console.log(this.form.exchangeRate,'exchangeRate')
+        // this.$set(row,'outFactoryChange',true)
       row.itemMargin = grossProfitCal(
         row.purchaseAmount,
         row.partsPrice,

+ 10 - 2
src/views/exportTrade/salesContract/detailsPage.vue

@@ -2322,7 +2322,14 @@ export default {
                           this.data[i].purchaseAmount = item.purchaseAmount
 
                           this.data[i].productPrice = productCal(item.purchaseAmount, 0, item.coefficient);
-                          this.data[i].outFactoryPrice = sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate);
+                          // 如果不是 true 说明没有修改还是走里面的
+                          if (!this.data[i].outFactoryChange) {
+                              // 出场价格
+                              this.data[i].outFactoryPrice = sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate);
+                              // 销售价
+                              this.data[i].price = sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate);
+                          }
+
                           this.data[i].shareAmount = 0;
                           this.data[i].internationalAmount = 0;
                           this.data[i].totalValue = sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate);
@@ -2330,7 +2337,7 @@ export default {
                           this.data[i].insurance = 0;
                           this.data[i].freight = 0;
                           this.data[i].discount = null;
-                          this.data[i].price = sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate);
+
                           this.data[i].amount = sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate);
                           console.log(sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate),'出场价格')
                           this.data[i].taxRate = 0;
@@ -2348,6 +2355,7 @@ export default {
                       this.data[i].discount
                   );
               }
+
               amountSum = _.add(
                 amountSum,
                 _.multiply(