修正了我的报销搜索

main
白封羽 2023-01-06 13:48:25 +08:00
parent c01d602bc3
commit e63fa0153d
1 changed files with 18 additions and 7 deletions

View File

@ -89,6 +89,7 @@ class Subpage extends React.Component<any, any> {
store.subscribe(this.handleStoreChange);
this.pullDepartment()
}
handleStoreChange = () => {
this.setState({staffId: store.getState().token.staffId})
}
@ -330,8 +331,13 @@ class Subpage extends React.Component<any, any> {
total: totalRecordLength,
});
})
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<any, any> {
optionRender: ({searchText}, {form}, dom) => {
// console.log(searchConfig, formProps, dom)
return [
<div style={{flexWrap: "nowrap", display: "flex", justifyContent: "flex-end", marginRight:6}}>
<div style={{
flexWrap: "nowrap",
display: "flex",
justifyContent: "flex-end",
marginRight: 6
}}>
<Space>
<Search className="searchBar"
addonBefore={"报销单号:"}