diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js index 8d6e72fe..22e7db7d 100644 --- a/pc4mobx/hrmSalary/apis/payroll.js +++ b/pc4mobx/hrmSalary/apis/payroll.js @@ -244,6 +244,22 @@ export const batchWithdrawInfoList = params => { }).then(res => res.json()) } +// 工资单发放-按钮状态 +export const getSendBtnStatus = params => { + return WeaTools.callApi('/api/bs/hrmsalary/salaryBill/send/getSendBtnStatus', 'get', params); +} + +// 工资单发放-扩展按钮点击 +export const grantProxy = params => { + return fetch('/api/bs/hrmsalary/salaryBill/grantProxy', { + method: 'POST', + mode: 'cors', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(params) + }).then(res => res.json()) +} diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 725ce143..75fc6b7d 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -20,7 +20,11 @@ export default class PayrollGrant extends React.Component { this.state = { payrollGrantVisible: false, payrollWithdrawVisible: false, - currentId: "" + currentId: "", + btnStatus: { + can_send: true, + show_workflow_status: false + } } this.pageInfo = {current : 1, pageSize: 10} } @@ -28,7 +32,8 @@ export default class PayrollGrant extends React.Component { componentWillMount() { let id = getQueryString("id") this.setState({currentId: id}) - const { payrollStore: {getPayrollInfo, getInfoList, getPaySa} } = this.props; + const { payrollStore: {getPayrollInfo, getInfoList, getPaySa, } } = this.props; + this.getSendBtnStatus(id) getPayrollInfo(id) getInfoList({ salarySendId:id @@ -36,6 +41,19 @@ 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) { @@ -144,7 +162,11 @@ export default class PayrollGrant extends React.Component { ); return (