expense_model.dart 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. import '../../shared/models/approval_status.dart';
  2. /// 费用报销主表,对应 [Expense] 表。
  3. class ExpenseModel {
  4. final String id;
  5. final String expenseNo;
  6. final DateTime? expenseDate;
  7. final String applicantId;
  8. final String applicantName;
  9. final String deptId;
  10. final String deptName;
  11. final String currencyCode;
  12. final double excRto;
  13. final bool isGenerateVoucher;
  14. final String voucherNo;
  15. final double approvedAmount;
  16. final double totalAmount;
  17. final double totalAmtnSh;
  18. final String purpose;
  19. final String remark;
  20. final String paymentMethod;
  21. final bool isInvoiceVerified;
  22. final bool isTaxIdMatched;
  23. final bool isCategoryCompliant;
  24. final String bankTransferNo;
  25. final String paymentStatus;
  26. final String status;
  27. final String approvalInstanceId;
  28. final String previousInstanceIds;
  29. final DateTime? effectiveDate;
  30. final String auditorId;
  31. final int version;
  32. final DateTime createTime;
  33. final DateTime updateTime;
  34. final bool isDeleted;
  35. final int isTransferred;
  36. final int isClosed;
  37. final bool isAuditApproved;
  38. // ── 瞬态字段(API 从 ERP 实时查询,非存储) ──
  39. final String currentApproverId;
  40. final List<String> approvalChain;
  41. final List<ApprovalRecord> approvalRecords;
  42. // ── 子表 ──
  43. final List<ExpenseDetailModel> details;
  44. final List<String> attachments;
  45. const ExpenseModel({
  46. required this.id,
  47. required this.expenseNo,
  48. this.expenseDate,
  49. this.applicantId = '',
  50. this.applicantName = '',
  51. this.deptId = '',
  52. this.deptName = '',
  53. this.currencyCode = '',
  54. this.excRto = 1.0,
  55. this.isGenerateVoucher = true,
  56. this.voucherNo = '',
  57. this.approvedAmount = 0.0,
  58. this.totalAmount = 0.0,
  59. this.totalAmtnSh = 0.0,
  60. this.purpose = '',
  61. this.remark = '',
  62. this.paymentMethod = '',
  63. this.isInvoiceVerified = false,
  64. this.isTaxIdMatched = false,
  65. this.isCategoryCompliant = false,
  66. this.bankTransferNo = '',
  67. this.paymentStatus = 'unpaid',
  68. this.status = 'draft',
  69. this.approvalInstanceId = '',
  70. this.previousInstanceIds = '',
  71. this.effectiveDate,
  72. this.auditorId = '',
  73. this.version = 1,
  74. required this.createTime,
  75. required this.updateTime,
  76. this.isDeleted = false,
  77. this.isTransferred = 0,
  78. this.isClosed = 0,
  79. this.isAuditApproved = false,
  80. this.currentApproverId = '',
  81. this.approvalChain = const [],
  82. this.approvalRecords = const [],
  83. this.details = const [],
  84. this.attachments = const [],
  85. });
  86. factory ExpenseModel.fromJson(Map<String, dynamic> json) {
  87. return ExpenseModel(
  88. id: json['id'] as String? ?? '',
  89. expenseNo: json['expenseNo'] as String? ?? '',
  90. expenseDate: json['expenseDate'] != null
  91. ? DateTime.parse(json['expenseDate'] as String)
  92. : null,
  93. applicantId: json['usrNo'] as String? ?? '',
  94. applicantName:
  95. json['applicantName'] as String? ?? json['usrNo'] as String? ?? '',
  96. deptId: json['dept'] as String? ?? '',
  97. deptName: json['deptName'] as String? ?? json['dept'] as String? ?? '',
  98. currencyCode:
  99. (json['curId'] as String?) ?? (json['currencyCode'] as String?) ?? '',
  100. excRto: (json['excRto'] as num?)?.toDouble() ?? 1.0,
  101. isGenerateVoucher:
  102. (json['vohId'] as String?) == 'T' ||
  103. json['isGenerateVoucher'] == true,
  104. voucherNo: json['vohNo'] as String? ?? '',
  105. approvedAmount: (json['approvedAmount'] as num?)?.toDouble() ?? 0.0,
  106. totalAmount: (json['totalAmount'] as num?)?.toDouble() ?? 0.0,
  107. totalAmtnSh: (json['totalAmtnSh'] as num?)?.toDouble() ?? 0.0,
  108. purpose: json['reason'] as String? ?? json['purpose'] as String? ?? '',
  109. remark: (json['rem'] as String?) ?? (json['remark'] as String?) ?? '',
  110. paymentMethod:
  111. (json['payId'] as String?) ??
  112. (json['paymentMethod'] as String?) ??
  113. '',
  114. isInvoiceVerified: json['isInvoiceVerified'] as bool? ?? false,
  115. isTaxIdMatched: json['isTaxIdMatched'] as bool? ?? false,
  116. isCategoryCompliant: json['isCategoryCompliant'] as bool? ?? false,
  117. bankTransferNo: json['bankTransferNo'] as String? ?? '',
  118. paymentStatus: json['paymentStatus'] as String? ?? 'unpaid',
  119. status: json['clsDate'] != null
  120. ? 'closed'
  121. : (json['status'] as String? ?? 'draft'),
  122. approvalInstanceId: json['approvalInstanceId'] as String? ?? '',
  123. previousInstanceIds: json['previousInstanceIds'] as String? ?? '',
  124. effectiveDate: json['effDd'] != null
  125. ? DateTime.parse(json['effDd'] as String)
  126. : null,
  127. auditorId: json['chkMan'] as String? ?? '',
  128. version: json['version'] as int? ?? 1,
  129. createTime: json['createTime'] != null
  130. ? DateTime.parse(json['createTime'] as String)
  131. : DateTime.now(),
  132. updateTime: json['updateTime'] != null
  133. ? DateTime.parse(json['updateTime'] as String)
  134. : DateTime.now(),
  135. isDeleted: json['isDeleted'] as bool? ?? false,
  136. isTransferred: json['isTransferred'] as int? ?? 0,
  137. isClosed: json['isClosed'] as int? ?? 0,
  138. isAuditApproved: (json['isAuditApproved'] as int?) == 1,
  139. currentApproverId: json['currentApproverId'] as String? ?? '',
  140. approvalChain:
  141. (json['approvalChain'] as List<dynamic>?)
  142. ?.map((e) => e as String)
  143. .toList() ??
  144. [],
  145. approvalRecords:
  146. (json['approvalRecords'] as List<dynamic>?)
  147. ?.map((e) => ApprovalRecord.fromJson(e as Map<String, dynamic>))
  148. .toList() ??
  149. [],
  150. details:
  151. (json['details'] as List<dynamic>?)
  152. ?.map(
  153. (e) => ExpenseDetailModel.fromJson(e as Map<String, dynamic>),
  154. )
  155. .toList() ??
  156. [],
  157. attachments:
  158. (json['attachments'] as List<dynamic>?)
  159. ?.map((e) => e as String)
  160. .toList() ??
  161. [],
  162. );
  163. }
  164. Map<String, dynamic> toJson() => {
  165. 'id': id,
  166. 'expenseNo': expenseNo,
  167. 'expenseDate': expenseDate?.toIso8601String(),
  168. 'applicantId': applicantId,
  169. 'applicantName': applicantName,
  170. 'deptId': deptId,
  171. 'deptName': deptName,
  172. 'currencyCode': currencyCode,
  173. 'excRto': excRto,
  174. 'isGenerateVoucher': isGenerateVoucher,
  175. 'voucherNo': voucherNo,
  176. 'approvedAmount': approvedAmount,
  177. 'totalAmount': totalAmount,
  178. 'totalAmtnSh': totalAmtnSh,
  179. 'purpose': purpose,
  180. 'remark': remark,
  181. 'paymentMethod': paymentMethod,
  182. 'isInvoiceVerified': isInvoiceVerified,
  183. 'isTaxIdMatched': isTaxIdMatched,
  184. 'isCategoryCompliant': isCategoryCompliant,
  185. 'bankTransferNo': bankTransferNo,
  186. 'paymentStatus': paymentStatus,
  187. 'status': status,
  188. 'approvalInstanceId': approvalInstanceId,
  189. 'previousInstanceIds': previousInstanceIds,
  190. 'effectiveDate': effectiveDate?.toIso8601String(),
  191. 'auditorId': auditorId,
  192. 'version': version,
  193. 'createTime': createTime.toIso8601String(),
  194. 'updateTime': updateTime.toIso8601String(),
  195. 'isDeleted': isDeleted,
  196. 'isTransferred': isTransferred,
  197. 'isClosed': isClosed,
  198. 'isAuditApproved': isAuditApproved ? 1 : 0,
  199. 'currentApproverId': currentApproverId,
  200. 'approvalChain': approvalChain,
  201. 'approvalRecords': approvalRecords.map((r) => r.toJson()).toList(),
  202. 'details': details.map((d) => d.toJson()).toList(),
  203. 'attachments': attachments,
  204. };
  205. ExpenseModel copyWith({
  206. String? id,
  207. String? expenseNo,
  208. DateTime? expenseDate,
  209. String? applicantId,
  210. String? applicantName,
  211. String? deptId,
  212. String? deptName,
  213. String? currencyCode,
  214. double? excRto,
  215. bool? isGenerateVoucher,
  216. String? voucherNo,
  217. double? approvedAmount,
  218. double? totalAmount,
  219. double? totalAmtnSh,
  220. String? purpose,
  221. String? remark,
  222. String? paymentMethod,
  223. bool? isInvoiceVerified,
  224. bool? isTaxIdMatched,
  225. bool? isCategoryCompliant,
  226. String? bankTransferNo,
  227. String? paymentStatus,
  228. String? status,
  229. String? approvalInstanceId,
  230. String? previousInstanceIds,
  231. DateTime? effectiveDate,
  232. String? auditorId,
  233. int? version,
  234. DateTime? createTime,
  235. DateTime? updateTime,
  236. bool? isDeleted,
  237. int? isTransferred,
  238. int? isClosed,
  239. bool? isAuditApproved,
  240. String? currentApproverId,
  241. List<String>? approvalChain,
  242. List<ApprovalRecord>? approvalRecords,
  243. List<ExpenseDetailModel>? details,
  244. List<String>? attachments,
  245. }) {
  246. return ExpenseModel(
  247. id: id ?? this.id,
  248. expenseNo: expenseNo ?? this.expenseNo,
  249. expenseDate: expenseDate ?? this.expenseDate,
  250. applicantId: applicantId ?? this.applicantId,
  251. applicantName: applicantName ?? this.applicantName,
  252. deptId: deptId ?? this.deptId,
  253. deptName: deptName ?? this.deptName,
  254. currencyCode: currencyCode ?? this.currencyCode,
  255. excRto: excRto ?? this.excRto,
  256. isGenerateVoucher: isGenerateVoucher ?? this.isGenerateVoucher,
  257. voucherNo: voucherNo ?? this.voucherNo,
  258. approvedAmount: approvedAmount ?? this.approvedAmount,
  259. totalAmount: totalAmount ?? this.totalAmount,
  260. totalAmtnSh: totalAmtnSh ?? this.totalAmtnSh,
  261. purpose: purpose ?? this.purpose,
  262. remark: remark ?? this.remark,
  263. paymentMethod: paymentMethod ?? this.paymentMethod,
  264. isInvoiceVerified: isInvoiceVerified ?? this.isInvoiceVerified,
  265. isTaxIdMatched: isTaxIdMatched ?? this.isTaxIdMatched,
  266. isCategoryCompliant: isCategoryCompliant ?? this.isCategoryCompliant,
  267. bankTransferNo: bankTransferNo ?? this.bankTransferNo,
  268. paymentStatus: paymentStatus ?? this.paymentStatus,
  269. status: status ?? this.status,
  270. approvalInstanceId: approvalInstanceId ?? this.approvalInstanceId,
  271. previousInstanceIds: previousInstanceIds ?? this.previousInstanceIds,
  272. effectiveDate: effectiveDate ?? this.effectiveDate,
  273. auditorId: auditorId ?? this.auditorId,
  274. version: version ?? this.version,
  275. createTime: createTime ?? this.createTime,
  276. updateTime: updateTime ?? this.updateTime,
  277. isDeleted: isDeleted ?? this.isDeleted,
  278. isTransferred: isTransferred ?? this.isTransferred,
  279. isClosed: isClosed ?? this.isClosed,
  280. isAuditApproved: isAuditApproved ?? this.isAuditApproved,
  281. currentApproverId: currentApproverId ?? this.currentApproverId,
  282. approvalChain: approvalChain ?? this.approvalChain,
  283. approvalRecords: approvalRecords ?? this.approvalRecords,
  284. details: details ?? this.details,
  285. attachments: attachments ?? this.attachments,
  286. );
  287. }
  288. }
  289. /// 费用报销明细,对应 [ExpenseDetail] 表。
  290. class ExpenseDetailModel {
  291. final String id;
  292. final String expenseId;
  293. final String expenseApplyId;
  294. final String expenseApplyNo;
  295. final DateTime? expenseApplyDate;
  296. final String expenseCategory;
  297. final String categoryName;
  298. final String priority;
  299. final String purpose;
  300. final String projectId;
  301. final String projectName;
  302. final String costDeptId;
  303. final String costDeptName;
  304. final String acctSubjectId;
  305. final String acctSubjectName;
  306. final double amount;
  307. final double taxRate;
  308. final double taxAmount;
  309. final double totalAmount;
  310. final String currencyCode;
  311. final double exchangeRate;
  312. final double baseAmount;
  313. final double approvedAmount;
  314. final String customerVendorId;
  315. final String customerVendorName;
  316. final double offsetAmount;
  317. final String bankName;
  318. final String bankAccountName;
  319. final String bankAccount;
  320. final String sqMan;
  321. final String sqManName;
  322. final String aeNo;
  323. final String aeDd;
  324. final String remark;
  325. final int? preItm;
  326. final int sortOrder;
  327. final List<String> attachments;
  328. final DateTime createTime;
  329. final DateTime updateTime;
  330. final bool isDeleted;
  331. const ExpenseDetailModel({
  332. required this.id,
  333. required this.expenseId,
  334. this.expenseApplyId = '',
  335. this.expenseApplyNo = '',
  336. this.expenseApplyDate,
  337. this.expenseCategory = '',
  338. this.categoryName = '',
  339. this.priority = '1',
  340. this.purpose = '',
  341. this.projectId = '',
  342. this.projectName = '',
  343. this.costDeptId = '',
  344. this.costDeptName = '',
  345. this.acctSubjectId = '',
  346. this.acctSubjectName = '',
  347. required this.amount,
  348. this.taxRate = 0,
  349. this.taxAmount = 0.0,
  350. required this.totalAmount,
  351. this.currencyCode = '',
  352. this.exchangeRate = 1.0,
  353. this.baseAmount = 0.0,
  354. this.approvedAmount = 0.0,
  355. this.customerVendorId = '',
  356. this.customerVendorName = '',
  357. this.offsetAmount = 0.0,
  358. this.bankName = '',
  359. this.bankAccountName = '',
  360. this.bankAccount = '',
  361. this.sqMan = '',
  362. this.sqManName = '',
  363. this.aeNo = '',
  364. this.aeDd = '',
  365. this.remark = '',
  366. this.preItm,
  367. this.sortOrder = 1,
  368. this.attachments = const [],
  369. required this.createTime,
  370. required this.updateTime,
  371. this.isDeleted = false,
  372. });
  373. factory ExpenseDetailModel.fromJson(Map<String, dynamic> json) {
  374. return ExpenseDetailModel(
  375. id: json['id'] as String? ?? '',
  376. expenseId: json['expenseId'] as String? ?? '',
  377. expenseApplyId: json['aeNo'] as String? ?? '',
  378. expenseApplyNo: json['aeNo'] as String? ?? '',
  379. expenseApplyDate: json['aeDd'] != null
  380. ? DateTime.parse(json['aeDd'] as String)
  381. : null,
  382. expenseCategory:
  383. json['idxNo'] as String? ?? json['expenseCategory'] as String? ?? '',
  384. categoryName:
  385. json['idxName'] as String? ?? json['categoryName'] as String? ?? '',
  386. priority: json['priority'] as String? ?? '1',
  387. purpose: json['purpose'] as String? ?? '',
  388. projectId: json['objNo'] as String? ?? '',
  389. projectName:
  390. json['objName'] as String? ?? json['projectName'] as String? ?? '',
  391. costDeptId: json['dep'] as String? ?? '',
  392. costDeptName: json['depName'] as String? ?? json['dep'] as String? ?? '',
  393. acctSubjectId: json['accNo'] as String? ?? '',
  394. acctSubjectName: json['accName'] as String? ?? '',
  395. amount:
  396. (json['amount'] as num?)?.toDouble() ??
  397. (json['amtn'] as num?)?.toDouble() ??
  398. 0.0,
  399. taxRate:
  400. (json['taxRate'] as num?)?.toDouble() ??
  401. (json['taxRto'] as num?)?.toDouble() ??
  402. 0.0,
  403. taxAmount:
  404. (json['taxAmount'] as num?)?.toDouble() ??
  405. (json['tax'] as num?)?.toDouble() ??
  406. 0.0,
  407. totalAmount:
  408. (json['totalAmount'] as num?)?.toDouble() ??
  409. (json['amt'] as num?)?.toDouble() ??
  410. 0.0,
  411. currencyCode: json['currencyCode'] as String? ?? '',
  412. exchangeRate: (json['exchangeRate'] as num?)?.toDouble() ?? 1.0,
  413. baseAmount: (json['baseAmount'] as num?)?.toDouble() ?? 0.0,
  414. approvedAmount: (json['approvedAmount'] as num?)?.toDouble() ?? 0.0,
  415. customerVendorId: json['cust'] as String? ?? '',
  416. customerVendorName: json['custName'] as String? ?? '',
  417. offsetAmount: (json['offsetAmount'] as num?)?.toDouble() ?? 0.0,
  418. bankName: json['bankName'] as String? ?? '',
  419. bankAccountName: json['bankAccountName'] as String? ?? '',
  420. bankAccount: json['bankAccount'] as String? ?? '',
  421. sqMan: json['sqMan'] as String? ?? '',
  422. sqManName:
  423. json['sqName'] as String? ??
  424. json['sqManName'] as String? ??
  425. json['sqMan'] as String? ??
  426. '',
  427. aeNo: json['aeNo'] as String? ?? '',
  428. aeDd: json['aeDd'] as String? ?? '',
  429. remark: json['rem'] as String? ?? '',
  430. preItm: json['preItm'] as int?,
  431. sortOrder: json['itm'] as int? ?? 1,
  432. attachments:
  433. (json['attachments'] as List<dynamic>?)
  434. ?.map((e) => e as String)
  435. .toList() ??
  436. [],
  437. createTime: json['createTime'] != null
  438. ? DateTime.parse(json['createTime'] as String)
  439. : DateTime.now(),
  440. updateTime: json['updateTime'] != null
  441. ? DateTime.parse(json['updateTime'] as String)
  442. : DateTime.now(),
  443. isDeleted: json['isDeleted'] as bool? ?? false,
  444. );
  445. }
  446. Map<String, dynamic> toJson() => {
  447. 'id': id,
  448. 'expenseId': expenseId,
  449. 'expenseApplyId': expenseApplyId,
  450. 'expenseApplyNo': expenseApplyNo,
  451. 'expenseApplyDate': expenseApplyDate?.toIso8601String(),
  452. 'expenseCategory': expenseCategory,
  453. 'categoryName': categoryName,
  454. 'priority': priority,
  455. 'purpose': purpose,
  456. 'projectId': projectId,
  457. 'projectName': projectName,
  458. 'costDeptId': costDeptId,
  459. 'costDeptName': costDeptName,
  460. 'acctSubjectId': acctSubjectId,
  461. 'acctSubjectName': acctSubjectName,
  462. 'amount': amount,
  463. 'taxRate': taxRate,
  464. 'taxAmount': taxAmount,
  465. 'totalAmount': totalAmount,
  466. 'currencyCode': currencyCode,
  467. 'exchangeRate': exchangeRate,
  468. 'baseAmount': baseAmount,
  469. 'approvedAmount': approvedAmount,
  470. 'customerVendorId': customerVendorId,
  471. 'customerVendorName': customerVendorName,
  472. 'offsetAmount': offsetAmount,
  473. 'bankName': bankName,
  474. 'bankAccountName': bankAccountName,
  475. 'bankAccount': bankAccount,
  476. 'sqMan': sqMan,
  477. 'sqManName': sqManName,
  478. 'aeNo': aeNo,
  479. 'aeDd': aeDd,
  480. 'remark': remark,
  481. 'preItm': preItm,
  482. 'sortOrder': sortOrder,
  483. 'attachments': attachments,
  484. 'createTime': createTime.toIso8601String(),
  485. 'updateTime': updateTime.toIso8601String(),
  486. 'isDeleted': isDeleted,
  487. };
  488. ExpenseDetailModel copyWith({
  489. String? id,
  490. String? expenseId,
  491. String? expenseApplyId,
  492. String? expenseApplyNo,
  493. DateTime? expenseApplyDate,
  494. String? expenseCategory,
  495. String? categoryName,
  496. String? priority,
  497. String? purpose,
  498. String? projectId,
  499. String? projectName,
  500. String? costDeptId,
  501. String? costDeptName,
  502. String? acctSubjectId,
  503. String? acctSubjectName,
  504. double? amount,
  505. double? taxRate,
  506. double? taxAmount,
  507. double? totalAmount,
  508. String? currencyCode,
  509. double? exchangeRate,
  510. double? baseAmount,
  511. double? approvedAmount,
  512. String? customerVendorId,
  513. String? customerVendorName,
  514. double? offsetAmount,
  515. String? bankName,
  516. String? bankAccountName,
  517. String? bankAccount,
  518. String? sqMan,
  519. String? sqManName,
  520. String? aeNo,
  521. String? aeDd,
  522. String? remark,
  523. int? preItm,
  524. int? sortOrder,
  525. List<String>? attachments,
  526. DateTime? createTime,
  527. DateTime? updateTime,
  528. bool? isDeleted,
  529. }) {
  530. return ExpenseDetailModel(
  531. id: id ?? this.id,
  532. expenseId: expenseId ?? this.expenseId,
  533. expenseApplyId: expenseApplyId ?? this.expenseApplyId,
  534. expenseApplyNo: expenseApplyNo ?? this.expenseApplyNo,
  535. expenseApplyDate: expenseApplyDate ?? this.expenseApplyDate,
  536. expenseCategory: expenseCategory ?? this.expenseCategory,
  537. categoryName: categoryName ?? this.categoryName,
  538. priority: priority ?? this.priority,
  539. purpose: purpose ?? this.purpose,
  540. projectId: projectId ?? this.projectId,
  541. projectName: projectName ?? this.projectName,
  542. costDeptId: costDeptId ?? this.costDeptId,
  543. costDeptName: costDeptName ?? this.costDeptName,
  544. acctSubjectId: acctSubjectId ?? this.acctSubjectId,
  545. acctSubjectName: acctSubjectName ?? this.acctSubjectName,
  546. amount: amount ?? this.amount,
  547. taxRate: taxRate ?? this.taxRate,
  548. taxAmount: taxAmount ?? this.taxAmount,
  549. totalAmount: totalAmount ?? this.totalAmount,
  550. currencyCode: currencyCode ?? this.currencyCode,
  551. exchangeRate: exchangeRate ?? this.exchangeRate,
  552. baseAmount: baseAmount ?? this.baseAmount,
  553. approvedAmount: approvedAmount ?? this.approvedAmount,
  554. customerVendorId: customerVendorId ?? this.customerVendorId,
  555. customerVendorName: customerVendorName ?? this.customerVendorName,
  556. offsetAmount: offsetAmount ?? this.offsetAmount,
  557. bankName: bankName ?? this.bankName,
  558. bankAccountName: bankAccountName ?? this.bankAccountName,
  559. bankAccount: bankAccount ?? this.bankAccount,
  560. sqMan: sqMan ?? this.sqMan,
  561. sqManName: sqManName ?? this.sqManName,
  562. aeNo: aeNo ?? this.aeNo,
  563. aeDd: aeDd ?? this.aeDd,
  564. remark: remark ?? this.remark,
  565. preItm: preItm ?? this.preItm,
  566. sortOrder: sortOrder ?? this.sortOrder,
  567. attachments: attachments ?? this.attachments,
  568. createTime: createTime ?? this.createTime,
  569. updateTime: updateTime ?? this.updateTime,
  570. isDeleted: isDeleted ?? this.isDeleted,
  571. );
  572. }
  573. }