Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
fee077d015
@ -213,7 +213,7 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 选择优惠券-->
|
<!-- 选择优惠券-->
|
||||||
<div class="xh-box" v-if="form.activeGift && form.activeGift.indexOf('1')>-1 " >
|
<div class="xh-box" v-if="form.activeGift && form.activeGift.indexOf('1')>-1 " >
|
||||||
<div class="box-bt"> <div >选择优惠券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistFavorable()" >新增</el-button> </div>
|
<div class="box-bt"> <div >选择优惠券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistFavorable()" >新增</el-button> </div>
|
||||||
<div style="margin: 10px 0px">
|
<div style="margin: 10px 0px">
|
||||||
<el-table
|
<el-table
|
||||||
@ -1116,12 +1116,14 @@ export default {
|
|||||||
const id = row.id || this.ids
|
const id = row.id || this.ids
|
||||||
getActiveConsumption(id).then(response => {
|
getActiveConsumption(id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
if (!response.data.activeGift) this.form.activeGift = ""
|
||||||
if(response.data.activeConsumptionChildList && response.data.activeConsumptionChildList.length >0){
|
if(response.data.activeConsumptionChildList && response.data.activeConsumptionChildList.length >0){
|
||||||
this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
|
this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
|
||||||
this.tableData1 = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
|
this.tableData1 = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
|
||||||
this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2')
|
this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2')
|
||||||
this.form.shiwudata = response.data.activeConsumptionChildList.filter(item => item.activeGift == '4')
|
this.form.shiwudata = response.data.activeConsumptionChildList.filter(item => item.activeGift == '4')
|
||||||
}
|
}
|
||||||
|
console.log(this.tableData1)
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改消费有礼活动";
|
this.title = "修改消费有礼活动";
|
||||||
});
|
});
|
||||||
|
@ -193,12 +193,12 @@
|
|||||||
<el-input v-model="form.name" placeholder="请输入活动名称" />
|
<el-input v-model="form.name" placeholder="请输入活动名称" />
|
||||||
</el-form-item>
|
</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 ">
|
<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 " >
|
<div style="width: 25%;display: flex; align-items: center;margin-right: 20px " >
|
||||||
<span>满</span> <el-input-number v-model="activeDiscountChildList[0].amount" :min="0" :max="99999" label="0"></el-input-number> <span>元</span>
|
<span>满</span> <el-input-number v-model="item.amount" :min="0" :max="99999" label="0"></el-input-number> <span>元</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 25%;display: flex; align-items: center;">
|
<div style="width: 25%;display: flex; align-items: center;">
|
||||||
<span>打</span> <el-input-number v-model="activeDiscountChildList[0].discount" :min="0" :max="9.9" placeholder="1 ~ 9.9" label=""></el-input-number> <span>折</span>
|
<span>打</span> <el-input-number v-model="item.discount" :min="0" :max="9.9" placeholder="1 ~ 9.9" label=""></el-input-number> <span>折</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div @click="deleteactiveDiscountChildList(index)">
|
<div @click="deleteactiveDiscountChildList(index)">
|
||||||
@ -428,14 +428,18 @@ export default {
|
|||||||
// 新增
|
// 新增
|
||||||
addactiveDiscountChildList(){
|
addactiveDiscountChildList(){
|
||||||
let data = {
|
let data = {
|
||||||
discount :this.form.activeDiscountChildList.discount,
|
// discount :this.form.activeDiscountChildList.discount,
|
||||||
amount:this.form.activeDiscountChildList.amount,
|
// amount:this.form.activeDiscountChildList.amount,
|
||||||
|
discount :this.activeDiscountChildList.discount,
|
||||||
|
amount:this.activeDiscountChildList.amount,
|
||||||
|
|
||||||
}
|
}
|
||||||
this.form.activeDiscountChildList.push(data)
|
this.form.activeDiscountChildList.push(data)
|
||||||
|
this.activeDiscountChildList.push(data)
|
||||||
},
|
},
|
||||||
deleteactiveDiscountChildList(index){
|
deleteactiveDiscountChildList(index){
|
||||||
this.form.activeDiscountChildList.splice(index, 1)
|
this.form.activeDiscountChildList.splice(index, 1)
|
||||||
|
this.activeDiscountChildList.splice(index, 1)
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
|
@ -181,12 +181,12 @@
|
|||||||
</el-form-item>
|
</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 ">
|
<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 " >
|
<div style="width: 25%;display: flex; align-items: center;margin-right: 20px " >
|
||||||
<span>满</span> <el-input-number v-model="activeDiscountChildList[0].amount" :min="0" :max="99999" label="0"></el-input-number> <span>元</span>
|
<span>满</span> <el-input-number v-model="item.amount" :min="0" :max="99999" label="0"></el-input-number> <span>元</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 25%;display: flex; align-items: center;">
|
<div style="width: 25%;display: flex; align-items: center;">
|
||||||
<span>减</span> <el-input-number v-model="activeDiscountChildList[0].deductionAmount" :min="0" :max="activeDiscountChildList[0].amount" label=""></el-input-number> <span>元</span>
|
<span>减</span> <el-input-number v-model="item.deductionAmount" :min="0" :max="item.amount||0" label=""></el-input-number> <span>元</span>
|
||||||
</div>
|
</div>
|
||||||
<div @click="deleteactiveDiscountChildList(index)">
|
<div @click="deleteactiveDiscountChildList(index)">
|
||||||
<el-button type="danger" icon="el-icon-delete" circle style="margin-left: 8px" ></el-button>
|
<el-button type="danger" icon="el-icon-delete" circle style="margin-left: 8px" ></el-button>
|
||||||
@ -394,14 +394,18 @@ export default {
|
|||||||
// 新增
|
// 新增
|
||||||
addactiveDiscountChildList(){
|
addactiveDiscountChildList(){
|
||||||
let data = {
|
let data = {
|
||||||
amount :this.form.activeDiscountChildList.discount,
|
// amount :this.form.activeDiscountChildList.discount,
|
||||||
deductionAmount:this.form.activeDiscountChildList.amount,
|
// deductionAmount:this.form.activeDiscountChildList.amount,
|
||||||
|
amount :this.activeDiscountChildList.discount,
|
||||||
|
deductionAmount:this.activeDiscountChildList.amount,
|
||||||
|
|
||||||
}
|
}
|
||||||
this.form.activeDiscountChildList.push(data)
|
this.form.activeDiscountChildList.push(data)
|
||||||
|
this.activeDiscountChildList.push(data)
|
||||||
},
|
},
|
||||||
deleteactiveDiscountChildList(index){
|
deleteactiveDiscountChildList(index){
|
||||||
this.form.activeDiscountChildList.splice(index, 1)
|
this.form.activeDiscountChildList.splice(index, 1)
|
||||||
|
this.activeDiscountChildList.splice(index, 1)
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
|
@ -287,17 +287,17 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//封装VO返回
|
|
||||||
activeConsumptionVO.setParticipationConditionMoney(consumption.getParticipationConditionMoney().toString());
|
|
||||||
activeConsumptionVO.setDieselUserLevel(consumption.getDieselUserLevel().split(","));
|
|
||||||
activeConsumptionVO.setGasolineUserLevel(consumption.getGasolineUserLevel().split(","));
|
|
||||||
activeConsumptionVO.setNaturalUserLevel(consumption.getNaturalUserLevel().split(","));
|
|
||||||
activeConsumptionVO.setAdaptOil(Arrays.stream(consumption.getAdaptOil().split(","))
|
|
||||||
.map(Integer::valueOf)
|
|
||||||
.toArray(Integer[]::new));
|
|
||||||
activeConsumptionVO.setActiveGift(consumption.getActiveGift().split(","));
|
|
||||||
activeConsumptionVO.setActiveConsumptionChildList(activeConsumptionChildList);
|
|
||||||
}
|
}
|
||||||
|
//封装VO返回
|
||||||
|
activeConsumptionVO.setParticipationConditionMoney(consumption.getParticipationConditionMoney().toString());
|
||||||
|
activeConsumptionVO.setDieselUserLevel(consumption.getDieselUserLevel().split(","));
|
||||||
|
activeConsumptionVO.setGasolineUserLevel(consumption.getGasolineUserLevel().split(","));
|
||||||
|
activeConsumptionVO.setNaturalUserLevel(consumption.getNaturalUserLevel().split(","));
|
||||||
|
activeConsumptionVO.setAdaptOil(Arrays.stream(consumption.getAdaptOil().split(","))
|
||||||
|
.map(Integer::valueOf)
|
||||||
|
.toArray(Integer[]::new));
|
||||||
|
activeConsumptionVO.setActiveGift(consumption.getActiveGift().split(","));
|
||||||
|
activeConsumptionVO.setActiveConsumptionChildList(activeConsumptionChildList);
|
||||||
}
|
}
|
||||||
return activeConsumptionVO;
|
return activeConsumptionVO;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user