diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js index 0b463af9..6873a769 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js @@ -44,7 +44,7 @@ class LedgerSalaryItemNormal extends Component { } handleEditFormnul = (field, record) => { - const { valueType, formulaId, dateType: dataType, id } = record; + const { valueType, formulaId, dateType: dataType, id, key } = record; const { editFormulModal } = this.state; this.setState({ editFormulModal: { @@ -53,7 +53,7 @@ class LedgerSalaryItemNormal extends Component { valueType, formulaId, dataType }, formnulField: field, - formnulId: id + formnulId: id || key }); }; handleSaveFormnul = (data) => { @@ -61,7 +61,7 @@ class LedgerSalaryItemNormal extends Component { const { formnulField, formnulId } = this.state; const tmpV = _.cloneDeep(formnulField.items); const formnulData = _.map(tmpV, it => { - if (it.id === formnulId) { + if (it.id === formnulId || it.key === formnulId) { return { ...it, formulaId: data.id, formulaContent: data.formula }; } return { ...it }; diff --git a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js index 2d7b1782..a2295b59 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js @@ -296,16 +296,17 @@ export default class FormalFormModal extends React.Component { }); this.parameters = result; let params = { - name: "公式1", - description: "备注", - module: "salary", - useFor: "salaryitem", - returnType: this.props.dataType || this.state.returnType, - validateType: this.props.dataType || this.state.returnType, - extendParam: JSON.stringify(this.state.extendParam), - formula: this.state.value, + // name: "公式1", + // description: "备注", + // module: "salary", + // useFor: "salaryitem", + // returnType: this.props.dataType || this.state.returnType, + // validateType: this.props.dataType || this.state.returnType, + // extendParam: JSON.stringify(this.state.extendParam), + // formula: this.state.value, parameters: this.parameters, - referenceType: this.referenceType == "" ? this.props.valueType == "2" ? "formula" : this.props.valueType == "3" ? "sql" : "" : this.referenceType + id: this.props.formulaId + // referenceType: this.referenceType == "" ? this.props.valueType == "2" ? "formula" : this.props.valueType == "3" ? "sql" : "" : this.referenceType }; testFormual(params).then(({ status, data, errormsg }) => { if (status) { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js index 50279600..4ba30018 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js @@ -366,6 +366,14 @@ export default class NormalIndex extends Component { this.timer = setInterval(() => { getCalculateProgress(billMonth).then(({ status, data }) => { if (status) { + if (!data.status) { + clearInterval(this.timer); + this.setState({ + progressVisible: false, + progress: 0 + }); + message.error(data.message); + } if (this.state.progress !== 100) { this.setState({ progress: (Number(data.progress).toFixed(2)) * 100