|
@@ -35,7 +35,7 @@ export default defineComponent({
|
|
|
const query = this.$route.query
|
|
|
return {
|
|
|
loading: false, // 是否加载中,为了处理0元订单()
|
|
|
- orderType: query.orderType,
|
|
|
+ orderType: query.orderType as string,
|
|
|
recomUserId: query.recomUserId, // 推荐人id
|
|
|
activityId: query.activityId, // 活动编号
|
|
|
id: query.id,
|
|
@@ -139,9 +139,10 @@ export default defineComponent({
|
|
|
orderName: orderObject.orderName,
|
|
|
orderDesc: orderObject.orderDesc,
|
|
|
orderType: orderObject.orderType,
|
|
|
- actualPrice: orderObject.actualPrice || 0,
|
|
|
+ actualPrice: this.orderPrice || 0,
|
|
|
recomUserId: orderObject.recomUserId,
|
|
|
activityId: orderObject.activityId,
|
|
|
+ couponId: orderObject.couponId,
|
|
|
orderInfos: [...orderInfos()]
|
|
|
}
|
|
|
})
|
|
@@ -188,6 +189,12 @@ export default defineComponent({
|
|
|
(Number(this.orderAmount) - Number(discountCount)).toFixed(2)
|
|
|
)
|
|
|
this.orderPrice = lastAmount >= 0 ? lastAmount : 0
|
|
|
+
|
|
|
+ // 设置优惠券编号
|
|
|
+ const couponIds = (item || []).map((item: any) => {
|
|
|
+ return item.couponIssueId
|
|
|
+ })
|
|
|
+ orderStatus.orderObject.couponId = couponIds.join(',') || ''
|
|
|
}
|
|
|
},
|
|
|
render() {
|
|
@@ -217,6 +224,7 @@ export default defineComponent({
|
|
|
|
|
|
{/* 优惠券使用 */}
|
|
|
<UseCoupon
|
|
|
+ orderType={this.orderType}
|
|
|
orderAmount={this.orderAmount}
|
|
|
onCouponSelect={this.onCouponSelect}
|
|
|
disabled={orderStatus.orderObject.orderNo ? true : false}
|