打印审核表

master
suhang_max@163.com 2022-10-21 15:40:07 +08:00
parent 4bbe0d2c7c
commit 25c3eb975b
3 changed files with 214 additions and 32 deletions

View File

@ -0,0 +1,136 @@
#printContainer {
display: none;
position: absolute;
background-color: #fff;
width: 100%;
/*height: 100%;*/
left: 0;
top: 0;
overflow-y: auto;
overflow-x: hidden;
z-index: 999;
font-size: 14px;
}
#printContainer .am-text-lg {
font-size: 16px;
}
#printContainer table {
max-width: 100%;
display: block;
}
#printContainer table input{
width: 100%;
}
#printContainer table tbody {
display: block;
width: 100%;
}
#printContainer table tr {
width: 100%;
table-layout: fixed;
display: table;
/*border-right: 1px solid #ddd;*/
/*border-left: 1px solid #ddd;*/
}
#printContainer table td {
vertical-align: center;
/*border-right: 1px solid #ddd;*/
/*border-left: 1px solid #ddd;*/
}
#printContainer input {
border:0 none;
outline:none;
}
.am-modal.am-modal-prompt.am-modal-active {
transform: translate(-50%, -50%) scale(1);
left: 50%;
top: 50%;
margin-left: 0;
margin-top: 0 !important;
}
select[readonly] option {
display: none;
}
/**
*/
.approve-passed{
position:absolute;
right:10px;
top:10px;
border-radius: 100%;
width: 150px;
height: 150px;
border: 3px dashed green;
color: green;
white-space: nowrap;
display: flex;
align-items: center;
justify-content: center;
transform: rotateZ(20deg);
font-size: 14px;
}
.approve-passed:after {
content:"审核通过";
color: green;
}
/**
*/
#printContainer .approve-topass{
position:absolute;
right:10px;
top:120px;
border-radius: 100%;
width: 150px;
height: 150px;
border: 3px dashed orange;
color: orange;
white-space: nowrap;
display: flex;
align-items: center;
justify-content: center;
transform: rotateZ(20deg);
font-size: 14px;
}
.approve-topass:after {
content:"待审核";
}
/**
*/
.approve-nopass{
position:absolute;
right:10px;
top:10px;
border-radius: 100%;
width: 150px;
height: 150px;
border: 3px dashed red;
color: red;
white-space: nowrap;
display: flex;
align-items: center;
justify-content: center;
transform: rotateZ(20deg);
font-size: 14px;
}
.approve-nopass:after {
content:"审核不通过";
color: red;
}
textarea {
overflow-x: hidden;
overflow-y:hidden;
}
.huanhang {
table-layout:fixed;
word-break:break-all;
}

View File

