diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js index e44ae633..57069d5b 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js @@ -130,9 +130,15 @@ class Index extends Component { this.tableEdit = el} showCopy={false} deleteConfirm showAdd={!pzlxEnum.includes(pzlx)} showDelete={!pzlxEnum.includes(pzlx)} - columns={columns} datas={datas} onChange={datas => this.setState({ datas })} + columns={columns} datas={datas} tableProps={{ scroll: { y: `calc(100vh - 190.58px)` } }} getRowSelection={rowSelection => !pzlxEnum.includes(pzlx) ? rowSelection : false} - tableProps={{ scroll: { y: `calc(100vh - 190.58px)` } }} + onChange={datas => this.setState({ datas }, () => this.setState({ + totalData: _.map(this.state.totalData, o => ({ + ...o, + jfValue: _.reduce(this.state.datas, (pre, cur) => pre + parseFloat(cur.jfValue || 0), 0).toFixed(2), + dfValue: _.reduce(this.state.datas, (pre, cur) => pre + parseFloat(cur.dfValue || 0), 0).toFixed(2) + })) + }))} />