商城列表

master
fanfan 8 months ago
parent 2c79e20159
commit 959270a724
  1. 12
      src/api/store.js
  2. 9
      src/views/dataCenter/goods/Index.vue
  3. 29
      src/views/store/index.vue

@ -188,7 +188,17 @@ export function recovery (data) {
data: data data: data
}) })
} }
/**
* 移入回收站
* @param {*} data
*/
export function deleteGoods (data) {
return axios({
url: 'store/deleteGoods',
method: 'post',
data: data
})
}
/** /**
* 删除记录 * 删除记录
* @param {*} data * @param {*} data

@ -433,11 +433,18 @@ const columns = [
}, },
{ {
title: '加价率', title: '加价率',
width: '80px', width: '95px',
dataIndex: 'markup_rate', dataIndex: 'markup_rate',
sorter: true, sorter: true,
scopedSlots: { customRender: 'markup_rate' }, scopedSlots: { customRender: 'markup_rate' },
}, },
{
title: '开单价',
width: '95px',
dataIndex: 'after_markup_price',
scopedSlots: { customRender: 'after_markup_price' },
sorter: true,
},
{ {
title: '库存', title: '库存',
width: '80px', width: '80px',

@ -24,6 +24,7 @@
<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>
</span> </span>
</s-table> </s-table>
<create-form ref="createModal" @handleSubmit="handleRefresh" /> <create-form ref="createModal" @handleSubmit="handleRefresh" />
@ -99,7 +100,7 @@ export default {
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
width: '300px', width: '340px',
scopedSlots: { customRender: 'action' } 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() this.handleRefresh()
}) })
}, },
/**
* 确认删除商品
*/
onSubmitDeleteGoods (item) {
return Api.deleteGoods({ storeId: item['store_id'] })
.then(result => {
this.$message.success(result.message)
this.handleRefresh()
})
},
// //
handleModule (item) { handleModule (item) {
// //

Loading…
Cancel
Save