Commit d5db8874 authored by baixian's avatar baixian

优化

parent 24e3717f
...@@ -75,6 +75,7 @@ class LeaveDetailModal extends React.Component { ...@@ -75,6 +75,7 @@ class LeaveDetailModal extends React.Component {
form: { getFieldDecorator, getFieldValue }, form: { getFieldDecorator, getFieldValue },
leaveSubmitLoading, leaveSubmitLoading,
} = this.props; } = this.props;
const { status } = this.state;
return ( return (
<Modal <Modal
visible={visible} visible={visible}
...@@ -126,8 +127,8 @@ class LeaveDetailModal extends React.Component { ...@@ -126,8 +127,8 @@ class LeaveDetailModal extends React.Component {
)} )}
</FormItem> </FormItem>
<div className={pageStyle.btnList}> <div className={pageStyle.btnList}>
<Button htmlType="submit" loading={leaveSubmitLoading} onClick={() => this.handleStatus(4)}>驳回申请</Button> <Button htmlType="submit" loading={status === 4 ? leaveSubmitLoading : ''} onClick={() => this.handleStatus(4)}>驳回申请</Button>
<Button htmlType="submit" loading={leaveSubmitLoading} onClick={() => this.handleStatus(3)} type="primary" style={{ marginLeft: 20 }}>通过申请</Button> <Button htmlType="submit" loading={status === 3 ? leaveSubmitLoading : ''} onClick={() => this.handleStatus(3)} type="primary" style={{ marginLeft: 20 }}>通过申请</Button>
</div> </div>
</Form> </Form>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment