From 4a07f5b0a8948d41e01caab8d35cb2b562a812e4 Mon Sep 17 00:00:00 2001 From: YCC Date: Thu, 1 Jun 2023 16:43:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A6=E5=8D=95=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=BC=96=E8=BE=91=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/invoice/Detail.jsx | 212 +++++++++++++++++++---------------- 1 file changed, 113 insertions(+), 99 deletions(-) diff --git a/src/views/invoice/Detail.jsx b/src/views/invoice/Detail.jsx index 8beda1d..b1952a0 100644 --- a/src/views/invoice/Detail.jsx +++ b/src/views/invoice/Detail.jsx @@ -2,9 +2,9 @@ import { useParams, useNavigate, NavLink } from "react-router-dom"; import { useEffect, useState, useRef } from "react"; import { observer } from "mobx-react"; import { toJS, runInAction } from "mobx"; -import { Row, Col, Space, Button, Typography, Card, Form, Upload, Input, Divider, DatePicker, Select, App, Descriptions } from "antd"; +import { Row, Col, Space, Button, Typography, Card, Form, Upload, Input, Divider, DatePicker, Select, App, Descriptions, Image, Steps } from "antd"; import { useStore } from "@/stores/StoreContext.js"; -import { PlusOutlined } from "@ant-design/icons"; +import { PlusOutlined, AuditOutlined, SmileOutlined, SolutionOutlined, EditOutlined } from "@ant-design/icons"; import { isNotEmpty } from "@/utils/commons"; import * as config from "@/config"; import dayjs from "dayjs"; @@ -19,6 +19,7 @@ function Detail() { const { invoicekImages, invoiceGroupInfo, invoiceProductList, invoiceCurrencyList, invoiceZDDetail } = invoiceStore; const [form] = Form.useForm(); const [dataLoading, setDataLoading] = useState(false); + const [edited, setEdited] = useState(true); //表单是否允许编辑 const { formCurrency, onCurrencyChange } = useState(); const { notification } = App.useApp(); @@ -36,7 +37,7 @@ function Detail() { .then(json => { let ZDDetail = json.ZDDetail; - if (isNotEmpty(ZDDetail)){ + if (isNotEmpty(ZDDetail)) { let arrLen = ZDDetail.length; const formData = ZDDetail.map((data, index) => { if (data.GMD_Dealed == false && arrLen == index + 1) { @@ -174,7 +175,13 @@ function Detail() { return ( - @@ -184,31 +191,35 @@ function Detail() { //循环生成多次报账信息 function bindSubmitForm() { - if (isNotEmpty(invoiceZDDetail)){ - let submitForm = invoiceZDDetail.map((data, index) => { + if (isNotEmpty(invoiceZDDetail)) { + let submitForm = invoiceZDDetail.map((data, index) => { if (data.GMD_Dealed) { //已审核的直接显示信息即可,无需表单 return ( - + - - - - - - {data.GMD_Cost} - {data.GMD_Currency} - {data.GMD_PayDate} - {invoiceStore.invoiceStatus(data.FKState)} - - - {addButton(index + 1 == invoiceZDDetail.length)} + + + + + + {data.GMD_Cost} + {data.GMD_Currency} + {data.GMD_PayDate} + {invoiceStore.invoiceStatus(data.FKState)} + + + + + {invoicePicList[index] && + invoicePicList[index].map(item => { + return ; + })} + + + + + {addButton(index++ == invoiceZDDetail.length)} @@ -216,70 +227,77 @@ function Detail() { } else { // 一个团只能有一个未审核的账单记录 return ( - + - -
- Invoice {index + 1} - - -
- -
Click to Upload
-
-
-
- Details - - - {" "} - - - - - - - - - - - - - - - - - - - -
+ }> +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
Upload Invoice
+
+
+
+ +
+
+
@@ -287,19 +305,15 @@ function Detail() { } }); return submitForm; - }else{ - return( - - - - {addButton(1==1)} - - - - ); - + } else { + return ( + + + {addButton(1 == 1)} + + + ); } - } return (