Commit 6fb9a32e by 前端

Merge branch 'SAAS+V4.53.0-0528' into 'develop'

上线合并

See merge request !395
2 parents 893bbf9b d19f6831
...@@ -85,7 +85,7 @@ Component({ ...@@ -85,7 +85,7 @@ Component({
strTemp strTemp
} = this.data; } = this.data;
let result = goodsList[index].multipleSpecificationsGoods.specificationList.every(item => item.value) let result = goodsList[index].multipleSpecificationsGoods.specificationList.every(item => item.value)
console.log(result, goodsList[index],1) console.log(result, goodsList[index], 1)
if (result) { if (result) {
if (!cancel) { if (!cancel) {
...@@ -99,16 +99,16 @@ Component({ ...@@ -99,16 +99,16 @@ Component({
// if (type && str != strTemp) { // if (type && str != strTemp) {
//获取该规格的商品是否存在 //获取该规格的商品是否存在
console.log(str) console.log(str)
if( goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]){ if (goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]) {
goodsList[index].active = true goodsList[index].active = true
console.log(goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str],'str') console.log(goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str], 'str')
goodsList[index].multipleSpecificationsGoods.goods = goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str] goodsList[index].multipleSpecificationsGoods.goods = goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]
goodsList[index].multipleSpecificationsGoods.goods.goodsId = goodsList[index].multipleSpecificationsGoods.goods.merchantGoodsId goodsList[index].multipleSpecificationsGoods.goods.goodsId = goodsList[index].multipleSpecificationsGoods.goods.merchantGoodsId
goodsList[index].multipleSpecificationsGoods.goods.specificationStr = goodsList[index].multipleSpecificationsGoods.goods.specificationData.replace(/;~;/g, '/') goodsList[index].multipleSpecificationsGoods.goods.specificationStr = goodsList[index].multipleSpecificationsGoods.goods.specificationData.replace(/;~;/g, '/')
}else{ } else {
console.log(88888) console.log(88888)
wx.$util.showToast('暂无该规格商品') wx.$util.showToast('暂无该规格商品')
goodsList[index].active=false goodsList[index].active = false
goodsList[index].multipleSpecificationsGoods.goods = '' goodsList[index].multipleSpecificationsGoods.goods = ''
goodsList[index].multipleSpecificationsGoods.specificationList.forEach(item => { goodsList[index].multipleSpecificationsGoods.specificationList.forEach(item => {
item.value = '' item.value = ''
...@@ -122,9 +122,9 @@ Component({ ...@@ -122,9 +122,9 @@ Component({
//同步更新 //同步更新
this.synchronousChange(goodsList[index]) this.synchronousChange(goodsList[index])
}) })
}else{ } else {
if(goodsList[index].active){ if (goodsList[index].active) {
goodsList[index].active=false goodsList[index].active = false
goodsList[index].multipleSpecificationsGoods.goods = '' goodsList[index].multipleSpecificationsGoods.goods = ''
goodsList[index].multipleSpecificationsGoods.specificationList.forEach(item => { goodsList[index].multipleSpecificationsGoods.specificationList.forEach(item => {
item.value = '' item.value = ''
...@@ -132,7 +132,7 @@ Component({ ...@@ -132,7 +132,7 @@ Component({
console.log(33333, goodsList) console.log(33333, goodsList)
this.setData({ this.setData({
goodsList goodsList
},()=>{ }, () => {
this.synchronousChange(goodsList[index]) this.synchronousChange(goodsList[index])
}) })
} }
...@@ -150,7 +150,7 @@ Component({ ...@@ -150,7 +150,7 @@ Component({
goodsData goodsData
// recordList // recordList
} = this.data } = this.data
console.log(chooseGoodsList, goodsList,goodsData, 'goodsList') console.log(chooseGoodsList, goodsList, goodsData, 'goodsList')
let chooseList = []; let chooseList = [];
goodsData.map((e) => { goodsData.map((e) => {
if (e.active) { if (e.active) {
...@@ -359,7 +359,7 @@ Component({ ...@@ -359,7 +359,7 @@ Component({
} = this.data; } = this.data;
//单独处理多规格商品点击事件 //单独处理多规格商品点击事件
if (item.goodsFlag == 2) { if (item.goodsFlag == 2) {
if (!this.watchAllChose(ind,true)) { if (!this.watchAllChose(ind, true)) {
wx.$util.showToast('请先选择该商品规格') wx.$util.showToast('请先选择该商品规格')
return return
} }
...@@ -386,18 +386,18 @@ Component({ ...@@ -386,18 +386,18 @@ Component({
if (i.goodsFlag == 1 && item.goods) { if (i.goodsFlag == 1 && item.goods) {
if (i.goods.goodsId == item.goods.goodsId) { if (i.goods.goodsId == item.goods.goodsId) {
i.active = item.active i.active = item.active
i.count = item.count i.count = item.count || 1
i.goods.sellPrice = item.goods.sellPrice i.goods.sellPrice = item.goods.sellPrice
} }
} else if (i.goodsFlag == 2 &&item.goodsFlag==2) { } else if (i.goodsFlag == 2 && item.goodsFlag == 2) {
if(i.multipleSpecificationsGoods.id==item.multipleSpecificationsGoods.id){ if (i.multipleSpecificationsGoods.id == item.multipleSpecificationsGoods.id) {
i.active = item.active i.active = item.active
i.count = item.count i.count = item.count || 1
i.multipleSpecificationsGoods=item.multipleSpecificationsGoods i.multipleSpecificationsGoods = item.multipleSpecificationsGoods
if(!item.active){ if (!item.active) {
i.multipleSpecificationsGoods.goods='' i.multipleSpecificationsGoods.goods = ''
i.multipleSpecificationsGoods.specificationList.forEach(m=>{ i.multipleSpecificationsGoods.specificationList.forEach(m => {
m.value='' m.value = ''
}) })
} }
...@@ -423,7 +423,7 @@ Component({ ...@@ -423,7 +423,7 @@ Component({
console.log(target) console.log(target)
this.setData({ this.setData({
[target]: item.count, [target]: item.count,
},()=>{ }, () => {
this.synchronousChange(this.data.goodsList[ind]) this.synchronousChange(this.data.goodsList[ind])
}); });
...@@ -443,7 +443,7 @@ Component({ ...@@ -443,7 +443,7 @@ Component({
this.setData({ this.setData({
[target]: Number(value), [target]: Number(value),
}, },
()=>{ () => {
this.synchronousChange(this.data.goodsList[ind]) this.synchronousChange(this.data.goodsList[ind])
} }
); );
......
...@@ -1533,6 +1533,7 @@ Page({ ...@@ -1533,6 +1533,7 @@ Page({
this.setGoodsTotal(chooseList); this.setGoodsTotal(chooseList);
}, },
handleSpecificationsEcho(item) { handleSpecificationsEcho(item) {
console.log(item)
let { let {
otherProduct otherProduct
} = this.data, } = this.data,
...@@ -1556,6 +1557,7 @@ Page({ ...@@ -1556,6 +1557,7 @@ Page({
goods: { goods: {
...tempData, ...tempData,
price: item.price, price: item.price,
sellPrice: item.price,
goodsId: item.goodsId, goodsId: item.goodsId,
specificationStr: item.specificationData.replace(/;~;/g, '/') specificationStr: item.specificationData.replace(/;~;/g, '/')
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!