|
|
@@ -203,6 +203,11 @@
|
|
|
<p>{{JSON.parse(scope.row.jsonInfo).productName}}</p>
|
|
|
</template>
|
|
|
</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">
|
|
|
<template slot-scope="scope">
|
|
|
<p>¥{{JSON.parse(scope.row.jsonInfo).price.toFixed(2)}}</p>
|
|
|
@@ -230,6 +235,8 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<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>
|
|
|
</div>
|
|
|
<div style="margin: 60px 0px 20px 0px">
|
|
|
@@ -629,6 +636,16 @@ export default {
|
|
|
this.scheduleOptions = response.data;
|
|
|
});
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ 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() {
|
|
|
if (typeof this.editForm.offlinePayAmount === 'number') {
|