<%@ 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>
|
<h3 style="margin:auto auto 20px 0" id="head"></h3>
|
</div>
|
<div>
|
<span>流程卡:</span>
|
<input type="text" id="input1"></input>
|
|
<button style="margin-left:20px" onclick="ptl();" class="btn btn-primary" >打印</button>
|
<button style="margin-left:50px" onclick="update();" 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>
|
<th>打印</th>
|
</thead>
|
<tbody id="tbody">
|
</tbody>
|
|
|
</table>
|
</div>
|
|
</div>
|
<script>
|
<%
|
try{
|
String line=request.getParameter("line");
|
out.print("var ln="+(line==null?"null":line)+";\r\n");
|
if(line!=null){
|
|
org.json.JSONArray s= mes.getMesDBHelper().getTableToJson("SELECT stops,engineering_id,drop_frame,processcard_id,processcard_count,finsh_count FROM gmms_drop_frame where state='使用中' and groups="+line, false);
|
if(s==null)
|
out.print("var data=null;\r\n");
|
else
|
out.print("var data="+s.toString()+";\r\n");
|
}
|
}
|
catch(Exception e){
|
out.print("var data=null;\r\n");
|
}
|
%>
|
|
function update(a){
|
window.location.reload();
|
if(a==1){
|
setTimeout(
|
function(){
|
update(1);
|
},
|
20000);
|
}
|
}
|
|
|
function pt(bt){
|
var liuchengka= bt.parentNode.parentNode.children[3].innerText;
|
var gc= bt.parentNode.parentNode.children[1].innerText;
|
var jh=bt.parentNode.parentNode.children[2].innerText;
|
var ss=liuchengka.split('/');
|
var str="http://10.12.0.104:8080/GERP/pp/liuchengkaguanlis/HTML/liuchengkadayin.jsp?lckh="+ss[0]+"/&dyfs="+ss[1]+"/&lckjh="+jh+"/&xingming=&gongchenghao="+gc;
|
window.open(str);
|
$.ajax(
|
{
|
async:false,
|
type:"post",
|
url:"/gmms2/mesview/data/_service",
|
data:{
|
m:"leng_print",
|
p:liuchengka
|
},
|
success:function(data){
|
var js= JSON.parse(data);
|
if(js.result!="ok"){
|
alert("提示:"+js.result);
|
}
|
},
|
error:function(data){
|
alert("汇报出错:"+data);
|
}
|
}
|
);
|
}
|
|
function create(){
|
var dk= document.getElementById("head");
|
dk.innerText=ln+"号线流程卡打印";
|
if(data!=null ){
|
var tb=document.getElementById("tbody");
|
|
tb.innerHTML=null;
|
for(var i=0;i<data.length;i++){
|
var tr=document.createElement("tr");
|
for(var j=0;j<4;j++){
|
var td=document.createElement("td");
|
td.innerText=data[i][j];
|
tr.appendChild(td);
|
}
|
tdd=document.createElement("td");
|
tdd.innerText=""+data[i][5]+'/'+data[i][4];
|
tr.appendChild(tdd);
|
var td1=document.createElement("td");
|
if(data[i][4]<=data[i][5]){
|
td1.innerHTML="<button onclick='pt(this);' style='background-color:red' class='btn btn-primary'>打印</button>";
|
}
|
else
|
td1.innerHTML="<button onclick='pt(this);' class='btn btn-primary'>打印</button>";
|
tr.appendChild(td1);
|
tb.appendChild(tr);
|
}
|
|
}
|
setTimeout(
|
function(){
|
update(1);
|
},
|
20000);
|
}
|
create();
|
</script>
|
</body>
|
</html>
|