diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.less b/pc4mobx/hrmSalary/pages/salaryItem/index.less
index 0ddab0d2..74da4b67 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/index.less
+++ b/pc4mobx/hrmSalary/pages/salaryItem/index.less
@@ -11,6 +11,9 @@
}
+
+
+
.customSalaryItemSlide {
padding: 16px;
From f03c187796e1e67d5ffe059b80c7b041273f1360 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Tue, 20 Aug 2024 13:37:09 +0800
Subject: [PATCH 10/18] =?UTF-8?q?feature/2.15.1.2407.01-=E8=96=AA=E8=B5=84?=
=?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=BB=A5=E5=8F=8A=E5=AD=97=E6=AE=B5=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E9=A1=B5=E9=9D=A2=E6=94=B9=E9=80=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/pages/salaryItem/columns.js | 72 +++++++++++++++++++
.../pages/salaryItem/customSalaryItemSlide.js | 11 +--
pc4mobx/hrmSalary/pages/salaryItem/index.less | 50 ++++++++++++-
3 files changed, 121 insertions(+), 12 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/columns.js b/pc4mobx/hrmSalary/pages/salaryItem/columns.js
index 7e868d31..f93b0b71 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/columns.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/columns.js
@@ -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",
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js b/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js
index 9baa49f9..4ff97292 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js
@@ -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
-
- {
- _.isEmpty(detail) &&
-
- }
-
+
{buttons}
;
};
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.less b/pc4mobx/hrmSalary/pages/salaryItem/index.less
index 74da4b67..e12fed2b 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/index.less
+++ b/pc4mobx/hrmSalary/pages/salaryItem/index.less
@@ -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;
From 50b4426a75d60a415b73174250b4c3c953feeedf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Tue, 20 Aug 2024 14:02:33 +0800
Subject: [PATCH 11/18] =?UTF-8?q?feature/2.15.1.2407.01-=E8=96=AA=E8=B5=84?=
=?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=BB=A5=E5=8F=8A=E5=AD=97=E6=AE=B5=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E9=A1=B5=E9=9D=A2=E6=94=B9=E9=80=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../pages/salaryItem/customSalaryItemSlide.js | 46 +++++++++++++++++--
pc4mobx/hrmSalary/stores/salaryItem.js | 3 ++
2 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js b/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js
index 4ff97292..e3486a31 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js
@@ -1,20 +1,37 @@
import React from "react";
-import { WeaLocaleProvider, WeaSlideModal } from "ecCom";
+import { inject, observer } from "mobx-react";
+import { WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal } from "ecCom";
+import { WeaSwitch } from "comsMobx";
// import FormalFormModal from "./formalFormModal";
// import SalaryItemForm from "./salaryItemForm";
const getLabel = WeaLocaleProvider.getLabel;
+const getKey = WeaTools.getKey;
+@inject("salaryItemStore")
+@observer
export default class CustomSalaryItemSlide extends React.Component {
constructor(props) {
super(props);
this.state = {
+ conditions: [],
+
showForm: false,
formalModalVisible: false,
salaryItemName: ""
};
}
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) {
+ document.querySelector(".custom_salaryItemSlide").classList.add("zIndex0-weaslide-title");
+ this.initForm(nextProps);
+ } else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
+ document.querySelector(".custom_salaryItemSlide").classList.remove("zIndex0-weaslide-title");
+ this.props.salaryItemStore.initItemsForm();
+ }
+ }
+
handleChange = (params) => {
this.props.onChange({ ...this.props.request, ...params });
};
@@ -34,7 +51,29 @@ export default class CustomSalaryItemSlide extends React.Component {
originSqlContent: data.referenceType === "sql" ? data.formula : ""
});
};
-
+ renderForm = (form) => {
+ const { conditions } = this.state, { isFormInit } = form, formParams = form.getFormParams();
+ let group = [];
+ isFormInit && conditions.map(c => {
+ let items = [];
+ c.items.map(fields => {
+ items.push({
+ com: (
+
+
+ {
+ fields.tip &&
+ }
+ ),
+ hide: fields.hide
+ });
+ });
+ group.push(
);
+ });
+ return group;
+ };
renderTitle = () => {
const { title, buttons } = this.props;
return
@@ -51,7 +90,8 @@ export default class CustomSalaryItemSlide extends React.Component {
const { valueType, dataType, formulaId } = request;
const { formalModalVisible, salaryItemName } = this.state;
return (
}/>
diff --git a/pc4mobx/hrmSalary/stores/salaryItem.js b/pc4mobx/hrmSalary/stores/salaryItem.js
index cc3a0214..45f30171 100644
--- a/pc4mobx/hrmSalary/stores/salaryItem.js
+++ b/pc4mobx/hrmSalary/stores/salaryItem.js
@@ -9,6 +9,9 @@ const { TableStore } = WeaTableNew;
export class SalaryItemStore {
@observable salarySetform = new WeaForm(); //同步薪资账套form
+ @observable itemsForm = new WeaForm(); //自定义薪资项目form
+ @action initItemsForm = () => this.itemsForm = new WeaForm();
+
@observable tableStore = new TableStore(); // new table
@observable sysListTableStore = new TableStore();
From fdf82d883d6247d34bfdd3ee6a02916607526cfb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Tue, 20 Aug 2024 14:10:27 +0800
Subject: [PATCH 12/18] =?UTF-8?q?feature/2.15.1.2407.01-=E8=96=AA=E8=B5=84?=
=?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=BB=A5=E5=8F=8A=E5=AD=97=E6=AE=B5=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E9=A1=B5=E9=9D=A2=E6=94=B9=E9=80=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../pages/salaryItem/customSalaryItemSlide.js | 16 ++++++++++++++++
pc4mobx/hrmSalary/style/index.less | 7 +++++++
2 files changed, 23 insertions(+)
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js b/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js
index e3486a31..f615f0e6 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js
@@ -2,6 +2,7 @@ import React from "react";
import { inject, observer } from "mobx-react";
import { WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal } from "ecCom";
import { WeaSwitch } from "comsMobx";
+import { salaryItemConditions } from "./columns";
// import FormalFormModal from "./formalFormModal";
// import SalaryItemForm from "./salaryItemForm";
@@ -51,6 +52,21 @@ export default class CustomSalaryItemSlide extends React.Component {
originSqlContent: data.referenceType === "sql" ? data.formula : ""
});
};
+ initForm = (props) => {
+ this.setState({
+ conditions: _.map(salaryItemConditions, c => {
+ return {
+ ...c, items: _.map(c.items, fields => {
+ return {
+ ...fields, label: getLabel(fields.lanId, fields.label)
+ };
+ })
+ };
+ })
+ }, () => {
+ props.salaryItemStore.itemsForm.initFormFields(this.state.conditions);
+ });
+ };
renderForm = (form) => {
const { conditions } = this.state, { isFormInit } = form, formParams = form.getFormParams();
let group = [];
diff --git a/pc4mobx/hrmSalary/style/index.less b/pc4mobx/hrmSalary/style/index.less
index 8e65be90..5f2c76d6 100644
--- a/pc4mobx/hrmSalary/style/index.less
+++ b/pc4mobx/hrmSalary/style/index.less
@@ -117,3 +117,10 @@
}
+//公共slide框标题样式
+.zIndex0-weaslide-title {
+ .wea-new-top-req {
+ z-index: 0 !important;
+ }
+}
+
From 673c2ba908323ece7a9b35799b37f84415fb6870 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Tue, 20 Aug 2024 15:27:03 +0800
Subject: [PATCH 13/18] =?UTF-8?q?feature/2.15.1.2407.01-=E8=96=AA=E8=B5=84?=
=?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=BB=A5=E5=8F=8A=E5=AD=97=E6=AE=B5=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E9=A1=B5=E9=9D=A2=E6=94=B9=E9=80=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/pages/salaryItem/columns.js | 130 +++++++++++++++++-
.../pages/salaryItem/customSalaryItemSlide.js | 35 +++--
pc4mobx/hrmSalary/pages/salaryItem/index.less | 8 ++
3 files changed, 159 insertions(+), 14 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/columns.js b/pc4mobx/hrmSalary/pages/salaryItem/columns.js
index f93b0b71..a478b454 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/columns.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/columns.js
@@ -3,6 +3,7 @@ import { dataTypeOptions, patternOptions, roundingModeOptions } from "./options"
const getLabel = WeaLocaleProvider.getLabel;
+
export const salaryItemConditions = [
{
items: [
@@ -24,7 +25,7 @@ export const salaryItemConditions = [
label: "默认使用",
lanId: 111,
labelcol: 8,
- value: "",
+ value: "0",
rules: "required|string",
tipLanId: 111,
tip: "提示:开启后,每个薪资方案都有该薪资项目,可在具体薪资方案中删除",
@@ -37,7 +38,7 @@ export const salaryItemConditions = [
label: "核算时隐藏",
lanId: 111,
labelcol: 8,
- value: "",
+ value: "0",
rules: "required|string",
tipLanId: 111,
tip: "提示:开启后,在薪资账套中添加该项目时,默认勾选隐藏且在核算时隐藏该薪资项目,可在具体薪资账套中设置是否隐藏",
@@ -69,6 +70,131 @@ export const salaryItemConditions = [
viewAttr: 3,
hide: true
},
+ {
+ conditionType: "SELECT",
+ domkey: ["dataType"],
+ fieldcol: 14,
+ label: "字段类型",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ options: [
+ { key: "number", showname: "数值", lanId: 111, selected: true },
+ { key: "string", showname: "字符", lanId: 111, selected: false }
+ ],
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["roundingMode"],
+ fieldcol: 14,
+ label: "舍入规则",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ options: [
+ { key: "1", selected: true, showname: "原始数据", lanId: 111 },
+ { key: "2", selected: false, showname: "四舍五入", lanId: 111 },
+ { key: "3", selected: false, showname: "向上舍入", lanId: 111 },
+ { key: "4", selected: false, showname: "向下舍入", lanId: 111 },
+ { key: "5", selected: false, showname: "见分进角", lanId: 111 }
+ ],
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["pattern"],
+ fieldcol: 14,
+ label: "保留小数位",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ options: [
+ { key: "0", selected: false, showname: "0" },
+ { key: "1", selected: false, showname: "1" },
+ { key: "2", selected: true, showname: "2" },
+ { key: "3", selected: false, showname: "3" },
+ { key: "4", selected: false, showname: "4" },
+ { key: "5", selected: false, showname: "5" },
+ { key: "6", selected: true, showname: "6" },
+ { key: "7", selected: false, showname: "7" },
+ { key: "8", selected: false, showname: "8" },
+ { key: "9", selected: false, showname: "9" },
+ { key: "10", selected: false, showname: "10" }
+ ],
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["valueType"],
+ fieldcol: 14,
+ label: "取值方式",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ detailType: 3,
+ options: [
+ { key: "1", showname: "输入", selected: true, lanId: 111 },
+ { key: "2", showname: "公式", selected: false, lanId: 111 },
+ { key: "3", showname: "SQL", selected: false, lanId: 111 }
+ ],
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["defaultValue"],
+ fieldcol: 14,
+ label: "默认值",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["formulaContent"],
+ fieldcol: 14,
+ label: "公式",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["sortedIndex"],
+ fieldcol: 14,
+ label: "显示顺序",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["width"],
+ fieldcol: 14,
+ label: "显示宽度",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ conditionType: "TEXTAREA",
+ domkey: ["description"],
+ fieldcol: 14,
+ label: "备注",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ viewAttr: 2,
+ otherParams: { minRows: 3 }
+ }
],
title: "",
defaultshow: true
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js b/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js
index f615f0e6..dc2a1e81 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js
@@ -1,6 +1,6 @@
import React from "react";
import { inject, observer } from "mobx-react";
-import { WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal } from "ecCom";
+import { WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTools } from "ecCom";
import { WeaSwitch } from "comsMobx";
import { salaryItemConditions } from "./columns";
// import FormalFormModal from "./formalFormModal";
@@ -57,9 +57,19 @@ export default class CustomSalaryItemSlide extends React.Component {
conditions: _.map(salaryItemConditions, c => {
return {
...c, items: _.map(c.items, fields => {
- return {
- ...fields, label: getLabel(fields.lanId, fields.label)
- };
+ fields = { ...fields, label: getLabel(fields.lanId, fields.label) };
+ switch (getKey(fields)) {
+ case "dataType":
+ case "valueType":
+ case "roundingMode":
+ fields = {
+ ...fields, options: _.map(fields.options, o => ({ ...o, showname: getLabel(o.lanId, o.showname) }))
+ };
+ break;
+ default:
+ break;
+ }
+ return fields;
})
};
})
@@ -67,7 +77,8 @@ export default class CustomSalaryItemSlide extends React.Component {
props.salaryItemStore.itemsForm.initFormFields(this.state.conditions);
});
};
- renderForm = (form) => {
+ renderForm = () => {
+ const { salaryItemStore: { itemsForm: form } } = this.props;
const { conditions } = this.state, { isFormInit } = form, formParams = form.getFormParams();
let group = [];
isFormInit && conditions.map(c => {
@@ -80,7 +91,8 @@ export default class CustomSalaryItemSlide extends React.Component {
{
fields.tip &&
+ style={{ marginLeft: 16 }} width={350} title={getLabel(fields.tipLanId, fields.tip)}
+ placement="topLeft"/>
}
),
hide: fields.hide
@@ -102,15 +114,14 @@ export default class CustomSalaryItemSlide extends React.Component {
};
render() {
- const { request } = this.props;
- const { valueType, dataType, formulaId } = request;
- const { formalModalVisible, salaryItemName } = this.state;
+ const { request, onClose } = this.props;
+ // const { valueType, dataType, formulaId } = request;
+ // const { formalModalVisible, salaryItemName } = this.state;
return (
- }/>
+ direction="right" title={this.renderTitle()} onClose={() => onClose()}
+ content={