From 7dfd328aae182456642cc9bf827b54eba438bc12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 14 Nov 2023 14:45:13 +0800 Subject: [PATCH] hotfix/2.9.42311.02 --- .../components/calculateTablelist/index.js | 4 +- pc4mobx/hrmSalary/pages/calculate/index.less | 11 ++-- .../fieldManagement/components/fieldTable.js | 1 + .../ledgerPage/components/ledgerTable.js | 1 + .../salaryArchiveEditAdjLogRecord.js | 58 ++++++++++++++++--- 5 files changed, 61 insertions(+), 14 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/components/calculateTablelist/index.js b/pc4mobx/hrmSalary/pages/calculate/components/calculateTablelist/index.js index 7fc9df9a..626eba5b 100644 --- a/pc4mobx/hrmSalary/pages/calculate/components/calculateTablelist/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/components/calculateTablelist/index.js @@ -114,7 +114,7 @@ class Index extends Component { } }; } - return { ...o, width }; + return { ...o, width, render: (txt) => ({txt}) }; }) }); } @@ -142,7 +142,7 @@ class Index extends Component { }; return ( diff --git a/pc4mobx/hrmSalary/pages/calculate/index.less b/pc4mobx/hrmSalary/pages/calculate/index.less index 013d6d00..b0418614 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.less +++ b/pc4mobx/hrmSalary/pages/calculate/index.less @@ -75,7 +75,6 @@ .calculate-body { height: 100%; width: 100%; - padding: 16px; overflow-y: auto; .wea-new-table { @@ -84,10 +83,12 @@ .ant-table-tbody { td { - width: 100%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + span { + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } } } diff --git a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js index e90564b3..87af593d 100644 --- a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js +++ b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js @@ -114,6 +114,7 @@ class FieldTable extends Component { pagination={pagination} loading={loading} columns={this.getColumns()} + scroll={{ y: "calc(100vh - 152px)" }} /> ); } diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js index 2c712894..38ba8a5b 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js @@ -195,6 +195,7 @@ class LedgerTable extends Component { pagination={pagination} loading={loading} columns={this.getColumns()} + scroll={{ y: "calc(100vh - 152px)" }} /> ({ + ...o, dataType: _.find(salaryArchiveItemDetail.salaryItemList, g => g.id === o.salaryItem).dataType + })) + }, conditions: _.map(adjCondition, item => { return { ...item, @@ -100,7 +106,10 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component { ...salaryArchiveItemDetail, list: _.map(list, o => { if (o.salaryItem === salaryItemId) { - return { ...o, salaryBefore: data }; + return { + ...o, salaryBefore: data, + dataType: _.find(salaryArchiveItemDetail.salaryItemList, g => g.id === salaryItemId).dataType + }; } return { ...o }; }) @@ -109,6 +118,23 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component { } }); }; + handleChangeAdjustAfter = (record, v) => { + const { salaryArchiveItemDetail } = this.state; + const { list } = salaryArchiveItemDetail; + this.setState({ + salaryArchiveItemDetail: { + ...salaryArchiveItemDetail, + list: _.map(list, o => { + if (o.salaryItem === record.salaryItem) { + return { + ...o, adjustAfter: v + }; + } + return { ...o }; + }) + } + }); + }; save = () => { const { salaryFileStore: { adjForm, fetchSingleSalaryItemList, getArchiveForm } } = this.props; const { pass } = this.tableEdit.refs.edit.doRequiredCheck(); @@ -201,13 +227,31 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component { this.tableEdit = dom} deleteConfirm - columns={adjColumns} datas={list} showCopy={false} - showAdd={!id} showDelete={!id} + datas={list} showCopy={false} showAdd={!id} showDelete={!id} onChange={o => this.setState({ salaryArchiveItemDetail: { - ...salaryArchiveItemDetail, list: o + ...salaryArchiveItemDetail, list: _.map(o, it => ({ ...it, dataType: "" })) } - })} + })} columns={_.map(adjColumns, o => { + if (o.dataIndex === "adjustAfter") { + return { + ...o, render: (__, record) => { + if (record.dataType === "number") { + return this.handleChangeAdjustAfter(record, v)} + />; + } else { + return this.handleChangeAdjustAfter(record, v)} + />; + } + } + }; + } + return { ...o }; + })} /> :