From c01d602bc3c3bc6d5370be9c9f5bf12795b25ee5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=99=BD=E5=B0=81=E7=BE=BD?= <2360164671@qq.com>
Date: Fri, 6 Jan 2023 13:18:47 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BA=86=E4=B8=A4?=
=?UTF-8?q?=E5=A4=84bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mine/ReimbursementDetail.tsx | 41 ++++++++++---------
.../component/ReimbursementDetailFiles.tsx | 1 +
2 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/src/pages/reimbursement/mine/ReimbursementDetail.tsx b/src/pages/reimbursement/mine/ReimbursementDetail.tsx
index e59ddbc..569ae0c 100644
--- a/src/pages/reimbursement/mine/ReimbursementDetail.tsx
+++ b/src/pages/reimbursement/mine/ReimbursementDetail.tsx
@@ -92,8 +92,8 @@ function displayRawInfo(reimbursement: ReimbursementDetailModal | undefined | nu
+ destinationInvoice={reimbursement.reimbursementDestinationInvoice}
+ otherInvoices={reimbursement.invoices}/>
>)
@@ -155,7 +155,7 @@ function displaySteps(reimbursement: ReimbursementDetailModal | undefined | null
}
items.push({
// @ts-ignore
- title: statusEnum2[i - 1] + "审批",
+ title: statusEnum2[i] + "审批",
status: 'error',
subTitle: approvalSteps[i].approvalTime.replace("T", " "),
description: description
@@ -233,11 +233,11 @@ class ReimbursementDetail extends React.Component {
approve = () => {
let params = {approvalOpinion: this.state.approvalOpinion}
- axiosInstance.put("approval/" + this.state.reimbursement.reimbursementId.toString() + "/"+(this.state.approvalChecked?"1":"0"), params).then((res) => {
+ axiosInstance.put("approval/" + this.state.reimbursement.reimbursementId.toString() + "/" + (this.state.approvalChecked ? "1" : "0"), params).then((res) => {
openNotification("审核成功");
this.props.closeDetail();
}).catch((err) => {
- openNotification(err.response.data.msg==null?"操作失败,请稍后重试":err.response.data.msg);
+ openNotification(err.response.data.msg == null ? "操作失败,请稍后重试" : err.response.data.msg);
console.log(err);
})
}
@@ -247,7 +247,7 @@ class ReimbursementDetail extends React.Component {
openNotification("已终止申请");
this.props.closeDetail();
}).catch((err) => {
- openNotification(err.response.data.msg==null?"操作失败,请稍后重试":err.response.data.msg);
+ openNotification(err.response.data.msg == null ? "操作失败,请稍后重试" : err.response.data.msg);
console.log(err);
})
}
@@ -299,20 +299,23 @@ class ReimbursementDetail extends React.Component {
this.state.reimbursement.reimbursementStatus >= 1 && this.state.reimbursement.reimbursementStatus <= 4) {
return (<>
-
-
- {
- this.setState({approvalChecked: value.target.value})
- }}>
- 通过
- 不通过
-
+
+ {
+ this.setState({approvalChecked: value.target.value})
+ }}>
+ 通过
+ 不通过
+
>
)
diff --git a/src/pages/reimbursement/mine/component/ReimbursementDetailFiles.tsx b/src/pages/reimbursement/mine/component/ReimbursementDetailFiles.tsx
index c6638df..c1ec619 100644
--- a/src/pages/reimbursement/mine/component/ReimbursementDetailFiles.tsx
+++ b/src/pages/reimbursement/mine/component/ReimbursementDetailFiles.tsx
@@ -101,6 +101,7 @@ function DisplayInvoicesList(props:{departureInvoice: Invoice, destinationInvoic
}
let invoiceId = Number(keys[0]);
axiosInstance.get("common/invoice/" + invoiceId).then((res) => {
+ res.data.invoiceAmount/=100.0
setInvoiceDetail(res.data);
setDetailModalOpen(true);
})
From e63fa0153d5bf03c14ae0812c9276e880f0cbc33 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=99=BD=E5=B0=81=E7=BE=BD?= <2360164671@qq.com>
Date: Fri, 6 Jan 2023 13:48:25 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BA=86=E6=88=91?=
=?UTF-8?q?=E7=9A=84=E6=8A=A5=E9=94=80=E6=90=9C=E7=B4=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../reimbursement/mine/MyReimbursement.tsx | 25 +++++++++++++------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/src/pages/reimbursement/mine/MyReimbursement.tsx b/src/pages/reimbursement/mine/MyReimbursement.tsx
index 34a607a..d589331 100644
--- a/src/pages/reimbursement/mine/MyReimbursement.tsx
+++ b/src/pages/reimbursement/mine/MyReimbursement.tsx
@@ -84,13 +84,14 @@ class Subpage extends React.Component {
searchWord: "",
onCreated: false,
detailedReimbursement: undefined,
- staffId:store.getState().token.staffId,
+ staffId: store.getState().token.staffId,
}
store.subscribe(this.handleStoreChange);
this.pullDepartment()
}
- handleStoreChange=()=>{
- this.setState({staffId:store.getState().token.staffId})
+
+ handleStoreChange = () => {
+ this.setState({staffId: store.getState().token.staffId})
}
createRef = React.createRef();
columns: ProColumns[] = [
@@ -282,7 +283,7 @@ class Subpage extends React.Component {
let params: any = {
pageNum: current - 1,
pageSize: pageSize,
- reimbursementSubmitStaffId:store.getState().token.staffId,
+ reimbursementSubmitStaffId: store.getState().token.staffId,
}
if (filter.status !== undefined && filter.status !== null && filter.status.length !== 0) {
params['reimbursementStatuses'] = ""
@@ -330,8 +331,13 @@ class Subpage extends React.Component {
total: totalRecordLength,
});
})
- tableListDataSource = await this.converter(response.data, pageSize)
- totalRecordLength = tableListDataSource.length
+ if (response.data.reimbursementSubmitStaff.staffId !== store.getState().token.staffId) {
+ tableListDataSource = await this.converter(response.data, pageSize)
+ totalRecordLength = tableListDataSource.length
+ } else {
+ tableListDataSource = []
+ totalRecordLength = 0
+ }
}
return Promise.resolve({
@@ -384,7 +390,12 @@ class Subpage extends React.Component {
optionRender: ({searchText}, {form}, dom) => {
// console.log(searchConfig, formProps, dom)
return [
-
+
Date: Fri, 6 Jan 2023 14:18:41 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BA=86=E6=88=91?=
=?UTF-8?q?=E7=9A=84=E6=8A=A5=E9=94=80=E6=90=9C=E7=B4=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/reimbursement/mine/MyReimbursement.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pages/reimbursement/mine/MyReimbursement.tsx b/src/pages/reimbursement/mine/MyReimbursement.tsx
index d589331..73362f3 100644
--- a/src/pages/reimbursement/mine/MyReimbursement.tsx
+++ b/src/pages/reimbursement/mine/MyReimbursement.tsx
@@ -331,7 +331,7 @@ class Subpage extends React.Component {
total: totalRecordLength,
});
})
- if (response.data.reimbursementSubmitStaff.staffId !== store.getState().token.staffId) {
+ if (response.data.reimbursementSubmitStaff.staffId === store.getState().token.staffId) {
tableListDataSource = await this.converter(response.data, pageSize)
totalRecordLength = tableListDataSource.length
} else {