@ -4,7 +4,7 @@
<@defaultLayout.layout>
<link rel="stylesheet" type="text/css" href="${base}/common/css/time-axis.css">
<style type="text/css">
<style type="text/css" media="all">
/**让所有的模态对话框都居中*/
.am-modal.am-modal-prompt.am-modal-active {
@ -87,7 +87,7 @@
}
input {
width: 600px;
/*width: 600px;*/
border:0 none;
outline:none;
}
@ -102,8 +102,8 @@
}
</style>
<div class="admin-content">
<div id="printContainer"></div>
<div class="admin-content" id="contentContainer">
<div class="admin-content-body">
<div class="am-cf am-padding">
<div style="word-wrap:break-word; word-break:break-all; " class="am-fl am-cf"><strong class="am-text-primary am-text-lg">项目审核</strong> /
@ -143,9 +143,13 @@
<button type="button" class="am-btn am-btn-default" onclick="location.href='${base}/project/estimateMainExport?id=${project.id!}'">
<span class="am-icon-archive"></span> 导出
</button>
<#-- <button type="button" class="am-btn am-btn-default" onclick="printPage('tab1')">-->
<#-- <span class="am-icon-archive"></span> 打印-->
<#-- </button>-->
</div>
</div>
</div>
<!--startprint-->
<div class="am-g am-form-group am-margin-top">
<div class="am-u-sm-4 am-u-md-2 am-text-right"><input readonly style="text-align: right;width: 80px; margin-bottom: 13px;" value="部门名称"/></div>
<div class="am-u-sm-6 am-u-md-6">
@ -399,6 +403,7 @@
</div>
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div>
<!--endprint-->
</div>
<!--验证表单元素validate end-->
</div>
@ -689,7 +694,7 @@
</div>
</div>
</div>
<table class="am-table am-table-bordered am-table-radius table-main am-text-nowrap"
<table class="am-table am-table-bordered am-table-radius table-main"
style="padding:0;"
id="incomeTable">
<tbody>
@ -791,7 +796,7 @@
</div>
</div>
</div>
<table class="am-table am-table-bordered am-table-radius table-main am-text-nowrap"
<table class="am-table am-table-bordered am-table-radius table-main"
style="padding:0;"
id="incomePlanTable">
<tbody>
@ -1261,9 +1266,13 @@
<button type="button" class="am-btn am-btn-default" onclick="location.href='${base}/project/budgetExport?id=${project.id!}'">
<span class="am-icon-archive"></span> 导出
</button>
<button type="button" class="am-btn am-btn-default" onclick="printPage('tab35')">
<span class="am-icon-archive"></span> 打印
</button>
</div>
</div>
</div>
<#if (project.status==5 || project.status==10 || project.status==15) && project.approveStatusBudget == 1>
<div class="approve-topass"></div>
</#if>
@ -1273,8 +1282,9 @@
<#if (project.status==5 || project.status==10 || project.status==15) && project.approveStatusBudget == 3>
<div class="approve-nopass"></div>
</#if>
<!--startprint-->
<span class="am-text-lg">收入</span>
<table class="am-table am-table-bordered am-table-radius table-main am-text-nowrap"
<table class="am-table am-table-bordered am-table-radius table-main"
style="padding:0;">
<tbody>
<tr class="am-text-lg">
@ -1342,7 +1352,7 @@
<span class="am-text-lg">成本</span>
<#-- <span class="am-text-primary"><a style="cursor: pointer" id="cost-detail">采购成本明细表</a></span>
<span class="am-text-primary"><a style="cursor: pointer" id="cost-project-manage-detail">项目管理成本表</a></span>-->
<table class="am-table am-table-bordered am-table-radius table-main am-text-nowrap"
<table class="am-table am-table-bordered am-table-radius table-main"
style="padding:0;">
<tbody>
<tr class="am-text-lg">
@ -1351,7 +1361,7 @@
<td>费用项目</td>
<td>含税金额(元)</td>
<td>不含税金额(元)</td>
<td>税金(元)</td>
<td width="210px">税金(元)</td>
</tr>
<tr>
<td>成本</td>
@ -1363,7 +1373,7 @@
<td><input type="text" class="number" name="costPurchaseDeviceTaxExclude"
value="${Utils.format(budgetBean.costPurchaseDeviceTaxExclude,'0.00')}"
readonly required title="购买设备不含税总额"></td>
<td><input type="text" class="number" name="costPurchaseDeviceTax"
<td width="210px"><input type="text" class="number" name="costPurchaseDeviceTax"
value="${Utils.format(budgetBean.costPurchaseDeviceTax,'0.00')}"
readonly required title="购买设备税金"></td>
</tr>
@ -1377,7 +1387,7 @@
<td><input type="text" class="number" name="costPurchaseBuildTaxExclude"
value="${Utils.format(budgetBean.costPurchaseBuildTaxExclude,'0.00')}"
readonly required title="购买施工不含税总额"></td>
<td><input type="text" class="number" name="costPurchaseBuildTax"
<td width="210px"><input type="text" class="number" name="costPurchaseBuildTax"
value="${Utils.format(budgetBean.costPurchaseBuildTax,'0.00')}"
readonly required title="购买施工税金"></td>
</tr>
@ -1391,7 +1401,7 @@
<td><input type="text" class="number" name="costPurchaseServiceTaxExclude"
value="${Utils.format(budgetBean.costPurchaseServiceTaxExclude,'0.00')}"
readonly required title="购买服务不含税总额"></td>
<td><input type="text" class="number" name="costPurchaseServiceTax"
<td width="210px"><input type="text" class="number" name="costPurchaseServiceTax"
value="${Utils.format(budgetBean.costPurchaseServiceTax,'0.00')}"
readonly required title="购买服务税金"></td>
</tr>
@ -1405,7 +1415,7 @@
<td><input type="text" class="number" name="costPurchaseOtherTaxExclude"
value="${Utils.format(budgetBean.costPurchaseOtherTaxExclude,'0.00')}"
readonly required title="购买其他不含税总额"></td>
<td><input type="text" class="number" name="costPurchaseOtherTax"
<td width="210px"><input type="text" class="number" name="costPurchaseOtherTax"
value="${Utils.format(budgetBean.costPurchaseOtherTax,'0.00')}"
readonly required title="购买其他税金"></td>
</tr>
@ -1419,21 +1429,21 @@
<td><input type="text" class="number" name="costProjectManageTaxExclude"
value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0.00')}"
readonly required title="项目管理成本总额"></td>
<td><input type="text" class="number" name="costProjectManageTax"
<td width="210px"><input type="text" class="number" name="costProjectManageTax"
value="财务计取以不含税方式核算"
readonly required title=""></td>
</tr>
<tr>
<td>成本</td>
<td>其他</td>
<td style="width: 300px" class="huanhang">${project.otherName!}</td>
<td class="huanhang">${project.otherName!}</td>
<td><input type="text" class="number" name="costOtherOtherTaxInclude"
value="${Utils.format(budgetBean.costOtherOtherTaxInclude,'0.00')}"
required readonly title="其他含税总额(填入)"></td>
<td><input type="text" class="number" name="costOtherOtherTaxExclude"
value="${Utils.format(budgetBean.costOtherOtherTaxExclude,'0.00')}"
required readonly title="其他不含税总额(填入)"></td>
<td><input type="text" class="number" name="costOtherOtherTax"
<td width="210px"><input type="text" class="number" name="costOtherOtherTax"
value="${Utils.format(budgetBean.costOtherOtherTax,'0.00')}"
required readonly title="其他税金"></td>
</tr>
@ -1447,7 +1457,7 @@
<td><input type="text" class="number" name="costTotalTaxExclude"
value="${Utils.format(budgetBean.costTotalTaxExclude, '0.00')}"
readonly required title="此列累计"></td>
<td><input type="text" class="number" name="costTotalTax"
<td width="210px"><input type="text" class="number" name="costTotalTax"
value="${Utils.format(budgetBean.costTotalTax, '0.00')}"
readonly required title="此列累计"></td>
</tr>
@ -1456,7 +1466,7 @@
</table>
<span class="am-text-lg">管理</span>
<#--<span class="am-text-primary budget-plan-detail"><a style="cursor: pointer">资金计划表</a></span>-->
<table class="am-table am-table-bordered am-table-radius table-main am-text-nowrap"
<table class="am-table am-table-bordered am-table-radius table-main"
style="padding:0;">
<tbody>
<tr class="am-text-lg">
@ -1483,7 +1493,7 @@
</table>
<span class="am-text-lg">利润率计算</span>
<table class="am-table am-table-bordered am-table-radius table-main am-text-nowrap"
<table class="am-table am-table-bordered am-table-radius table-main"
style="padding:0;">
<tbody>
<tr class="am-text-lg">
@ -1512,9 +1522,9 @@
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr>
<td width="30%">类别</td>
<td width="40%">金额(元)</td>
<td width="30%">计算方式</td>
<td>类别</td>
<td>金额(元)</td>
<td>计算方式</td>
</tr>
<tr>
<td>销售商品、提供劳务收到的现金<#--a--></td>
@ -1588,6 +1598,7 @@
</tr>
</tbody>
</table>
<!--endprint-->
</div>
</div>
</div>
@ -1621,11 +1632,14 @@
<button type="button" class="am-btn am-btn-default" onclick="location.href='${base}/project/settleExport?id=${project.id!}&time=${time!}'">
<span class="am-icon-archive"></span> 导出
</button>
<button type="button" class="am-btn am-btn-default">
<span class="am-icon-archive"></span> 打印
</button>
</div>
</div>
</div>
<span class="am-text-lg">收入</span>
<table class="am-table am-table-bordered am-table-radius table-main am-text-nowrap" style="padding:0;">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-lg">
<td>类别</td>
@ -1675,7 +1689,7 @@
</tbody>
</table>
<span class="am-text-lg">成本</span>
<table class="am-table am-table-bordered am-table-radius table-main am-text-nowrap" style="padding:0;">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-lg">
<td>类别</td>
@ -1760,7 +1774,7 @@
</tbody>
</table>
<span class="am-text-lg">管理</span>
<table class="am-table am-table-bordered am-table-radius table-main am-text-nowrap" style="padding:0;">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-lg">
<td>类别</td>
@ -1811,7 +1825,7 @@
</table>
<span class="am-text-lg">利润率计算</span>
<table class="am-table am-table-bordered am-table-radius table-main am-text-nowrap" style="padding:0;">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-lg">
<td>类别</td>
@ -1853,7 +1867,7 @@
</table>
<span class="am-text-lg">结算现金流量表</span>
<table class="am-table am-table-bordered am-table-radius table-main am-text-nowrap" style="padding:0;">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-lg">
<td>类别</td>
@ -1997,7 +2011,7 @@
</div>
</div>
<span class="am-text-lg">收入</span>
<table class="am-table am-table-bordered am-table-radius table-main am-text-nowrap" style="padding:0;">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-lg">
<td>类别</td>
@ -2042,7 +2056,7 @@
</tbody>
</table>
<span class="am-text-lg">成本</span>
<table class="am-table am-table-bordered am-table-radius table-main am-text-nowrap" style="padding:0;">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-lg">
<td>类别</td>
@ -2119,7 +2133,7 @@
</tbody>
</table>
<span class="am-text-lg">管理</span>
<table class="am-table am-table-bordered am-table-radius table-main am-text-nowrap" style="padding:0;">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-lg">
<td>类别</td>
@ -2165,7 +2179,7 @@
</table>
<span class="am-text-lg">利润率计算</span>
<table class="am-table am-table-bordered am-table-radius table-main am-text-nowrap" style="padding:0;">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-lg">
<td>类别</td>
@ -2203,7 +2217,7 @@
</table>
<span class="am-text-lg">决算现金流量表</span>
<table class="am-table am-table-bordered am-table-radius table-main am-text-nowrap" style="padding:0;">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-lg">
<td>类别</td>
@ -2954,7 +2968,38 @@
</@defaultLayout.layout>
<script>
// 打印
var printPage = function(id) {
try {
if ($('#' + id) && $('#' + id)[0]) {
// 需要打印的页面html
var targethtml = $('#' + id)[0].innerHTML;
// 打印标签内的内容
var sprintstr = '<!--startprint-->'; // 开始位置
var eprintstr = '<!--endprint-->'; // 结束位置
// 截取标签内的内容
var printhtml = targethtml.substr(targethtml.indexOf(sprintstr) + 17);
printhtml = printhtml.substring(0, printhtml.indexOf(eprintstr));
// 获取当前页面全部的innerHTML
var bodyhtml = document.body.innerHTML;
$('#printContainer').show();
$('#printContainer')[0].innerHTML = printhtml;
$('#contentContainer').hide();
// document.body.innerHTML = $('#printContainer')[0].outerHTML;
document.body.style.height = $('#printContainer')[0].clientHeight * 1.5 + 'px';
window.print();
// document.body.innerHTML = bodyhtml;
document.body.style.height = '100%';
$('#printContainer').hide();
$('#contentContainer').show();
}
} catch(e) {
console.log(e);
alert("浏览器不支持打印功能,请切换支持该功能的浏览器");
}
}
var back = function () {
var pageNumber = $("#pageNumber").val();
var keywords = $("#keywords").val();

View File

@ -11,6 +11,7 @@
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta name="apple-mobile-web-app-title" content="项目四算管理系统" />
<link rel="stylesheet" href="${base}/common/css/print.css" type="text/css">
<#include "import.ftl"/>
</head>
<body>