|
|
|
@ -24,6 +24,7 @@ |
|
|
|
|
<a @click="handleDelete(item)">删除</a> |
|
|
|
|
<a @click="handleModule(item)">功能模块</a> |
|
|
|
|
<a @click="handleEdit(item)">编辑</a> |
|
|
|
|
<a @click="handleDeleteGoods(item)">删除商品</a> |
|
|
|
|
</span> |
|
|
|
|
</s-table> |
|
|
|
|
<create-form ref="createModal" @handleSubmit="handleRefresh" /> |
|
|
|
@ -99,7 +100,7 @@ export default { |
|
|
|
|
{ |
|
|
|
|
title: '操作', |
|
|
|
|
dataIndex: 'action', |
|
|
|
|
width: '300px', |
|
|
|
|
width: '340px', |
|
|
|
|
scopedSlots: { customRender: 'action' } |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
@ -169,7 +170,20 @@ export default { |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 删除商品 |
|
|
|
|
*/ |
|
|
|
|
handleDeleteGoods (item) { |
|
|
|
|
const app = this |
|
|
|
|
app.$confirm({ |
|
|
|
|
title: '您确定要删除该商品吗?', |
|
|
|
|
// okType: 'danger', |
|
|
|
|
onOk () { |
|
|
|
|
// 确认删除 |
|
|
|
|
return app.onSubmitDeleteGoods(item) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
* 确认删除 |
|
|
|
|
*/ |
|
|
|
@ -180,7 +194,16 @@ export default { |
|
|
|
|
this.handleRefresh() |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 确认删除商品 |
|
|
|
|
*/ |
|
|
|
|
onSubmitDeleteGoods (item) { |
|
|
|
|
return Api.deleteGoods({ storeId: item['store_id'] }) |
|
|
|
|
.then(result => { |
|
|
|
|
this.$message.success(result.message) |
|
|
|
|
this.handleRefresh() |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 分配功能模块 |
|
|
|
|
handleModule (item) { |
|
|
|
|
// 显示对话框 |
|
|
|
|