From 0a522d1fe66d4e738c1300393131e44634180365 Mon Sep 17 00:00:00 2001 From: wuyize Date: Tue, 3 Jan 2023 14:39:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=88=91=E7=9A=84=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E5=92=8C=E5=8F=91=E7=A5=A8=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models/Invoice.ts | 4 ++ src/pages/Invoice/InvoiceDetailModal.tsx | 69 ++++++++++++------- .../Invoice/management/InvoiceManagement.tsx | 47 ++++++++++--- src/pages/Invoice/mine/InvoiceListView.css | 13 ---- 4 files changed, 88 insertions(+), 45 deletions(-) delete mode 100644 src/pages/Invoice/mine/InvoiceListView.css diff --git a/src/models/Invoice.ts b/src/models/Invoice.ts index b8cc44a..14631d9 100644 --- a/src/models/Invoice.ts +++ b/src/models/Invoice.ts @@ -40,6 +40,8 @@ export class InvoiceSearchOption { invoiceDateEnd: Nullable invoiceNote: Nullable invoiceUploaderId: Nullable + invoiceUploaderIdFuzzy: Nullable + invoiceUploaderNameFuzzy: Nullable pageNum: number pageSize: number @@ -60,6 +62,8 @@ export class InvoiceSearchOption { this.invoiceDateEnd = null this.invoiceNote = null this.invoiceUploaderId = null + this.invoiceUploaderIdFuzzy = null + this.invoiceUploaderNameFuzzy = null this.pageNum = 0 this.pageSize = 20 } diff --git a/src/pages/Invoice/InvoiceDetailModal.tsx b/src/pages/Invoice/InvoiceDetailModal.tsx index 63da290..974bb06 100644 --- a/src/pages/Invoice/InvoiceDetailModal.tsx +++ b/src/pages/Invoice/InvoiceDetailModal.tsx @@ -1,5 +1,5 @@ import React, {useEffect, useState} from "react"; -import {Button, DatePicker, Form, Input, InputNumber, Modal, Select, Typography} from "antd"; +import {Button, DatePicker, Form, Input, InputNumber, Modal, Select, Typography, Image} from "antd"; import { InvoiceDetail, InvoiceIdentifyResponse, @@ -7,7 +7,7 @@ import { invoiceTypeItemsMap, invoiceTypeNameMap, invoiceTypeShowItemsMap } from "../../models/Invoice"; -import axiosInstance from "../../utils/axiosInstance"; +import axiosInstance, {baseUrl} from "../../utils/axiosInstance"; import TextArea from "antd/es/input/TextArea"; import dayjs, {Dayjs} from "dayjs"; import qs from "qs"; @@ -50,6 +50,7 @@ function InvoiceDetailModal(props: any) { key={index} name={item} label={invoiceItemsMap.get(item)} + style={{marginBottom: 10}} > {inputComponent(item)} @@ -99,29 +100,49 @@ function InvoiceDetailModal(props: any) { open={props.open} title="发票详情" onCancel={handleCancel} - footer={ } - > - { -
- - {invoiceTypeNameMap.get(props.invoiceDetail?.invoiceKind)} - - {formItems} - - {props.invoiceDetail?.invoiceNote} - -
+ footer={ +
+ {props.invoiceDetail?.modified ? '发票信息经过手动修改' : ''} +
+ {props.invoiceDetail?.invoiceState === 0 && } + + +
+
+ } + > +
+ + {invoiceTypeNameMap.get(props.invoiceDetail?.invoiceKind)} + + {formItems} + + {props.invoiceDetail?.invoiceNote} + +
+ + {/*
+ +
*/} ) diff --git a/src/pages/Invoice/management/InvoiceManagement.tsx b/src/pages/Invoice/management/InvoiceManagement.tsx index 9cb19d1..327adbc 100644 --- a/src/pages/Invoice/management/InvoiceManagement.tsx +++ b/src/pages/Invoice/management/InvoiceManagement.tsx @@ -74,7 +74,7 @@ function InvoiceSearch(props: { handleSearchData: any; }) { const items: MenuProps['items'] = [ { key: '1', - label: ( { + label: ( { invoiceSearchOption.clear(); setActivatedOption("发票代码") }}> @@ -83,13 +83,33 @@ function InvoiceSearch(props: { handleSearchData: any; }) { }, { key: '2', - label: ( { + label: ( { invoiceSearchOption.clear(); setActivatedOption("发票编号") }}> 发票编号 ) + }, + { + key: '3', + label: ( { + invoiceSearchOption.clear(); + setActivatedOption("上传者姓名") + + }}> + 上传者姓名 + ) + }, + { + key: '4', + label: ( { + invoiceSearchOption.clear(); + setActivatedOption("上传者工号") + + }}> + 上传者工号 + ) } ]; const onValuesChange = (changedValues: any, allValues: any) => { @@ -120,12 +140,23 @@ function InvoiceSearch(props: { handleSearchData: any; }) { if (!complexEnabled) invoiceSearchOption.clear() console.log(invoiceSearchOption) - if (activatedOption === "发票代码") { - invoiceSearchOption.invoiceCode = value; - invoiceSearchOption.invoiceNo = null; - } else { - invoiceSearchOption.invoiceNo = value; - invoiceSearchOption.invoiceCode = null; + invoiceSearchOption.invoiceCode = null + invoiceSearchOption.invoiceNo = null + invoiceSearchOption.invoiceUploaderNameFuzzy = null + invoiceSearchOption.invoiceUploaderIdFuzzy = null + switch (activatedOption) { + case "发票代码": + invoiceSearchOption.invoiceCode = value + break; + case "发票编号": + invoiceSearchOption.invoiceNo = value + break; + case "上传者姓名": + invoiceSearchOption.invoiceUploaderNameFuzzy = value + break; + case "上传者工号": + invoiceSearchOption.invoiceUploaderIdFuzzy = value + break; } props.handleSearchData(invoiceSearchOption) diff --git a/src/pages/Invoice/mine/InvoiceListView.css b/src/pages/Invoice/mine/InvoiceListView.css deleted file mode 100644 index 1e77d22..0000000 --- a/src/pages/Invoice/mine/InvoiceListView.css +++ /dev/null @@ -1,13 +0,0 @@ -.simpleSearchBar{ - height:40px; - width:100%; - position: center; - text-align: center; -} -.simpleSearch{ - - text-align: left; -} -.uploadButton{ - -} \ No newline at end of file