Browse Source

修改bug

Qukatie 2 years ago
parent
commit
9d4cd0a044

+ 66 - 66
src/components/fee-info/config/feeInfo.json

@@ -21,93 +21,93 @@
   "indexSlot":true,
   "column": [
     {
-      "label": "结算单位",
-      "prop": "corpId",
-      "index": 1,
-      "overHidden": true,
-      "width": 220
+        "label": "结算单位",
+        "prop": "corpId",
+        "index": 1,
+        "overHidden": true,
+        "width": 220
     },
     {
-      "label": "费用名称",
-      "prop": "feeName",
-      "index": 2,
-      "width": 220,
-      "overHidden": true
+        "label": "费用名称",
+        "prop": "feeName",
+        "index": 2,
+        "width": 220,
+        "overHidden": true
     },
     {
-      "label": "提单号",
-      "prop": "billNo",
-      "index": 3,
-      "hide": true,
-      "overHidden": true,
-      "width": 150
+        "label": "单价",
+        "prop": "price",
+        "index": 3,
+        "slot": true,
+        "overHidden": true,
+        "width": 100
     },
     {
-      "label": "单价",
-      "prop": "price",
-      "index": 4,
-      "slot": true,
-      "overHidden": true,
-      "width": 150
+        "label": "数量",
+        "prop": "quantity",
+        "index": 4,
+        "overHidden": true,
+        "width": 100
     },
     {
-      "label": "数量",
-      "prop": "quantity",
-      "index": 5,
-      "overHidden": true,
-      "width": 150
+        "label": "计价单位",
+        "prop": "unit",
+        "index": 5,
+        "slot": true,
+        "overHidden": true,
+        "width": 100
     },
     {
-      "label": "金额",
-      "prop": "amount",
-      "index": 6,
-      "cell": true,
-      "overHidden": true,
-      "width": 150
+        "label": "金额",
+        "prop": "amount",
+        "index": 6,
+        "cell": true,
+        "overHidden": true,
+        "width": 150
     },
     {
-      "label": "结算金额",
-      "prop": "settlmentAmount",
-      "index": 7,
-      "overHidden": true,
-      "width": 150
+        "label": "币别",
+        "prop": "currency",
+        "index": 7,
+        "overHidden": true,
+        "width": 80
     },
     {
-      "label": "开票金额",
-      "prop": "invoiceAmount",
-      "index": 8,
-      "overHidden": true,
-      "width": 150
+        "label": "汇率",
+        "prop": "exchangeRate",
+        "index": 8,
+        "overHidden": true,
+        "width": 80
     },
     {
-      "label": "币别",
-      "prop": "currency",
-      "index": 9,
-      "overHidden": true,
-      "width": 150
+        "label": "提单号",
+        "prop": "billNo",
+        "index": 9,
+        "hide": true,
+        "overHidden": true,
+        "width": 150
     },
     {
-      "label": "汇率",
-      "prop": "exchangeRate",
-      "index": 10,
-      "overHidden": true,
-      "width": 150
+        "label": "结算金额",
+        "prop": "settlmentAmount",
+        "index": 10,
+        "overHidden": true,
+        "width": 150
     },
     {
-      "label": "计价单位",
-      "prop": "unit",
-      "index": 11,
-      "slot": true,
-      "overHidden": true,
-      "width": 150
+        "label": "开票金额",
+        "prop": "invoiceAmount",
+        "index": 11,
+        "overHidden": true,
+        "width": 150
     },
     {
-      "label": "备注",
-      "prop": "remarks",
-      "index": 12,
-      "cell": true,
-      "overHidden": true,
-      "width": 150
+        "label": "备注",
+        "prop": "remarks",
+        "index": 12,
+        "cell": true,
+        "overHidden": true,
+        "width": 150
     }
-  ]
+]
 }

+ 14 - 16
src/components/fee-info/main.vue

