From bd5bcadd3ab9658eb7cebd8c10ad71cc944554fe Mon Sep 17 00:00:00 2001
From: lyx <2027667395@qq.com>
Date: Wed, 13 Mar 2024 13:58:37 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95pdf=E5=8D=95=E4=BD=8D?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=94=99=E8=AF=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../server/pdf-documents/records-documentV2.tsx | 17 ++++-------------
.../src/server/services/record-pdf-service.ts | 9 ++++++++-
2 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/records-documentV2.tsx b/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/records-documentV2.tsx
index a2e536bf3..5bf5111a4 100644
--- a/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/records-documentV2.tsx
+++ b/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/records-documentV2.tsx
@@ -349,10 +349,7 @@ const PreviewDocument = ({
)}
{detail.category === RecordCategory.lease && (
-
- 项目名称:{detail.contract?.project?.id + ' ' || ''}
- {detail.contract?.project?.name || ''}
-
+ 项目名称:{detail.contract?.project?.name || ''}
流水号:{number}
)}
@@ -471,9 +468,7 @@ const PreviewDocument = ({
? printSetup === PrintSetup.DisplayAndPrice && item.total
? '元'
: ''
- : item.conversion_unit === 'KG'
- ? '吨'
- : item.conversion_unit}
+ : item.conversion_unit}
{item.left_isExcluded ? '不计入合同' : item.left_comment || ''}
@@ -555,9 +548,7 @@ const PreviewDocument = ({
? printSetup === PrintSetup.DisplayAndPrice && item.right_total
? '元'
: '' // 不记录合同不需要单位
- : item.right_conversion_unit === 'KG'
- ? '吨'
- : item.right_conversion_unit}
+ : item.right_conversion_unit}
{
+ return {
+ ...item,
+ total: item.conversion_unit === 'KG' ? item.total / 1000 : item.total,
+ conversion_unit: item.conversion_unit === 'KG' ? '吨' : item.conversion_unit,
+ };
+ });
return await renderItV2({
detail: recordData,
- record: [...product_correlation, ...no_product_fee, ...excludedFee], // 租金+费用,无关联费用
+ record: recordPdfData, // 租金+费用,无关联费用
priceRule: make_price,
isDouble,
printSetup,