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;