From 2a47ec2cc6961681c1ac84df046d6f38e0cc8604 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 21 Oct 2025 17:04:36 +0800 Subject: [PATCH] =?UTF-8?q?custom/=E4=BA=94=E9=99=A2=E6=9D=AD=E5=B7=9E?= =?UTF-8?q?=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/calculate/calcView/index.less | 3 +- .../components/advanceInputBtn/index.less | 4 +- .../salaryCalcPersonConfirm/index.less | 35 +++++- .../components/salaryDeptSummary/index.js | 83 ++++++++++++++ .../components/salaryEditCalc/condition.js | 22 +++- .../components/salaryEditCalc/index.less | 5 +- .../hrmSalary/pages/calculate/doCalc/index.js | 101 +++++++++++++++--- .../pages/calculate/doCalc/index.less | 4 +- 8 files changed, 233 insertions(+), 24 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryDeptSummary/index.js diff --git a/pc4mobx/hrmSalary/pages/calculate/calcView/index.less b/pc4mobx/hrmSalary/pages/calculate/calcView/index.less index 182d61f0..9034fde1 100644 --- a/pc4mobx/hrmSalary/pages/calculate/calcView/index.less +++ b/pc4mobx/hrmSalary/pages/calculate/calcView/index.less @@ -5,4 +5,5 @@ position: relative; z-index: 0; padding: 8px 16px; -} + display: flex; +} \ No newline at end of file diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/advanceInputBtn/index.less b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/advanceInputBtn/index.less index 683007e9..7c48cac3 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/advanceInputBtn/index.less +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/advanceInputBtn/index.less @@ -2,10 +2,10 @@ display: flex; align-items: center; position: relative; - top: -2.5px; + top: -1.5px!important; .wea-advanced-search { - top: 2px!important; + top: 1px!important; left: -1px; height: 28px; line-height: 1; diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.less b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.less index e912632d..db029922 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.less +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.less @@ -20,6 +20,39 @@ } } +.flatten-advance-layout { + padding: 0; + + .wea-title { + display: flex; + align-items: center; + background: #FFF; + line-height: inherit; + padding: 0 10px 0 0; + } + + .flatten-advance-title { + display: flex; + align-items: center; + + .flatten-advance-form { + flex: 1; + + .wea-search-group { + padding: 0 10px; + + .wea-form-item-wrapper { + display: inline-block !important; + } + } + + .wea-form-cell { + padding: 0; + } + } + } +} + .docalc-baseinfo-layout { padding: 0; @@ -56,4 +89,4 @@ } } -} +} \ No newline at end of file diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryDeptSummary/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryDeptSummary/index.js new file mode 100644 index 00000000..30c142ab --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryDeptSummary/index.js @@ -0,0 +1,83 @@ +/* + * 杭州五院二开 + * 部门汇总表 + * @Author: 黎永顺 + * @Date: 2025/10/20 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import { Spin } from "antd"; +import { postFetch } from "../../../../../util/request"; +import { traverse } from "../salaryEditCalc/editCalcTable"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + showTotalCell: false, loading: false, dataSource: [] + }; + } + + componentDidMount() { + window.addEventListener("message", this.handleReceive, false); + } + + componentWillUnmount() { + window.removeEventListener("message", this.handleReceive, false); + } + + handleReceive = async ({ data }) => { + const { type, payload: { id, params } = {} } = data; + if (type === "init") this.getAcctresultDepartmentList(); + }; + getAcctresultDepartmentList = () => { + const { routeParams: { salaryAcctRecordId } } = this.props; + this.setState({ loading: true }); + const payload = { salaryAcctRecordId }; + postFetch("/api/bs/hrmsalary/salaryacct/acctresult/department/list", payload).then(({ status, data }) => { + this.setState({ loading: false }); + if (status && !_.isEmpty(data)) { + const { columns, list: dataSource } = data; + this.setState({ dataSource }, () => { + this.postMessageToChild({ + dataSource, showTotalCell: false, sumRowlistUrl: "", calcDetail: true, tableScrollHeight: 120, + columns: _.every(traverse(columns, true), (it, idx) => !it.fixed) ? _.map(traverse(columns, true), (it, idx) => ({ + ...it, fixed: idx < 2 ? "left" : false + })) : traverse(columns, true) + }); + }); + } + }).catch(() => this.setState({ loading: false })); + }; + postMessageToChild = (payload = {}) => { + const i18n = { + "共": getLabel(18609, "共"), "条": getLabel(18256, "条"), + "总计": getLabel(523, "总计") + }; + const childFrameObj = document.getElementById("deptTable"); + childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); + }; + + render() { + const { loading, dataSource } = this.state; + + return (
+
+ +