<%@ page contentType="text/html;charset=UTF-8"%>
|
<%@page import="com.northglass.Globel.mes"%>
|
<%@page import="com.northglass.SqlHelper.*"%>
|
<%@page import="org.json.*"%>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
<c:set var="ctx" value="${pageContext.request.contextPath}" />
|
<html>
|
<head>
|
<script src="${ctx}/static/jquery/jquery-3.1.0.min.js" type="text/javascript"></script>
|
<style>
|
*{
|
margin:0px;
|
padding:0px;
|
|
}
|
body,html { width: 100%; height: 100%;}
|
|
#big {
|
width: 1050px;
|
/* margin: 15px auto; */
|
font-size: 12px;
|
}
|
.big{
|
display:line-block;
|
word-break: break-all;
|
page-break-after: right;
|
}
|
|
h1 {
|
margin-left:405px;
|
height: 25px;
|
line-height: 25px;
|
}
|
|
#top {
|
font-size: 12px;
|
width: 100%;
|
height: 30px;
|
line-height: 30px;
|
}
|
|
#tab {
|
width: 100%;
|
border-collapse: collapse;
|
font-size: 12px;
|
text-align: center;
|
}
|
#tab:child() tr td{
|
height:25px;
|
max-height:25px;
|
}
|
.tab {
|
|
word-break: break-all;
|
width: 100%;
|
border-collapse: collapse;
|
font-size: 12px;
|
text-align: center;
|
/* page-break-before: always; */
|
}
|
/* #tab tr td .tab tr td{
|
height:32px;
|
} */
|
.bj{
|
float:right;
|
font-size:25px;
|
font-weight: bold;
|
}
|
.tfxh{
|
float:left;
|
font-size:25px;
|
font-weight: bold;
|
}
|
.gylck{
|
float:center;
|
font-size:25px;
|
font-weight: bold;
|
}
|
.gongsi{
|
font-size:25px;
|
font-weight: bold;
|
margin-left:50px;
|
}
|
.tfxh1{
|
font-size:25px;
|
font-weight: bold;
|
position: relative;
|
top:0px;
|
height:0px;
|
left:275px;
|
}
|
.tfxh2{
|
font-size:25px;
|
font-weight: bold;
|
position: relative;
|
}
|
.qr{
|
display:flex;
|
border:none;
|
|
}
|
img{
|
width:60px;
|
height:60px;
|
line-height:60px;
|
}
|
.ma{
|
margin-top:20px;
|
}
|
table { page-break-inside:auto; }
|
tr { page-break-inside:avoid; }
|
td { page-break-inside:avoid; }
|
thead { display:table-header-group; }
|
tfoot { display:table-footer-group; }
|
|
|
|
.gycs{
|
font-size:13.5px;
|
margin-left:0px;
|
font-weight: bold;
|
}
|
.gycs,.cu{
|
font-weight: bold;
|
}
|
#top-size tr{
|
width: 1050px;
|
}
|
#top-size{
|
display:flex;
|
justify-content: space-between;
|
heigth:30px;
|
font-size:20px;
|
font-weight: bold;
|
}
|
|
.sclck{
|
font-size: 20px;
|
margin-left: 260px;
|
}
|
.ziti{
|
font-size: 20px;
|
font-weight: bold;
|
}
|
.ziti1{
|
font-weight: bold;
|
}
|
|
#top-lck{
|
font-size:17px;
|
}
|
.tab_th{
|
font-size:18px;
|
font-weight: bold;
|
}
|
.tab_td{
|
font-size:18px;
|
font-weight: bold;
|
}
|
.tab_zhong{
|
font-size:20px;
|
font-weight: bold;
|
}
|
.tab_zhong1{
|
font-size:10px;
|
font-weight: bold;
|
}
|
.tab_xia1{
|
font-size:20px;
|
font-weight: bold;
|
}
|
.tab_xia2{
|
font-size:18px;
|
font-weight: bold;
|
heigth:120px;
|
}
|
.tab_xia3{
|
font-size:15px;
|
}
|
/* #qrcode1{
|
position:absolute;
|
top:100px;
|
} */
|
body{
|
font-size:10px;
|
border-collapse: red;
|
}
|
.cp{
|
font-weight: bold;
|
}
|
.fuhao{
|
font-size:23px;
|
}
|
/* #tab thead tr:first-child td:first-child{
|
border-top: 0px solid black;
|
border-left: 0px solid black;
|
border-right: 0px solid black;
|
}
|
|
#tab thead tr:first-child {
|
border-top: 0px solid black;
|
border-left: 0px solid black;
|
border-right: 0px solid black;
|
}
|
|
#tab{
|
border-top: 0px solid black;
|
border-left: 0px solid black;
|
border-right: 0px solid black;
|
} */
|
</style>
|
</head>
|
<body>
|
<div class='shu' style='height:0px;'></div><div id='big' class='big'>
|
<div id='content'>
|
<table id='tab' border='1'>
|
<thead>
|
<tr><td style='border:none;' colspan='22' style='height:100px;'>
|
<div style="display:grid;grid-template-columns:33% 33% 33%">
|
<span class='tfxh' style="margin:auto auto auto 0px">D22080122.2.001</span>
|
<span class='gongsi' style="margin:auto">望美实业集团有限公司</span>
|
<span class='bj' style="margin:auto 0px auto auto"><label style='display:none;'>2</label>
|
<span>
|
<label style='display:none' class='lck' for=''>NG22081512A01</label>
|
<label class='liuchengka' for='' id="id_liuchengka">NG22081512A01</label>/2</span>
|
<span style='display:none' class='bu'>补</span></span>
|
</div>
|
<div style='display:grid;grid-template-columns:33% 33% 33%'>
|
<span class='tfxh2' style="margin:auto auto auto 0px">1000181839</span>
|
<span class='gylck' style="margin:auto auto auto a">工艺流程卡</span>
|
<span class='tfxh2' style="margin:auto 0px auto auto"></span>
|
</div>
|
<div id='top-size'>
|
<span id="id_jiaoshen">中空胶深={5}</span>
|
<span id="id_baozhuang">包装={部分木箱}</span>
|
</div>
|
</td>
|
</tr>
|
<tr style='height:50px;'>
|
<td class='cu tab_th' style='min-width:149px;font-size:18px;' >项目名称:</td>
|
<td class='cu tab_td' style='min-width:249px;' colspan='3'style='word-wrap: break-word;' id="id_xiangmumingcheng">青园小区62-1-301</td>
|
<td class='cu tab_th' style='min-width:149px;'>工艺流程:</td><td class='cu tab_td' style='min-width:500px;' colspan='9' id="id_gongyiliucheng">切片->磨边->钢化->中空->包装</td></tr><tr style='height:50px;'>
|
<td class='cu tab_th'>单片名称:</td><td class='cu tab_td' colspan='3' style='word-wrap: break-word;' ><span class='dpmc'>5C(T)</span><span style='display:none' class='dphd'>5</span></td><td class='cu tab_th'>成品名称:</td>
|
<td class='chengpinmingcheng cu tab_td' colspan='9' style='word-wrap: break-word;' id="id_chengpinmingcheng">5SL181(T)+12A+5C(T)</td>
|
</tr>
|
<tr>
|
<td colspan='12'>
|
<table border='1' style='border-collapse: collapse;' frame=below>
|
<tr><td rowspan='2' class='ziti' style='min-width:59.5px;'>序号</td><td rowspan='2' class='ziti' style='min-width:120px;'>编号</td><td rowspan='2' class='ziti' style='min-width:163px;'>宽*高</td><td rowspan='2' class='ziti' style='min-width:53.5px;'>数量</td><td rowspan='2' class='ziti' style='min-width:58.5px;'>面积</td><td rowspan='2' class='ziti' style='min-width:47px;'>异形</td><td rowspan='2' class='ziti' style='min-width:47px;'>异片</td><td rowspan='2' class='ziti' style='min-width:47px;'>打孔</td><td rowspan='2' class='ziti' style='min-width:47px;'>挖缺</td><td class='ziti1' style='min-width:66.5px' colspan='2'>切割</td><td class='ziti1' style='min-width:66.5px' colspan='2'>磨边</td><td class='ziti1' style='min-width:66.5px' colspan='2'>钢化</td><td class='ziti1' style='min-width:66.5px' colspan='2'>夹层</td><td class='ziti1' style='min-width:66.5px' colspan='2'>中空</td><td class='ziti1' style='min-width:66.5px' colspan='2'>包装</td></tr><tr class='ziti1'><td>正品</td><td>次品</td><td>正品</td><td>次品</td><td>正品</td><td>次品</td><td>正品</td><td>次品</td><td>正品</td><td>次品</td><td>正品</td><td>次品</td></tr></table></td></tr></thead><tr><td colspan='22'>
|
<table class='tab' border='1' frame=below >
|
<tbody id="id_tbody">
|
|
</tbody>
|
</table>
|
</td></tr><tfoot><tr style='height: 80px;line-height: 60px;'><td colspan='22'>总片数:<label class=' tab_xia1' for='' id="id_zongpianshu">4片</label> 总箱数:<label class=' tab_xia1' for=''></label> 数量:<label class='zsl tab_xia1' for=''></label> 重量:<label class='zzl tab_xia1' for=''></label> 周长:<label class='zzc tab_xia1' for=''></label> 面积:<label class='zmj tab_xia1' for=''></label></td></tr><tr class='tab_xia3'><td id='tab_wbk' style='word-wrap: break-word;' colspan='5' rowspan='5'><textarea style='width:530px; height:250px; border: 0px;font-size:18px;'>成品标签要求:1、要求注明:①客户名称及工程名称 ②产品结构及规格尺寸 ③玻璃编号内容;门窗玻璃中每片玻璃均打标;玻璃logo标为:雪花标logo+3C+数字编码,玻璃安装在门窗产品中从室内面看logo标位于玻璃的右下角25mm*25mm处;标签贴于室内面;镀膜面见附图;按门窗车间所出示的质量标准生产。
|
</textarea></td><td width='100px' class='tab_xia2' style='height:50px;'>完工签名</td><td width='66px;'></td><td width='66px;'></td><td width='66px;'></td><td width='66px;'></td><td width='66px;'></td><td width='66px;'></td></tr><tr class='tab_xia3'><td class='tab_xia2' style='height:50px;'>接收签名</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr class='tab_xia3'><td class='tab_xia2' style='height:50px;'>生产日期</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr class='tab_xia3'><td class='tab_xia2' style='height:50px;'>质检签名</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr class='tab_xia3'><td class='tab_xia2' style='height:50px;'>架子编号</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr height='65px'><td colspan='12'><span style='text-align:center;' id='qrcode1' class='qr'><label style='font-size:40px;margin-left:45%'></label></span></td></tr><tr ><td colspan='18'><div style='margin-right:0px;font-size:15px;'>打印人: <span class='xingming' id="id_xingming"></span> <span class='sj'><span></div><div style='float:right;position: relative;right: 10px;'></div></td></tr></tfoot></table></div></div>
|
|
<!-- out.print("<div id='qrcode"+i+"' class='qr' style='position: relative;left: 120px; width: 120px;height: 18px;'>");
|
|
out.print("</div>"); -->
|
<script>
|
<%
|
DBSession sn=null;
|
try{
|
|
Long id= Long.parseLong(request.getParameter("id"));
|
JSONObject obj=null;
|
if(id!=null && id!=0){
|
sn=mes.getMesDBHelper().createSession(false);
|
sn.createStdCall("print_printdata",1);
|
DBSession.StdCallResult ret= sn.stdCall(id);
|
if("ok".equals(ret.ResultMessage)){
|
org.json.JSONArray arr1=ret.resultToJson(true);
|
ret.nextResult();
|
org.json.JSONArray arr2=ret.resultToJson(false);
|
|
|
if(arr1.length()>0){
|
obj=arr1.getJSONObject(0);
|
obj.put("items",arr2);
|
}
|
}
|
sn.close();
|
}
|
if(obj!=null){
|
out.print("var d=");
|
out.print(obj.toString());
|
}
|
}
|
catch(Exception e){
|
|
}
|
%>
|
|
|
/*
|
var d={
|
liuchengkahao:'NG123456789/1-1J',
|
|
gongyi:'切片->磨边->钢化->中空->包装1111',
|
mingcheng:'5SL181(T)+12A+5C(T)1111',
|
type:'夹层',
|
baozhuang:'{部分木箱}',
|
biao:'CCC+logo',
|
xiangmu:"adasdasdas",
|
zhongkong:'{5}',
|
items:[
|
[1,'addef',449,2278,5,1],
|
[1,'ake',449,2278,5,1],
|
[1,'awq',449,2278,5,1],
|
[1,'ad',449,2278,5,1]
|
],
|
username:"adddd"
|
};*/
|
|
function setValue(id,value){
|
var doc= document.getElementById(id);
|
if(doc==null)
|
alert(id+" 不存在");
|
else
|
doc.innerText=value;
|
}
|
|
function make(data){
|
var data=d;
|
setValue("id_liuchengka",data.liuchengkahao);
|
setValue("id_xiangmumingcheng",data.xiangmu);
|
setValue("id_chengpinmingcheng",data.mingcheng);
|
setValue("id_gongyiliucheng",data.gongyi);
|
setValue("id_baozhuang","包装=1"+data.baozhuang);
|
setValue("id_jiaoshen",data.zhongkong);
|
setValue("id_zongpianshu",data.items.length+"片");
|
//setValue("id_xingming",data.username);
|
var tab=document.getElementById("id_tbody");
|
var htm="";
|
|
var tds=[];
|
|
for(var i=0;i<data.items.length;i++){
|
var itm=data.items[i];
|
var ok=false;
|
for(var j=0;j<tds.length;j++){
|
var its=tds[j];
|
if(its[0]==itm[0] && its[1]==itm[1]){
|
its[2]++;
|
its[3]+=itm[0]*itm[1]/1000.0/1000.0;
|
ok=true;
|
break;
|
}
|
}
|
if(ok==false){
|
var its=[itm[0],itm[1],1,itm[0]*itm[1]/1000.0/1000.0];
|
tds.push(its);
|
}
|
}
|
|
for(var i=0;i<tds.length;i++){
|
|
htm+=`
|
<tr class='tr' style='height:20px;'>
|
<td style='min-width:59.5px;height:30' class='tab_td1 tab_zhong'>2</td>
|
<td style='min-width:120px;overflow:hidden;' class='tab_td2 tab_zhong1'>C01-1装箱</td>
|
<td style='min-width:163px' class='kg tab_zhong'><span class='kuan'>449</span>*<span class='gao'>2278</span></td>
|
<td style='min-width:53.5px;' class='sl tab_zhong'>1</td><td style='min-width:58.5px;' class='mj tab_zhong'>1.02</td>
|
<td style='min-width:47px;;'></td><td style='min-width:47px;;'></td><td style='min-width:47px;;'></td>
|
<td style='min-width:47px;;'></td><td style='min-width:32.5px;'></td><td style='min-width:32.5px;'></td>
|
<td style='min-width:32.5px;'></td><td style='min-width:32.5px;'></td><td style='min-width:32.5px;'></td>
|
<td style='min-width:32.5px;'></td>
|
<td style='min-width:32.5px;'></td>
|
<td style='min-width:32.5px;'></td>
|
<td style='min-width:32.5px;'></td>
|
<td style='min-width:32.5px;'></td>
|
<td style='min-width:32.5px;'></td>
|
<td style='min-width:32.5px;'></td>
|
<td class='xh' style='display:none;'>2</td>
|
</tr>
|
`;
|
}
|
|
tab.innerHTML=htm;
|
|
|
|
|
for(var i=0;i<tds.length;i++){
|
var itm=tds[i];
|
var tr=tab.children[i];
|
tr.children[0].innerText=i+1;
|
tr.children[1].innerText="";
|
tr.children[2].children[0].innerText=itm[0];
|
tr.children[2].children[1].innerText=itm[1];
|
tr.children[3].innerText=itm[2];
|
tr.children[4].innerText=itm[3].toFixed(2);
|
|
}
|
window.print();
|
}
|
|
|
make();
|
</script>
|
|
</body>
|
</html>
|