没有部门
parent
e44b27f239
commit
e7ac6d7b82
|
@ -68,11 +68,14 @@ class ReimbursementCreate extends React.Component<any, any> {
|
||||||
this.formRef.current?.resetFields(["departureName", "destinationName"])
|
this.formRef.current?.resetFields(["departureName", "destinationName"])
|
||||||
})
|
})
|
||||||
store.subscribe(this.handleStoreChange);
|
store.subscribe(this.handleStoreChange);
|
||||||
|
let defaultDepartment = this.departments?.length>0?{id: this.departments[0].departmentId, name: this.departments[0].departmentName}:null;
|
||||||
|
if(defaultDepartment==null)
|
||||||
|
defaultDepartment={id:-1,name:""}
|
||||||
this.state = {
|
this.state = {
|
||||||
loading: false,
|
loading: false,
|
||||||
open: this.props.open,
|
open: this.props.open,
|
||||||
invoices: [],
|
invoices: [],
|
||||||
selectedDepartment: {id: this.departments[0].departmentId, name: this.departments[0].departmentName},
|
selectedDepartment: defaultDepartment,
|
||||||
departmentsProps: {
|
departmentsProps: {
|
||||||
items: departmentsPropItems,
|
items: departmentsPropItems,
|
||||||
onClick: this.handleMenuClick,
|
onClick: this.handleMenuClick,
|
||||||
|
|
Loading…
Reference in New Issue