support gift
This commit is contained in:
@@ -231,7 +231,8 @@ function sumProductQuantity(field: "quantity" | "fulfilledBaseQuantity"): string
|
||||
function getProductText(item: NonNullable<SalesOrder["itemList"]>[number]): string {
|
||||
const quantity = getPackageQuantityText(item.quantity);
|
||||
const skuText = getProductSkuSnapshotText(item.productNameSnapshot, item.skuNameSnapshot, item.specSummarySnapshot);
|
||||
return `${item.productNameSnapshot || "未命名产品"}${skuText ? ` · ${skuText}` : ""} × ${quantity}${item.unitSnapshot ? ` ${item.unitSnapshot}` : ""}`;
|
||||
const giftText = item.gifted ? "赠送 · " : "";
|
||||
return `${giftText}${item.productNameSnapshot || "未命名产品"}${skuText ? ` · ${skuText}` : ""} × ${quantity}${item.unitSnapshot ? ` ${item.unitSnapshot}` : ""}`;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user