diff --git a/web-admin/src/utils/pl-delivery-slip-template.ts b/web-admin/src/utils/pl-delivery-slip-template.ts
index 17b1c07f1..67156441a 100644
--- a/web-admin/src/utils/pl-delivery-slip-template.ts
+++ b/web-admin/src/utils/pl-delivery-slip-template.ts
@@ -168,11 +168,31 @@ function formatDeliverySlipProductGridCellContent(content: string): string {
return plain || ' '
}
+/** 空白单据物料空行数(与分装单最小行数对齐) */
+export const BLANK_SLIP_PRODUCT_MIN_ROWS = 5
+
+function buildBlankDeliveryProductRow(): string {
+ const cells = Array.from({ length: 8 })
+ .map(
+ () =>
+ `
| `
+ )
+ .join('\n ')
+ return `\n ${cells}\n
`
+}
+
function buildProductRows(
products: PlanProduct[] = [],
planNo = '',
- ctx?: DeliverySlipRenderContext
+ ctx?: DeliverySlipRenderContext,
+ options?: { blank?: boolean }
): string {
+ if (options?.blank) {
+ return Array.from({ length: BLANK_SLIP_PRODUCT_MIN_ROWS })
+ .map(() => buildBlankDeliveryProductRow())
+ .join('')
+ }
+
if (!products.length) {
return `| 暂无产品信息 |
`
}
@@ -449,7 +469,7 @@ export const DELIVERY_SLIP_PRINT_CSS = `
min-height: 0 !important;
height: auto !important;
}
-.delivery-slip-doc .delivery-slip-seal-block img[alt="印章"] {
+.delivery-slip-doc .delivery-slip-seal-block .delivery-slip-seal-img {
position: absolute !important;
right: 4px !important;
top: ${DELIVERY_SLIP_SEAL_TOP}px !important;
@@ -571,7 +591,7 @@ export const DELIVERY_SLIP_STYLE_BLOCK = `