Commit 050bf5c9 by huaying

fix: 输入框为空展示

parent ec9aff25
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
</el-form-item> </el-form-item>
<el-form-item label="折扣控制:" prop="region" class="margin-20"> <el-form-item label="折扣控制:" prop="region" class="margin-20">
<div class="radio-cell"> <div class="radio-cell">
<el-radio v-model="item.integralUseDiscountControl" label="1">所有折扣商品都适用</el-radio> <el-radio v-model="item.integralUseDiscountControl" label="1" @change="radioEvent2">所有折扣商品都适用</el-radio>
</div> </div>
<div class="radio-cell margin-20 padding-bottom-20"> <div class="radio-cell margin-20 padding-bottom-20">
<el-radio v-model="item.integralUseDiscountControl" label="2">折扣</el-radio> <el-radio v-model="item.integralUseDiscountControl" label="2">折扣</el-radio>
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
</el-form-item> </el-form-item>
<el-form-item label="折扣控制:" prop="region" class="input-margin-b margin-20 padding-bottom-20"> <el-form-item label="折扣控制:" prop="region" class="input-margin-b margin-20 padding-bottom-20">
<div class="radio-cell"> <div class="radio-cell">
<el-radio v-model="item.integralUseDiscountControl" label="1">所有折扣商品都适用</el-radio> <el-radio v-model="item.integralUseDiscountControl" label="1" @change="radioEvent1">所有折扣商品都适用</el-radio>
</div> </div>
<div class="radio-cell margin-20"> <div class="radio-cell margin-20">
<el-radio v-model="item.integralUseDiscountControl" label="2">折扣</el-radio> <el-radio v-model="item.integralUseDiscountControl" label="2">折扣</el-radio>
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
<dm-sub-title type="fill" text="规则配置" style="margin-bottom: 20px; margin-top:40px;"/> <dm-sub-title type="fill" text="规则配置" style="margin-bottom: 20px; margin-top:40px;"/>
<el-form-item label="抵现规则:" prop="integralUseStatus" class="margin-20" label-width="110px"> <el-form-item label="抵现规则:" prop="integralUseStatus" class="margin-20" label-width="110px">
<div> <div>
<el-radio v-model="ruleForm.integralUseStatus" label="0" >不支持抵现</el-radio> <el-radio v-model="ruleForm.integralUseStatus" label="0" @change="radioEvent()">不支持抵现</el-radio>
</div> </div>
<div class="margin-20"> <div class="margin-20">
<el-radio v-model="ruleForm.integralUseStatus" label="1">每使用</el-radio> <el-radio v-model="ruleForm.integralUseStatus" label="1">每使用</el-radio>
...@@ -390,7 +390,7 @@ export default { ...@@ -390,7 +390,7 @@ export default {
integralGetFreezeDays: 1, // 获取积分冻结天数 integralGetFreezeDays: 1, // 获取积分冻结天数
integralGetEffectiveDays: 1, // 获取积分有效天 integralGetEffectiveDays: 1, // 获取积分有效天
integralUseStatus: '0', // 积分抵现开启 1是0否 integralUseStatus: '0', // 积分抵现开启 1是0否
integralUse: { fee: '', integral: '' }, // 积分抵现 {fee:5,integral:5} integralUse: { fee: undefined, integral: undefined }, // 积分抵现 {fee:5,integral:5}
perpetualFlag: 1, perpetualFlag: 1,
channelList: [ channelList: [
{ {
...@@ -484,6 +484,20 @@ export default { ...@@ -484,6 +484,20 @@ export default {
// this.selectReplayStyle() // this.selectReplayStyle()
}, },
methods: { methods: {
radioEvent2() {
// console.log(this.ruleForm.channelType, 78787);
this.ruleForm.channelList[0].integralUseDiscountControlLower = undefined;
this.ruleForm.channelList[0].integralUseDiscountControlUpper = undefined;
},
radioEvent1() {
// console.log(this.ruleForm.channelType, 78787);
this.ruleForm.channelList[1].integralUseDiscountControlLower = undefined;
this.ruleForm.channelList[1].integralUseDiscountControlUpper = undefined;
},
radioEvent() {
this.ruleForm.integralUse.fee = undefined;
this.ruleForm.integralUse.integral = undefined;
},
// 返回 // 返回
goBack() { goBack() {
this.$router.go(-1); this.$router.go(-1);
...@@ -765,8 +779,8 @@ export default { ...@@ -765,8 +779,8 @@ export default {
}, },
formatInputNum(e) { formatInputNum(e) {
let that = this; let that = this;
that.ruleForm.integralUse.fee = strLength.getCharVal(String(that.ruleForm.integralUse.fee).replace(/[^\.\d]/g, ''), 6); that.ruleForm.integralUse.fee = strLength.getCharVal(String(that.ruleForm.integralUse.fee).replace(/[^\.\d]/g, undefined), 6);
that.ruleForm.integralUse.integral = strLength.getCharVal(String(that.ruleForm.integralUse.integral).replace(/[^\d]/g, ''), 8); that.ruleForm.integralUse.integral = strLength.getCharVal(String(that.ruleForm.integralUse.integral).replace(/[^\d]/g, undefined), 8);
that.ruleForm.channelList[0].useProportionalRestriction = strLength.getCharVal(String(that.ruleForm.channelList[0].useProportionalRestriction).replace(/[^\d]/g, ''), 3); that.ruleForm.channelList[0].useProportionalRestriction = strLength.getCharVal(String(that.ruleForm.channelList[0].useProportionalRestriction).replace(/[^\d]/g, ''), 3);
if (parseInt(that.ruleForm.channelList[0].useProportionalRestriction) > 100) { if (parseInt(that.ruleForm.channelList[0].useProportionalRestriction) > 100) {
......
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