From 57272b9077a3c58f8d60f21d79abb543fe19fda7 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 4 Jul 2025 15:01:09 +0800 Subject: [PATCH] =?UTF-8?q?custom/=E7=BE=8E=E4=B9=8B=E9=AB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salaryEditCalc/editCalcTable.js | 23 +++++++++++++++---- .../hrmSalary/pages/calculate/doCalc/index.js | 9 ++++---- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js index 986bb1bb..4bd172e9 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js @@ -227,6 +227,7 @@ class EditCalcTable extends Component { } postMessageToChild = (payload = {}) => { + const { mzgOptPermission } = this.props; const i18n = { "操作": getLabel(30585, "操作"), "编辑": getLabel(501169, "编辑"), "点击锁定所有解锁的项目值": getLabel(543649, "点击锁定所有解锁的项目值"), @@ -242,13 +243,13 @@ class EditCalcTable extends Component { }; this.setState({ originPayloadData: { ...payload, i18n } }); const childFrameObj = document.getElementById("atdTable"); - childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); + childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n, mzgOptPermission }), "*"); }; queryCalcResultList = () => { const { pageInfo } = this.state; const { calculateStore: { ECSearchForm, otherConditions }, routeParams: { salaryAcctRecordId }, - calcDetail = false + calcDetail = false, mzgOptPermission = false } = this.props; const { subcompanyIds, departmentIds, positionIds, statuses, ...extra } = ECSearchForm.getFormParams(); const payload = { @@ -262,8 +263,16 @@ class EditCalcTable extends Component { acctResultList(payload).then(({ status, data }) => { this.setState({ loading: false }); if (status) { - const { columns, pageInfo: list } = data; + let { columns, pageInfo: list } = data; const { list: dataSource, pageNum: current, pageSize, total } = list; + // 美之高操作权限 + columns = _.map(columns, it => { + if (!_.isEmpty(it.children)) { + return { ...it, children: _.map(it.children, o => ({ ...o, mzgOptPermission })), mzgOptPermission }; + } + return { ...it, mzgOptPermission }; + }); + this.setState({ pageInfo: { ...pageInfo, current, pageSize, total } }, () => { const { pageInfo, selectedRowKeys } = this.state; const sumRowlistUrl = this.props.showTotalCell ? "/api/bs/hrmsalary/salaryacct/acctresult/sum" : ""; @@ -331,13 +340,17 @@ const traverse = (arr, calcDetail) => { return { title: item.text, width: item.width + "px", ellipsis: true, calcDetail, dataIndex: item.column, children: traverse(item.children, calcDetail), - fixed: item.fixed || false, dataType: item.dataType, align: "center" + fixed: item.fixed || false, dataType: item.dataType, align: "center", + //美之高操作权限 + mzgOptPermission: item.mzgOptPermission }; } else { return { title: item.text, width: item.width + "px", fixed: item.fixed || false, dataIndex: item.column, ellipsis: true, lockStatus: item.lockStatus, calcDetail, - pattern: item.pattern, dataType: item.dataType, align: "center" + pattern: item.pattern, dataType: item.dataType, align: "center", + //美之高操作权限 + mzgOptPermission: item.mzgOptPermission }; } }); diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js index 4f4944c7..92925931 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js @@ -153,7 +153,7 @@ class Index extends Component { renderReqBtns = () => { const { routeParams: { salaryAcctRecordId } } = this.props; const { selectedKey, accountExceptInfo, approvalInfo } = this.state; - const { isOpenApproval, approvalWorkflowUrl, canEdit } = approvalInfo; + const { isOpenApproval, approvalWorkflowUrl, canEdit, hideEdit } = approvalInfo; let reqBtns = []; switch (selectedKey) { case "calc": @@ -164,7 +164,7 @@ class Index extends Component { ); const moreMenu = (