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