diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js index 8e4a2d5e..fbc8abb9 100644 --- a/pc4mobx/hrmSalary/apis/calculate.js +++ b/pc4mobx/hrmSalary/apis/calculate.js @@ -218,8 +218,8 @@ export const exportComparisonResult = (salaryAcctRecordId) => { }; // 核算进度条 -export const getCalculateProgress = (id) => { - return WeaTools.callApi("/api/bs/hrmsalary/progress/getRate?cacheKey=ACCT_PROGRESS_" + id, "get", {}); +export const getCalculateProgress = (id = "", paymentOrganization = "") => { + return WeaTools.callApi(`/api/bs/hrmsalary/progress/getRate?cacheKey=ACCT_PROGRESS_${id}_${paymentOrganization}`, "get", {}); }; // 核算进度条 diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js index 80083d56..55e0bc78 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js @@ -60,36 +60,37 @@ class StandingBook extends Component { progressVisible: true }, () => { this.timer = setInterval(() => { - getCalculateProgress(moment(billMonth).format("YYYY-MM")).then(({ status, data }) => { - if (status) { - if (!data.status) { - clearInterval(this.timer); - this.setState({ progressVisible: false, progress: 0 }); - message.error(data.message); - return; - } - if (this.state.progress !== 100) { - this.setState({ - progress: (Number(data.progress).toFixed(2)) * 100 - }); + getCalculateProgress(moment(billMonth).format("YYYY-MM"), payload.paymentOrganization) + .then(({ status, data }) => { + if (status) { + if (!data.status) { + clearInterval(this.timer); + this.setState({ progressVisible: false, progress: 0 }); + message.error(data.message); + return; + } + if (this.state.progress !== 100) { + this.setState({ + progress: (Number(data.progress).toFixed(2)) * 100 + }); + } else { + clearInterval(this.timer); + this.setState({ progressVisible: false, progress: 0 }, () => { + message.success(getLabel(543232, "核算成功")); + this.setState({ + accountDialog: { ...this.state.accountDialog, visible: false } + }, () => { + this.wfListRef.wrappedInstance.getWelfareRecordList(); + const calcPayload = { ...payload, creator }; + window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?${convertToUrlString(calcPayload)}`); + }); + }); + } } else { clearInterval(this.timer); - this.setState({ progressVisible: false, progress: 0 }, () => { - message.success(getLabel(543232, "核算成功")); - this.setState({ - accountDialog: { ...this.state.accountDialog, visible: false } - }, () => { - this.wfListRef.wrappedInstance.getWelfareRecordList(); - const calcPayload = { ...payload, creator }; - window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?${convertToUrlString(calcPayload)}`); - }); - }); + this.setState({ progressVisible: false, progress: 0 }); } - } else { - clearInterval(this.timer); - this.setState({ progressVisible: false, progress: 0 }); - } - }).catch(() => { + }).catch(() => { clearInterval(this.timer); this.setState({ progressVisible: false, progress: 0 }); }); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js index d7366471..aa2ea15d 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js @@ -359,7 +359,7 @@ export default class NormalIndex extends Component { progressVisible: true }, () => { this.timer = setInterval(() => { - getCalculateProgress(billMonth).then(({ status, data }) => { + getCalculateProgress(billMonth, paymentOrganization).then(({ status, data }) => { if (status) { if (!data.status) { clearInterval(this.timer);