行高调整

This commit is contained in:
Ledo 2025-09-04 10:47:46 +08:00
parent e4d80d0c06
commit 91f88b8eb9

View File

@ -19,7 +19,7 @@
</td>
</tr>
</tbody>
<tbody>
<tbody class="masterClass">
<tr>
<td colspan="2" style="font-size: 16px"> 客户名称 </td>
<td colspan="5">
@ -30,7 +30,8 @@
<td style="font-size: 16px">{{ formData.customer.code }} </td>
</tr>
</tbody>
<tr>
<tbody class="masterClass">
<tr>
<td colspan="2" style="font-size: 16px"> 项目名称 </td>
<td colspan="6" style="font-size: 16px">
{{ formData.projectName }}
@ -49,26 +50,26 @@
<td colspan="1"> 是否有价格 </td>
<td colspan="1">{{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, formData.hasPrice) }} </td>
</tr>
<tr>
<tr class="masterClass">
<td colspan="2" style="font-size: 16px"> 项目负责人: </td>
<td colspan="2">{{ userInit.find((user) => user.id == planData.projectOwner)?.nickname }} </td>
<td colspan="2" class="masterClass">{{ userInit.find((user) => user.id == planData.projectOwner)?.nickname }} </td>
<td colspan="1">
<!-- <div style="width: 100%; display: flex; justify-content: center; font-size: 12px"> -->
<div>
<div style="border-bottom: 1px solid #333; padding: 0 5px; height: 50%">类别</div>
<div style="padding: 0 5px; height: 50%">性质</div>
<div style="border-bottom: 1px solid #333; padding: 0 5px; height: 30%">类别</div>
<div style="padding: 0 5px; height: 30%">性质</div>
</div>
</td>
<td colspan="1">
<!-- <div style="border: 1px solid #333"> -->
<div style="border-bottom: 1px solid #333; padding: 0 5px; height: 50%">{{ getDictLabel(DICT_TYPE.HELI_BUSINESS_LINE, formData.businessLine) }}</div>
<div style="padding: 0 5px; height: 50%">{{ getDictLabel(DICT_TYPE.HELI_PROJECT_PROPERTY, formData.property) }}</div>
<div style="border-bottom: 1px solid #333; padding: 0 5px; height: 30%">{{ getDictLabel(DICT_TYPE.HELI_BUSINESS_LINE, formData.businessLine) }}</div>
<div style="padding: 0 5px; height: 30%">{{ getDictLabel(DICT_TYPE.HELI_PROJECT_PROPERTY, formData.property) }}</div>
<!-- </div> -->
<!-- </div> -->
</td>
<td colspan="4">
<td colspan="4" >
<div style="display: flex; justify-content: space-between">
<div style="width: 100%; font-size: 10px; display: flex; flex-direction: column">
<div style="width: 100%; font-size: 12px; display: flex; flex-direction: column">
<div style="text-align: left; width: 100; margin-left: 10px">自客户提供资料</div>
<div id="fruitForm" style="display: flex; justify-content: flex-start; align-items: center">
<span class="checkbox" v-if="formData.hasContract == 0"></span>
@ -106,6 +107,8 @@
<td colspan="2">{{ userInit.find((user) => user.id == planData.craftOwner)?.nickname }}</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="10">
@ -481,63 +484,66 @@ const onPrint = () => {
let doc: any = null
doc = newIframe.contentWindow.document
doc.write(`
<style type="text/css">
<style type="text/css">
/* 浏览器打印基本样式 */
.page {
width: 21cm;
min-height: 29.7cm;
padding: 10mm;
margin: 20px auto;
border: 1px #d3d3d3 solid;
border-radius: 5px;
background: white;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
position: relative;
font-size: 10px !important;
}
.page {
width: 21cm;
min-height: 29.7cm;
padding: 10mm;
margin: 20px auto;
border: 1px #d3d3d3 solid;
border-radius: 5px;
background: white;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
position: relative;
font-size: 12px !important;
}
@page {
size: A4;
margin:1cm;
}
@media print {
.page {
margin: 10mm;
border: initial;
border-radius: initial;
width: initial;
min-height: initial;
box-shadow: initial;
background: initial;
page-break-after: always;
}
}
table {
width: 100%; /* 让表格宽度100%占满其父元素宽度 */
height: auto; /* 高度根据内容自适应 */
font-size: 10px;
text-align: center;
border-collapse: collapse;
margin-top: 5mm; /* 添加顶部外边距,替代原先的页内边距 */
tr{
td {
padding: 5px 0;
border: 1px solid #333;
}
}
}
.xh {
width: 50px !important;
}
.checkbox {
border: 2px solid #999;
width: 10px;
height: 10px;
display: flex;
justify-content: center;
align-items: center;
margin-left:10px ;
}
@page {
size: A4;
margin:1cm;
}
@media print {
.page {
margin: 10mm;
border: initial;
border-radius: initial;
width: initial;
min-height: initial;
box-shadow: initial;
background: initial;
page-break-after: always;
}
}
table {
width: 100%; /* 让表格宽度100%占满其父元素宽度 */
height: auto; /* 高度根据内容自适应 */
font-size: 12px;
text-align: center;
border-collapse: collapse;
margin-top: 5mm; /* 添加顶部外边距,替代原先的页内边距 */
tr{
td {
padding: 5px 0;
border: 1px solid #333;
}
}
}
.masterClass {
height: 15px;
}
.xh {
width: 50px !important;
}
.checkbox {
border: 2px solid #999;
width: 10px;
height: 10px;
display: flex;
justify-content: center;
align-items: center;
margin-left:10px ;
}
</style>
<div>
${printNode.innerHTML}
@ -839,6 +845,9 @@ table {
align-items: center;
margin-left: 10px;
}
.masterClass {
height: 15px;
}
/*
A4的大小21cm*29.7cmwidth:794px;
单位换算1 inch = 2.54 cm 1mm = 96 px 1 cm = 37.79528 px*/