fix: 订单pdf单位数据错误
This commit is contained in:
parent
4bd5a1beda
commit
bd5bcadd3a
@ -349,10 +349,7 @@ const PreviewDocument = ({
|
|||||||
)}
|
)}
|
||||||
{detail.category === RecordCategory.lease && (
|
{detail.category === RecordCategory.lease && (
|
||||||
<View style={styles.tableHeader}>
|
<View style={styles.tableHeader}>
|
||||||
<Text style={styles.headerLeftLeft}>
|
<Text style={styles.headerLeftLeft}>项目名称:{detail.contract?.project?.name || ''}</Text>
|
||||||
项目名称:{detail.contract?.project?.id + ' ' || ''}
|
|
||||||
{detail.contract?.project?.name || ''}
|
|
||||||
</Text>
|
|
||||||
<Text style={styles.headerLeftRight}>流水号:{number}</Text>
|
<Text style={styles.headerLeftRight}>流水号:{number}</Text>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@ -471,9 +468,7 @@ const PreviewDocument = ({
|
|||||||
? printSetup === PrintSetup.DisplayAndPrice && item.total
|
? printSetup === PrintSetup.DisplayAndPrice && item.total
|
||||||
? '元'
|
? '元'
|
||||||
: ''
|
: ''
|
||||||
: item.conversion_unit === 'KG'
|
: item.conversion_unit}
|
||||||
? '吨'
|
|
||||||
: item.conversion_unit}
|
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
style={detail.category === RecordCategory.purchase ? styles.tableCell2Last : styles.tableCellLast}
|
style={detail.category === RecordCategory.purchase ? styles.tableCell2Last : styles.tableCellLast}
|
||||||
@ -533,9 +528,7 @@ const PreviewDocument = ({
|
|||||||
? printSetup === PrintSetup.DisplayAndPrice && item.left_total
|
? printSetup === PrintSetup.DisplayAndPrice && item.left_total
|
||||||
? '元'
|
? '元'
|
||||||
: '' // 不记录合同不需要单位
|
: '' // 不记录合同不需要单位
|
||||||
: item.left_conversion_unit === 'KG'
|
: item.left_conversion_unit}
|
||||||
? '吨'
|
|
||||||
: item.left_conversion_unit}
|
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={detail.category === RecordCategory.purchase ? styles.tableCell2 : styles.tableCell}>
|
<Text style={detail.category === RecordCategory.purchase ? styles.tableCell2 : styles.tableCell}>
|
||||||
{item.left_isExcluded ? '不计入合同' : item.left_comment || ''}
|
{item.left_isExcluded ? '不计入合同' : item.left_comment || ''}
|
||||||
@ -555,9 +548,7 @@ const PreviewDocument = ({
|
|||||||
? printSetup === PrintSetup.DisplayAndPrice && item.right_total
|
? printSetup === PrintSetup.DisplayAndPrice && item.right_total
|
||||||
? '元'
|
? '元'
|
||||||
: '' // 不记录合同不需要单位
|
: '' // 不记录合同不需要单位
|
||||||
: item.right_conversion_unit === 'KG'
|
: item.right_conversion_unit}
|
||||||
? '吨'
|
|
||||||
: item.right_conversion_unit}
|
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
style={detail.category === RecordCategory.purchase ? styles.tableCell2Last : styles.tableCellLast}
|
style={detail.category === RecordCategory.purchase ? styles.tableCell2Last : styles.tableCellLast}
|
||||||
|
@ -271,9 +271,16 @@ export class RecordPdfService {
|
|||||||
product_correlation.push(itemB);
|
product_correlation.push(itemB);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const recordPdfData = [...product_correlation, ...no_product_fee, ...excludedFee].map((item) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
total: item.conversion_unit === 'KG' ? item.total / 1000 : item.total,
|
||||||
|
conversion_unit: item.conversion_unit === 'KG' ? '吨' : item.conversion_unit,
|
||||||
|
};
|
||||||
|
});
|
||||||
return await renderItV2({
|
return await renderItV2({
|
||||||
detail: recordData,
|
detail: recordData,
|
||||||
record: [...product_correlation, ...no_product_fee, ...excludedFee], // 租金+费用,无关联费用
|
record: recordPdfData, // 租金+费用,无关联费用
|
||||||
priceRule: make_price,
|
priceRule: make_price,
|
||||||
isDouble,
|
isDouble,
|
||||||
printSetup,
|
printSetup,
|
||||||
|
Loading…
Reference in New Issue
Block a user