From 98054b3c8d1204d9c732e080082a772e984679db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 18 Sep 2023 15:05:25 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.9.42309.01-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=94=B9=E9=80=A0=EF=BC=88=E9=A1=B5=E9=9D=A2=E7=BC=96?= =?UTF-8?q?=E8=BE=91=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/salaryEditCalc/editCalcTable.js | 2 +- .../doCalc/components/salaryEditCalc/index.js | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js index 5a637906..deb70763 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js @@ -140,7 +140,7 @@ class EditCalcTable extends Component { this.setState({ pageInfo: { ...pageInfo, current, pageSize, total } }, () => { const { pageInfo, selectedRowKeys } = this.state; this.postMessageToChild({ - dataSource, pageInfo, selectedRowKeys, + dataSource, pageInfo, selectedRowKeys, showTotalCell: this.props.showTotalCell, columns: _.map(traverse(columns), (it, idx) => ({ ...it, fixed: idx < 2 ? "left" : false })) }); }); diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js index dffbd55d..42b19d5d 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js @@ -8,6 +8,7 @@ import React, { Component } from "react"; import { WeaHelpfulTip, WeaLocaleProvider } from "ecCom"; import { Alert } from "antd"; import { getColumnDesc, getSalarySobCycle } from "../../../../../apis/calculate"; +import { sysConfCodeRule } from "../../../../../apis/ruleconfig"; import EditCalcAdvanceSearchPannel from "./editCalcAdvanceSearchPannel"; import EditCalcTable from "./editCalcTable"; import SalaryMonthTip from "../salaryMonthTip"; @@ -21,7 +22,7 @@ class Index extends Component { super(props); this.state = { salarySobCycle: {}, showSearchAd: false, - columnDesc: {}, formulaTd: "" + columnDesc: {}, formulaTd: "", showTotalCell: false }; } @@ -36,18 +37,21 @@ class Index extends Component { }; init = async () => { const { routeParams: { salaryAcctRecordId } } = this.props; - const [salarySobCycle, columnDesc] = await Promise.all([getSalarySobCycle({ salaryAcctRecordId }), getColumnDesc({ salaryAcctRecordId })]); - if (salarySobCycle.status && columnDesc.status) { + const [salarySobCycle, columnDesc, confCode] = await Promise.all([ + getSalarySobCycle({ salaryAcctRecordId }), getColumnDesc({ salaryAcctRecordId }), + sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" }) + ]); + if (salarySobCycle.status && columnDesc.status && confCode.status) { this.setState({ salarySobCycle: salarySobCycle.data, - columnDesc: columnDesc.data + columnDesc: columnDesc.data, showTotalCell: confCode.data === "1" }); } }; handleShowFormulaTa = (dataIndex) => this.setState({ formulaTd: dataIndex }); render() { - const { salarySobCycle, showSearchAd, formulaTd, columnDesc } = this.state; + const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell } = this.state; const { accountExceptInfo } = this.props; const formulaObj = _.get(columnDesc, [formulaTd]) || {}; return ( @@ -81,7 +85,9 @@ class Index extends Component { onAdSearch={this.onAdSearch} /> - this.calcTableRef = dom} {...this.props} onShowFormulaTd={this.handleShowFormulaTa}/> + this.calcTableRef = dom} + {...this.props} showTotalCell={showTotalCell} + onShowFormulaTd={this.handleShowFormulaTa}/> ); }