|
@@ -333,9 +333,14 @@
|
|
|
>{{ row.title }}</span
|
|
|
>
|
|
|
</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).toFixed(2)}}</span>
|
|
|
- </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).toFixed(2)
|
|
|
+ }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
<!-- :disabled="row.state==0" -->
|
|
|
<!-- :disabled="row.state==0" -->
|
|
|
<template slot="setSlot" slot-scope="{ row, index }">
|
|
@@ -1481,6 +1486,23 @@ export default {
|
|
|
key: "total_cost",
|
|
|
align: "center",
|
|
|
minWidth: 120,
|
|
|
+ render: (h, params) => {
|
|
|
+ const { row, index } = params;
|
|
|
+ const currentRow = JSON.parse(
|
|
|
+ JSON.stringify(this.tableData[index])
|
|
|
+ );
|
|
|
+ return currentRow.no_tax_total_price * 1 +
|
|
|
+ currentRow.transport_price * 1 >
|
|
|
+ 0
|
|
|
+ ? h(
|
|
|
+ "span",
|
|
|
+ (
|
|
|
+ currentRow.no_tax_total_price * 1 +
|
|
|
+ currentRow.transport_price * 1
|
|
|
+ ).toFixed(2)
|
|
|
+ )
|
|
|
+ : "";
|
|
|
+ },
|
|
|
// slot: "total_cost",
|
|
|
},
|
|
|
{
|
|
@@ -2293,6 +2315,13 @@ export default {
|
|
|
this.searchData.type = 0;
|
|
|
}
|
|
|
});
|
|
|
+ this.tableData.forEach((e) => {
|
|
|
+ let total_cost_value = (
|
|
|
+ e.no_tax_total_price * 1 +
|
|
|
+ e.transport_price * 1
|
|
|
+ ).toFixed(2);
|
|
|
+ this.$set(e, "total_cost",total_cost_value);
|
|
|
+ });
|
|
|
let obj = JSON.parse(JSON.stringify(this.searchData));
|
|
|
obj.order_time =
|
|
|
parseInt(new Date(obj.order_time).getTime() / 1000) || "";
|
|
@@ -2301,10 +2330,12 @@ export default {
|
|
|
if (v.title == "选择物料") {
|
|
|
children.splice(index, 1);
|
|
|
}
|
|
|
- this.otherPriceList = [{
|
|
|
- name:"",
|
|
|
- price:this.other_price
|
|
|
- }]
|
|
|
+ this.otherPriceList = [
|
|
|
+ {
|
|
|
+ name: "",
|
|
|
+ price: this.other_price,
|
|
|
+ },
|
|
|
+ ];
|
|
|
});
|
|
|
if (this.$route.query.order_in_no == "" || this.$route.query.type == 6) {
|
|
|
// console.log(...obj, "obj");
|
|
@@ -2323,7 +2354,7 @@ export default {
|
|
|
},
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- debugger
|
|
|
+ debugger;
|
|
|
if (res.code == 200) {
|
|
|
this.$Message.success(res.msg);
|
|
|
this.goBack();
|