release/2.16.1.2410.01
This commit is contained in:
parent
728e683777
commit
98ca4cb03f
|
|
@ -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" },
|
||||
|
|
|
|||
|
|
@ -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] || "" } });
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue