Commit 76841767 authored by FE-安焕焕's avatar FE-安焕焕 👣

修改优惠券的问题

parent a346947d
...@@ -260,9 +260,6 @@ export default { ...@@ -260,9 +260,6 @@ export default {
IS_CREDIT_PAY(p.method) && IS_CREDIT_PAY(p.method) &&
(p.method === payType || (p.method > 3 && p.method - 2 === payType)) (p.method === payType || (p.method > 3 && p.method - 2 === payType))
) { ) {
if (key === 'creditPayInfo' && this.checkStatus(displayInfo[key], displayInfo)) {
displayInfo[key].disabled = true;
}
this.creditPayList.isGroupPay = IS_GROUP_PAY(p.method); this.creditPayList.isGroupPay = IS_GROUP_PAY(p.method);
if (p.isDefault) { if (p.isDefault) {
this.mergePayPretreatmentInfo = p.mergePayPretreatmentInfo; this.mergePayPretreatmentInfo = p.mergePayPretreatmentInfo;
...@@ -300,20 +297,6 @@ export default { ...@@ -300,20 +297,6 @@ export default {
displayInfo.periodSeconds = displayInfo.periodSeconds * 1000; displayInfo.periodSeconds = displayInfo.periodSeconds * 1000;
this.getBtnStatus(this.isRiskLimit()); this.getBtnStatus(this.isRiskLimit());
}, },
checkStatus({ accountStatus, canAmt }, { orderAmt }) {
// 开户成功已有额度小于订单额度和审核被拒
if (!this.selectedCoupon.faceValue) {
return (
(accountStatus === ACCOUNT_APPLY_SUCCESS && +orderAmt > +canAmt) ||
accountStatus === ACCOUNT_APPLY_AUDIT_FAIL
);
}
return (
(accountStatus === ACCOUNT_APPLY_SUCCESS &&
+orderAmt > +canAmt + +this.selectedCoupon.faceValue) ||
accountStatus === ACCOUNT_APPLY_AUDIT_FAIL
);
},
isRiskLimit() { isRiskLimit() {
const { accountStatus, riskManagementAmt } = this.creditPayInfo; const { accountStatus, riskManagementAmt } = this.creditPayInfo;
const { orderAmt } = this.displayInfo; const { orderAmt } = this.displayInfo;
...@@ -500,13 +483,6 @@ export default { ...@@ -500,13 +483,6 @@ export default {
handleSelectCoupon(id, selectedCoupon) { handleSelectCoupon(id, selectedCoupon) {
registeredEvents('PD_YXMMACP_UserClickCouponPopupWindowComfirmBtn'); registeredEvents('PD_YXMMACP_UserClickCouponPopupWindowComfirmBtn');
this.selectedCoupon = selectedCoupon || {}; this.selectedCoupon = selectedCoupon || {};
const status = this.checkStatus(this.creditPayInfo, this.displayInfo);
if (status) {
this.displayInfo.creditPayInfo.disabled = true;
this.payType = WECHAT_PAY;
} else {
this.displayInfo.creditPayInfo.disabled = false;
}
this.getBtnStatus(this.isRiskLimit()); this.getBtnStatus(this.isRiskLimit());
this.couponPopup = false; this.couponPopup = false;
}, },
......
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