From 3fee32805d9fd7ddb800b709d7d276464c1a9747 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Thu, 18 Jan 2024 10:38:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/product/addGood/addGood_supply.vue | 26 ++++++++++++++++--- .../addGood/components/price_supply.vue | 2 +- pages/product/goodsOnSale/index.vue | 1 + pages/product/list/index.vue | 4 ++- 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/pages/product/addGood/addGood_supply.vue b/pages/product/addGood/addGood_supply.vue index b8a6454..4fe76b3 100644 --- a/pages/product/addGood/addGood_supply.vue +++ b/pages/product/addGood/addGood_supply.vue @@ -107,11 +107,11 @@ - + - @@ -229,6 +229,8 @@ }, data() { return { + tips1: '提供给B端商户', + tips2: '提供给C端用户', bar_code_dis: false, merId: '', //商户id product_id: '', //商品id @@ -417,6 +419,23 @@ if (res.data.content && typeof res.data.content == 'string') res.data.content = JSON.parse(res.data .content); this.setFormData.once_min_count <= 0 ? this.setFormData.once_min_count = '' : null; + if(res.data.attr.length==1&&res.data.attr[0].value=='单位'&&res.data.attr[0].detail.length==2){ // 供应链默认规格时页面改成默认规格 + this.setFormData.spec_type = 0; + } + if(res.data.attr.length==1&&res.data.attr[0].value=='单位'){ + if(res.data.attrValue[0].sku=='件'||res.data.attrValue[1].sku=='个') { + this.tips1 = '提供给B端商户'; + this.tips2 = '提供给C端用户'; + } + else if(res.data.attrValue[0].sku=='个'||res.data.attrValue[1].sku=='件') { + this.tips1 = '提供给C端用户'; + this.tips2 = '提供给B端商户'; + } + else { + this.tips1 = ''; + this.tips2 = ''; + } + } //向组件注入数据 this.$nextTick(() => { this.$refs.commodityRef.setDatas({ @@ -435,6 +454,7 @@ // 默认规格 if (this.setFormData.spec_type == 0) { this.$refs.priceRef.setDatas(res.data.attrValue[0]); + this.$refs.priceRef2.setDatas(res.data.attrValue[1]); } }) editGoodsDetils.temp && (this.setFormData.tempName = editGoodsDetils.temp.name); diff --git a/pages/product/addGood/components/price_supply.vue b/pages/product/addGood/components/price_supply.vue index b0e37c2..b53315a 100644 --- a/pages/product/addGood/components/price_supply.vue +++ b/pages/product/addGood/components/price_supply.vue @@ -149,8 +149,8 @@ this.singleSpecification[key] = this.$props.datas[key] }) } - this.singleSpecification.sku = this.$props.sku + ''; console.log(this.singleSpecification.sku); + if(!this.singleSpecification.sku) this.singleSpecification.sku = this.$props.sku + ''; let userInfo = this.$store.state.app.userInfo; if(typeof userInfo == 'string') userInfo = JSON.parse(userInfo); diff --git a/pages/product/goodsOnSale/index.vue b/pages/product/goodsOnSale/index.vue index 4297298..5caf0a9 100644 --- a/pages/product/goodsOnSale/index.vue +++ b/pages/product/goodsOnSale/index.vue @@ -63,6 +63,7 @@ 恢复 编辑 + 编辑 编辑 diff --git a/pages/product/list/index.vue b/pages/product/list/index.vue index c1ff1ff..e6b68a0 100644 --- a/pages/product/list/index.vue +++ b/pages/product/list/index.vue @@ -711,7 +711,9 @@ // removeStorage(item); // } // }); - let url = this.mer_info.type_code=='PersonalStore' ? '/pages/product/addGood/addGood_one' : '/pages/product/addGood/addGood'; + let url = '/pages/product/addGood/addGood'; + if(this.mer_info.type_code=='PersonalStore') url = '/pages/product/addGood/addGood_one'; + if(this.mer_info.type_code=='TypeSupplyChain') url = '/pages/product/addGood/addGood_supply'; navigateTo(1, url, { mer_id: item.mer_id, product_id: item.product_id