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(); }, };