|
@@ -16,6 +16,9 @@
|
|
|
<el-descriptions-item label="还需支付(元)">{{ Math.round((calculateTotalPrice() + calculateDeliveryPrice() - calculateTotalDiscountAmount()) * 100) / 100 }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="赠送余额">{{ appUserInfo ? appUserInfo.giveBalance : '0' }}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
+ <div style="margin-top: 20px" v-if="orderForm.isAppointment === 'Y'">
|
|
|
+ <el-button type="primary" @click="submitForm(3)" style="margin-right: 10px" >确认定价</el-button>
|
|
|
+ </div>
|
|
|
</el-card>
|
|
|
|
|
|
<el-card style="margin-top: 10px" v-if="orderForm.isAppointment === 'N'">
|
|
@@ -207,7 +210,7 @@
|
|
|
</el-card>
|
|
|
|
|
|
<el-card style="margin-top: 10px" v-if="orderForm.isAppointment === 'N'">
|
|
|
- <div slot="header" class="clearfix" v-if="orderForm.isAppointment === 'N'">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
<span>收款方式</span>
|
|
|
<template v-if="calculateTotalDiscountAmountByCoupon()">
|
|
|
<span style="margin-left: 10px">优惠券优惠</span>
|
|
@@ -215,9 +218,9 @@
|
|
|
<span>元</span>
|
|
|
</template>
|
|
|
|
|
|
- <template v-if="calculateTotalDiscountByActivity(activity, 'A6')">
|
|
|
+ <template v-if="calculateTotalDiscountByActivity(activity)">
|
|
|
<span style="margin-left: 10px">平台折扣活动优惠</span>
|
|
|
- <span style="color: #ff4949">{{ calculateTotalDiscountByActivity(activity, 'A7') }}</span>
|
|
|
+ <span style="color: #ff4949">{{ calculateTotalDiscountByActivity(activity) }}</span>
|
|
|
<span>元</span>
|
|
|
</template>
|
|
|
|
|
@@ -231,7 +234,7 @@
|
|
|
<span style="color: #ff4949">{{ (parseInt(calculateTotalPrice() * 100) + parseInt(calculateDeliveryPrice() * 100) - parseInt(calculateTotalDiscountAmount() * 100)) / 100 }}</span>
|
|
|
<span>元</span>
|
|
|
</div>
|
|
|
- <el-form-item label="支付方式" prop="payType" v-if="orderForm.isAppointment === 'N'">
|
|
|
+ <el-form-item label="支付方式" prop="payType">
|
|
|
<el-radio-group v-model="orderForm.payType" @change="changePayType">
|
|
|
<el-radio-button label="3" name="3">余额</el-radio-button>
|
|
|
<el-radio-button label="2" name="2">现金</el-radio-button>
|
|
@@ -251,13 +254,10 @@
|
|
|
<el-descriptions-item label="支付后余额(元)" v-if="appUserInfo">{{ appUserInfo.rechargeBalance + appUserInfo.giveBalance - calculateTotalPrice() }}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
|
|
|
- <div style="margin-top: 20px" v-if="orderForm.isAppointment === 'N'">
|
|
|
+ <div style="margin-top: 20px">
|
|
|
<el-button type="primary" @click="submitForm(0)" style="margin-right: 10px">立即支付</el-button>
|
|
|
<el-button type="primary" @click="submitForm(1)" style="margin-right: 5%">取衣支付</el-button>
|
|
|
</div>
|
|
|
- <div style="margin-top: 20px" v-if="orderForm.isAppointment === 'Y'">
|
|
|
- <el-button type="primary" @click="submitForm(3)" style="margin-right: 10px" >确认定价</el-button>
|
|
|
- </div>
|
|
|
</el-card>
|
|
|
</el-form>
|
|
|
|
|
@@ -547,7 +547,7 @@ export default {
|
|
|
totalDiscountAmount = totalDiscountAmount + cloth.deductAmount
|
|
|
})
|
|
|
if (this.activity.id) {
|
|
|
- totalDiscountAmount = totalDiscountAmount + this.calculateTotalDiscountByActivity(this.activity, 'A1')
|
|
|
+ totalDiscountAmount = totalDiscountAmount + this.calculateTotalDiscountByActivity(this.activity)
|
|
|
}
|
|
|
return Math.round(totalDiscountAmount * 100) / 100
|
|
|
},
|
|
@@ -795,20 +795,20 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (coupon.discountWay == '0') {
|
|
|
- // //抵扣
|
|
|
- // if (coupon.isUnique == 'Y') {
|
|
|
- // //单件,只减一件
|
|
|
- // var cloth = applyCloths[0]
|
|
|
- // //抵扣所有衣服里金额最大的
|
|
|
- // if (cloth.totalPrice - cloth.deductAmount >= coupon.deductAmount) {
|
|
|
- // coupon.orderCouponClothDTOS.push({ clothIndex: cloth.index, id: cloth.id, deductAmount: coupon.deductAmount, clothName: this.calculateClothNameByInfo(cloth) })
|
|
|
- // cloth.deductAmount += coupon.deductAmount
|
|
|
- // } else {
|
|
|
- // coupon.orderCouponClothDTOS.push({ clothIndex: cloth.index, id: cloth.id, deductAmount: cloth.totalPrice - cloth.deductAmount, clothName: this.calculateClothNameByInfo(cloth) })
|
|
|
- // cloth.deductAmount = cloth.totalPrice
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // //非单件,可减多件
|
|
|
+ //抵扣
|
|
|
+ if (coupon.isUnique == 'Y') {
|
|
|
+ //单件,只减一件
|
|
|
+ var cloth = applyCloths[0]
|
|
|
+ //抵扣所有衣服里金额最大的
|
|
|
+ if (cloth.totalPrice - cloth.deductAmount >= coupon.deductAmount) {
|
|
|
+ coupon.orderCouponClothDTOS.push({ clothIndex: cloth.index, id: cloth.id, deductAmount: coupon.deductAmount, clothName: this.calculateClothNameByInfo(cloth) })
|
|
|
+ cloth.deductAmount += coupon.deductAmount
|
|
|
+ } else {
|
|
|
+ coupon.orderCouponClothDTOS.push({ clothIndex: cloth.index, id: cloth.id, deductAmount: cloth.totalPrice - cloth.deductAmount, clothName: this.calculateClothNameByInfo(cloth) })
|
|
|
+ cloth.deductAmount = cloth.totalPrice
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //非单件,可减多件
|
|
|
var deductAmount = coupon.deductAmount
|
|
|
for (let i = 0; i < coupon.applyCloths.length; i++) {
|
|
|
//如果优惠券可抵扣金额用完
|
|
@@ -827,7 +827,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // }
|
|
|
+ }
|
|
|
// else
|
|
|
if (coupon.discountWay == '1') {
|
|
|
//满减
|
|
@@ -906,9 +906,9 @@ export default {
|
|
|
if (payTimeType == 1) {
|
|
|
params.payType = 0
|
|
|
}
|
|
|
- if (this.calculateTotalDiscountByActivity(this.activity, 'A3')) {
|
|
|
+ if (this.calculateTotalDiscountByActivity(this.activity)) {
|
|
|
params.activityId = this.activity.id
|
|
|
- params.activityDiscountAmount = this.calculateTotalDiscountByActivity(this.activity, 'A4')
|
|
|
+ params.activityDiscountAmount = this.calculateTotalDiscountByActivity(this.activity)
|
|
|
}
|
|
|
params.sendClothWay = this.orderForm.sendClothWay
|
|
|
console.log(params)
|