From 2d33dae53bf529348b51ffef03593720f287c543 Mon Sep 17 00:00:00 2001 From: fanfan Date: Fri, 6 Sep 2024 20:18:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modal/GoodsModal/GoodsModal.vue | 16 +++++++++--- src/views/goods/modules/MultiSpec.vue | 25 +++++++++++++++++-- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/src/components/Modal/GoodsModal/GoodsModal.vue b/src/components/Modal/GoodsModal/GoodsModal.vue index 7d40d47..714a0e3 100644 --- a/src/components/Modal/GoodsModal/GoodsModal.vue +++ b/src/components/Modal/GoodsModal/GoodsModal.vue @@ -52,6 +52,11 @@ /> + +

+ {{ text == 10 ? '单规格' : '多规格' }} +

+
{{ text == 10 ? '上架' : '下架' }} @@ -77,6 +82,11 @@ const columns = [ width: '335px', scopedSlots: { customRender: 'item' }, }, + { + title: '规格类型', + dataIndex: 'spec_type', + scopedSlots: { customRender: 'spec_type' }, + }, { title: '商品价格', dataIndex: 'goods_price_min', @@ -120,8 +130,8 @@ export default { searchForm: this.$form.createForm(this), // 查询参数 queryParam: {}, - queryNew:{ - channel: 'zy', + queryNew: { + channel: 'zy', status: 10, }, // table表头 @@ -129,7 +139,7 @@ export default { // 加载数据方法 必须为 Promise 对象 loadData: (param) => { this.queryNew = this.source == 1 ? this.queryNew : {} - return GoodsApi.list({ ...param, ...this.queryParam,...this.queryNew }).then((response) => { + return GoodsApi.list({ ...param, ...this.queryParam, ...this.queryNew }).then((response) => { return response.data.list }) }, diff --git a/src/views/goods/modules/MultiSpec.vue b/src/views/goods/modules/MultiSpec.vue index c46bac2..6043c59 100644 --- a/src/views/goods/modules/MultiSpec.vue +++ b/src/views/goods/modules/MultiSpec.vue @@ -121,9 +121,11 @@ @@ -183,6 +185,25 @@ export default { this.getData() }, methods: { + handleEdit(item) { + const routeData = this.$router.resolve({ + path: '/goods/update', + query: { + goodsId: item.goods_id, + }, + }) + window.open(routeData.href, '_blank') + }, + handleCancel(index, item) { + for (let key in this.multiSpecData.skuList[index]) { + if (this.multiSpecData.skuList[index].hasOwnProperty(key)) { + this.multiSpecData.skuList[index][key] = '' + } + } + this.multiSpecData.skuList[index].spec_value_0 = item.spec_value_0 + this.multiSpecData.skuList[index].tempId = item.tempId + this.multiSpecData.skuList[index].skuKeys = item.skuKeys + }, // 获取规格及SKU信息(展示) getData() { const { defaultSpecList, defaultSkuList } = this