release/2.10.1.2402.01-个税
This commit is contained in:
parent
fe95424386
commit
ac479676e0
|
|
@ -43,7 +43,8 @@ import TemplatePreview from "./pages/payroll/templatePreview";
|
|||
import PayrollTemplatePreview from "./pages/payroll/templatePreview/tmpPreview"; //重构的工资单模板预览页面
|
||||
import MobilePayroll from "./pages/mobilePayroll";
|
||||
import SysConfig from "./pages/sysConfig";
|
||||
import RuleConfig from "./pages/ruleConfig";
|
||||
import RuleConfig from "./pages/ruleConfig/ruleConfig";
|
||||
import RuleConfigs from "./pages/ruleConfig";
|
||||
import Appconfig from "./pages/appConfig";
|
||||
import FieldManagement from "./pages/fieldManagement";
|
||||
import AnalysisOfSalaryStatistics from "./pages/analysisOfSalaryStatistics";
|
||||
|
|
@ -185,7 +186,7 @@ const Routes = (
|
|||
<Route key="mobilepayroll" path="mobilepayroll" component={MobilePayroll}/>
|
||||
<Route key="sysconfig" path="sysconfig" component={SysConfig}/>
|
||||
<Route key="sysconfig-1" path="sysconfig-1" component={RuleConfig}/>
|
||||
<Route key="ruleConfig" path="ruleConfig" component={RuleConfig}/>
|
||||
<Route key="ruleConfig" path="ruleConfig" component={RuleConfigs}/>
|
||||
<Route key="appconfig" path="appconfig" component={Appconfig}/>
|
||||
<Route key="fieldManagement" path="fieldManagement" component={FieldManagement}/>
|
||||
<Route key="analysisOfSalaryStatistics" path="analysisOfSalaryStatistics" component={AnalysisOfSalaryStatistics}/>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,167 @@
|
|||
import React from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
export const conditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["orderRule"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(15512, "排序字段"),
|
||||
labelcol: 8,
|
||||
options: [],
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["ascOrDesc"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(543351, "正序/倒序"),
|
||||
labelcol: 8,
|
||||
options: [],
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(543356, "排序规则"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["rule"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(543352, "人员字段"),
|
||||
labelcol: 8,
|
||||
options: [],
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(543357, "人员校验规则"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["enctry"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(526997, "加密设置"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(543358, "加密规则"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["operateTaxDeclaration"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "系统算税"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["withDrawTaxDeclaration"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "撤回申报表"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(111, "算税规则"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["confValue"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "允许删除档案"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(538004, "薪资档案"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["welBaseDiffByPerAndCom"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "区分个人和公司"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["welBaseAutoAdjust"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "导入基数自动调整上/下限"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(111, "福利档案基数"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["matchRuleOptions"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "匹配规则"),
|
||||
options: [],
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(111, "薪资核算人员匹配规则"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["salaryAcctFixedColumns"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "固定数"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(111, "薪资核算固定列头数"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["extEmpsWitch"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "开启非系统人员"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(111, "非系统人员"),
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const payloadList = [
|
||||
{ enumClass: "com.engine.salary.sys.enums.SalaryAcctEmployeeRuleEnum" },
|
||||
{ enumClass: "com.engine.salary.sys.enums.OrderRuleEnum" },
|
||||
{ enumClass: "com.engine.salary.sys.enums.AscOrDescEnum" },
|
||||
{ enumClass: "com.engine.salary.sys.enums.MatchEmployeeModeEnum" }
|
||||
];
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
import React from "react";
|
||||
import { WeaFormItem, WeaSearchGroup } from "ecCom";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
|
||||
export const renderRuleForm = (form, condition, onChange) => {
|
||||
const { isFormInit } = form;
|
||||
const formParams = form.getFormParams();
|
||||
let group = [];
|
||||
isFormInit && condition && condition.map(c => {
|
||||
let items = [];
|
||||
c.items.map(fields => {
|
||||
items.push({
|
||||
com: (
|
||||
<WeaFormItem
|
||||
label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
|
||||
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
||||
tipPosition="bottom"
|
||||
>
|
||||
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams} onChange={onChange}/>
|
||||
</WeaFormItem>),
|
||||
colSpan: 1,
|
||||
hide: fields.hide
|
||||
});
|
||||
});
|
||||
!_.isEmpty(items) && group.push(
|
||||
<WeaSearchGroup col={1} needTigger={true} showGroup={c.defaultshow} items={items} center={false}
|
||||
title={c.title}
|
||||
/>);
|
||||
});
|
||||
return group;
|
||||
};
|
||||
|
|
@ -1,9 +1,44 @@
|
|||
.ruleWrapper {
|
||||
height: 100%;
|
||||
.ruleWrapper-layout {
|
||||
.wea-new-top-content {
|
||||
overflow: hidden !important;
|
||||
|
||||
.titleWrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.ruleWrapper {
|
||||
padding: 16px;
|
||||
background: #e5e5e5;
|
||||
height: 100%;
|
||||
overflow: hidden auto;
|
||||
|
||||
.wea-search-group {
|
||||
background: #fff;
|
||||
margin-bottom: 16px;
|
||||
|
||||
.wea-content {
|
||||
padding: 8px !important;
|
||||
|
||||
.wea-form-cell:not(:last-child) {
|
||||
.wea-form-item {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wea-search-group, .wea-form-cell {
|
||||
padding: 0;
|
||||
|
||||
.wea-form-item {
|
||||
padding: 5px 16px;
|
||||
|
||||
.wea-form-item-label {
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wea-form-cell-wrapper {
|
||||
background: #FFF;
|
||||
border: 1px solid #e5e5e5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,17 +5,45 @@
|
|||
* Date: 2024/2/23
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
||||
import { renderRuleForm } from "./form";
|
||||
import { conditions } from "./conditions";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("baseFormStore")
|
||||
@observer
|
||||
class RuleConfig extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
conditions: []
|
||||
};
|
||||
}
|
||||
|
||||
</div>
|
||||
componentDidMount() {
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
form.initFormFields(conditions);
|
||||
}
|
||||
|
||||
init = async () => {
|
||||
};
|
||||
|
||||
handleChange = (value) => {
|
||||
console.log(value);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
return (
|
||||
<WeaTop
|
||||
title={<span>{getLabel(543355, "规则配置")}</span>} icon={<i className="icon-coms-Flow-setting"/>}
|
||||
iconBgcolor="#F14A2D" buttons={[]} className="ruleWrapper-layout"
|
||||
>
|
||||
<div className="ruleWrapper">{renderRuleForm(form, conditions, this.handleChange)}</div>
|
||||
</WeaTop>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
import { observable, action, toJS } from 'mobx';
|
||||
import { message } from 'antd';
|
||||
import { WeaForm, WeaLogView } from 'comsMobx';
|
||||
import { WeaLocaleProvider } from 'ecCom';
|
||||
import { action, observable } from "mobx";
|
||||
import { message } from "antd";
|
||||
import { WeaForm, WeaLogView } from "comsMobx";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
import * as API from '../apis'; // 引入API接口文件
|
||||
import * as API from "../apis"; // 引入API接口文件
|
||||
|
||||
const {LogStore} = WeaLogView;
|
||||
const { LogStore } = WeaLogView;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
export class BaseFormStore {
|
||||
@observable form = new WeaForm(); // nrew 一个form
|
||||
@observable form = new WeaForm(); // 规则渲染form
|
||||
|
||||
@observable logStore = new LogStore();
|
||||
@observable condition = []; // 存储后台得到的form数据
|
||||
@observable saveLoading = false; // 保存状态处理:保证保存的时候接口只走一次
|
||||
|
|
@ -18,9 +19,9 @@ export class BaseFormStore {
|
|||
@observable logVisible = false; // 控制日志弹框的显影
|
||||
|
||||
@action // 初始化操作: 一般用来初始化获取后台数据
|
||||
doInit = () =>{
|
||||
doInit = () => {
|
||||
this.getBaseForm();
|
||||
}
|
||||
};
|
||||
|
||||
@action // 获得form配置数据
|
||||
getBaseForm = () => {
|
||||
|
|
@ -32,22 +33,22 @@ export class BaseFormStore {
|
|||
this.form.initFormFields(result.condition);
|
||||
}
|
||||
}));
|
||||
}
|
||||
};
|
||||
|
||||
@action // 保存
|
||||
saveForm = () => {
|
||||
this.form.validateForm().then(action(f=>{ // 表单的校验: 直接使用form的validateForm方法即可
|
||||
this.form.validateForm().then(action(f => { // 表单的校验: 直接使用form的validateForm方法即可
|
||||
if (f.isValid) { // 校验听过: 走保存接口
|
||||
this.saveLoading = true;
|
||||
const params = this.form.getFormParams();
|
||||
API.saveForm(params).then(action(
|
||||
result => {
|
||||
this.saveLoading = false
|
||||
if(result.api_status){ // 保存成功: 1、给出提示 2、刷新form数据
|
||||
message.success(`${getLabel(18758,'保存成功')}`);
|
||||
this.saveLoading = false;
|
||||
if (result.api_status) { // 保存成功: 1、给出提示 2、刷新form数据
|
||||
message.success(`${getLabel(18758, "保存成功")}`);
|
||||
this.getBaseForm();
|
||||
}else {
|
||||
message.error(`${getLabel(22620,'保存失败')}`);
|
||||
} else {
|
||||
message.error(`${getLabel(22620, "保存失败")}`);
|
||||
}
|
||||
}
|
||||
));
|
||||
|
|
@ -55,9 +56,9 @@ export class BaseFormStore {
|
|||
f.showErrors();
|
||||
}
|
||||
}));
|
||||
}
|
||||
};
|
||||
|
||||
@action
|
||||
setLogVisible = bool => this.logVisible = bool
|
||||
|
||||
}
|
||||
setLogVisible = bool => this.logVisible = bool;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue