From 3b922839a1583e01dc038b9f61bf22db285dfea2 Mon Sep 17 00:00:00 2001 From: Chopper Date: Tue, 22 Jun 2021 14:59:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=B1=95=E7=A4=BA=E6=90=9C=E7=B4=A2=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=8C=E5=B1=95=E7=A4=BA=E5=95=86=E5=93=81=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/src/views/goods/goods-info/goods.vue | 21 ++++++ seller/src/views/goods/goods-seller/goods.vue | 69 ++++++++++++------- 2 files changed, 67 insertions(+), 23 deletions(-) diff --git a/manager/src/views/goods/goods-info/goods.vue b/manager/src/views/goods/goods-info/goods.vue index d46ce5e8..21271b7e 100644 --- a/manager/src/views/goods/goods-info/goods.vue +++ b/manager/src/views/goods/goods-info/goods.vue @@ -38,6 +38,12 @@ + + + @@ -132,6 +138,7 @@ export default { pageSize: 10, // 页面大小 sort: "create_time", // 默认排序字段 order: "desc", // 默认排序方式 + goodsType: "", // 商品类型 }, underForm: { // 下架原因 reason: "", @@ -174,6 +181,20 @@ export default { ); }, }, + { + title: "商品类型", + key: "goodsType", + width: 130, + render: (h, params) => { + if (params.row.goodsType === 'PHYSICAL_GOODS') { + return h("div", "实物商品"); + } else if (params.row.goodsType === 'VIRTUAL_GOODS') { + return h("div", "虚拟商品"); + } else { + return h("div", "电子卡券"); + } + }, + }, { title: "状态", key: "marketEnable", diff --git a/seller/src/views/goods/goods-seller/goods.vue b/seller/src/views/goods/goods-seller/goods.vue index c20f5c3e..df95601d 100644 --- a/seller/src/views/goods/goods-seller/goods.vue +++ b/seller/src/views/goods/goods-seller/goods.vue @@ -4,7 +4,7 @@
- + + + + - + @@ -45,11 +51,12 @@
- +
@@ -60,13 +67,14 @@ - + - +
@@ -78,7 +86,8 @@ - + 卖家承担运费 @@ -245,6 +254,20 @@ export default { ); }, }, + { + title: "商品类型", + key: "goodsType", + width: 130, + render: (h, params) => { + if (params.row.goodsType === 'PHYSICAL_GOODS') { + return h("div", "实物商品"); + } else if (params.row.goodsType === 'VIRTUAL_GOODS') { + return h("div", "虚拟商品"); + } else { + return h("div", "电子卡券"); + } + }, + }, { title: "商品价格", key: "price", @@ -432,10 +455,10 @@ export default { this.getDataList(); }, addGoods() { - this.$router.push({ name: "goods-operation" }); + this.$router.push({name: "goods-operation"}); }, editGoods(v) { - this.$router.push({ name: "goods-operation-edit", query: { id: v.id } }); + this.$router.push({name: "goods-operation-edit", query: {id: v.id}}); }, //批量操作 @@ -458,7 +481,7 @@ export default { } }, getStockDetail(id) { - getGoodsSkuListDataSeller({ goodsId: id, pageSize: 1000 }).then((res) => { + getGoodsSkuListDataSeller({goodsId: id, pageSize: 1000}).then((res) => { if (res.success) { this.updateStockModalVisible = true; this.stockAllUpdate = undefined; @@ -468,7 +491,7 @@ export default { }, updateStock() { let updateStockList = this.stockList.map((i) => { - let j = { skuId: i.id, quantity: i.quantity }; + let j = {skuId: i.id, quantity: i.quantity}; if (this.stockAllUpdate) { j.quantity = this.stockAllUpdate; } @@ -481,28 +504,28 @@ export default { } }); }, - changePage (v) { + changePage(v) { this.searchForm.pageNumber = v; this.getDataList(); this.clearSelectAll(); }, - changePageSize (v) { + changePageSize(v) { this.searchForm.pageSize = v; this.getDataList(); }, - handleSearch () { + handleSearch() { this.searchForm.pageNumber = 1; this.searchForm.pageSize = 10; this.getDataList(); }, - handleReset () { + handleReset() { this.searchForm = {}; this.searchForm.pageNumber = 1; this.searchForm.pageSize = 10; // 重新加载数据 this.getDataList(); }, - changeSort (e) { + changeSort(e) { this.searchForm.sort = e.key; this.searchForm.order = e.order; if (e.order === "normal") { @@ -510,15 +533,15 @@ export default { } this.getDataList(); }, - clearSelectAll () { + clearSelectAll() { this.$refs.table.selectAll(false); }, - changeSelect (e) { + changeSelect(e) { this.selectList = e; this.selectCount = e.length; }, //保存运费模板信息 - saveShipTemplate () { + saveShipTemplate() { if (this.shipTemplateForm.freightPayer == "STORE") { { this.shipTemplateForm.templateId = 0; @@ -716,10 +739,10 @@ export default { }); }, }, - mounted () { - this.init(); + mounted() { + this.init(); }, - activated () { + activated() { this.init(); }, };