custom/汇通建设
This commit is contained in:
parent
bd3741b2cf
commit
95c72c9a1d
|
|
@ -20,6 +20,14 @@ export const exportXczfsqDataDetail = (params) => {
|
|||
export const getHTCommonListReport = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/htCommonListReport", params);
|
||||
};
|
||||
// 汇通建设-社保变动台账
|
||||
export const getHTChangeList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/htjs/SIChangeList", params);
|
||||
};
|
||||
// 汇通建设-保险请示数据穿透
|
||||
export const getSBqsDataPerspective = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/htjs/sbqsDataPerspective", params);
|
||||
};
|
||||
// 汇通建设-社保福利台账报表
|
||||
export const getHTCommonListReportSum = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/htCommonListReportSum", params);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* 汇通建设二开
|
||||
* 保险请示数据穿透
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/7/15
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTable, WeaTools, WeaTop } from "ecCom";
|
||||
import * as API from "../../../../apis/custom-apis/huitong";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false,
|
||||
dataSource: [], columns: []
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getSBqsDataPerspective();
|
||||
}
|
||||
|
||||
getSBqsDataPerspective = () => {
|
||||
const { pageInfo } = this.state, { params: { insuranceId, isIncrease } } = this.props;
|
||||
this.setState({ loading: true });
|
||||
API.getSBqsDataPerspective({ ...pageInfo, insuranceId, isIncrease, ...WeaTools.getUrlParams() })
|
||||
.then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { list: dataSource, pageNum: current, pageSize, total, columns } = data;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { current, pageSize, total }, columns
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { dataSource, columns, pageInfo, loading } = this.state;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.getSBqsDataPerspective());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getSBqsDataPerspective());
|
||||
}
|
||||
};
|
||||
const height = !_.isEmpty(columns) ? document.querySelector(".wea-new-top-content").style.height : "500px";
|
||||
return (
|
||||
<WeaTop title={getLabel(111, "保险请示数据穿透")} icon={<i className="icon-coms-fa"/>} showDropIcon={false}
|
||||
iconBgcolor="#F14A2D" className="custom_data_huitong" buttons={[]}>
|
||||
<div className="huitong-body">
|
||||
<WeaTable dataSource={dataSource} columns={columns} loading={loading} bordered pagination={pagination}
|
||||
scroll={{ y: `calc(${height} - 166px)` }}/>
|
||||
</div>
|
||||
</WeaTop>);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
* 汇通建设二开
|
||||
* 社保变动台账
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/7/14
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDatePicker, WeaInputSearch, WeaLocaleProvider, WeaTop } from "ecCom";
|
||||
import { Spin } from "antd";
|
||||
import moment from "moment";
|
||||
import * as API from "../../../../apis/custom-apis/huitong";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class SocialSecurityChangeLedger extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, dataSource: [], columns: [],
|
||||
query: { salaryMonth: moment(new Date()).format("YYYY-MM") }
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
handleReceive = ({ data }) => {
|
||||
const { pageInfo } = this.state;
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
if (type === "init") {
|
||||
this.getHTChangeList();
|
||||
} else if (type === "turn") {
|
||||
switch (id) {
|
||||
case "PAGEINFO":
|
||||
this.setState({ pageInfo: { ...pageInfo, ...params } }, () => this.getHTChangeList());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
postMessageToChild = (payload = {}) => {
|
||||
const i18n = {
|
||||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
"总计": getLabel(523, "总计")
|
||||
};
|
||||
const childFrameObj = document.getElementById("unitTable");
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
getHTChangeList = (updateSum = true) => {
|
||||
const { pageInfo, query } = this.state, payload = { ...pageInfo, ...query };
|
||||
this.setState({ loading: true });
|
||||
API.getHTChangeList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
||||
columns: _.map(_.filter(columns, o => o.dataIndex !== "id"), o => {
|
||||
if (o.dataIndex === "employeeId") {
|
||||
return {
|
||||
title: getLabel(111, "姓名"), dataIndex: "userName",
|
||||
width: o.width || 150, ellipsis: true, fixed: "left"
|
||||
};
|
||||
}
|
||||
return {
|
||||
...o, width: o.width || 150, ellipsis: true, fixed: o.fixed || false
|
||||
};
|
||||
})
|
||||
}, () => {
|
||||
const result = {
|
||||
scrollHeight: 152, dataSource: this.state.dataSource, columns: this.state.columns,
|
||||
pageInfo: this.state.pageInfo, unitTableType: "cusTitle", showRowSelection: false,
|
||||
showTotalCell: false
|
||||
};
|
||||
this.postMessageToChild(result);
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { pageInfo, loading, dataSource, query } = 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) - 8;
|
||||
height = containerHeight > tableHeight ? tableHeight : containerHeight;
|
||||
}
|
||||
return (<WeaTop title={getLabel(111, "社保变动台账")} className="custom_data_huitong"
|
||||
icon={<i className="icon-coms-fa"/>} showDropIcon={false} iconBgcolor="#F14A2D"
|
||||
buttons={[
|
||||
<WeaDatePicker format="YYYY-MM" value={query.salaryMonth} onChange={v => this.setState({
|
||||
query: { ...query, salaryMonth: v }, pageInfo: { ...pageInfo, current: 1 }
|
||||
}, () => this.getHTChangeList())}/>,
|
||||
<WeaInputSearch value={query.userName} style={{ width: 200 }}
|
||||
onChange={v => this.setState({
|
||||
query: { ...query, userName: v }
|
||||
})}
|
||||
onSearch={() => this.setState({
|
||||
pageInfo: { ...pageInfo, current: 1 }
|
||||
}, () => this.getHTChangeList())}/>
|
||||
]}>
|
||||
<div className="huitong-body">
|
||||
<div className="custom_huitong_list" style={{ height }}>
|
||||
<Spin spinning={loading}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/unitTable"
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/unitTable"
|
||||
id="unitTable"
|
||||
/>
|
||||
</Spin>
|
||||
</div>
|
||||
</div>
|
||||
</WeaTop>);
|
||||
}
|
||||
}
|
||||
|
||||
export default SocialSecurityChangeLedger;
|
||||
|
|
@ -2,11 +2,17 @@ import React from "react";
|
|||
import Route from "react-router/lib/Route";
|
||||
import DataDetail from "./huitong/dataDetail";
|
||||
import SocialSecurityReport from "./huitong/socialSecurityReport";
|
||||
import SocialSecurityChangeLedger from "./huitong/socialSecurityChangeLedger";
|
||||
import InsuranceDataPenetration from "./huitong/insuranceData";
|
||||
|
||||
const CustomRoutes = [
|
||||
<Route key="customPage_dataDetail_huitong" path="customPage_dataDetail_huitong/:subcompanyId/:salaryMonth/:type"
|
||||
component={DataDetail}/>,
|
||||
<Route key="socialSecurityReport_huitong" path="socialSecurityReport_huitong" component={SocialSecurityReport}/>
|
||||
<Route key="socialSecurityReport_huitong" path="socialSecurityReport_huitong" component={SocialSecurityReport}/>,
|
||||
<Route key="socialSecurityChangeLedger_huitong" path="socialSecurityChangeLedger_huitong"
|
||||
component={SocialSecurityChangeLedger}/>,
|
||||
<Route key="insuranceDataPenetration_huitong" path="insuranceDataPenetration_huitong/:insuranceId/:isIncrease"
|
||||
component={InsuranceDataPenetration}/>
|
||||
];
|
||||
|
||||
export default CustomRoutes;
|
||||
|
|
|
|||
Loading…
Reference in New Issue