hotfix/2.15.1.2409.01

规则设置添加薪资报表中的组织信息设置切换功能
This commit is contained in:
黎永顺 2024-10-08 15:08:00 +08:00
parent 53d45c2069
commit bd93223774
2 changed files with 69 additions and 36 deletions

View File

@ -1,8 +1,3 @@
import React from "react";
import { WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
export const conditions = [
{
items: [
@ -10,13 +5,15 @@ export const conditions = [
conditionType: "SELECT",
domkey: ["rule"],
fieldcol: 10,
label: getLabel(543352, "人员字段"),
label: "人员字段",
lanId: 543352,
labelcol: 8,
options: [],
viewAttr: 2
}
],
title: getLabel(543357, "人员校验规则"),
title: "人员校验规则",
lanId: 543357,
defaultshow: true
},
{
@ -25,7 +22,8 @@ export const conditions = [
conditionType: "SELECT",
domkey: ["orderRule"],
fieldcol: 10,
label: getLabel(15512, "排序字段"),
label: "排序字段",
lanId: 15512,
labelcol: 8,
options: [],
viewAttr: 2
@ -34,13 +32,15 @@ export const conditions = [
conditionType: "SELECT",
domkey: ["ascOrDesc"],
fieldcol: 10,
label: getLabel(543351, "正序/倒序"),
label: "正序/倒序",
lanId: 543351,
labelcol: 8,
options: [],
viewAttr: 2
}
],
title: getLabel(543356, "排序规则"),
title: "排序规则",
lanId: 543356,
defaultshow: true
},
{
@ -49,12 +49,14 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["OPEN_APPLICATION_ENCRYPT"],
fieldcol: 10,
label: getLabel(526997, "加密设置"),
label: "加密设置",
lanId: 526997,
labelcol: 8,
viewAttr: 2
}
],
title: getLabel(543358, "加密规则"),
title: "加密规则",
lanId: 543358,
defaultshow: true
},
{
@ -63,7 +65,8 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["salaryShowStatus"],
fieldcol: 10,
label: getLabel(111, "显示工资单页签"),
label: "显示工资单页签",
lanId: 111,
labelcol: 8,
viewAttr: 2
},
@ -71,7 +74,8 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["adjustShowStatus"],
fieldcol: 10,
label: getLabel(111, "显示调薪记录页签"),
label: "显示调薪记录页签",
lanId: 111,
labelcol: 8,
viewAttr: 2
},
@ -79,12 +83,14 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["taxAgentShowStatus"],
fieldcol: 10,
label: getLabel(111, "显示【个税扣缴义务人】信息"),
label: "显示【个税扣缴义务人】信息",
lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
title: getLabel(111, "我的薪资福利设置"),
title: "我的薪资福利设置",
lanId: 111,
defaultshow: true
},
{
@ -93,7 +99,8 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["welBaseDiffByPerAndCom"],
fieldcol: 10,
label: getLabel(111, "区分个人和公司"),
label: "区分个人和公司",
lanId: 111,
labelcol: 8,
viewAttr: 2
},
@ -101,12 +108,14 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["welBaseAutoAdjust"],
fieldcol: 10,
label: getLabel(111, "导入基数自动调整上/下限"),
label: "导入基数自动调整上/下限",
lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
title: getLabel(111, "福利档案基数"),
title: "福利档案基数",
lanId: 111,
defaultshow: true
},
{
@ -115,12 +124,14 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["salaryArchiveDelete"],
fieldcol: 10,
label: getLabel(111, "允许删除档案"),
label: "允许删除档案",
lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
title: getLabel(538004, "薪资档案"),
title: "薪资档案",
lanId: 538004,
defaultshow: true
},
{
@ -129,7 +140,8 @@ export const conditions = [
conditionType: "SELECT",
domkey: ["matchRule"],
fieldcol: 10,
label: getLabel(111, "匹配规则"),
label: "匹配规则",
lanId: 111,
options: [],
labelcol: 8,
viewAttr: 2
@ -138,12 +150,14 @@ export const conditions = [
conditionType: "INPUTNUMBER",
domkey: ["salaryAcctFixedColumns"],
fieldcol: 10,
label: getLabel(111, "固定数"),
label: "固定数",
lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
title: getLabel(111, "薪资核算"),
title: "薪资核算",
lanId: 111,
defaultshow: true
},
{
@ -152,7 +166,8 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["taxDeclarationFunction"],
fieldcol: 10,
label: getLabel(111, "系统算税"),
label: "系统算税",
lanId: 111,
labelcol: 8,
viewAttr: 1
},
@ -160,41 +175,47 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["WITHDRAW_TAX_DECLARATION"],
fieldcol: 10,
label: getLabel(111, "撤回申报表"),
label: "撤回申报表",
lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
title: getLabel(111, "算税规则"),
title: "算税规则",
lanId: 111,
defaultshow: true
},
{
items: [
{
conditionType: "SELECT",
domkey: ["abc"],
domkey: ["REPORT_ORGANIZATIN_TYPE"],
fieldcol: 10,
label: getLabel(111, "组织信息"),
label: "组织信息",
lanId: 111,
options: [],
labelcol: 8,
viewAttr: 2
}
],
title: getLabel(111, "薪资报表"),
title: "薪资报表",
lanId: 111,
defaultshow: true
},
}
// {
// items: [
// {
// conditionType: "SWITCH",
// domkey: ["extEmpsWitch"],
// fieldcol: 10,
// label: getLabel(111, "开启非系统人员"),
// label: "开启非系统人员",
// lanId: 111,
// labelcol: 8,
// viewAttr: 2
// }
// ],
// title: getLabel(111, "非系统人员"),
// title: "非系统人员",
// lanId: 111,
// defaultshow: true
// },
];

