release/2.18.1.2412.01

This commit is contained in:
lys 2024-12-09 17:37:44 +08:00
parent b69f30529d
commit 5f893b1eb0
3 changed files with 31 additions and 30 deletions

View File

@ -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", {});
};
// 核算进度条

View File

@ -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 });
});

View File

@ -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);