feature/2.15.1.2407.01-薪资项目以及字段管理页面改造

This commit is contained in:
黎永顺 2024-08-20 13:37:09 +08:00
parent aaf2914e20
commit f03c187796
3 changed files with 121 additions and 12 deletions

View File

@ -2,6 +2,78 @@ import { WeaLocaleProvider } from "ecCom";
import { dataTypeOptions, patternOptions, roundingModeOptions } from "./options";
const getLabel = WeaLocaleProvider.getLabel;
export const salaryItemConditions = [
{
items: [
{
conditionType: "INPUT",
domkey: ["name"],
fieldcol: 14,
label: "名称",
lanId: 111,
labelcol: 8,
value: "",
rules: "required|string",
viewAttr: 3
},
{
conditionType: "SWITCH",
domkey: ["useDefault"],
fieldcol: 14,
label: "默认使用",
lanId: 111,
labelcol: 8,
value: "",
rules: "required|string",
tipLanId: 111,
tip: "提示:开启后,每个薪资方案都有该薪资项目,可在具体薪资方案中删除",
viewAttr: 3
},
{
conditionType: "SWITCH",
domkey: ["hideDefault"],
fieldcol: 14,
label: "核算时隐藏",
lanId: 111,
labelcol: 8,
value: "",
rules: "required|string",
tipLanId: 111,
tip: "提示:开启后,在薪资账套中添加该项目时,默认勾选隐藏且在核算时隐藏该薪资项目,可在具体薪资账套中设置是否隐藏",
viewAttr: 3
},
{
conditionType: "SELECT",
domkey: ["sharedType"],
fieldcol: 14,
label: "可见性",
lanId: 111,
labelcol: 8,
value: "",
options: [],
rules: "required|string",
viewAttr: 3
},
{
conditionType: "SELECT",
domkey: ["taxAgentIds"],
fieldcol: 14,
label: "可见性范围",
lanId: 111,
labelcol: 8,
value: "",
options: [],
multiple: true,
rules: "required|string",
viewAttr: 3,
hide: true
},
],
title: "",
defaultshow: true
}
];
export const salaryItemFields = [
{
key: "name",

View File

@ -9,8 +9,6 @@ export default class CustomSalaryItemSlide extends React.Component {
constructor(props) {
super(props);
this.state = {
loading: false,
showForm: false,
formalModalVisible: false,
salaryItemName: ""
@ -38,18 +36,13 @@ export default class CustomSalaryItemSlide extends React.Component {
};
renderTitle = () => {
const { loading } = this.state, { title, buttons } = this.props;
const { title, buttons } = this.props;
return <div className="titleDialog">
<div className="titleCol titleLeftBox">
<div className="titleIcon"><i className="icon-coms-fa"/></div>
<div className="title">{title}</div>
</div>
<div className="titleCol titleRightBox">
{
_.isEmpty(detail) &&
<Button type="primary" loading={loading} onClick={this.save}>{getLabel(537558, "保存")}</Button>
}
</div>
<div className="titleCol titleRightBox">{buttons}</div>
</div>;
};

View File

@ -8,12 +8,56 @@
.salaryItems_content {
height: 100%;
}
.wea-slide-modal-title {
border-bottom: 1px solid #e5e5e5 !important;
}
.titleDialog {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 46px 0 16px;
.titleCol {
flex: 1;
display: flex;
align-items: center;
}
.titleLeftBox {
.titleIcon {
color: #fff;
margin: 0;
width: 40px;
height: 40px;
line-height: 40px;
font-size: 22px;
display: flex;
align-items: center;
justify-content: center;
background: #F14A2D;
border-radius: 50%;
}
.title {
font-size: 14px;
color: #333;
padding-left: 6px;
}
}
.titleRightBox {
justify-content: flex-end;
button {
margin-left: 10px;
}
}
}
}
.customSalaryItemSlide {
padding: 16px;