From f50257e1b515b9366a08d73aa2edd30ac4b25e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 25 Jan 2024 15:09:30 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feature/2.10.1.2401.01-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=9F=A5=E7=9C=8B=E4=B8=8E=E8=B0=83=E8=96=AA=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=88=86=E5=BC=80=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/index.js | 8 ++++ .../pages/historicalPayroll/index.js | 38 +++++++++++++++++++ .../pages/salaryAdjustmentRecords/index.js | 22 +++++++++++ 3 files changed, 68 insertions(+) create mode 100644 pc4mobx/hrmSalary/pages/historicalPayroll/index.js create mode 100644 pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 743b5cfc..799df79c 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -1,6 +1,8 @@ import React from "react"; import Route from "react-router/lib/Route"; import { WeaLocaleProvider } from "ecCom"; +import HistoricalPayroll from "./pages/historicalPayroll"; +import SalaryAdjustmentRecords from "./pages/salaryAdjustmentRecords"; import MySalaryMobile from "./pages/mySalaryMobile"; import MySalary from "./pages/mySalaryBenefits"; import Programme from "./pages/socialSecurityBenefits/programme"; @@ -67,6 +69,10 @@ const Home = (props) => props.children; const SocialSecurityBenefits = (props) => props.children; const DataAcquisition = (props) => props.children; +// historicalPayroll 历史工资单查看 +// salaryAdjustmentRecords 调薪记录查看 + +// mySalaryMobile 我的薪资福利-移动端 // mySalaryMobile 我的薪资福利-移动端 // mySalary 我的薪资福利 // mySalaryView 我的薪资福利-查看工资单 @@ -112,6 +118,8 @@ const Routes = ( path="hrmSalary" onEnter={getLocaleLabel} component={Home}> + + diff --git a/pc4mobx/hrmSalary/pages/historicalPayroll/index.js b/pc4mobx/hrmSalary/pages/historicalPayroll/index.js new file mode 100644 index 00000000..f33c7651 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/historicalPayroll/index.js @@ -0,0 +1,38 @@ +/* + * Author: 黎永顺 + * name:历史工资单 + * Description: + * Date: 2024/1/25 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import moment from "moment"; +import { MonthRangePicker } from "../reportView/components/statisticalMicroSettingsSlide"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + dateRange: [ + moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"), + moment(new Date()).endOf("year").format("YYYY-MM") + ] + }; + } + + render() { + const { dateRange } = this.state; + return ( +
+
+ this.setState({ dateRange: v })}/> +
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js b/pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js new file mode 100644 index 00000000..b11891c8 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js @@ -0,0 +1,22 @@ +/* + * Author: 黎永顺 + * name:调薪记录 + * Description: + * Date: 2024/1/25 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + render() { + return ( +
+ +
+ ); + } +} + +export default Index; From b82ae4f4cee1a3a0572675df790438d6f28f1c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 25 Jan 2024 15:45:33 +0800 Subject: [PATCH 2/7] =?UTF-8?q?feature/2.10.1.2401.01-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=9F=A5=E7=9C=8B=E4=B8=8E=E8=B0=83=E8=96=AA=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=88=86=E5=BC=80=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/mySalaryBenefits.js | 8 +++++++ .../pages/historicalPayroll/index.js | 6 ++++- .../pages/historicalPayroll/index.less | 23 +++++++++++++++++++ .../components/payrollTable/index.js | 4 ++-- 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/historicalPayroll/index.less diff --git a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js index 2cd64d80..e7c9c9b4 100644 --- a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js +++ b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js @@ -6,6 +6,14 @@ import { convertToUrlString } from "../util/url"; export const mySalaryBillList = params => { return postFetch("/api/bs/hrmsalary/salaryBill/mySalaryBillList", params); }; +// 人事卡片-工资单列表 +export const mySalaryBillList4Card = params => { + return postFetch("/api/bs/hrmsalary/salaryBill/mySalaryBillList4Card", params); +}; +// 人事卡片-调薪记录列表 +export const mySalaryRecordList4Card = params => { + return postFetch("/api/bs/hrmsalary/report/record/list4Card", params); +}; // 调薪记录列表 export const recordList = params => { diff --git a/pc4mobx/hrmSalary/pages/historicalPayroll/index.js b/pc4mobx/hrmSalary/pages/historicalPayroll/index.js index f33c7651..49c7fdb6 100644 --- a/pc4mobx/hrmSalary/pages/historicalPayroll/index.js +++ b/pc4mobx/hrmSalary/pages/historicalPayroll/index.js @@ -6,8 +6,10 @@ */ import React, { Component } from "react"; import { WeaLocaleProvider } from "ecCom"; -import moment from "moment"; import { MonthRangePicker } from "../reportView/components/statisticalMicroSettingsSlide"; +import Payroll from "../mySalaryBenefits/components/payrollTable"; +import moment from "moment"; +import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; @@ -27,9 +29,11 @@ class Index extends Component { return (
+ {getLabel(542604, "薪资所属月")} this.setState({ dateRange: v })}/>
+
); } diff --git a/pc4mobx/hrmSalary/pages/historicalPayroll/index.less b/pc4mobx/hrmSalary/pages/historicalPayroll/index.less new file mode 100644 index 00000000..459ccbaf --- /dev/null +++ b/pc4mobx/hrmSalary/pages/historicalPayroll/index.less @@ -0,0 +1,23 @@ +.history-payroll-box { + width: 100%; + height: 100%; + background: #f6f6f6; + padding: 16px; + + .topQuery { + width: 100%; + background: #fff; + padding: 16px; + margin-bottom: 16px; + display: flex; + align-items: center; + + .title { + margin-right: 10px; + } + } + + .wea-new-table { + background: #fff; + } +} diff --git a/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/payrollTable/index.js b/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/payrollTable/index.js index 33cb6873..94161e1a 100644 --- a/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/payrollTable/index.js +++ b/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/payrollTable/index.js @@ -15,7 +15,7 @@ class Index extends Component { constructor(props) { super(props); this.state = { - juniorMapList: [], dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, + dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, employeeId: "" }; } @@ -55,7 +55,7 @@ class Index extends Component { }; render() { - const { juniorMapList, dataSource, loading, columns, pageInfo } = this.state; + const { dataSource, loading, columns, pageInfo } = this.state; const pagination = { ...pageInfo, showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, From 866376e7dea88ced89c639c2eb1cf747678f3118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 25 Jan 2024 16:47:55 +0800 Subject: [PATCH 3/7] =?UTF-8?q?feature/2.10.1.2401.01-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=9F=A5=E7=9C=8B=E4=B8=8E=E8=B0=83=E8=96=AA=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=88=86=E5=BC=80=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/historicalPayroll/index.js | 4 +++- .../components/payrollTable/index.js | 13 ++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/historicalPayroll/index.js b/pc4mobx/hrmSalary/pages/historicalPayroll/index.js index 49c7fdb6..2e0b3e11 100644 --- a/pc4mobx/hrmSalary/pages/historicalPayroll/index.js +++ b/pc4mobx/hrmSalary/pages/historicalPayroll/index.js @@ -26,6 +26,8 @@ class Index extends Component { render() { const { dateRange } = this.state; + const index1 = window.location.hash.lastIndexOf("/") + 1, index2 = window.location.hash.lastIndexOf("?"); + const employeeId = window.location.hash.slice(index1, index2); return (
@@ -33,7 +35,7 @@ class Index extends Component { this.setState({ dateRange: v })}/>
- +
); } diff --git a/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/payrollTable/index.js b/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/payrollTable/index.js index 94161e1a..4c882560 100644 --- a/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/payrollTable/index.js +++ b/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/payrollTable/index.js @@ -6,17 +6,20 @@ */ import React, { Component } from "react"; import { WeaLocaleProvider, WeaTable } from "ecCom"; -import { mySalaryBillList } from "../../../../apis/mySalaryBenefits"; +import { mySalaryBillList, mySalaryBillList4Card } from "../../../../apis/mySalaryBenefits"; import moment from "moment"; const getLabel = WeaLocaleProvider.getLabel; +const API = { + mySalaryBillList, mySalaryBillList4Card +}; class Index extends Component { constructor(props) { super(props); this.state = { dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, - loading: false, employeeId: "" + loading: false }; } @@ -30,9 +33,9 @@ class Index extends Component { getMySalaryBillList = (props) => { this.setState({ loading: true }); - const { pageInfo, employeeId } = this.state; - const { salaryYearMonth } = props; - mySalaryBillList({ salaryYearMonth, employeeId, ...pageInfo }).then(({ status, data }) => { + const { pageInfo } = this.state; + const { salaryYearMonth, employeeId, type = "mySalaryBillList" } = props; + API[type]({ salaryYearMonth, employeeId, ...pageInfo }).then(({ status, data }) => { this.setState({ loading: false }); if (status) { const { columns, datas: dataSource, pageInfo: { pageNum: current, pageSize, total } } = data; From 314b3f594c5930ad91921834333e93d4aeb4a001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 25 Jan 2024 17:19:51 +0800 Subject: [PATCH 4/7] =?UTF-8?q?feature/2.10.1.2401.01-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=9F=A5=E7=9C=8B=E4=B8=8E=E8=B0=83=E8=96=AA=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=88=86=E5=BC=80=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/SalaryAdjustmentRecords/index.js | 15 +++++++++++---- .../pages/salaryAdjustmentRecords/index.js | 8 ++++++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/SalaryAdjustmentRecords/index.js b/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/SalaryAdjustmentRecords/index.js index ed75ad76..d13cd2fe 100644 --- a/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/SalaryAdjustmentRecords/index.js +++ b/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/SalaryAdjustmentRecords/index.js @@ -8,9 +8,12 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { WeaLocaleProvider, WeaTable } from "ecCom"; import Authority from "../../../mySalary/authority"; -import { recordList } from "../../../../apis/mySalaryBenefits"; +import { mySalaryRecordList4Card, recordList } from "../../../../apis/mySalaryBenefits"; const getLabel = WeaLocaleProvider.getLabel; +const API = { + recordList, mySalaryRecordList4Card +}; @inject("mySalaryStore") @observer @@ -24,14 +27,18 @@ class Index extends Component { } componentDidMount() { - const { mySalaryStore: { initRecordData } } = this.props; - initRecordData(this.getRecordList); + const { mySalaryStore: { initRecordData, getRecordData }, type } = this.props; + !type ? initRecordData(this.getRecordList) : getRecordData({ + status: "1", token: "", + callback: () => this.getRecordList() + }); } getRecordList = () => { const { pageInfo } = this.state; + const { employeeId, type = "recordList" } = this.props; this.setState({ loading: true }); - recordList({ ...pageInfo }).then(({ status, data }) => { + API[type]({ ...pageInfo, employeeId }).then(({ status, data }) => { this.setState({ loading: false }); if (status) { const { columns, list: dataSource, pageNum: current, pageSize, total } = data; diff --git a/pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js b/pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js index b11891c8..4d35cfa3 100644 --- a/pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js +++ b/pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js @@ -6,14 +6,18 @@ */ import React, { Component } from "react"; import { WeaLocaleProvider } from "ecCom"; +import SalaryAdjustmentRecords from "../mySalaryBenefits/components/SalaryAdjustmentRecords"; +import "../historicalPayroll/index.less"; const getLabel = WeaLocaleProvider.getLabel; class Index extends Component { render() { + const index1 = window.location.hash.lastIndexOf("/") + 1, index2 = window.location.hash.lastIndexOf("?"); + const employeeId = window.location.hash.slice(index1, index2); return ( -
- +
+
); } From fe83bf02869b2a5f5e42fa48caa83c5f6edad539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 26 Jan 2024 09:30:38 +0800 Subject: [PATCH 5/7] =?UTF-8?q?feature/2.10.1.2401.01-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=A8=A1=E6=9D=BF=E5=A4=8D=E5=88=B6=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=9C=B0=E5=9D=80=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/historicalPayroll/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/historicalPayroll/index.js b/pc4mobx/hrmSalary/pages/historicalPayroll/index.js index 2e0b3e11..51e21047 100644 --- a/pc4mobx/hrmSalary/pages/historicalPayroll/index.js +++ b/pc4mobx/hrmSalary/pages/historicalPayroll/index.js @@ -5,7 +5,7 @@ * Date: 2024/1/25 */ import React, { Component } from "react"; -import { WeaLocaleProvider } from "ecCom"; +import { WeaLocaleProvider, WeaTools } from "ecCom"; import { MonthRangePicker } from "../reportView/components/statisticalMicroSettingsSlide"; import Payroll from "../mySalaryBenefits/components/payrollTable"; import moment from "moment"; @@ -28,6 +28,8 @@ class Index extends Component { const { dateRange } = this.state; const index1 = window.location.hash.lastIndexOf("/") + 1, index2 = window.location.hash.lastIndexOf("?"); const employeeId = window.location.hash.slice(index1, index2); + console.log(WeaTools.getUrlParams(), window.location); + console.log(window.parent, window.parent.location.href); return (
From 93c17d1a35383389ae32ea28e6e56f22a34296dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 26 Jan 2024 10:25:32 +0800 Subject: [PATCH 6/7] =?UTF-8?q?feature/2.10.1.2401.01-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=9F=A5=E7=9C=8B=E4=B8=8E=E8=B0=83=E8=96=AA=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=88=86=E5=BC=80=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/historicalPayroll/index.js | 5 +---- pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js | 5 ++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/historicalPayroll/index.js b/pc4mobx/hrmSalary/pages/historicalPayroll/index.js index 51e21047..342a69a2 100644 --- a/pc4mobx/hrmSalary/pages/historicalPayroll/index.js +++ b/pc4mobx/hrmSalary/pages/historicalPayroll/index.js @@ -26,10 +26,7 @@ class Index extends Component { render() { const { dateRange } = this.state; - const index1 = window.location.hash.lastIndexOf("/") + 1, index2 = window.location.hash.lastIndexOf("?"); - const employeeId = window.location.hash.slice(index1, index2); - console.log(WeaTools.getUrlParams(), window.location); - console.log(window.parent, window.parent.location.href); + const employeeId = WeaTools.getUrlParams().hrmResourceID; return (
diff --git a/pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js b/pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js index 4d35cfa3..5399f8dd 100644 --- a/pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js +++ b/pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js @@ -5,7 +5,7 @@ * Date: 2024/1/25 */ import React, { Component } from "react"; -import { WeaLocaleProvider } from "ecCom"; +import { WeaLocaleProvider, WeaTools } from "ecCom"; import SalaryAdjustmentRecords from "../mySalaryBenefits/components/SalaryAdjustmentRecords"; import "../historicalPayroll/index.less"; @@ -13,8 +13,7 @@ const getLabel = WeaLocaleProvider.getLabel; class Index extends Component { render() { - const index1 = window.location.hash.lastIndexOf("/") + 1, index2 = window.location.hash.lastIndexOf("?"); - const employeeId = window.location.hash.slice(index1, index2); + const employeeId = WeaTools.getUrlParams().hrmResourceID; return (
From 13d67c5066093e444225886e58141872843f1bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 26 Jan 2024 10:56:23 +0800 Subject: [PATCH 7/7] =?UTF-8?q?feature/2.10.1.2401.01-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=9F=A5=E7=9C=8B=E4=B8=8E=E8=B0=83=E8=96=AA=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=88=86=E5=BC=80=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/mySalaryBenefits.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js index e7c9c9b4..0cb56cfe 100644 --- a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js +++ b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js @@ -12,7 +12,7 @@ export const mySalaryBillList4Card = params => { }; // 人事卡片-调薪记录列表 export const mySalaryRecordList4Card = params => { - return postFetch("/api/bs/hrmsalary/report/record/list4Card", params); + return WeaTools.callApi("/api/bs/hrmsalary/report/record/list4Card", "GET", params); }; // 调薪记录列表