custom/汇通建设
This commit is contained in:
parent
3973a9d0bc
commit
47943f74e3
|
|
@ -4,3 +4,7 @@ import { postFetch } from "../../../util/request";
|
|||
export const getXcssDataDetail = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/htjs/xcssDataDetail", params);
|
||||
};
|
||||
//汇通建设-薪酬送审数据穿透(分页)
|
||||
export const getXczfsqDataDetail = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/htjs/xczfsqDataDetail", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@ import * as API from "../../../../apis/custom-apis/huitong";
|
|||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const APIFox = {
|
||||
submit: API.getXcssDataDetail,
|
||||
payment: API.getXczfsqDataDetail
|
||||
};
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
|
|
@ -28,9 +32,9 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
getXcssDataDetail = () => {
|
||||
const { pageInfo } = this.state, { params } = this.props;
|
||||
const { pageInfo } = this.state, { params: { type, ...payload } } = this.props;
|
||||
this.setState({ loading: true });
|
||||
API.getXcssDataDetail({ ...params, ...pageInfo }).then(({ status, data }) => {
|
||||
APIFox[type]({ ...payload, ...pageInfo }).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { pageInfo: pageParams, columns } = data;
|
||||
|
|
@ -45,6 +49,8 @@ class Index extends Component {
|
|||
|
||||
render() {
|
||||
const { dataSource, columns, pageInfo, loading } = this.state;
|
||||
const { params: { type } } = this.props;
|
||||
const title = type === "submit" ? getLabel(111, "薪酬送审数据") : getLabel(112, "薪酬支付数据");
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
|
|
@ -60,9 +66,8 @@ class Index extends Component {
|
|||
};
|
||||
const height = !_.isEmpty(columns) ? document.querySelector(".wea-new-top-content").style.height : "500px";
|
||||
return (
|
||||
<WeaTop
|
||||
title={getLabel(111, "薪酬送审数据")} icon={<i className="icon-coms-fa"/>} buttons={[]} showDropIcon={false}
|
||||
iconBgcolor="#F14A2D" className="custom_data_huitong">
|
||||
<WeaTop title={title} icon={<i className="icon-coms-fa"/>} buttons={[]} showDropIcon={false}
|
||||
iconBgcolor="#F14A2D" className="custom_data_huitong">
|
||||
<div className="huitong-body">
|
||||
<WeaTable dataSource={dataSource} columns={columns} loading={loading} bordered pagination={pagination}
|
||||
scroll={{ x: 1200, y: `calc(${height} - 120px)` }}/>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import Route from "react-router/lib/Route";
|
|||
import DataDetail from "./huitong/dataDetail";
|
||||
|
||||
const CustomRoutes = [
|
||||
<Route key="customPage_dataDetail_huitong" path="customPage_dataDetail_huitong/:subcompanyId/:salaryMonth"
|
||||
<Route key="customPage_dataDetail_huitong" path="customPage_dataDetail_huitong/:subcompanyId/:salaryMonth/:type"
|
||||
component={DataDetail}/>
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue