From 0b8c335f0f56f9f6a642f4a21453302fd6458fcc 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, 8 Jan 2024 11:37:53 +0800 Subject: [PATCH] =?UTF-8?q?custom/=E9=99=95=E8=A5=BF=E4=B8=87=E4=BC=97-?= =?UTF-8?q?=E8=96=AA=E8=B5=84=E8=B4=A6=E5=A5=97=E8=96=AA=E8=B5=84=E6=A0=B8?= =?UTF-8?q?=E7=AE=97=E9=85=8D=E7=BD=AE=20=E6=96=B0=E5=A2=9E=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../calculate/doCalc/components/salaryEditCalc/index.js | 6 +++--- .../components/salaryEditCalc/sxwzEstablishTempDialog.js | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js index e4d84da9..5a3b1c58 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js @@ -57,8 +57,8 @@ class Index extends Component { })) ] }, () => { - isRefresh && this.setState({ - selectedKey: _.last(this.state.tabInfo).tabKey + !_.isNil(isRefresh) && this.setState({ + selectedKey: isRefresh ? this.state.selectedKey : _.last(this.state.tabInfo).tabKey }, () => this.calcTableRef.wrappedInstance.queryCalcResultList()); }); } @@ -157,7 +157,7 @@ class Index extends Component { onCancel={(isRefresh) => this.setState({ sxwzTemplDialog: { ...sxwzTemplDialog, visible: false, templateId: "" } }, () => { - isRefresh && this.init(isRefresh); + !_.isNil(isRefresh) && this.init(isRefresh); })}/> ); diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/sxwzEstablishTempDialog.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/sxwzEstablishTempDialog.js index cf6d705d..94ccf73a 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/sxwzEstablishTempDialog.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/sxwzEstablishTempDialog.js @@ -33,7 +33,9 @@ class SxwzEstablishTempDialog extends Component { const { calculateStore: { tmplForm, initTmplForm }, salaryAcctRecordId, templateId } = nextProps; if (nextProps.visible !== this.props.visible && nextProps.visible) { const { data } = await getImportField({ salaryAcctRecordId }); - const { data: formData } = templateId ? await getTemplateForm({ templateId }) : { data: {} }; + const { data: formData } = templateId ? + await getTemplateForm({ templateId, salaryAcctRecordId }) : + { data: {} }; const { itemsByGroup } = data; this.setState({ conditions: _.map(sxwzTempConditions, item => ({ @@ -127,7 +129,7 @@ class SxwzEstablishTempDialog extends Component { this.setState({ loading: false }); if (status) { message.success(getLabel(30700, "操作成功")); - this.props.onCancel(true); + this.props.onCancel(Boolean(id)); } else { message.error(errormsg); }