Merge remote-tracking branch 'origin/master'

This commit is contained in:
齐天大圣 2024-03-07 16:23:45 +08:00
commit fee077d015
4 changed files with 31 additions and 21 deletions

View File

@ -213,7 +213,7 @@
</el-checkbox-group>
</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 style="margin: 10px 0px">
<el-table
@ -1116,12 +1116,14 @@ export default {
const id = row.id || this.ids
getActiveConsumption(id).then(response => {
this.form = response.data;
if (!response.data.activeGift) this.form.activeGift = ""
if(response.data.activeConsumptionChildList && response.data.activeConsumptionChildList.length >0){
this.form.tableDatas = 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.form.shiwudata = response.data.activeConsumptionChildList.filter(item => item.activeGift == '4')
}
console.log(this.tableData1)
this.open = true;
this.title = "修改消费有礼活动";
});

View File

@ -193,12 +193,12 @@
<el-input v-model="form.name" placeholder="请输入活动名称" />
</el-form-item>
<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 " >
<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 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 @click="deleteactiveDiscountChildList(index)">
@ -428,14 +428,18 @@ export default {
//
addactiveDiscountChildList(){
let data = {
discount :this.form.activeDiscountChildList.discount,
amount:this.form.activeDiscountChildList.amount,
// discount :this.form.activeDiscountChildList.discount,
// amount:this.form.activeDiscountChildList.amount,
discount :this.activeDiscountChildList.discount,
amount:this.activeDiscountChildList.amount,
}
this.form.activeDiscountChildList.push(data)
this.activeDiscountChildList.push(data)
},
deleteactiveDiscountChildList(index){
this.form.activeDiscountChildList.splice(index, 1)
this.activeDiscountChildList.splice(index, 1)
},
//
cancel() {

View File

@ -181,12 +181,12 @@
</el-form-item>
<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 " >
<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 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 @click="deleteactiveDiscountChildList(index)">
<el-button type="danger" icon="el-icon-delete" circle style="margin-left: 8px" ></el-button>
@ -394,14 +394,18 @@ export default {
//
addactiveDiscountChildList(){
let data = {
amount :this.form.activeDiscountChildList.discount,
deductionAmount:this.form.activeDiscountChildList.amount,
// amount :this.form.activeDiscountChildList.discount,
// deductionAmount:this.form.activeDiscountChildList.amount,
amount :this.activeDiscountChildList.discount,
deductionAmount:this.activeDiscountChildList.amount,
}
this.form.activeDiscountChildList.push(data)
this.activeDiscountChildList.push(data)
},
deleteactiveDiscountChildList(index){
this.form.activeDiscountChildList.splice(index, 1)
this.activeDiscountChildList.splice(index, 1)
},
//
cancel() {

View File

@ -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;
}