From 2f23041aacb31e9d0b4b12d49133370fb4e3ecab Mon Sep 17 00:00:00 2001
From: "yang.yongquan" <3395816735@qq.com>
Date: Tue, 3 Jan 2023 20:16:32 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E4=B8=80=E4=B8=AA?=
=?UTF-8?q?=E6=A0=91=E5=BD=A2=E5=88=97=E8=A1=A8=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/models/Invoice.ts | 2 +-
.../mine/component/tempComponent.tsx | 84 ++++++++++++++++++-
2 files changed, 82 insertions(+), 4 deletions(-)
diff --git a/src/models/Invoice.ts b/src/models/Invoice.ts
index 14631d9..ae000dd 100644
--- a/src/models/Invoice.ts
+++ b/src/models/Invoice.ts
@@ -89,7 +89,7 @@ export interface InvoiceDetail {
invoiceUploader: Staff;
invoiceUploadTime: string|Dayjs;
modified: boolean;
- reimbursement: Reimbursement;
+ reimbursement?: Reimbursement;
}
export interface InvoiceIdentifyResponse {
diff --git a/src/pages/reimbursement/mine/component/tempComponent.tsx b/src/pages/reimbursement/mine/component/tempComponent.tsx
index 9ac90bc..344d48b 100644
--- a/src/pages/reimbursement/mine/component/tempComponent.tsx
+++ b/src/pages/reimbursement/mine/component/tempComponent.tsx
@@ -1,9 +1,87 @@
import {Invoice} from "../../../../models/ReimbursementDetailModal";
-import React from "react";
+import {InvoiceDetail} from "../../../../models/Invoice";
+import {Staff} from "../../../../models/Staff";
+import React, {useState} from "react";
+import {Tree} from 'antd';
+import type {DataNode, DirectoryTreeProps} from 'antd/es/tree';
+import {SwapRightOutlined, SwapLeftOutlined} from '@ant-design/icons'
+import InvoiceDetailModal from "../../../Invoice/InvoiceDetailModal";
+const {DirectoryTree} = Tree;
-function displayInvoicesList(departureInvoice: Invoice, destinationInvoice: Invoice | null, otherInvoices: Invoice[]) {
+function toInvoiceDetail(invoice: Invoice) {
+ let uploader = invoice.invoiceUploader;
+ let initStaff: Staff = {
+ managingDepartment: null,
+ staffBase: "",
+ staffDepartments: [],
+ staffId: "0000",
+ staffName: ""
+ }
+ let resInvoiceDetail: InvoiceDetail = {
+ invoiceAmount: invoice.invoiceAmount ? invoice.invoiceAmount : 0,
+ invoiceNote: invoice.invoiceNote ? invoice.invoiceNote : "",
+ invoiceState: invoice.invoiceState ? invoice.invoiceState : 0,
+ invoiceUploadTime: invoice.invoiceUploadTime ? invoice.invoiceUploadTime : "",
+ invoiceUploader: initStaff,
+ modified: invoice.modified ? invoice.modified : false,
+ invoiceNo: invoice.invoiceNo ? invoice.invoiceNo : "Undefined",
+ invoiceCode: invoice.invoiceCode ? invoice.invoiceCode : "Undefined",
+ invoiceDate: invoice.invoiceDate,
+ invoiceDeparture: invoice.invoiceDeparture ? invoice.invoiceDeparture : "",
+ invoiceDestination: invoice.invoiceDestination ? invoice.invoiceDestination: "",
+ invoiceFileUri: invoice.invoiceFileUri ? invoice.invoiceFileUri : "",
+ invoiceThumbnailUri: invoice.invoiceThumbnailUri ? invoice.invoiceThumbnailUri: "",
+ invoiceId: invoice.invoiceId,
+ invoiceKind: invoice.invoiceKind ? invoice.invoiceKind : 0
+ };
+ return resInvoiceDetail;
- return (<>>)
}
+function displayInvoicesList(departureInvoice: Invoice, destinationInvoice: Invoice | null, otherInvoices: Invoice[]) {
+ function getTreeData() {
+ let treeData: DataNode[] = [];
+ let mainData: DataNode = {
+ title: '往返票据',
+ key: '0-0',
+ children: [
+ {title: '出发票据', key: '0-0-0', isLeaf: true, icon: },
+ ]
+ };
+ if (destinationInvoice != null) {
+ mainData.children?.push({title: '返程票据', key: '0-0-1', isLeaf: true, icon: });
+ }
+ let othersData: DataNode = {
+ title: '其他票据',
+ key: '0-1',
+ children: []
+ };
+ for(let i=0; i {
+ if(keys[0] == '0-0-0') {
+
+ }
+ if(keys[0] == '0-0-1') {
+
+ }
+ let keyList = keys[0].toString().split('-')
+ let index = parseInt(keyList[keyList.length-1])
+
+ };
+
+ return (<>
+
+ >)
+}
+
export default displayInvoicesList
\ No newline at end of file