fix product/sku name
This commit is contained in:
@@ -118,8 +118,9 @@
|
||||
:content="item.skuCodeSnapshot"
|
||||
/>
|
||||
<product-sku-snapshot-tags
|
||||
:product-name="item.productNameSnapshot"
|
||||
:snapshot="item.skuSpecSnapshot"
|
||||
:fallback="item.skuNameSnapshot || item.specSummarySnapshot"
|
||||
:fallback="item.specSummarySnapshot || item.skuNameSnapshot"
|
||||
:unit="item.unitSnapshot"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -92,6 +92,7 @@ import type { GaoSalesPaymentStatus, SalesOrder } from "@/types/SalesOrder";
|
||||
import { getCustomerPhotoURL } from "@/utils/customer";
|
||||
import { formatPackageAmount, getPackageQuantityText } from "@/utils/package";
|
||||
import { getSalesOrderStatusText, getSalesOrderTypeText, getSalesPaymentStatusText, getStatusTheme } from "@/utils/salesOrder";
|
||||
import { getProductSkuSnapshotText } from "@/utils/product";
|
||||
|
||||
defineOptions({ name: "SalesOrderListCell" });
|
||||
|
||||
@@ -143,7 +144,7 @@ function sumProductQuantity(field: "quantity" | "fulfilledQuantity"): string {
|
||||
}
|
||||
|
||||
function getProductText(item: NonNullable<SalesOrder["itemList"]>[number]): string {
|
||||
const skuText = item.skuNameSnapshot || item.specSummarySnapshot;
|
||||
const skuText = getProductSkuSnapshotText(item.productNameSnapshot, item.skuNameSnapshot, item.specSummarySnapshot);
|
||||
return `${item.productNameSnapshot || "未命名产品"}${skuText ? ` · ${skuText}` : ""}${item.unitSnapshot ? ` / ${item.unitSnapshot}` : ""}`;
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user