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