Merge remote-tracking branch 'origin/master'

This commit is contained in:
齐天大圣 2024-03-07 17:52:09 +08:00
commit c65a6c6bd9
2 changed files with 63 additions and 50 deletions

View File

@ -62,7 +62,7 @@
</template>
</el-table-column>
<el-table-column label="创建时间;" align="center" prop="createTime" >
<el-table-column label="创建时间;" align="center" prop="createTime" width="150px" >
<template slot-scope="scope">
<span> {{scope.row.createTime}} </span>
</template>
@ -73,7 +73,7 @@
</template>
</el-table-column>
<el-table-column
prop="address"
prop="address" align="center" width="180px"
label="操作">
<template slot-scope="scope">
<el-button
@ -123,7 +123,7 @@
</el-form-item>
<el-form-item label="不活跃用户" prop="days">
<div style="display: flex;align-items: center">
<el-input-number v-model="form.days" :min="1" :max="999" label="描述文字"></el-input-number>
<el-input-number v-model="form.days" @blur="change(form.gradeIds)" :min="1" :max="999" label="描述文字"></el-input-number>
<div style="margin-left: 5px"> <span style="color: red">(查找最近N天未进行消费的用户)</span> </div>
</div>
</el-form-item>
@ -650,7 +650,11 @@ export default {
activeId:row.id
}
postyijian(data).then(res=>{
console.log(res)
if (res.data){
this.$message.success("发券成功")
} else {
this.$message.error("发券失败")
}
})
@ -662,13 +666,17 @@ export default {
})
},
change(e){
let data = {
gradeIds:e,
days:this.days
if (e.length>0 && this.form.days && this.form.days > 0) {
let data = {
gradeIds: e,
days: this.form.days
}
getAdaptUserList(data).then(res => {
this.rlist = res.data
})
}else {
this.rlist = []
}
getAdaptUserList(data).then(res=>{
this.rlist = res.data
})
},
indexMethod(index) {
return index * 2;
@ -969,8 +977,10 @@ export default {
const id = row.id || this.ids
getCardFavorable(id).then(response => {
this.form = response.data;
this.form.gradeIds = response.data.gradeIds
this.form.days = response.data.condition,
this.form.gradeIds = response.data.gradeIds
this.form.days = response.data.conditions
this.days = response.data.conditions
this.change(response.data.gradeIds)
this.cardFavorableIds = response.data.cardFavorableIds
this.pddhidlist = response.data.cardExchangeIds
if(response.data.cardExchangeList){
@ -1037,46 +1047,48 @@ export default {
},
/** 提交按钮 */
submitForm() {
if(this.form.id){
console.log('修改',this.form.days)
this.form.activeConsumptionChildList = this.form.tableDatas.concat(this.tableDatas, this.form.shiwudata);
console.log(this.form.activeConsumptionChildList)
let data = {
id:this.form.id,
activeName : this.form.activeName,
gradeIds:this.form.gradeIds,
condition:this.form.days,
cardFavorableIds:this.cardFavorableIds,
cardExchangeIds:this.pddhidlist
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id) {
console.log('修改', this.form.days)
this.form.activeConsumptionChildList = this.form.tableDatas.concat(this.tableDatas, this.form.shiwudata);
console.log(this.form.activeConsumptionChildList)
let data = {
id: this.form.id,
activeName: this.form.activeName,
gradeIds: this.form.gradeIds,
condition: this.form.days,
cardFavorableIds: this.cardFavorableIds,
cardExchangeIds: this.pddhidlist
}
updetaCardFavorable(data).then(response => {
this.$modal.msgSuccess("修改");
this.open = false;
this.getList()
}
updetaCardFavorable(data).then(response => {
this.$modal.msgSuccess("修改");
this.open = false;
this.getList()
})
} else {
console.log('新增')
this.form.activeConsumptionChildList = this.form.tableDatas.concat(this.tableDatas, this.form.shiwudata);
console.log(this.form.activeConsumptionChildList)
let data = {
activeName: this.form.activeName,
gradeIds: this.form.gradeIds,
condition: this.form.days,
cardFavorableIds: this.cardFavorableIds,
cardExchangeIds: this.pddhidlist
}
issueCardFavorable(data).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList()
})
}
return
}
})
}else{
console.log('新增')
this.form.activeConsumptionChildList = this.form.tableDatas.concat(this.tableDatas, this.form.shiwudata);
console.log(this.form.activeConsumptionChildList)
let data = {
activeName : this.form.activeName,
gradeIds:this.form.gradeIds,
condition:this.form.days,
cardFavorableIds:this.cardFavorableIds,
cardExchangeIds:this.pddhidlist
}
issueCardFavorable(data).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList()
})
}
return
// this.$refs["form"].validate(valid => {
// if (valid) {
// ;

View File

@ -229,6 +229,7 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl<ActiveOneCouponMappe
activeOneCouponVO.setCardFavorableIds(cardFavorableIds);
activeOneCouponVO.setCardFavorableList(cardFavorableArrayList);
activeOneCouponVO.setCardExchangeList(cardExchangeArrayList);
activeOneCouponVO.setConditions(oneCoupon.getConditions());
return activeOneCouponVO;
}