diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index f1028811..219b5e4f 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -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: false, tempDialog: { visible: false, setting: [], id: "", template: {} }, + showTotalCell: false, updateSum: true, tempDialog: { visible: false, setting: [], id: "", template: {} }, transferDialog: { visible: false, searchParamsKey: "name", saveLoading: false, dataParams: { page: "salary_details_report", defaultSetting: "0" }, @@ -81,11 +81,10 @@ class SalaryDetails extends Component { }; handleReceive = ({ data }) => { const { type, payload: { id, params } = {} } = data; - const { pageInfo, showTotalCell } = this.state; + const { pageInfo } = 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; @@ -135,7 +134,7 @@ class SalaryDetails extends Component { }; getSalaryListSum = (payload) => { API.getSalaryListSum(payload).then(({ status, data }) => { - if (status) this.setState({ sumRow: data.sumRow }); + if (status) this.setState({ sumRow: data.sumRow }, () => this.getColumns()); }); }; handleExportSalaryList = (key) => {