diff --git a/pc4mobx/hrmSalary/pages/mySalary/index.js b/pc4mobx/hrmSalary/pages/mySalary/index.js index 3b7ad55d..85293ef8 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/index.js +++ b/pc4mobx/hrmSalary/pages/mySalary/index.js @@ -2,11 +2,11 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { DatePicker } from "antd"; import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom"; -import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from "../../components/customTab"; import moment from "moment"; import PayrollModal from "./payrollModal"; import CustomPaginationTable from "../../components/customPaginationTable"; +import Authority from "./authority"; import "./index.less"; const { getLabel } = WeaLocaleProvider; @@ -87,8 +87,8 @@ export default class MySalary extends React.Component { handleTabChange = (selectedKey) => { if (selectedKey === "2") { - const { mySalaryStore: { getRecordList } } = this.props; - getRecordList(); + const { mySalaryStore: { initRecordData } } = this.props; + initRecordData(); } }; @@ -176,21 +176,24 @@ export default class MySalary extends React.Component { } { this.state.selectedKey === "2" && - { - this.historyPageInfo.current = value; - this.handleHistoryPageChange(); - }} - onShowSizeChange={(current, pageSize) => { - this.historyPageInfo = { current, pageSize }; - this.handleHistoryPageChange(); - }} - /> + + { + this.historyPageInfo.current = value; + this.handleHistoryPageChange(); + }} + onShowSizeChange={(current, pageSize) => { + this.historyPageInfo = { current, pageSize }; + this.handleHistoryPageChange(); + }} + /> + } diff --git a/pc4mobx/hrmSalary/stores/mySalary.js b/pc4mobx/hrmSalary/stores/mySalary.js index 916c3be9..8a38f31e 100644 --- a/pc4mobx/hrmSalary/stores/mySalary.js +++ b/pc4mobx/hrmSalary/stores/mySalary.js @@ -218,6 +218,34 @@ export class MySalaryStore { }); }; + @action initRecordData = async (payload) => { + this.clear(); + //1.check is need second verify + if (window.doCheckSecondaryVerify4ec) { + window.doCheckSecondaryVerify4ec({ mouldCode: "HRM", itemCode: "SALARY" }, (data) => this.getRecordData({ + ...data, payload + })); + } else { + //4.loaddata + this.getRecordData({ status: "1", token: "", payload }); + } + }; + + @action + getRecordData = async (params = {}) => { + if (_.isEmpty(params)) return; + const { status, payload, token } = params; + if (status == "1") { + // Object.assign(this._reqParams, { token }); + // this.getFormData({ viewAttr: 1 }); + this.hasRight = true; + this.getRecordList(payload); + } else { + this.hasRight = false; + } + this.loading = false; + }; + @action getRecordList = (params = {}) => { API.recordList(params).then(res => {