多规格生成问题

master
wangdong 3 months ago
parent 0404a3f359
commit 8f51b58ad1
  1. 2
      src/common/model/goods/MultiSpec.js
  2. 9
      src/views/goods/modules/MultiSpec.vue

@ -230,7 +230,7 @@ export default class MultiSpec {
oldSkuItem = oldSkuList.find( oldSkuItem = oldSkuList.find(
(item) => (item) =>
newSkuList[index].tempId === newSkuList[index].tempId ===
(item.goods_props && item.goods_props.length > 0) ? item.goods_props.map((v) => v.value.name).join('_') : item.tempId ((item.goods_props && item.goods_props.length > 0) ? item.goods_props.map((v) => v.value.name).join('_') : item.tempId)
) )
// } // }

@ -320,15 +320,6 @@ export default {
this.$message.error('一个商品只能选择一次', 2) this.$message.error('一个商品只能选择一次', 2)
return return
} }
if (!goodsId) {
item.goods_price = '';
item.cost_price = '';
item.stock_num = '';
item.goods_weight = '';
item.goods_sku_no = '';
item.goods_id = '';
return false;
}
this.getGoodsDetail(goodsId).then((res) => { this.getGoodsDetail(goodsId).then((res) => {
const queryGoodsId = this.$route.query.goodsId const queryGoodsId = this.$route.query.goodsId
if (res.spec_type === 20 && queryGoodsId !== goodsId) { if (res.spec_type === 20 && queryGoodsId !== goodsId) {

Loading…
Cancel
Save