feat: 代客下单更新

This commit is contained in:
2025-03-04 18:05:21 +08:00
parent cff5363260
commit 833676f545
24 changed files with 307 additions and 116 deletions

View File

@@ -25,7 +25,7 @@
</div>
<div class="item">
<div class="t">订单金额</div>
<div class="b">{{ detail.orderAmount }}</div>
<div class="b">{{ returnOriginAmount }}</div>
</div>
<div class="item">
<div class="t">订单类型</div>
@@ -97,6 +97,7 @@
<div>
<div style="margin-bottom: 16px; font-size: 16px">商品信息</div>
<template v-for="(item, index) in detail.detailMap" :key="index">
<h4>{{ index }}次下单</h4>
<el-table :data="item">
<el-table-column label="商品">
<template v-slot="scope">
@@ -210,6 +211,23 @@ export default {
return n;
},
//计算订单原金额
returnOriginAmount() {
let amount = 0;
if (this.detail && this.detail.originAmount) {
return this.detail.originAmount;
}
if (!this.detail) {
return 0;
}
for (let i in this.detail.detailMap) {
amount += this.detail.detailMap[i].reduce((pre, cur) => {
return pre + cur.payAmount;
}, 0);
}
return amount.toFixed(2);
},
},
methods: {
returnPayType(payType) {