<%@ page contentType="text/html;charset=UTF-8"%>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
<%@page import="com.northglass.Globel.mes"%>
|
<%@page import="com.northglass.SqlHelper.*"%>
|
<%@ page contentType="text/html;charset=UTF-8"%>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
<c:set var="ctx" value="${pageContext.request.contextPath}" />
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<html>
|
<head>
|
|
<title>玻璃架查询</title>
|
|
<style>
|
th, td {
|
text-align: center;
|
|
}
|
|
th{
|
width:15%
|
}
|
</style>
|
</head>
|
<body>
|
<div class="content-wrapper">
|
<div style="display:grid;grid-template-rows:40px auto auto;">
|
<div>
|
<span>流程卡:</span>
|
<input type="text" id="input1"></input>
|
<button class="btn btn-primary" onclick="select();">查询</button>
|
<button style="margin-left:50px" onclick="comit();" class="btn btn-primary" >打印</button>
|
</div>
|
|
<div id="tab" style="width:100%">
|
<table class="table table-striped table-hover" style="width:100%" >
|
<thead>
|
<th>序号</th>
|
<th>流程卡</th>
|
<th>宽度</th>
|
<th>高度</th>
|
<th>数量</th>
|
</thead>
|
<tbody id="tbody">
|
</tbody>
|
|
|
</table>
|
</div>
|
|
</div>
|
<script>
|
<%
|
//String liuchengka=request.getParameter("line");
|
DBSession sn=null;
|
try{
|
String line=mes.getSession("gmms_groups");
|
System.out.println("l="+line);
|
String liuchengka=request.getParameter("liuchengka");
|
|
out.print("var line="+line +";");
|
sn=mes.getMesDBHelper().createSession(false);
|
sn.createStdCall("web_show_zhewan",2);
|
org.json.JSONArray arr=sn.stdCall(line,liuchengka).resultToJson(false);
|
out.print("var data=");
|
out.print(arr.toString());
|
out.print(";\r\n");
|
sn.close();
|
}
|
catch(Exception e){
|
e.printStackTrace();
|
}
|
|
%>
|
|
|
function create(){
|
if(data!=null && data!=undefined){
|
var datas=[];
|
var last=null;
|
for(var i=0;i<data.length;i++){
|
var a=data[i];
|
if(last==null){
|
last=[
|
a[0],a[1],a[2],
|
1
|
];
|
datas.push(last);
|
}
|
else{
|
if(a[1]==last[1] && a[2]==last[2]){
|
last[3]++;
|
}
|
else{
|
last=[
|
a[0],a[1],a[2],
|
1
|
];
|
datas.push(last);
|
}
|
}
|
}
|
var tb=document.getElementById("tbody");
|
tb.innerHTML=null;
|
for(var i=0;i<datas.length;i++){
|
var tr=document.createElement("tr");
|
var td1=document.createElement("td");
|
td1.innerText=(i+1);
|
tr.appendChild(td1);
|
for(var j=0;j<4;j++){
|
var td=document.createElement("td");
|
td.innerText=datas[i][j];
|
tr.appendChild(td);
|
}
|
tbody.appendChild(tr);
|
}
|
}
|
}
|
function selectAll(td){
|
td.parentNode.children[0].value=td.parentNode.parentNode.children[3].innerText;
|
}
|
create();
|
|
|
|
|
</script>
|
</body>
|
</html>
|