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,