From ef1c529941d23c3c9a9db99e44f7b8a6acc5a1c9 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Tue, 17 Dec 2024 16:03:52 +0800
Subject: [PATCH 1/2] release/2.18.1.2412.01
---
pc4mobx/hrmSalary/pages/ruleConfig/conditions.js | 16 ++++++++++++++++
pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js | 4 +++-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js
index 51759130..c5701013 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js
@@ -152,6 +152,22 @@ export const conditions = [
lanId: 538004,
defaultshow: true
},
+ {
+ items: [
+ {
+ conditionType: "SWITCH",
+ domkey: ["ATTENDANCE_SERIAL_COLLECTION_BTN"],
+ fieldcol: 10,
+ label: "考勤引用是否采集班次数据",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ }
+ ],
+ title: "数据采集",
+ lanId: 111,
+ defaultshow: true
+ },
{
items: [
{
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js
index f84987cb..573bc864 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js
@@ -153,6 +153,7 @@ class RuleConfig extends Component {
case "APPROVAL_CAN_MANUAL_FILE_STATUS":
case "APPROVAL_CAN_RE_CALC_STATUS":
case "APPROVAL_CAN_EDIT_RESULT_STATUS":
+ case "ATTENDANCE_SERIAL_COLLECTION_BTN":
if (!this.handleDebounce) {
this.handleDebounce = _.debounce(() => {
const confTitle = {
@@ -169,7 +170,8 @@ class RuleConfig extends Component {
SALARY_APPROVAL_STATUS: getLabel(111, "是否开启薪资审批"),
APPROVAL_CAN_MANUAL_FILE_STATUS: getLabel(111, "开启审批的核算记录允许手动归档"),
APPROVAL_CAN_RE_CALC_STATUS: getLabel(111, "开启审批的核算记录允许重新核算"),
- APPROVAL_CAN_EDIT_RESULT_STATUS: getLabel(111, "审批流程发起后允许修改核算数据")
+ APPROVAL_CAN_EDIT_RESULT_STATUS: getLabel(111, "审批流程发起后允许修改核算数据"),
+ ATTENDANCE_SERIAL_COLLECTION_BTN: getLabel(111, "考勤引用是否采集班次数据")
};
this.unifiedSettings(key, confTitle[key]);
this.handleDebounce = null;
From cdd98ea6027c33157ae7a3799a5506bf57467720 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Fri, 20 Dec 2024 16:36:50 +0800
Subject: [PATCH 2/2] release/2.18.1.2412.01
---
.../ledgerPage/components/ledgerSalaryItem.js | 17 ++-
.../components/ledgerSalaryItemAddModal.js | 103 +++++++-----------
.../components/ledgerSalaryItemNormal.js | 13 ++-
.../components/ledgerSalaryItemTable.js | 4 +-
.../ledgerPage/components/ledgerSlide.js | 5 +-
.../pages/salaryItem/systemSalaryItemModal.js | 4 +-
6 files changed, 64 insertions(+), 82 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js
index 66134f24..934b777e 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js
@@ -254,20 +254,19 @@ class LedgerSalaryItem extends Component {
* Params:
* Date: 2022/12/14
*/
- handleAddSalaryItems = (id, items) => {
+ handleAddSalaryItems = (id, items, insertId) => {
const { itemGroups } = this.state;
this.setState({
itemGroups: _.map(itemGroups, it => {
if (id === it.uuid) {
+ items = _.map(items, child => {
+ const { id: itemsId, ...extraItems } = child;
+ return { ...extraItems, salaryItemGroupId: it.uuid };
+ });
+ if (insertId) it.items.splice(_.findIndex(it.items, k => (k.id === insertId) || (k.key === insertId)) + 1, 0, ...items);
return {
- ...it, items: _.map([..._.map(items, child => {
- const { id: itemsId, ...extraItems } = child;
- return { ...extraItems, salaryItemGroupId: it.uuid };
- }), ...it.items], (childItem, childItemIndex) => {
- return {
- ...childItem,
- sortedIndex: childItemIndex
- };
+ ...it, items: _.map(insertId ? it.items : [...items, ...it.items], (childItem, childItemIndex) => {
+ return { ...childItem, sortedIndex: childItemIndex };
})
};
}
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js
index 663aff22..7830fbe5 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js
@@ -1,25 +1,15 @@
import React from "react";
-import { Button, Switch } from "antd";
-import { WeaDialog, WeaInputSearch, WeaTable } from "ecCom";
+import { Button, Spin } from "antd";
+import { WeaCheckbox, WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaTable } from "ecCom";
import { listSalaryItem } from "../../../apis/ledger";
+const getLabel = WeaLocaleProvider.getLabel;
export default class LedgerSalaryItemAddModal extends React.Component {
constructor(props) {
super(props);
this.state = {
- loading: {
- query: false
- },
- name: "",
- selectedRowKeys: [],
- dataSource: [],
- dataSourceCopy: [],
- columns: [],
- pageInfo: {
- current: 1,
- pageSize: 10,
- total: 0
- }
+ loading: { query: false }, name: "", selectedRowKeys: [], dataSource: [],
+ dataSourceCopy: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
@@ -42,12 +32,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
excludeIds.push(i.salaryItemId);
});
});
- const payload = {
- excludeIds,
- name,
- ...pageInfo,
- ...extra
- };
+ const payload = { excludeIds, name, ...pageInfo, ...extra };
this.setState({ loading: { ...loading, query: true } });
listSalaryItem(payload).then(({ status, data }) => {
this.setState({ loading: { ...loading, query: false } });
@@ -56,9 +41,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
const tmpV = !_.isEmpty(dataSource) ? dataSource : [];
this.setState({
dataSourceCopy: [...dataSourceCopy, ...tmpV],
- pageInfo: { ...pageInfo, current, pageSize, total },
- dataSource: tmpV,
- columns
+ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource: tmpV, columns
});
}
}).catch(() => {
@@ -76,7 +59,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
case "useDefault":
case "hideDefault":
case "useInEmployeeSalary":
- return