添加了通知报销单弹窗
parent
90eaf4f871
commit
6871657990
|
@ -10,6 +10,8 @@ import {Staff} from "../models/Staff";
|
|||
import {InvoiceDetail, invoiceTypeNameMap} from "../models/Invoice";
|
||||
import './MessageList.css';
|
||||
import InvoiceDetailModal from "./Invoice/InvoiceDetailModal";
|
||||
import ReimbursementDetail from "./reimbursement/mine/ReimbursementDetail";
|
||||
import {ReimbursementDetailModal} from "../models/ReimbursementDetailModal";
|
||||
|
||||
const {Text, Title, Paragraph} = Typography
|
||||
const relativeTime = require('dayjs/plugin/relativeTime')
|
||||
|
@ -26,9 +28,8 @@ function MessageList(props: { count: number, onCountChange: (count: number) => v
|
|||
const [index, setIndex] = useState(0)
|
||||
const [invoiceModalOpen, setInvoiceModalOpen] = useState(false)
|
||||
const [invoiceDetail, setInvoiceDetail] = useState<any>()
|
||||
|
||||
const [reimbursementDetail, setReimbursementDetail] = useState<ReimbursementDetailModal>()
|
||||
const pageSize = 10
|
||||
|
||||
const getTitle = (notice: Notice) => {
|
||||
switch (notice.data.noticeType) {
|
||||
case 0:
|
||||
|
@ -169,7 +170,12 @@ function MessageList(props: { count: number, onCountChange: (count: number) => v
|
|||
case 0:
|
||||
const reimbursementId = item.data.reimbursement?.reimbursementId
|
||||
if (reimbursementId) {
|
||||
|
||||
axiosInstance.get("common/reimbursement/" + reimbursementId).then(response => {
|
||||
console.log(response.data)
|
||||
setReimbursementDetail(response.data)
|
||||
}).catch(function (error) {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
break
|
||||
case 1:
|
||||
|
@ -279,6 +285,8 @@ function MessageList(props: { count: number, onCountChange: (count: number) => v
|
|||
</Popover>
|
||||
<InvoiceDetailModal open={invoiceModalOpen} invoiceDetail={invoiceDetail}
|
||||
onClose={() => setInvoiceModalOpen(false)} isBase64={true}/>
|
||||
<ReimbursementDetail closeDetail={()=>{setReimbursementDetail(undefined)}}
|
||||
accessLevel={-1} reimbursement={reimbursementDetail}/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue