From 32940c9bcf7100765a826b3b5c645f43dc9ad231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 25 Sep 2024 10:46:55 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.15.1.2407.01-=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom-pages/lingyue/vouncherSummary/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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) + })) + }))} />