From d1e0460e39bfc154508bf5275ca860a97a790084 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, 22 Feb 2023 10:39:47 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fieldManagement/components/fieldSlide.js | 10 +- .../fieldManagement/components/fieldTable.js | 6 +- .../hrmSalary/pages/fieldManagement/index.js | 5 +- pc4mobx/hrmSalary/pages/mySalary/index.js | 6 +- pc4mobx/hrmSalary/pages/salaryItem/index.js | 71 ++--- .../programme/defaultSlideForm.js | 293 ++++++------------ pc4mobx/hrmSalary/stores/mySalary.js | 2 +- pc4mobx/hrmSalary/stores/taxAgent.js | 4 +- 8 files changed, 145 insertions(+), 252 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js index 1eabfd2e..25563ef3 100644 --- a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js +++ b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js @@ -173,7 +173,13 @@ class FieldSlide extends Component { }; render() { - const { title, visible, record: { id: editId }, taxAgentStore: { taxAgentOption }, onCancel } = this.props; + const { + title, + visible, + record: { id: editId }, + taxAgentStore: { taxAgentOption, showSalaryItemBtn }, + onCancel + } = this.props; const { loading, name, @@ -202,7 +208,7 @@ class FieldSlide extends Component { tabs={[]} loading={loading} showOperateBtn={true} - editable={true} + editable={showSalaryItemBtn} onSave={this.saveFieldInfo} /> } diff --git a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js index 42dd5199..a8493d61 100644 --- a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js +++ b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js @@ -55,7 +55,7 @@ class FieldTable extends Component { getColumns = () => { const { columns } = this.state; const { taxAgentStore, onEditLedger, onDeleteLedger } = this.props; - const { showOperateBtn } = taxAgentStore; + const { showSalaryItemBtn } = taxAgentStore; return _.map([...columns, { dataIndex: "operate", display: true, @@ -70,9 +70,9 @@ class FieldTable extends Component { item.render = (text, record) => { return
onEditLedger(record)}>编辑 + onClick={() => onEditLedger(record)}>{showSalaryItemBtn ? "编辑" : "查看"} { - // showOperateBtn && + record.canDelete && showSalaryItemBtn && onDeleteLedger(record)}>删除 }
; diff --git a/pc4mobx/hrmSalary/pages/fieldManagement/index.js b/pc4mobx/hrmSalary/pages/fieldManagement/index.js index a646ea38..ae337488 100644 --- a/pc4mobx/hrmSalary/pages/fieldManagement/index.js +++ b/pc4mobx/hrmSalary/pages/fieldManagement/index.js @@ -71,7 +71,7 @@ class FieldManagement extends Component { render() { const { searchVal, doSearch, slideparams } = this.state; const { taxAgentStore } = this.props; - const { showOperateBtn } = taxAgentStore; + const { showSalaryItemBtn } = taxAgentStore; const btns = [