@@ -21,7 +21,7 @@
         </template>
         <template slot="menu" slot-scope="{ row, index }">
           <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)" :disabled="disabled">{{
-              row.$cellEdit ? "保存" : "修改"
+          row.$cellEdit ? "保存" : "修改"
           }}</el-button>
           <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)" :disabled="disabled">删 除
           </el-button>
@@ -31,8 +31,8 @@
           </el-button>
         </template>
         <template slot="corpId" slot-scope="{ row, index }">
-          <crop-select ref="corp"  v-if="row.$cellEdit"
-            v-model="row.corpId" :cropIndex="index" @getCorpData="getCorpData" corpType="KG"></crop-select>
+          <crop-select ref="corp" v-if="row.$cellEdit" v-model="row.corpId" :cropIndex="index"
+            @getCorpData="getCorpData" corpType="KG"></crop-select>
           <span v-else>{{ row.corpName }}</span>
         </template>
         <template slot="feeName" slot-scope="{ row }">
@@ -310,7 +310,7 @@ export default {
   async created() {
     // 判断tabShow的activeName默认的显示
     this.activeName = this.tabShow == 1 ? "first" : this.tabShow == 2 ? "first" : "second";
-    this.feeOption = await this.getColumnData( this.getColumnName(33),this.typeName === "wood" ? woodOption : feeOption);
+    this.feeOption = await this.getColumnData(this.getColumnName(33), this.typeName === "wood" ? woodOption : feeOption);
     if (this.$store.getters.userInfo.tenant_id === "888390") {
       this.feeOption.column.forEach(item => {
         if (item.prop === "billNo") {
@@ -343,15 +343,13 @@ export default {
       this.$refs.feeCrud.refreshTable();
     },
     orderFeesList(newVla, oldVal) {
-      if (newVla !== oldVal) {
-        this.allData = newVla;
-        this.data_one = newVla.filter(item => item.feesType === 1); //应收
-        this.data_two = newVla.filter(item => item.feesType === 2); //应付
-        if (this.selectTab === 1) {
-          this.feeData = this.data_one;
-        } else {
-          this.feeData = this.data_two;
-        }
+      this.allData = newVla;
+      this.data_one = newVla.filter(item => item.feesType === 1); //应收
+      this.data_two = newVla.filter(item => item.feesType === 2); //应付
+      if (this.selectTab === 1) {
+        this.feeData = this.data_one;
+      } else {
+        this.feeData = this.data_two;
       }
     },
     activeName(newVla, oldVal) {
@@ -546,7 +544,7 @@ export default {
       if (this.inCropId) {
         const params = {
           feesType: this.selectTab,
-          corpId:this.corpId
+          corpId: this.corpId
         };
         if (this.typeName === "wood") params.corpId = this.corpId
         this.$refs.feeCrud.rowCellAdd(params);
@@ -791,7 +789,7 @@ export default {
       return sums;
     },
     async saveColumn() {
-      const inSave = await this.saveColumnData(this.getColumnName(33),this.feeOption);
+      const inSave = await this.saveColumnData(this.getColumnName(33), this.feeOption);
       if (inSave) {
         this.$message.success("保存成功");
         //关闭窗口
@@ -799,7 +797,7 @@ export default {
       }
     },
     async resetColumn() {
-      const inSave = await this.delColumnData(this.getColumnName(33),this.typeName === "wood" ? woodOption : feeOption);
+      const inSave = await this.delColumnData(this.getColumnName(33), this.typeName === "wood" ? woodOption : feeOption);
       if (inSave) {
         this.$message.success("重置成功");
         this.feeOption = this.typeName === "wood" ? woodOption : feeOption;

+ 11 - 8
src/enums/column-name.js

@@ -869,53 +869,56 @@ const columnName = [{
   code: 206,
   name: '港杂费-运费明细表'
 }, {
+  code: 206,
+  name: '港杂费-杂费明细表'
+}, {
   code: 207,
   name: '客户(Y)-列表页'
 }, {
   code: 208,
-  name: '客户(Y)-杂费明细表'
+  name: '客户(Y)-明细表'
 }, {
   code: 209,
   name: '供应商(Y)-列表页'
 }, {
   code: 210,
-  name: '供应商(Y)-杂费明细表'
+  name: '供应商(Y)-明细表'
 }, {
   code: 211,
   name: '销售单(Y)-列表页'
 }, {
   code: 212,
-  name: '销售单(Y)-杂费明细表'
+  name: '销售单(Y)-明细表'
 }, {
   code: 213,
   name: '采购单(Y)-列表页'
 }, {
   code: 214,
-  name: '采购单(Y)-杂费明细表'
+  name: '采购单(Y)-明细表'
 }, {
   code: 215,
   name: '退货单(Y)-列表页'
 }, {
   code: 216,
-  name: '退货单(Y)-杂费明细表'
+  name: '退货单(Y)-明细表'
 }, {
   code: 217,
   name: '产品(Y)-列表页'
 }, {
   code: 218,
-  name: '产品(Y)-杂费明细表'
+  name: '产品(Y)-明细表'
 }, {
   code: 219,
   name: '库存(Y)-列表页'
 }, {
   code: 220,
-  name: '库存(Y)-杂费明细表'
+  name: '库存(Y)-明细表'
 }, {
   code: 221,
   name: '费用收入(Y)-列表页'
 }, {
   code: 222,
-  name: '费用收入(Y)-杂费明细表'
+  name: '费用收入(Y)-明细表'
 }
 ]
 export const getColumnName = (key) => {

+ 1 - 1
src/router/views/index.js

@@ -451,7 +451,7 @@ export default [{
   hidden: true,
   children: [{
     path: '/maintenance/portSurcharge/index',
-    name: '港杂费',
+    name: '海运费',
     meta: {
       keepAlive: true,
     },

+ 3 - 2
src/util/calculate.js

@@ -162,9 +162,10 @@ export function addAllsalary2(num, num2, num3, num4) {
 }
 
 //销售=出厂价+分摊价格
-export function addPrice(num, num2) {
+export function addPrice(num, num2,num3) {
   const Sum1 = Number(num ? num : 0)
   const Sum2 = Number(num2 ? num2 : 0)
-  const sum = _.add(Sum1, Sum2)
+  const Sum3 = Number(num3 ? num3 : 0)
+  const sum = _.add(_.add(Sum1, Sum2), Sum3)
   return Number(sum).toFixed(2)
 }

+ 49 - 18
src/views/exportTrade/customerInquiry/components/goodsInfo.vue

@@ -18,7 +18,9 @@
                         船务询价
                     </el-button>
                     <el-button type="info" size="small" @click="cnameData">刷新基础资料</el-button>
-                    <el-button type="info" size="small" @click="calculate" :disabled="detailData.status == 1">计算国内费用
+                    <el-button type="info" size="small" @click="calculate(1)" :disabled="detailData.status == 1">计算国内费用
+                    </el-button>
+                    <el-button type="info" size="small" @click="calculate(2)" :disabled="detailData.status == 1">计算国外费用
                     </el-button>
                 </el-row>
             </template>
@@ -215,6 +217,12 @@
                     oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
                     @change="priceChange(goodsForm)"></el-input>
             </template>
+            //分摊金额
+            <template slot="internationalAmountForm" slot-scope="{type,disabled}">
+                <el-input v-model="goodsForm.internationalAmount" size="small"
+                    oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+                    @change="priceChange(goodsForm)"></el-input>
+            </template>
             //单价
             <template slot="priceForm" slot-scope="{type,disabled}">
                 <el-input v-model="goodsForm.price" size="small"
@@ -377,6 +385,9 @@ export default {
         },
         form: {
             type: Object
+        },
+        orderFeesList: {
+            type: Array
         }
     },
     components: {
@@ -570,7 +581,7 @@ export default {
                     row.partsOtherValue = null;
                     row.partsOtherCostPrice = 0;
                     row.partsOtherSalePrice = 0;
-                    row.partsCost=0;
+                    row.partsCost = 0;
                     row.corpId = e.corpId;
                     row.corpName = e.corpCode;
                     row.itemDescription = e.cnameDescription;
@@ -580,6 +591,7 @@ export default {
                     row.productPrice = productCal(e.purchaseAmount, 0, this.form.coefficient);
                     row.outFactoryPrice = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
                     row.shareAmount = 0;
+                    row.internationalAmount = 0;
                     row.orderQuantity = 1;
                     row.insurance = 0;
                     row.freight = 0;
@@ -651,7 +663,7 @@ export default {
                     corpName: e.corpCode,
                     itemDescription: e.cnameDescription,
                     partsPrice: 0,
-                    partsCost:0,
+                    partsCost: 0,
                     itemType: e.specs,
                     tradeTerms: null,
                     productPrice: productCal(e.purchaseAmount, 0, this.form.coefficient),
@@ -660,6 +672,7 @@ export default {
                         this.form.exchangeRate
                     ),
                     shareAmount: 0,
+                    internationalAmount: 0,
                     orderQuantity: 1,
                     insurance: 0,
                     freight: 0,
@@ -757,28 +770,40 @@ export default {
                 }
             });
         },
-        calculate() {
+        calculate(val) {
             this.form.totalValue = 0
             this.data.forEach((e, index) => {
                 e.sort = Number(index) + 1
                 this.form.totalValue = sum(multiply(e.outFactoryPrice, e.orderQuantity), this.form.totalValue)
             })
-            calculationDomesticFees({ ...this.form, orderItemsList: this.data, }).then(res => {
+            calculationDomesticFees({ ...this.form, domesticAbroad: val, orderItemsList: this.data, }).then(res => {
                 this.$confirm("总费用为:" + res.data.data.amount + ",单项运费为" + res.data.data.amountF + ",是否继续更新?", {
                     confirmButtonText: "确定",
                     cancelButtonText: "取消",
                     type: "warning"
                 }).then(() => {
                     this.data.forEach(e => {
-                        e.shareAmount = multiply(res.data.data.amountF, e.outFactoryPrice)
-                        e.price = addPrice(e.outFactoryPrice, multiply(res.data.data.amountF, e.outFactoryPrice))
-                        e.amount = amountCal(
-                            addPrice(e.outFactoryPrice, res.data.data.amountF),
-                            e.orderQuantity,
-                            e.freight,
-                            e.insurance,
-                            e.discount
-                        );
+                        if (val == 1) {
+                            e.shareAmount = multiply(res.data.data.amountF, e.outFactoryPrice)
+                            e.price = addPrice(e.outFactoryPrice, multiply(res.data.data.amountF, e.outFactoryPrice), e.internationalAmount)
+                            e.amount = amountCal(
+                                addPrice(e.outFactoryPrice, res.data.data.amountF, e.internationalAmount),
+                                e.orderQuantity,
+                                e.freight,
+                                e.insurance,
+                                e.discount
+                            );
+                        } else {
+                            e.internationalAmount = multiply(res.data.data.amountF, e.outFactoryPrice)
+                            e.price = addPrice(e.outFactoryPrice, multiply(res.data.data.amountF, e.outFactoryPrice), e.shareAmount)
+                            e.amount = amountCal(
+                                addPrice(e.outFactoryPrice, res.data.data.amountF, e.shareAmount),
+                                e.orderQuantity,
+                                e.freight,
+                                e.insurance,
+                                e.discount
+                            );
+                        }
                         e.itemMargin = grossProfitCal(
                             e.purchaseAmount,
                             e.partsPrice,
@@ -786,6 +811,10 @@ export default {
                             this.form.exchangeRate
                         );
                     })
+                    res.data.data.fees.forEach(e => {
+                        this.orderFeesList.push({ feesType: 2, ...e, corpId: this.form.corpId, corpName: this.form.corpsName, amount: multiply(e.price, e.quantity) })
+                    })
+
                 });
             })
         },
@@ -838,7 +867,8 @@ export default {
             row.outFactoryPrice = sellingCal(row.productPrice, this.form.exchangeRate);
             row.price = addPrice(
                 row.outFactoryPrice,
-                row.shareAmount
+                row.shareAmount,
+                row.internationalAmount
             );
             row.amount = amountCal(
                 row.price,
@@ -855,9 +885,9 @@ export default {
             );
         },
         priceChange(row) {
-            row.price = addPrice(row.outFactoryPrice, row.shareAmount)
+            row.price = addPrice(row.outFactoryPrice, row.shareAmount, row.internationalAmount)
             row.amount = amountCal(
-                addPrice(row.outFactoryPrice, row.shareAmount),
+                addPrice(row.outFactoryPrice, row.shareAmount, row.internationalAmount),
                 row.orderQuantity,
                 row.freight,
                 row.insurance,
@@ -1041,7 +1071,8 @@ export default {
             );
             this.goodsForm.price = addPrice(
                 this.goodsForm.outFactoryPrice,
-                this.goodsForm.shareAmount
+                this.goodsForm.shareAmount,
+                this.goodsForm.internationalAmount
             );
             this.goodsForm.amount = amountCal(
                 this.goodsForm.price,

+ 10 - 1
src/views/exportTrade/customerInquiry/config/customerContact.json

@@ -238,7 +238,7 @@
             "overHidden": true
         },
         {
-            "label": "分摊金额",
+            "label": "国内分摊费用",
             "prop": "shareAmount",
             "index": 23,
             "width": 100,
@@ -247,6 +247,15 @@
             "overHidden": true
         },
         {
+            "label": "国外分摊费用",
+            "prop": "internationalAmount",
+            "index": 23,
+            "width": 100,
+            "align": "right",
+            "span": 6,
+            "overHidden": true
+        },
+        {
             "label": "销售价",
             "prop": "price",
             "index": 24,

+ 8 - 5
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -126,7 +126,8 @@
           </template>
         </avue-form>
       </trade-card>
-      <goods-info ref="goodsInfo" :form="form" :data="data" :detailData="detailData"></goods-info>
+      <goods-info ref="goodsInfo" :form="form" :data="data" :orderFeesList.sync="orderFeesList"
+        :detailData="detailData"></goods-info>
       <!-- <trade-card title="商品信息">
         <avue-crud ref="crud" :data="data" :option="tableOption" @row-del="rowDel" :summary-method="summaryMethod"
           @saveColumn="saveColumn" @resetColumn="resetColumn" :cell-style="cellStyle" @row-dblclick="handleRowDBLClick">
@@ -390,7 +391,7 @@ import {
   costCal,
   sum,
   addPrice,
-  multiply 
+  multiply
 } from "@/util/calculate";
 import goodsInfo from "./components/goodsInfo.vue";
 import _ from "lodash";
@@ -990,9 +991,9 @@ export default {
                 this.form.exchangeRate
               );
               e.shareAmount = transformCal(e.shareAmount, this.oldExchange, this.form.exchangeRate);
-              console.log(e.shareAmount)
+              e.internationalAmount= transformCal(e.internationalAmount, this.oldExchange, this.form.exchangeRate);
               e.outFactoryPrice = sellingCal(e.productPrice, this.form.exchangeRate);
-              e.price = addPrice(e.outFactoryPrice, e.shareAmount);
+              e.price = addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount);
               // e.price = sellingCal(e.productPrice, this.form.exchangeRate);
               e.amount = amountCal(
                 e.price,
@@ -1025,6 +1026,7 @@ export default {
       this.form.corpAttn = null;
       this.form.corpTel = null;
       this.form.coefficient = row.coefficient;
+      this.form.corpsName = row.cname;
       this.form.clientMessage = (row.cname ? row.cname : '') + '\r\n' + (row.addr ? row.addr : '')
       if (this.data.length > 0) {
         this.data.forEach(e => {
@@ -1375,7 +1377,8 @@ export default {
           e.insurance = transformCal(e.insurance, this.oldExchange, row);
           e.shareAmount = transformCal(e.shareAmount, this.oldExchange, row);
           e.outFactoryPrice = sellingCal(e.productPrice, row);
-          e.price = addPrice(e.outFactoryPrice, e.shareAmount);
+          e.internationalAmount= transformCal(e.internationalAmount, this.oldExchange,row);
+          e.price = addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount);
           e.amount = amountCal(
             e.price,
             e.orderQuantity,

+ 46 - 16
src/views/exportTrade/salesContract/components/goodsInfo.vue

@@ -12,7 +12,9 @@
             :disabled="detailData.status == 1 || orderItemIds.length == 0" @click="getInvoice">生成发货单
           </el-button>
           <el-button type="info" size="small" @click="cnameData">刷新基础资料</el-button>
-          <el-button type="info" size="small" @click="calculate" :disabled="detailData.status == 1">计算国内费用
+          <el-button type="info" size="small" @click="calculate(1)" :disabled="detailData.status == 1">计算国内费用
+          </el-button>
+          <el-button type="info" size="small" @click="calculate(2)" :disabled="detailData.status == 1">计算国外费用
           </el-button>
         </el-row>
       </template>
@@ -197,6 +199,12 @@
           oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
           @change="priceChange(goodsForm)"></el-input>
       </template>
+      //分摊金额
+      <template slot="internationalAmountForm" slot-scope="{type,disabled}">
+        <el-input v-model="goodsForm.internationalAmount" size="small"
+          oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+          @change="priceChange(goodsForm)"></el-input>
+      </template>
       //单价
       <template slot="priceForm" slot-scope="{type,disabled}">
         <el-input v-model="goodsForm.price" size="small"
@@ -358,6 +366,9 @@ export default {
     },
     form: {
       type: Object
+    },
+    orderFeesList: {
+      type: Array
     }
   },
   components: {
@@ -573,6 +584,7 @@ export default {
           row.productPrice = productCal(e.purchaseAmount, 0, this.form.coefficient);
           row.outFactoryPrice = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
           row.shareAmount = 0;
+          row.internationalAmount = 0;
           row.totalValue = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
           row.orderQuantity = 1;
           row.insurance = 0;
@@ -655,6 +667,7 @@ export default {
             this.form.exchangeRate
           ),
           shareAmount: 0,
+          internationalAmount: 0,
           totalValue: sellingCal(
             productCal(e.purchaseAmount, 0, this.form.coefficient),
             this.form.exchangeRate
@@ -737,28 +750,40 @@ export default {
         }
       });
     },
-    calculate() {
+    calculate(val) {
       this.form.totalValue = 0
       this.data.forEach((e, index) => {
         e.sort = Number(index) + 1
         this.form.totalValue = sum(multiply(e.outFactoryPrice, e.orderQuantity), this.form.totalValue)
       })
-      calculationDomesticFees({ ...this.form, orderItemsList: this.data, }).then(res => {
+      calculationDomesticFees({ ...this.form, domesticAbroad: val, orderItemsList: this.data, }).then(res => {
         this.$confirm("总费用为:" + res.data.data.amount + ",单项运费为" + res.data.data.amountF + ",是否继续更新?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
           this.data.forEach(e => {
-            e.shareAmount = multiply(res.data.data.amountF, e.outFactoryPrice)
-            e.price = addPrice(e.outFactoryPrice, multiply(res.data.data.amountF, e.outFactoryPrice))
-            e.amount = amountCal(
-              addPrice(e.outFactoryPrice, res.data.data.amountF),
-              e.orderQuantity,
-              e.freight,
-              e.insurance,
-              e.discount
-            );
+            if (val == 1) {
+              e.shareAmount = multiply(res.data.data.amountF, e.outFactoryPrice)
+              e.price = addPrice(e.outFactoryPrice, multiply(res.data.data.amountF, e.outFactoryPrice), e.internationalAmount)
+              e.amount = amountCal(
+                addPrice(e.outFactoryPrice, res.data.data.amountF, e.internationalAmount),
+                e.orderQuantity,
+                e.freight,
+                e.insurance,
+                e.discount
+              );
+            } else {
+              e.internationalAmount = multiply(res.data.data.amountF, e.outFactoryPrice)
+              e.price = addPrice(e.outFactoryPrice, multiply(res.data.data.amountF, e.outFactoryPrice), e.shareAmount)
+              e.amount = amountCal(
+                addPrice(e.outFactoryPrice, res.data.data.amountF, e.shareAmount),
+                e.orderQuantity,
+                e.freight,
+                e.insurance,
+                e.discount
+              );
+            }
             e.itemMargin = grossProfitCal(
               e.purchaseAmount,
               e.partsPrice,
@@ -766,6 +791,9 @@ export default {
               this.form.exchangeRate
             );
           })
+          res.data.data.fees.forEach(e => {
+            this.orderFeesList.push({ feesType: 2, ...e, corpId: this.form.corpId, corpName: this.form.corpsName, amount: multiply(e.price, e.quantity) })
+          })
         });
       })
     },
@@ -819,7 +847,8 @@ export default {
       row.totalValue = multiply(row.outFactoryPrice, row.orderQuantity)
       row.price = addPrice(
         row.outFactoryPrice,
-        row.shareAmount
+        row.shareAmount,
+        row.internationalAmount
       );
       row.amount = amountCal(
         row.price,
@@ -837,9 +866,9 @@ export default {
     },
     priceChange(row) {
       row.totalValue = multiply(row.outFactoryPrice, row.orderQuantity)
-      row.price = addPrice(row.outFactoryPrice, row.shareAmount)
+      row.price = addPrice(row.outFactoryPrice, row.shareAmount, row.internationalAmount)
       row.amount = amountCal(
-        addPrice(row.outFactoryPrice, row.shareAmount),
+        addPrice(row.outFactoryPrice, row.shareAmount, row.internationalAmount),
         row.orderQuantity,
         row.freight,
         row.insurance,
@@ -1042,7 +1071,8 @@ export default {
       );
       this.goodsForm.price = addPrice(
         this.goodsForm.outFactoryPrice,
-        this.goodsForm.shareAmount
+        this.goodsForm.shareAmount,
+        this.goodsForm.internationalAmount
       );
       this.goodsForm.amount = amountCal(
         this.goodsForm.price,

+ 10 - 1
src/views/exportTrade/salesContract/config/customerContact.json

@@ -243,7 +243,7 @@
             "overHidden": true
         },
         {
-            "label": "分摊金额",
+            "label": "国内分摊费用",
             "prop": "shareAmount",
             "index": 23,
             "width": 100,
@@ -252,6 +252,15 @@
             "overHidden": true
         },
         {
+            "label": "国外分摊费用",
+            "prop": "internationalAmount",
+            "index": 23,
+            "width": 100,
+            "align": "right",
+            "span": 6,
+            "overHidden": true
+        },
+        {
             "label": "销售价",
             "prop": "price",
             "index": 24,

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

@@ -154,7 +154,8 @@
           </template>
         </avue-form>
       </trade-card>
-      <goods-info ref="goodsInfo" :form="form" :data="data" :detailData="detailData"></goods-info>
+      <goods-info ref="goodsInfo" :form="form" :data="data" :detailData="detailData"
+        :orderFeesList.sync="orderFeesList"></goods-info>
       <!--  <trade-card title="商品信息">
         <avue-crud ref="crud" :data="data" :option="tableOption" @row-del="rowDel"
           @selection-change="goodsSelectionChange" @saveColumn="saveColumn" @resetColumn="resetColumn"
@@ -1124,9 +1125,10 @@ export default {
                 this.oldExchange,
                 this.form.exchangeRate
               );
-               e.shareAmount = transformCal(e.shareAmount, this.oldExchange, this.form.exchangeRate);
-                            e.outFactoryPrice = sellingCal(e.productPrice, this.form.exchangeRate);
-                            e.price = addPrice(e.outFactoryPrice, e.shareAmount);
+              e.shareAmount = transformCal(e.shareAmount, this.oldExchange, this.form.exchangeRate);
+              e.internationalAmount = transformCal(e.internationalAmount, this.oldExchange, this.form.exchangeRate);
+              e.outFactoryPrice = sellingCal(e.productPrice, this.form.exchangeRate);
+              e.price = addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount);
               e.amount = amountCal(
                 e.price,
                 e.orderQuantity,
@@ -1152,6 +1154,7 @@ export default {
     },
     getCorpData(row) {
       this.form.coefficient = row.coefficient;
+      this.form.corpsName = row.cname;
       this.form.clientMessage = (row.cname ? row.cname : '') + '\r\n' + (row.addr ? row.addr : '')
       if (this.data.length > 0) {
         this.data.forEach(e => {
@@ -1497,8 +1500,9 @@ export default {
           e.freight = transformCal(e.freight, this.oldExchange, row);
           e.insurance = transformCal(e.insurance, this.oldExchange, row);
           e.shareAmount = transformCal(e.shareAmount, this.oldExchange, row);
-                    e.outFactoryPrice = sellingCal(e.productPrice, row);
-                    e.price = addPrice(e.outFactoryPrice, e.shareAmount);
+          e.internationalAmount = transformCal(e.internationalAmount, this.oldExchange, row);
+          e.outFactoryPrice = sellingCal(e.productPrice, row);
+          e.price = addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount);
           e.amount = amountCal(
             e.price,
             e.orderQuantity,

+ 13 - 5
src/views/maintenance/portSurcharge/detailsPage.vue

@@ -19,6 +19,9 @@
           <template slot="outHarborName">
             <port-info v-model="form.outHarborName" />
           </template>
+          <template slot="objectiveName">
+            <port-info v-model="form.objectiveName" />
+          </template>
         </avue-form>
       </basic-container>
       <containerTitle title="基础明细"></containerTitle>
@@ -121,12 +124,17 @@ export default {
                 trigger: "blur"
               }
             ],
-            span: 12,
+            span: 8,
           },
           {
             label: "起运港",
             prop: "outHarborName",
-            span: 12,
+            span: 8,
+          },
+          {
+            label: "目的港",
+            prop: "objectiveName",
+            span: 8,
           },
           {
             label: "备注",
@@ -163,7 +171,7 @@ export default {
       optionList
     );
     this.optionList2 = await this.getColumnData(
-      this.getColumnName(207),
+      this.getColumnName(206.1),
       optionList2
     );
     if (this.detailData.id) {
@@ -324,7 +332,7 @@ export default {
     },
     async saveColumn2() {
       const inSave = await this.saveColumnData(
-        this.getColumnName(207),
+        this.getColumnName(206.1),
         this.optionList2
       );
       if (inSave) {
@@ -339,7 +347,7 @@ export default {
     async resetColumn2() {
       this.optionList2 = optionList2;
       const inSave = await this.delColumnData(
-        this.getColumnName(207),
+        this.getColumnName(206.1),
         optionList2
       );
       if (inSave) {

+ 1 - 1
src/views/maintenance/portSurcharge/js/optionList.js

@@ -106,7 +106,7 @@ export const optionList2 = {
       width: 120,
     },
     {
-      label: "",
+      label: "JOB",
       prop: "ticket",
       overHidden: true,
       cell: true