Commit d93f6aa8 by Jaxon

fix(商品上架): 使用商品别名作为回显名称并修正商品唯一标识

- 在升级商品和套餐商品列表中,优先使用商品别名作为显示名称,提升可读性
- 将特殊品类配置中的商品唯一标识从 upgradeGoodsId 改为 merchantGoodsCode
- 确保商品选择器使用一致的标识字段,避免数据混淆
1 parent d54c83e6
......@@ -51,11 +51,11 @@
})
}"
:field-name="{
value: 'upgradeGoodsId',
value: 'merchantGoodsCode',
label: 'upgradeGoodsName',
}"
placeholder="请选择商品"
value-key="upgradeGoodsId">
value-key="merchantGoodsCode">
</RemoteSelect>
<RemoteSelect v-if="form.categoryType === 3"
ref="packageGoods"
......@@ -390,7 +390,7 @@ export default {
});
if (isImmediate) {
result.list.push(...this.form.goodsTypeGroupRelationList);
result.list = uniqBy(result.list, "upgradeGoodsId");
result.list = uniqBy(result.list, "merchantGoodsCode");
}
return result;
},
......
......@@ -53,11 +53,11 @@
})
}"
:field-name="{
value: 'upgradeGoodsId',
value: 'merchantGoodsCode',
label: 'upgradeGoodsName',
}"
placeholder="请选择商品"
value-key="upgradeGoodsId">
value-key="merchantGoodsCode">
</RemoteSelect>
<RemoteSelect v-if="form.categoryType === 3"
ref="packageGoods"
......@@ -287,7 +287,7 @@ export default {
});
if (isImmediate) {
result.list.push(...this.form.goodsTypeGroupRelationList);
result.list = uniqBy(result.list, "upgradeGoodsId");
result.list = uniqBy(result.list, "merchantGoodsCode");
}
return result;
},
......
......@@ -27,7 +27,7 @@ export async function fetchUpgradeGoodsListHook({ businessCode, selectedUpgradeG
return {
list: list.map(item => ({
upgradeGoodsId: item.upgradeGoodsId,
upgradeGoodsName: item.upgradeGoodsName,
upgradeGoodsName: item.goodsAlias || item.upgradeGoodsName,
merchantGoodsCode: item.merchantGoodsCode,
disabled: selectedUpgradeGoods.includes(item.upgradeGoodsId),
upgradeCommodityCode: item.upgradeCommodityCode,
......@@ -51,7 +51,7 @@ export async function fetchPackagesGoodsListHook({ businessCode, selectedPackage
list: res.list.map(item => ({
packageCode: item.packageCode,
disabled: selectedPackageGoods.includes(item.packageCode),
packageName: item.productName,
packageName: item.packageAlias || item.productName,
})),
query: pageQuery,
};
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!