|
|
|
@ -18,7 +18,8 @@ |
|
|
|
|
<a @click="handleDelete(item)">删除</a> |
|
|
|
|
<a @click="handleModule(item)">功能模块</a> |
|
|
|
|
<a @click="handleEdit(item)">编辑</a> |
|
|
|
|
<a @click="handleDeleteGoods(item)">删除商品</a> |
|
|
|
|
<a @click="handleDeleteGoods(item, 1)">删除商品</a> |
|
|
|
|
<a @click="handleDeleteGoods(item, 2)">删除分类</a> |
|
|
|
|
</span> |
|
|
|
|
</s-table> |
|
|
|
|
<create-form ref="createModal" @handleSubmit="handleRefresh" /> |
|
|
|
@ -100,7 +101,7 @@ export default { |
|
|
|
|
{ |
|
|
|
|
title: '操作', |
|
|
|
|
dataIndex: 'action', |
|
|
|
|
width: '340px', |
|
|
|
|
width: '400px', |
|
|
|
|
scopedSlots: { customRender: 'action' }, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
@ -178,14 +179,14 @@ export default { |
|
|
|
|
/** |
|
|
|
|
* 删除商品 |
|
|
|
|
*/ |
|
|
|
|
handleDeleteGoods(item) { |
|
|
|
|
handleDeleteGoods(item, type) { |
|
|
|
|
const app = this |
|
|
|
|
app.$confirm({ |
|
|
|
|
title: '您确定要删除该商品吗?', |
|
|
|
|
title: type == 1 ? '您确定要删除该商品吗?' : '您确定要删除该分类吗?', |
|
|
|
|
// okType: 'danger', |
|
|
|
|
onOk() { |
|
|
|
|
// 确认删除 |
|
|
|
|
return app.onSubmitDeleteGoods(item) |
|
|
|
|
return app.onSubmitDeleteGoods(item, type) |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
@ -201,8 +202,8 @@ export default { |
|
|
|
|
/** |
|
|
|
|
* 确认删除商品 |
|
|
|
|
*/ |
|
|
|
|
onSubmitDeleteGoods(item) { |
|
|
|
|
return Api.deleteGoods({ storeId: item['store_id'] }).then((result) => { |
|
|
|
|
onSubmitDeleteGoods(item,type) { |
|
|
|
|
return Api.deleteGoods({ storeId: item['store_id'], type: type == 1 ? 'goods' : 'cate' }).then((result) => { |
|
|
|
|
this.$message.success(result.message) |
|
|
|
|
this.handleRefresh() |
|
|
|
|
}) |
|
|
|
|