From 7c266deda3a5eede9b96c5440ea3e5c516701c6d 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, 12 Dec 2022 14:57:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E8=96=AA=E8=B5=84=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js index 3ddf0cad..e336d783 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js @@ -10,6 +10,8 @@ export default class FormalFormModal extends React.Component { constructor(props) { super(props); this.state = { + validateType: "", + returnType: "", value: "", extendParam: { sqlReturnKey: "", @@ -35,7 +37,9 @@ export default class FormalFormModal extends React.Component { if (this.props.formulaId) { detailFormual(this.props.formulaId).then(data => { this.setState({ - value: data.formula + value: data.formula, + validateType: data.validateType, + returnType: data.returnType, }); this.parameters = data.parameters; this.referenceType = data.referenceType; @@ -185,8 +189,8 @@ export default class FormalFormModal extends React.Component { description: "备注", module: "salary", useFor: "salaryitem", - returnType: this.props.dataType, - validateType: this.props.dataType, + returnType: this.props.dataType || this.state.returnType, + validateType: this.props.dataType || this.state.validateType, extendParam: JSON.stringify(this.state.extendParam), formula: this.state.value, parameters: this.parameters,