|
@@ -315,6 +315,9 @@
|
|
|
>{{ row.title }}</span
|
|
>{{ row.title }}</span
|
|
|
>
|
|
>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ <template slot="total_cost" slot-scope="{ row }">
|
|
|
|
|
+ <span v-show="row.no_tax_total_price*1+row.transport_price*1>0">{{row.no_tax_total_price*1+row.transport_price*1}}</span>
|
|
|
|
|
+ </template>
|
|
|
<!-- :disabled="row.state==0" -->
|
|
<!-- :disabled="row.state==0" -->
|
|
|
<!-- :disabled="row.state==0" -->
|
|
<!-- :disabled="row.state==0" -->
|
|
|
<template slot="setSlot" slot-scope="{ row, index }">
|
|
<template slot="setSlot" slot-scope="{ row, index }">
|
|
@@ -1293,7 +1296,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: "运费",
|
|
title: "运费",
|
|
|
- key: "transport_price",
|
|
|
|
|
|
|
+ key: "transportu_price",
|
|
|
align: "center",
|
|
align: "center",
|
|
|
minWidth: 120,
|
|
minWidth: 120,
|
|
|
render: (h, params) => {
|
|
render: (h, params) => {
|
|
@@ -1433,6 +1436,13 @@ export default {
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
|
|
+ title: " 合计成本",
|
|
|
|
|
+ key: "total_cost",
|
|
|
|
|
+ align: "center",
|
|
|
|
|
+ minWidth: 120,
|
|
|
|
|
+ slot: "total_cost",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
title: "参照订单号/到货单号",
|
|
title: "参照订单号/到货单号",
|
|
|
key: "reference_order_no",
|
|
key: "reference_order_no",
|
|
|
align: "center",
|
|
align: "center",
|
|
@@ -1729,6 +1739,26 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.tableData.splice(index, 1, v);
|
|
this.tableData.splice(index, 1, v);
|
|
|
});
|
|
});
|
|
|
|
|
+ let lastObj = {};
|
|
|
|
|
+ lastObj = this.tableData.slice(-1);
|
|
|
|
|
+ let last = [];
|
|
|
|
|
+ let lastSum = 0;
|
|
|
|
|
+ this.tableData.forEach((e) => {
|
|
|
|
|
+ last.push(e.transport_price);
|
|
|
|
|
+ });
|
|
|
|
|
+ //这是全部的和
|
|
|
|
|
+ lastSum = eval(last.slice(0, -1).join("+"));
|
|
|
|
|
+ lastSum = lastSum - lastObj[0].transport_price * 1;
|
|
|
|
|
+ lastSum = this.other_price - lastSum;
|
|
|
|
|
+ this.tableData.forEach((e, index) => {
|
|
|
|
|
+ console.log(e, index, this.tableData.length - 2);
|
|
|
|
|
+ if (index == this.tableData.length - 2) {
|
|
|
|
|
+ e.transport_price = lastSum.toFixed(2);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ this.tableData.slice(0, -1).forEach((e) => {
|
|
|
|
|
+ e.total_cost = e.transport_price*1 + e.no_tax_total_price*1;
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
sureOtherPrice() {
|
|
sureOtherPrice() {
|
|
|
const values = this.otherPriceList.map((item) => Number(item.price));
|
|
const values = this.otherPriceList.map((item) => Number(item.price));
|
|
@@ -1969,7 +1999,7 @@ export default {
|
|
|
key === "num" ||
|
|
key === "num" ||
|
|
|
key === "no_tax_total_price" ||
|
|
key === "no_tax_total_price" ||
|
|
|
key === "tax_total_price" ||
|
|
key === "tax_total_price" ||
|
|
|
- key === "total"
|
|
|
|
|
|
|
+ key === "total"
|
|
|
) {
|
|
) {
|
|
|
const v = values.reduce((prev, curr) => {
|
|
const v = values.reduce((prev, curr) => {
|
|
|
const value = Number(curr);
|
|
const value = Number(curr);
|