From 1ba6b961282f0a5d888408ca2833146082c91da5 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 18 Dec 2024 10:37:38 +0800 Subject: [PATCH] =?UTF-8?q?custom-=E6=AC=A7=E5=A7=86=E9=BE=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/apis/custom-apis/omron/index.js | 7 +++ .../Omron/statisticalReport/index.css | 9 ++++ .../Omron/statisticalReport/index.js | 51 ++++++++++++++++--- 3 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 pc4mobx/hrmSalary/apis/custom-apis/omron/index.js create mode 100644 pc4mobx/hrmSalary/pages/custom-pages/Omron/statisticalReport/index.css diff --git a/pc4mobx/hrmSalary/apis/custom-apis/omron/index.js b/pc4mobx/hrmSalary/apis/custom-apis/omron/index.js new file mode 100644 index 00000000..56b83e3a --- /dev/null +++ b/pc4mobx/hrmSalary/apis/custom-apis/omron/index.js @@ -0,0 +1,7 @@ +import { postFetch } from "../../../util/request"; + +// 欧姆龙-月度薪资环比统计报表(本月、上月维度比较) +export const getYdxzhbReportList = (params) => { + return postFetch("/api/bs/hrmsalary/salaryacct/oml/ydxzhbReportList", params); +}; + diff --git a/pc4mobx/hrmSalary/pages/custom-pages/Omron/statisticalReport/index.css b/pc4mobx/hrmSalary/pages/custom-pages/Omron/statisticalReport/index.css new file mode 100644 index 00000000..baa2bd60 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/custom-pages/Omron/statisticalReport/index.css @@ -0,0 +1,9 @@ +.omron_report { + height: 100%; + background: #f6f6f6; + padding: 8px 16px; + + .wea-new-table { + background: #FFF; + } +} diff --git a/pc4mobx/hrmSalary/pages/custom-pages/Omron/statisticalReport/index.js b/pc4mobx/hrmSalary/pages/custom-pages/Omron/statisticalReport/index.js index 640b548a..d6f24ff6 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/Omron/statisticalReport/index.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/Omron/statisticalReport/index.js @@ -8,17 +8,56 @@ * @description: */ import React, { Component } from "react"; -import { WeaLocaleProvider } from "ecCom"; +import { WeaDatePicker, WeaLocaleProvider, WeaTable, WeaTop } from "ecCom"; +import * as API from "../../../../apis/custom-apis/omron"; +import { Button } from "antd"; +import moment from "moment"; +import "./index.css"; const getLabel = WeaLocaleProvider.getLabel; class Index extends Component { - render() { - return ( -
+ constructor(props) { + super(props); + this.state = { + year: moment().format("YYYY"), dataSource: [], columns: [], loading: false + }; + } -
- ); + componentDidMount() { + this.getYdxzhbReportList(); + } + + getYdxzhbReportList = () => { + const { year } = this.state; + this.setState({ loading: true }); + API.getYdxzhbReportList({ year }).then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + const { columns, data: dataSource } = data; + this.setState({ + columns: _.map(columns, o => ({ dataIndex: o.column, title: o.text })), dataSource + }); + } + }); + }; + + render() { + const { year, dataSource, columns, loading } = this.state; + const buttons = [ + this.setState({ year }, () => this.getYdxzhbReportList())}/>, + + ]; + return ( + } iconBgcolor="#F14A2D" + buttons={buttons} showDropIcon={false}> +
+ +
+
); } }