Merge remote-tracking branch 'origin/master'

This commit is contained in:
齐天大圣 2024-03-01 15:08:05 +08:00
commit 221b357b7f
4 changed files with 205 additions and 12 deletions

View File

@ -82,3 +82,18 @@ export function delActiveConsumption(id) {
method: 'delete' method: 'delete'
}) })
} }
//查看详情
export function looklook(data) {
return request({
url: 'business/marketingActivity/activeConsumption/detailRecord',
method: 'get',
params:data
})
}
export function looklooklook(id) {
return request({
url: 'business/marketingActivity/activeConsumption/detailCount/'+id,
method: 'get',
})
}

View File

@ -47,7 +47,7 @@ export function updateActiveDiscount(data) {
// 删除折扣营销 // 删除折扣营销
export function delActiveDiscount(id) { export function delActiveDiscount(id) {
return request({ return request({
url: '/business/marketingActivity/activeDiscount/' + id, url: '/business/marketingActivity/activeDiscount/delById/' + id,
method: 'delete' method: 'delete'
}) })
} }

View File

@ -122,13 +122,19 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>修改</el-button> >修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="lookDetail(scope.row)"
>详情</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -401,12 +407,7 @@
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-form-item label="参与条件" prop="participationCondition">
<el-select v-model="form.participationCondition" clearable placeholder="请选择天参与条件">
<el-option label="不限制" value="0"></el-option>
<el-option label="优惠订单不参与" value="1"></el-option>
</el-select>
</el-form-item>-->
<el-form-item label="参与次数类别" prop="participationAcount"> <el-form-item label="参与次数类别" prop="participationAcount">
<el-select v-model="form.participationAcount" clearable placeholder="请选择参与次数类别"> <el-select v-model="form.participationAcount" clearable placeholder="请选择参与次数类别">
<el-option label="不限制" value="0"></el-option> <el-option label="不限制" value="0"></el-option>
@ -426,6 +427,52 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="详情统计" :visible.sync="opendetails" width="45%" append-to-body>
<div style="display: flex;justify-content: space-between;width: 100%;">
<div class="x-box">
<div>优惠券数量统计</div>
<div>总数量: {{statisticsyou.count ||0}}</div>
<div>已使用数量: {{statisticsyou.countEd ||0}}</div>
<div>未使用数量: {{statisticsyou.countLd ||0}}</div>
</div>
<div class="x-box">
<div>兑换券数量统计</div>
<div>总数量: {{statisticsyou.counts ||0}}</div>
<div>已使用数量: {{statisticsyou.countEds ||0}}</div>
<div>未使用数量: {{statisticsyou.countLds ||0}}</div>
</div>
</div>
<el-table
:data="looklist"
style="width: 100%">
<el-table-column
prop="name"
label="昵称"
>
</el-table-column>
<el-table-column
prop="mobile"
label="联系方式"
>
</el-table-column>
<el-table-column
prop="createTime"
label="领取日期"
>
</el-table-column>
<el-table-column
prop="exchangeFrom"
label="获取方式"
>
</el-table-column>
</el-table>
</el-dialog>
<!-- 详情列表-->
<el-dialog title="优惠券列表" :visible.sync="dialogTableVisible"> <el-dialog title="优惠券列表" :visible.sync="dialogTableVisible">
<div style="display: flex;align-items: center; margin-bottom: 20px "> <div style="display: flex;align-items: center; margin-bottom: 20px ">
<el-input v-model="youhuiquan.name" placeholder="优惠券名称"></el-input> <el-input v-model="youhuiquan.name" placeholder="优惠券名称"></el-input>
@ -566,7 +613,6 @@
</el-form-item> </el-form-item>
<el-button <el-button
type="primary" type="primary"
@click="shwdata()" @click="shwdata()"
>确定</el-button> >确定</el-button>
@ -578,13 +624,16 @@
</template> </template>
<script> <script>
import { getoiltype,getoilName, listActiveConsumption,listExchange,listLJGoods, getActiveConsumption, delActiveConsumption, addActiveConsumption, updateActiveConsumption,listFavorable } from "@/api/EventMarketing/activeConsumption"; import { getoiltype,getoilName, listActiveConsumption,listExchange,listLJGoods, getActiveConsumption, delActiveConsumption, addActiveConsumption, updateActiveConsumption,listFavorable,looklook,looklooklook } from "@/api/EventMarketing/activeConsumption";
import {listUserGrade} from "@/api/staff/user/usergrade"; import {listUserGrade} from "@/api/staff/user/usergrade";
export default { export default {
name: "ActiveConsumption", name: "ActiveConsumption",
data() { data() {
return { return {
opendetails:false,
looklist:[],
statisticsyou:{},
moneyList:[ moneyList:[
{name:'订单金额',id:'1'}, {name:'订单金额',id:'1'},
{name:'实付金额',id:'2'} {name:'实付金额',id:'2'}
@ -760,6 +809,22 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
//
lookDetail(row){
this.opendetails = true
let data = {
id:row.id
}
looklook(data).then(res=>{
this.looklist = res.data
console.log('详情',res)
})
looklooklook(row.id).then(resp=>{
this.statisticsyou = resp.data
console.log('优惠券详情统计',resp)
})
},
listUserGrade(){ listUserGrade(){
listUserGrade().then(res=>{ listUserGrade().then(res=>{
if(res.code == 200){ if(res.code == 200){
@ -1147,4 +1212,11 @@ export default {
align-items: center; align-items: center;
font-size: 18px; font-size: 18px;
} }
.x-box{
background: #f9f9f9;
border-radius: 6px;
box-sizing: border-box;
padding: 15px;
width: 45%;
}
</style> </style>

View File

@ -83,7 +83,6 @@
<template slot-scope="scope"> <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="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> <span style="cursor: pointer;" @click="jinyong(scope.row)" v-if="scope.row.status == 1"> <el-tag type="danger">禁用</el-tag> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="活动时间" align="center" prop="adaptUserType" > <el-table-column label="活动时间" align="center" prop="adaptUserType" >
@ -110,6 +109,12 @@
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>修改</el-button> >修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="lookDetail(scope.row)"
>详情</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -117,6 +122,13 @@
@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>
@ -130,6 +142,50 @@
@pagination="getList" @pagination="getList"
/> />
</el-card> </el-card>
<el-dialog title="详情统计" :visible.sync="opendetails" width="45%" append-to-body>
<div style="display: flex;justify-content: space-between;width: 100%;">
<div class="x-box">
<div>优惠券数量统计</div>
<div>总数量: {{statisticsyou.count ||0}}</div>
<div>已使用数量: {{statisticsyou.countEd ||0}}</div>
<div>未使用数量: {{statisticsyou.countLd ||0}}</div>
</div>
<div class="x-box">
<div>兑换券数量统计</div>
<div>总数量: {{statisticsyou.counts ||0}}</div>
<div>已使用数量: {{statisticsyou.countEds ||0}}</div>
<div>未使用数量: {{statisticsyou.countLds ||0}}</div>
</div>
</div>
<el-table
:data="looklist"
style="width: 100%">
<el-table-column
prop="name"
label="昵称"
>
</el-table-column>
<el-table-column
prop="mobile"
label="联系方式"
>
</el-table-column>
<el-table-column
prop="createTime"
label="领取日期"
>
</el-table-column>
<el-table-column
prop="exchangeFrom"
label="获取方式"
>
</el-table-column>
</el-table>
</el-dialog>
<!-- 添加或修改折扣营销对话框 --> <!-- 添加或修改折扣营销对话框 -->
<el-dialog :title="title" :visible.sync="open" width="45%" append-to-body> <el-dialog :title="title" :visible.sync="open" width="45%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="120px">
@ -227,13 +283,21 @@
<script> <script>
import { listActiveDiscount, getActiveDiscount, delActiveDiscount, addActiveDiscount, updateActiveDiscount } from "@/api/EventMarketing/activeDiscount"; import { listActiveDiscount, getActiveDiscount, delActiveDiscount, addActiveDiscount, updateActiveDiscount } from "@/api/EventMarketing/activeDiscount";
import {getActiveConsumption, getoilName, updateActiveConsumption} from "@/api/EventMarketing/activeConsumption"; import {
delActiveConsumption,
getActiveConsumption,
getoilName, looklook, looklooklook,
updateActiveConsumption
} from "@/api/EventMarketing/activeConsumption";
import {listUserGrade} from "@/api/staff/user/usergrade"; import {listUserGrade} from "@/api/staff/user/usergrade";
export default { export default {
name: "ActiveDiscount", name: "ActiveDiscount",
data() { data() {
return { return {
opendetails:false,
looklist:[],
statisticsyou:{},
labelPosition:'left', labelPosition:'left',
discount:'', discount:'',
amount:'', amount:'',
@ -509,6 +573,32 @@ export default {
} }
}); });
}, },
lookDetail(row){
this.opendetails = true
let data = {
id:row.id
}
looklook(data).then(res=>{
this.looklist = res.data
console.log('详情',res)
})
looklooklook(row.id).then(resp=>{
this.statisticsyou = resp.data
console.log('优惠券详情统计',resp)
})
},
Deleteshan(row){
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除消费有礼活动编号为"' + ids + '"的数据项?').then(function() {
return delActiveDiscount(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
@ -528,3 +618,19 @@ export default {
} }
}; };
</script> </script>
<style scoped lang="scss">
.box-bt{
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 18px;
}
.x-box{
background: #f9f9f9;
border-radius: 6px;
box-sizing: border-box;
padding: 15px;
width: 45%;
}
</style>