diff --git a/src/components/card/CardAgent.tsx b/src/components/card/CardAgent.tsx
index 812a72c..2080638 100644
--- a/src/components/card/CardAgent.tsx
+++ b/src/components/card/CardAgent.tsx
@@ -24,13 +24,13 @@ export default function CardAgent(props: IAgent) {
props.handleSelect();
}}>
- {props.logo ? : <>>}
+ {props.logo ? : <>>}
{props.name}
{renderMedal()}
)
diff --git a/src/components/card/CardProj.tsx b/src/components/card/CardProj.tsx
index 8563e71..0d9e782 100644
--- a/src/components/card/CardProj.tsx
+++ b/src/components/card/CardProj.tsx
@@ -70,7 +70,7 @@ export default function CardProj(props: { item: IProj }) {
} else {
nav(`/proj-edit/config-mod-list/${data.projId}`)
}
- }}> 系统菜单管理(0)
+ }}> 系统菜单管理({data.projModCount})
+ }}> 菜单排序({data.projModCount})
{
data.generate.generateStatus == GenerateStatus.SUCCESS ? (
@@ -150,7 +150,19 @@ export default function CardProj(props: { item: IProj }) {
-
+
diff --git a/src/components/card/CardProjAgent.tsx b/src/components/card/CardProjAgent.tsx
index 81300ea..428eff6 100644
--- a/src/components/card/CardProjAgent.tsx
+++ b/src/components/card/CardProjAgent.tsx
@@ -1,21 +1,24 @@
import './card-proj-agent.css'
-import {OrderedListOutlined, NumberOutlined, SearchOutlined} from "@ant-design/icons";
-import { Tag } from 'antd';
+import {OrderedListOutlined, BarsOutlined, SearchOutlined} from "@ant-design/icons";
+import {Tag} from 'antd';
import {IAgent} from "../../interfaces/agent/IAgent.ts";
+import {useNavigate} from "react-router-dom";
export default function CardProjAgent(props: IAgent) {
+ const nav = useNavigate();
+
/**
* 接单状态
*/
const renderTakeStatus = () => {
- if(props.isTake == 0) {
+ if (props.isTake == 0) {
return 待结单;
}
- if(props.isTake == 1) {
+ if (props.isTake == 1) {
return 已接单;
}
- if(props.isTake == 2) {
+ if (props.isTake == 2) {
return 未接单;
}
return <>>;
@@ -25,10 +28,10 @@ export default function CardProjAgent(props: IAgent) {
* 签订状态
*/
const renderAgreementStatus = () => {
- if(props.isAgreement == 0) {
+ if (props.isAgreement == 0) {
return 未签署协议;
}
- if(props.isAgreement == 1) {
+ if (props.isAgreement == 1) {
return 已签署协议;
}
return <>>;
@@ -38,13 +41,13 @@ export default function CardProjAgent(props: IAgent) {
* 结束状态
*/
const renderOverStatus = () => {
- if(props.isOver == 0) {
+ if (props.isOver == 0) {
return 进行中;
}
- if(props.isOver == 1) {
+ if (props.isOver == 1) {
return 完成;
}
- if(props.isOver == 2) {
+ if (props.isOver == 2) {
return 终止
}
return <>>;
@@ -75,26 +78,44 @@ export default function CardProjAgent(props: IAgent) {
-
+ {
+ props.isResult ? (
+
+ ) : <>>
+ }
+
-
{renderTakeStatus()}
-
{renderAgreementStatus()}
-
{renderOverStatus()}
+
+ {renderTakeStatus()}
+ {renderAgreementStatus()}
+
+
+ {renderOverStatus()}
+
)
diff --git a/src/components/card/card-proj-agent.css b/src/components/card/card-proj-agent.css
index ce8019a..0a64957 100644
--- a/src/components/card/card-proj-agent.css
+++ b/src/components/card/card-proj-agent.css
@@ -74,5 +74,12 @@
}
.card-proj-agent .tail {
+ padding: 5px 0;
+ display: flex;
+ justify-content: space-between;
+}
+
+.card-proj-agent .tail .tail-left {
+ margin-right: 0;
}
diff --git a/src/components/list/ListProj.tsx b/src/components/list/ListProj.tsx
index 4ede2d8..7e0bdd9 100644
--- a/src/components/list/ListProj.tsx
+++ b/src/components/list/ListProj.tsx
@@ -1,11 +1,12 @@
import './list-proj.css'
import CardProj from "../card/CardProj.tsx";
import {useRef, MutableRefObject, useState, useEffect, useContext} from "react";
-import {Input, Pagination, message, Spin} from 'antd';
+import {Input, Pagination, message, Spin, Tag, Image} from 'antd';
import {get} from "../../util/AjaxUtils.ts";
import {IndexListContext} from "../../context/IndexListContext.ts";
import {IListPage} from "../../interfaces/listpage/IListPage.ts";
import {IProj} from "../../interfaces/proj/IProj.ts";
+import NoData from "../../assets/no-data.png";
const {Search} = Input;
@@ -50,6 +51,14 @@ export default function ListProj() {
}
const renderList = () => {
+ if(projs.length == 0) {
+ return (
+
+
+ 暂无数据
+
+ )
+ }
return projs.map((item, index) => );
}
@@ -57,11 +66,23 @@ export default function ListProj() {
reqData(page);
}, [indexListContext.status, keywords, page])
+ const renderStatus = () => {
+ if(indexListContext.status == 'ALL') {
+ return 项目:全部项目
+ } else if(indexListContext.status == 'PROCESSING') {
+ return 项目:进行中的
+ } else if(indexListContext.status == 'COMPLETE') {
+ return 项目:已完成的
+ }
+ return <>>
+ }
+
return (
<>
{contextHolder}
+ {renderStatus()}
{
setKeywords(value)
}} style={{width: 200}}/>
diff --git a/src/components/list/ListProjAgent.tsx b/src/components/list/ListProjAgent.tsx
index 400b01f..36c2e52 100644
--- a/src/components/list/ListProjAgent.tsx
+++ b/src/components/list/ListProjAgent.tsx
@@ -1,12 +1,13 @@
import './list-proj-agent.css';
import CardProjAgent from "../card/CardProjAgent.tsx";
import {useRef, MutableRefObject, useEffect, useState, useContext} from "react";
-import {Input, Pagination, Spin} from 'antd';
+import {Image, Input, Pagination, Spin, Tag} from 'antd';
import {get} from "../../util/AjaxUtils.ts";
import useMessage from "antd/es/message/useMessage";
import {IListPage} from "../../interfaces/listpage/IListPage.ts";
import {IndexListContext} from "../../context/IndexListContext.ts";
import {IAgent} from "../../interfaces/agent/IAgent.ts";
+import NoData from "../../assets/no-data.png";
const {Search} = Input;
@@ -51,42 +52,62 @@ export default function ListProjAgent() {
})
}, [indexListContext.status, keywords, page])
+ const renderStatus = () => {
+ if (indexListContext.status == 'ALL') {
+ return 代理:全部项目
+ } else if (indexListContext.status == 'PROCESSING') {
+ return 代理:进行中的
+ } else if (indexListContext.status == 'COMPLETE') {
+ return 代理:已完成的
+ }
+ return <>>
+ }
+
+ const renderList = () => {
+ if(agents.length == 0) {
+ return (
+
+
+ 暂无数据
+
+ )
+ }
+ return agents.map(item =>
+ )
+ }
return (
<>
+ {renderStatus()}
{
setKeywords(value)
}} style={{width: 200}}/>
-
- {
- agents.map(item => )
- }
-
+ {renderList()}
diff --git a/src/components/list/list-proj-agent.css b/src/components/list/list-proj-agent.css
index 19ced95..1acb6a6 100644
--- a/src/components/list/list-proj-agent.css
+++ b/src/components/list/list-proj-agent.css
@@ -5,7 +5,8 @@
.list-proj-agent .top {
padding: 10px 15px;
display: flex;
- justify-content: right;
+ justify-content: space-between;
+ align-items: center;
border-bottom: 1px solid var(--color-border);
background-color: var(--color-light);
}
diff --git a/src/components/list/list-proj.css b/src/components/list/list-proj.css
index 04de9b0..dd146f0 100644
--- a/src/components/list/list-proj.css
+++ b/src/components/list/list-proj.css
@@ -5,7 +5,8 @@
.list-proj .top {
padding: 10px 15px;
display: flex;
- justify-content: right;
+ justify-content: space-between;
+ align-items: center;
border-bottom: 1px solid var(--color-border);
background-color: var(--color-light);
}
diff --git a/src/components/menu/MenuTreeWithTopButton.tsx b/src/components/menu/MenuTreeWithTopButton.tsx
index 0673ee6..fbb6dbd 100644
--- a/src/components/menu/MenuTreeWithTopButton.tsx
+++ b/src/components/menu/MenuTreeWithTopButton.tsx
@@ -1,23 +1,27 @@
import './menu-tree-with-top-button.css';
import MenuTree from "./MenuTree.tsx";
import {IMenuTreeItem} from "../../interfaces/menu/IMenuTree.ts";
-import {useState} from "react";
+import {useEffect, useState} from "react";
+import {del, get, post, put} from "../../util/AjaxUtils.ts";
+import useMessage from "antd/es/message/useMessage";
class MenuTreeItem implements IMenuTreeItem {
children: Array | null;
id: string;
+ pId: string;
+ level: number;
isEdit: boolean;
isOpen: boolean;
isParent: boolean;
- level: number;
name: string;
oldName: string;
- constructor(id: string, name: string, level: number) {
+ constructor(id: string, pId: string, name: string, level: number) {
this.id = id;
+ this.pId = pId;
+ this.level = level;
this.name = name;
this.oldName = name;
- this.level = level;
this.isEdit = false;
this.isOpen = false;
this.isParent = false;
@@ -26,86 +30,161 @@ class MenuTreeItem implements IMenuTreeItem {
}
+type ProjCategoryDTO = {
+ projCategoryId: string;
+ projCategoryParentId: string;
+ projCategoryParentName: string;
+ isParent: boolean;
+ projCategoryName: string;
+ projCategoryCode: string;
+
+ subProjCategory: ProjCategoryDTO[];
+}
+
export default function MenuTreeWithTopButton() {
+ const [messageApi, messageContext] = useMessage();
const menuTrees: Array = [];
const [menuTreeArray, setMenuTreeArray] = useState(menuTrees);
+ const newCategoryName: string = '新目录';
+
+ const menuArray = (datas: ProjCategoryDTO[], level: number) => {
+ const menus: MenuTreeItem[] = [];
+ datas.forEach((item) => {
+ const menu = new MenuTreeItem(item.projCategoryId, item.projCategoryParentId, item.projCategoryName, level);
+ if (item.subProjCategory && item.subProjCategory.length > 0) {
+ menu.isParent = true;
+ menu.children = menuArray(item.subProjCategory, level + 1);
+ }
+ menus.push(menu);
+ })
+ return menus;
+ }
+
+ useEffect(() => {
+ get({
+ messageApi,
+ url: '/api/proj/category/listallbyparentid/0',
+ onSuccess({data}) {
+ setMenuTreeArray(menuArray(data, 1));
+ }
+ })
+ }, []);
return (
-
-
- {
- setMenuTreeArray([
- ...menuTreeArray
- ])
- }}
- handleExpand={() => {
- }}
- handleAddClick={(item) => {
- item.isParent = true;
- item.isOpen = true;
- if (!item.children) {
- item.children = new Array();
- }
- const menuTreeItem = new MenuTreeItem(`${new Date().getTime()}`, item.level + '级目录', item.level + 1);
- menuTreeItem.isOpen = true;
- item.children.push(menuTreeItem);
- setMenuTreeArray([
- ...menuTreeArray
- ])
- }
- }
- handleEditClick={(item) => {
- item.isEdit = true;
- setMenuTreeArray([
- ...menuTreeArray
- ])
- }}
- handleRemoveClick={(_item, index, parent) => {
- if (parent) {
- parent?.children?.splice(index, 1);
- } else {
- menuTreeArray.splice(index, 1);
- }
- setMenuTreeArray([
- ...menuTreeArray
- ])
- }}
- handleEditSaveClick={(item) => {
- // 这里发请求,成功之后修改,失败还原
- if (item.name === '') {
- return;
- }
- item.oldName = item.name;
- item.isEdit = false;
- setMenuTreeArray([
- ...menuTreeArray
- ])
- }}
- handleEditCancelClick={(item) => {
- item.name = item.oldName;
- item.isEdit = false;
- setMenuTreeArray([
- ...menuTreeArray
- ])
- }}
- handleNameChange={() => {
- setMenuTreeArray([
- ...menuTreeArray
- ])
- }}
- />
-
+ <>
+
+
+
{
+ setMenuTreeArray([
+ ...menuTreeArray
+ ])
+ }}
+ handleExpand={() => {
+ }}
+ handleAddClick={(item) => {
+ post({
+ messageApi,
+ url: '/api/proj/category/save',
+ body: {
+ projCategoryParentId: item.id,
+ projCategoryName: newCategoryName
+ },
+ onSuccess({data}) {
+ item.isParent = true;
+ item.isOpen = true;
+ if (!item.children) {
+ item.children = new Array();
+ }
+ const menuTreeItem = new MenuTreeItem(`${data.data}`, item.id, newCategoryName, item.level + 1);
+ menuTreeItem.isParent = false;
+ item.children.push(menuTreeItem);
+ setMenuTreeArray([
+ ...menuTreeArray
+ ])
+ }
+ })
+ }}
+ handleEditClick={(item) => {
+ item.isEdit = true;
+ setMenuTreeArray([
+ ...menuTreeArray
+ ])
+ }}
+ handleRemoveClick={(item, index, parent) => {
+ del({
+ messageApi,
+ url: `/api/proj/category/delete/${item.id}`,
+ onSuccess() {
+ if (parent) {
+ parent?.children?.splice(index, 1);
+ } else {
+ menuTreeArray.splice(index, 1);
+ }
+ setMenuTreeArray([
+ ...menuTreeArray
+ ])
+ }
+ })
+ }}
+ handleEditSaveClick={(item) => {
+ // 这里发请求,成功之后修改,失败还原
+ if (item.name === '') {
+ return;
+ }
+ put({
+ messageApi,
+ url: `/api/proj/category/update/${item.id}`,
+ body: {
+ projCategoryParentId: item.pId,
+ projCategoryName: item.name
+ },
+ onSuccess() {
+ item.oldName = item.name;
+ item.isEdit = false;
+ setMenuTreeArray([
+ ...menuTreeArray
+ ])
+ }
+ })
+ }}
+ handleEditCancelClick={(item) => {
+ item.name = item.oldName;
+ item.isEdit = false;
+ setMenuTreeArray([
+ ...menuTreeArray
+ ])
+ }}
+ handleNameChange={() => {
+ setMenuTreeArray([
+ ...menuTreeArray
+ ])
+ }}
+ />
+
+ {messageContext}
+ >
)
}
\ No newline at end of file
diff --git a/src/components/menu/menu-with-top-button.css b/src/components/menu/menu-with-top-button.css
index 33975ef..d7773cc 100644
--- a/src/components/menu/menu-with-top-button.css
+++ b/src/components/menu/menu-with-top-button.css
@@ -19,7 +19,8 @@
}
.menu-with-top-button ul li:hover {
- background-color: var(--color-hover);
+ text-decoration-line: underline;
+ text-underline-offset: 5px;
}
.menu-with-top-button ul li:last-child {
diff --git a/src/interfaces/menu/IMenuTree.ts b/src/interfaces/menu/IMenuTree.ts
index e4aa8ee..88763c1 100644
--- a/src/interfaces/menu/IMenuTree.ts
+++ b/src/interfaces/menu/IMenuTree.ts
@@ -1,8 +1,9 @@
export interface IMenuTreeItem {
id: string;
+ pId: string;
+ level: number;
name: string;
oldName: string;
- level: number;
isEdit: boolean;
isOpen: boolean;
isParent: boolean;
diff --git a/src/interfaces/proj/IProj.ts b/src/interfaces/proj/IProj.ts
index 5a2e29d..a335850 100644
--- a/src/interfaces/proj/IProj.ts
+++ b/src/interfaces/proj/IProj.ts
@@ -69,6 +69,7 @@ export interface IProj {
projStyleType: ProjStyleType;
previewUrl: string;
gmtCreate: string;
+ projModCount: number;
generate: IProjGenerate;
pay: IProjPay;
diff --git a/src/route/agent/AgentAgreement.tsx b/src/route/agent/AgentAgreement.tsx
new file mode 100644
index 0000000..7ec506b
--- /dev/null
+++ b/src/route/agent/AgentAgreement.tsx
@@ -0,0 +1,254 @@
+import './agent-agreement.css'
+import {Link, useParams} from "react-router-dom";
+import {
+ Breadcrumb,
+ Button,
+ GetProp,
+ message,
+ Spin,
+ Table,
+ TableProps,
+ Tag,
+ Upload,
+ UploadProps
+} from "antd";
+import {useEffect, useState} from "react";
+import {DevUserId, get, put, uploadFileUrl} from "../../util/AjaxUtils.ts";
+import {IListPage} from "../../interfaces/listpage/IListPage.ts";
+import useMessage from "antd/es/message/useMessage";
+import useModal from "antd/es/modal/useModal";
+import {DownloadOutlined, UploadOutlined} from "@ant-design/icons";
+
+type TableDataType = {
+ orderId: string;
+ signDate: string;
+ signFileId: string;
+ creator: string;
+ gmtCreate: string;
+ orderAgreementFile: string;
+ orderAgreementId: string;
+ orderAgreementName: string;
+ orderAgreementNote: string;
+ orderAgreementStatus: string;
+ orderAgreementStatusText: string;
+}
+
+type FileType = Parameters>[0];
+
+export default function AgentAgreement() {
+ const pathParams = useParams();
+ const [messageApi, contextHolder] = useMessage();
+ const [modal, modalHolder] = useModal();
+ const [isLoading, setIsLoading] = useState(false);
+ const [isConfirmLoading, setIsConfirmLoading] = useState(false);
+ const [page, setPage] = useState(1);
+ const [total, setTotal] = useState(0);
+ const [dataArray, setDataArray] = useState([]);
+ const [uploadSignFileId, setUploadSignFileId] = useState('');
+
+ const domHeight = window.innerHeight - 180;
+
+ const beforeUpload = (file: FileType) => {
+ const isJpgOrPng = file.type === 'application/pdf';
+ if (!isJpgOrPng) {
+ message.error('只能上传 PDF 格式文件!');
+ return;
+ }
+ return isJpgOrPng;
+ };
+
+ const columns: TableProps['columns'] = [
+ {
+ title: '协议名称',
+ dataIndex: 'orderAgreementName',
+ key: 'orderAgreementName',
+ align: 'center',
+ width: 200
+ },
+ {
+ title: '协议备注',
+ dataIndex: 'orderAgreementNote',
+ key: 'orderAgreementNote',
+ align: 'center',
+
+ },
+ {
+ title: '协议状态',
+ dataIndex: 'orderAgreementStatusText',
+ key: 'orderAgreementStatusText',
+ align: 'center',
+ width: 150,
+ render: value => {
+ return {value}
+ }
+ },
+ {
+ title: '创建时间',
+ dataIndex: 'gmtCreate',
+ key: 'gmtCreate',
+ align: 'center',
+ width: 180
+ },
+ {
+ title: '协议签订时间',
+ dataIndex: 'signDate',
+ key: 'signDate',
+ align: 'center',
+ width: 180,
+ render: (value) => {
+ if(value) {
+ return value;
+ }
+ return '-'
+ }
+ },
+ {
+ title: '甲方协议',
+ dataIndex: 'orderAgreementId',
+ key: 'orderAgreementId',
+ align: 'center',
+ width: 100,
+ render: (value) => {
+ return 下载
+ }
+ },
+ {
+ title: '乙方协议',
+ dataIndex: 'signFileId',
+ key: 'signFileId',
+ align: 'center',
+ width: 150,
+ render: (value) => {
+ if(value) {
+ return 下载
+ }
+ return (
+ {
+ if (info.file.status !== 'uploading') {
+ console.log(info.file, info.fileList);
+ }
+ if (info.file.status === 'done') {
+ message.success('上传成功');
+ info.file.name = '协议文件';
+ setUploadSignFileId(info.file.response.data.fileId);
+ } else if (info.file.status === 'error') {
+ message.error('上传失败');
+ }
+ }
+ }
+ onRemove={() => {
+ setUploadSignFileId('');
+ }}
+ >
+ {
+ e.preventDefault();
+ }}> {uploadSignFileId ? '重新上传' : '上传'}
+
+ )
+ }
+ },
+ {
+ title: '操作',
+ dataIndex: 'option',
+ key: 'option',
+ align: 'center',
+ width: 120,
+ render: (_value, record) => {
+ if(!uploadSignFileId) {
+ return <>->
+ }
+ return (
+
+ )
+ }
+ },
+ ];
+
+ const getData = () => {
+ get>({
+ messageApi,
+ url: `/api/agent/order/agreement/listpage/order-id/${pathParams.orderId}`,
+ onBefore() {
+ setIsLoading(true)
+ },
+ onSuccess({data}) {
+ setDataArray([
+ ...data.rows
+ ])
+ setPage(data.page);
+ setTotal(data.total);
+ },
+ onFinally() {
+ setIsLoading(false)
+ }
+ })
+ }
+
+ useEffect(() => {
+ getData();
+ }, [page])
+
+ return (
+ <>
+ 首页},
+ {title: '协议清单'},
+ ]}
+ />
+
+
+ {
+ setPage(page);
+ }
+ }}/>
+
+
+
+ {contextHolder}
+ {modalHolder}
+ >
+ )
+}
\ No newline at end of file
diff --git a/src/route/agent/AgentCorrection.tsx b/src/route/agent/AgentCorrection.tsx
new file mode 100644
index 0000000..ba464ef
--- /dev/null
+++ b/src/route/agent/AgentCorrection.tsx
@@ -0,0 +1,211 @@
+import './agent-correction.css'
+import {Link, useParams} from "react-router-dom";
+import {
+ Breadcrumb,
+ message,
+ Spin,
+ Table,
+ TableProps,
+ Upload,
+} from "antd";
+import {useEffect, useState} from "react";
+import {DownloadOutlined, UploadOutlined} from '@ant-design/icons';
+import {DevUserId, get, put, uploadFileUrl} from "../../util/AjaxUtils.ts";
+import {IListPage} from "../../interfaces/listpage/IListPage.ts";
+import useMessage from "antd/es/message/useMessage";
+
+type TableDataType = {
+ creator: string;
+ gmtCreate: string;
+ isMaterial: number;
+ isUpload: number;
+ materialAmendAttr: string;
+ materialAmendExplain: string;
+ materialAmendFile: string;
+ materialAmendType: string;
+ orderId: string;
+ orderMaterialAmendId: string;
+ orderNumber: string;
+}
+
+export default function AgentCorrection() {
+ const pathParams = useParams();
+ const [messageApi, contextHolder] = useMessage();
+ const [isLoading, setIsLoading] = useState(false);
+ const [isConfirmLoading, setIsConfirmLoading] = useState(false);
+ const [page, setPage] = useState(1);
+ const [total, setTotal] = useState(0);
+ const [dataArray, setDataArray] = useState([]);
+ const [uploadSignFileId, setUploadSignFileId] = useState('');
+
+ const domHeight = window.innerHeight - 180;
+
+ const columns: TableProps['columns'] = [
+ {
+ title: '资料类型',
+ dataIndex: 'materialAmendType',
+ key: 'materialAmendType',
+ align: 'center',
+ width: 200,
+ render: (value) => {
+ if(value === 'OM_FILE') {
+ return '操作手册';
+ }
+ if(value === 'CODE_FILE') {
+ return '源代码';
+ }
+ if(value === 'Af_File') {
+ return '申请表';
+ }
+ if(value === 'OTHER') {
+ return '其他';
+ }
+ return '错误'
+ }
+ },
+ {
+ title: '说明',
+ dataIndex: 'materialAmendExplain',
+ key: 'materialAmendExplain',
+ align: 'center',
+
+ },
+ {
+ title: '创建时间',
+ dataIndex: 'gmtCreate',
+ key: 'gmtCreate',
+ align: 'center',
+ width: 180
+ },
+ {
+ title: '附件',
+ dataIndex: 'materialAmendAttr',
+ key: 'materialAmendAttr',
+ align: 'center',
+ width: 100,
+ render: (value) => {
+ return 下载
+ }
+ },
+ {
+ title: '补正资料',
+ dataIndex: 'materialAmendFile',
+ key: 'materialAmendFile',
+ align: 'center',
+ width: 100,
+ render: (value) => {
+ if(!value) {
+ return '-';
+ }
+ return 下载
+ }
+ },
+ {
+ title: '操作',
+ dataIndex: 'option',
+ key: 'option',
+ align: 'center',
+ width: 120,
+ render: (_value, record) => {
+ if(record.materialAmendFile) {
+ return '-';
+ }
+ return (
+ {
+ if (info.file.status !== 'uploading') {
+ console.log(info.file, info.fileList);
+ }
+ if (info.file.status === 'done') {
+ message.success('上传成功');
+ info.fileList.splice(0);
+ put({
+ messageApi,
+ url: 'api/agent/order/correction/update',
+ body: {
+ orderMaterialAmendId: record.orderMaterialAmendId,
+ fileId : info.file.response.data.fileId
+ },
+ onBefore() {
+ setIsConfirmLoading(true);
+ },
+ onSuccess() {
+ messageApi.success('提交成功')
+ getData();
+ },
+ onFinally() {
+ setIsConfirmLoading(false);
+ }
+ })
+ } else if (info.file.status === 'error') {
+ message.error('上传失败');
+ }
+ }
+ }
+ onRemove={() => {
+ setUploadSignFileId('');
+ }}
+ >
+ {
+ e.preventDefault();
+ }}> {uploadSignFileId ? '重新上传' : '上传'}
+
+ )
+ }
+ },
+ ];
+
+ const getData = () => {
+ get>({
+ messageApi,
+ url: `/api/agent/order/correction/listpage/order-id/${pathParams.orderId}`,
+ onBefore() {
+ setIsLoading(true)
+ },
+ onSuccess({data}) {
+ setDataArray([
+ ...data.rows
+ ])
+ setPage(data.page);
+ setTotal(data.total);
+ },
+ onFinally() {
+ setIsLoading(false)
+ }
+ })
+ }
+
+ useEffect(() => {
+ getData();
+ }, [page])
+
+ return (
+ <>
+ 首页},
+ {title: '补正列表'},
+ ]}
+ />
+
+
+ {
+ setPage(page);
+ }
+ }}/>
+
+
+
+ {contextHolder}
+ >
+ )
+}
\ No newline at end of file
diff --git a/src/route/agent/AgentResult.tsx b/src/route/agent/AgentResult.tsx
new file mode 100644
index 0000000..723a843
--- /dev/null
+++ b/src/route/agent/AgentResult.tsx
@@ -0,0 +1,175 @@
+import './agent-result.css'
+import {Link, useParams} from "react-router-dom";
+import {
+ Breadcrumb, Button,
+ Spin,
+ Table,
+ TableProps,
+} from "antd";
+import {useEffect, useState} from "react";
+import {get, put} from "../../util/AjaxUtils.ts";
+import {IListPage} from "../../interfaces/listpage/IListPage.ts";
+import useMessage from "antd/es/message/useMessage";
+import useModal from "antd/es/modal/useModal";
+
+type TableDataType = {
+ creator: string;
+ gmtCreate: string;
+ isSure: number;
+ isUpload: number;
+ orderId: string;
+ orderNumber: string;
+ orderResultExplain: string;
+ orderResultFile: string;
+ orderResultId: string;
+ sureDate: string;
+ sureExplain: string;
+}
+
+export default function AgentResult() {
+ const pathParams = useParams();
+ const [messageApi, contextHolder] = useMessage();
+ const [modal, modalContext] = useModal();
+ const [isLoading, setIsLoading] = useState(false);
+ const [isConfirmLoading, setIsConfirmLoading] = useState(false);
+ const [page, setPage] = useState(1);
+ const [total, setTotal] = useState(0);
+ const [dataArray, setDataArray] = useState([]);
+
+ const domHeight = window.innerHeight - 180;
+
+ const columns: TableProps['columns'] = [
+ {
+ title: '说明',
+ dataIndex: 'orderResultExplain',
+ key: 'orderResultExplain',
+ align: 'center',
+ },
+ {
+ title: '上传时间',
+ dataIndex: 'gmtCreate',
+ key: 'gmtCreate',
+ align: 'center',
+ width: 180
+ },
+ {
+ title: '资料',
+ dataIndex: 'orderResultFile',
+ key: 'orderResultFile',
+ align: 'center',
+ width: 200,
+ render: (value) => {
+ return 证书下载
+ }
+ },
+ {
+ title: '确认时间',
+ dataIndex: 'sureDate',
+ key: 'sureDate',
+ align: 'center',
+ width: 180,
+ render: (value) => {
+ if (!value) {
+ return '-';
+ }
+ return value;
+ }
+ },
+ {
+ title: '操作',
+ dataIndex: 'option',
+ key: 'option',
+ align: 'center',
+ width: 120,
+ render: (_value, record) => {
+ if (record.isSure == 1) {
+ return <>->;
+ }
+ return
+ }
+ },
+ ];
+
+ const getData = () => {
+ get>({
+ messageApi,
+ url: `/api/agent/order/result/listpage/order-id/${pathParams.orderId}`,
+ onBefore() {
+ setIsLoading(true)
+ },
+ onSuccess({data}) {
+ setDataArray([
+ ...data.rows
+ ])
+ setPage(data.page);
+ setTotal(data.total);
+ },
+ onFinally() {
+ setIsLoading(false)
+ }
+ })
+ }
+
+ useEffect(() => {
+ getData();
+ }, [page])
+
+ return (
+ <>
+ 首页},
+ {title: '结果列表'},
+ ]}
+ />
+
+
+ {
+ setPage(page);
+ }
+ }}/>
+
+
+
+ {contextHolder}
+ {modalContext}
+ >
+ )
+}
\ No newline at end of file
diff --git a/src/route/agent/AgentSelect.tsx b/src/route/agent/AgentSelect.tsx
index 1534181..8d1d2f7 100644
--- a/src/route/agent/AgentSelect.tsx
+++ b/src/route/agent/AgentSelect.tsx
@@ -150,6 +150,7 @@ export default function AgentSelect() {
))
@@ -167,7 +168,7 @@ export default function AgentSelect() {
if (!selectedAgent) {
return (
-
+
请选择左侧机构
)
@@ -237,7 +238,7 @@ export default function AgentSelect() {
setIsConfirmLoading(true);
},
onSuccess() {
- messageApi.success('提交成功', 1000, () => {
+ messageApi.success('提交成功', 1, () => {
nav(-1);
});
},
diff --git a/src/route/agent/agent-agreement.css b/src/route/agent/agent-agreement.css
new file mode 100644
index 0000000..d51d9cf
--- /dev/null
+++ b/src/route/agent/agent-agreement.css
@@ -0,0 +1,4 @@
+.agreement-container {
+ background-color: var(--color-light);
+ padding: 15px;
+}
\ No newline at end of file
diff --git a/src/route/agent/agent-correction.css b/src/route/agent/agent-correction.css
new file mode 100644
index 0000000..b11f230
--- /dev/null
+++ b/src/route/agent/agent-correction.css
@@ -0,0 +1,4 @@
+.correction-container {
+ background-color: var(--color-light);
+ padding: 15px;
+}
\ No newline at end of file
diff --git a/src/route/agent/agent-result.css b/src/route/agent/agent-result.css
new file mode 100644
index 0000000..87278e0
--- /dev/null
+++ b/src/route/agent/agent-result.css
@@ -0,0 +1,4 @@
+.result-container {
+ background-color: var(--color-light);
+ padding: 15px;
+}
\ No newline at end of file
diff --git a/src/route/index/Index.tsx b/src/route/index/Index.tsx
index 38f37ac..f24a078 100644
--- a/src/route/index/Index.tsx
+++ b/src/route/index/Index.tsx
@@ -1,6 +1,6 @@
import './index.css';
-import {MouseEvent, Reducer, useReducer} from "react";
-import {Link, useNavigate} from "react-router-dom";
+import {MouseEvent, Reducer, useEffect, useReducer} from "react";
+import {Link, useNavigate, useSearchParams} from "react-router-dom";
import {IMenuListItem, IMenuWithTopButton} from "../../interfaces/menu/IMenuWithTopButton.ts";
import MenuWithTopButton from "../../components/menu/MenuWithTopButton.tsx";
import MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx";
@@ -17,6 +17,7 @@ import {
export default function Index() {
const nav = useNavigate();
+ const [searchParams] = useSearchParams();
const listReducer = (state: ListData, action: ListAction) => {
if(action.type == IndexListDataType.PROJ) {
@@ -59,7 +60,10 @@ export default function Index() {
button: {
name: '代理服务',
handle() {
-
+ dispatch({
+ type: IndexListDataType.PROJ,
+ value: 'COMPLETE'
+ })
}
},
list: [
@@ -75,6 +79,16 @@ export default function Index() {
}
}
+
+ useEffect(() => {
+ if(searchParams.get('type') == 'agent') {
+ dispatch({
+ type: IndexListDataType.AGENT,
+ value: 'ALL'
+ })
+ }
+ }, []);
+
return (
<>
+ },
+ {
+ path: '/agent-agreement/:orderId',
+ element:
+ },
+ {
+ path: '/agent-correction/:orderId',
+ element:
+ },
+ {
+ path: '/agent-result/:orderId',
+ element:
}
])
\ No newline at end of file
diff --git a/src/route/user/UserEdit.tsx b/src/route/user/UserEdit.tsx
index c44ad60..9c2f4a9 100644
--- a/src/route/user/UserEdit.tsx
+++ b/src/route/user/UserEdit.tsx
@@ -57,12 +57,13 @@ export default function UserEdit(props: IUserEditProps) {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
if (!isJpgOrPng) {
message.error('只能上传 JPG/PNG 格式文件!');
+ return;
}
return isJpgOrPng;
};
useEffect(() => {
- get({
+ get({
messageApi,
url: 'api/user-info/get-self',
onSuccess({data}) {