diff --git a/src/models/Notice.ts b/src/models/Notice.ts new file mode 100644 index 0000000..8c0481c --- /dev/null +++ b/src/models/Notice.ts @@ -0,0 +1,171 @@ +export interface NoticeResponse { + /** + * 本页记录 + */ + records: Notice[]; + /** + * 总条数 + */ + total: number; +} + +/** + * Notice + */ +export interface Notice { + data: NoticeData; + noticeId: string; + noticeTargetId: string; + noticeTime: string; +} + + +/** + * 报销单状态变化通知 + * + * 发票被打回通知 + * + * 审批通知,在列表查询的时候不存在 + */ +export interface NoticeData { + + approvalOpinion?: string; + approvalResult?: number; + approvalStaff?: Staff; + /* + const val SUCCESS = 0. toShort() + const val WAITING_ FOR_ DEPARTMENT _MANAGER_ APPROVAL = 1. toShort() + const val WAITING_ FOR_ FINANCIAL_ APPROVAL = 2. toShort() + const val WAITING_ FOR_ FINANCIAL_ MANAGER_ APPROVAL = 3. toShort() + const vaL WAITING_ FOR_ GENERAL_ MANAGER_ APPROVAL = 4. toShort( ) + const val REJECTED = 5. toShort() + const val TERMINATED = 6. toShort() + */ + noticeType: number; + reimbursement?: Reimbursement; + invoice?: Invoice; + rejectOpinion?: string; + rejectStaff?: Staff; + count?: number; + +} + +/** + * 主管部门 + * + * Department + */ +export interface Department { + deleted_at?: null | string; + /** + * 部门ID + */ + departmentId: number; + /** + * 部门主管 + */ + departmentManager?: Staff; + /** + * 部门名 + */ + departmentName?: string; + /** + * 部门员工 + */ + staff?: Staff[]; +} + +/** + * Staff + * + * 部门主管 + */ +export interface Staff { + banned?: boolean; + /** + * 主管部门 + */ + managingDepartment?: null | Department; + /** + * 员工工作地点 + */ + staffBase?: string; + /** + * 工作部门 + */ + staffDepartments?: Department[]; + /** + * 员工工号 + */ + staffId: string; + /** + * 员工姓名 + */ + staffName: string; + /** + * 密码 + */ + staffPassword?: string; +} + +export interface Invoice { + /** + * 发票金额 + */ + invoiceAmount: number; + /** + * 发票代码 + */ + invoiceCode: string; + /** + * 开票日期 + */ + invoiceDate: string; + /** + * 出发地名称 + */ + invoiceDeparture: null | string; + /** + * 目的地名称 + */ + invoiceDestination: null | string; + /** + * 发票原图Base64 + */ + invoiceFileBase64: string; + /** + * 发票ID + */ + invoiceId: number; + /** + * 发票种类 + */ + invoiceKind: number; + /** + * 发票名称 + */ + invoiceName: null | string; + /** + * 发票编号 + */ + invoiceNo: string; + /** + * 备注 + */ + invoiceNote: null | string; + /** + * 上传时间 + */ + invoiceUploadTime: string; + /** + * 是否被修改 + */ + modified: boolean; +} + +export interface Reimbursement { + reimbursementDepartureName: string; + reimbursementDestinationName: string; + reimbursementId: number; + roundTrip: boolean; +} \ No newline at end of file diff --git a/src/pages/HomeView.tsx b/src/pages/HomeView.tsx index 55e5278..f1aeaf3 100644 --- a/src/pages/HomeView.tsx +++ b/src/pages/HomeView.tsx @@ -1,5 +1,5 @@ import React, {useState, useEffect} from 'react'; -import {UploadOutlined, UserOutlined, BellOutlined} from '@ant-design/icons'; +import {UploadOutlined, UserOutlined, BellOutlined, CloseOutlined} from '@ant-design/icons'; import {Layout, Menu, theme, Typography, Button, Dropdown, MenuProps, Popover} from 'antd'; import {useAppDispatch, useAppSelector} from "../models/hooks"; import {getStaff, getToken, setStaff, setToken, store} from "../models/store"; @@ -10,7 +10,7 @@ import axiosInstance from "../utils/axiosInstance"; import {Department, Staff, Token} from "../models/Staff"; import MessageList from "./MessageList"; -const {Title} = Typography; +const {Title, Text, Paragraph} = Typography; const {Header, Content, Footer, Sider} = Layout; @@ -30,6 +30,7 @@ function HeaderBar(props: any) { case 'password': break case 'logout': + console.log('logout') axiosInstance({ url: 'logout', method: 'post', @@ -48,7 +49,6 @@ function HeaderBar(props: any) { clientSecret: '' })) navigate("/login") - break } }; @@ -89,14 +89,16 @@ function HeaderBar(props: any) { zIndex: 100, boxShadow: '0px 6px 16px 0px rgba(0, 0, 0, 0.08)' }}> -
+
+ +
- + + +
+ )} /> - } title="我的消息"> + } title="我的消息" arrowPointAtCenter> diff --git a/src/pages/configuration/subpage/UserConfig.tsx b/src/pages/configuration/subpage/UserConfig.tsx index c73a8c2..16cd80e 100644 --- a/src/pages/configuration/subpage/UserConfig.tsx +++ b/src/pages/configuration/subpage/UserConfig.tsx @@ -60,7 +60,7 @@ function UserConfig(props: any) { width: 230, render: (value, record) => ( - +