diff --git a/src/views/dataCenter/goods/Index.vue b/src/views/dataCenter/goods/Index.vue index 4145ac7..fb8c51e 100644 --- a/src/views/dataCenter/goods/Index.vue +++ b/src/views/dataCenter/goods/Index.vue @@ -101,11 +101,11 @@
- - 全部 - 出售中 - 已下架 - 已售罄 + + 全部 + 在售 + 停售 + 无货
创建商品 @@ -146,6 +146,11 @@ 商品图片 + + + {{ text }} +

{{ text }}

+

{{ - text == 0 ? '已下架' : text == 1 ? '出售中' : '已售罄' + text == 0 ? '停售' : text == 1 ? '在售' : '无货' }}

编辑 - 复制 - 下架 + + 下架 上架 + 复制 删除
@@ -200,7 +206,7 @@ const columns = [ { title: '商品名称', dataIndex: 'goods_name', - width: '270px', + width: '250px', scopedSlots: { customRender: 'goods_name' }, }, { @@ -236,7 +242,7 @@ const columns = [ }, { title: '添加时间', - width: '180px', + width: '150px', dataIndex: 'create_time', sorter: true, }, @@ -262,7 +268,7 @@ export default { categoryListTree: [], // 查询参数 queryParam: { - listType: 'all', + is_sale: '', channel: '', is_self: '', is_pool: '', @@ -321,7 +327,7 @@ export default { { name: '在售', val: 1 }, // { name: '无货', val: 2 }, ], - is_sale:0, + is_sale: 0, categoryIds: [], } }, @@ -330,7 +336,7 @@ export default { // 默认的查询参数 if (this.$route.query.listType) { - this.queryParam.listType = this.$route.query.listType + this.queryParam.is_sale = '' } // 获取商品分类列表 this.getCategoryList() @@ -344,6 +350,22 @@ export default { }, }, methods: { + // 复制 + handleCopy(val) { + let that = this + if (val) { + that.$copyText(val).then( + function (e) { + that.$message.success('复制成功', 1.5) + }, + function (e) { + that.$message.fail('复制失败', 1.5) + } + ) + } else { + that.$message.warn('没有商品编码', 1.5) + } + }, // 选中项发生变化时的回调 onSelectChange(selectedRowKeys) { this.selectedRowKeys = selectedRowKeys @@ -351,7 +373,7 @@ export default { // 切换tab handleTabs(e) { - this.queryParam.listType = e.target.value + this.queryParam.is_sale = e.target.value this.handleRefresh(true) }, @@ -400,7 +422,7 @@ export default { list.forEach((item) => { categoryId.push(item.value) }) - this.queryParam.categoryId=categoryId.join(',') + this.queryParam.categoryId = categoryId.join(',') }, // 获取分类列表 getCategoryList() { @@ -502,16 +524,16 @@ export default { }