feature/2.16.1.2410.01-次账号

This commit is contained in:
lys 2024-10-25 11:46:00 +08:00
parent 02ff34c202
commit c10e6fb3ee
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

@ -128,6 +128,7 @@ class RuleConfig extends Component {
case "salaryShowStatus":
case "adjustShowStatus":
case "REPORT_ORGANIZATIN_TYPE":
case "openSecondaryAccount":
if (!this.handleDebounce) {
this.handleDebounce = _.debounce(() => {
const confTitle = {
@ -138,7 +139,8 @@ class RuleConfig extends Component {
taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"),
salaryShowStatus: getLabel(111, "显示工资单页签"),
adjustShowStatus: getLabel(111, "显示调薪记录页签"),
REPORT_ORGANIZATIN_TYPE: getLabel(111, "组织信息")
REPORT_ORGANIZATIN_TYPE: getLabel(111, "组织信息"),
openSecondaryAccount: getLabel(111, "启用主次身份"),
};
this.unifiedSettings(key, confTitle[key]);
this.handleDebounce = null;