-
- 如果:调薪生效日期在
- this.setState({ dayOfMonth })}
- />
- (含)之前
-
-
- 计薪规则为:
- this.setState({ beforeAdjustmentType: e.target.value })}
- value={beforeAdjustmentType}>
- 取调整后薪资
- 分段计薪
- 取平均
-
-
-
-
否则:调薪生效日期在{dayOfMonth}号之后
-
-
计薪规则为:
-
this.setState({ afterAdjustmentType: e.target.value })}
- value={afterAdjustmentType}>
- 取调整前薪资
- 分段计薪
- 取平均
-
-
+ const { title, visible, ledgerStore: { ruleForm } } = this.props;
+ const buttons = [
];
+ const itemRender = {
+ salaryItemId: (field, textAreaProps, form, formParams) => {
+ return (
);
+ },
+ dayOfMonth: () => null
+ };
+ const childrenComponents = {
+ salaryItemId: () => {
+ const coms = [], { fieldMap } = ruleForm;
+ coms.push(
+
+
+
+
{fieldMap["dayOfMonth"].label}
-
+ );
+ return [
+ {
+ com: {coms}
,
+ col: 1
+ }
+ ];
+ }
+ };
+ return (
+
+
+ {/**/}
+ {/* */}
+ {/* this.setState({ salaryItemId, salaryItemName })}*/}
+ {/* />*/}
+ {/* */}
+ {/* } labelCol={{ span: 4 }} wrapperCol={{ span: 20 }} colon={false}>*/}
+ {/* */}
+ {/*
*/}
+ {/* 如果:调薪生效日期在*/}
+ {/* this.setState({ dayOfMonth })}*/}
+ {/* />*/}
+ {/* (含)之前*/}
+ {/*
*/}
+ {/*
*/}
+ {/* 计薪规则为:*/}
+ {/* this.setState({ beforeAdjustmentType: e.target.value })}*/}
+ {/* value={beforeAdjustmentType}>*/}
+ {/* 取调整后薪资*/}
+ {/* 分段计薪*/}
+ {/* 取平均*/}
+ {/* */}
+ {/* */}
+ {/*
*/}
+ {/*
否则:调薪生效日期在{dayOfMonth}号之后
*/}
+ {/*
*/}
+ {/* 计薪规则为:*/}
+ {/* this.setState({ afterAdjustmentType: e.target.value })}*/}
+ {/* value={afterAdjustmentType}>*/}
+ {/* 取调整前薪资*/}
+ {/* 分段计薪*/}
+ {/* 取平均*/}
+ {/* */}
+ {/* */}
+ {/*
*/}
+ {/*
*/}
+ {/* */}
+ {/**/}
);
}
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/config.js b/pc4mobx/hrmSalary/pages/ledgerPage/config.js
index 214982ed..e6726805 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/config.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/config.js
@@ -859,3 +859,32 @@ export const classifyConditions = [
defaultshow: true
}
];
+export const ruleConditions = [//调薪计薪规则项表单
+ {
+ items: [
+ {
+ conditionType: "SELECT",
+ domkey: ["salaryItemId"],
+ fieldcol: 8,
+ rules: "required|string",
+ label: "薪资项目",
+ lanId: 111,
+ labelcol: 6,
+ value: "",
+ multiple: true,
+ viewAttr: 3
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["dayOfMonth"],
+ fieldcol: 6,
+ label: "如果:调薪生效日期在",
+ lanId: 111,
+ labelcol: 0,
+ value: "",
+ viewAttr: 2
+ }
+ ],
+ defaultshow: true
+ }
+];
diff --git a/pc4mobx/hrmSalary/stores/ledger.js b/pc4mobx/hrmSalary/stores/ledger.js
index 0411826d..6aaff1b8 100644
--- a/pc4mobx/hrmSalary/stores/ledger.js
+++ b/pc4mobx/hrmSalary/stores/ledger.js
@@ -17,7 +17,8 @@ export class LedgerStore {
@action initAARForm = (v) => this.AARForm = new WeaForm();//重置核算审批规则form
@action initAARClassifyForm = (v) => this.AARClassifyForm = new WeaForm();//重置审批规则分类编辑form
-
+ @observable ruleForm = new WeaForm(); // 调薪计薪规则项form
+ @action initRuleForm = (v) => this.ruleForm = new WeaForm();//重置调薪计薪规则项form
/*******************************************************/
@observable tableStore = new TableStore(); // new table
From 7c85cbae4f98c7654b21476c7c4d83a290b7e9cb Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Tue, 18 Feb 2025 15:48:37 +0800
Subject: [PATCH 46/51] =?UTF-8?q?release/3.0.0.2502.01-=E5=90=88=E5=B9=B6?=
=?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../pages/ledgerPage/components/ledgerAdjustRuleAddModal.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js
index eea87be3..771fdb12 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js
@@ -6,7 +6,7 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
-import { WeaDialog, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaTools } from "ecCom";
+import { WeaDialog, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSelect, WeaTools } from "ecCom";
import FormInfo from "../../../components/FormInfo";
import { WeaSwitch } from "comsMobx";
import { Button, Modal } from "antd";
@@ -126,6 +126,8 @@ class LedgerAdjustRuleAddModal extends Component {
{fieldMap["dayOfMonth"].label}
+
+ {getLabel(111, "(含)之前")}
From b6a0678f1ada2e1faa0557c496dd295b28ecbdb6 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Tue, 18 Feb 2025 17:30:21 +0800
Subject: [PATCH 47/51] =?UTF-8?q?release/3.0.0.2502.01-=E5=90=88=E5=B9=B6?=
=?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../pages/ledgerPage/components/index.less | 33 +--
.../components/ledgerAdjustRuleAddModal.js | 211 +++++-------------
pc4mobx/hrmSalary/pages/ledgerPage/config.js | 46 +++-
3 files changed, 111 insertions(+), 179 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less
index 96d0463d..5ed5c65c 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less
@@ -91,39 +91,14 @@
//调薪计薪规则弹框
.adjustRuleModalWrapper {
- .titleTipWrapper {
- display: flex;
- align-items: center;
+ .calcRules .cust {
+ line-height: 30px;
- .title {
- margin-right: 4px;
- }
- }
-
- .adjustRuleDetailWrapper {
- display: flex;
- flex-direction: column;
-
- .adjustSalaryFlex {
+ .child {
display: flex;
align-items: center;
- margin-bottom: 10px;
}
}
-
- .wea-select, .ant-select-selection, .ant-select {
- width: 100%;
- }
-
- .wea-select {
- display: inline-block;
- position: relative;
- }
-
- .ant-select-selection {
- height: 30px;
- border-radius: 0;
- }
}
// 回算薪资项目
@@ -249,7 +224,7 @@
padding: 0;
background: transparent;
border: none;
- font-size: 20px!important;
+ font-size: 20px !important;
line-height: 20px;
}
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js
index 771fdb12..2456af87 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js
@@ -9,9 +9,10 @@ import { inject, observer } from "mobx-react";
import { WeaDialog, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSelect, WeaTools } from "ecCom";
import FormInfo from "../../../components/FormInfo";
import { WeaSwitch } from "comsMobx";
-import { Button, Modal } from "antd";
+import { Button } from "antd";
import { listSalarySobItem } from "../../../apis/ledger";
import { monthDays, ruleConditions } from "../config";
+import "./index.less";
const { getLabel } = WeaLocaleProvider;
const getKey = WeaTools.getKey;
@@ -21,19 +22,12 @@ const getKey = WeaTools.getKey;
class LedgerAdjustRuleAddModal extends Component {
constructor(props) {
super(props);
- this.state = {
- beforeAdjustmentType: 2,
- afterAdjustmentType: 1,
- salaryItemId: "",
- salaryItemName: "",
- dayOfMonth: "1",
- salaryItemOptions: [],
- conditions: []
- };
+ this.state = { conditions: [] };
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) this.listSalarySobItem(nextProps.salarySobId);
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.ledgerStore.initRuleForm();
}
listSalarySobItem = (salarySobId) => {
@@ -46,17 +40,26 @@ class LedgerAdjustRuleAddModal extends Component {
this.setState({
conditions: _.map(ruleConditions, item => ({
...item, items: _.map(item.items, o => {
+ o = { ...o, label: getLabel(o.lanId, o.label) };
if (getKey(o) === "salaryItemId") {
return {
- ...o, label: getLabel(o.lanId, o.label),
- options: _.map(data, it => ({ key: it.salaryItemId.toString(), showname: it.salaryItemName }))
+ ...o, options: _.map(data, it => ({ key: it.salaryItemId.toString(), showname: it.salaryItemName }))
};
} else if (getKey(o) === "dayOfMonth") {
- return { ...o, label: getLabel(o.lanId, o.label), options: monthDays };
+ return { ...o, options: monthDays };
+ } else if (getKey(o) === "beforeAdjustmentType" || getKey(o) === "afterAdjustmentType") {
+ return {
+ ...o,
+ options: _.map(o.options, k => ({
+ ...k,
+ showname: !k.helpfultip ? getLabel(k.lanId, k.showname) :
+ {getLabel(k.lanId, k.showname)}
+
+
+ }))
+ };
}
- return {
- ...o, label: getLabel(o.lanId, o.label), helpfulTip: getLabel(o.helpfulTipLanId, o.helpfulTip)
- };
+ return o;
})
}))
}, () => this.props.ledgerStore.ruleForm.initFormFields(this.state.conditions));
@@ -64,156 +67,77 @@ class LedgerAdjustRuleAddModal extends Component {
});
};
handleSave = () => {
- const { salaryRuleItemsList, onSave } = this.props;
- const { salaryItemOptions, ...extraItems } = this.state;
- if (_.isEmpty(extraItems.salaryItemId)) {
- Modal.warning({
- title: "信息确认",
- content: "必要信息不完整,红色*为必填项!"
- });
- return;
- }
- const items = { ...extraItems, salaryItemName: this.state.salaryItemName };
- const { salaryItemName, salaryItemId, ...extraFileds } = items;
- const salaryItemNameFiled = salaryItemName.split(","), salaryItemIdFiled = salaryItemId.split(",");
- const fields = _.map(salaryItemNameFiled, (item, index) => {
- return {
- ...extraFileds,
- salaryItemName: item,
- salaryItemId: salaryItemIdFiled[index]
- };
- });
- this.handleReset();
- onSave([...salaryRuleItemsList, ...fields]);
- };
- handleReset = () => {
- this.setState({
- beforeAdjustmentType: 2,
- afterAdjustmentType: 1,
- salaryItemId: "",
- salaryItemName: "",
- dayOfMonth: "1",
- salaryItemOptions: []
- }, () => {
- const { onCancel } = this.props;
- onCancel();
+ const { salaryRuleItemsList, onSave, ledgerStore: { ruleForm } } = this.props;
+ ruleForm.validateForm().then(f => {
+ if (f.isValid) {
+ const { salaryItemId } = ruleForm.getFormParams(), { fieldMap } = ruleForm;
+ const fields = _.map(salaryItemId.split(","), o => ({
+ ...ruleForm.getFormParams(),
+ salaryItemId: o,
+ salaryItemName: _.find(fieldMap["salaryItemId"]["options"], k => k.key === o).showname
+ }));
+ this.props.onCancel(onSave([...salaryRuleItemsList, ...fields]));
+ } else {
+ f.showErrors();
+ }
});
};
render() {
- const {
- salaryItemId,
- salaryItemOptions,
- dayOfMonth,
- beforeAdjustmentType,
- afterAdjustmentType,
- conditions
- } = this.state;
- const { title, visible, ledgerStore: { ruleForm } } = this.props;
+ const { title, visible, ledgerStore: { ruleForm } } = this.props, { conditions } = this.state;
const buttons = [];
const itemRender = {
salaryItemId: (field, textAreaProps, form, formParams) => {
return ();
},
- dayOfMonth: () => null
+ dayOfMonth: () => null,
+ beforeAdjustmentType: () => null,
+ afterAdjustmentType: () => null
};
const childrenComponents = {
salaryItemId: () => {
+ const { dayOfMonth, beforeAdjustmentType, afterAdjustmentType } = ruleForm.getFormParams();
const coms = [], { fieldMap } = ruleForm;
coms.push(
-
+
+ {getLabel(111, "计薪规则")}
+
+ } labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
{fieldMap["dayOfMonth"].label}
-
+ ruleForm.updateFields({ dayOfMonth: { value: v } })}/>
{getLabel(111, "(含)之前")}
+
+
{fieldMap["beforeAdjustmentType"].label}
+
ruleForm.updateFields({ beforeAdjustmentType: { value: v } })}/>
+
+
+
{getLabel(111, "否则:调薪生效日期在10号之后")}
+
+
+
{fieldMap["afterAdjustmentType"].label}
+
ruleForm.updateFields({ afterAdjustmentType: { value: v } })}/>
+
);
- return [
- {
- com: {coms}
,
- col: 1
- }
- ];
+ return [{ com: {coms}
, col: 1 }];
}
};
return (
-
+
- {/**/}
- {/* */}
- {/* this.setState({ salaryItemId, salaryItemName })}*/}
- {/* />*/}
- {/* */}
- {/* } labelCol={{ span: 4 }} wrapperCol={{ span: 20 }} colon={false}>*/}
- {/* */}
- {/*
*/}
- {/* 如果:调薪生效日期在*/}
- {/* this.setState({ dayOfMonth })}*/}
- {/* />*/}
- {/* (含)之前*/}
- {/*
*/}
- {/*
*/}
- {/* 计薪规则为:*/}
- {/* this.setState({ beforeAdjustmentType: e.target.value })}*/}
- {/* value={beforeAdjustmentType}>*/}
- {/* 取调整后薪资*/}
- {/* 分段计薪*/}
- {/* 取平均*/}
- {/* */}
- {/* */}
- {/*
*/}
- {/*
否则:调薪生效日期在{dayOfMonth}号之后
*/}
- {/*
*/}
- {/* 计薪规则为:*/}
- {/* this.setState({ afterAdjustmentType: e.target.value })}*/}
- {/* value={afterAdjustmentType}>*/}
- {/* 取调整前薪资*/}
- {/* 分段计薪*/}
- {/* 取平均*/}
- {/* */}
- {/* */}
- {/*
*/}
- {/*
*/}
- {/* */}
- {/**/}
);
}
@@ -221,14 +145,3 @@ class LedgerAdjustRuleAddModal extends Component {
export default LedgerAdjustRuleAddModal;
-const AdjustTitle = () => {
- return
- 计薪规则
-
- :
-
;
-};
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/config.js b/pc4mobx/hrmSalary/pages/ledgerPage/config.js
index e6726805..a1085635 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/config.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/config.js
@@ -881,7 +881,51 @@ export const ruleConditions = [//调薪计薪规则项表单
label: "如果:调薪生效日期在",
lanId: 111,
labelcol: 0,
- value: "",
+ value: "1",
+ viewAttr: 2
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["beforeAdjustmentType"],
+ fieldcol: 6,
+ label: "计薪规则为:",
+ lanId: 111,
+ labelcol: 0,
+ value: "2",
+ options: [
+ { key: "2", showname: "取调整后薪资", lanId: 111 },
+ {
+ key: "4", showname: "分段计薪", lanId: 111, helpfultiplanId: 111,
+ helpfultip: "调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
+ },
+ {
+ key: "3", showname: "取平均", lanId: 111,
+ helpfultip: "(调整前薪资+调整后薪资)/2", helpfultiplanId: 111
+ }
+ ],
+ detailtype: 3,
+ viewAttr: 2
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["afterAdjustmentType"],
+ fieldcol: 6,
+ label: "计薪规则为:",
+ lanId: 111,
+ labelcol: 0,
+ value: "1",
+ options: [
+ { key: "1", showname: "取调整前薪资", lanId: 111 },
+ {
+ key: "4", showname: "分段计薪", lanId: 111, helpfultiplanId: 111,
+ helpfultip: "调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
+ },
+ {
+ key: "3", showname: "取平均", lanId: 111,
+ helpfultip: "(调整前薪资+调整后薪资)/2", helpfultiplanId: 111
+ }
+ ],
+ detailtype: 3,
viewAttr: 2
}
],
From 2200784d4b4e6e3479dc8825964550c3f93d0f4d Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Tue, 18 Feb 2025 17:34:03 +0800
Subject: [PATCH 48/51] =?UTF-8?q?release/3.0.0.2502.01-=E5=90=88=E5=B9=B6?=
=?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../pages/ledgerPage/components/ledgerAdjustRuleAddModal.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js
index 2456af87..c2058c16 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js
@@ -54,7 +54,7 @@ class LedgerAdjustRuleAddModal extends Component {
...k,
showname: !k.helpfultip ? getLabel(k.lanId, k.showname) :
{getLabel(k.lanId, k.showname)}
-
+
}))
};
From 98b1c2bc088094f1666e39315357cb9da552f0ef Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Wed, 19 Feb 2025 16:26:58 +0800
Subject: [PATCH 49/51] =?UTF-8?q?release/3.0.0.2502.01-=E5=90=88=E5=B9=B6?=
=?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../pages/ledgerPage/components/ledgerAdjustRuleAddModal.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js
index c2058c16..0956eb81 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js
@@ -85,7 +85,7 @@ class LedgerAdjustRuleAddModal extends Component {
render() {
- const { title, visible, ledgerStore: { ruleForm } } = this.props, { conditions } = this.state;
+ const { ledgerStore: { ruleForm } } = this.props, { conditions } = this.state;
const buttons = [];
const itemRender = {
salaryItemId: (field, textAreaProps, form, formParams) => {
From c0217a260881bc00c2f3f4f098b078f7745e6e2a Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Thu, 20 Feb 2025 11:32:32 +0800
Subject: [PATCH 50/51] =?UTF-8?q?release/3.0.0.2502.01-=E5=90=88=E5=B9=B6?=
=?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/config.js | 1 +
pc4mobx/hrmSalary/layout.js | 7 +++++--
pc4mobx/hrmSalary/single.js | 27 ++++++++++++---------------
3 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/pc4mobx/hrmSalary/config.js b/pc4mobx/hrmSalary/config.js
index 8da60ccc..958c63f2 100644
--- a/pc4mobx/hrmSalary/config.js
+++ b/pc4mobx/hrmSalary/config.js
@@ -22,3 +22,4 @@ export const PAGE = {
"dataPush": ["/hrmSalary/datapush"], //数据推送
"adjustRecord": ["/hrmSalary/adjustSalaryManage"] //调薪管理
};
+export const EXCLUDE_PAGE=["mobilepayroll"]
diff --git a/pc4mobx/hrmSalary/layout.js b/pc4mobx/hrmSalary/layout.js
index 0405b3bd..75ea973f 100644
--- a/pc4mobx/hrmSalary/layout.js
+++ b/pc4mobx/hrmSalary/layout.js
@@ -11,6 +11,7 @@ import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaTools } from "ecCom";
import Authority from "./pages/mySalary/authority";
+import { EXCLUDE_PAGE } from "./config";
import stores from "./stores";
const { ls } = WeaTools;
@@ -46,8 +47,10 @@ class Layout extends Component {
let header = document.getElementById("container");
header.appendChild(link);
top.$(".ant-message").remove();
- window.location.hash.indexOf("mobilepayroll") === -1 && stores.taxAgentStore.getPermission();
- window.location.hash.indexOf("mobilepayroll") !== -1 && stores.taxAgentStore.initPageAndOptAuth();
+ _.map(EXCLUDE_PAGE, page => {
+ if (window.location.hash.indexOf(page) === -1) stores.taxAgentStore.getPermission();
+ if (window.location.hash.indexOf(page) !== -1) stores.taxAgentStore.initPageAndOptAuth();
+ });
}
window.addEventListener("storage", this.setFontSize);
}
diff --git a/pc4mobx/hrmSalary/single.js b/pc4mobx/hrmSalary/single.js
index 1de2325b..7fd825af 100644
--- a/pc4mobx/hrmSalary/single.js
+++ b/pc4mobx/hrmSalary/single.js
@@ -1,16 +1,11 @@
import React from "react";
import ReactDOM from "react-dom";
-
import { createHashHistory } from "History";
-
import { IndexRedirect, Route, Router, useRouterHistory } from "react-router";
-
import { RouterStore, syncHistoryWithStore } from "mobx-react-router";
-
+import { EXCLUDE_PAGE } from "./config";
import { Provider } from "mobx-react";
-
import Module from "weaHrmSalary";
-import stores from "./stores";
const routing = new RouterStore();
@@ -30,16 +25,18 @@ const Home = props => props.children;
class Root extends React.Component {
componentWillMount() {
- const src = "/spa/hrmSalary/hrmSalaryCalculateDetail/css/iconfont/iconfont.css"
- const link = document.createElement("link")
- link.setAttribute('rel','stylesheet');
- link.setAttribute('type','text/css');
- link.setAttribute('href',src);
- let header = document.getElementById("container")
- header.appendChild(link)
+ const src = "/spa/hrmSalary/hrmSalaryCalculateDetail/css/iconfont/iconfont.css";
+ const link = document.createElement("link");
+ link.setAttribute("rel", "stylesheet");
+ link.setAttribute("type", "text/css");
+ link.setAttribute("href", src);
+ let header = document.getElementById("container");
+ header.appendChild(link);
top.$(".ant-message").remove();
- window.location.hash.indexOf("mobilepayroll") === -1 && allStore.taxAgentStore.getPermission();
- window.location.hash.indexOf("mobilepayroll") !== -1 && allStore.taxAgentStore.initPageAndOptAuth();
+ _.map(EXCLUDE_PAGE, page => {
+ if (window.location.hash.indexOf(page) === -1) allStore.taxAgentStore.getPermission();
+ if (window.location.hash.indexOf(page) !== -1) allStore.taxAgentStore.initPageAndOptAuth();
+ });
if (window.location.hash.indexOf("payroll") !== -1) {
window.localStorage.removeItem("template-basedata");
window.localStorage.removeItem("salary-showset");
From 1672909dd7a57ff9c86f901f7b44d300f0379ab7 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Thu, 20 Feb 2025 13:44:55 +0800
Subject: [PATCH 51/51] =?UTF-8?q?release/3.0.0.2502.01-=E5=90=88=E5=B9=B6?=
=?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/config.js | 2 +-
pc4mobx/hrmSalary/layout.js | 9 +++++----
pc4mobx/hrmSalary/single.js | 9 +++++----
3 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/pc4mobx/hrmSalary/config.js b/pc4mobx/hrmSalary/config.js
index 958c63f2..d040ac73 100644
--- a/pc4mobx/hrmSalary/config.js
+++ b/pc4mobx/hrmSalary/config.js
@@ -22,4 +22,4 @@ export const PAGE = {
"dataPush": ["/hrmSalary/datapush"], //数据推送
"adjustRecord": ["/hrmSalary/adjustSalaryManage"] //调薪管理
};
-export const EXCLUDE_PAGE=["mobilepayroll"]
+export const EXCLUDE_PAGE = ["mobilepayroll"];
diff --git a/pc4mobx/hrmSalary/layout.js b/pc4mobx/hrmSalary/layout.js
index 75ea973f..6d5e8161 100644
--- a/pc4mobx/hrmSalary/layout.js
+++ b/pc4mobx/hrmSalary/layout.js
@@ -47,10 +47,11 @@ class Layout extends Component {
let header = document.getElementById("container");
header.appendChild(link);
top.$(".ant-message").remove();
- _.map(EXCLUDE_PAGE, page => {
- if (window.location.hash.indexOf(page) === -1) stores.taxAgentStore.getPermission();
- if (window.location.hash.indexOf(page) !== -1) stores.taxAgentStore.initPageAndOptAuth();
- });
+ if (_.every(EXCLUDE_PAGE, page => window.location.hash.indexOf(page) === -1)) {
+ stores.taxAgentStore.getPermission();
+ } else {
+ stores.taxAgentStore.initPageAndOptAuth();
+ }
}
window.addEventListener("storage", this.setFontSize);
}
diff --git a/pc4mobx/hrmSalary/single.js b/pc4mobx/hrmSalary/single.js
index 7fd825af..059cc59f 100644
--- a/pc4mobx/hrmSalary/single.js
+++ b/pc4mobx/hrmSalary/single.js
@@ -33,10 +33,11 @@ class Root extends React.Component {
let header = document.getElementById("container");
header.appendChild(link);
top.$(".ant-message").remove();
- _.map(EXCLUDE_PAGE, page => {
- if (window.location.hash.indexOf(page) === -1) allStore.taxAgentStore.getPermission();
- if (window.location.hash.indexOf(page) !== -1) allStore.taxAgentStore.initPageAndOptAuth();
- });
+ if (_.every(EXCLUDE_PAGE, page => window.location.hash.indexOf(page) === -1)) {
+ allStore.taxAgentStore.getPermission();
+ } else {
+ allStore.taxAgentStore.initPageAndOptAuth();
+ }
if (window.location.hash.indexOf("payroll") !== -1) {
window.localStorage.removeItem("template-basedata");
window.localStorage.removeItem("salary-showset");