@@ -62,4 +65,4 @@ class MobileModal extends Component {
}
}
-export default MobileModal;
+export default MobileModal;
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
index b5310466..ad86c294 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
@@ -57,7 +57,7 @@ class SecondaryVerify extends Component {
};
render() {
- const { notSetting } = this.state;
+ const { notSetting } = this.state, { isSalaryMobile, onCancel } = this.props;
const itemRender = {
authCode: (field, textAreaProps, form, formParams) => {
return (
@@ -72,11 +72,13 @@ class SecondaryVerify extends Component {
);
}
};
- return (
-
- );
+ return (
+
+
+ );
}
}
-export default SecondaryVerify;
+export default SecondaryVerify;
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
index a8f84027..0a7a5f67 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
@@ -66,6 +66,7 @@ class SecondarypwdVerify extends Component {
};
render() {
+ const { isSalaryMobile, onCancel } = this.props;
const itemRender = {
validatecode: (field, textAreaProps, form, formParams) => {
return (
@@ -81,11 +82,12 @@ class SecondarypwdVerify extends Component {
);
}
};
- return (
+ return (
);
}
}
-export default SecondarypwdVerify;
+export default SecondarypwdVerify;
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
index e8b7cc58..3dc763be 100644
--- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
+++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
@@ -13,7 +13,6 @@ 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 isIPhone = new RegExp("\\biPhone\\b|\\biPod\\b", "i").test(window.navigator.userAgent);
const isEm = window.navigator.userAgent.indexOf("E-Mobile7") >= 0;
@@ -31,17 +30,19 @@ class MySalaryView extends Component {
}
async componentDidMount() {
+ // 西部信托取消权限验证
+
const { mySalaryStore: { init, getMySalaryBill }, params: { salaryInfoId } } = this.props;
- const { data, status } = await payrollCheckType();
- if (status && data === "PWD") {
- init(false, () => {
+ // const { data, status } = await payrollCheckType();
+ // if (status && data === "PWD") {
+ // init(false, () => {
getMySalaryBill(Number(salaryInfoId)).then(data => {
this.setState({ mySalaryStore: data });
});
- });
- } else {
- this.setState({ captchaVisible: true });
- }
+ // });
+ // } else {
+ // this.setState({ captchaVisible: true });
+ // }
}
confirmSalaryBill = () => {
@@ -104,10 +105,11 @@ class MySalaryView extends Component {
background: salaryTemplate.background, tipPosi: salaryTemplate.textContentPosition || "",
itemTypeList: [employeeInformation, ...salaryGroups]
};
+ // this.props.mySalaryStore -西部信托取消验证
return (
+ store={{ loading: false, hasRight: true }}>
{
}
;
-};
+};
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/payrollTable/index.js b/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/payrollTable/index.js
index 16f992b3..e5acc97f 100644
--- a/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/payrollTable/index.js
+++ b/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/payrollTable/index.js
@@ -5,27 +5,49 @@
* Date: 2023/11/13
*/
import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
import { Dropdown, Menu } from "antd";
import { mySalaryBillList, mySalaryBillList4Card } from "../../../../apis/mySalaryBenefits";
-import moment from "moment";
+import { payrollCheckType } from "../../../../apis/payroll";
+import Authority from "../../../mySalary/authority";
+import CaptchaModal from "../../../../components/captchaModal";
const getLabel = WeaLocaleProvider.getLabel;
const API = {
mySalaryBillList, mySalaryBillList4Card
};
+@inject("mySalaryStore")
+@observer
class Index extends Component {
constructor(props) {
super(props);
this.state = {
dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 },
- loading: false
+ loading: false, store: { loading: true, hasRight: false }, captchaVisible: false
};
}
- componentDidMount() {
- this.getMySalaryBillList(this.props);
+ async componentDidMount() {
+ const { data, status } = await payrollCheckType();
+ if (status && data === "PWD") {
+ if (window.doCheckSecondaryVerify4ec && !this.props.type) {
+ window.doCheckSecondaryVerify4ec({ mouldCode: "HRM", itemCode: "SALARY" }, (data) => {
+ const { status } = data;
+ if (status === "1") {
+ this.setState({ store: { loading: false, hasRight: true } });
+ this.getMySalaryBillList(this.props);
+ } else {
+ this.setState({ store: { loading: false, hasRight: false } });
+ }
+ });
+ } else {
+ this.getMySalaryBillList(this.props);
+ }
+ } else {
+ this.setState({ captchaVisible: true });
+ }
}
componentWillReceiveProps(nextProps, nextContext) {
@@ -35,7 +57,7 @@ class Index extends Component {
getMySalaryBillList = (props) => {
this.setState({ loading: true });
const { pageInfo } = this.state;
- const { salaryYearMonth, employeeId, type = "mySalaryBillList" } = props;
+ const { salaryYearMonth, employeeId, type = "mySalaryBillList" } = props || this.props;
API[type]({ salaryYearMonth, employeeId, ...pageInfo }).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
@@ -59,7 +81,7 @@ class Index extends Component {
};
render() {
- const { dataSource, loading, columns, pageInfo } = this.state;
+ const { dataSource, loading, columns, pageInfo, store, captchaVisible } = this.state;
const pagination = {
...pageInfo,
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
@@ -77,7 +99,18 @@ class Index extends Component {
}, () => this.getMySalaryBillList(this.props));
}
};
- return (
+ {/*发送验证码*/
+ }
+ if (captchaVisible) {
+ return this.setState({ captchaVisible: false, store: { loading: false, hasRight: false } })}
+ onConfirm={() => {
+ this.setState({ store: { loading: false, hasRight: true } }, () => this.getMySalaryBillList(this.props));
+ }}
+ />;
+ }
+ return (
)
}]}
/>
- );
+ );
}
}
-export default Index;
+export default Index;
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/pages/mySalaryMobile/index.js b/pc4mobx/hrmSalary/pages/mySalaryMobile/index.js
index 0ce6b908..e3ed4432 100644
--- a/pc4mobx/hrmSalary/pages/mySalaryMobile/index.js
+++ b/pc4mobx/hrmSalary/pages/mySalaryMobile/index.js
@@ -5,12 +5,18 @@
* Date: 2023/11/10
*/
import React, { Component } from "react";
-import { WeaLocaleProvider, WeaTab } from "ecCom";
+import { WeaLocaleProvider, WeaTab, WeaTools } from "ecCom";
import moment from "moment";
import MobileDatePicker from "./components/mobileDatePicker";
import PayrollList from "./components/payrollList";
import { mySalaryBillList } from "../../apis/mySalaryBenefits";
+import { payrollCheckType } from "../../apis/payroll";
+import CaptchaModal from "../../components/captchaModal";
+import Authority from "../mySalary/authority";
import "./index.less";
+import SecondaryVerify from "../mobilePayroll/secondaryVerify";
+import LoginVerify from "../mobilePayroll/loginVerify";
+import SecondarypwdVerify from "../mobilePayroll/secondarypwdVerify";
const getLabel = WeaLocaleProvider.getLabel;
@@ -19,17 +25,32 @@ class Index extends Component {
super(props);
this.state = {
dataSource: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
+ store: { loading: true, hasRight: false }, captchaVisible: false,
+ visible: false, loginVisible: false, pwdSetVisible: false,
salaryYearMonth: [
- moment(new Date()).subtract(1, 'year').startOf("year").format("YYYY-MM"),
+ moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
moment().endOf("year").format("YYYY-MM")],
isMore: true //是否还有更多数据
};
}
- componentDidMount() {
- this.getMySalaryBillList();
+ async componentDidMount() {
+ const { data, status } = await payrollCheckType();
+ if (status && data === "PWD") {
+ WeaTools.callApi("/api/encrypt/secondauthsetting/isNeedSecondAuth", "POST", {
+ mouldCode: "HRM", itemCode: "SALARY"
+ }).then(({ status, isNeedSecondAuth }) => {
+ if (status && isNeedSecondAuth) {
+ this.setState({ visible: true });
+ } else {
+ this.setState({ store: { loading: false, hasRight: true } }, () => this.getMySalaryBillList());
+ }
+ });
+ } else {
+ this.setState({ captchaVisible: true });
+ }
const mySalaryMobile = document.getElementById("mySalaryMobile");
- mySalaryMobile.addEventListener("scroll", this.handleScroll, true);
+ mySalaryMobile && mySalaryMobile.addEventListener("scroll", this.handleScroll, true);
}
handleScroll = () => {
@@ -78,9 +99,51 @@ class Index extends Component {
};
render() {
- const { salaryYearMonth, dataSource, isMore, loading } = this.state;
+ const {
+ salaryYearMonth, dataSource, isMore, loading, store, captchaVisible, visible, loginVisible, pwdSetVisible
+ } = this.state;
const [salaryStartYearMonth, salaryEndYearMonth] = salaryYearMonth;
- return (
+ if (visible) {
+ return ( this.setState({ visible: false, loginVisible: true })}
+ onCancel={() => this.setState({
+ visible: false, store: { loading: false, hasRight: false }
+ })}
+ onSuccess={() => {
+ this.setState({
+ visible: false, store: { loading: false, hasRight: true }
+ }, () => this.getMySalaryBillList());
+ }}/>);
+ }
+ if (loginVisible) {
+ return ( this.setState({
+ loginVisible: false, store: { loading: false, hasRight: false }
+ })}
+ onSetPwdSet={() => this.setState({ loginVisible: false, pwdSetVisible: true })}/>);
+ }
+ if (pwdSetVisible) {
+ return ( this.setState({
+ pwdSetVisible: false, store: { loading: false, hasRight: false }
+ })}
+ onSuccess={() => this.setState({
+ pwdSetVisible: false,
+ store: { loading: false, hasRight: true }
+ }, () => this.getMySalaryBillList())}/>);
+ }
+ {/*发送验证码*/
+ }
+ if (captchaVisible) {
+ return this.setState({ captchaVisible: false, store: { loading: false, hasRight: false } })}
+ onConfirm={() => {
+ this.setState({ store: { loading: false, hasRight: true } }, () => this.getMySalaryBillList());
+ }}
+ />;
+ }
+ return (
- );
+ );
}
}
-export default Index;
+export default Index;
\ No newline at end of file