From 24f1d6ddd0b525af26fe9891febdd8d153c89989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 7 Mar 2023 16:15:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=96=AA=E8=B5=84=E8=B4=A6=E5=A5=97bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ledgerSalaryItemNormal.js | 6 +++--- .../pages/salaryItem/formalFormModal.js | 19 ++++++++++--------- .../standingBookDetail/components/normal.js | 8 ++++++++ 3 files changed, 21 insertions(+), 12 deletions(-) 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