<%@ 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>
|
<title>打印全部</title>
|
<script type="text/javascript">
|
// var interval = setInterval('refreshStatus()', 60000);
|
$(document).ready(function(){
|
var allstatu = $("#allstatu").attr("allstatu");
|
var info = $("#info").attr("info");
|
$("#infos").html("<img src=\"/gmms2/static/images/danger.jpg\">"+" "+info);
|
if(allstatu == 0){
|
$("#allstatus").attr("style","background-color:#f00");
|
}
|
});
|
//设备页面自动刷新
|
// function refreshStatus() {
|
// window.location.reload();
|
// }
|
|
// 停止页面自动刷新
|
// function disableAutoRefresh() {
|
// clearInterval(interval);
|
// }
|
|
function modifypattern(id){
|
disableAutoRefresh()
|
$('#myModal-pattern').modal('toggle');
|
$('#pattern_id').val(id);
|
}
|
//单打
|
function printalone(glassid){
|
disableAutoRefresh()
|
$("#printalone").modal('toggle');
|
$("#lineprint").val(glassid);
|
}
|
//全打
|
function printall(glassid){
|
disableAutoRefresh();
|
$("#printall").modal('toggle');
|
$("#lineprint").val(glassid);
|
}
|
|
function modifystatu(id){
|
disableAutoRefresh();
|
$('#myModal-statu').modal('toggle');
|
$('#statu_id').val(id);
|
}
|
|
function finishtask(){
|
disableAutoRefresh();
|
$('#taskFinish').modal('toggle');
|
}
|
function serach(){
|
var name = $('#name').val();
|
$.ajax({
|
url:"/gmms2/device/serach/"+name,
|
async:true,
|
type:"GET",
|
dataType:"json",
|
cache:false,
|
success: function(data){
|
alert(date);
|
}
|
});
|
}
|
$(document).delegate('#allprint','click',function(){
|
var glassid = $('#lineprint').val();
|
$.ajax({
|
async: false,
|
type:"GET",
|
url:"${ctx}/device/printaloneForInfo/"+glassid,
|
dataType:"text",
|
success:function(data){
|
window.location.href="${ctx}/device/printOrder";
|
alert("打印完成")
|
}
|
});
|
});
|
|
|
|
$(document).delegate('#myModal-pattern','click',function(){
|
var glassid = $('#searchsubmit').val();
|
$.ajax({
|
async: false,
|
type:"GET",
|
url:"${ctx}/device/modifyPattern/"+glassid,
|
dataType:"text",
|
success:function(data){
|
window.location.href="${ctx}/device/printmanage";
|
alert("打印完成!")
|
}
|
});
|
});
|
function modifyGlassCount(id, glasscount) {
|
$('#modifyPortModal').modal('toggle');
|
$('#CountInput').val(glasscount);
|
$('#modifyGlassCountForm').attr('action', '${ctx}/device/printglassForInfo/' + id);
|
}
|
|
function btnALLchoose(){
|
|
$("input[name='subcheck']").prop("checked",true);
|
}
|
function btnNOchoose(){
|
|
$("input[name='subcheck']").prop("checked",false);
|
}
|
function batchDeletes(){
|
//判断至少写了一项
|
var checkedNum = $("input[name='subcheck']:checked").length;
|
if(checkedNum==0){
|
alert("请至少选择一项!");
|
return false;
|
}
|
if(confirm("确定打印所选行标签?")){
|
var checkedList = new Array();
|
$("input[name='subcheck']:checked").each(function(){
|
checkedList.push($(this).val());
|
});
|
$.ajax({
|
type:"POST",
|
url:"${ctx}/device/chooseprint/selectPrint",
|
data:{"delitems":checkedList.toString()},
|
datatype:"html",
|
success:function(data){
|
$("[name='checkbox2']:checkbox").attr("checked",false);
|
location.reload();//页面刷新
|
},
|
error:function(data){
|
art.dialog.tips('打印失败!');
|
}
|
});
|
}
|
}
|
</script>
|
|
|
</head>
|
<body>
|
<div class="content-wrapper">
|
<section class="content-header">
|
<h1>打印界面 <a class="btn btn-success" href="${ctx}/device/printmanage">返回上一级</a> <a class="btn btn-success" onclick="btnALLchoose()">全选</a> <a class="btn btn-success" onclick="btnNOchoose()">反选</a> <a class="btn btn-success" onclick="batchDeletes()">打印选中标签</a></h1>
|
<ol class="breadcrumb">
|
<li><a href="#">设备<i class="fa fa-dashboard"></i> 打印
|
</a></li>
|
</ol>
|
</section>
|
<div id = "allstatu" allstatu = "${allstatu}"></div>
|
<div id = "info" info = "${info}"></div>
|
<!-- Main content -->
|
<section class="content container-fluid" style="margin-top: 10px; margin-left: 10px;">
|
<div class="box" style="height: 650px; overflow: auto;margin-top: 15px;">
|
|
<div><h3 style="margin-top:10px;"> ${printword}</h3></div>
|
<table class="table table-striped table-hover"
|
style="overflow-x: auto;text-align:center;">
|
<thead>
|
<tr>
|
<th style="text-align:center;">#</th>
|
<th style="text-align:center;">任务名</th>
|
<th style="text-align:center;">客户名称</th>
|
<th style="text-align:center;">成品名称</th>
|
<th style="text-align:center;">长度</th>
|
<th style="text-align:center;">宽度</th>
|
<th style="text-align:center;">厚度</th>
|
<th style="text-align:center;">颜色</th>
|
<th style="text-align:center;">总数量</th>
|
<th style="text-align:center;">楼层编号</th>
|
</tr>
|
</thead>
|
<tbody>
|
<c:forEach items="${reportTasks}" var="reportTask" varStatus="status1">
|
<tr>
|
<td height="30px"><input type="checkbox" id="subcheck"
|
name="subcheck" value="${reportTask.id}" /></td>
|
<td height="30px">${reportTask.orderNumber}</td>
|
<td height="30px">${reportTask.customerName}</td>
|
<td height="30px">${reportTask.finishedProductName}</td>
|
<td height="30px">${reportTask.weight}</td>
|
<td height="30px">${reportTask.height}</td>
|
<td height="30px">${reportTask.thickness}</td>
|
<td height="30px">${reportTask.colorMembraneSystem}</td>
|
<td height="30px">${reportTask.number}</td>
|
<td height="30px">${reportTask.floorNumber}</td>
|
<!-- 小片数量 -->
|
</tr>
|
</c:forEach>
|
</tbody>
|
</table>
|
</div>
|
<div class="modal fade" id="myModal-pattern" tabindex="-1"
|
role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
<div class="modal-dialog">
|
<div class="modal-content">
|
<div class="modal-header">
|
<button type="button" class="close" data-dismiss="modal"
|
aria-hidden="true" data-backdrop="static">×</button>
|
<h3 class="modal-title" id="myModalLabel"
|
style="font-weight: bolder;">打印类型</h3>
|
</div>
|
<form class="form-horizontal" action="${ctx}/device/modifyPattern"
|
method="post" role="form" id="category_add">
|
<input type="hidden" id="pattern_id" name="line" >
|
|
<div class="form-group">
|
<h4>
|
<label class="col-sm-3 control-label no-padding-right"
|
style="font-weight: bolder;"> 打印类型</label>
|
</h4>
|
<div class="col-sm-9">
|
<select class='form-control' name="pattern"
|
id="pattern" style="width: 250px; font-size: 15px">
|
<option>单片打印</option>
|
<option>全部打印</option>
|
<option>不打印</option>
|
</select>
|
</div>
|
</div>
|
|
<div class="modal-footer">
|
<button type="button" class="btn btn-default btn-lg"
|
data-dismiss="modal">关闭</button>
|
<button type="submit" class="btn btn-primary btn-lg"
|
id="searchsubmit">提交</button>
|
</div>
|
</form>
|
</div>
|
</div>
|
</div>
|
|
<div class="modal fade" id="printalone" tabindex="-1" role="dialog"
|
aria-labelledby="myModalLabel" aria-hidden="true">
|
<form class="form-horizontal" role="form">
|
<div class="modal-dialog">
|
<div class="modal-content">
|
<input type='hidden' id = "lineprint">
|
<div class="modal-header">
|
<button type="button" class="close" data-dismiss="modal"
|
aria-hidden="true">×</button>
|
<h3 class="modal-title" id="myModalLabel">提示信息</h3>
|
</div>
|
<div class="modal-body" style="text-align: left;">
|
<h3>您确定要打印单片的玻璃标签么?</h3>
|
</div>
|
<div class="modal-footer">
|
<button type="button" class="btn btn-default btn-lg"
|
data-dismiss="modal">取消</button>
|
<button type="button" class="btn btn-primary btn-lg"
|
id="allprint">确认</button>
|
</div>
|
</div>
|
</div>
|
</form>
|
</div>
|
|
<div id="modifyPortModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
|
<form id="modifyGlassCountForm" method="post" class="form-horizontal" style="background-color:white;width:400px;margin:50px auto;">
|
<div class="modal-header">
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<h3 class="modal-title" id="myModalLabel">打印次数</h3>
|
</div>
|
<div class="modal-body" style="background-color:white;text-align:center;">
|
<div class="control-group" >
|
<div class="controls">
|
<input type="text" id="CountInput" name="glasscount" class="required" placeholder="glasscount">
|
</div>
|
</div>
|
</div>
|
<div class="modal-footer">
|
<button type="submit" class="btn btn-primary">确定打印</button>
|
<button type="button" class="btn" data-dismiss="modal">关闭</button>
|
</div>
|
</form>
|
</div>
|
</section>
|
<!-- /.content -->
|
</div>
|
<!-- /.content-wrapper -->
|
</body>
|
</html>
|