Merge branch 'feature/2.14.3.2406.01-薪资核算添加锁定人员数据' into release/2.14.3.2406.01
This commit is contained in:
commit
6d89db8dfe
|
|
@ -228,6 +228,10 @@ export const getColumnDesc = (params) => {
|
|||
export const updateLockStatus = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/updateLockStatus", params);
|
||||
};
|
||||
// 更新薪资核算结果的锁定状态
|
||||
export const updateLockEmpStatus = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/lockEmp", params);
|
||||
};
|
||||
// 导入薪资核算添加表头字段缓存
|
||||
export const cacheImportField = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheImportField", params);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import React, { Component } from "react";
|
|||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { message, Modal, Spin } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { acctResultList, updateLockStatus } from "../../../../../apis/calculate";
|
||||
import { acctResultList, updateLockEmpStatus, updateLockStatus } from "../../../../../apis/calculate";
|
||||
import ProgressModal from "../../../../../components/progressModal";
|
||||
import BatchUpdateSalaryItemValDialog from "./batchUpdateSalaryItemValDialog";
|
||||
import EditSalaryCalcSlide from "./editSalaryCalcSlide";
|
||||
|
|
@ -57,12 +57,15 @@ class EditCalcTable extends Component {
|
|||
this.props.onShowFormulaTd(dataIndex);
|
||||
break;
|
||||
case "LOCKING":
|
||||
const { salaryItemId, lockType: lockStatus } = params;
|
||||
if (lockStatus === "BATCHUPDATE") {
|
||||
const { salaryItemId, lockType } = params;
|
||||
if (lockType === "BATCHUPDATE") {
|
||||
this.batchUpdateSalaryItemVal(params);
|
||||
return;
|
||||
}
|
||||
this.updateLockStatus({ lockStatus, salaryItemId });
|
||||
this.updateLockStatus({ lockStatus: lockType, salaryItemId });
|
||||
break;
|
||||
case "LOCKEMP":
|
||||
this.updateEmpLockStatus({ ...params });
|
||||
break;
|
||||
case "EDIT":
|
||||
const { id: salaryCalcId } = params;
|
||||
|
|
@ -131,6 +134,52 @@ class EditCalcTable extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
updateEmpLockStatus = (payload) => {
|
||||
const { lockStatus } = payload;
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: <div>
|
||||
<div style={{ textAlign: "center" }}>
|
||||
{lockStatus === "LOCK" ? getLabel(543554, "确定要锁定人员项目值吗?") : getLabel(543556, "确定要解锁人员项目值吗?")}
|
||||
</div>
|
||||
<div style={{ textAlign: "center" }}>
|
||||
{lockStatus === "LOCK" ? getLabel(543555, "确定后,则项目输入值锁定,项目公式失效;点击核算将按锁定的输入值重新核算!") :
|
||||
getLabel(543557, "确定后,则项目公式生效,页面仍显示手动修改的项目值;点击核算将按公式重新核算,不再显示解锁标识!")}
|
||||
</div>
|
||||
</div>,
|
||||
onOk: () => {
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
this.timerLock = setInterval(() => {
|
||||
if (this.state.progress !== 100) {
|
||||
this.setState({
|
||||
progress: this.state.progress + 1
|
||||
});
|
||||
} else {
|
||||
clearInterval(this.timerLock);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
updateLockEmpStatus({ ...payload, salaryAcctRecordId }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
clearInterval(this.timerLock);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
}, () => this.queryCalcResultList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
batchUpdateSalaryItemVal = (payload) => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
|
|
@ -180,7 +229,8 @@ class EditCalcTable extends Component {
|
|||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
"总计": getLabel(523, "总计"), "批量解锁": getLabel(111, "批量解锁"),
|
||||
"批量锁定": getLabel(111, "批量锁定"), "批量更新": getLabel(111, "批量更新"),
|
||||
"查看拓扑图": getLabel(111, "查看拓扑图")
|
||||
"查看拓扑图": getLabel(111, "查看拓扑图"), "锁定": getLabel(111, "锁定"),
|
||||
"解锁": getLabel(111, "解锁")
|
||||
};
|
||||
this.setState({ originPayloadData: { ...payload, i18n } });
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
|
|
|
|||
Loading…
Reference in New Issue