This commit is contained in:
yanran200730
2023-04-17 17:42:34 +08:00
parent 36b34a190b
commit ff55cd42ba

View File

@@ -14,7 +14,7 @@
v-model="search.status" v-model="search.status"
@change="(search.current = 1), getList()" @change="(search.current = 1), getList()"
placeholder="请选择状态" placeholder="请选择状态"
:selectList="dict.getDict('integralSGStatus')"> :selectList="dict.getDict('integralSSStatus')">
</ai-select> </ai-select>
</template> </template>
<template slot="right"> <template slot="right">
@@ -52,7 +52,7 @@
<template v-slot="{ row }"> <template v-slot="{ row }">
<div class="table-options"> <div class="table-options">
<el-button type="text" title="编辑" @click="toAdd(row.id)">编辑</el-button> <el-button type="text" title="编辑" @click="toAdd(row.id)">编辑</el-button>
<el-button type="text" :title="row.status === '0' ? '上架' : '下架'" @click="changeStatus(row)">{{ row.status === '0' ? '上架' : '下架' }}</el-button> <el-button type="text" :title="row.status === '0' ? '启用' : '停用'" @click="changeStatus(row)">{{ row.status === '0' ? '启用' : '停用' }}</el-button>
<el-button type="text" title="删除" @click="remove(row.id)">删除</el-button> <el-button type="text" title="删除" @click="remove(row.id)">删除</el-button>
</div> </div>
</template> </template>
@@ -140,10 +140,10 @@
}, },
changeStatus (row) { changeStatus (row) {
this.$confirm(`确定${row.status === '0' ? '上架' : '下架'}该商品?`).then(() => { this.$confirm(`确定${row.status === '0' ? '启用' : '停用'}该商品?`).then(() => {
this.instance.post(`/app/appintegralsupermarketgoods/online?id=${id}`).then(res => { this.instance.post(`/app/appintegralsupermarketshop/enable?id=${row.id}`).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.$message.success(`${row.status === '0' ? '上架' : '下架'}成功`) this.$message.success(`${row.status === '0' ? '启用' : '停用'}成功`)
this.getList() this.getList()
} }
}) })