diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
index e8c18c3f..1660dfee 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
@@ -8,22 +8,76 @@
* @description:
*/
import React, { Component } from "react";
+import ReactDom from "react-dom";
import { WeaLocaleProvider } from "ecCom";
-import { WeaForm } from "comsMobx";
+import { WeaForm, WeaSwitch } from "comsMobx";
+import { message } from "antd";
import FormInfo from "../../components/FormInfo";
import { secondaryVerifyConditions } from "./conditions";
+import * as API from "../../apis/mySalaryBenefits";
+import MobileModal from "./mobileModal";
+import LoginVerify from "./loginVerify";
const form = new WeaForm();
const getLabel = WeaLocaleProvider.getLabel;
class SecondaryVerify extends Component {
+ constructor(props) {
+ super(props);
+ this.state = { notSetting: false };
+ }
+
componentDidMount() {
+ API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, this.props.salaryBillToken)
+ .then(({ notSetting }) => {
+ this.setState({ notSetting });
+ });
form.initFormFields(secondaryVerifyConditions);
}
+ doSecondAuth = () => {
+ form.validateForm().then(f => {
+ if (f.isValid) {
+ const { mySalaryStore: { setInitEmVerify }, salaryBillToken } = this.props;
+ API.doSecondAuth({ mouldCode: "HRM", itemCode: "SALARY", ...form.getFormParams() }, salaryBillToken)
+ .then(({ status, checkStatus, checkMsg }) => {
+ if (status && checkStatus === "1") {
+ message.success(checkMsg);
+ setInitEmVerify();
+ this.props.onSuccess();
+ } else {
+ form.showError("authCode", checkMsg);
+ }
+ });
+ } else {
+ f.showErrors();
+ }
+ });
+ };
+ handleSetSecondaryPassword = () => {
+ ReactDom.render(
, document.body);
+ };
+
render() {
- const itemRender = {};
- return (
);
+ const { notSetting } = this.state;
+ const itemRender = {
+ authCode: (field, textAreaProps, form, formParams) => {
+ return (
+
+ {
+ notSetting &&
+
+ }
+ );
+ }
+ };
+ return (
+
+ );
}
}
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
new file mode 100644
index 00000000..fece44bd
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
@@ -0,0 +1,68 @@
+/*
+ * 二次验证密码设置
+ *
+ * @Author: 黎永顺
+ * @Date: 2025/4/17
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaLocaleProvider } from "ecCom";
+import { WeaForm, WeaSwitch } from "comsMobx";
+import FormInfo from "../../components/FormInfo";
+import { secondarypwdCondition } from "./conditions";
+import MobileModal from "./mobileModal";
+import { RSAEcrypt } from "../../util/RSAUtil";
+
+const form = new WeaForm();
+const getLabel = WeaLocaleProvider.getLabel;
+
+class SecondarypwdVerify extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ src: (window.ecologyContentPath || "") + "/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4",
+ num: 0
+ };
+ }
+
+ componentDidMount() {
+ form.initFormFields(secondarypwdCondition);
+ }
+
+ save = async () => {
+ form.validateForm().then(f => {
+ if (f.isValid) {
+ RSAEcrypt("1", { ...form.getFormParams() }).then(RSAParam => {
+ console.log(form.getFormParams(), this.props);
+ });
+ } else {
+ f.showErrors();
+ }
+ });
+ };
+
+ render() {
+ const itemRender = {
+ validatecode: (field, textAreaProps, form, formParams) => {
+ return (
+
+
{
+ this.setState({ num: this.state.num + 1 }, () => {
+ this.setState({ src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}` });
+ });
+ }} alt=""/>
+ );
+ }
+ };
+ return (
+
+ );
+ }
+}
+
+export default SecondarypwdVerify;
From aaf00ace3cfb180c6699ec6226fa8211e40307eb Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Thu, 17 Apr 2025 15:13:40 +0800
Subject: [PATCH 05/10] =?UTF-8?q?feature/2.19.1.2501.01-=E7=A7=BB=E5=8A=A8?=
=?UTF-8?q?=E7=AB=AF=E6=9F=A5=E7=9C=8B=E5=B7=A5=E8=B5=84=E5=8D=95=E5=AF=86?=
=?UTF-8?q?=E7=A0=81=E8=AE=BE=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../hrmSalary/pages/mobilePayroll/index.js | 1 +
.../hrmSalary/pages/mobilePayroll/index.less | 10 ++++++
.../pages/mobilePayroll/loginVerify.js | 8 +++--
.../pages/mobilePayroll/secondaryVerify.js | 6 +++-
.../pages/mobilePayroll/secondarypwdVerify.js | 32 ++++++++++++++++---
pc4mobx/hrmSalary/pages/mySalary/authority.js | 3 +-
6 files changed, 52 insertions(+), 8 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
index eaa34aff..882b0f9b 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
@@ -87,6 +87,7 @@ export default class MobilePayroll extends React.Component {
if (status && isNeedSecondAuth) {
ReactDom.render( {
+ setInitEmVerify();
removeElementById("am-modal-container");
this.getMySalaryBill(getQueryString("id"));
}}/>, document.body);
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.less b/pc4mobx/hrmSalary/pages/mobilePayroll/index.less
index 8d600fc5..9fd7d4d6 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.less
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.less
@@ -97,6 +97,16 @@
.wea-search-group, .wea-content, .wea-form-cell {
padding: 0;
}
+
+ .secondarypwd-form {
+ .wea-form-cell-wrapper {
+ & > div:last-child {
+ .ant-col-16 {
+ width: 37.5% !important;
+ }
+ }
+ }
+ }
}
.am-modal-wrap {
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/loginVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/loginVerify.js
index 1be34d7a..ad862dcf 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/loginVerify.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/loginVerify.js
@@ -15,7 +15,7 @@ import FormInfo from "../../components/FormInfo";
import { loginCondition } from "./conditions";
import MobileModal from "./mobileModal";
import SecondarypwdVerify from "./secondarypwdVerify";
-import { checkPassword } from "../../apis/mySalaryBenefits";
+import * as API from "../../apis/mySalaryBenefits";
import { RSAEcrypt } from "../../util/RSAUtil";
const form = new WeaForm();
@@ -27,11 +27,15 @@ class LoginVerify extends Component {
form.initFormFields(loginCondition);
}
+ componentWillUnmount() {
+ form.resetForm();
+ }
+
save = async () => {
form.validateForm().then(f => {
if (f.isValid) {
RSAEcrypt("1", { ...form.getFormParams() }).then(RSAParam => {
- checkPassword({ ...RSAParam }).then(({ result }) => {
+ API.checkPassword({ ...RSAParam }).then(({ result }) => {
if (result) {
ReactDom.render(, document.body);
} else {
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
index 1660dfee..c80215a4 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
@@ -35,6 +35,10 @@ class SecondaryVerify extends Component {
form.initFormFields(secondaryVerifyConditions);
}
+ componentWillUnmount() {
+ form.resetForm();
+ }
+
doSecondAuth = () => {
form.validateForm().then(f => {
if (f.isValid) {
@@ -75,7 +79,7 @@ class SecondaryVerify extends Component {
}
};
return (
-
);
}
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
index fece44bd..5a5d58cd 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
@@ -8,12 +8,16 @@
* @description:
*/
import React, { Component } from "react";
+import ReactDom from "react-dom";
import { WeaLocaleProvider } from "ecCom";
+import { message } from "antd";
import { WeaForm, WeaSwitch } from "comsMobx";
import FormInfo from "../../components/FormInfo";
import { secondarypwdCondition } from "./conditions";
+import * as API from "../../apis/mySalaryBenefits";
import MobileModal from "./mobileModal";
import { RSAEcrypt } from "../../util/RSAUtil";
+import SecondaryVerify from "./secondaryVerify";
const form = new WeaForm();
const getLabel = WeaLocaleProvider.getLabel;
@@ -31,11 +35,30 @@ class SecondarypwdVerify extends Component {
form.initFormFields(secondarypwdCondition);
}
+ componentWillUnmount() {
+ form.resetForm();
+ }
+
save = async () => {
form.validateForm().then(f => {
if (f.isValid) {
- RSAEcrypt("1", { ...form.getFormParams() }).then(RSAParam => {
- console.log(form.getFormParams(), this.props);
+ const { secondaryPwd1, secondaryPwd2, validatecode } = form.getFormParams();
+ if (secondaryPwd1 !== secondaryPwd2) {
+ form.showError("secondaryPwd2", getLabel(504376, "密码确认不正确!"));
+ return;
+ }
+ RSAEcrypt("1", { secondaryPwd1, secondaryPwd2 }).then(RSAParam => {
+ API.saveSecondaryPwd({ ...RSAParam, validatecode }).then(({ sign, message: msg }) => {
+ if (sign === "1") {
+ message.success(msg);
+ ReactDom.render(, document.body);
+ } else {
+ form.showError("validatecode", msg);
+ this.setState({ num: this.state.num + 1 }, () => {
+ this.setState({ src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}` });
+ });
+ }
+ });
});
} else {
f.showErrors();
@@ -49,7 +72,7 @@ class SecondarypwdVerify extends Component {
return (
{
this.setState({ num: this.state.num + 1 }, () => {
@@ -60,7 +83,8 @@ class SecondarypwdVerify extends Component {
}
};
return (
-
+
);
}
}
diff --git a/pc4mobx/hrmSalary/pages/mySalary/authority.js b/pc4mobx/hrmSalary/pages/mySalary/authority.js
index 00a74712..ef7261be 100644
--- a/pc4mobx/hrmSalary/pages/mySalary/authority.js
+++ b/pc4mobx/hrmSalary/pages/mySalary/authority.js
@@ -9,7 +9,7 @@ export default class Authority extends React.Component {
render() {
const { store } = this.props;
const { loading, hasRight } = store;
-
+ console.log("store", store);
const style = {
position: "absolute",
top: "50%",
@@ -27,6 +27,7 @@ export default class Authority extends React.Component {
}
if (hasRight) {
+ console.log("this.props.children", this.props.children);
return this.props.children;
} else {
return (
From b3fff361ec438cc2589d81b35f60812c858cfbaf Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Thu, 17 Apr 2025 15:23:58 +0800
Subject: [PATCH 06/10] =?UTF-8?q?feature/2.19.1.2501.01-=E7=A7=BB=E5=8A=A8?=
=?UTF-8?q?=E7=AB=AF=E6=9F=A5=E7=9C=8B=E5=B7=A5=E8=B5=84=E5=8D=95=E5=AF=86?=
=?UTF-8?q?=E7=A0=81=E8=AE=BE=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/pages/mySalary/authority.js | 2 --
1 file changed, 2 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/mySalary/authority.js b/pc4mobx/hrmSalary/pages/mySalary/authority.js
index ef7261be..ec098fc2 100644
--- a/pc4mobx/hrmSalary/pages/mySalary/authority.js
+++ b/pc4mobx/hrmSalary/pages/mySalary/authority.js
@@ -9,7 +9,6 @@ export default class Authority extends React.Component {
render() {
const { store } = this.props;
const { loading, hasRight } = store;
- console.log("store", store);
const style = {
position: "absolute",
top: "50%",
@@ -27,7 +26,6 @@ export default class Authority extends React.Component {
}
if (hasRight) {
- console.log("this.props.children", this.props.children);
return this.props.children;
} else {
return (
From 5ab71a349208609067f2b475e0237b6886d32fbc Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Thu, 17 Apr 2025 15:56:32 +0800
Subject: [PATCH 07/10] =?UTF-8?q?feature/2.19.1.2501.01-=E7=A7=BB=E5=8A=A8?=
=?UTF-8?q?=E7=AB=AF=E6=9F=A5=E7=9C=8B=E5=B7=A5=E8=B5=84=E5=8D=95=E5=AF=86?=
=?UTF-8?q?=E7=A0=81=E8=AE=BE=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/pages/mobilePayroll/index.js | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
index 882b0f9b..165253ad 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
@@ -90,14 +90,14 @@ export default class MobilePayroll extends React.Component {
setInitEmVerify();
removeElementById("am-modal-container");
this.getMySalaryBill(getQueryString("id"));
- }}/>, document.body);
- return;
- this.setState({ visible: true }, () => {
- API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
- .then(({ status, notSetting }) => {
- this.setState({ notSetting });
- });
- });
+ }}/>, document.getElementById("container"));
+ // return;
+ // this.setState({ visible: true }, () => {
+ // API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
+ // .then(({ status, notSetting }) => {
+ // this.setState({ notSetting });
+ // });
+ // });
} else {
this.getMySalaryBill(getQueryString("id"));
setInitEmVerify();
From b01d2806442c8bbc553f34b23a079de77e8f3ac7 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Thu, 17 Apr 2025 17:12:53 +0800
Subject: [PATCH 08/10] =?UTF-8?q?feature/2.19.1.2501.01-=E7=A7=BB=E5=8A=A8?=
=?UTF-8?q?=E7=AB=AF=E6=9F=A5=E7=9C=8B=E5=B7=A5=E8=B5=84=E5=8D=95=E5=AF=86?=
=?UTF-8?q?=E7=A0=81=E8=AE=BE=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../hrmSalary/pages/mobilePayroll/index.js | 165 +++++-------------
.../pages/mobilePayroll/loginVerify.js | 2 +-
.../pages/mobilePayroll/secondaryVerify.js | 5 +-
.../pages/mobilePayroll/secondarypwdVerify.js | 2 +-
4 files changed, 51 insertions(+), 123 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
index 165253ad..389afbcd 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
@@ -1,17 +1,15 @@
import React from "react";
-import ReactDom from "react-dom";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { getQueryString } from "../../util/url";
-import { WeaDialog, WeaError, WeaInput, WeaLocaleProvider } from "ecCom";
-import { Button, message, Modal } from "antd";
+import { WeaLocaleProvider } from "ecCom";
+import { message, Modal } from "antd";
import Authority from "../mySalary/authority";
import "../payroll/templatePreview/index.less";
import * as API from "../../apis/mySalaryBenefits";
import { salaryBillGetToken } from "../../apis/mySalaryBenefits";
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
import CaptchaModal from "../../components/captchaModal";
-import PassSetDialog from "./passSetDialog";
import { ConfirmBtns } from "../mySalary/mySalaryView";
import Content from "../../components/pcTemplate/content";
import MobileTemplate from "../../components/mobileTemplate";
@@ -21,21 +19,14 @@ import "../mySalary/index.less";
const getLabel = WeaLocaleProvider.getLabel;
-@inject("mySalaryStore")
-@observer
+@inject("mySalaryStore") @observer
export default class MobilePayroll extends React.Component {
constructor(props) {
super(props);
this.state = {
- pwdSetVisible: false,
visible: false,
captchaVisible: false,
- authCode: "",
- notSetting: false,
- mySalaryBillData: {
- employeeInformation: {},
- salaryTemplate: []
- },
+ mySalaryBillData: { employeeInformation: {}, salaryTemplate: [] },
salaryBillToken: {}
};
this.id = "";
@@ -63,12 +54,7 @@ export default class MobilePayroll extends React.Component {
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
.then(({ status, isNeedSecondAuth }) => {
if (status && isNeedSecondAuth) {
- this.setState({ visible: true }, () => {
- API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
- .then(({ status, notSetting }) => {
- this.setState({ notSetting });
- });
- });
+ this.setState({ visible: true });
} else {
this.getMySalaryBill(getQueryString("id"));
setInitEmVerify();
@@ -85,19 +71,7 @@ export default class MobilePayroll extends React.Component {
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
.then(({ status, isNeedSecondAuth }) => {
if (status && isNeedSecondAuth) {
- ReactDom.render( {
- setInitEmVerify();
- removeElementById("am-modal-container");
- this.getMySalaryBill(getQueryString("id"));
- }}/>, document.getElementById("container"));
- // return;
- // this.setState({ visible: true }, () => {
- // API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
- // .then(({ status, notSetting }) => {
- // this.setState({ notSetting });
- // });
- // });
+ this.setState({ visible: true });
} else {
this.getMySalaryBill(getQueryString("id"));
setInitEmVerify();
@@ -106,33 +80,12 @@ export default class MobilePayroll extends React.Component {
});
}
};
- doSecondAuth = () => {
- const { salaryBillToken } = this.state;
- const { mySalaryStore: { setInitEmVerify } } = this.props;
- if (!this.state.authCode) {
- this.refs.weaError.showError();
- return;
- }
- API.doSecondAuth({
- authCode: this.state.authCode, mouldCode: "HRM", itemCode: "SALARY"
- }, salaryBillToken).then(({ status, checkStatus, checkMsg }) => {
- if (status && checkStatus === "1") {
- message.success(checkMsg);
- setInitEmVerify();
- this.setState({ visible: false });
- this.getMySalaryBill(getQueryString("id"));
- } else {
- message.error(checkMsg);
- }
- });
- };
getMySalaryBill = (salaryInfoId) => {
const { salaryBillToken } = this.state;
const { mySalaryStore: { getMySalaryBill } } = this.props;
const params = this.getUrlkey();
const payload = {
- salaryInfoId, header: salaryBillToken,
- ..._.pick(params, ["recipient"])
+ salaryInfoId, header: salaryBillToken, ..._.pick(params, ["recipient"])
};
getMySalaryBill(payload).then(result => {
this.setState({
@@ -142,10 +95,8 @@ export default class MobilePayroll extends React.Component {
};
getUrlkey = () => {
let url = window.location.href;
- let params = {},
- arr = url.split("?");
- if (arr.length <= 1)
- return params;
+ let params = {}, arr = url.split("?");
+ if (arr.length <= 1) return params;
arr = arr[1].split("&");
for (var i = 0, l = arr.length; i < l; i++) {
var a = arr[i].split("=");
@@ -189,77 +140,55 @@ export default class MobilePayroll extends React.Component {
};
render() {
- const { mySalaryStore: { clearLoading, pwdForm } } = this.props;
- const { mySalaryBillData, visible, captchaVisible, notSetting, pwdSetVisible } = this.state;
+ const { mySalaryStore: { setInitEmVerify } } = this.props, { captchaVisible, visible } = this.state;
const type = getQueryString("type");
- if (_.isEmpty(toJS(this.props.mySalaryStore.mySalaryBill))) return
-
this.setState({ visible: false }, () => clearLoading())}
- title="请输入二次验证密码" visible={visible} initLoadCss
- className="verifyWrapper"
- hasScroll buttons={[
-
- ]}
- >
-
- this.setState({ authCode })}/>
-
- {
- notSetting &&
-
- }
-
-
this.setState({ pwdSetVisible: false })}/>
+ if (_.isEmpty(toJS(this.props.mySalaryStore.mySalaryBill))) return
+ {visible && {
+ setInitEmVerify();
+ // removeElementById("am-modal-container");
+ this.getMySalaryBill(getQueryString("id"));
+ }}/>}
{/*发送验证码*/}
this.setState({ captchaVisible: false })}
onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
/>
- ;
+ ;
const {
- salaryTemplate, salaryGroups, employeeInformation,
- sendTime, confirmStatus, showAck, showFeedback
+ salaryTemplate, salaryGroups, employeeInformation, sendTime, confirmStatus, showAck, showFeedback
} = toJS(this.props.mySalaryStore.mySalaryBill);
const salaryProps = {
- theme: salaryTemplate.theme, tip: salaryTemplate.textContent, sendTime,
- background: salaryTemplate.background, tipPosi: salaryTemplate.textContentPosition || "",
+ theme: salaryTemplate.theme,
+ tip: salaryTemplate.textContent,
+ sendTime,
+ background: salaryTemplate.background,
+ tipPosi: salaryTemplate.textContentPosition || "",
itemTypeList: [employeeInformation, ...salaryGroups]
};
- return (
-
- {
- type === "phone" ?
-
-
-
-
-
- :
-
-
-
-
-
-
-
- }
-
- );
+ return (
+ {type === "phone" ?
+
+
+
+ :
+
+
+
+
+
+ }
+ );
}
}
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/loginVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/loginVerify.js
index ad862dcf..33fd761b 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/loginVerify.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/loginVerify.js
@@ -37,7 +37,7 @@ class LoginVerify extends Component {
RSAEcrypt("1", { ...form.getFormParams() }).then(RSAParam => {
API.checkPassword({ ...RSAParam }).then(({ result }) => {
if (result) {
- ReactDom.render(, document.body);
+ ReactDom.render(, document.getElementById("container"));
} else {
form.showError("password", getLabel(504343, "登录密码错误"));
}
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
index c80215a4..a92fd378 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
@@ -42,12 +42,11 @@ class SecondaryVerify extends Component {
doSecondAuth = () => {
form.validateForm().then(f => {
if (f.isValid) {
- const { mySalaryStore: { setInitEmVerify }, salaryBillToken } = this.props;
+ const { salaryBillToken } = this.props;
API.doSecondAuth({ mouldCode: "HRM", itemCode: "SALARY", ...form.getFormParams() }, salaryBillToken)
.then(({ status, checkStatus, checkMsg }) => {
if (status && checkStatus === "1") {
message.success(checkMsg);
- setInitEmVerify();
this.props.onSuccess();
} else {
form.showError("authCode", checkMsg);
@@ -59,7 +58,7 @@ class SecondaryVerify extends Component {
});
};
handleSetSecondaryPassword = () => {
- ReactDom.render(, document.body);
+ ReactDom.render(, document.getElementById("container"));
};
render() {
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
index 5a5d58cd..00e75d22 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
@@ -51,7 +51,7 @@ class SecondarypwdVerify extends Component {
API.saveSecondaryPwd({ ...RSAParam, validatecode }).then(({ sign, message: msg }) => {
if (sign === "1") {
message.success(msg);
- ReactDom.render(, document.body);
+ ReactDom.render(, document.getElementById("container"));
} else {
form.showError("validatecode", msg);
this.setState({ num: this.state.num + 1 }, () => {
From 6b3e321846484d82dbb594f1dc3201ec4f120036 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Thu, 17 Apr 2025 17:18:36 +0800
Subject: [PATCH 09/10] =?UTF-8?q?feature/2.19.1.2501.01-=E7=A7=BB=E5=8A=A8?=
=?UTF-8?q?=E7=AB=AF=E6=9F=A5=E7=9C=8B=E5=B7=A5=E8=B5=84=E5=8D=95=E5=AF=86?=
=?UTF-8?q?=E7=A0=81=E8=AE=BE=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../pages/mobilePayroll/secondaryVerify.js | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
index a92fd378..a9006367 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
@@ -8,7 +8,6 @@
* @description:
*/
import React, { Component } from "react";
-import ReactDom from "react-dom";
import { WeaLocaleProvider } from "ecCom";
import { WeaForm, WeaSwitch } from "comsMobx";
import { message } from "antd";
@@ -24,7 +23,7 @@ const getLabel = WeaLocaleProvider.getLabel;
class SecondaryVerify extends Component {
constructor(props) {
super(props);
- this.state = { notSetting: false };
+ this.state = { notSetting: false, visible: false };
}
componentDidMount() {
@@ -36,7 +35,7 @@ class SecondaryVerify extends Component {
}
componentWillUnmount() {
- form.resetForm();
+ this.setState({ notSetting: false, visible: false }, () => form.resetForm());
}
doSecondAuth = () => {
@@ -57,12 +56,10 @@ class SecondaryVerify extends Component {
}
});
};
- handleSetSecondaryPassword = () => {
- ReactDom.render(, document.getElementById("container"));
- };
+ handleSetSecondaryPassword = () => this.setState({ visible: false });
render() {
- const { notSetting } = this.state;
+ const { notSetting, visible } = this.state;
const itemRender = {
authCode: (field, textAreaProps, form, formParams) => {
return (
@@ -80,6 +77,9 @@ class SecondaryVerify extends Component {
return (
+ {
+ visible &&
+ }
);
}
}
From 554cf4b6b3082a6af1cca11fd8dacc4b5f2658b8 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Thu, 17 Apr 2025 17:44:30 +0800
Subject: [PATCH 10/10] =?UTF-8?q?feature/2.19.1.2501.01-=E7=A7=BB=E5=8A=A8?=
=?UTF-8?q?=E7=AB=AF=E6=9F=A5=E7=9C=8B=E5=B7=A5=E8=B5=84=E5=8D=95=E5=AF=86?=
=?UTF-8?q?=E7=A0=81=E8=AE=BE=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/apis/mySalaryBenefits.js | 10 +++++---
.../hrmSalary/pages/mobilePayroll/index.js | 16 ++++++++----
.../pages/mobilePayroll/loginVerify.js | 19 +++++++-------
.../pages/mobilePayroll/secondaryVerify.js | 13 +++-------
.../pages/mobilePayroll/secondarypwdVerify.js | 25 +++++++++----------
5 files changed, 42 insertions(+), 41 deletions(-)
diff --git a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js
index f197ba27..75e3eb73 100644
--- a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js
+++ b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js
@@ -45,11 +45,13 @@ export const doSecondAuth = (params, headers) => {
export const getPasswordForm = params => {
return WeaTools.callApi("/api/hrm/secondarypwd/getPasswordForm", "GET", params);
};
-export const checkPassword = params => {
- return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params);
+export const checkPassword = (params, headers) => {
+ return formHeaderPost("/api/hrm/secondarypwd/checkPassword", "POST", params, headers);
+ // return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params);
};
-export const saveSecondaryPwd = params => {
- return WeaTools.callApi("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params);
+export const saveSecondaryPwd = (params, headers) => {
+ return formHeaderPost("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params, headers);
+ // return WeaTools.callApi("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params);
};
export const salaryBillGetToken = params => {
return postFetch("/api/bs/hrmsalary/salaryBill/getToken", params);
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
index 389afbcd..a1756ede 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
@@ -14,7 +14,8 @@ import { ConfirmBtns } from "../mySalary/mySalaryView";
import Content from "../../components/pcTemplate/content";
import MobileTemplate from "../../components/mobileTemplate";
import SecondaryVerify from "./secondaryVerify";
-import { removeElementById } from "../../util";
+import LoginVerify from "./loginVerify";
+import SecondarypwdVerify from "./secondarypwdVerify";
import "../mySalary/index.less";
const getLabel = WeaLocaleProvider.getLabel;
@@ -24,8 +25,7 @@ export default class MobilePayroll extends React.Component {
constructor(props) {
super(props);
this.state = {
- visible: false,
- captchaVisible: false,
+ visible: false, captchaVisible: false, loginVisible: false, pwdSetVisible: false,
mySalaryBillData: { employeeInformation: {}, salaryTemplate: [] },
salaryBillToken: {}
};
@@ -140,15 +140,21 @@ export default class MobilePayroll extends React.Component {
};
render() {
- const { mySalaryStore: { setInitEmVerify } } = this.props, { captchaVisible, visible } = this.state;
+ const { mySalaryStore: { setInitEmVerify } } = this.props, {
+ captchaVisible, visible, loginVisible, pwdSetVisible
+ } = this.state;
const type = getQueryString("type");
if (_.isEmpty(toJS(this.props.mySalaryStore.mySalaryBill))) return
{visible && this.setState({ visible: false, loginVisible: true })}
onSuccess={() => {
setInitEmVerify();
- // removeElementById("am-modal-container");
this.getMySalaryBill(getQueryString("id"));
}}/>}
+ {loginVisible && this.setState({ loginVisible: false, pwdSetVisible: true })}/>}
+ {pwdSetVisible && this.setState({ pwdSetVisible: false }, () => this.initMobile())}/>}
{/*发送验证码*/}
{
form.validateForm().then(f => {
if (f.isValid) {
- RSAEcrypt("1", { ...form.getFormParams() }).then(RSAParam => {
- API.checkPassword({ ...RSAParam }).then(({ result }) => {
- if (result) {
- ReactDom.render(, document.getElementById("container"));
- } else {
- form.showError("password", getLabel(504343, "登录密码错误"));
- }
+ RSAEcrypt("1", { ...form.getFormParams() }, this.props.salaryBillToken)
+ .then(RSAParam => {
+ API.checkPassword({ ...RSAParam }).then(({ result }) => {
+ if (result) {
+ this.props.onSetPwdSet();
+ } else {
+ form.showError("password", getLabel(504343, "登录密码错误"));
+ }
+ });
});
- });
} else {
f.showErrors();
}
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
index a9006367..b5310466 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
@@ -15,7 +15,6 @@ import FormInfo from "../../components/FormInfo";
import { secondaryVerifyConditions } from "./conditions";
import * as API from "../../apis/mySalaryBenefits";
import MobileModal from "./mobileModal";
-import LoginVerify from "./loginVerify";
const form = new WeaForm();
const getLabel = WeaLocaleProvider.getLabel;
@@ -23,7 +22,7 @@ const getLabel = WeaLocaleProvider.getLabel;
class SecondaryVerify extends Component {
constructor(props) {
super(props);
- this.state = { notSetting: false, visible: false };
+ this.state = { notSetting: false };
}
componentDidMount() {
@@ -35,7 +34,7 @@ class SecondaryVerify extends Component {
}
componentWillUnmount() {
- this.setState({ notSetting: false, visible: false }, () => form.resetForm());
+ this.setState({ notSetting: false }, () => form.resetForm());
}
doSecondAuth = () => {
@@ -56,10 +55,9 @@ class SecondaryVerify extends Component {
}
});
};
- handleSetSecondaryPassword = () => this.setState({ visible: false });
render() {
- const { notSetting, visible } = this.state;
+ const { notSetting } = this.state;
const itemRender = {
authCode: (field, textAreaProps, form, formParams) => {
return (
@@ -68,7 +66,7 @@ class SecondaryVerify extends Component {
notSetting &&
}
);
@@ -77,9 +75,6 @@ class SecondaryVerify extends Component {
return (
- {
- visible &&
- }
);
}
}
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
index 00e75d22..a8f84027 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
@@ -8,7 +8,6 @@
* @description:
*/
import React, { Component } from "react";
-import ReactDom from "react-dom";
import { WeaLocaleProvider } from "ecCom";
import { message } from "antd";
import { WeaForm, WeaSwitch } from "comsMobx";
@@ -17,7 +16,6 @@ import { secondarypwdCondition } from "./conditions";
import * as API from "../../apis/mySalaryBenefits";
import MobileModal from "./mobileModal";
import { RSAEcrypt } from "../../util/RSAUtil";
-import SecondaryVerify from "./secondaryVerify";
const form = new WeaForm();
const getLabel = WeaLocaleProvider.getLabel;
@@ -48,17 +46,18 @@ class SecondarypwdVerify extends Component {
return;
}
RSAEcrypt("1", { secondaryPwd1, secondaryPwd2 }).then(RSAParam => {
- API.saveSecondaryPwd({ ...RSAParam, validatecode }).then(({ sign, message: msg }) => {
- if (sign === "1") {
- message.success(msg);
- ReactDom.render(, document.getElementById("container"));
- } else {
- form.showError("validatecode", msg);
- this.setState({ num: this.state.num + 1 }, () => {
- this.setState({ src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}` });
- });
- }
- });
+ API.saveSecondaryPwd({ ...RSAParam, validatecode }, this.props.salaryBillToken)
+ .then(({ sign, message: msg }) => {
+ if (sign === "1") {
+ message.success(msg);
+ this.props.onSuccess();
+ } else {
+ form.showError("validatecode", msg);
+ this.setState({ num: this.state.num + 1 }, () => {
+ this.setState({ src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}` });
+ });
+ }
+ });
});
} else {
f.showErrors();