From 2adc0ee33ae63bb5924a74cccfbf5beecb6c589a Mon Sep 17 00:00:00 2001 From: MustangDeng <670124965@qq.com> Date: Wed, 15 Jun 2022 18:31:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=8F=82=E6=95=B0=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/components/importModal/index.js | 21 ++++++++++++++++++- .../pages/calculate/baseFormModal.js | 2 +- .../pages/dataAcquisition/cumDeduct/index.js | 1 + 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/components/importModal/index.js b/pc4mobx/hrmSalary/components/importModal/index.js index 5815c3de..7f4a11d0 100644 --- a/pc4mobx/hrmSalary/components/importModal/index.js +++ b/pc4mobx/hrmSalary/components/importModal/index.js @@ -39,8 +39,27 @@ export default class ImportModal extends React.Component { this.props.setStep(step - 1); } - + validateDate() { + const { params } = this.props; + let flag = true + try { + params && Object.keys(params).forEach((key) => { + if(!params[key] || params[key] == "") { + message.warning("参数不完整"); + throw new Error("参数不完整") + } + }) + } catch(e) { + flag = false + } + + return flag; + } + handleStep1Next() { + if(!this.validateDate()) { + return + } if(this.state.fileId) { this.props.setStep(1) } else { diff --git a/pc4mobx/hrmSalary/pages/calculate/baseFormModal.js b/pc4mobx/hrmSalary/pages/calculate/baseFormModal.js index 1deacd94..4a04f93d 100644 --- a/pc4mobx/hrmSalary/pages/calculate/baseFormModal.js +++ b/pc4mobx/hrmSalary/pages/calculate/baseFormModal.js @@ -54,7 +54,7 @@ export default class baseFormModal extends React.Component { saveBasic(params).then((id) => { this.props.onCancel() this.props.onRefresh() - window.open("/spa/hrmSalary/static/index.html#/main/hrmSalary/calculateDetail?id=" + id) + window.open("/spa/hrmSalary/static/index.html#/main/hrmSalary/calculateDetailz?id=" + id) }) } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index e275a0d9..d9b14d66 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -532,6 +532,7 @@ export default class CumDeduct extends React.Component { init={() => { this.handleInitModal(); }} + onValidate={() => {this.handleValidate()}} params={modalParam} columns={modalColumns} step={step}