修正了两处bug

main
白封羽 2023-01-06 13:18:47 +08:00
parent c770c86eaf
commit c01d602bc3
2 changed files with 23 additions and 19 deletions

View File

@ -155,7 +155,7 @@ function displaySteps(reimbursement: ReimbursementDetailModal | undefined | null
} }
items.push({ items.push({
// @ts-ignore // @ts-ignore
title: statusEnum2[i - 1] + "审批", title: statusEnum2[i] + "审批",
status: 'error', status: 'error',
subTitle: approvalSteps[i].approvalTime.replace("T", " "), subTitle: approvalSteps[i].approvalTime.replace("T", " "),
description: description description: description
@ -233,11 +233,11 @@ class ReimbursementDetail extends React.Component<any, any> {
approve = () => { approve = () => {
let params = {approvalOpinion: this.state.approvalOpinion} 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("审核成功"); openNotification("审核成功");
this.props.closeDetail(); this.props.closeDetail();
}).catch((err) => { }).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); console.log(err);
}) })
} }
@ -247,7 +247,7 @@ class ReimbursementDetail extends React.Component<any, any> {
openNotification("已终止申请"); openNotification("已终止申请");
this.props.closeDetail(); this.props.closeDetail();
}).catch((err) => { }).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); console.log(err);
}) })
} }
@ -306,12 +306,15 @@ class ReimbursementDetail extends React.Component<any, any> {
}) })
}}/> }}/>
</Row> </Row>
<Row style={{marginTop:15}}> <Row style={{marginTop: 15}}>
<Radio.Group buttonStyle="solid" style={{width:'100%'}} defaultValue={true} onChange={(value) => { <Radio.Group buttonStyle="solid" style={{width: '100%'}} defaultValue={true}
onChange={(value) => {
this.setState({approvalChecked: value.target.value}) this.setState({approvalChecked: value.target.value})
}}> }}>
<Radio.Button value={true} checked={true} style={{width:'50%',textAlign:"center"}}></Radio.Button> <Radio.Button value={true} checked={true}
<Radio.Button value={false} style={{width:'50%',textAlign:"center"}}></Radio.Button> style={{width: '50%', textAlign: "center"}}></Radio.Button>
<Radio.Button value={false}
style={{width: '50%', textAlign: "center"}}></Radio.Button>
</Radio.Group> </Radio.Group>
</Row> </Row>
</> </>

View File

@ -101,6 +101,7 @@ function DisplayInvoicesList(props:{departureInvoice: Invoice, destinationInvoic
} }
let invoiceId = Number(keys[0]); let invoiceId = Number(keys[0]);
axiosInstance.get("common/invoice/" + invoiceId).then((res) => { axiosInstance.get("common/invoice/" + invoiceId).then((res) => {
res.data.invoiceAmount/=100.0
setInvoiceDetail(res.data); setInvoiceDetail(res.data);
setDetailModalOpen(true); setDetailModalOpen(true);
}) })