custom/陕西万众

This commit is contained in:
lys 2025-02-26 17:17:06 +08:00
parent 849f130e6b
commit 0af1148d03
5 changed files with 80 additions and 0 deletions

View File

@ -0,0 +1,6 @@
import { postFetch } from "../../util/request";
//万众-报表
export const getDHSalaryReportList = params => {
return postFetch("/api/bs/hrmsalary/salaryacct/dhSalaryReport/list", params);
};

View File

@ -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 = (
<Route key="topologyView" path="topologyView/:salarySobId/:salaryItemId" component={TopologyMap}/>
<Route key="supplementaryCalc" path="supplementaryCalc" component={SupplementaryCalc}/>
<Route key="variableSalary" path="variableSalary" component={VariableSalary}/>
{CustomRoutes}
</Route>
);

View File

@ -0,0 +1,9 @@
import React from "react";
import Route from "react-router/lib/Route";
import ProvisionReport from "./wz/provisionReport";
const CustomRoutes = [
<Route key="customPage_provisionReport_wz" path="customPage_provisionReport_wz" component={ProvisionReport}/>
];
export default CustomRoutes;

View File

@ -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 (<WeaTop
title={getLabel(111, "月度工资计提表-财务使用")} buttonSpace={10} className="provisionReport_wz"
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
buttons={[
<WeaDatePicker value={startMonthStr} format="YYYY-MM"
onChange={val => this.setState({ startMonthStr: val }, () => this.getDHSalaryReportList())}/>,
<Button type="primary">{getLabel(111, "导出")}</Button>
]}>
<div className="provisionReport_wz_content">
<WeaTable dataSource={dataSource} columns={columns} pagination={false}/>
</div>
</WeaTop>);
}
}
export default Index;

View File

@ -0,0 +1,11 @@
.provisionReport_wz {
.provisionReport_wz_content {
width: 100%;
height: 100%;
background: #f6f6f6;
.wea-table {
background: #FFF;
}
}
}