fix product/sku name
This commit is contained in:
@@ -237,7 +237,7 @@ import { formatPackageAmount } from "@/utils/package";
|
||||
import { Message } from "@/utils/message";
|
||||
import { permissionCodes } from "@/utils/permission";
|
||||
import { uploadPhotoList } from "@/utils/photo";
|
||||
import { getProductPhotoURL } from "@/utils/product";
|
||||
import { getProductPhotoURL, getProductSkuSnapshotText } from "@/utils/product";
|
||||
|
||||
defineOptions({
|
||||
name: "PackagePurchase"
|
||||
@@ -407,7 +407,12 @@ const {
|
||||
|
||||
function getItemLabel(item: PackagePurchaseItem): string {
|
||||
const configItem = config.value?.itemList?.find(configItem => configItem.skuId === item.skuId && configItem.skuUnitId === item.skuUnitId);
|
||||
return configItem ? `${configItem.productNameSnapshot || "未命名产品"} · ${configItem.skuNameSnapshot || configItem.specSummarySnapshot || "默认 SKU"}` : "产品权益";
|
||||
if (!configItem) {
|
||||
return "产品权益";
|
||||
}
|
||||
const productName = configItem.productNameSnapshot || "未命名产品";
|
||||
const skuText = getProductSkuSnapshotText(productName, configItem.skuNameSnapshot, configItem.specSummarySnapshot);
|
||||
return skuText ? `${productName} · ${skuText}` : productName;
|
||||
}
|
||||
|
||||
function getItemName(item: PackagePurchaseItem): string {
|
||||
|
||||
Reference in New Issue
Block a user