|
@@ -59,8 +59,28 @@ export default defineComponent({
|
|
|
},
|
|
|
computed: {
|
|
|
orderDetailList() {
|
|
|
+
|
|
|
const result: any = this.result
|
|
|
- return result.orderDetailList || []
|
|
|
+ const orderDetailList = result.orderDetailList || []
|
|
|
+
|
|
|
+ orderDetailList.forEach((item: any) => {
|
|
|
+ let tempPrice = item?.expectPrice || item.actualPrice
|
|
|
+ if (item?.couponAmount) {
|
|
|
+ tempPrice = Number(
|
|
|
+ (
|
|
|
+ (tempPrice - result.couponAmount) / item.goodNum
|
|
|
+ ).toFixed(2)
|
|
|
+ )
|
|
|
+ } else {
|
|
|
+ tempPrice = Number(
|
|
|
+ tempPrice / item.goodNum
|
|
|
+ ).toFixed(2)
|
|
|
+ }
|
|
|
+
|
|
|
+ item.showPrice = tempPrice || 0
|
|
|
+ })
|
|
|
+
|
|
|
+ return orderDetailList || []
|
|
|
}
|
|
|
},
|
|
|
async mounted() {
|
|
@@ -204,10 +224,13 @@ export default defineComponent({
|
|
|
),
|
|
|
default: () => (
|
|
|
<div class={styles.content}>
|
|
|
- <span class={styles.price}>
|
|
|
+ {item.giftFlag ? <span class={styles.price}>
|
|
|
+ 赠送
|
|
|
+ </span>: <span class={styles.price}>
|
|
|
¥
|
|
|
- {(this as any).$filters.moneyFormat(item.expectPrice)}
|
|
|
- </span>
|
|
|
+ {(this as any).$filters.moneyFormat(item.showPrice)}
|
|
|
+ </span>}
|
|
|
+
|
|
|
<span class={styles.num}>x{item.goodNum}</span>
|
|
|
</div>
|
|
|
)
|
|
@@ -215,6 +238,14 @@ export default defineComponent({
|
|
|
/>
|
|
|
))}
|
|
|
|
|
|
+ {this.result.couponAmount > 0 && <Row class={styles.optionRow}>
|
|
|
+ <Col span="8" offset={1}>
|
|
|
+ 优惠金额:
|
|
|
+ </Col>
|
|
|
+ <Col span="14">{(this as any).$filters.moneyFormat(item.showPrice)}</Col>
|
|
|
+ <Col span="1"> </Col>
|
|
|
+ </Row>}
|
|
|
+
|
|
|
<Row class={styles.optionRow}>
|
|
|
<Col span="8" offset={1}>
|
|
|
订单号:
|