This commit is contained in:
weipengfei 2024-01-18 10:38:28 +08:00
parent ef08827f7d
commit 3fee32805d
4 changed files with 28 additions and 5 deletions

View File

@ -107,11 +107,11 @@
<u-modal :show="showSpecType" title="温馨提示" content="切换后商品原有规格将失效,是否继续?" show-cancel-button confirm-text="继续"
@confirm="changeSpecType2" @cancel="showSpecType=false"></u-modal>
</picker>
<priceComponent v-if="setFormData.spec_type==0" :datas="setFormData.attrValue[0]" ref="priceRef"
:product_id="product_id" :bar_code="code" tips="提供给B端商户" :sku="'件'" @updateCode="updateCode">
<priceComponent v-if="setFormData.spec_type==0" :tips="tips1" :datas="setFormData.attrValue[0]" ref="priceRef"
:product_id="product_id" :bar_code="code" :sku="'件'" @updateCode="updateCode">
</priceComponent>
<view style="height: 1rpx;"></view>
<priceComponent v-if="setFormData.spec_type==0" tips="提供给C端用户" :datas="setFormData.attrValue[1]" ref="priceRef2"
<priceComponent v-if="setFormData.spec_type==0" :tips="tips2" :datas="setFormData.attrValue[1]" ref="priceRef2"
:product_id="product_id" :bar_code="code" :sku="'个'" @updateCode="updateCode">
</priceComponent>
<view v-else class="popup_group" style="margin-top: 0;border-top: 1rpx solid #eeeeee;">
@ -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);

View File

@ -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);

View File

@ -63,6 +63,7 @@
<view class="shop_button" v-if="type == 5" @click="reduction(item, index)">恢复</view>
<block v-if="type != 5">
<navigator v-if="mer_info.type_code=='PersonalStore'" :url="`/pages/product/addGood/addGood_one?mer_id=${merId}&product_id=${item.product_id}`" class="shop_button" hover-class="none">编辑</navigator>
<navigator v-else-if="mer_info.type_code=='TypeSupplyChain'" :url="`/pages/product/addGood/addGood_supply?mer_id=${merId}&product_id=${item.product_id}`" class="shop_button" hover-class="none">编辑</navigator>
<navigator v-else :url="`/pages/product/addGood/addGood?mer_id=${merId}&product_id=${item.product_id}`" class="shop_button" hover-class="none">编辑</navigator>
</block>
</view>

View File

@ -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