From 72a012fe586fedd8ec2a04728a72458a36964d79 Mon Sep 17 00:00:00 2001 From: fanfan Date: Tue, 19 Mar 2024 15:17:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E6=9E=B6=E5=8F=8A=E5=95=86?= =?UTF-8?q?=E5=93=81=E6=B1=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dataCenter/goods/Index.vue | 69 +++++++++++++++++----------- 1 file changed, 41 insertions(+), 28 deletions(-) diff --git a/src/views/dataCenter/goods/Index.vue b/src/views/dataCenter/goods/Index.vue index 15a2c9a..844b303 100644 --- a/src/views/dataCenter/goods/Index.vue +++ b/src/views/dataCenter/goods/Index.vue @@ -65,7 +65,12 @@ - + - + - - {{ item.name }} - - + + {{ item.name }} + +
@@ -110,9 +120,7 @@ >移除 归类 - 停售 + 停售 删除
@@ -133,24 +141,24 @@ 商品图片 - - -

{{ text }}

+ + +

+ {{ text == 0 ? '待处理' : text == 1 ? '已入池' : '未入池' }} +

- - {{ text == 10 ? '上架' : '下架' }} + + {{ + text == 0 ? '停售' : text == 1 ? '在售' : '无货' + }}
编辑 复制 - 上架 - 下架 + 下架 + 上架 删除
@@ -207,10 +215,15 @@ const columns = [ dataIndex: 'stock_total', sorter: true, }, + { + title: '商品池', + dataIndex: 'is_pool', + scopedSlots: { customRender: 'is_pool' }, + }, { title: '状态', - dataIndex: 'status', - scopedSlots: { customRender: 'status' }, + dataIndex: 'is_sale', + scopedSlots: { customRender: 'is_sale' }, }, { title: '添加时间', @@ -277,8 +290,8 @@ export default { checkList: [], visible: false, - saleVisible:false, - is_sale:'', + saleVisible: false, + is_sale: '', goodsType: [ { name: '自营', val: 1 }, { name: 'POP', val: 2 }, @@ -369,7 +382,7 @@ export default { getGoodsStarus(val) { this.queryParam.is_pool = val }, - getSale(val){ + getSale(val) { this.is_sale = val }, // 获取分类列表 @@ -412,7 +425,7 @@ export default { GoodsApi.category({ goodsIds, categoryIds }) .then((result) => { // 显示成功 - this.visible=false + this.visible = false this.$message.success(result.message, 1.5) this.handleRefresh() }) @@ -422,7 +435,7 @@ export default { }, // 停售 handleUpdateSales(goodsIds, is_sale) { - if (!is_sale) { + if (is_sale === '' || is_sale === undefined || is_sale === null) { this.$message.warn('请选择停售类型', 1.5) return } @@ -430,7 +443,7 @@ export default { GoodsApi.sale({ goodsIds, is_sale }) .then((result) => { // 显示成功 - this.saleVisible=false + this.saleVisible = false this.$message.success(result.message, 1.5) this.handleRefresh() })