feature/2.9.42309.01-薪资核算详情页面列表改造(页面编辑)

This commit is contained in:
黎永顺 2023-09-18 15:05:25 +08:00
parent e10e39e630
commit 98054b3c8d
2 changed files with 13 additions and 7 deletions

View File

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

View File

@ -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}
/>
</div>
<EditCalcTable ref={dom => this.calcTableRef = dom} {...this.props} onShowFormulaTd={this.handleShowFormulaTa}/>
<EditCalcTable ref={dom => this.calcTableRef = dom}
{...this.props} showTotalCell={showTotalCell}
onShowFormulaTd={this.handleShowFormulaTa}/>
</div>
);
}