}
/>
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/index.less
index 51316cab..8b586900 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/index.less
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/index.less
@@ -54,8 +54,8 @@
margin-bottom: 8px;
}
- .wea-new-table {
- background: #FFF;
+ .ant-spin-nested-loading, .ant-spin-container {
+ height: 100%;
}
}
diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js
index f5627a0c..e85383ca 100644
--- a/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js
+++ b/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js
@@ -17,7 +17,7 @@ class Index extends Component {
return (
- {getLabel(543549, "薪资所属月:")}
+ {getLabel(111, "税款所属期:")}
this.props.onChange({ dateRange: v })}/>
diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js
index b2cab8ff..74100061 100644
--- a/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js
+++ b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js
@@ -8,7 +8,7 @@ import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
import { Dropdown, Menu, message, Modal } from "antd";
import { getDeclareList, withDrawTaxDeclaration } from "../../../../apis/declare";
-import { sysConfCodeRule } from "../../../../apis/ruleconfig";
+import { sysConfCodeRule, sysinfo } from "../../../../apis/ruleconfig";
const getLabel = WeaLocaleProvider.getLabel;
@@ -35,18 +35,19 @@ class Index extends Component {
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" });
});
};
- getDeclareList = (props) => {
- const { pageInfo } = this.state;
- const { queryParams } = props;
+ getDeclareList = async (props) => {
+ const { data: sysData } = await sysinfo();
+ const { pageInfo } = this.state, { queryParams } = props;
const { dateRange, ...extra } = queryParams;
- const [fromSalaryMonthStr, endSalaryMonthStr] = dateRange || [];
- const params = { fromSalaryMonthStr, endSalaryMonthStr, ...extra };
+ const [fromSalaryMonth, endSalaryMonth] = dateRange || [];
+ const params = { fromSalaryMonth: fromSalaryMonth + "-01", endSalaryMonth: endSalaryMonth + "-01", ...extra };
const payload = { ...pageInfo, ...params };
this.setState({ loading: true });
getDeclareList(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
- const { columns, list: dataSource, pageNum, pageSize, total } = data;
+ let { columns, list: dataSource, pageNum, pageSize, total } = data;
+ sysData["TAX_DECLARATION_DATE_TYPE"] === "1" && (columns = _.filter(columns, o => o.dataIndex !== "salaryMonth"));
this.setState({
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
columns: _.map(columns, o => {
diff --git a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
index 91a1a88f..22d1c5ea 100644
--- a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
+++ b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
@@ -2,6 +2,7 @@ import React from "react";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
import { getQueryString } from "../../util/url";
+import { sysinfo } from "../../apis/ruleconfig";
import * as API from "../../apis/declare";
import { Button } from "antd";
import "./index.less";
@@ -14,15 +15,21 @@ export default class GenerateDeclarationDetail extends React.Component {
super(props);
this.state = {
loading: false, dataSource: [], columns: [], declareInfo: {},
- pageInfo: { current: 1, pageSize: 10, total: 0 }
+ pageInfo: { current: 1, pageSize: 10, total: 0 }, sysinfo: {}
};
}
componentDidMount() {
this.getDetailList();
this.getDeclareInfo();
+ this.getSysinfo();
}
+ getSysinfo = () => {
+ sysinfo().then(({ status, data: sysinfo }) => {
+ if (status) this.setState({ sysinfo });
+ });
+ };
getDetailList = () => {
const { pageInfo } = this.state;
const payload = {
@@ -64,9 +71,10 @@ export default class GenerateDeclarationDetail extends React.Component {
window.open(url, "_self");
};
renderTitle = () => {
- const { declareInfo } = this.state;
+ const { declareInfo, sysinfo } = this.state;
+ const title = sysinfo["TAX_DECLARATION_DATE_TYPE"] === "1" ? getLabel(111, "税款所属期") : getLabel(111, "薪资所属月");
return (
- {getLabel(111, "薪资所属月")}:{declareInfo.salaryMonth}
+ {title}:{declareInfo.salaryMonth}
{getLabel(111, "个税扣缴义务人")}:{declareInfo.taxAgentName}
);
};
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/conditions.js b/pc4mobx/hrmSalary/pages/mobilePayroll/conditions.js
new file mode 100644
index 00000000..3462cb08
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/conditions.js
@@ -0,0 +1,87 @@
+export const secondaryVerifyConditions = [
+ {
+ items: [
+ {
+ conditionType: "INPUT",
+ domkey: ["authCode"],
+ fieldcol: 14,
+ label: "二次验证密码",
+ labelcol: 10,
+ value: "",
+ otherParams: {
+ type: "password"
+ },
+ rules: "required|string",
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true
+ }
+];
+export const loginCondition = [
+ {
+ items: [
+ {
+ conditionType: "INPUT",
+ domkey: ["password"],
+ fieldcol: 14,
+ label: "登录密码",
+ labelcol: 10,
+ value: "",
+ otherParams: {
+ type: "password"
+ },
+ rules: "required|string",
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true
+ }
+];
+export const secondarypwdCondition = [
+ {
+ items: [
+ {
+ conditionType: "INPUT",
+ domkey: ["secondaryPwd1"],
+ fieldcol: 14,
+ label: "密码",
+ labelcol: 10,
+ value: "",
+ otherParams: {
+ type: "password",
+ passwordStrength: true
+ },
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["secondaryPwd2"],
+ fieldcol: 14,
+ label: "确认密码",
+ labelcol: 10,
+ value: "",
+ otherParams: {
+ type: "password"
+ },
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["validatecode"],
+ fieldcol: 14,
+ label: "验证码",
+ labelcol: 10,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true
+ }
+];
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
index 1b598371..49974e92 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
@@ -2,37 +2,31 @@ import React from "react";
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";
+import SecondaryVerify from "./secondaryVerify";
+import LoginVerify from "./loginVerify";
+import SecondarypwdVerify from "./secondarypwdVerify";
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: []
- },
+ visible: false, captchaVisible: false, loginVisible: false, pwdSetVisible: false,
+ mySalaryBillData: { employeeInformation: {}, salaryTemplate: [] },
salaryBillToken: {}
};
this.id = "";
@@ -60,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();
@@ -82,12 +71,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();
@@ -96,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({
@@ -132,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("=");
@@ -144,19 +105,21 @@ export default class MobilePayroll extends React.Component {
return params;
};
confirmSalaryBill = () => {
- confirmSalaryBill({ salaryInfoId: getQueryString("id") }).then(({ status, errormsg }) => {
- if (status) {
- message.success(getLabel(30700, "操作成功"));
- this.getMySalaryBill(getQueryString("id"));
- } else {
- message.error(errormsg || getLabel(30651, "操作失败"));
- }
- });
+ const { salaryBillToken } = this.state;
+ confirmSalaryBill({ salaryInfoId: getQueryString("id"), header: salaryBillToken })
+ .then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(30700, "操作成功"));
+ this.getMySalaryBill(getQueryString("id"));
+ } else {
+ message.error(errormsg || getLabel(30651, "操作失败"));
+ }
+ });
};
handleGoFeedback = () => {
Modal.confirm({
title: getLabel(131329, "信息确认"),
- content: getLabel(111, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
+ content: getLabel(111, "确认是否发起反馈流程?"),
onOk: () => {
const { salaryBillToken } = this.state;
feedBackSalaryBill({ salaryInfoId: getQueryString("id"), header: salaryBillToken })
@@ -177,76 +140,61 @@ 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, loginVisible, pwdSetVisible
+ } = 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 && this.setState({ visible: false, loginVisible: true })}
+ onSuccess={() => {
+ setInitEmVerify();
+ this.getMySalaryBill(getQueryString("id"));
+ }}/>}
+ {loginVisible && this.setState({ loginVisible: false, pwdSetVisible: true })}/>}
+ {pwdSetVisible && this.setState({ pwdSetVisible: false }, () => this.initMobile())}/>}
+ {/*发送验证码*/}
+ 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" ?
-
-
-
-
-
- :
-
-
-
-
-
-
-
- }
- this.setState({ captchaVisible: false })}
- onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
- />
-
- );
+ return (
+ {type === "phone" ?
+
+
+
+ :
+
+
+
+
+
+ }
+ );
}
}
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.less b/pc4mobx/hrmSalary/pages/mobilePayroll/index.less
index 923d3d82..9fd7d4d6 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.less
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.less
@@ -39,3 +39,132 @@
}
}
}
+
+.am-modal-mask {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ height: 100%;
+ z-index: 999;
+ background-color: rgba(0, 0, 0, .4);
+}
+
+.am-modal-transparent {
+ width: 80%;
+}
+
+.am-modal-transparent .am-modal-content {
+ border-radius: 7px;
+ padding-top: 15px;
+}
+
+.am-modal-content {
+ position: relative;
+ background-color: #fff;
+ border: 0;
+ background-clip: padding-box;
+ text-align: center;
+ height: 100%;
+ overflow: hidden;
+}
+
+.am-modal-header {
+ padding: 15px;
+}
+
+.am-modal-title {
+ margin: 0;
+ letter-spacing: -.1px;
+ color: #333;
+ font-size: 14px;
+ line-height: 20px;
+ text-align: center;
+ height: auto;
+ max-height: 150px;
+ overflow-y: auto;
+}
+
+.am-modal-body {
+ font-size: 14px;
+ color: #868686;
+ height: 100%;
+ line-height: 1.5;
+ overflow: auto;
+ padding: 0 15px 30px;
+
+ .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 {
+ position: fixed;
+ overflow: auto;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ height: 100%;
+ z-index: 999;
+ -webkit-overflow-scrolling: touch;
+ outline: 0;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ -webkit-transform: translateZ(1px);
+ transform: translateZ(1px);
+}
+
+.am-modal-button-group-h {
+ position: relative;
+ border-top: 1px solid #ddd;
+ display: flex;
+}
+
+.am-modal-button-group-h .am-modal-button {
+ -webkit-touch-callout: none;
+ flex: 1 1;
+ box-sizing: border-box;
+ text-align: center;
+ text-decoration: none;
+ outline: none;
+ color: #55b1f9;
+ height: 50px;
+ line-height: 50px;
+ display: block;
+ width: auto;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ font-size: 14px;
+}
+
+.am-modal-button-group-h .am-modal-button:first-child {
+ color: #333;
+}
+
+.am-modal-button-group-h .am-modal-button:last-child {
+ position: relative;
+ border-left: 1px solid #ddd;
+}
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/loginVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/loginVerify.js
new file mode 100644
index 00000000..90d231ca
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/loginVerify.js
@@ -0,0 +1,59 @@
+/*
+ * 登录密码验证
+ *
+ * @Author: 黎永顺
+ * @Date: 2025/4/17
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaLocaleProvider } from "ecCom";
+import { WeaForm } from "comsMobx";
+import FormInfo from "../../components/FormInfo";
+import { loginCondition } from "./conditions";
+import MobileModal from "./mobileModal";
+import * as API from "../../apis/mySalaryBenefits";
+import { RSAEcrypt } from "../../util/RSAUtil";
+
+const form = new WeaForm();
+const getLabel = WeaLocaleProvider.getLabel;
+
+class LoginVerify extends Component {
+
+ componentDidMount() {
+ form.initFormFields(loginCondition);
+ }
+
+ componentWillUnmount() {
+ form.resetForm();
+ }
+
+ save = async () => {
+ form.validateForm().then(f => {
+ if (f.isValid) {
+ 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();
+ }
+ });
+ };
+
+ render() {
+ const itemRender = {};
+ return (
+
+ );
+ }
+}
+
+export default LoginVerify;
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/mobileModal.js b/pc4mobx/hrmSalary/pages/mobilePayroll/mobileModal.js
new file mode 100644
index 00000000..b6f388db
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/mobileModal.js
@@ -0,0 +1,65 @@
+/*
+ * 自定义移动端弹框组件
+ *
+ * @Author: 黎永顺
+ * @Date: 2025/4/16
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaLocaleProvider } from "ecCom";
+import { removeElementById } from "../../util";
+import "./index.less";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+class MobileModal extends Component {
+ componentDidMount() {
+ this.setMetaViewport();
+ }
+
+ setMetaViewport = () => {
+ // 检查是否已存在 viewport meta 标签
+ let viewportMeta = document.querySelector("meta[name=\"viewport\"]");
+ if (!viewportMeta) {
+ // 如果不存在,创建一个新的 meta 标签
+ viewportMeta = document.createElement("meta");
+ viewportMeta.setAttribute("name", "viewport");
+ document.head.appendChild(viewportMeta);
+ }
+ // 设置或更新 viewport 的 content 属性
+ const content = "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover";
+ viewportMeta.setAttribute("content", content);
+ };
+
+ render() {
+ return (
+
+
+
+
+
+
+
+
{this.props.children}
+
+
+
+
+
+
+ );
+ }
+}
+
+export default MobileModal;
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
new file mode 100644
index 00000000..b5310466
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
@@ -0,0 +1,82 @@
+/*
+ * 二次验证密码
+ *
+ * @Author: 黎永顺
+ * @Date: 2025/4/16
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaLocaleProvider } from "ecCom";
+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";
+
+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);
+ }
+
+ componentWillUnmount() {
+ this.setState({ notSetting: false }, () => form.resetForm());
+ }
+
+ doSecondAuth = () => {
+ form.validateForm().then(f => {
+ if (f.isValid) {
+ const { salaryBillToken } = this.props;
+ API.doSecondAuth({ mouldCode: "HRM", itemCode: "SALARY", ...form.getFormParams() }, salaryBillToken)
+ .then(({ status, checkStatus, checkMsg }) => {
+ if (status && checkStatus === "1") {
+ message.success(checkMsg);
+ this.props.onSuccess();
+ } else {
+ form.showError("authCode", checkMsg);
+ }
+ });
+ } else {
+ f.showErrors();
+ }
+ });
+ };
+
+ render() {
+ const { notSetting } = this.state;
+ const itemRender = {
+ authCode: (field, textAreaProps, form, formParams) => {
+ return (
+
+ {
+ notSetting &&
+
+ }
+ );
+ }
+ };
+ return (
+
+ );
+ }
+}
+
+export default SecondaryVerify;
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
new file mode 100644
index 00000000..a8f84027
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
@@ -0,0 +1,91 @@
+/*
+ * 二次验证密码设置
+ *
+ * @Author: 黎永顺
+ * @Date: 2025/4/17
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+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";
+
+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);
+ }
+
+ componentWillUnmount() {
+ form.resetForm();
+ }
+
+ save = async () => {
+ form.validateForm().then(f => {
+ if (f.isValid) {
+ 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 }, 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();
+ }
+ });
+ };
+
+ 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;
diff --git a/pc4mobx/hrmSalary/pages/mySalary/authority.js b/pc4mobx/hrmSalary/pages/mySalary/authority.js
index 00a74712..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;
-
const style = {
position: "absolute",
top: "50%",
diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
index 5fa76f93..c03a5368 100644
--- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
+++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
@@ -13,7 +13,10 @@ import Content from "../../components/pcTemplate/content";
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
import CaptchaModal from "../../components/captchaModal";
import "./index.less";
+import { getQueryString } from "../../util/url";
+const isPhone = /(iPhone|iPad|iPod|iOS|Android)/i.test(window.navigator.userAgent);
+const isEm = window.navigator.userAgent.indexOf("E-Mobile7") >= 0;
const { getLabel } = WeaLocaleProvider;
@inject("mySalaryStore")
@@ -57,7 +60,7 @@ class MySalaryView extends Component {
handleGoFeedback = () => {
Modal.confirm({
title: getLabel(131329, "信息确认"),
- content: getLabel(544271, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
+ content: getLabel(544271, "确认是否发起反馈流程?"),
onOk: () => {
const { params: { salaryInfoId }, mySalaryStore: { getMySalaryBill } } = this.props;
feedBackSalaryBill({ salaryInfoId }).then(({ status, errorMsg }) => {
@@ -82,7 +85,18 @@ class MySalaryView extends Component {
const { captchaVisible, mySalaryStore } = this.state;
const { params: { salaryInfoId } } = this.props;
if (_.isEmpty(mySalaryStore)) {
- return
;
+ return
+ this.setState({ captchaVisible: false })}
+ onConfirm={() => {
+ this.props.mySalaryStore.setInitEmVerify();
+ this.props.mySalaryStore.getMySalaryBill(Number(salaryInfoId)).then(data => {
+ this.setState({ mySalaryStore: data });
+ });
+ }}
+ />
+
;
}
const { salaryTemplate, salaryGroups, employeeInformation, sendTime } = mySalaryStore;
const salaryProps = {
@@ -104,11 +118,6 @@ class MySalaryView extends Component {