custom/领悦业务线
This commit is contained in:
parent
d5617ae341
commit
ebc80f8b88
|
|
@ -10,8 +10,8 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaEchart, WeaLeftRightLayout, WeaLocaleProvider, WeaTable } from "ecCom";
|
import { WeaEchart, WeaLeftRightLayout, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||||
import * as API from "../../../../apis/custom-apis/lingyue";
|
import * as API from "../../../../apis/custom-apis/lingyue";
|
||||||
import "./index.less";
|
|
||||||
import { format_with_regex } from "../../../../util";
|
import { format_with_regex } from "../../../../util";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
const colorList = ["#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81"];
|
const colorList = ["#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81"];
|
||||||
|
|
@ -32,6 +32,7 @@ class Content extends Component {
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
if (nextProps.isQuery !== this.props.isQuery) this.getSalaryFileReportList(nextProps);
|
if (nextProps.isQuery !== this.props.isQuery) this.getSalaryFileReportList(nextProps);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps, prevState, snapshot) {
|
componentDidUpdate(prevProps, prevState, snapshot) {
|
||||||
if (prevState.showLeft !== this.state.showLeft) {
|
if (prevState.showLeft !== this.state.showLeft) {
|
||||||
this.refs.chartA.paint();
|
this.refs.chartA.paint();
|
||||||
|
|
@ -40,29 +41,34 @@ class Content extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
getSalaryFileReportList = (props) => {
|
getSalaryFileReportList = (props) => {
|
||||||
const { type, dateRange } = props || this.props;
|
const { type, queryParams } = props || this.props,
|
||||||
|
{ dateRange, pqList, xmList, zwjsList, ...extra } = queryParams;
|
||||||
const [startDate, endDate] = dateRange;
|
const [startDate, endDate] = dateRange;
|
||||||
|
const payload = {
|
||||||
|
pqList: pqList ? pqList.split(",") : [],
|
||||||
|
xmList: xmList ? xmList.split(",") : [],
|
||||||
|
zwjsList: zwjsList ? zwjsList.split(",") : [],
|
||||||
|
startDate, endDate, ...extra
|
||||||
|
};
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
API.getSalaryFileReportList(type, { startDate, endDate })
|
API.getSalaryFileReportList(type, payload).then(({ status, data: result }) => {
|
||||||
.then(({ status, data: result }) => {
|
this.setState({ loading: false });
|
||||||
this.setState({ loading: false });
|
if (status) {
|
||||||
if (status) {
|
const { data: dataSource, columns, chartsDataA, chartsDataB } = result;
|
||||||
const { data: dataSource, columns, chartsDataA, chartsDataB } = result;
|
this.setState({
|
||||||
this.setState({
|
dataSource,
|
||||||
dataSource,
|
chartsDataA: _.reduce(_.keys(chartsDataA), (pre, cur) => {
|
||||||
chartsDataA: _.reduce(_.keys(chartsDataA), (pre, cur) => {
|
return [...pre, { name: cur, value: chartsDataA[cur] }];
|
||||||
return [...pre, { name: cur, value: chartsDataA[cur] }];
|
}, []),
|
||||||
}, []),
|
chartsDataB: _.reduce(_.keys(chartsDataB), (pre, cur) => {
|
||||||
chartsDataB: _.reduce(_.keys(chartsDataB), (pre, cur) => {
|
return [...pre, { name: cur, value: chartsDataB[cur] }];
|
||||||
return [...pre, { name: cur, value: chartsDataB[cur] }];
|
}, []),
|
||||||
}, []),
|
columns: _.map(columns, o => ({ title: o.text, width: o.width, dataIndex: o.column }))
|
||||||
columns: _.map(columns, o => ({ title: o.text, width: o.width, dataIndex: o.column }))
|
});
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
};
|
};
|
||||||
mapPieOptions = (data, pieName) => {
|
mapPieOptions = (data, pieName) => {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
show: true,
|
show: true,
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaLocaleProvider, WeaRangePicker, WeaTop } from "ecCom";
|
import { WeaLocaleProvider, WeaRangePicker, WeaTop } from "ecCom";
|
||||||
import { Button } from "antd";
|
import { Button } from "antd";
|
||||||
|
import "../index.less"
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
* @description:
|
* @description:
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
import { WeaBrowser, WeaFormItem, WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
||||||
import * as API from "../../../../../apis/custom-apis/lingyue";
|
import * as API from "../../../../../apis/custom-apis/lingyue";
|
||||||
import SalaryFileReportLayout from "../layout";
|
import SalaryFileReportLayout from "../layout";
|
||||||
import SalaryFileReport from "../content";
|
import SalaryFileReport from "../content";
|
||||||
|
|
@ -20,27 +20,107 @@ class Index extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
isQuery: false, dateRange: [
|
isQuery: false,
|
||||||
moment(new Date()).format("YYYY-MM-DD"),
|
queryParams: {
|
||||||
moment(new Date()).format("YYYY-MM-DD")
|
pqList: "", xmList: "", zwjsList: "",
|
||||||
]
|
dateRange: [
|
||||||
|
moment(new Date()).format("YYYY-MM-DD"),
|
||||||
|
moment(new Date()).format("YYYY-MM-DD")
|
||||||
|
]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
handleExport = async () => {
|
handleExport = async () => {
|
||||||
const { dateRange } = this.state;
|
const { queryParams } = this.state;
|
||||||
WeaLoadingGlobal.start();
|
const { dateRange, pqList, xmList, zwjsList } = queryParams;
|
||||||
const [startDate, endDate] = dateRange;
|
const [startDate, endDate] = dateRange;
|
||||||
const promise = await API.exportTxdazwjstjReport({ startDate, endDate });
|
WeaLoadingGlobal.start();
|
||||||
|
const payload = {
|
||||||
|
pqList: pqList ? pqList.split(",") : [],
|
||||||
|
xmList: xmList ? xmList.split(",") : [],
|
||||||
|
zwjsList: zwjsList ? zwjsList.split(",") : [],
|
||||||
|
startDate, endDate
|
||||||
|
};
|
||||||
|
const promise = await API.exportTxdazwjstjReport(payload);
|
||||||
|
};
|
||||||
|
getBrowserPatams = (type, title) => {
|
||||||
|
let custBrowserParams = {};
|
||||||
|
type === 162 && (custBrowserParams = {
|
||||||
|
completeParams: {
|
||||||
|
type: 162,
|
||||||
|
fielddbtype: "browser.b_zwjs"
|
||||||
|
},
|
||||||
|
conditionDataParams: {
|
||||||
|
type: 162,
|
||||||
|
fielddbtype: "browser.b_zwjs"
|
||||||
|
},
|
||||||
|
dataParams: {
|
||||||
|
type: 162,
|
||||||
|
fielddbtype: "browser.b_zwjs"
|
||||||
|
},
|
||||||
|
destDataParams: {
|
||||||
|
type: 162,
|
||||||
|
fielddbtype: "browser.b_zwjs"
|
||||||
|
},
|
||||||
|
isMultCheckbox: true
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
completeParams: {},
|
||||||
|
conditionDataParams: {},
|
||||||
|
dataParams: {},
|
||||||
|
destDataParams: {},
|
||||||
|
hasAddBtn: false,
|
||||||
|
hasAdvanceSerach: false,
|
||||||
|
idSeparator: ",",
|
||||||
|
isAutoComplete: 1,
|
||||||
|
isDetail: 0,
|
||||||
|
isMultCheckbox: false,
|
||||||
|
isSingle: false,
|
||||||
|
icon: "icon-coms-hrm",
|
||||||
|
linkUrl: "",
|
||||||
|
pageSize: 10,
|
||||||
|
quickSearchName: "",
|
||||||
|
title,
|
||||||
|
type,
|
||||||
|
viewAttr: 2,
|
||||||
|
...custBrowserParams
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { isQuery, dateRange } = this.state;
|
const { queryParams, isQuery } = this.state;
|
||||||
|
const { dateRange, zwjsList, pqList, xmList } = queryParams;
|
||||||
return (
|
return (
|
||||||
<SalaryFileReportLayout title={getLabel(111, "调薪档案职务角色统计报表")} dateRange={dateRange}
|
<SalaryFileReportLayout title={getLabel(111, "调薪档案职务角色统计报表")} dateRange={dateRange}
|
||||||
onExport={this.handleExport}
|
onExport={this.handleExport}
|
||||||
onChange={v => this.setState({ dateRange: v, isQuery: !isQuery })}>
|
onChange={v => this.setState({
|
||||||
<SalaryFileReport type="txdazwjstjReport" dateRange={dateRange} isQuery={isQuery}/>
|
queryParams: { ...queryParams, dateRange: v },
|
||||||
|
isQuery: !isQuery
|
||||||
|
})}>
|
||||||
|
<div className="lingyue-query">
|
||||||
|
<WeaFormItem label={getLabel(111, "片区")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||||
|
<WeaBrowser type={194} value={pqList}
|
||||||
|
onChange={v => {
|
||||||
|
this.setState({ queryParams: { ...queryParams, pqList: v }, isQuery: !isQuery });
|
||||||
|
}}
|
||||||
|
title={getLabel(111, "片区")} {...this.getBrowserPatams(194, getLabel(111, "片区"))} />
|
||||||
|
</WeaFormItem>
|
||||||
|
<WeaFormItem label={getLabel(111, "项目")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||||
|
<WeaBrowser type={194} value={xmList}
|
||||||
|
onChange={v => this.setState({ queryParams: { ...queryParams, xmList: v }, isQuery: !isQuery })}
|
||||||
|
title={getLabel(111, "项目")} {...this.getBrowserPatams(194, getLabel(111, "项目"))} />
|
||||||
|
</WeaFormItem>
|
||||||
|
<WeaFormItem label={getLabel(111, "职务角色")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||||
|
<WeaBrowser type={194} value={zwjsList}
|
||||||
|
onChange={v => this.setState({
|
||||||
|
queryParams: { ...queryParams, zwjsList: v },
|
||||||
|
isQuery: !isQuery
|
||||||
|
})}
|
||||||
|
title={getLabel(111, "职务角色")} {...this.getBrowserPatams(162, getLabel(111, "职务角色"))} />
|
||||||
|
</WeaFormItem>
|
||||||
|
</div>
|
||||||
|
<SalaryFileReport type="txdazwjstjReport" queryParams={queryParams} isQuery={isQuery}/>
|
||||||
</SalaryFileReportLayout>
|
</SalaryFileReportLayout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
* @description:
|
* @description:
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
import { WeaBrowser, WeaFormItem, WeaInputSearch, WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
||||||
import SalaryFileReportLayout from "../layout";
|
import SalaryFileReportLayout from "../layout";
|
||||||
import SalaryFileReport from "../content";
|
import SalaryFileReport from "../content";
|
||||||
import * as API from "../../../../../apis/custom-apis/lingyue";
|
import * as API from "../../../../../apis/custom-apis/lingyue";
|
||||||
|
|
@ -20,27 +20,79 @@ class Index extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
isQuery: false, dateRange: [
|
isQuery: false,
|
||||||
moment(new Date()).format("YYYY-MM-DD"),
|
queryParams: {
|
||||||
moment(new Date()).format("YYYY-MM-DD")
|
pqList: "", xmList: "", zj: "",
|
||||||
]
|
dateRange: [
|
||||||
|
moment(new Date()).format("YYYY-MM-DD"),
|
||||||
|
moment(new Date()).format("YYYY-MM-DD")
|
||||||
|
]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
handleExport = async () => {
|
handleExport = async () => {
|
||||||
const { dateRange } = this.state;
|
const { queryParams } = this.state;
|
||||||
WeaLoadingGlobal.start();
|
const { dateRange, pqList, xmList, ...extra } = queryParams;
|
||||||
const [startDate, endDate] = dateRange;
|
const [startDate, endDate] = dateRange;
|
||||||
const promise = await API.exportTxdazjtjReport({ startDate, endDate });
|
WeaLoadingGlobal.start();
|
||||||
|
const payload = {
|
||||||
|
pqList: pqList ? pqList.split(",") : [],
|
||||||
|
xmList: xmList ? xmList.split(",") : [],
|
||||||
|
startDate, endDate, ...extra
|
||||||
|
};
|
||||||
|
const promise = await API.exportTxdazjtjReport(payload);
|
||||||
|
};
|
||||||
|
getBrowserPatams = (type, title) => {
|
||||||
|
return {
|
||||||
|
completeParams: {},
|
||||||
|
conditionDataParams: {},
|
||||||
|
dataParams: {},
|
||||||
|
destDataParams: {},
|
||||||
|
hasAddBtn: false,
|
||||||
|
hasAdvanceSerach: false,
|
||||||
|
idSeparator: ",",
|
||||||
|
isAutoComplete: 1,
|
||||||
|
isDetail: 0,
|
||||||
|
isMultCheckbox: false,
|
||||||
|
isSingle: false,
|
||||||
|
icon: "icon-coms-hrm",
|
||||||
|
linkUrl: "",
|
||||||
|
pageSize: 10,
|
||||||
|
quickSearchName: "",
|
||||||
|
title,
|
||||||
|
type,
|
||||||
|
viewAttr: 2
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { isQuery, dateRange } = this.state;
|
const { queryParams, isQuery } = this.state;
|
||||||
|
const { dateRange, zj, pqList, xmList } = queryParams;
|
||||||
return (
|
return (
|
||||||
<SalaryFileReportLayout title={getLabel(111, "调薪档案职级统计报表")} dateRange={dateRange}
|
<SalaryFileReportLayout title={getLabel(111, "调薪档案职级统计报表")} dateRange={dateRange}
|
||||||
onExport={this.handleExport}
|
onExport={this.handleExport}
|
||||||
onChange={v => this.setState({ dateRange: v, isQuery: !isQuery })}>
|
onChange={v => this.setState({
|
||||||
<SalaryFileReport type="txdazjtjReport" dateRange={dateRange} isQuery={isQuery}/>
|
queryParams: { ...queryParams, dateRange: v },
|
||||||
|
isQuery: !isQuery
|
||||||
|
})}>
|
||||||
|
<div className="lingyue-query">
|
||||||
|
<WeaFormItem label={getLabel(111, "片区")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||||
|
<WeaBrowser type={194} value={pqList}
|
||||||
|
onChange={v => this.setState({ queryParams: { ...queryParams, pqList: v }, isQuery: !isQuery })}
|
||||||
|
title={getLabel(111, "片区")} {...this.getBrowserPatams(194, getLabel(111, "片区"))} />
|
||||||
|
</WeaFormItem>
|
||||||
|
<WeaFormItem label={getLabel(111, "项目")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||||
|
<WeaBrowser type={194} value={xmList}
|
||||||
|
onChange={v => this.setState({ queryParams: { ...queryParams, xmList: v }, isQuery: !isQuery })}
|
||||||
|
title={getLabel(111, "项目")} {...this.getBrowserPatams(194, getLabel(111, "项目"))} />
|
||||||
|
</WeaFormItem>
|
||||||
|
<WeaFormItem label={getLabel(111, "职级")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||||
|
<WeaInputSearch value={zj} onChange={v => this.setState({ queryParams: { ...queryParams, zj: v } })}
|
||||||
|
onSearch={() => this.setState({ isQuery: !isQuery })}/>
|
||||||
|
</WeaFormItem>
|
||||||
|
</div>
|
||||||
|
<SalaryFileReport type="txdazjtjReport" queryParams={queryParams} isQuery={isQuery}/>
|
||||||
</SalaryFileReportLayout>
|
</SalaryFileReportLayout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,14 +27,26 @@ class Content extends Component {
|
||||||
this.getSalaryFileReportList();
|
this.getSalaryFileReportList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.isQuery !== this.props.isQuery) this.getSalaryFileReportList(nextProps);
|
||||||
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps, prevState, snapshot) {
|
componentDidUpdate(prevProps, prevState, snapshot) {
|
||||||
if (prevState.showLeft !== this.state.showLeft) this.refs.chart.paint();
|
if (prevState.showLeft !== this.state.showLeft) this.refs.chart.paint();
|
||||||
}
|
}
|
||||||
|
|
||||||
getSalaryFileReportList = () => {
|
getSalaryFileReportList = (props) => {
|
||||||
const { type } = this.props;
|
const { type, queryParams } = props || this.props;
|
||||||
|
const { dateRange, pqList, xmList, zwjsList, ...extra } = queryParams;
|
||||||
|
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
API.getSalaryFileReportList(type).then(({ status, data: result }) => {
|
const payload = {
|
||||||
|
pqList: pqList ? pqList.split(",") : [],
|
||||||
|
xmList: xmList ? xmList.split(",") : [],
|
||||||
|
zwjsList: zwjsList ? zwjsList.split(",") : [],
|
||||||
|
...extra
|
||||||
|
};
|
||||||
|
API.getSalaryFileReportList(type, payload).then(({ status, data: result }) => {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
if (status) {
|
if (status) {
|
||||||
const { data: dataSource, columns, chartsData } = result;
|
const { data: dataSource, columns, chartsData } = result;
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
||||||
import { Button } from "antd";
|
import { Button } from "antd";
|
||||||
|
import "../index.less";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
* @description:
|
* @description:
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
import { WeaBrowser, WeaFormItem, WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
||||||
import * as API from "../../../../../apis/custom-apis/lingyue";
|
import * as API from "../../../../../apis/custom-apis/lingyue";
|
||||||
import SalaryFileReportLayout from "../layout";
|
import SalaryFileReportLayout from "../layout";
|
||||||
import SalaryFileReport from "../content";
|
import SalaryFileReport from "../content";
|
||||||
|
|
@ -16,15 +16,96 @@ import SalaryFileReport from "../content";
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
class Index extends Component {
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
isQuery: false,
|
||||||
|
queryParams: {
|
||||||
|
pqList: "", xmList: "", zwjsList: ""
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
handleExport = async () => {
|
handleExport = async () => {
|
||||||
|
const { queryParams } = this.state;
|
||||||
|
const { pqList, xmList, zwjsList } = queryParams;
|
||||||
WeaLoadingGlobal.start();
|
WeaLoadingGlobal.start();
|
||||||
const promise = await API.exportXcdazwjstjReport({});
|
const payload = {
|
||||||
|
pqList: pqList ? pqList.split(",") : [],
|
||||||
|
xmList: xmList ? xmList.split(",") : [],
|
||||||
|
zwjsList: zwjsList ? zwjsList.split(",") : []
|
||||||
|
};
|
||||||
|
const promise = await API.exportXcdazwjstjReport(payload);
|
||||||
|
};
|
||||||
|
getBrowserPatams = (type, title) => {
|
||||||
|
let custBrowserParams = {};
|
||||||
|
type === 162 && (custBrowserParams = {
|
||||||
|
completeParams: {
|
||||||
|
type: 162,
|
||||||
|
fielddbtype: "browser.b_zwjs"
|
||||||
|
},
|
||||||
|
conditionDataParams: {
|
||||||
|
type: 162,
|
||||||
|
fielddbtype: "browser.b_zwjs"
|
||||||
|
},
|
||||||
|
dataParams: {
|
||||||
|
type: 162,
|
||||||
|
fielddbtype: "browser.b_zwjs"
|
||||||
|
},
|
||||||
|
destDataParams: {
|
||||||
|
type: 162,
|
||||||
|
fielddbtype: "browser.b_zwjs"
|
||||||
|
},
|
||||||
|
isMultCheckbox: true
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
completeParams: {},
|
||||||
|
conditionDataParams: {},
|
||||||
|
dataParams: {},
|
||||||
|
destDataParams: {},
|
||||||
|
hasAddBtn: false,
|
||||||
|
hasAdvanceSerach: false,
|
||||||
|
idSeparator: ",",
|
||||||
|
isAutoComplete: 1,
|
||||||
|
isDetail: 0,
|
||||||
|
isMultCheckbox: false,
|
||||||
|
isSingle: false,
|
||||||
|
icon: "icon-coms-hrm",
|
||||||
|
linkUrl: "",
|
||||||
|
pageSize: 10,
|
||||||
|
quickSearchName: "",
|
||||||
|
title,
|
||||||
|
type,
|
||||||
|
viewAttr: 2,
|
||||||
|
...custBrowserParams
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const { queryParams, isQuery } = this.state;
|
||||||
|
const { zwjsList, pqList, xmList } = queryParams;
|
||||||
return (
|
return (
|
||||||
<SalaryFileReportLayout title={getLabel(111, "薪酬档案职务角色统计报表")} onExport={this.handleExport}>
|
<SalaryFileReportLayout title={getLabel(111, "薪酬档案职务角色统计报表")} onExport={this.handleExport}>
|
||||||
<SalaryFileReport type="xcdazwjstjReport" pieName={getLabel(111, "职务角色")}/>
|
<div className="lingyue-query">
|
||||||
|
<WeaFormItem label={getLabel(111, "片区")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||||
|
<WeaBrowser type={194} value={pqList}
|
||||||
|
onChange={v => this.setState({ queryParams: { ...queryParams, pqList: v }, isQuery: !isQuery })}
|
||||||
|
title={getLabel(111, "片区")} {...this.getBrowserPatams(194, getLabel(111, "片区"))} />
|
||||||
|
</WeaFormItem>
|
||||||
|
<WeaFormItem label={getLabel(111, "项目")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||||
|
<WeaBrowser type={194} value={xmList}
|
||||||
|
onChange={v => this.setState({ queryParams: { ...queryParams, xmList: v }, isQuery: !isQuery })}
|
||||||
|
title={getLabel(111, "项目")} {...this.getBrowserPatams(194, getLabel(111, "项目"))} />
|
||||||
|
</WeaFormItem>
|
||||||
|
<WeaFormItem label={getLabel(111, "职务角色")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||||
|
<WeaBrowser type={194} value={zwjsList}
|
||||||
|
onChange={v => this.setState({ queryParams: { ...queryParams, zwjsList: v }, isQuery: !isQuery })}
|
||||||
|
title={getLabel(111, "职务角色")} {...this.getBrowserPatams(162, getLabel(111, "职务角色"))} />
|
||||||
|
</WeaFormItem>
|
||||||
|
</div>
|
||||||
|
<SalaryFileReport type="xcdazwjstjReport" isQuery={isQuery} queryParams={queryParams}
|
||||||
|
pieName={getLabel(111, "职务角色")}/>
|
||||||
</SalaryFileReportLayout>
|
</SalaryFileReportLayout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
* @description:
|
* @description:
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
import { WeaBrowser, WeaFormItem, WeaInputSearch, WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
||||||
import SalaryFileReportLayout from "../layout";
|
import SalaryFileReportLayout from "../layout";
|
||||||
import SalaryFileReport from "../content";
|
import SalaryFileReport from "../content";
|
||||||
import * as API from "../../../../../apis/custom-apis/lingyue";
|
import * as API from "../../../../../apis/custom-apis/lingyue";
|
||||||
|
|
@ -16,15 +16,70 @@ import * as API from "../../../../../apis/custom-apis/lingyue";
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
class Index extends Component {
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
isQuery: false, queryParams: { pqList: "", xmList: "", zj: "" }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
handleExport = async () => {
|
handleExport = async () => {
|
||||||
|
const { queryParams } = this.state;
|
||||||
|
const { pqList, xmList, ...extra } = queryParams;
|
||||||
WeaLoadingGlobal.start();
|
WeaLoadingGlobal.start();
|
||||||
const promise = await API.exportXcdazjtjReport({});
|
const payload = {
|
||||||
|
pqList: pqList ? pqList.split(",") : [],
|
||||||
|
xmList: xmList ? xmList.split(",") : [],
|
||||||
|
...extra
|
||||||
|
};
|
||||||
|
const promise = await API.exportXcdazjtjReport(payload);
|
||||||
|
};
|
||||||
|
getBrowserPatams = (type, title) => {
|
||||||
|
return {
|
||||||
|
completeParams: {},
|
||||||
|
conditionDataParams: {},
|
||||||
|
dataParams: {},
|
||||||
|
destDataParams: {},
|
||||||
|
hasAddBtn: false,
|
||||||
|
hasAdvanceSerach: false,
|
||||||
|
idSeparator: ",",
|
||||||
|
isAutoComplete: 1,
|
||||||
|
isDetail: 0,
|
||||||
|
isMultCheckbox: false,
|
||||||
|
isSingle: false,
|
||||||
|
icon: "icon-coms-hrm",
|
||||||
|
linkUrl: "",
|
||||||
|
pageSize: 10,
|
||||||
|
quickSearchName: "",
|
||||||
|
title,
|
||||||
|
type,
|
||||||
|
viewAttr: 2
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const { queryParams, isQuery } = this.state;
|
||||||
|
const { zj, pqList, xmList } = queryParams;
|
||||||
return (
|
return (
|
||||||
<SalaryFileReportLayout title={getLabel(111, "薪酬档案职级统计报表")} onExport={this.handleExport}>
|
<SalaryFileReportLayout title={getLabel(111, "薪酬档案职级统计报表")} onExport={this.handleExport}>
|
||||||
<SalaryFileReport type="xcdazjtjReport" pieName={getLabel(111, "职级")}/>
|
<div className="lingyue-query">
|
||||||
|
<WeaFormItem label={getLabel(111, "片区")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||||
|
<WeaBrowser type={194} value={pqList}
|
||||||
|
onChange={v => this.setState({ queryParams: { ...queryParams, pqList: v }, isQuery: !isQuery })}
|
||||||
|
title={getLabel(111, "片区")} {...this.getBrowserPatams(194, getLabel(111, "片区"))} />
|
||||||
|
</WeaFormItem>
|
||||||
|
<WeaFormItem label={getLabel(111, "项目")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||||
|
<WeaBrowser type={194} value={xmList}
|
||||||
|
onChange={v => this.setState({ queryParams: { ...queryParams, xmList: v }, isQuery: !isQuery })}
|
||||||
|
title={getLabel(111, "项目")} {...this.getBrowserPatams(194, getLabel(111, "项目"))} />
|
||||||
|
</WeaFormItem>
|
||||||
|
<WeaFormItem label={getLabel(111, "职级")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||||
|
<WeaInputSearch value={zj} onChange={v => this.setState({ queryParams: { ...queryParams, zj: v } })}
|
||||||
|
onSearch={() => this.setState({ isQuery: !isQuery })}/>
|
||||||
|
</WeaFormItem>
|
||||||
|
</div>
|
||||||
|
<SalaryFileReport type="xcdazjtjReport" isQuery={isQuery} queryParams={queryParams}
|
||||||
|
pieName={getLabel(111, "职级")}/>
|
||||||
</SalaryFileReportLayout>
|
</SalaryFileReportLayout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue