This commit is contained in:
@QQNZX 2024-03-01 11:01:36 +08:00
parent 8c75f4bac6
commit 18ea4f2a6c
4 changed files with 109 additions and 91 deletions

View File

@ -20,7 +20,7 @@
<style > <style >
.app-container{ .app-container{
width: 100%; width: 100%;
height: 100vh; //height: 100vh;
background: #f6f8f9; background: #f6f8f9;
} }
</style> </style>

View File

@ -78,7 +78,7 @@ export function updateActiveConsumption(data) {
// 删除消费有礼活动 // 删除消费有礼活动
export function delActiveConsumption(id) { export function delActiveConsumption(id) {
return request({ return request({
url: '/business/marketingActivity/activeConsumption/' + id, url: 'business/marketingActivity/activeConsumption/delById/' + id,
method: 'delete' method: 'delete'
}) })
} }

View File

@ -71,18 +71,24 @@
</el-table-column> </el-table-column>
<el-table-column label="赠券数量" align="center" prop="adaptUserType" > <el-table-column label="赠券数量" align="center" prop="adaptUserType" >
<template slot-scope="scope"> <template slot-scope="scope">
<span >优惠券{{scope.row.youhuiTotal || 0}}/兑换券{{scope.row.duihuanTotal || 0}}</span> <div>优惠券{{scope.row.youhuiTotal || 0}}</div>
<div>兑换券{{scope.row.duihuanTotal || 0}}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="核销统计" align="center" prop="adaptUserType" > <el-table-column label="核销统计" align="center" prop="adaptUserType" >
<template slot-scope="scope"> <template slot-scope="scope">
<span >优惠券{{scope.row.youhuiTotaled || 0}}/兑换券{{scope.row.duihuanTotaled || 0}}</span> <div>优惠券{{scope.row.youhuiTotaled || 0}}</div>
<div>兑换券{{scope.row.duihuanTotaled || 0}}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="活动时间" align="center" prop="adaptUserType" > <el-table-column label="活动时间" align="center" prop="adaptUserType" >
<template slot-scope="scope"> <template slot-scope="scope">
<span >{{scope.row.activeStartTime || 0}}-{{scope.row.activeEndTime || 0}}</span> <div>{{scope.row.activeStartTime || 0}}</div>
<div>{{scope.row.activeEndTime || 0}}</div>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="会员等级" align="center" prop="dieselUserLevel" >--> <!-- <el-table-column label="会员等级" align="center" prop="dieselUserLevel" >-->
@ -98,11 +104,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="活动时间" align="center" prop="adaptUserType" > <!-- <el-table-column label="活动时间" align="center" prop="adaptUserType" >-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span >{{scope.row.activeStartTime || 0}}-{{scope.row.activeEndTime || 0}}</span> <!-- <span >{{scope.row.activeStartTime || 0}}-{{scope.row.activeEndTime || 0}}</span>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="活动更新时间" align="center" prop="updateTime" > <el-table-column label="活动更新时间" align="center" prop="updateTime" >
<template slot-scope="scope"> <template slot-scope="scope">
<span >{{scope.row.updateTime || '暂无更新'}}</span> <span >{{scope.row.updateTime || '暂无更新'}}</span>
@ -130,7 +136,15 @@
@click="handleDeletexia(scope.row)" @click="handleDeletexia(scope.row)"
v-if="scope.row.isonline == 0" v-if="scope.row.isonline == 0"
>下线</el-button> >下线</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="Deleteshan(scope.row)"
v-if="scope.row.isonline == 1"
>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -151,7 +165,7 @@
</el-form-item> </el-form-item>
<el-form-item label="满足金额" prop="moneyType"> <el-form-item label="满足金额" prop="moneyType">
<el-select v-model="form.moneyType" placeholder="请选择满足金额" @change="change" > <el-select v-model="form.moneyType" placeholder="请选择满足金额" >
<el-option <el-option
v-for="dict in moneyList" v-for="dict in moneyList"
:key="dict.id.toString()" :key="dict.id.toString()"
@ -1021,9 +1035,13 @@ 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;
this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1') if(response.data.activeConsumptionChildList&&response.data.activeConsumptionChildList.length >1){
this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2') this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
this.form.shiwudata = response.data.activeConsumptionChildList.filter(item => item.activeGift == '4') this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2')
this.form.shiwudata = response.data.activeConsumptionChildList.filter(item => item.activeGift == '4')
}
this.open = true; this.open = true;
this.title = "修改消费有礼活动"; this.title = "修改消费有礼活动";
}); });
@ -1099,16 +1117,19 @@ export default {
} }
}); });
}, },
/** 删除按钮操作 */ Deleteshan(row){
handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除消费有礼活动编号为"' + ids + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除消费有礼活动编号为"' + ids + '"的数据项?').then(function() {
return delActiveConsumption(ids); return delActiveConsumption(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => {});
}, },
/** 删除按钮操作 */
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('business/marketingActivity/activeConsumption/export', { this.download('business/marketingActivity/activeConsumption/export', {

View File

@ -181,78 +181,66 @@
</el-card> </el-card>
<el-card> <el-card>
<!-- <el-table v-loading="loading" :data="activeFullminusList" @selection-change="handleSelectionChange">--> <el-table v-loading="loading" :data="activeFullminusList" @selection-change="handleSelectionChange">
<!-- <el-table-column--> <el-table-column
<!-- type="index"--> type="index"
<!-- align="center"--> align="center"
<!-- label="序号"--> label="序号"
<!-- >--> >
<!-- </el-table-column>--> </el-table-column>
<!-- &lt;!&ndash; <el-table-column label="活动编号" align="center" prop="id" />&ndash;&gt;--> <!-- <el-table-column label="活动编号" align="center" prop="id" />-->
<!-- <el-table-column label="活动名称" align="center" prop="name" />--> <el-table-column label="活动名称" align="center" prop="name" />
<!-- <el-table-column label="适用油品" align="center" prop="adaptOil" >--> <el-table-column label="活动时间" align="center" prop="adaptUserType" >
<!-- <template slot-scope="scope">--> <template slot-scope="scope">
<!-- <span > {{ scope.row.adaptOilss}} </span>--> <span >{{scope.row.activeStartTime || 0}}-{{scope.row.activeEndTime || 0}}</span>
<!-- </template>--> </template>
<!-- </el-table-column>--> </el-table-column>
<!-- <el-table-column label="适用用户" align="center" prop="adaptOil" >-->
<!-- <template slot-scope="scope">-->
<!-- <span v-for="(item,index) in scope.row.dieselUserLevel "> {{item}} </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="满足金额(元)" align="center" prop="adaptOil" >-->
<!-- <template slot-scope="scope">-->
<!-- <span> {{scope.row.activeDiscountChildList[0].amount}} </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="减去金额(元)" align="center" prop="adaptOil" >-->
<!-- <template slot-scope="scope">-->
<!-- <span> {{scope.row.activeDiscountChildList[0].deductionAmount}} </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="活动状态 " align="center" prop="status" >-->
<!-- <template slot-scope="scope">-->
<!-- <span style="cursor: pointer;" @click="qiyong(scope.row)" v-if="scope.row.status == 0"> <el-tag>启用</el-tag > </span>-->
<!-- <span style="cursor: pointer;" @click="jinyong(scope.row)" v-if="scope.row.status == 1"> <el-tag type="danger">禁用</el-tag> </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="活动时间" align="center" prop="adaptUserType" >-->
<!-- <template slot-scope="scope">-->
<!-- <span >{{scope.row.activeStartTime || 0}}-{{scope.row.activeEndTime || 0}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="活动更新时间" align="center" prop="updateTime" >-->
<!-- <template slot-scope="scope">-->
<!-- <span >{{scope.row.updateTime || '暂无更新'}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作员" align="center" prop="updateTime" >-->
<!-- <template slot-scope="scope">-->
<!-- <span >{{scope.row.createBy || ''}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- >修改</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDeletexia(scope.row)"-->
<!-- v-if="scope.row.isonline == 0"-->
<!-- >下线</el-button>-->
<!-- </template>--> <el-table-column label="活动状态 " align="center" prop="status" >
<!-- </el-table-column>--> <template slot-scope="scope">
<!-- </el-table>--> <span style="cursor: pointer;" @click="qiyong(scope.row)" v-if="scope.row.status == 0"> <el-tag>启用</el-tag > </span>
<span style="cursor: pointer;" @click="jinyong(scope.row)" v-if="scope.row.status == 1"> <el-tag type="danger">禁用</el-tag> </span>
</template>
</el-table-column>
<el-table-column label="赠送积分" align="center" prop="adaptUserType" >
<template slot-scope="scope">
<span >{{scope.row.points || 0}}</span>
</template>
</el-table-column>
<el-table-column label="赠送成长值" align="center" prop="adaptUserType" >
<template slot-scope="scope">
<span >{{scope.row.growthValue || 0}}</span>
</template>
</el-table-column>
<el-table-column label="活动更新时间" align="center" prop="updateTime" >
<template slot-scope="scope">
<span >{{scope.row.updateTime || '暂无更新'}}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDeletexia(scope.row)"
v-if="scope.row.isonline == 0"
>下线</el-button>
</template>
</el-table-column>
</el-table>
</el-card> </el-card>
@ -474,6 +462,7 @@ export default {
points: null, points: null,
growthValue: null, growthValue: null,
}, },
activeFullminusList: [],
// //
form: { form: {
id:1, id:1,
@ -508,11 +497,19 @@ export default {
}; };
}, },
created() { created() {
this.getList()
// this.handleUpdate(); // this.handleUpdate();
}, },
methods: { methods: {
/** 查询新人有礼活动列表 */ /** 查询新人有礼活动列表 */
getList() { getList() {
this.loading = true;
getActiveNewlyweds(1).then(res=>{
this.activeFullminusList = res.data;
this.total = res.data.total;
console.log(res)
this.loading = false;
})
// this.loading = true; // this.loading = true;
// listActiveNewlyweds(this.queryParams).then(response => { // listActiveNewlyweds(this.queryParams).then(response => {
// this.activeNewlywedsList = response.data.records; // this.activeNewlywedsList = response.data.records;