View File

@ -39,10 +39,18 @@ class RuleConfig extends Component {
const optionsList = { matchRule, orderRule, ascOrDesc, rule };
this.setState({
sysinfo, conditions: _.map(conditions, item => ({
...item,
...item, title: getLabel(item.lanId, item.title),
items: _.map(item.items, o => {
o = { ...o, label: getLabel(o.lanId, o.label) };
if (getKey(o) === "matchRule" || getKey(o) === "orderRule" || getKey(o) === "ascOrDesc" || getKey(o) === "rule") {
return { ...o, options: _.map(optionsList[getKey(o)], g => ({ key: g.value, showname: g.defaultLabel })) };
} else if (getKey(o) === "REPORT_ORGANIZATIN_TYPE") {
return {
...o, options: [
{ key: "0", showname: getLabel(111, "核算时组织信息"), selected: true },
{ key: "1", showname: getLabel(111, "实时组织信息"), selected: false }
]
};
} else if (getKey(o) === "OPEN_APPLICATION_ENCRYPT") {
return { ...o, viewAttr: sysinfo.showEncryptOperationButton === "true" ? 2 : 1 };
} else if (getKey(o) === "taxDeclarationFunction") {
@ -69,7 +77,9 @@ class RuleConfig extends Component {
} else if (item === "matchRule") {
form.updateFields({ [item]: { value: sysinfo["salaryAcctEmployeeRule"] || "" } });
} else if (item === "taxDeclarationFunction") {
form.updateFields({ [item]: { value: sysinfo["taxDeclarationFunction"] === "0" ? "0" : "1" } });
form.updateFields({ [item]: { value: sysinfo[item] === "0" ? "0" : (sysinfo[item] || "1") } });
} else if (item === "REPORT_ORGANIZATIN_TYPE") {
form.updateFields({ [item]: { value: sysinfo[item] === "0" ? "0" : (sysinfo[item] || "0") } });
} else if (item === "taxAgentShowStatus" || item === "salaryShowStatus" || item === "adjustShowStatus") {
form.updateFields({ [item]: { value: sysinfo[item] || "1" } });
} else if (item === "OPEN_APPLICATION_ENCRYPT") {
@ -117,6 +127,7 @@ class RuleConfig extends Component {
case "taxAgentShowStatus":
case "salaryShowStatus":
case "adjustShowStatus":
case "REPORT_ORGANIZATIN_TYPE":
if (!this.handleDebounce) {
this.handleDebounce = _.debounce(() => {
const confTitle = {
@ -126,7 +137,8 @@ class RuleConfig extends Component {
extEmpsWitch: getLabel(544097, "开启非系统人员"),
taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"),
salaryShowStatus: getLabel(111, "显示工资单页签"),
adjustShowStatus: getLabel(111, "显示调薪记录页签")
adjustShowStatus: getLabel(111, "显示调薪记录页签"),
REPORT_ORGANIZATIN_TYPE: getLabel(111, "组织信息")
};
this.unifiedSettings(key, confTitle[key]);
this.handleDebounce = null;