diff --git a/pc4mobx/hrmSalary/apis/custom-apis/wz_api.js b/pc4mobx/hrmSalary/apis/custom-apis/wz_api.js new file mode 100644 index 00000000..301b28ce --- /dev/null +++ b/pc4mobx/hrmSalary/apis/custom-apis/wz_api.js @@ -0,0 +1,6 @@ +import { postFetch } from "../../util/request"; + +//万众-报表 +export const getDHSalaryReportList = params => { + return postFetch("/api/bs/hrmsalary/salaryacct/dhSalaryReport/list", params); +}; diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 272bdbdd..23c9a6e9 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -54,6 +54,8 @@ import TopologyMap from "./pages/topologyMap"; import SupplementaryCalc from "./pages/supplementaryCalc"; import VariableSalary from "./pages/variableSalary"; import Layout from "./layout"; + +import CustomRoutes from "./pages/custom-pages"; import stores from "./stores"; import "./style/index"; // 读取系统多语言配置 @@ -118,6 +120,7 @@ const Routes = ( + {CustomRoutes} ); diff --git a/pc4mobx/hrmSalary/pages/custom-pages/index.js b/pc4mobx/hrmSalary/pages/custom-pages/index.js index e69de29b..a88b5563 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/index.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/index.js @@ -0,0 +1,9 @@ +import React from "react"; +import Route from "react-router/lib/Route"; +import ProvisionReport from "./wz/provisionReport"; + +const CustomRoutes = [ + +]; + +export default CustomRoutes; diff --git a/pc4mobx/hrmSalary/pages/custom-pages/wz/provisionReport/index.js b/pc4mobx/hrmSalary/pages/custom-pages/wz/provisionReport/index.js new file mode 100644 index 00000000..9c2d6313 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/custom-pages/wz/provisionReport/index.js @@ -0,0 +1,51 @@ +import React, { Component } from "react"; +import { WeaDatePicker, WeaLocaleProvider, WeaTable, WeaTop } from "ecCom"; +import { getDHSalaryReportList } from "../../../../apis/custom-apis/wz_api"; +import { Button } from "antd"; +import moment from "moment"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + startMonthStr: moment().format("YYYY-MM"), dataSource: [], columns: [] + }; + } + + componentDidMount() { + this.getDHSalaryReportList(); + } + + getDHSalaryReportList = () => { + getDHSalaryReportList({ startMonthStr: this.state.startMonthStr }).then(({ status, data }) => { + if (status) { + const { data: dataSource, column } = data; + this.setState({ + dataSource, columns: _.map(column, o => ({ dataIndex: o.column, title: o.text, width: o.width })) + }); + } + }); + }; + + + render() { + const { startMonthStr, dataSource, columns } = this.state; + return (} iconBgcolor="#F14A2D" + buttons={[ + this.setState({ startMonthStr: val }, () => this.getDHSalaryReportList())}/>, + + ]}> +
+ +
+
); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/custom-pages/wz/provisionReport/index.less b/pc4mobx/hrmSalary/pages/custom-pages/wz/provisionReport/index.less new file mode 100644 index 00000000..d8e1acf7 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/custom-pages/wz/provisionReport/index.less @@ -0,0 +1,11 @@ +.provisionReport_wz { + .provisionReport_wz_content { + width: 100%; + height: 100%; + background: #f6f6f6; + + .wea-table { + background: #FFF; + } + } +}