<%@ 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 src="tb.js"></script>
|
<script src="jq.js"></script>
|
<script src="${ctx}/static/js/ng/tb.js" type="text/javascript"></script>
|
|
<style>
|
.table>tbody>tr>td {
|
vertical-align: middle;
|
/* content:middle; */
|
text-align: center;
|
font-weight: bold;
|
font-size: 16px;
|
/* border: 1px solid green; */
|
}
|
|
.table>thead>tr>th {
|
font-weight: bold;
|
font-size: 20px;
|
text-align: center;
|
}
|
|
.s-style {
|
font-size: 18px;
|
font-weight: bold;
|
}
|
</style>
|
|
<script>
|
|
<%String groups = request.getParameter("group");
|
if (groups == null)
|
groups = "null";
|
out.print("var group=" + groups + ";\r\n");%>
|
var rTime = 6000;//自动刷新间隔时间 单位:毫秒
|
var rUrl = "/gmms2/mesview/data/_guanghuahou_manage";
|
var gongyi = "钢化";
|
var cPage = "钢化后";
|
</script>
|
<title>钢化后管理-下片位信息</title>
|
</head>
|
<body>
|
<div class="content-wrapper">
|
<div>
|
<section class="content-header">
|
<h1>
|
<span id="groupNum"> </span> 号钢化后管理-下片位信息 <small>当前钢化前摆片台状态</small>
|
|
<button id='xipian' style='background-color: green;' type='button'
|
data-toggle='popover' data-content='' data-trigger='hover'
|
class='btn btn-primary '>吸片</button>
|
<span id=s_title> </span> <small>当前班组:</small>
|
<span id="s_current_banzu" style="font-weight: bold;"></span>
|
<button id="btnOffWork" type='button' class='btn btn-primary '
|
onclick='offWork()'>下班-产量</button>
|
</h1>
|
<ol class="breadcrumb">
|
<li>
|
<%-- <a href="${ctx }/loadmachine/loadmachinerack"><i
|
class="fa fa-reply"></i>下片位信息</a> --%> <!-- <button class='btn btn-large btn-warning' onclick='save_ssq_data()'>保存</button> -->
|
</li>
|
<li class="active"></li>
|
</ol>
|
|
</section>
|
</div>
|
|
<!-- 下片位信息 -->
|
<div>
|
<section class="content container-fluid">
|
<div class="box" style="overflow: auto;">
|
<div class="box-header"></div>
|
<!-- /.box-header -->
|
<div class="box-body no-padding" id="xiapian"></div>
|
</div>
|
</section>
|
</div>
|
|
<!-- 绑定架子 -->
|
<div class="modal fade" id="BJ-Info" tabindex="-1" role="dialog"
|
aria-labelledby="myModalLabel" aria-hidden="true">
|
<div class="modal-dialog">
|
<form class="form-horizontal" role="form" id="category_add"
|
method="post">
|
<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>
|
|
<div class="modal-body">
|
<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">
|
<div class="btn-group"
|
style="width: 250px; height: 35px; font-size: 20px">
|
<select id="kj_content" class="span_tasktext">
|
|
</select>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="modal-footer">
|
<button type="button" class="btn btn-primary btn-lg"
|
data-dismiss="modal">取消</button>
|
|
<button type="button" class="btn btn-success btn-lg"
|
id="BJ_button" onclick="BJ_Submit()">确认</button>
|
</div>
|
</div>
|
</form>
|
</div>
|
</div>
|
|
<!-- 清空信息 -->
|
<div class="modal fade" id="QK-info" tabindex="-1" role="dialog"
|
aria-labelledby="myModalLabel" aria-hidden="true">
|
<form class="form-horizontal" role="form">
|
<div class="modal-dialog">
|
<div class="modal-content">
|
<div class="modal-header">
|
<button type="button" class="close" data-dismiss="modal"
|
aria-hidden="true">×</button>
|
<h3 class="modal-title" id="QK_AlertTitle">清空信息操作提示:</h3>
|
</div>
|
<div class="modal-body" style="text-align: left;">
|
<h3 id="QK_MsgShow">
|
是否确定执行 <span id="QK_Id" style="sixe: 25px; font-weight: bold"></span>
|
号下片位置 <span style="sixe: 20px; color: red; font-weight: bold">清空信息
|
</span> 操作?
|
</h3>
|
</div>
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-primary btn-lg"
|
data-dismiss="modal">取消</button>
|
|
<button type="button" class="btn btn-danger btn-lg"
|
id="QK_button" onclick="QK_Submit()">确认</button>
|
</div>
|
</div>
|
</div>
|
</form>
|
</div>
|
|
<!-- 退库 -->
|
<div class="modal fade" id="TK-info" 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="TK_AlertTitle">退库操作提示:</h3>
|
</div>
|
<div class="modal-body" style="text-align: left;">
|
<h3 id="TK_MsgShow">
|
是否确定执行 <span id="TK_Id" style="font-weight: bold"></span> 号下片位置
|
<span style="color: red; font-weight: bold"> 退库 </span> 操作?
|
</h3>
|
</div>
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-primary btn-lg"
|
data-dismiss="modal">取消</button>
|
|
<button type="button" class="btn btn-warning btn-lg"
|
id="TK_button" onclick="TK_Submit()">确认</button>
|
</div>
|
</div>
|
</div>
|
</form>
|
</div>
|
|
<%@ include file="/WEB-INF/views/mes/view/modal_tishi.jsp"%>
|
<%@ include file="/WEB-INF/views/mes/view/modal_banzu.jsp"%>
|
<%@ include file="/WEB-INF/views/mes/view/modal_xiangqing.jsp"%>
|
<%@ include file="/WEB-INF/views/mes/view/modal_posun.jsp"%>
|
<%@ include file="/WEB-INF/views/mes/view/modal_GH_tijiaobaogong.jsp"%>
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
|
|
<!-- 钢化后下片 表内容显示 -->
|
<script>
|
var opt = {
|
table : {
|
style : "width:100%",
|
"class" : "table table-striped table-hover"
|
},
|
columns : [
|
|
{
|
name : "编号",
|
binding : 0,
|
//style : "font-weight:bold",
|
//style : "text-align:center",
|
filter : {}
|
|
}, {
|
name : "下片位",
|
binding : 1,
|
//style : "width:5%",
|
// editAble:true,//设置列可编辑
|
filter : {}
|
//设置列可搜索
|
}, {
|
name : "下片位状态",
|
binding : 2,
|
type : "element",
|
filter : {}
|
}, {
|
|
name : "料架",
|
binding : 3,
|
filter : {}
|
}, {
|
name : "料架状态",
|
binding : 4,
|
//style : "width:8%",
|
filter : {}
|
}, {
|
name : "流程卡号",
|
binding : 5,
|
type : "element",
|
//style : "width:8%",
|
filter : {}
|
}, {
|
name : "完成数量",
|
binding : 6,
|
//style : "width:8%",
|
filter : {}
|
}, {
|
name : "破损数量",
|
binding : 7,
|
//style : "width:8%",
|
filter : {}
|
}, {
|
name : "总数量",
|
binding : 8,
|
//style : "width:8%",
|
filter : {}
|
}, {
|
name : "未完成数量",
|
binding : 9,
|
//style : "width:8%",
|
filter : {}
|
}, {
|
name : "AB面",
|
binding : 10,
|
//style : "width:8%",
|
filter : {}
|
}, {
|
name : "下架位",
|
binding : 11,
|
//style : "width:8%",
|
type : "element",
|
filter : {}
|
}, {
|
name : "操作",
|
binding : 12,
|
style : "width:15%;",
|
type : "element",
|
filter : {}
|
} ]
|
};
|
|
//创建表
|
var db = createTable(document.getElementById("xiapian"), opt);
|
var a = true;
|
var t = false;
|
|
//加载表格内容
|
function loadTable() {
|
if (t == false) {
|
document.getElementById("groupNum").innerHTML = group;
|
t = true;
|
}
|
$.ajax({
|
type : "post",
|
data : {
|
name : "钢化后下片位信息",
|
line : group
|
},
|
dataType : "json",
|
url : rUrl,
|
success : loadSuccess,
|
error : loadError
|
});
|
//a = true;
|
}
|
|
function loadSuccess(data) {
|
|
var d = data;
|
//alert(d);
|
for (var i = 0; i < d.length; i++) {
|
if (d[i][2] == 1) {
|
d[i][2] = "<button class='btn btn-large btn-success' onclick='change_state("
|
+ d[i][0] + ",1)'>启用</button>";
|
} else if (d[i][2] == 0) {
|
|
d[i][2] = "<button class='btn btn-large btn-success' style='background-color:red' onclick='change_state("
|
+ d[i][0] + ",0)'>禁用</button>";
|
|
} else {
|
|
}
|
//操作,rank 为空时
|
if (d[i][3] == null || d[i][3] == "") {
|
|
var aorb = d[i][10] == "A" ? 1 : 2;
|
var s = "<button class='btn btn-large btn-success' onclick='GHH_BangJia("
|
+ d[i][0] + "," + aorb + ")'>绑定架子</button>";
|
|
} else {
|
if (d[i][4] == 3) {
|
var s = "<button class='btn btn-large btn-warning' onclick='GHH_TuiKu("
|
+ d[i][0] + "," + d[i][1] + ")'>退库</button>";
|
s += " <button class='btn btn-large btn-danger' onclick='GHH_QingKong("
|
+ d[i][0] + "," + d[i][1] + ")'>清空信息</button>";
|
}else{
|
var s="";
|
}
|
/* if (d[i][4] == 4) {
|
|
var s = "<button class='btn btn-large btn-warning'>退库中</button>";
|
} else {
|
|
var s = "<button class='btn btn-large btn-warning' onclick='GHH_TuiKu("
|
+ d[i][0] + "," + d[i][1] + ")'>退库</button>";
|
s += " <button class='btn btn-large btn-danger' onclick='GHH_QingKong("
|
+ d[i][0] + "," + d[i][1] + ")'>清空信息</button>";
|
} */
|
}
|
var a = d[i];
|
a.push(s);
|
|
d[i][9] = d[i][8] - d[i][7] - d[i][6];
|
|
if (d[i][4] == 1) {
|
d[i][4] = "";
|
}else if (d[i][4] == 2) {
|
d[i][4] = "料架推进中";
|
} else if (d[i][4] == 3) {
|
d[i][4] = "料架已到位";
|
} else if (d[i][4] == 4) {
|
d[i][4] = "料架待推出";
|
} else if (d[i][4] == 5) {
|
d[i][4] = "料架推出中";
|
} else if (d[i][4] == 6) {
|
d[i][4] = "料架待退库";
|
}else if (d[i][4] == 0 || d[i][4] == 7) {
|
d[i][4] = "";
|
} else {
|
d[i][4] = "执行中";
|
}
|
if (d[i][5] == "" || d[i][5] == null) {
|
|
} else {
|
d[i][5] += " <button class='btn btn-large btn-danger' onclick='look_detail(\""
|
+ d[i][5] + "\")'>查看详情</button>";
|
|
}
|
|
}
|
|
db.update(d);
|
}
|
|
function loadError(data) {
|
|
/* if (a == true) {
|
setTimeout(loadTable, 5000);
|
a = false;
|
} */
|
}
|
|
//InitLoad();
|
</script>
|
|
<!-- 页面定时刷新 暂停 恢复 -->
|
<script>
|
var interval = setInterval('loadTable()', rTime);//定时刷新
|
function refresh() {
|
interval = setInterval('loadTable()', rTime);//刷新恢复
|
}
|
|
function stopRefresh() {
|
clearInterval(interval);//停止刷新
|
}
|
|
$(function() {
|
|
$('#TK-info').on('show.bs.modal', function() {
|
stopRefresh();
|
//alert("停止刷新1");
|
});
|
|
$('#QK-info').on('show.bs.modal', function() {
|
stopRefresh();
|
//alert("停止刷新2");
|
});
|
|
$('#BJ-Info').on('show.bs.modal', function() {
|
stopRefresh();
|
//alert("停止刷新3");
|
})
|
|
$('#TK-info').on('hide.bs.modal', function() {
|
refresh();
|
//alert("开始刷新1");
|
});
|
|
$('#QK-info').on('hide.bs.modal', function() {
|
refresh();
|
//alert("开始刷新2");
|
});
|
|
$('#BJ-Info').on('hide.bs.modal', function() {
|
refresh();
|
//alert("开始刷新3");
|
})
|
});
|
</script>
|
<!-- 吸片模式切换 -->
|
<script>
|
function getXiPianMoShi() {
|
$.ajax({
|
type : "post",
|
url : "/gmms2/mesview/data/_guanghuahou_manage",
|
dataType : 'json',
|
data : {
|
|
yemian : "钢化后下片位管理",
|
caozuo : "钢化前摆片状态",
|
leixing : "查询",
|
line : group
|
},
|
success : getMSSuccess,
|
error : getMSError
|
});
|
}
|
getXiPianMoShi();
|
|
function getMSSuccess(data) {
|
var d = data;
|
if (d.length > 0) {
|
setXpButton(d[0][0]);
|
}
|
}
|
|
function setXpButton(xpType) {
|
if (xpType == '正常') {
|
$("#xipian").text("正常");
|
$("#xipian").css({
|
'background-color' : 'green'
|
});
|
$("#xipian").attr("data-content", '点击可设置钢化摆片台暂停片!');
|
|
} else {
|
$("#xipian").text("暂停进炉");
|
$("#xipian").css({
|
'background-color' : 'red'
|
});
|
$("#xipian").attr("data-content", '点击可设置钢化摆片台继续摆片!');
|
}
|
$("#xipian").attr("onclick", 'setXiPianMoShi()');
|
|
}
|
|
function getMSError(data) {
|
setXpButton("异常");
|
}
|
|
function setXiPianMoShi(type) {
|
$.ajax({
|
type : "post",
|
url : "/gmms2/mesview/data/_guanghuahou_manage",
|
dataType : 'text',
|
data : {
|
|
yemian : "钢化后下片位管理",
|
caozuo : "钢化前摆片状态切换",
|
line : group,
|
leixing : "修改"
|
},
|
success : function(data) {
|
getXiPianMoShi();
|
},
|
error : function(data) {
|
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("机器手吸片模式切换失败!");
|
$("#cz_Zhuangtai").html("请检查原因!" + data);
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
}
|
});
|
}
|
</script>
|
<!-- 钢化后下片 退库 -->
|
<script>
|
//SSQ 开始
|
var current_tkId;
|
//钢化后下片 退库
|
function GHH_TuiKu(Id, sId) {
|
if (sId == "" || sId == 0) {
|
var tkmsg = "下片位置为空,请刷新页面后再次尝试退出操作!";
|
$("#TK_MsgShow").html(tkmsg);
|
$("#TK_button").attr("style", "display:none;");
|
} else {
|
$("#TK_Id").html(sId);
|
current_tkId = Id;
|
}
|
$('#TK-info').modal('toggle');
|
|
}
|
|
function TK_Submit() {
|
if (current_tkId == "" || current_tkId == 0) {
|
return;
|
}
|
$.ajax({
|
async : true,
|
//cache:false,
|
type : "POST",
|
url : rUrl,
|
dataType : 'text',
|
data : {
|
name : "钢化后下片位退库",
|
Id : current_tkId
|
},
|
success : tkSuccess,
|
error : tkError
|
});
|
}
|
|
function tkSuccess(data) {
|
var d = data;
|
d = d.trim();
|
$('#TK-info').modal('hide');
|
if (d != 1) {
|
tkError;
|
} else {
|
loadTable();
|
}
|
}
|
|
function tkError(data) {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("退库操作");
|
$("#cz_Zhuangtai").html("执行失败,请检查原因!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
}
|
</script>
|
|
<!-- 钢化后下片 清空信息 -->
|
<script>
|
var current_qkId;//当前下片位置
|
function GHH_QingKong(Id, sId) {
|
if (sId == "" || sId == 0) {
|
var tkmsg = "下片位置为空,请刷新页面后再次尝试退出操作!";
|
$("#QK_MsgShow").html(msg);
|
$("#QK_button").attr("style", "display:none;");
|
} else {
|
$("#QK_Id").html(sId);
|
current_qkId = Id;
|
}
|
$('#QK-info').modal('toggle');
|
}
|
|
//清空信息提交
|
function QK_Submit() {
|
if (current_qkId == "" || current_qkId == 0) {
|
return;
|
}
|
$.ajax({
|
type : "POST",
|
url : rUrl,
|
dataType : 'text',
|
data : {
|
name : "钢化后下片位清空信息",
|
Id : current_qkId,
|
//Id : current_qkId
|
},
|
success : qkSuccess,
|
error : qkError
|
});
|
}
|
|
function qkSuccess(data) {
|
var d = data;
|
d = d.trim();
|
$('#QK-info').modal('hide');
|
|
if (d != "1_1") {
|
qkError;
|
} else {
|
|
loadTable();
|
}
|
}
|
function qkError(data) {
|
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("清空信息操作");
|
$("#cz_Zhuangtai").html("执行失败,请检查原因!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
|
}
|
</script>
|
|
<!-- 钢化后小片 绑定架子 -->
|
<script>
|
var bj_id = "";
|
function GHH_BangJia(Id, AB) {
|
bj_id = Id;
|
$.ajax({
|
type : "post",
|
url : rUrl,
|
dataType : 'json',
|
data : {
|
name : "钢化后空架列表",
|
AB : AB
|
},
|
success : getSuccess,
|
error : getError
|
});
|
}
|
|
function getSuccess(data) {
|
var d = data;
|
var html = " <option value='0'>所有可选架子</option>";
|
$("#kj_content").empty();
|
for (var i = 0; i < d.length; i++) {
|
if (d[i][2] == null) {
|
html += " <option value="+d[i][0]+">【" + d[i][0] + "】"
|
+ d[i][1] + "</option>";
|
|
} else {
|
html += " <option value="+d[i][0]+">【" + d[i][0] + "】"
|
+ d[i][1] + "-" + d[i][2] + "</option>";
|
}
|
}
|
document.getElementById("kj_content").innerHTML += html;
|
|
$("#BJ-Info").modal('toggle');
|
}
|
|
function getError(data) {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("获取空料架");
|
$("#cz_Zhuangtai").html("获取失败,请检查原因!\r\n" + data);
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
}
|
|
//绑定架子提交
|
function BJ_Submit() {
|
var jz_h = $("#kj_content").val();
|
if (jz_h > 0) {
|
$.ajax({
|
type : "post",
|
url : "/gmms2/mesview/data/_guanghuahou_manage",
|
dataType : 'text',
|
data : {
|
name : "钢化后绑定料架",
|
Id : bj_id,
|
LJId : jz_h
|
},
|
success : BJSuccess,
|
error : BJError
|
});
|
|
} else {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("绑定料架失败!");
|
$("#cz_Zhuangtai").html("请选择有效的料架号!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
|
}
|
}
|
|
function BJSuccess(data) {
|
var d = data;
|
d = d.trim();
|
$("#BJ-Info").modal('hide');
|
//alert(d);
|
if (d != "1_1") {
|
BJError(d);
|
} else {
|
loadTable();
|
}
|
}
|
function BJError(data) {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("绑定料架失败!");
|
$("#cz_Zhuangtai").html("请检查原因!" + data);
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
}
|
function BJError(Msg) {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("绑定料架失败!");
|
$("#cz_Zhuangtai").html("Error:" + Msg + " 库位信息或料架信息更新失败!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
}
|
</script>
|
|
<script>
|
function change_state(rId, s) {
|
$.ajax({
|
type : 'post',
|
url : rUrl,
|
dataType : 'text',
|
data : {
|
name : "工位状态变更",
|
Id : rId,
|
State : s
|
},
|
success : function(data) {
|
if (data.trim() == 1) {
|
|
loadTable();
|
} else {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("工位状态变更失败!");
|
$("#cz_Zhuangtai").html("请检查原因!" + data);
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
}
|
},
|
error : function(data) {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("工位状态变更失败!");
|
$("#cz_Zhuangtai").html("请检查原因!" + data.responseText);
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
}
|
|
})
|
}
|
</script>
|
|
<!-- 更换班组 -->
|
<script>
|
function getCurrentBanZu() {
|
$.ajax({
|
type : "post",
|
data : {
|
caozuo : "查询",
|
leixing : "当前班组",
|
gongyi : gongyi,
|
line : group
|
},
|
dataType : "json",
|
url : p_url,
|
success : function(data) {
|
$("#s_current_banzu").text(data[0][0]);
|
},
|
error : function(data) {
|
|
}
|
});
|
}
|
</script>
|
|
|
<!-- 初始执行 -->
|
<script>
|
loadTable();
|
getCurrentBanZu();
|
getCiPoInfo();
|
</script>
|
</body>
|
|
|
</html>
|