From 98ca4cb03fcea026899c09cae97bac6b45bcc178 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 1 Nov 2024 16:03:57 +0800 Subject: [PATCH] release/2.16.1.2410.01 --- .../hrmSalary/pages/ruleConfig/conditions.js | 36 ++++++++++--------- .../hrmSalary/pages/ruleConfig/ruleConfig.js | 9 ++--- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js index 044602e0..0e72e8a5 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js @@ -201,7 +201,25 @@ export const conditions = [ title: "薪资报表", lanId: 111, defaultshow: true - }, + } + // { + // items: [ + // { + // conditionType: "SWITCH", + // domkey: ["extEmpsWitch"], + // fieldcol: 10, + // label: "开启非系统人员", + // lanId: 111, + // labelcol: 8, + // viewAttr: 2 + // } + // ], + // title: "非系统人员", + // lanId: 111, + // defaultshow: true + // }, +]; +export const salaryApprovalConditions = [ { items: [ { @@ -245,22 +263,6 @@ export const conditions = [ lanId: 111, defaultshow: true } - // { - // items: [ - // { - // conditionType: "SWITCH", - // domkey: ["extEmpsWitch"], - // fieldcol: 10, - // label: "开启非系统人员", - // lanId: 111, - // labelcol: 8, - // viewAttr: 2 - // } - // ], - // title: "非系统人员", - // lanId: 111, - // defaultshow: true - // }, ]; export const payloadList = [ { enumClass: "com.engine.salary.sys.enums.SalaryAcctEmployeeRuleEnum" }, diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js index 8eb37b41..8efe1e87 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js @@ -9,7 +9,7 @@ import { inject, observer } from "mobx-react"; import { WeaLocaleProvider, WeaTools, WeaTop } from "ecCom"; import { message, Modal } from "antd"; import * as API from "../../apis/ruleconfig"; -import { conditions, payloadList } from "./conditions"; +import { conditions, payloadList, salaryApprovalConditions } from "./conditions"; import ProgressModal from "../../components/progressModal"; import { renderRuleForm } from "./form"; import { getConditionDomkeys } from "../../util"; @@ -33,12 +33,13 @@ class RuleConfig extends Component { } init = async () => { - const { data: sysinfo } = await API.sysinfo(); + const [{ data: sysinfo }, { data: confCode }] = await Promise.all([API.sysinfo(), API.sysConfCodeRule({ code: "SHOW_SALARY_ACCT_APPROVAL" })]); const [{ data: matchRule }, { data: orderRule }, { data: ascOrDesc }, { data: rule }] = await Promise.all(_.map(payloadList, it => API.commonEnumList(it))); const optionsList = { matchRule, orderRule, ascOrDesc, rule }; + const conditonsSlice = confCode === "1" ? [...conditions, ...salaryApprovalConditions] : conditions; this.setState({ - sysinfo, conditions: _.map(conditions, item => ({ + sysinfo, conditions: _.map(conditonsSlice, item => ({ ...item, title: getLabel(item.lanId, item.title), items: _.map(item.items, o => { o = { ...o, label: getLabel(o.lanId, o.label) }; @@ -94,7 +95,7 @@ class RuleConfig extends Component { } else if ( item === "APPROVAL_CAN_MANUAL_FILE_STATUS" || item === "APPROVAL_CAN_RE_CALC_STATUS" || item === "APPROVAL_CAN_EDIT_RESULT_STATUS" ) { - form.updateFields({ [item]: { value: _.isNil(sysinfo[item]) ? "1" : (sysinfo[item] || "0") } }); + form.updateFields({ [item]: { value: sysinfo[item] || "0" } }); } else { form.updateFields({ [item]: { value: sysinfo[item] || "" } }); }