From 7c3af0ad5bcd30894977ff3529c9d52c80ad5274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 19 Dec 2022 14:55:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/calculate/index.js | 13 ++++++++++--- .../pages/calculateDetail/issuedAndReissueTable.js | 4 ++-- pc4mobx/hrmSalary/pages/payroll/SalarySendList.js | 8 +++++--- .../hrmSalary/pages/payroll/payrollGrant/index.js | 7 +++++-- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/index.js b/pc4mobx/hrmSalary/pages/calculate/index.js index 3ac81ef4..cf287595 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/index.js @@ -9,6 +9,7 @@ import BaseFormModal from "./baseFormModal"; import CustomPaginationTable from "../../components/customPaginationTable"; import ProgressModal from "../../components/progressModal"; import "./index.less"; +import { deleteLedgerPersonRange } from "../../apis/ledger"; const MonthPicker = DatePicker.MonthPicker; @@ -141,9 +142,15 @@ export default class Calculate extends React.Component { // 回算 handleBackCalculate = (record) => { - const { calculateStore: { backCalculate } } = this.props; - backCalculate(record.id).then(() => { - this.handleSearch(this.state.searchValue); + Modal.confirm({ + title: "信息确认", + content: "确定回算吗?\n 回算后,正常核算的数据会被覆盖,正常核算的工资单不能继续发放或撤回!", + onOk: () => { + const { calculateStore: { backCalculate } } = this.props; + backCalculate(record.id).then(() => { + this.handleSearch(this.state.searchValue); + }); + } }); }; diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/issuedAndReissueTable.js b/pc4mobx/hrmSalary/pages/calculateDetail/issuedAndReissueTable.js index ff82bad7..f18e620f 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/issuedAndReissueTable.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/issuedAndReissueTable.js @@ -23,7 +23,7 @@ class IssuedAndReissueTable extends Component { title: 项目值 @@ -44,7 +44,7 @@ class IssuedAndReissueTable extends Component { title: 核算公式 diff --git a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js index 6e7d0a52..b92a62c5 100644 --- a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js +++ b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js @@ -92,18 +92,20 @@ export default class SalarySendList extends React.Component { title: "操作", key: "operate", render: (text, record) => { - const { sendNum, sendTotal, salaryAcctType } = record; + const { sendNum, sendTotal, salaryAcctType, haveBackCalc } = record; + //显示发放 + const showGrant = haveBackCalc === 1 && salaryAcctType === 0; return ( this.handleGrant(record)} style={{ marginRight: 10 }}>发放 { - salaryAcctType === 0 && + !showGrant && this.handleShowDetail(record)} style={{ marginRight: 10 }}>查看详情 } { - sendNum !== sendTotal && salaryAcctType === 0 && + sendNum !== sendTotal && !showGrant && this.handleUpdateTemplate(record)}>更新模板 } diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 6bf91113..a7190a1d 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -243,6 +243,9 @@ export default class PayrollGrant extends React.Component { }; getSearchsAdQuick() { + const { payrollStore } = this.props; + const { salarySendDetailBaseInfo } = payrollStore; + const notShowGrantOrWithdraw = salarySendDetailBaseInfo.haveBackCalc === 1 && salarySendDetailBaseInfo.salaryAcctType === "0"; const { selectedKey } = this.state; const handleMenuClick = e => { switch (e.key) { @@ -267,7 +270,7 @@ export default class PayrollGrant extends React.Component { 更多 ]; - if (selectedKey === "0") { + if (selectedKey === "0" && !notShowGrantOrWithdraw) { btnDom = [ , ...btnDom ]; - } else { + } else if(selectedKey === "1" && !notShowGrantOrWithdraw) { btnDom = [