Commit 5f4a3c2c by zhangmeng

修改卡券数量

parent a7b120db
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/app.479c6fa0a0b837ccce9292d51ef7168c.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.ccb4bd422cd76a080cba.js></script><script type=text/javascript src=/marketing/static/js/app.c31ffdb92738d634b0b0.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/app.479c6fa0a0b837ccce9292d51ef7168c.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.ccb4bd422cd76a080cba.js></script><script type=text/javascript src=/marketing/static/js/app.c8bd03cd64289ff1be20.js></script></body></html>
\ No newline at end of file
......@@ -108,8 +108,8 @@
</el-form-item>
<el-form-item prop="cardCodeCount" :label="form.useCustomCode?'默认数量':'新建数量'">
<div v-if="!form.useCustomCode"><el-input-number controls-position="right" :min="0" :disabled="editDisabled || infoDisabled" class="w200" v-model="form.cardCodeCount"></el-input-number><span class="fz13 gray">优惠券创建数量,如不填,则默认为100,000,000张</span></div>
<div v-if="form.useCustomCode"><el-input-number controls-position="right" :min="0" :disabled="editDisabled || infoDisabled" class="w200" :value="form.customCodeEnd - form.customCodeBegin + 1"></el-input-number><span class="fz13 gray">优惠券创建数量,如不填,则默认为100,000,000张</span></div>
<div v-if="!form.useCustomCode"><el-input-number controls-position="right" :min="0" :max="100000" :disabled="editDisabled || infoDisabled" class="w200" v-model="form.cardCodeCount"></el-input-number><span class="fz13 gray">优惠券创建数量,如不填,则默认为100,000张</span></div>
<div v-if="form.useCustomCode"><el-input-number controls-position="right" :min="0" :max="100000" disabled class="w200" :value="form.customCodeEnd - form.customCodeBegin + 1"></el-input-number><span class="fz13 gray">优惠券创建数量,如不填,则默认为100,000张</span></div>
</el-form-item>
<el-form-item class="is-required" prop="useCustomCode" label="有效期">
......
......@@ -17,7 +17,7 @@ const initForm = {
useCondition:null, // 6. 抵金券 减免金额; 折扣券 折扣额度
cardLimit:1,
useCustomCode:0,
cardCodeCount:100000000,
cardCodeCount:100000,
customCodeBegin:'',
customCodeEnd:'',
customCodePrefix:'',
......@@ -274,6 +274,11 @@ export default {
this.$tips({type:'warning',message:'code起始号段和结尾号段必须位数一致'});
return;
}
if ((this.form.customCodeEnd - this.form.customCodeBegin + 1) > 100000) {
this.$tips({type:'warning',message:'创建数量不能大于100,000张'});
this.form.customCodeEnd = this.form.customCodeBegin = 0;
return;
}
}
//验证有效期
if(this.form.cardEffectiveMode) {
......@@ -487,6 +492,11 @@ export default {
this.form.customCodeEnd = this.form.customCodeBegin;
this.$tips({type:'warning',message:'自定义结尾号段不能小于初始号段'})
}
if ((parseInt(this.form.customCodeEnd) - parseInt(this.form.customCodeBegin) + 1) > 100000) {
this.$tips({type:'warning',message:'创建数量不能大于100,000张'});
this.form.customCodeEnd = this.form.customCodeBegin = 0;
return;
}
},
//检查是否为字符串
checkInputString(val,name) {
......
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