|
@@ -173,6 +173,11 @@
|
|
|
<p>{{JSON.parse(scope.row.jsonInfo).productName}}</p>
|
|
<p>{{JSON.parse(scope.row.jsonInfo).productName}}</p>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
+ <el-table-column label="原单价" width="240" align="center">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <p>¥{{(scope.row.originalPrice ? scope.row.originalPrice.toFixed(2) : JSON.parse(scope.row.jsonInfo).price.toFixed(2))}}</p>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="单价" width="240" align="center">
|
|
<el-table-column label="单价" width="240" align="center">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<p>¥{{JSON.parse(scope.row.jsonInfo).price.toFixed(2)}}</p>
|
|
<p>¥{{JSON.parse(scope.row.jsonInfo).price.toFixed(2)}}</p>
|
|
@@ -195,6 +200,8 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<div style="float: right;margin: 20px" v-if="order!=null">
|
|
<div style="float: right;margin: 20px" v-if="order!=null">
|
|
|
|
|
+ <span style="color: #909399;text-decoration: line-through;">原价合计:¥{{originalTotal.toFixed(2)}}</span>
|
|
|
|
|
+
|
|
|
合计:<span class="color-danger">¥{{order.totalPrice.toFixed(2)}}</span>
|
|
合计:<span class="color-danger">¥{{order.totalPrice.toFixed(2)}}</span>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -692,6 +699,14 @@ export default {
|
|
|
computed: {
|
|
computed: {
|
|
|
company(){
|
|
company(){
|
|
|
return this.$store.state.user.user;
|
|
return this.$store.state.user.user;
|
|
|
|
|
+ },
|
|
|
|
|
+ originalTotal() {
|
|
|
|
|
+ if (!this.items) return 0;
|
|
|
|
|
+ return this.items.reduce((sum, item) => {
|
|
|
|
|
+ const info = JSON.parse(item.jsonInfo);
|
|
|
|
|
+ const price = item.originalPrice != null ? item.originalPrice : info.price;
|
|
|
|
|
+ return sum + (price * item.num);
|
|
|
|
|
+ }, 0);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {formatAmount() {
|
|
methods: {formatAmount() {
|