去掉工资单发放权限阿牛
This commit is contained in:
parent
65be568847
commit
4164c8b06a
|
|
@ -21,11 +21,7 @@ export default class PayrollGrant extends React.Component {
|
|||
selectedRowKeys: [],
|
||||
payrollGrantVisible: false,
|
||||
payrollWithdrawVisible: false,
|
||||
currentId: "",
|
||||
btnStatus: {
|
||||
can_send: true,
|
||||
show_workflow_status: false
|
||||
}
|
||||
currentId: ""
|
||||
};
|
||||
this.pageInfo = { current: 1, pageSize: 10 };
|
||||
}
|
||||
|
|
@ -36,7 +32,6 @@ export default class PayrollGrant extends React.Component {
|
|||
const {
|
||||
payrollStore: { getPayrollInfo, getInfoList, getPaySa }
|
||||
} = this.props;
|
||||
this.getSendBtnStatus(id);
|
||||
getPayrollInfo(id);
|
||||
getInfoList({
|
||||
salarySendId: id
|
||||
|
|
@ -44,20 +39,6 @@ export default class PayrollGrant extends React.Component {
|
|||
getPaySa();
|
||||
}
|
||||
|
||||
getSendBtnStatus(id) {
|
||||
const { payrollStore: { getSendBtnStatus } } = this.props;
|
||||
getSendBtnStatus({ id })
|
||||
.then(data => {
|
||||
this.setState({
|
||||
btnStatus: {
|
||||
can_send: data.can_send,
|
||||
show_workflow_status: data.show_workflow_status
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
// 撤回
|
||||
handleWithdraw(record) {
|
||||
const { payrollStore } = this.props;
|
||||
|
|
@ -187,19 +168,9 @@ export default class PayrollGrant extends React.Component {
|
|||
style={{ marginRight: "10px" }}
|
||||
onClick={() => {
|
||||
this.handleGrantAll();
|
||||
}}
|
||||
disabled={!this.state.btnStatus.can_send}>
|
||||
}}>
|
||||
全部发放
|
||||
</Button>
|
||||
{this.state.btnStatus.show_workflow_status &&
|
||||
<Button
|
||||
type="primary"
|
||||
style={{ marginRight: "10px" }}
|
||||
onClick={() => {
|
||||
this.handleGrantProxy();
|
||||
}}>
|
||||
发起流程
|
||||
</Button>}
|
||||
<Button
|
||||
type="default"
|
||||
style={{ marginRight: "10px" }}
|
||||
|
|
@ -260,24 +231,6 @@ export default class PayrollGrant extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
handleGrantProxy() {
|
||||
const { payrollStore: { grantProxy } } = this.props;
|
||||
grantProxy({
|
||||
salarySendId: this.state.currentId
|
||||
}).then(data => {
|
||||
this.getSendBtnStatus(this.state.currentId);
|
||||
console.log(
|
||||
`/spa/workflow/static4form/index.html#/main/workflow/req?requestid=` +
|
||||
data.requestId
|
||||
);
|
||||
window.open(
|
||||
`/spa/workflow/static4form/index.html#/main/workflow/req?requestid=` +
|
||||
data.requestId,
|
||||
"_blank"
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
onSelectChange = value => {
|
||||
this.setState({
|
||||
selectedRowKeys: value
|
||||
|
|
|
|||
Loading…
Reference in New Issue