release/2.17.1.2411.01

This commit is contained in:
lys 2024-11-27 10:21:51 +08:00
parent 9618a9b5d3
commit e613772041
1 changed files with 6 additions and 9 deletions

View File

@ -32,7 +32,7 @@ class SalaryDetails extends Component {
this.state = {
loading: false, dataSource: [], columns: [], selectedRowKeys: [], tempPageList: [], sumRow: {},
pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, templateId: "",
showTotalCell: false, updateSum: true, tempDialog: { visible: false, setting: [], id: "", template: {} },
showTotalCell: false, updateSum: false, tempDialog: { visible: false, setting: [], id: "", template: {} },
transferDialog: {
visible: false, searchParamsKey: "name", saveLoading: false,
dataParams: { page: "salary_details_report", defaultSetting: "0" },
@ -49,11 +49,8 @@ class SalaryDetails extends Component {
async componentDidMount() {
const [{ data: confCode }] = await Promise.all([sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })]);
this.setState({
showTotalCell: confCode === "1"
}, () => {
// this.getSalaryList(this.props);
this.getPageListTemplatelist();
this.setState({ showTotalCell: confCode === "1" }, () => {
this.props.salaryDetailShowType === "1" && this.getPageListTemplatelist();
});
window.addEventListener("message", this.handleReceive, false);
window.addEventListener("resize", () => this.forceUpdate(), false);
@ -84,16 +81,16 @@ class SalaryDetails extends Component {
};
handleReceive = ({ data }) => {
const { type, payload: { id, params } = {} } = data;
const { pageInfo } = this.state;
const { pageInfo, showTotalCell } = this.state;
if (type === "init") {
// this.getColumns();
this.getSalaryList(this.props);
showTotalCell && this.getSalaryListSum();
} else if (type === "turn") {
if (id === "PAGEINFO") {
const { pageNum: current, size: pageSize } = params;
this.setState({
pageInfo: { ...pageInfo, current, pageSize },
updateSum: false
pageInfo: { ...pageInfo, current, pageSize }, updateSum: false
}, () => this.getSalaryList(this.props));
} else if (id === "CHECKBOX") {
const { selectedRowKeys: checkBox } = params;