diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/baseLayout.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/baseLayout.js index 5bb4dc76..bf66d6e1 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/baseLayout.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/baseLayout.js @@ -55,7 +55,7 @@ class Layout extends Component { fycdgsqc: (field, textAreaProps, form, formParams) => { return ( { - v && form.updateFields({ fycdgsqc: { value: v } }); + form.updateFields({ fycdgsqc: { value: v } }); onChange(); }}/>); }, diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/baseReportList.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/baseReportList.js index 3f4ce131..21f6352a 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/baseReportList.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/baseReportList.js @@ -32,8 +32,7 @@ export default class BaseReportList extends Component { super(props); this.state = { dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, - loading: false, selectedRowKeys: [], sumDataSource: {}, payload: {}, visible: false, - voucherDialog: { visible: false, ffgsqcLabel: props.ffgsqcLabel, type: props.type } + loading: false, selectedRowKeys: [], sumDataSource: {}, payload: {}, visible: false }; this.handleDebounce = null; } @@ -80,7 +79,7 @@ export default class BaseReportList extends Component { }; getLYList = (updateSum = false) => { - const { form, type } = this.props, { pageInfo, selectedRowKeys } = this.state; + const { form, type } = this.props, { pageInfo, selectedRowKeys, sumDataSource } = this.state; const payload = { ...pageInfo, ...form.getFormParams(), fycdgsqc: form.getFormParams().fycdgsqc ? form.getFormParams().fycdgsqc.split(",") : [] @@ -96,13 +95,13 @@ export default class BaseReportList extends Component { }, () => { this.postMessageToChild({ dataSource, pageInfo: this.state.pageInfo, selectedRowKeys, unitTableType: "custom_lingyue", - columns: traverseCols(columns), showTotalCell: true, sumDataSource: {}, + columns: traverseCols(columns), showTotalCell: true, sumDataSource, scrollHeight: !_.isEmpty(dataSource) ? 195 : 0 }); }); !updateSum && this.getLYListSum({ dataSource, pageInfo: { current, pageSize, total }, selectedRowKeys, unitTableType: "custom_lingyue", - columns: traverseCols(columns), showTotalCell: true, sumDataSource: {}, + columns: traverseCols(columns), showTotalCell: true, sumDataSource, scrollHeight: !_.isEmpty(dataSource) ? 195 : 0 }, payload); } else { @@ -113,7 +112,9 @@ export default class BaseReportList extends Component { getLYListSum = (result = {}, payload) => { const { type } = this.props; interfaceType[type]["sum"](payload).then(({ status, data }) => { - if (status) this.postMessageToChild({ ...result, sumDataSource: data.sumRow }); + if (status) this.setState({ sumDataSource: data.sumRow }, () => this.postMessageToChild({ + ...result, sumDataSource: data.sumRow + })); }); };