|
@@ -1,4 +1,6 @@
|
|
|
import type { Plan, PlanProduct } from '@/api/pl'
|
|
import type { Plan, PlanProduct } from '@/api/pl'
|
|
|
|
|
+import type { SlipPlanProduct } from '@/utils/pl-batch-print'
|
|
|
|
|
+import { formatRemarkForSlipHtml } from '@/utils/pl-batch-print'
|
|
|
import { applyPdfStableTableCellBorders } from '@/utils/pl-slip-pdf-render'
|
|
import { applyPdfStableTableCellBorders } from '@/utils/pl-slip-pdf-render'
|
|
|
|
|
|
|
|
/** 送(提)货单打印默认公司信息(可在富文本中修改) */
|
|
/** 送(提)货单打印默认公司信息(可在富文本中修改) */
|
|
@@ -175,10 +177,10 @@ function buildProductRows(
|
|
|
return `<tr><td class="delivery-slip-product-cell" colspan="8" style="${PRODUCT_CELL}">暂无产品信息</td></tr>`
|
|
return `<tr><td class="delivery-slip-product-cell" colspan="8" style="${PRODUCT_CELL}">暂无产品信息</td></tr>`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const planNoText = formatDeliverySlipProductGridCellContent(planNo)
|
|
|
|
|
-
|
|
|
|
|
const dataRows = products
|
|
const dataRows = products
|
|
|
.map((product) => {
|
|
.map((product) => {
|
|
|
|
|
+ const rowPlanNo = (product as SlipPlanProduct).slipPlanNo || planNo
|
|
|
|
|
+ const planNoText = formatDeliverySlipProductGridCellContent(rowPlanNo)
|
|
|
const qty = product.outboundQty ?? product.outboundEstimateQty ?? product.quantity ?? ''
|
|
const qty = product.outboundQty ?? product.outboundEstimateQty ?? product.quantity ?? ''
|
|
|
return `<tr>
|
|
return `<tr>
|
|
|
<td class="delivery-slip-product-cell delivery-slip-product-grid-cell" style="${PRODUCT_GRID_CELL}">${planNoText}</td>
|
|
<td class="delivery-slip-product-cell delivery-slip-product-grid-cell" style="${PRODUCT_GRID_CELL}">${planNoText}</td>
|
|
@@ -1800,7 +1802,7 @@ export function replaceDeliverySlipPlaceholders(
|
|
|
'{{driverInfo}}': '',
|
|
'{{driverInfo}}': '',
|
|
|
'{{planDateChinese}}': formatPlanDateChinese(plan.planDate),
|
|
'{{planDateChinese}}': formatPlanDateChinese(plan.planDate),
|
|
|
'{{productTable}}': buildProductRows(plan.products, plan.planNo || '', ctx),
|
|
'{{productTable}}': buildProductRows(plan.products, plan.planNo || '', ctx),
|
|
|
- '{{remark}}': plan.remark || '',
|
|
|
|
|
|
|
+ '{{remark}}': formatRemarkForSlipHtml(plan.remark),
|
|
|
'{{companyAddress}}': DELIVERY_SLIP_DEFAULTS.companyAddress,
|
|
'{{companyAddress}}': DELIVERY_SLIP_DEFAULTS.companyAddress,
|
|
|
'{{companyPhone}}': DELIVERY_SLIP_DEFAULTS.companyPhone,
|
|
'{{companyPhone}}': DELIVERY_SLIP_DEFAULTS.companyPhone,
|
|
|
'{{contactPhone}}': DELIVERY_SLIP_DEFAULTS.contactPhone,
|
|
'{{contactPhone}}': DELIVERY_SLIP_DEFAULTS.contactPhone,
|