Commit 53d6db37 authored by 郭志伟's avatar 郭志伟

Merge branch 'fix/cash' into 'master'

Fix/cash

See merge request !9
parents 3903cd87 32cb15a2
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div v-if="showCoupon && value.payType === 1" class="coupon"> <div v-if="showCoupon && value.payType === 1" class="coupon">
<p class="couponDes" :class="{ disable: couponDisabled }" @click.stop="openCouponModal"> <p class="couponDes" :class="{ disable: couponDisabled }" @click.stop="openCouponModal">
<span v-if="couponInfo.pickupId"> <span v-if="couponInfo.pickupId">
{{ `满${couponInfo.limitAmount}减${couponInfo.faceValue}元` }} {{ `满${couponInfo.limitAmountNew}减${couponInfo.faceValueNew}元` }}
</span> </span>
<span v-else> <span v-else>
未选择优惠券 未选择优惠券
......
...@@ -191,9 +191,9 @@ export default { ...@@ -191,9 +191,9 @@ export default {
return this.isRiskLimit(); return this.isRiskLimit();
}, },
amount() { amount() {
return IS_THIRD_PAY(this.payType) || !this.selectedCoupon.faceValue return IS_THIRD_PAY(this.payType) || !this.selectedCoupon.faceValueNew
? this.displayInfo.orderAmt ? this.displayInfo.orderAmt
: (this.displayInfo.orderAmt - this.selectedCoupon.faceValue).toFixed(2); : (this.displayInfo.orderAmt - this.selectedCoupon.faceValueNew).toFixed(2);
}, },
isShowProtocol() { isShowProtocol() {
return ( return (
...@@ -204,7 +204,7 @@ export default { ...@@ -204,7 +204,7 @@ export default {
}, },
canUseAmount() { canUseAmount() {
return ( return (
((this.selectedCoupon?.faceValue && +this.selectedCoupon.faceValue) || 0) + ((this.selectedCoupon?.faceValueNew && +this.selectedCoupon.faceValueNew) || 0) +
((this.displayInfo?.creditPayInfo?.canAmt && +this.displayInfo.creditPayInfo.canAmt) || 0) - ((this.displayInfo?.creditPayInfo?.canAmt && +this.displayInfo.creditPayInfo.canAmt) || 0) -
((this.displayInfo?.orderAmt && +this.displayInfo.orderAmt) || 0) ((this.displayInfo?.orderAmt && +this.displayInfo.orderAmt) || 0)
); );
...@@ -327,7 +327,7 @@ export default { ...@@ -327,7 +327,7 @@ export default {
const { accountStatus, riskManagementAmt } = this.creditPayInfo; const { accountStatus, riskManagementAmt } = this.creditPayInfo;
const { orderAmt } = this.displayInfo; const { orderAmt } = this.displayInfo;
if (accountStatus === ACCOUNT_APPLY_SUCCESS) { if (accountStatus === ACCOUNT_APPLY_SUCCESS) {
const coupon = +this.selectedCoupon.faceValue || 0; const coupon = +this.selectedCoupon.faceValueNew || 0;
return +riskManagementAmt + coupon < +orderAmt; return +riskManagementAmt + coupon < +orderAmt;
} else { } else {
return false; return false;
...@@ -537,6 +537,12 @@ export default { ...@@ -537,6 +537,12 @@ export default {
coupon_id: id coupon_id: id
}); });
this.selectedCoupon = selectedCoupon || {}; this.selectedCoupon = selectedCoupon || {};
if (!('faceValueNew' in this.selectedCoupon) && 'faceValue' in this.selectedCoupon) {
this.selectedCoupon.faceValueNew = this.selectedCoupon.faceValue;
}
if (!('limitAmountNew' in this.selectedCoupon) && 'limitAmount' in this.selectedCoupon) {
this.selectedCoupon.limitAmountNew = this.selectedCoupon.limitAmount;
}
this.getBtnStatus(this.isRiskLimit()); this.getBtnStatus(this.isRiskLimit());
this.couponPopup = false; this.couponPopup = false;
}, },
...@@ -599,7 +605,7 @@ export default { ...@@ -599,7 +605,7 @@ export default {
return Object.keys(obj); return Object.keys(obj);
}, },
setAmount() { setAmount() {
const faceValue = +this.selectedCoupon?.faceValue || 0; const faceValue = +this.selectedCoupon?.faceValueNew || 0;
const orderAmt = +this.displayInfo?.orderAmt || 0; const orderAmt = +this.displayInfo?.orderAmt || 0;
const finalAmt = const finalAmt =
IS_THIRD_PAY(this.payType) || !this.showCoupon IS_THIRD_PAY(this.payType) || !this.showCoupon
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment