diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js index 33dd326a..2529bce9 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js @@ -20,8 +20,8 @@ import { salaryApprovalSaveForm, saveAdjustmentRule, saveLedgerBasic, saveLedger import { sysConfCodeRule } from "../../../apis/ruleconfig"; import "./index.less"; -const Step = WeaSteps.Step; const { getLabel } = WeaLocaleProvider; +const Step = WeaSteps.Step; @inject("taxAgentStore", "ledgerStore") @observer @@ -96,7 +96,6 @@ class LedgerSlide extends Component { this.setState({ loading: false }); if (status) { message.success("保存成功"); - this.handleClose(); } else { message.success(errormsg || "保存失败"); } @@ -160,6 +159,7 @@ class LedgerSlide extends Component { * Date: 2022/12/14 */ handleSaveSalaryItemParams = (empFields, itemGroups) => this.setState({ empFields, itemGroups }); + handleDefaultSave = () => { const { saveSalarySobId } = this.state; const { state: { approvalId } } = this.approRef.wrappedInstance; @@ -189,14 +189,16 @@ class LedgerSlide extends Component { this.setState({ loading: false }); if (status) { message.success(getLabel(111, "保存成功!")); + saveSalarySobId && this.handleClose(); } else { message.error(errormsg); } }); }; + render() { const { visible, editId, taxAgentStore: { showOperateBtn } } = this.props; - const { current, saveSalarySobId, loading } = this.state; + const { current, saveSalarySobId, loading, salaryApprovalStatus } = this.state; let tabs = [ { key: 0, title: getLabel(82751, "基础设置"), @@ -253,9 +255,11 @@ class LedgerSlide extends Component { { key: 4, title: getLabel(543469, "调薪计薪规则"), createBtns: [ + , , - + ], editBtns: [ , + + ], + editBtns: [ + + ], + children: this.approRef = dom} + saveSalarySobId={saveSalarySobId}/> } ]; + !salaryApprovalStatus && tabs.pop(); return ( { const confTitle = { @@ -153,11 +153,11 @@ class RuleConfig extends Component { taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"), salaryShowStatus: getLabel(111, "显示工资单页签"), adjustShowStatus: getLabel(111, "显示调薪记录页签"), + REPORT_ORGANIZATIN_TYPE: getLabel(111, "组织信息"), SALARY_APPROVAL_STATUS: getLabel(111, "是否开启薪资审批"), APPROVAL_CAN_MANUAL_FILE_STATUS: getLabel(111, "开启审批的核算记录允许手动归档"), APPROVAL_CAN_RE_CALC_STATUS: getLabel(111, "开启审批的核算记录允许重新核算"), - APPROVAL_CAN_EDIT_RESULT_STATUS: getLabel(111, "审批流程发起后允许修改核算数据"), - REPORT_ORGANIZATIN_TYPE: getLabel(111, "组织信息") + APPROVAL_CAN_EDIT_RESULT_STATUS: getLabel(111, "审批流程发起后允许修改核算数据") }; this.unifiedSettings(key, confTitle[key]); this.handleDebounce = null;