修正了我的报销搜索
parent
c01d602bc3
commit
e63fa0153d
|
@ -84,13 +84,14 @@ class Subpage extends React.Component<any, any> {
|
|||
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<ReimbursementCreate>();
|
||||
columns: ProColumns<TableListItem>[] = [
|
||||
|
@ -282,7 +283,7 @@ class Subpage extends React.Component<any, any> {
|
|||
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<any, any> {
|
|||
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<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={"报销单号:"}
|
||||
|
|
Loading…
Reference in New Issue