diff --git a/pc4mobx/hrmSalary/apis/custom-apis/huitong/index.js b/pc4mobx/hrmSalary/apis/custom-apis/huitong/index.js index 813d57a5..c1b09e7b 100644 --- a/pc4mobx/hrmSalary/apis/custom-apis/huitong/index.js +++ b/pc4mobx/hrmSalary/apis/custom-apis/huitong/index.js @@ -20,3 +20,11 @@ export const exportXczfsqDataDetail = (params) => { export const getHTCommonListReport = (params) => { return postFetch("/api/bs/hrmsalary/siaccount/detail/htCommonListReport", params); }; +// 汇通建设-社保福利台账报表 +export const getHTCommonListReportSum = (params) => { + return postFetch("/api/bs/hrmsalary/siaccount/detail/htCommonListReportSum", params); +}; +// 汇通建设-社保福利台账报表导出 +export const exportHtCommonList = (params) => { + return postExportFetch("/api/bs/hrmsalary/siaccount/detail/exportHtCommonList", params); +}; diff --git a/pc4mobx/hrmSalary/pages/custom-pages/huitong/dataDetail/index.less b/pc4mobx/hrmSalary/pages/custom-pages/huitong/dataDetail/index.less index 168299fc..0ea2a518 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/huitong/dataDetail/index.less +++ b/pc4mobx/hrmSalary/pages/custom-pages/huitong/dataDetail/index.less @@ -4,7 +4,7 @@ padding: 8px 16px 0 16px; background: #F6F6F6; - .ht_query { + .ht_query, .ht_report_query { display: flex; justify-content: flex-end; background: #FFF; @@ -20,6 +20,14 @@ } } + .ht_report_query { + justify-content: flex-start; + + .wea-search-group { + flex: .2; + } + } + .wea-new-table { background: #FFF; } diff --git a/pc4mobx/hrmSalary/pages/custom-pages/huitong/socialSecurityReport/index.js b/pc4mobx/hrmSalary/pages/custom-pages/huitong/socialSecurityReport/index.js index 92eea359..6af7e7d6 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/huitong/socialSecurityReport/index.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/huitong/socialSecurityReport/index.js @@ -9,7 +9,7 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaLocaleProvider, WeaTop } from "ecCom"; +import { WeaLoadingGlobal, WeaLocaleProvider, WeaTop } from "ecCom"; import { Button, Spin } from "antd"; import { getSearchs } from "../../../../util"; import * as API from "../../../../apis/custom-apis/huitong"; @@ -24,7 +24,7 @@ class Index extends Component { super(props); this.state = { pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, - dataSource: [], columns: [], conditions: [] + dataSource: [], columns: [], conditions: [], sumDataSource: {} }; } @@ -48,7 +48,7 @@ class Index extends Component { const { pageInfo } = this.state; const { type, payload: { id, params } = {} } = data; if (type === "init") { - this.getHTCommonListReport(); + this.getHTCommonListReport(true); } else if (type === "turn") { switch (id) { case "PAGEINFO": @@ -67,35 +67,49 @@ class Index extends Component { const childFrameObj = document.getElementById("unitTable"); childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); }; - getHTCommonListReport = () => { + getHTCommonListReport = (init) => { const { HTStore: { queryForm } } = this.props, { pageInfo } = this.state; const payload = { ...pageInfo, ...queryForm.getFormParams() }; this.setState({ loading: true }); - API.getHTCommonListReport(payload).then(({ status, data }) => { + API.getHTCommonListReport(payload).then(async ({ status, data }) => { this.setState({ loading: false }); if (status) { + const { data: { sumRow } } = init ? await API.getHTCommonListReportSum(payload) : { data: { sumRow: {} } }; const { columns, pageInfo: result } = data; const { list: dataSource, pageNum: current, pageSize, total } = result; this.setState({ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource, + sumDataSource: init ? sumRow : this.state.sumDataSource, columns: _.map(columns, o => ({ title: o.text, dataIndex: o.column, width: o.width, ellipsis: true })) }, () => this.postMessageToChild({ - scrollHeight: 108, dataSource: this.state.dataSource, columns: this.state.columns, - pageInfo: this.state.pageInfo, unitTableType: "999" + scrollHeight: 152, dataSource: this.state.dataSource, columns: this.state.columns, + pageInfo: this.state.pageInfo, unitTableType: "999", showRowSelection: false, + showTotalCell: true, sumDataSource: this.state.sumDataSource })); } }).catch(() => this.setState({ loading: false })); }; handleExport = () => { + const { HTStore: { queryForm } } = this.props; + const payload = { ...queryForm.getFormParams() }; + WeaLoadingGlobal.start(); + const promise = API.exportHtCommonList(payload); }; render() { - const { HTStore: { queryForm } } = this.props, { conditions, pageInfo, loading } = this.state; + const { HTStore: { queryForm } } = this.props, { conditions, pageInfo, loading, dataSource } = this.state; + const dom = document.querySelector(".wea-new-top-content"); + let height = 330; + if (dataSource.length > 0 && dom) { + const tableHeight = dataSource.length * 46 + 162; + const containerHeight = parseFloat(dom.style.height) - 68; + height = containerHeight > tableHeight ? tableHeight : containerHeight; + } return (} showDropIcon={false} iconBgcolor="#F14A2D" buttons={[]}>
-
+
{ getSearchs(queryForm, conditions, 1, false, () => { if (!this.handleDebounce) { @@ -108,7 +122,7 @@ class Index extends Component { }) }
-
+