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 >
.app-container{
width: 100%;
height: 100vh;
//height: 100vh;
background: #f6f8f9;
}
</style>

View File

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

View File

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

View File

@ -181,78 +181,66 @@
</el-card>
<el-card>
<!-- <el-table v-loading="loading" :data="activeFullminusList" @selection-change="handleSelectionChange">-->
<!-- <el-table-column-->
<!-- type="index"-->
<!-- align="center"-->
<!-- label="序号"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- &lt;!&ndash; <el-table-column label="活动编号" align="center" prop="id" />&ndash;&gt;-->
<!-- <el-table-column label="活动名称" align="center" prop="name" />-->
<!-- <el-table-column label="适用油品" align="center" prop="adaptOil" >-->
<!-- <template slot-scope="scope">-->
<!-- <span > {{ scope.row.adaptOilss}} </span>-->
<!-- </template>-->
<!-- </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 v-loading="loading" :data="activeFullminusList" @selection-change="handleSelectionChange">
<el-table-column
type="index"
align="center"
label="序号"
>
</el-table-column>
<!-- <el-table-column label="活动编号" align="center" prop="id" />-->
<el-table-column label="活动名称" align="center" prop="name" />
<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="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>-->
<!-- </el-table>-->
<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.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>
@ -474,6 +462,7 @@ export default {
points: null,
growthValue: null,
},
activeFullminusList: [],
//
form: {
id:1,
@ -508,11 +497,19 @@ export default {
};
},
created() {
this.getList()
// this.handleUpdate();
},
methods: {
/** 查询新人有礼活动列表 */
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;
// listActiveNewlyweds(this.queryParams).then(response => {
// this.activeNewlywedsList = response.data.records;