main
fanfan 3 months ago
parent eef3a7d977
commit 971cca08f9
  1. 21
      src/views/goods/modules/MultiSpec.vue

@ -312,7 +312,6 @@ export default {
}, },
async handleSelectGoods(goodsId, item, index) { async handleSelectGoods(goodsId, item, index) {
console.log(index)
const skuList = this.multiSpecData.skuList const skuList = this.multiSpecData.skuList
const skuItem = skuList.find((sku) => sku.goods_id === goodsId) const skuItem = skuList.find((sku) => sku.goods_id === goodsId)
if (skuItem) { if (skuItem) {
@ -326,16 +325,16 @@ export default {
return return
} }
const sku = res.skuList[index] const sku = res.skuList[0]
this.multiSpecData.skuList[index].goods_price = sku.goods_price item.goods_price = sku.goods_price
this.multiSpecData.skuList[index].cost_price = sku.cost_price item.cost_price = sku.cost_price
this.multiSpecData.skuList[index].stock_num = sku.stock_num item.stock_num = sku.stock_num
this.multiSpecData.skuList[index].goods_weight = sku.goods_weight item.goods_weight = sku.goods_weight
this.multiSpecData.skuList[index].goods_sku_no = sku.goods_sku_no item.goods_sku_no = sku.goods_sku_no
this.multiSpecData.skuList[index].goods_name = res.goods_name item.goods_name = res.goods_name
this.multiSpecData.skuList[index].goods_id = res.goods_id item.goods_id = res.goods_id
this.multiSpecData.skuList[index].goods_image = res.goods_image item.goods_image = res.goods_image
this.multiSpecData.skuList[index].goods_price_min = res.goods_price_min item.goods_price_min = res.goods_price_min
}) })
}, },

Loading…
Cancel
Save