Commit 214184bb by huaying

fix: 积分有效期校验

parent 3881a267
......@@ -193,7 +193,7 @@ export default {
for(let i = 1; i < 28; i++){
arr.push({key: i,value: i})
}
arr.push({key: 0, value: '月末'})
arr.push({key: '0', value: '月末'})
return arr;
}
// 月数
......@@ -405,14 +405,14 @@ export default {
return;
}
if(data.integralExpireType ==3 && (this.mouthM == '' || this.mouthD == -1)) {
if(data.integralExpireType ==3 && (this.mouthM == '' || this.mouthD == '')) {
this.scrollToError(this, 'yearY');
that.$message.error({
duration: 1000,
message: "请完善积分有效期信息"
})
return;
}else if(data.integralExpireType ==2 && (this.yearY == '' || this.yearM == '' || this.yearD == -1 )) {
}else if(data.integralExpireType ==2 && (this.yearY == '' || this.yearM == '' || this.yearD == '' )) {
this.scrollToError(this, 'yearY');
that.$message.error({
duration: 1000,
......@@ -654,12 +654,12 @@ export default {
}else if(that.ruleForm.integralExpireType == 2) {
this.yearY = Number(this.ruleForm.integralExpireRule[0]);
this.yearM = Number(this.ruleForm.integralExpireRule[1]);
this.yearD = Number(this.ruleForm.integralExpireRule[2]);
this.yearD = this.ruleForm.integralExpireRule[2];
this.ruleForm.effectiveTime = ''
console.log(that.yearY, that.yearM, that.yearD);
}else if(this.ruleForm.integralExpireType == 3) {
this.mouthM = Number(this.ruleForm.integralExpireRule[0]);
this.mouthD = Number(this.ruleForm.integralExpireRule[1]);
this.mouthD = this.ruleForm.integralExpireRule[1];
this.ruleForm.effectiveTime = ''
}else if(that.ruleForm.integralExpireType == 1) {
that.ruleForm.effectiveTime = ''
......
......@@ -431,7 +431,7 @@ export default {
for(let i = 1; i < 28; i++){
arr.push({key: i,value: i})
}
arr.push({key: 0, value: '月末'})
arr.push({key: '0', value: '月末'})
return arr;
}
// 月数
......@@ -806,10 +806,10 @@ export default {
if(this.timeType ==2) {
this.yearYT = Number(this.timeRuleType[0])
this.yearMT = Number(this.timeRuleType[1])
this.yearDT = Number(this.timeRuleType[2])
this.yearDT = this.timeRuleType[2]
}else if(this.timeType == 3) {
this.mouthMT = Number(this.timeRuleType[0])
this.mouthDT = Number(this.timeRuleType[1])
this.mouthDT = this.timeRuleType[1]
} else if (this.timeType == 0 || this.timeType == null) {
this.effectiveDays = resData.result.memberIntegral.integralGetEffectiveDays;
}
......@@ -997,11 +997,11 @@ export default {
showMsg.showmsg('请设置积分有效期','error')
return;
}
if(data.integralExpireType ==3 && (this.mouthM == '' || this.mouthD == -1)) {
if(data.integralExpireType ==3 && (this.mouthM == '' || this.mouthD == '')) {
this.scrollToError(this, 'mouthM');
showMsg.showmsg('请完善积分有效期信息','error')
return;
}else if(data.integralExpireType ==2 && (this.yearY == '' || this.yearM == '' || this.yearD == -1 )) {
}else if(data.integralExpireType ==2 && (this.yearY == '' || this.yearM == '' || this.yearD == '' )) {
this.scrollToError(this, 'yearY');
showMsg.showmsg('请完善积分有效期信息','error')
return;
......
......@@ -428,8 +428,10 @@ export default {
that.areaOptions = JSON.parse(obj);
// that.areaOptions = JSON.parse(JSON.stringify(newEnterprise.region))
// 时间
if (!!newEnterprise.storeBusinessTime) {
if (typeof newEnterprise.storeBusinessTime == 'string' && newEnterprise.storeBusinessTime.indexOf(':') > 0) {
newEnterprise.storeBusinessTime = newTime.timeToDate(newEnterprise.storeBusinessTime);
} else {
newEnterprise.storeBusinessTime = []
}
// 长度
......
......@@ -629,7 +629,7 @@ export default {
for(let i = 1; i < 28; i++){
arr.push({key: i,value: i})
}
arr.push({key: 0, value: '月末'})
arr.push({key: '0', value: '月末'})
return arr;
}
// 月数
......@@ -899,10 +899,10 @@ export default {
if(this.timeType ==2) {
this.yearYT = Number(this.timeRuleType[0])
this.yearMT = Number(this.timeRuleType[1])
this.yearDT = Number(this.timeRuleType[2])
this.yearDT = this.timeRuleType[2]
}else if(this.timeType == 3) {
this.mouthMT = Number(this.timeRuleType[0])
this.mouthDT = Number(this.timeRuleType[1])
this.mouthDT = this.timeRuleType[1]
} else if (this.timeType == 0 || this.timeType == null) {
this.effectiveDays = resData.result.memberIntegral.integralGetEffectiveDays;
}
......@@ -1074,11 +1074,11 @@ export default {
return;
}
if (data.userGeneralIntegralExpireRule == 0) {
if(data.integralExpireType ==3 && (this.mouthM == '' || this.mouthD == -1)) {
if(data.integralExpireType ==3 && (this.mouthM == '' || this.mouthD == '')) {
this.scrollToError(this, 'mouthM');
showMsg.showmsg('请完善积分有效期信息','error')
return;
}else if(data.integralExpireType ==2 && (this.yearY == '' || this.yearM == '' || this.yearD == -1 )) {
}else if(data.integralExpireType ==2 && (this.yearY == '' || this.yearM == '' || this.yearD == '' )) {
this.scrollToError(this, 'yearY');
showMsg.showmsg('请完善积分有效期信息','error')
return;
......@@ -1543,11 +1543,11 @@ export default {
}else if(that.ruleForm.integralExpireType==2){
this.yearY = Number(that.ruleForm.integralExpireRule[0]);
this.yearM = Number(that.ruleForm.integralExpireRule[1]);
this.yearD = Number(that.ruleForm.integralExpireRule[2]);
this.yearD = that.ruleForm.integralExpireRule[2];
that.ruleForm.integralGetEffectiveDays = '';
}else if(that.ruleForm.integralExpireType==3){
this.mouthM = Number(that.ruleForm.integralExpireRule[0]);
this.mouthD = Number(that.ruleForm.integralExpireRule[1]);
this.mouthD = that.ruleForm.integralExpireRule[1];
that.ruleForm.integralGetEffectiveDays = '';
}
}else if(that.ruleForm.userGeneralIntegralExpireRule==1){
......
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