bug
This commit is contained in:
parent
0f7ba19407
commit
4233e5bdf1
@ -192,13 +192,17 @@
|
||||
<el-form-item label="活动名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入活动名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="满减规则" prop="activeDiscountChildList">
|
||||
<el-form-item label="折扣规则" prop="activeDiscountChildList">
|
||||
<div style="width: 100%; display: flex;align-items: center; margin-bottom: 10px " v-for="(item,index) in activeDiscountChildList" :key="index">
|
||||
<div style="width: 25%;display: flex; align-items: center;margin-right: 20px " >
|
||||
<span>满</span> <el-input-number v-model="item.amount" :min="0" :max="99999" label="0"></el-input-number> <span>元</span>
|
||||
<span style="margin: 0 5px">满</span>
|
||||
<el-input-number v-model="item.amount" :min="0" :max="99999" label="0"></el-input-number>
|
||||
<span style="margin: 0 5px">元</span>
|
||||
</div>
|
||||
<div style="width: 25%;display: flex; align-items: center;">
|
||||
<span>打</span> <el-input-number v-model="item.discount" :min="0" :max="9.9" placeholder="1 ~ 9.9" label=""></el-input-number> <span>折</span>
|
||||
<span style="margin: 0 5px">打</span>
|
||||
<el-input-number v-model="item.discount" :min="0" :max="9.9" placeholder="1 ~ 9.9" label=""></el-input-number>
|
||||
<span style="margin: 0 5px">折</span>
|
||||
|
||||
</div>
|
||||
<div @click="deleteactiveDiscountChildList(index)">
|
||||
@ -233,7 +237,29 @@
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="是否有会员日" prop="memberDayType">
|
||||
<el-radio-group v-model="form.memberDayType">
|
||||
<el-radio label="0">无会员日</el-radio>
|
||||
<el-radio label="1">指定日</el-radio>
|
||||
<el-radio label="2">指定星期</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.memberDayType=='1'" prop="monthDay">
|
||||
<el-checkbox-group v-model="monthDay" @change="changeMonth">
|
||||
<el-checkbox v-for="item in 31" :key="item" :label="item">{{item}}日</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.memberDayType=='2'" prop="weekDay">
|
||||
<el-checkbox-group v-model="weekDay">
|
||||
<el-checkbox label="星期一">星期一</el-checkbox>
|
||||
<el-checkbox label="星期二">星期二</el-checkbox>
|
||||
<el-checkbox label="星期三">星期三</el-checkbox>
|
||||
<el-checkbox label="星期四">星期四</el-checkbox>
|
||||
<el-checkbox label="星期五">星期五</el-checkbox>
|
||||
<el-checkbox label="星期六">星期六</el-checkbox>
|
||||
<el-checkbox label="星期日">星期日</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
@ -357,11 +383,12 @@ export default {
|
||||
status: null,
|
||||
isonline: null,
|
||||
},
|
||||
weekDay:[],
|
||||
monthDay:[],
|
||||
// 表单参数
|
||||
form: {
|
||||
|
||||
|
||||
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
@ -398,6 +425,9 @@ export default {
|
||||
activeDiscountChildList:[
|
||||
{ required: true, message: '不能为空', trigger: 'change' }
|
||||
],
|
||||
memberDayType:[
|
||||
{ required: true, message: '不能为空', trigger: 'change' }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -509,9 +539,14 @@ export default {
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.activeDiscountChildList = [ {amount:'',discount:''}, ]
|
||||
this.monthDay = []
|
||||
this.weekDay = []
|
||||
this.open = true;
|
||||
this.title = "添加折扣营销";
|
||||
},
|
||||
changeMonth(val){
|
||||
console.log(val,this.monthDay,111)
|
||||
},
|
||||
// 获取油号名称
|
||||
getName(oilNameList,ids){
|
||||
let name = ""
|
||||
@ -537,6 +572,16 @@ export default {
|
||||
}else {
|
||||
this.activeDiscountChildList = [ {amount:'',discount:''}, ]
|
||||
}
|
||||
if (this.form.monthDay){
|
||||
this.monthDay = this.form.monthDay.split(",")
|
||||
}else {
|
||||
this.monthDay = []
|
||||
}
|
||||
if (this.form.weekDay){
|
||||
this.weekDay = this.form.weekDay.split(",")
|
||||
}else {
|
||||
this.weekDay = []
|
||||
}
|
||||
this.open = true;
|
||||
this.title = "修改折扣营销";
|
||||
});
|
||||
@ -602,6 +647,8 @@ export default {
|
||||
this.form.activeDiscountChildList = this.activeDiscountChildList
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.form.monthDay = this.monthDay.toString()
|
||||
this.form.weekDay = this.weekDay.toString()
|
||||
if (this.form.id != null) {
|
||||
updateActiveDiscount(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
|
@ -183,10 +183,14 @@
|
||||
<el-form-item label="满减规则" prop="activeDiscountChildList">
|
||||
<div style="width: 100%; display: flex;align-items: center; margin-bottom: 10px " v-for="(item,index) in activeDiscountChildList" :key="index">
|
||||
<div style="width: 25%;display: flex; align-items: center;margin-right: 20px " >
|
||||
<span>满</span> <el-input-number v-model="item.amount" :min="0" :max="99999" label="0"></el-input-number> <span>元</span>
|
||||
<span style="margin: 0 5px">满</span>
|
||||
<el-input-number v-model="item.amount" :min="0" :max="99999" label="0"></el-input-number>
|
||||
<span style="margin: 0 5px">元</span>
|
||||
</div>
|
||||
<div style="width: 25%;display: flex; align-items: center;">
|
||||
<span>减</span> <el-input-number v-model="item.deductionAmount" :min="0" :max="item.amount||0" label=""></el-input-number> <span>元</span>
|
||||
<span style="margin: 0 5px">减</span>
|
||||
<el-input-number v-model="item.deductionAmount" :min="0" :max="item.amount||0" label=""></el-input-number>
|
||||
<span style="margin: 0 5px">元</span>
|
||||
</div>
|
||||
<div @click="deleteactiveDiscountChildList(index)">
|
||||
<el-button type="danger" icon="el-icon-delete" circle style="margin-left: 8px" ></el-button>
|
||||
@ -220,6 +224,31 @@
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="是否有会员日" prop="memberDayType">
|
||||
<el-radio-group v-model="form.memberDayType">
|
||||
<el-radio label="0">无会员日</el-radio>
|
||||
<el-radio label="1">指定日</el-radio>
|
||||
<el-radio label="2">指定星期</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.memberDayType=='1'" prop="monthDay">
|
||||
<el-checkbox-group v-model="monthDay">
|
||||
<el-checkbox v-for="item in 31" :key="item" :label="item">{{item}}日</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.memberDayType=='2'" prop="weekDay">
|
||||
<el-checkbox-group v-model="weekDay">
|
||||
<el-checkbox label="星期一">星期一</el-checkbox>
|
||||
<el-checkbox label="星期二">星期二</el-checkbox>
|
||||
<el-checkbox label="星期三">星期三</el-checkbox>
|
||||
<el-checkbox label="星期四">星期四</el-checkbox>
|
||||
<el-checkbox label="星期五">星期五</el-checkbox>
|
||||
<el-checkbox label="星期六">星期六</el-checkbox>
|
||||
<el-checkbox label="星期日">星期日</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="可用油品" prop="adaptOil" >
|
||||
<el-checkbox-group v-model="form.adaptOil">
|
||||
<el-checkbox v-for="(item,index) in oillist" :label="item.id" :key="index">{{item.oilType}}{{item.oilName}}</el-checkbox>
|
||||
@ -336,6 +365,8 @@ export default {
|
||||
status: null,
|
||||
isonline: null,
|
||||
},
|
||||
weekDay:[],
|
||||
monthDay:[],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
@ -478,6 +509,8 @@ export default {
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.monthDay = []
|
||||
this.weekDay = []
|
||||
this.activeDiscountChildList = [ {amount:'',deductionAmount:''}, ]
|
||||
this.open = true;
|
||||
this.title = "添加满减营销";
|
||||
@ -507,6 +540,16 @@ export default {
|
||||
}else {
|
||||
this.activeDiscountChildList = [ {amount:'',deductionAmount:''}, ]
|
||||
}
|
||||
if (this.form.monthDay){
|
||||
this.monthDay = this.form.monthDay.split(",")
|
||||
}else {
|
||||
this.monthDay = []
|
||||
}
|
||||
if (this.form.weekDay){
|
||||
this.weekDay = this.form.weekDay.split(",")
|
||||
}else {
|
||||
this.weekDay = []
|
||||
}
|
||||
this.open = true;
|
||||
this.title = "修改满减营销";
|
||||
});
|
||||
@ -570,6 +613,8 @@ export default {
|
||||
this.form.activeDiscountChildList = this.activeDiscountChildList
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.form.monthDay = this.monthDay.toString()
|
||||
this.form.weekDay = this.weekDay.toString()
|
||||
if (this.form.id != null) {
|
||||
updateActiveFullminus(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
|
Loading…
Reference in New Issue
Block a user