diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js index d7e6dd26..c1a24fa8 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js @@ -45,10 +45,8 @@ class Index extends Component { init = () => { const { routeParams: { salaryAcctRecordId } } = this.props; - getApprovalInfoByRecordId({ salaryAcctRecordId }).then(({ status, data }) => { - if (status) { - console.log(data); - } + getApprovalInfoByRecordId({ salaryAcctRecordId }).then(({ status, data: approvalInfo }) => { + if (status) this.setState({ approvalInfo }); }); }; handleMenuClick = ({ key }) => { @@ -144,7 +142,9 @@ class Index extends Component { } }; renderReqBtns = () => { - const { selectedKey, accountExceptInfo } = this.state; + const { routeParams: { salaryAcctRecordId } } = this.props; + const { selectedKey, accountExceptInfo, approvalInfo } = this.state; + const { isOpenApproval, approvalWorkflowUrl } = approvalInfo; let reqBtns = []; switch (selectedKey) { case "calc": @@ -169,6 +169,9 @@ class Index extends Component { this.calc.openAdvanceSearch()} onAdvanceSearch={() => this.calc.onAdSearch(false)}/> ]; + isOpenApproval && reqBtns.unshift(); accountExceptInfo && reqBtns.unshift( this.downloadTxtfile(accountExceptInfo)}/>);