From 3f18e4a0a7275909784fc43c27880f7acb3d20cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 13 Sep 2023 10:44:37 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.9.42309.01-=E8=B0=83=E8=96=AA?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=B7=BB=E5=8A=A0=E4=BA=8C=E6=AC=A1=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/mySalary/index.js | 39 ++++++++++++----------- pc4mobx/hrmSalary/stores/mySalary.js | 28 ++++++++++++++++ 2 files changed, 49 insertions(+), 18 deletions(-) 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 => {