疫情防控
This commit is contained in:
@@ -137,7 +137,7 @@
|
||||
this.instance.post(`/app/appintegralmerchandise/addOrUpdate`, {
|
||||
...this.form,
|
||||
imageUrl: this.form.imageUrl[0].url,
|
||||
rangeList: this.form.girdList.length ? this.form.girdList.map(v => {
|
||||
rangeList: this.girdList.length ? this.girdList.map(v => {
|
||||
return {
|
||||
rangeId: v.id,
|
||||
rangeName: v.girdName
|
||||
|
||||
@@ -79,8 +79,8 @@
|
||||
<el-table-column slot="options" width="160px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row.id)" v-if="row.status === '0' || row.status === '2'">下架</el-button>
|
||||
<el-button type="text" @click="toDetail(row.id)" v-if="row.status === '1'">上架</el-button>
|
||||
<el-button type="text" @click="operation(row.id, row.status)" v-if="row.status === '0' || row.status === '2'">下架</el-button>
|
||||
<el-button type="text" @click="operation(row.id, row.status)" v-if="row.status === '1'">上架</el-button>
|
||||
<el-button type="text" @click="toAdd(row.id)">编辑</el-button>
|
||||
<el-button type="text" @click="remove(row.id)">删除</el-button>
|
||||
</div>
|
||||
@@ -181,9 +181,20 @@
|
||||
})
|
||||
},
|
||||
|
||||
operation (id, status) {
|
||||
this.$confirm(status === '1' ? '确定上架该商品?' : '确定下架该商品?').then(() => {
|
||||
this.instance.post(`/app/appintegralmerchandise/takeOnOffById?id=${id}&opType=${status === '0' ? 0 : 1}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success(status === '1' ? '上架成功' : '下架成功')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
remove (id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appintegralmerchandise/delete?id=${id}`).then(res => {
|
||||
this.instance.post(`/app/appintegralmerchandise/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getList()
|
||||
|
||||
Reference in New Issue
Block a user