Merge remote-tracking branch 'origin/main' into main
commit
25f5cf453b
|
@ -84,13 +84,14 @@ class Subpage extends React.Component<any, any> {
|
||||||
searchWord: "",
|
searchWord: "",
|
||||||
onCreated: false,
|
onCreated: false,
|
||||||
detailedReimbursement: undefined,
|
detailedReimbursement: undefined,
|
||||||
staffId:store.getState().token.staffId,
|
staffId: store.getState().token.staffId,
|
||||||
}
|
}
|
||||||
store.subscribe(this.handleStoreChange);
|
store.subscribe(this.handleStoreChange);
|
||||||
this.pullDepartment()
|
this.pullDepartment()
|
||||||
}
|
}
|
||||||
handleStoreChange=()=>{
|
|
||||||
this.setState({staffId:store.getState().token.staffId})
|
handleStoreChange = () => {
|
||||||
|
this.setState({staffId: store.getState().token.staffId})
|
||||||
}
|
}
|
||||||
createRef = React.createRef<ReimbursementCreate>();
|
createRef = React.createRef<ReimbursementCreate>();
|
||||||
columns: ProColumns<TableListItem>[] = [
|
columns: ProColumns<TableListItem>[] = [
|
||||||
|
@ -282,7 +283,7 @@ class Subpage extends React.Component<any, any> {
|
||||||
let params: any = {
|
let params: any = {
|
||||||
pageNum: current - 1,
|
pageNum: current - 1,
|
||||||
pageSize: pageSize,
|
pageSize: pageSize,
|
||||||
reimbursementSubmitStaffId:store.getState().token.staffId,
|
reimbursementSubmitStaffId: store.getState().token.staffId,
|
||||||
}
|
}
|
||||||
if (filter.status !== undefined && filter.status !== null && filter.status.length !== 0) {
|
if (filter.status !== undefined && filter.status !== null && filter.status.length !== 0) {
|
||||||
params['reimbursementStatuses'] = ""
|
params['reimbursementStatuses'] = ""
|
||||||
|
@ -330,8 +331,13 @@ class Subpage extends React.Component<any, any> {
|
||||||
total: totalRecordLength,
|
total: totalRecordLength,
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
tableListDataSource = await this.converter(response.data, pageSize)
|
if (response.data.reimbursementSubmitStaff.staffId === store.getState().token.staffId) {
|
||||||
totalRecordLength = tableListDataSource.length
|
tableListDataSource = await this.converter(response.data, pageSize)
|
||||||
|
totalRecordLength = tableListDataSource.length
|
||||||
|
} else {
|
||||||
|
tableListDataSource = []
|
||||||
|
totalRecordLength = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
|
@ -384,7 +390,12 @@ class Subpage extends React.Component<any, any> {
|
||||||
optionRender: ({searchText}, {form}, dom) => {
|
optionRender: ({searchText}, {form}, dom) => {
|
||||||
// console.log(searchConfig, formProps, dom)
|
// console.log(searchConfig, formProps, dom)
|
||||||
return [
|
return [
|
||||||
<div style={{flexWrap: "nowrap", display: "flex", justifyContent: "flex-end", marginRight:6}}>
|
<div style={{
|
||||||
|
flexWrap: "nowrap",
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "flex-end",
|
||||||
|
marginRight: 6
|
||||||
|
}}>
|
||||||
<Space>
|
<Space>
|
||||||
<Search className="searchBar"
|
<Search className="searchBar"
|
||||||
addonBefore={"报销单号:"}
|
addonBefore={"报销单号:"}
|
||||||
|
|
|
@ -92,8 +92,8 @@ function displayRawInfo(reimbursement: ReimbursementDetailModal | undefined | nu
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item span={2} label="附件列表">
|
<Descriptions.Item span={2} label="附件列表">
|
||||||
<DisplayInvoicesList departureInvoice={reimbursement.reimbursementDepartureInvoice}
|
<DisplayInvoicesList departureInvoice={reimbursement.reimbursementDepartureInvoice}
|
||||||
destinationInvoice={reimbursement.reimbursementDestinationInvoice}
|
destinationInvoice={reimbursement.reimbursementDestinationInvoice}
|
||||||
otherInvoices={reimbursement.invoices}/>
|
otherInvoices={reimbursement.invoices}/>
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</>)
|
</>)
|
||||||
|
@ -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);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -299,20 +299,23 @@ class ReimbursementDetail extends React.Component<any, any> {
|
||||||
this.state.reimbursement.reimbursementStatus >= 1 && this.state.reimbursement.reimbursementStatus <= 4) {
|
this.state.reimbursement.reimbursementStatus >= 1 && this.state.reimbursement.reimbursementStatus <= 4) {
|
||||||
return (<>
|
return (<>
|
||||||
<Row>
|
<Row>
|
||||||
<TextArea autoSize={{minRows: 2}} placeholder="审批意见" value={this.state.approvalOpinion}
|
<TextArea autoSize={{minRows: 2}} placeholder="审批意见" value={this.state.approvalOpinion}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
approvalOpinion: e.target.value,
|
approvalOpinion: e.target.value,
|
||||||
})
|
})
|
||||||
}}/>
|
}}/>
|
||||||
</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}
|
||||||
this.setState({approvalChecked: value.target.value})
|
onChange={(value) => {
|
||||||
}}>
|
this.setState({approvalChecked: value.target.value})
|
||||||
<Radio.Button value={true} checked={true} style={{width:'50%',textAlign:"center"}}>通过</Radio.Button>
|
}}>
|
||||||
<Radio.Button value={false} style={{width:'50%',textAlign:"center"}}>不通过</Radio.Button>
|
<Radio.Button value={true} checked={true}
|
||||||
</Radio.Group>
|
style={{width: '50%', textAlign: "center"}}>通过</Radio.Button>
|
||||||
|
<Radio.Button value={false}
|
||||||
|
style={{width: '50%', textAlign: "center"}}>不通过</Radio.Button>
|
||||||
|
</Radio.Group>
|
||||||
</Row>
|
</Row>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
|
@ -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);
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue