|
|
@@ -51,8 +51,11 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="创建时间" prop="create_at" width="180"></el-table-column>
|
|
|
- <el-table-column label="操作" width="140" align="left" fixed="right">
|
|
|
+ <el-table-column label="操作" width="180" align="left" fixed="right">
|
|
|
<template #default="scope">
|
|
|
+ <el-button-group>
|
|
|
+ <el-button size="warning" text @click="table_life(scope.row)">来客下架</el-button>
|
|
|
+ </el-button-group>
|
|
|
<el-button-group>
|
|
|
<el-button size="small" text @click="table_view(scope.row)">编辑</el-button>
|
|
|
<el-button type="danger" text size="small" @click="table_del(scope.row)">删除</el-button>
|
|
|
@@ -86,6 +89,18 @@ export default {
|
|
|
this.$refs.comboMain.open("edit").setData(data)
|
|
|
})
|
|
|
},
|
|
|
+ table_life(data){
|
|
|
+ this.$confirm(`来客下架成功后,在小程序中将不展示该商品,同时也将无法二次上架`, '提示', {
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async ()=>{
|
|
|
+ var resp = await this.$API.merGoods.off.post({"id":data.id});
|
|
|
+ if (resp.code == 0) {
|
|
|
+ return this.$message.error(resp.msg);
|
|
|
+ }
|
|
|
+ this.$message.success(resp.msg);
|
|
|
+ this.$emit("success");
|
|
|
+ }).catch(()=>{})
|
|
|
+ },
|
|
|
table_view(data){
|
|
|
this.$router.push({path:"/merchant/goods/edit",query:{"product_id":data.product_id,"id":data.id,"spm":(new Date()).getTime()}})
|
|
|
},
|