Merge branch 'feature/2.16.1.2410.01-次账号' into release/2.17.1.2411.01

# Conflicts:
#	pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js
This commit is contained in:
lys 2024-11-12 18:05:44 +08:00
commit 712b45453a
4 changed files with 42 additions and 3 deletions

View File

@ -59,6 +59,24 @@ export const conditions = [
lanId: 543358,
defaultshow: true
},
{
items: [
{
conditionType: "SWITCH",
domkey: ["openSecondaryAccount"],
fieldcol: 10,
label: "启用主次账号",
tip: "启用后,若有次账号相关档案,则此功能不能关闭。",
tipLanId: 111,
lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
title: "主次身份",
lanId: 111,
defaultshow: true
},
{
items: [
{

View File

@ -1,8 +1,9 @@
import React from "react";
import { WeaFormItem, WeaSearchGroup, WeaTools } from "ecCom";
import { WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
import { WeaSwitch } from "comsMobx";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
export const renderRuleForm = (form, condition, onChange) => {
const { isFormInit } = form;
@ -14,7 +15,12 @@ export const renderRuleForm = (form, condition, onChange) => {
items.push({
com: (
<WeaFormItem
label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
label={<div className="customFormLabel">
<span>{fields.label}</span>
{fields.tip && <WeaHelpfulTip width={200} title={getLabel(fields.tipLanId, fields.tip)}
placement="topLeft"/>}
</div>}
labelCol={{ span: `${fields.labelcol}` }}
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
tipPosition="bottom">
<WeaSwitch

View File

@ -8,6 +8,19 @@
height: 100%;
overflow: hidden auto;
.wea-form-item .wea-form-item-label.colon:after {
display: none;
}
.customFormLabel {
display: flex;
align-items: center;
& > span {
margin-right: 4px;
}
}
.wea-search-group {
background: #fff;
margin-bottom: 16px;

View File

@ -136,6 +136,7 @@ class RuleConfig extends Component {
case "adjustShowStatus":
case "REPORT_ORGANIZATIN_TYPE":
case "SALARY_DETAILS_REPORT_SHOW_TYPE":
case "openSecondaryAccount":
if (!this.handleDebounce) {
this.handleDebounce = _.debounce(() => {
const confTitle = {
@ -147,7 +148,8 @@ class RuleConfig extends Component {
salaryShowStatus: getLabel(111, "显示工资单页签"),
adjustShowStatus: getLabel(111, "显示调薪记录页签"),
REPORT_ORGANIZATIN_TYPE: getLabel(111, "组织信息"),
SALARY_DETAILS_REPORT_SHOW_TYPE: getLabel(111, "薪资明细显示模式")
SALARY_DETAILS_REPORT_SHOW_TYPE: getLabel(111, "薪资明细显示模式"),
openSecondaryAccount: getLabel(111, "启用主次身份"),
};
this.unifiedSettings(key, confTitle[key]);
this.handleDebounce = null;