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); }