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