Commit 4c705e0e by Jaxon

fix(商品上架): 修正特殊品类配置中商品禁用逻辑和保存函数调用

修复特殊品类配置中已选商品的禁用判断逻辑,将比较的ID字段从 upgradeGoodsId 统一改为 merchantGoodsCode,确保禁用状态正确显示。同时修复保存按钮的函数调用方式,补充了函数调用括号。
1 parent f81b5e59
......@@ -380,9 +380,10 @@ export default {
categoryType: 2,
businessCode: this.businessCode,
});
this.options.selectedUpgradeGoods = selectedGoods.map(item => item.upgradeGoodsId);
this.options.selectedUpgradeGoods = selectedGoods.map(item => item.merchantGoodsCode);
}
console.log("selectedUpgradeGoods", this.options.selectedUpgradeGoods);
const result = await fetchUpgradeGoodsListHook({
pageQuery,
selectedUpgradeGoods: this.options.selectedUpgradeGoods,
......
......@@ -277,7 +277,7 @@ export default {
categoryType: 2,
businessCode: this.businessCode,
});
this.options.selectedUpgradeGoods = selectedGoods.map(item => item.upgradeGoodsId);
this.options.selectedUpgradeGoods = selectedGoods.map(item => item.merchantGoodsCode);
}
const result = await fetchUpgradeGoodsListHook({
......
......@@ -105,7 +105,7 @@
<el-button style="width:160px"
type="primary"
size="small"
@click="saveEdit">
@click="saveEdit()">
保存
</el-button>
</div>
......
......@@ -29,7 +29,7 @@ export async function fetchUpgradeGoodsListHook({ businessCode, selectedUpgradeG
upgradeGoodsId: item.upgradeGoodsId,
upgradeGoodsName: item.goodsAlias || item.upgradeGoodsName,
merchantGoodsCode: item.merchantGoodsCode,
disabled: selectedUpgradeGoods.includes(item.upgradeGoodsId),
disabled: selectedUpgradeGoods.includes(item.merchantGoodsCode),
upgradeCommodityCode: item.upgradeCommodityCode,
})),
query: pageQuery,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!