|
@@ -173,12 +173,12 @@ export default {
|
|
|
// 如果纸质优惠券不存在的话,则往 paperCoupons 添加
|
|
|
if ( this.paperCoupons.findIndex(item => item.discountCode === couponCode) < 0 ) {
|
|
|
const {hourPrice} = this.orderDetail.parkingRule
|
|
|
- const discountTime = Number(res.discountFee) / hourPrice
|
|
|
+ // const discountTime = Number(res.discountFee) / hourPrice
|
|
|
const paperCoupons = [
|
|
|
...this.paperCoupons,
|
|
|
{
|
|
|
...res,
|
|
|
- discountTime: res.discountFee / hourPrice
|
|
|
+ // discountTime: res.discountFee / hourPrice
|
|
|
}
|
|
|
]
|
|
|
this.paperCouponList = paperCoupons
|
|
@@ -191,11 +191,11 @@ export default {
|
|
|
},
|
|
|
// 删除
|
|
|
deleteCoupon( i ) {
|
|
|
- const item = this.paperCoupons[i]
|
|
|
- const paperCoupons = this.paperCoupons.filter(elm => elm.discountCode !== item.discountCode)
|
|
|
+ const item = this.paperCouponList[i]
|
|
|
+ this.paperCouponList = this.paperCouponList.filter(elm => elm.discountCode !== item.discountCode)
|
|
|
const {hourPrice} = this.orderDetail.parkingRule
|
|
|
const discountTime = Number(item.discountFee) / hourPrice
|
|
|
- this.$store.commit('order/setPaperCoupons',paperCoupons)
|
|
|
+ this.$store.commit('order/setPaperCoupons',this.paperCouponList)
|
|
|
// 金额
|
|
|
this.$store.commit('order/setPaperDiscountFee',this.paperDiscountFee - Number(item.discountFee))
|
|
|
// 时间
|
|
@@ -207,7 +207,7 @@ export default {
|
|
|
console.log(310,this.orderDetail);
|
|
|
|
|
|
this.$store.dispatch('order/savePaperCoupon', {
|
|
|
- couponList: this.paperCoupons,
|
|
|
+ paperCoupons: this.paperCoupons,
|
|
|
callback: () => {
|
|
|
this.$router.back();
|
|
|
},
|