feature/2.12.1.2404.02-薪资账套配置流程审批

This commit is contained in:
黎永顺 2024-04-26 11:23:19 +08:00
parent 2e5404bee6
commit ffeb4283b2
1 changed files with 8 additions and 5 deletions

View File

@ -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 {
<AdvanceInputBtn onOpenAdvanceSearch={() => this.calc.openAdvanceSearch()}
onAdvanceSearch={() => this.calc.onAdSearch(false)}/>
];
isOpenApproval && reqBtns.unshift(<Button type="ghost" onClick={() => {
window.open(`${approvalWorkflowUrl}&salaryAcctRecordId=${salaryAcctRecordId}`, "_blank");
}}>{getLabel(111, "发起审批")}</Button>);
accountExceptInfo && reqBtns.unshift(<i className="iconfont icon-jinggao"
title={getLabel(111, "存在异常信息,点击下载!")}
onClick={() => this.downloadTxtfile(accountExceptInfo)}/>);