From 6541a2f26db54aad685de1f94d0fe3db8f68aef7 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 30 Jul 2025 16:37:51 +0800 Subject: [PATCH] =?UTF-8?q?custom/=E5=B8=B8=E5=B7=9E=E5=85=89=E9=98=B3?= =?UTF-8?q?=E6=91=A9=E6=89=98=E8=BD=A6=E6=9C=89=E9=99=90=E5=85=AC=E5=8F=B8?= =?UTF-8?q?-=E8=81=9A=E6=89=8D=E6=9E=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/custom-pages/guangyang/index.less | 40 ++++++-- .../guangyang/printReport/index.js | 97 ++++++++++++------- 2 files changed, 94 insertions(+), 43 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/custom-pages/guangyang/index.less b/pc4mobx/hrmSalary/pages/custom-pages/guangyang/index.less index 51891fff..c22d25ce 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/guangyang/index.less +++ b/pc4mobx/hrmSalary/pages/custom-pages/guangyang/index.less @@ -90,27 +90,19 @@ font-size: 9pt; word-wrap: break-word; word-break: break-word; - min-width: 60px; } } } tbody { tr { - td:first-child { - padding-left: 0 !important; - } - td { height: 35px; border: 1px solid #d9d9d9; - text-align: left; + text-align: center; font-size: 9pt; - width: 100px; word-wrap: break-word; word-break: break-word; - padding-left: 5px; - min-width: 60px; } } } @@ -132,10 +124,40 @@ @media print { body { height: auto !important; + overflow-x: auto; + } + + .print-summary-salary-detail-container { + table { + thead { + tr { + th { + height: inherit !important; + } + } + } + + tbody { + tr { + td { + height: inherit !important; + } + } + } + } } table { page-break-inside: auto; + width: 100%; + + thead { + tr { + th { + text-align: center; + } + } + } } tr { diff --git a/pc4mobx/hrmSalary/pages/custom-pages/guangyang/printReport/index.js b/pc4mobx/hrmSalary/pages/custom-pages/guangyang/printReport/index.js index 1de80b2a..5f51740f 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/guangyang/printReport/index.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/guangyang/printReport/index.js @@ -9,6 +9,7 @@ */ import React, { Component } from "react"; import { WeaLocaleProvider, WeaTools } from "ecCom"; +import cs from "classnames"; import moment from "moment"; import * as API from "../api"; import "../index.less"; @@ -49,7 +50,7 @@ class Index extends Component { getList[type](payload).then(({ status, data }) => { if (status) { const { column: columns, data: dataSource } = data; - this.setState({ columns, dataSource, userInfo }); + this.setState({ columns: _.filter(columns, o => o.column !== "workcode"), dataSource, userInfo }); } }); } @@ -65,39 +66,67 @@ class Index extends Component { render() { const { columns, dataSource, userInfo } = this.state, { salaryMonth, type } = WeaTools.getUrlParams(); - return (
- - - {type === "summary" && - - } - - - {_.map(columns, col => ())} - - - - {_.map(dataSource, (item, index) => ( - - {_.map(columns, col => ())} - ))} - - - - - - -
- {`常州光阳摩托车有限公司${moment(salaryMonth).format('YYYY年MM月')}发放工资汇总`} -
{getLabel(111, "序号")}{col.text}
{index + 1}{item[col.column]}
-
-

{getLabel(111, "总经理:")}

-

{getLabel(111, "副总经理:")}

-

{getLabel(111, "管理中心:")}

-

{getLabel(111, "制表人:")}{userInfo.username}

-
-
-
); + return ( +
+ + + + { + _.map(columns, o => { + let width = 60; + switch (o.column) { + case "userName": + width = 110; + break; + case "gfr": + width = 70; + break; + default: + break; + } + return ; + }) + } + + + {type === "actual" && + + } + {type === "summary" && + + } + + + {_.map(columns, col => ())} + + + + {_.map(dataSource, (item, index) => ( + + {_.map(columns, col => ())} + ))} + + + + + + +
+ {`常州光阳摩托车有限公司${moment(salaryMonth).subtract(1, "month").format("YYYY年MM月")}发放工资明细`} +
+ {`常州光阳摩托车有限公司${moment(salaryMonth).subtract(1, "month").format("YYYY年MM月")}发放工资汇总`} +
{getLabel(111, "序号")} + {col.text}
{index + 1} + {item[col.column]}
+
+

{getLabel(111, "总经理:")}

+

{getLabel(111, "副总经理:")}

+

{getLabel(111, "管理中心:")}

+

{getLabel(111, "制表人:")}{userInfo.username}

+
+
+
); } }