<%@ 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}" />
|
<html>
|
<head>
|
|
<script type="text/javascript"
|
src="${ctx}/static/jquery/jquery-3.1.0.min.js"></script>
|
<script>
|
/* setInterval(function(){
|
window.location.reload();
|
},3000); */
|
<%String state = request.getParameter("taskstate");
|
String lines = request.getParameter("line");
|
if (state == null)
|
state = "null";
|
out.print("var state='" + state + "';\r\n");
|
out.print("var line='" + lines + "';\r\n");%>
|
function checkAll() {
|
var checkedAll = document.getElementsByClassName("checkall")[0];
|
var ischeked = false;
|
if (checkedAll.checked) {
|
ischeked = true;
|
}
|
var checkboxs = document.getElementById(tablename).getElementsByClassName("checkboxs");
|
for (var i = 0; i < checkboxs.length; i++) {
|
checkboxs[i].checked = ischeked;
|
}
|
}
|
function loadcheckAll() {
|
var checkedAll = document.getElementsByClassName("loadcheckall")[0];
|
var ischeked = false;
|
if (checkedAll.checked) {
|
ischeked = true;
|
}
|
var checkboxs = document.getElementById(tablename).getElementsByClassName("loadcheckboxs");
|
for (var i = 0; i < checkboxs.length; i++) {
|
checkboxs[i].checked = ischeked;
|
}
|
}
|
/*修改保存 */
|
|
function Updates(){
|
var checkboxs=document.getElementsByClassName("loadcheckboxs");
|
/* var RowHtml="";
|
var RackIdHtml="";
|
var TaskIdHtml=""; */
|
for(var i=0;i<checkboxs.length;i++){
|
var checkbox=checkboxs[i];
|
if(checkbox.checked){
|
var RowHtml=checkbox.parentNode.parentNode;
|
var RackIdHtml=RowHtml.getElementsByClassName("RackId")[0].innerHTML;
|
var TaskIdHtml=RowHtml.getElementsByClassName("OutTaskId")[0].value;
|
$.ajax({
|
cache:false,
|
type:"POST",
|
dataType : "json",
|
url:"${ctx}/tasks/Updates",
|
data:{
|
"RackId":RackIdHtml,
|
"TaskIdHtml":TaskIdHtml,
|
},success:function(data){
|
window.location.href="${ctx }/loadTask/loadHtml?line="+line;
|
}
|
});
|
break;
|
}
|
}
|
}
|
/* 标记 类型 , 状态 */
|
function TaskStusts(Stusts) {
|
var table=document.getElementById("Table_Minche");
|
var checkboxs = table.getElementsByClassName("checkboxs");
|
for (var i = 0; i < checkboxs.length; i++) {
|
var checkbox = checkboxs[i];
|
if (checkbox.checked) {
|
var RowHtml = checkbox.parentNode.parentNode;
|
var TaskIdHtml = RowHtml.getElementsByClassName("OutTaskId")[0].innerHTML;
|
$.ajax({
|
cache : false,
|
type : "POST",
|
dataType : "json",
|
url : "${ctx}/loadTask/updateTask",
|
data : {
|
"Stusts" : Stusts,
|
"TaskIdHtml" : TaskIdHtml,
|
},
|
success : function(data) {
|
window.location.href="${ctx }/loadTask/loadHtml?line="+line;
|
//console.log(data);
|
/* location.reload(); */
|
}
|
});
|
}
|
}
|
|
}
|
/* 标记 类型 , 状态 */
|
function loadTaskStusts(Stusts) {
|
var table=document.getElementById("Table_Load");
|
var checkboxs = table.getElementsByClassName("checkboxs");
|
for (var i = 0; i < checkboxs.length; i++) {
|
var checkbox = checkboxs[i];
|
if (checkbox.checked) {
|
var RowHtml = checkbox.parentNode.parentNode;
|
var TaskIdHtml = RowHtml.getElementsByClassName("OutTaskId")[0].value;
|
$.ajax({
|
cache : false,
|
type : "POST",
|
dataType : "json",
|
url : "${ctx}/loadTask/updateTask",
|
data : {
|
"Stusts" : Stusts,
|
"TaskIdHtml" : TaskIdHtml,
|
},
|
success : function(data) {
|
window.location.href="${ctx }/loadTask/loadHtml?line="+line;
|
//console.log(data);
|
/* location.reload(); */
|
}
|
});
|
}
|
}
|
|
}
|
Initialize();
|
function Initialize() {
|
|
loadData();
|
loadDataRack();
|
}
|
function loadDataRack() {
|
$.ajax({
|
cache : false,
|
type : "POST",
|
dataType : "json",
|
url : "${ctx}/loadTask/loadRackLine",
|
data : {
|
"line" : line
|
},
|
success : function(data) {
|
console.log(data);
|
var LoadRackshtml = "";
|
$('#loaddata').remove();
|
$('#Table_Load').append("<tbody id='loaddata'></tbody>");
|
for (var i = 0; i < data.length; i++) {
|
var row = data[i];
|
|
LoadRackshtml+="<tr><td style=\"text-align: center;\"><input class=\"loadcheckboxs\" type=\"checkbox\" /></td>";
|
LoadRackshtml+="<td class=\"RackId\">"+row.id+"</td>";
|
if(row.id%2!=0){
|
LoadRackshtml+="<td rowspan='2'>"+row.rackName+"</td>";
|
LoadRackshtml+="<td rowspan='2'>"+row.machineLoad.workState+"</td>";
|
}
|
LoadRackshtml+="<td>"+row.number+"</td>";
|
LoadRackshtml+="<td>"+row.state+"</td>";
|
if(row.outTasks==undefined||row.outTasks==null){
|
LoadRackshtml+="<td><input style=\"width:70px;\" class=\"OutTaskId\" type=\"text\" value=''/></td>";
|
LoadRackshtml+="<td></td>";
|
LoadRackshtml+="<td></td>";
|
LoadRackshtml+="<td style=\"width:100px;\"></td>";
|
LoadRackshtml+="<td style=\"width:100px;\"></td>";
|
LoadRackshtml+="<td></td>";
|
LoadRackshtml+="<td></td>";
|
}else{
|
LoadRackshtml+="<td><input style=\"width:70px;\" class=\"OutTaskId\" type=\"text\" value='"+row.outTasks.taskId+"'/></td>";
|
LoadRackshtml+="<td>"+row.outTasks.stockName+"</td>";
|
LoadRackshtml+="<td>"+(row.outTasks.planLoadNum1+row.outTasks.planLoadNum2+row.outTasks.planLoadNum3)+"</td>";
|
LoadRackshtml+="<td style=\"width:100px;\">"+row.outTasks.stockNum+"</td>";
|
LoadRackshtml+="<td style=\"width:100px;\">"+row.outTasks.posunCount+"</td>";
|
LoadRackshtml+="<td>"+row.outTasks.machineStatus+"</td>";
|
LoadRackshtml+="<td>"+row.outTasks.workStatus+"</td>";
|
}
|
|
LoadRackshtml+="<td>"+"</td>";
|
LoadRackshtml+="<td>"+"</td>"
|
+ "</tr>";
|
}
|
$('#loaddata').append(LoadRackshtml);
|
}
|
});
|
}
|
function loadData() {
|
$.ajax({
|
cache : false,
|
type : "POST",
|
dataType : "json",
|
url : "${ctx}/loadTask/notFinshTask",
|
data : {
|
"line" : line
|
},
|
success : function(data) {
|
console.log(data);
|
var OutTaskshtml = "";
|
$('#taskdata').remove();
|
$('#Table_Minche').append(
|
"<tbody id='taskdata'></tbody>");
|
|
for (var i = 0; i < data.length; i++) {
|
var row = data[i];
|
if (("等待开始" == row.machineStatus || "等待退回库区" == row.machineStatus)
|
&& "正在工作" == row.machineStatus) {
|
OutTaskshtml += "<tr style=\"background-color:#0dc316\">";
|
} else {
|
OutTaskshtml += "<tr>";
|
}
|
OutTaskshtml += "<td style=\"text-align: center;\"><input class=\"checkboxs\" type=\"checkbox\" /></td>";
|
OutTaskshtml += "<td>" + row.id + "</td>";
|
OutTaskshtml += "<td class=\"OutTaskId\">"
|
+ row.taskId + "</td>";
|
OutTaskshtml += "<td>" + row.taskType + "</td>";
|
OutTaskshtml += "<td>" + row.mesStatus + "</td>";
|
OutTaskshtml += "<td>" + row.machineStatus
|
+ "</td>";
|
OutTaskshtml += "<td>" + row.workStatus + "</td>";
|
OutTaskshtml += "<td>" + row.infoContent + "</td>";
|
OutTaskshtml += "<td>" + row.pkgId + "</td>";
|
OutTaskshtml += "<td>" + row.stockName + "</td>";
|
OutTaskshtml += "<td>" + row.destination + "</td>";
|
OutTaskshtml += "<td>" + row.planLoadNum1 + "</td>";
|
OutTaskshtml += "<td>" + row.planLoadNum2 + "</td>";
|
OutTaskshtml += "<td>" + row.planLoadNum3 + "</td>";
|
OutTaskshtml += "<td>" + row.stockNum + "</td>";
|
OutTaskshtml += "<td>" + row.loadeNum + "</td>";
|
OutTaskshtml += "<td>" + row.posunCount + "</td>";
|
OutTaskshtml += "<td>" + row.bb + "</td>";
|
OutTaskshtml += "<td>" + row.hh + "</td>";
|
OutTaskshtml += "<td>" + row.color + "</td>";
|
OutTaskshtml += "<td>" + row.thickness + "</td>";
|
OutTaskshtml += "<td>" + row.stockNum
|
+ "</td></tr>";
|
}
|
$('#taskdata').append(OutTaskshtml);
|
}
|
});
|
}
|
</script>
|
<title>上片任务管理</title>
|
<style type="text/css">
|
* {
|
padding: 0px;
|
margin: 0px;
|
font-family: "microsoft yahei", "Helvetica Neue", Helvetica, Arial,
|
sans-serif;
|
}
|
|
#Top {
|
display: block;
|
padding: 5px;
|
padding-left: 6px;
|
padding-right: 15px;
|
line-height: 22px;
|
/* border-left: 5px solid #15c142; */
|
border-radius: 0 2px 2px 0;
|
background-color: #f2f2f2;
|
}
|
|
.btn {
|
height: 35px;
|
line-height: 35px;
|
background-color: #0dc316;
|
padding: 0 15px;
|
color: #fff;
|
border: none;
|
border-radius: 2px;
|
}
|
|
.Rowbtn {
|
height: 20px;
|
line-height: 20px;
|
background-color: #0dc316;
|
padding: 0 15px;
|
color: #fff;
|
border: none;
|
border-radius: 2px;
|
}
|
|
#Table_Minche thead tr {
|
background-color: #00BFFF;
|
font-weight: 800;
|
}
|
|
#Table_Minche thead td {
|
border: 1px solid #00BFFF;
|
}
|
|
#Table_Minche td {
|
border: 1px solid #f2f2f2;
|
height: 20px;
|
line-height: 20px;
|
padding: 3px 6px 3px 6px;
|
}
|
|
.dtable thead tr {
|
background-color: #00BFFF;
|
font-weight: 800;
|
}
|
|
.dtable thead td {
|
border: 1px solid #00BFFF;
|
}
|
|
.dtable td {
|
border:1px solid #f2f2f2;
|
text-align:center;
|
padding:5px 5px 5px 5px;
|
}
|
</style>
|
</head>
|
<body>
|
<div class="content-wrapper" style="background-color: white;">
|
<!-- <section class="content-header"></section> -->
|
<section class="content container-fluid">
|
<div id="Top">
|
<button class="btn" onclick="Updates()">绑定任务</button>
|
<button class="btn" style="margin-left:10px;" onclick="loadTaskStusts('铁架已到二次接力')">铁架已到二次接力</button>
|
<button class="btn" style="margin-left:10px;" onclick="loadTaskStusts('铁架已到上片位')">铁架已到上片位</button>
|
<button class="btn" style="margin-left:10px;" onclick="loadTaskStusts('上片完成请求退回')">上片完成请求退回</button>
|
<button class="btn" style="margin-left:10px;" onclick="loadTaskStusts('铁架退回二次接力')">铁架退回二次接力</button>
|
<button class="btn" style="margin-left:10px;" onclick="loadTaskStusts('等待退回库区')">等待退回库区</button>
|
</div>
|
<div>
|
<div id="PageHeads" style="text-align: center; background-color: #0dc316; color: white; font-size: 25px; line-height: 50px; height: 50px;"></div>
|
<div style="margin-top: 10px;margin-bottom: 30px;">
|
<table id="Table_Load" class="dtable"
|
style="width: 100%; min-width: 1200px; border-collapse: collapse; border-spacing: 0;">
|
<thead>
|
<tr>
|
<td style="text-align: center;"><input type="checkbox"
|
class="loadcheckall" onclick="loadcheckAll()" /></td>
|
<td>ID</td>
|
<td>机器</td>
|
<td>上片机状态</td>
|
<td>工位编号</td>
|
<td>状态</td>
|
<td>任务ID</td>
|
<td>架号</td>
|
<td>待上数量</td>
|
<td>已上片数量</td>
|
<td>破损数量</td>
|
<td>MES状态</td>
|
<td>任务状态</td>
|
<td>启用状态</td>
|
<td>操作</td>
|
</tr>
|
</thead>
|
<tbody id="loaddata">
|
</tbody>
|
</table>
|
</div>
|
<div id="Top">
|
<button class="btn" onclick="TaskStusts('等待开始')">等待开始</button>
|
<button class="btn" onclick="TaskStusts('任务完成')">任务完成</button>
|
<button class="btn" onclick="TaskStusts('派尔确认任务完成')">派尔确认任务完成</button>
|
</div>
|
<table id="Table_Minche"
|
style="width: 100%; border-collapse: collapse; min-width: 1200px; border-spacing: 0;">
|
<thead>
|
<tr>
|
<td style="text-align: center;"><input class="checkall"
|
onclick="checkAll('Table_Minche')" type="checkbox" /></td>
|
<td>ID</td>
|
<td>任务ID</td>
|
<td>任务类型</td>
|
<td>派尔状态</td>
|
<td>MES状态</td>
|
<td>工作状态</td>
|
<td>提示信息</td>
|
<td>原片包ID</td>
|
<td>铁架号</td>
|
<td>目的地</td>
|
<td>计划上片数量1</td>
|
<td>计划上片数量2</td>
|
<td>计划上片数量3</td>
|
<td>架上总数量</td>
|
<td>已上片数量</td>
|
<td>破损数量</td>
|
<td>原片宽</td>
|
<td>原片高</td>
|
<td>原片颜色</td>
|
<td>原片厚度</td>
|
<td>原片数量</td>
|
</tr>
|
</thead>
|
<tbody id="taskdata"></tbody>
|
</table>
|
</div>
|
</section>
|
</div>
|
</body>
|
</html>
|