提交
This commit is contained in:
1 parent
6d9354a194
commit
aff71d296b
2759 files changed
+860425
-13211
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import type { Plan, PlanProduct } from '@/api/pl'
|
||||
import { applyPdfStableTableCellBorders } from '@/utils/pl-slip-pdf-render'
|
||||
|
||||
/** 送(提)货单打印默认公司信息(可在富文本中修改) */
|
||||
export const DELIVERY_SLIP_DEFAULTS = {
|
||||
@@ -47,9 +48,9 @@ const PRODUCT_TABLE_CELL_LEFT = `padding:10px 6px 14px 6px;border:${PRODUCT_TABL
|
||||
const PRODUCT_TERMS_CELL_LEFT = `padding:10px 6px 14px 6px;border:${PRODUCT_TABLE_BORDER} !important;text-align:left;${FONT_BODY}line-height:1.35;vertical-align:top;background-color:#fff !important;`
|
||||
const TERMS_TEXT_STYLE = 'line-height:1.35;'
|
||||
const SEAL_BLOCK_LINE_STYLE = 'line-height:1.35;'
|
||||
/** 送(提)货单印章:public/sxshzyz.png,定位在地址单元格右上角(相对原位置向上 100px) */
|
||||
/** 送(提)货单印章:public/sxshzyz.png,定位在地址单元格右上角(相对原位置向上 66px) */
|
||||
const DELIVERY_SLIP_SEAL_IMAGE_SRC = '/sxshzyz.png'
|
||||
const DELIVERY_SLIP_SEAL_TOP = -96
|
||||
const DELIVERY_SLIP_SEAL_TOP = -66
|
||||
const DELIVERY_SLIP_SEAL_IMAGE_STYLE = `position:absolute;right:4px;top:${DELIVERY_SLIP_SEAL_TOP}px;width:140px;height:140px;opacity:0.85;z-index:10;`
|
||||
const HANDWRITE_BLANK_INNER = ' '
|
||||
const HANDWRITE_BLANK = `<span class="delivery-slip-handwrite-blank">(${HANDWRITE_BLANK_INNER})</span>`
|
||||
@@ -1065,6 +1066,9 @@ export function prepareDeliverySlipPdfGridCells(root: HTMLElement): void {
|
||||
|
||||
prepareDeliverySlipPdfSignValues(root)
|
||||
prepareDeliverySlipPdfTypeCheckboxes(root)
|
||||
|
||||
// 亚像素 border 在 Windows DPI 下易变粗;截图前改为 1px 背景单线
|
||||
applyPdfStableTableCellBorders(root.querySelectorAll('.delivery-slip-product-cell'))
|
||||
}
|
||||
|
||||
/** 备注、条款、印章行:统一 0.3px 全边框(兼容已保存模板,与物料网格衔接) */
|
||||
@@ -1338,6 +1342,8 @@ function normalizeDeliverySlipDocLayout(html: string): string {
|
||||
.replace(/min-height:120px;/g, 'min-height:0;')
|
||||
.replace(/top:4px !important;/g, `top:${DELIVERY_SLIP_SEAL_TOP}px !important;`)
|
||||
.replace(/top:4px;/g, `top:${DELIVERY_SLIP_SEAL_TOP}px;`)
|
||||
.replace(/top:-96px !important;/g, `top:${DELIVERY_SLIP_SEAL_TOP}px !important;`)
|
||||
.replace(/top:-96px;/g, `top:${DELIVERY_SLIP_SEAL_TOP}px;`)
|
||||
.replace(/>日期:</g, '>日 期:<')
|
||||
.replace(/border-bottom:2px solid #000 !important;/g, `border-bottom:${INFO_UNDERLINE} !important;`)
|
||||
.replace(/border-bottom:1px solid #000 !important;/g, `border-bottom:${INFO_UNDERLINE} !important;`)
|
||||
|
||||
Reference in new issue
Block a user