This commit is contained in:
cun-nan 2024-03-07 17:40:32 +08:00
parent b89782be6f
commit 2f4c1ab5b9
2 changed files with 63 additions and 50 deletions

View File

@ -62,7 +62,7 @@
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
<span> {{scope.row.createTime}} </span> <span> {{scope.row.createTime}} </span>
</template> </template>
@ -73,7 +73,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address" align="center" width="180px"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -123,7 +123,7 @@
</el-form-item> </el-form-item>
<el-form-item label="不活跃用户" prop="days"> <el-form-item label="不活跃用户" prop="days">
<div style="display: flex;align-items: center"> <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 style="margin-left: 5px"> <span style="color: red">(查找最近N天未进行消费的用户)</span> </div>
</div> </div>
</el-form-item> </el-form-item>
@ -650,7 +650,11 @@ export default {
activeId:row.id activeId:row.id
} }
postyijian(data).then(res=>{ 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){ change(e){
if (e.length>0 && this.form.days && this.form.days > 0) {
let data = { let data = {
gradeIds:e, gradeIds: e,
days:this.days days: this.form.days
} }
getAdaptUserList(data).then(res=>{ getAdaptUserList(data).then(res => {
this.rlist = res.data this.rlist = res.data
}) })
}else {
this.rlist = []
}
}, },
indexMethod(index) { indexMethod(index) {
return index * 2; return index * 2;
@ -970,7 +978,9 @@ export default {
getCardFavorable(id).then(response => { getCardFavorable(id).then(response => {
this.form = response.data; this.form = response.data;
this.form.gradeIds = response.data.gradeIds this.form.gradeIds = response.data.gradeIds
this.form.days = response.data.condition, this.form.days = response.data.conditions
this.days = response.data.conditions
this.change(response.data.gradeIds)
this.cardFavorableIds = response.data.cardFavorableIds this.cardFavorableIds = response.data.cardFavorableIds
this.pddhidlist = response.data.cardExchangeIds this.pddhidlist = response.data.cardExchangeIds
if(response.data.cardExchangeList){ if(response.data.cardExchangeList){
@ -1037,17 +1047,19 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
if(this.form.id){ this.$refs["form"].validate(valid => {
console.log('修改',this.form.days) if (valid) {
if (this.form.id) {
console.log('修改', this.form.days)
this.form.activeConsumptionChildList = this.form.tableDatas.concat(this.tableDatas, this.form.shiwudata); this.form.activeConsumptionChildList = this.form.tableDatas.concat(this.tableDatas, this.form.shiwudata);
console.log(this.form.activeConsumptionChildList) console.log(this.form.activeConsumptionChildList)
let data = { let data = {
id:this.form.id, id: this.form.id,
activeName : this.form.activeName, activeName: this.form.activeName,
gradeIds:this.form.gradeIds, gradeIds: this.form.gradeIds,
condition:this.form.days, condition: this.form.days,
cardFavorableIds:this.cardFavorableIds, cardFavorableIds: this.cardFavorableIds,
cardExchangeIds:this.pddhidlist cardExchangeIds: this.pddhidlist
} }
updetaCardFavorable(data).then(response => { updetaCardFavorable(data).then(response => {
@ -1056,16 +1068,16 @@ export default {
this.getList() this.getList()
}) })
}else{ } else {
console.log('新增') console.log('新增')
this.form.activeConsumptionChildList = this.form.tableDatas.concat(this.tableDatas, this.form.shiwudata); this.form.activeConsumptionChildList = this.form.tableDatas.concat(this.tableDatas, this.form.shiwudata);
console.log(this.form.activeConsumptionChildList) console.log(this.form.activeConsumptionChildList)
let data = { let data = {
activeName : this.form.activeName, activeName: this.form.activeName,
gradeIds:this.form.gradeIds, gradeIds: this.form.gradeIds,
condition:this.form.days, condition: this.form.days,
cardFavorableIds:this.cardFavorableIds, cardFavorableIds: this.cardFavorableIds,
cardExchangeIds:this.pddhidlist cardExchangeIds: this.pddhidlist
} }
issueCardFavorable(data).then(response => { issueCardFavorable(data).then(response => {
@ -1075,8 +1087,8 @@ export default {
}) })
} }
return return
}
})
// this.$refs["form"].validate(valid => { // this.$refs["form"].validate(valid => {
// if (valid) { // if (valid) {
// ; // ;

View File

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