修正了我的报销搜索

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); store.subscribe(this.handleStoreChange);
this.pullDepartment() this.pullDepartment()
} }
handleStoreChange = () => { handleStoreChange = () => {
this.setState({staffId: store.getState().token.staffId}) this.setState({staffId: store.getState().token.staffId})
} }
@ -330,8 +331,13 @@ class Subpage extends React.Component<any, any> {
total: totalRecordLength, total: totalRecordLength,
}); });
}) })
if (response.data.reimbursementSubmitStaff.staffId !== store.getState().token.staffId) {
tableListDataSource = await this.converter(response.data, pageSize) tableListDataSource = await this.converter(response.data, pageSize)
totalRecordLength = tableListDataSource.length 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={"报销单号:"}