Commit d76579f5 by 萱草

update: 实物礼品无sku时优化

parent ef1bf296
......@@ -397,7 +397,7 @@ export default {
deliveryType: [], // 配送方式 1物流发货 2门店自提 3文本券码
stockUseType: '', // 库存使用类型(0:占用,1:动态 , 2占用+动态)
deliveryList: [],
costPrice: undefined,
costPrice: 0,
stock: undefined,
giftNo: '',
giftBarNo: ''
......@@ -447,8 +447,8 @@ export default {
maxlength: 5, // 图片数量 默认 5
image: [],
// 规格值图片上传
// uploadAction: window.location.origin + '/api-marketing/upload/upload-image?requestProject=marketing',
uploadAction: 'https://four.gicdev.com/api-marketing/upload/upload-image?requestProject=marketing',
uploadAction: window.location.origin + '/welfare/upload/upload-image',
// uploadAction: 'https://four.gicdev.com/welfare/upload/upload-image',
openStorePick: 0,
btnLoading: false,
loading: false,
......@@ -617,22 +617,24 @@ export default {
this.goodsStandardInfo = resResult.giftSpecInfo ? JSON.parse(resResult.giftSpecInfo) : []; // 礼品规格信息
let skuList = resResult.skuList || []; // 礼品规格值信息
if(skuList.length > 1){
let arr2 = [];
for(let key1 in skuList){
arr2.push(skuList[key1].giftSkuCostPrice);
}
let max = Math.max.apply(null, arr2);
let min = Math.min.apply(null, arr2);
if(max === min){
this.goodsForm.costPrice = min;
}else{
this.goodsForm.costPrice = min + '~' + max;
if(this.goodsStandardInfo.length > 0){
if(skuList.length > 1){
let arr2 = [];
for(let key1 in skuList){
arr2.push(skuList[key1].giftSkuCostPrice);
}
let max = Math.max.apply(null, arr2);
let min = Math.min.apply(null, arr2);
if(max === min){
this.goodsForm.costPrice = min;
}else{
this.goodsForm.costPrice = min + '~' + max;
}
}else if(skuList.length === 1){
this.goodsForm.costPrice = skuList[0].giftSkuCostPrice;
}else if(skuList.length === 0){
this.goodsForm.costPrice = resResult.costPrice;
}
}else if(skuList.length === 1){
this.goodsForm.costPrice = skuList[0].giftSkuCostPrice;
}else if(skuList.length === 0){
this.goodsForm.costPrice = resResult.costPrice;
}
let mapData = [];
let skuSellObj = {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment