Merge branch 'hotfix/2.14.2.2405.02' into release/2.14.2.2405.02

This commit is contained in:
黎永顺 2024-05-27 16:52:19 +08:00
commit c6cc7c5cea
1 changed files with 9 additions and 6 deletions

View File

@ -26,7 +26,7 @@ class SalaryDetails extends Component {
this.state = { this.state = {
loading: false, dataSource: [], columns: [], selectedRowKeys: [], loading: false, dataSource: [], columns: [], selectedRowKeys: [],
pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {},
showTotalCell: false showTotalCell: false, updateSum: true
}; };
} }
@ -54,10 +54,13 @@ class SalaryDetails extends Component {
} else if (type === "turn") { } else if (type === "turn") {
if (id === "PAGEINFO") { if (id === "PAGEINFO") {
const { pageNum: current, size: pageSize } = params; const { pageNum: current, size: pageSize } = params;
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.getSalaryList(this.props)); this.setState({
pageInfo: { ...pageInfo, current, pageSize },
updateSum: true
}, () => this.getSalaryList(this.props));
} else if (id === "CHECKBOX") { } else if (id === "CHECKBOX") {
const { selectedRowKeys: checkBox } = params; const { selectedRowKeys: checkBox } = params;
this.setState({ selectedRowKeys: checkBox }); this.setState({ selectedRowKeys: checkBox, updateSum: false });
} }
} }
}; };
@ -106,13 +109,13 @@ class SalaryDetails extends Component {
}; };
getColumns = () => { getColumns = () => {
const { attendanceStore: { tableStore } } = this.props; const { attendanceStore: { tableStore } } = this.props;
const { dataSource, pageInfo, selectedRowKeys, showTotalCell, payload } = this.state; const { dataSource, pageInfo, selectedRowKeys, showTotalCell, payload, updateSum } = this.state;
const columns = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"); const columns = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes");
const sumRowlistUrl = showTotalCell ? "/api/bs/hrmsalary/report/statistics/employee/salaryListSum" : ""; const sumRowlistUrl = showTotalCell ? "/api/bs/hrmsalary/report/statistics/employee/salaryListSum" : "";
if (!_.isEmpty(columns)) { if (!_.isEmpty(columns)) {
this.postMessageToChild({ this.postMessageToChild({
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, payload, dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154,
sumRowlistUrl, sumRowlistUrl, payload: { ...payload, updateSum },
columns: _.map(columns, (it, idx) => ({ columns: _.map(columns, (it, idx) => ({
...it, ...it,
width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : it.oldWidth, width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : it.oldWidth,