Commit 13cd5dd8 by huaying

fix: 通用积分输入框为空展示

parent 88fe229f
......@@ -420,11 +420,11 @@ export default {
// 输入框输入校验数字
formatInput(e) {
let that = this;
that.ruleForm.integralUse.fee = strLength.getCharVal(String(that.ruleForm.integralUse.fee).replace(/[^\d]/g,''),6) || '0'
that.ruleForm.integralUse.integral = strLength.getCharVal(String(that.ruleForm.integralUse.integral).replace(/[^\d]/g,''),8) || '0'
that.ruleForm.integralUse.fee = strLength.getCharVal(String(that.ruleForm.integralUse.fee).replace(/[^\d]/g,''),6) || undefined
that.ruleForm.integralUse.integral = strLength.getCharVal(String(that.ruleForm.integralUse.integral).replace(/[^\d]/g,''),8) || undefined
that.ruleForm.integralCost.fee = strLength.getCharVal(String(that.ruleForm.integralCost.fee).replace(/[^\d]/g,''),6) || '0'
that.ruleForm.integralCost.integral = strLength.getCharVal(String(that.ruleForm.integralCost.integral).replace(/[^\d]/g,''),8) || '0'
that.ruleForm.integralCost.fee = strLength.getCharVal(String(that.ruleForm.integralCost.fee).replace(/[^\d]/g,''),6) || undefined
that.ruleForm.integralCost.integral = strLength.getCharVal(String(that.ruleForm.integralCost.integral).replace(/[^\d]/g,''),8) || undefined
that.ruleForm.integralGetFreezeDays = strLength.getCharVal(String(that.ruleForm.integralGetFreezeDays).replace(/[^\d]/g, ''), 4);
that.ruleForm.effectiveTime = strLength.getCharVal(String(that.ruleForm.effectiveTime).replace(/[^\d]/g, ''), 4);
......@@ -446,10 +446,21 @@ export default {
let that = this;
if (newData) {
that.ruleForm = newData;
if(this.ruleForm.integralGetStatus == 0) {
this.ruleForm.integralGet.fee = undefined;
this.ruleForm.integralGet.integral = undefined;
}
if(this.ruleForm.integralUseStatus == 0) {
this.ruleForm.integralUse.fee = undefined;
this.ruleForm.integralUse.integral = undefined;
}
// 给定一个默认值
if (newData.integralGetDiscountControl == 0) {
this.ruleForm.integralGetDiscountControl = '1';
}
if (newData.integralUseDiscountControl == 0) {
this.ruleForm.integralUseDiscountControl = '1';
}
if(this.ruleForm.integralGetDiscountControl == 1) {
this.ruleForm.integralGetDiscountControlLower = undefined;
this.ruleForm.integralGetDiscountControlUpper = undefined
......@@ -458,14 +469,6 @@ export default {
this.ruleForm.integralUseDiscountControlLower = undefined;
this.ruleForm.integralUseDiscountControlUpper = undefined
}
if(this.ruleForm.integralGetStatus == 0) {
this.ruleForm.integralGet.fee = undefined;
this.ruleForm.integralGet.integral = undefined;
}
if(this.ruleForm.integralUseStatus == 0) {
this.ruleForm.integralUse.fee = undefined;
this.ruleForm.integralUse.integral = undefined;
}
}
}
},
......
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