From f5d16ee6ee5e88fd0a70f32dca94288f01dd4c29 Mon Sep 17 00:00:00 2001 From: xixi <123@qq.com> Date: Thu, 22 Aug 2024 16:33:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/NoticeModal/NoticeModal.tsx | 14 +- src/components/RefunModal/RefunModal.css | 30 ++ src/components/RefunModal/RefunModal.tsx | 189 +++++++++ src/components/menu/MenuWithBottomButton.tsx | 1 + src/components/menu/MenuWithTopButton.tsx | 41 +- src/interfaces/menu/IMenuWithTopButton.ts | 2 + src/route/Refun/Refun.tsx | 400 +++++++++++++++++++ src/route/Refun/refun.css | 21 + src/route/index/Index.tsx | 171 ++++++-- src/route/proj/edit/ProjConfigLoginpage.tsx | 6 +- src/route/proj/edit/ProjEditStep1.tsx | 6 +- src/route/router.tsx | 6 +- src/static/refun.png | Bin 0 -> 1364 bytes src/static/revoke.png | Bin 0 -> 2049 bytes 14 files changed, 834 insertions(+), 53 deletions(-) create mode 100644 src/components/RefunModal/RefunModal.css create mode 100644 src/components/RefunModal/RefunModal.tsx create mode 100644 src/route/Refun/Refun.tsx create mode 100644 src/route/Refun/refun.css create mode 100644 src/static/refun.png create mode 100644 src/static/revoke.png diff --git a/src/components/NoticeModal/NoticeModal.tsx b/src/components/NoticeModal/NoticeModal.tsx index 5bfca42..2611574 100644 --- a/src/components/NoticeModal/NoticeModal.tsx +++ b/src/components/NoticeModal/NoticeModal.tsx @@ -217,27 +217,29 @@ export default function NoticeModal() { const rowSelection = { selectedRowKeys, onChange: (newselectedRowKeys: React.Key[], selectedRows: DataType[]) => { - selectedRowKeyRef.current[page]=newselectedRowKeys - selectedRowRef.current[page]=selectedRows + selectedRowKeyRef.current[page] = newselectedRowKeys + selectedRowRef.current[page] = selectedRows // console.log(11111111, newselectedRowKeys, selectedRowKeyRef.current); - const arr=[] + + const arr = [] for (const element in selectedRowKeyRef.current) { // console.log(22222,element); - + arr.push(...selectedRowKeyRef.current[element]) } setSelectedRowKeys(arr); - const arrIds=[] + const arrIds = [] for (const element in selectedRowRef.current) { // console.log(22222,element); - + arrIds.push(...selectedRowRef.current[element]) } const selectedOrderIds = arrIds.map(row => row.userMsgId); setIds(selectedOrderIds) + // setIds(arr) }, }; diff --git a/src/components/RefunModal/RefunModal.css b/src/components/RefunModal/RefunModal.css new file mode 100644 index 0000000..57640ae --- /dev/null +++ b/src/components/RefunModal/RefunModal.css @@ -0,0 +1,30 @@ +.refunModal{ + padding-top: 20px; +} +.refunModal-item{ + display: flex; + /* background-color: skyblue; */ + /* align-items: center; */ + /* justify-content: center; */ +} +.refunModal-title{ + font-size: 16px; + margin-right: 22px; + /* background-color: pink; */ + width: 80px; + display: flex; + justify-content: flex-end; + margin-top: 5px; + margin-left: 10px; +} +.refunModal-red{ + font-size: 20px; + margin-left: 5px; + color:#F04C4C +} +.refunModal-btn{ + /* background-color: skyblue; */ + display: flex; + justify-content: center; + margin-top: 20px; +} \ No newline at end of file diff --git a/src/components/RefunModal/RefunModal.tsx b/src/components/RefunModal/RefunModal.tsx new file mode 100644 index 0000000..41cbc9f --- /dev/null +++ b/src/components/RefunModal/RefunModal.tsx @@ -0,0 +1,189 @@ +import { useEffect, useState } from 'react' +import './RefunModal.css' +import { Form, Select, Button, Upload, message, Input } from 'antd'; +import { UploadOutlined } from '@ant-design/icons'; +import { uploadImageUrl, DevUserId,get } from "../../util/AjaxUtils.ts"; +const { TextArea } = Input; + +export default function RefunModal(props:any) { + const [messageApi, contextHolder] = message.useMessage(); + // 上传附件 + const [refunArray, setRefunArray] = useState([]); + const [selectedReason, setSelectedReason] = useState(''); //选择原因 + + const handleReasonChange = (value: any) => { + setSelectedReason(value); + }; + // const [refunDataArray,setRefunDataArray] = useState([]) //未退款项目 + // 提交表单 + const onFinish = (values: any) => { + console.log('Form values:', values); + props.closeModal() + }; + // 获取未退款项目 + const getRefunData = () => { + get({ + messageApi, + url: `/api/proj/refund/apply/list-proj-unapply/self`, + // url: `/api/proj/refund/apply/listpage?applyStatus=${state.type}`, + onSuccess({data}) { + console.log(data); + + } + }) + } + useEffect(()=>{ + getRefunData() + },[]) + return ( +
+ {contextHolder} +
+
+
+ 退款软著* +
+ + + +
+ {selectedReason === '其他' && ( +
+
+ 其他* +
+ +