From 95c72c9a1dd0e3ed717303c82cf8c942d86d594c Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 15 Jul 2025 16:21:45 +0800 Subject: [PATCH] =?UTF-8?q?custom/=E6=B1=87=E9=80=9A=E5=BB=BA=E8=AE=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apis/custom-apis/huitong/index.js | 8 ++ .../huitong/insuranceData/index.js | 72 ++++++++++ .../socialSecurityChangeLedger/index.js | 129 ++++++++++++++++++ pc4mobx/hrmSalary/pages/custom-pages/index.js | 8 +- 4 files changed, 216 insertions(+), 1 deletion(-) create mode 100644 pc4mobx/hrmSalary/pages/custom-pages/huitong/insuranceData/index.js create mode 100644 pc4mobx/hrmSalary/pages/custom-pages/huitong/socialSecurityChangeLedger/index.js diff --git a/pc4mobx/hrmSalary/apis/custom-apis/huitong/index.js b/pc4mobx/hrmSalary/apis/custom-apis/huitong/index.js index c1b09e7b..a909593d 100644 --- a/pc4mobx/hrmSalary/apis/custom-apis/huitong/index.js +++ b/pc4mobx/hrmSalary/apis/custom-apis/huitong/index.js @@ -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); diff --git a/pc4mobx/hrmSalary/pages/custom-pages/huitong/insuranceData/index.js b/pc4mobx/hrmSalary/pages/custom-pages/huitong/insuranceData/index.js new file mode 100644 index 00000000..30b2cf1d --- /dev/null +++ b/pc4mobx/hrmSalary/pages/custom-pages/huitong/insuranceData/index.js @@ -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 ( + } showDropIcon={false} + iconBgcolor="#F14A2D" className="custom_data_huitong" buttons={[]}> +
+ +
+
); + } +} + +export default Index; + diff --git a/pc4mobx/hrmSalary/pages/custom-pages/huitong/socialSecurityChangeLedger/index.js b/pc4mobx/hrmSalary/pages/custom-pages/huitong/socialSecurityChangeLedger/index.js new file mode 100644 index 00000000..680ee577 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/custom-pages/huitong/socialSecurityChangeLedger/index.js @@ -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 (} showDropIcon={false} iconBgcolor="#F14A2D" + buttons={[ + this.setState({ + query: { ...query, salaryMonth: v }, pageInfo: { ...pageInfo, current: 1 } + }, () => this.getHTChangeList())}/>, + this.setState({ + query: { ...query, userName: v } + })} + onSearch={() => this.setState({ + pageInfo: { ...pageInfo, current: 1 } + }, () => this.getHTChangeList())}/> + ]}> +
+
+ +