更新删除商品 和回收站删除商品的问题

This commit is contained in:
stivepeim
2020-11-20 15:09:18 +08:00
parent 30a90cf45c
commit 138d2a2c62
6 changed files with 29 additions and 21 deletions

View File

@@ -254,9 +254,10 @@ export default {
this.getList()
},
// 删除
handleDelete(id, idx) {
this.$modalSure().then(() => {
productDeleteApi(id).then(() => {
handleDelete(id, type) {
this.$modalSure(`删除 id 为 ${id} 的商品`).then(() => {
const deleteFlag = type == 5 ? 'delete':'recycle';
productDeleteApi(id,deleteFlag).then(() => {
this.$message.success('删除成功')
this.getList()
this.goodHeade();