商户优惠

This commit is contained in:
shijingjing
2022-11-04 15:33:30 +08:00
parent f016cd338c
commit 9383a41500

View File

@@ -5,23 +5,12 @@
<template #content> <template #content>
<ai-search-bar> <ai-search-bar>
<template #left> <template #left>
<el-input
v-model="search.name"
class="search-input"
size="small"
v-throttle="() => {page.current = 1, getList()}"
placeholder="请输入商户名称"
clearable
@change="getList"
@clear="page.current = 1, page.content = '', getList()"
suffix-icon="iconfont iconSearch">
</el-input>
<el-input <el-input
v-model="search.title" v-model="search.title"
class="search-input" class="search-input"
size="small" size="small"
v-throttle="() => {page.current = 1, getList()}" v-throttle="() => {page.current = 1, getList()}"
placeholder="请输入优惠标题" placeholder="请输入商户名称、优惠标题"
clearable clearable
@change="getList" @change="getList"
@clear="page.current = 1, page.content = '', getList()" @clear="page.current = 1, page.content = '', getList()"
@@ -31,7 +20,7 @@
v-model="search.status" v-model="search.status"
@change="page.current = 1, getList()" @change="page.current = 1, getList()"
placeholder="状态" placeholder="状态"
:selectList="dict.getDict('cwpStatus')"> :selectList="dict.getDict('integralDeclareStatus')">
</ai-select> </ai-select>
</template> </template>
</ai-search-bar> </ai-search-bar>
@@ -39,8 +28,8 @@
:size.sync="page.size" @getList="getList" :col-configs="colConfigs" :dict="dict"> :size.sync="page.size" @getList="getList" :col-configs="colConfigs" :dict="dict">
<el-table-column slot="options" label="操作" fixed="right" align="center"> <el-table-column slot="options" label="操作" fixed="right" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button type="text" @click.native="examine(row.id)">审核通过</el-button> <el-button type="text" v-show="row.status==0" @click.native="examine(row.id,1)">审核通过</el-button>
<el-button type="text" @click.native="examine(row.id)">审核拒绝</el-button> <el-button type="text" v-show="row.status==0" @click.native="examine(row.id,0)">审核拒绝</el-button>
<el-button type="text" @click.native="delBtn(row.id)">删除</el-button> <el-button type="text" @click.native="delBtn(row.id)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@@ -72,69 +61,67 @@ export default {
img: '', img: '',
isLoading: false, isLoading: false,
search: { search: {
name: '',
title: '', title: '',
status: '' status: ''
} }
} }
}, },
created () { created () {
this.$dict.load('').then(()=> { this.$dict.load('integralDeclareStatus').then(()=> {
// this.getList() this.getList()
}) })
}, },
computed: { computed: {
colConfigs() { colConfigs() {
return [ return [
{prop: "", label: "商户名称", align: "left", showOverflowTooltip: true}, {prop: "merchantName", label: "商户名称", align: "left", showOverflowTooltip: true},
{prop: "", label: "优惠标题", align: "center"}, {prop: "title", label: "优惠标题", align: "center"},
{prop: "", label: "优惠内容", align: "center", width: "400px", render: (h, {row}) => h('p',{textAlign:'center'}, {prop: "content", label: "优惠内容", align: "center",showOverflowTooltip: true},
`${row.intoBegintime}${row.exitEndtime}`)}, {prop: "status", label: "状态", align: "center", dict:"integralDeclareStatus"},
{prop: "", label: "状态", align: "center", dict:"tfx_activityStatus"}, {slot: "options"},
{ slot: "options", },
] ]
} }
}, },
methods: { methods: {
getList() { getList() {
// this.instance.post(`api/appactivityinfo/list`,null, { this.instance.post(`/appmerchantinfo/discountList`,null, {
// params: { params: {
// ...this.page, ...this.page,
// } }
// }).then(res=> { }).then(res=> {
// if(res?.data) { if(res?.data) {
// this.tableData = res.data.records this.tableData = res.data.records
// this.page.total = res.data.total this.page.total = res.data.total
// } }
// }) })
}, },
// 删除 // 删除
delBtn(id) { delBtn(id) {
// this.$confirm('确定删除该记录?').then(() => { this.$confirm('确定删除该记录?').then(() => {
// this.instance.post(`api/appactivityinfo/delete?ids=${id}`).then(res=>{ this.instance.post(`/appmerchantinfo/deleteDiscount?ids=${id}`).then(res=>{
// if(res.code == 0) { if(res.code == 0) {
// this.$message.success('删除成功!') this.$message.success('删除成功!')
// this.getList() this.getList()
// } }
// }) })
// }) })
}, },
// 审核 // 审核
examine(id,type) { examine(id,pass) {
// let title = '' let title = ''
// if(type=='') { if(pass=='1') {
// title = '确定要审核通过该活动吗?' title = '确定要审核通过该活动吗?'
// } else if(type=='') { } else if(pass=='0') {
// title = '确定要审核拒绝该活动吗?' title = '确定要审核拒绝该活动吗?'
// } }
// this.$confirm(title).then(() => { this.$confirm(title).then(() => {
// this.instance.post(`api/appactivityinfo/stop?id=${id}`).then(res=>{ this.instance.post(`/appmerchantinfo/examineDiscount?id=${id}&pass=${pass}`).then(res=>{
// if(res.code == 0) { if(res.code == 0) {
// this.$message.success('审核成功!') this.$message.success('审核成功!')
// this.getList() this.getList()
// } }
// }) })
// }) })
}, },
} }
} }