fix_record_price_pdf (#587)
Reviewed-on: daoyoucloud/tachycode#587 Co-authored-by: hello@lv <2256334253@qq.com> Co-committed-by: hello@lv <2256334253@qq.com>
This commit is contained in:
parent
f9ec74fc6e
commit
ff9ae1a2f5
@ -98,6 +98,7 @@
|
|||||||
"hot-mugs-double",
|
"hot-mugs-double",
|
||||||
"long-dolphins-sit",
|
"long-dolphins-sit",
|
||||||
"pretty-wolves-allow",
|
"pretty-wolves-allow",
|
||||||
|
"rare-lies-applaud",
|
||||||
"selfish-lies-enjoy",
|
"selfish-lies-enjoy",
|
||||||
"six-dolphins-mix",
|
"six-dolphins-mix",
|
||||||
"slimy-sloths-repeat",
|
"slimy-sloths-repeat",
|
||||||
|
5
.changeset/rare-lies-applaud.md
Normal file
5
.changeset/rare-lies-applaud.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@hera/plugin-rental": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
购销单线上报错处理,增加log
|
@ -22,6 +22,8 @@
|
|||||||
"release:force": "lerna publish from-package --yes",
|
"release:force": "lerna publish from-package --yes",
|
||||||
"run:example": "tsx -r dotenv/config -r tsconfig-paths/register ./examples/index.ts",
|
"run:example": "tsx -r dotenv/config -r tsconfig-paths/register ./examples/index.ts",
|
||||||
"start": "nocobase start",
|
"start": "nocobase start",
|
||||||
|
"tag:p": "changeset",
|
||||||
|
"tag:v": "changeset version",
|
||||||
"tar": "nocobase tar",
|
"tar": "nocobase tar",
|
||||||
"tc": "nocobase test:client",
|
"tc": "nocobase test:client",
|
||||||
"test": "nocobase test",
|
"test": "nocobase test",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hera/plugin-rental",
|
"name": "@hera/plugin-rental",
|
||||||
"displayName": "professional construction materials rental system - customized based on hera",
|
"displayName": "professional construction materials rental system - customized based on hera",
|
||||||
"version": "1.7.6-alpha.7",
|
"version": "1.7.6-alpha.8",
|
||||||
"description": "Offering a standardized leasing management system, encompassing comprehensive administration from materials to contracts to labor personnel, while providing a robust financial management mechanism, and real-time monitoring of the operational capacity of the leasing system.",
|
"description": "Offering a standardized leasing management system, encompassing comprehensive administration from materials to contracts to labor personnel, while providing a robust financial management mechanism, and real-time monitoring of the operational capacity of the leasing system.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"System management"
|
"System management"
|
||||||
|
@ -158,7 +158,8 @@ export class RecordPreviewController {
|
|||||||
// 拉标题
|
// 拉标题
|
||||||
const systemSetting = await this.systemSetting.get();
|
const systemSetting = await this.systemSetting.get();
|
||||||
record.systemTitle = systemSetting?.title || '异常数据,请联系相关负责人!';
|
record.systemTitle = systemSetting?.title || '异常数据,请联系相关负责人!';
|
||||||
const user = await ctx.db.getRepository('users').findOne({ filter: { id: record.createdById } });
|
const userID = record.createdById || record.updatedById;
|
||||||
|
const user = await ctx.db.getRepository('users').findOne({ filter: { id: userID } });
|
||||||
record.nickname = user?.nickname || '';
|
record.nickname = user?.nickname || '';
|
||||||
record.userPhone = user?.phone || '';
|
record.userPhone = user?.phone || '';
|
||||||
record.pdfExplain = pdfExplain[0]?.out_of_storage_explain;
|
record.pdfExplain = pdfExplain[0]?.out_of_storage_explain;
|
||||||
|
@ -362,13 +362,16 @@ const PreviewDocument = ({
|
|||||||
<React.Fragment key={columnIndex}>
|
<React.Fragment key={columnIndex}>
|
||||||
<Text style={styles.tableCell2}>{item[column + 'name']}</Text>
|
<Text style={styles.tableCell2}>{item[column + 'name']}</Text>
|
||||||
<Text style={styles.tableCell}>
|
<Text style={styles.tableCell}>
|
||||||
{formatQuantity(item[column + 'unit_price'], 2) + '元/' + item[column + 'unit']}
|
{item[column + 'unit_price'] &&
|
||||||
|
formatQuantity(item[column + 'unit_price'], 2) + '元/' + item[column + 'unit']}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={styles.tableCell}>
|
<Text style={styles.tableCell}>
|
||||||
{formatQuantity(item[column + 'count'], 2)}
|
{item[column + 'count'] && formatQuantity(item[column + 'count'], 2)}
|
||||||
{item[column + 'unit']}
|
{item[column + 'unit']}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={styles.tableCell}>{formatCurrency(item[column + 'all_price'], 2)}</Text>
|
<Text style={styles.tableCell}>
|
||||||
|
{item[column + 'all_price'] && formatCurrency(item[column + 'all_price'], 2)}
|
||||||
|
</Text>
|
||||||
<Text style={!isDouble || column === 'right_' ? styles.tableCellLast : styles.tableCell}>
|
<Text style={!isDouble || column === 'right_' ? styles.tableCellLast : styles.tableCell}>
|
||||||
{item[column + 'comment'] || ''}
|
{item[column + 'comment'] || ''}
|
||||||
</Text>
|
</Text>
|
||||||
|
@ -70,6 +70,10 @@ export class RecordPdfService {
|
|||||||
|
|
||||||
const setData = Object.values(
|
const setData = Object.values(
|
||||||
price_rule.reduce((acc, item) => {
|
price_rule.reduce((acc, item) => {
|
||||||
|
if (!item) {
|
||||||
|
console.error('报价计算出错', price_rule);
|
||||||
|
return acc;
|
||||||
|
}
|
||||||
if (!acc[item.name]) {
|
if (!acc[item.name]) {
|
||||||
acc[item.name] = { ...item };
|
acc[item.name] = { ...item };
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user