<%@ 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>
|
var rTime = 5000;//自动刷新间隔时间 单位:毫秒
|
var gh_url = "/gmms2/mesview/data/_guanghuaqian_manage";
|
var yh_url = "/gmms2/mesview/data/_switch_ganghua_mode";
|
var gongyi="钢化";
|
var cPage = "钢化前";
|
|
<%String groups = request.getParameter("group");
|
if (groups == null)
|
groups = "null";
|
out.print("var group=" + groups + ";\r\n");%>
|
</script>
|
|
|
|
<title>钢化前管理-上片位信息</title>
|
</head>
|
<body>
|
<div class="content-wrapper">
|
<div>
|
<section class="content-header">
|
<h1>
|
<span id="groupNum"> </span> 号钢化前管理-上片位信息 <span id=s_title>
|
|
</span> <small>当前班组:</small> <span
|
id="s_current_banzu" style="font-weight: bold;"></span>
|
<button style='background-color: rgb(92, 184, 92)' type='button'
|
class='btn btn-primary ' onclick='onChangeBanZu()'>更换班组</button>
|
|
<small>下一炉可进炉信息:</small>
|
<span data-toggle='popover' data-content='下一炉可进炉的时间,页面加载时获取,可进炉时显示为空,双击可刷新'
|
data-trigger='hover' ondblclick="fn_Next_Time()">预计可进炉时间:<span id="in_f_time" style="color:red;font-weight: bold;"></span></span>
|
<span data-toggle='popover' data-content='可进炉倒计时,倒计时结束后自动获取新的可进炉时间,没有下一炉时显示为0,显示为0时表示可进炉'
|
data-trigger='hover'>可进炉倒计时:<span id="in_f_s" style="color:red;font-weight: bold;"></span> 秒</span>
|
</h1>
|
<ol class="breadcrumb">
|
<!-- <li>
|
<a href="#"><i class="fa fa-reply"></i></a>
|
</li> -->
|
</ol>
|
</section>
|
</div>
|
|
<!-- 下片位信息 -->
|
<div>
|
<section class="content container-fluid">
|
<div class="box" style="overflow: auto;">
|
<div class="box-header">
|
<h3>
|
<small>当前吸片模式</small>
|
<button id="ms_xipian" class="btn btn-lg btn-success"
|
type='button' data-toggle='popover' data-content=''
|
data-trigger='hover' onclick="change_XPState()">吸片</button>
|
<small>当前优化模式</small>
|
|
<button id="ms_youhua" class="btn btn-lg btn-success"
|
type='button' data-toggle='popover' data-content=''
|
data-trigger='hover' onclick="change_mode();">幕墙模式</button>
|
<!-- <button id="sd_youhua" class="btn btn-lg btn-success"
|
type='button' data-toggle='popover' data-content=''
|
data-trigger='hover' onclick="shoudong_mode();">手动优化</button> -->
|
<!-- <button id="ms_youhua" class="btn btn-lg btn-success"
|
type='button' data-toggle='popover' data-content=''
|
data-trigger='hover' onclick="sure_ShangJia()">上架确认</button> -->
|
|
<small> 摆片描述:<strong id="current_bp" style="color: black"></strong>(单位:毫米)
|
</small>
|
<button id="ms_baipian" class="btn btn-lg btn-success"
|
type='button' data-toggle='popover' data-content=''
|
data-trigger='hover' onclick="show_update_bp(1);">修改</button>
|
|
<button class="btn btn-lg btn-success"
|
style="float: right; margin-right: 5%;"
|
onclick="sure_ShangJia()">上架确认</button>
|
</h3>
|
</div>
|
|
<!-- /.box-header -->
|
<div class="box-body no-padding" id="c_detail"></div>
|
</div>
|
<div>
|
<%@ include file="/WEB-INF/views/mes/view/modal_shangjiatuijian.jsp"%>
|
|
</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-lg-4 control-label no-padding-right"
|
style="font-weight: bolder;">选择流程卡号: </label>
|
</h4>
|
|
<div class="col-lg-6 input-group">
|
|
<select id="kj_content" class="span_tasktext form-control"
|
style="font-size: 18px">
|
|
</select>
|
</div>
|
</div>
|
<p style="text-align: center; font-size: 20px">
|
选择流程卡号或手动输入流程卡号</p> -->
|
<div class="form-group">
|
<h4>
|
<label class="col-lg-4 control-label no-padding-right"
|
style="font-weight: bolder;">输入流程卡号: </label>
|
</h4>
|
|
<div class="col-lg-6 input-group">
|
<span class="input-group-addon"
|
style="font-size: 18px; font-weight: bold;">NG</span> <input
|
type="text" class="form-control" style="font-size: 18px"
|
id="txtLCK">
|
</div>
|
</div>
|
|
<div class="form-group">
|
|
<p style="text-align: center; font-size: 20px; color: red"
|
id="set_lckInfo"></p>
|
</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>
|
<br />
|
<p style="font-size: 18px; color: red">
|
清空信息操作会清除的内容:<br /> 1.当前上片位的信息<br /> 2.当前上片位流程卡所包含的玻璃任务
|
</p>
|
</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="DEL-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="DEL_AlertTitle">删除上片位信息操作提示:</h3>
|
</div>
|
<div class="modal-body" style="text-align: left;">
|
<h3 id="DEL_MsgShow">
|
是否确定执行 <span id="DEL_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="DEL_button" onclick="Del_Submit()">确认</button>
|
</div>
|
</div>
|
</div>
|
</form>
|
</div>
|
|
<!-- 修改数量 -->
|
<div class="modal fade" id="UNum-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="UNum_AlertTitle">修改流程卡上片剩余数量:</h3>
|
</div>
|
<div class="modal-body" style="text-align: left;">
|
|
<div class="form-group">
|
<h4>
|
<label class="col-lg-4 control-label no-padding-right"
|
style="font-weight: bolder;">上片位信息: </label>
|
</h4>
|
|
<div class="col-lg-6 input-group">
|
<span class="input-group-addon s-style" id='spw'>1号上片位
|
A面</span>
|
</div>
|
|
|
<h4>
|
<label class="col-lg-4 control-label no-padding-right"
|
style="font-weight: bolder;">流程卡号: </label>
|
</h4>
|
|
<div class="col-lg-6 input-group">
|
<span class="input-group-addon s-style" id='lckN'>NG</span>
|
</div>
|
|
|
<h4>
|
<label class="col-lg-4 control-label no-padding-right"
|
style="font-weight: bolder;">玻璃总数: </label>
|
</h4>
|
|
<div class="col-lg-6 input-group">
|
<span class="input-group-addon s-style" id='zSum'>0</span>
|
</div>
|
|
<h4>
|
<label class="col-lg-4 control-label no-padding-right"
|
style="font-weight: bolder;">完成数量: </label>
|
</h4>
|
|
<div class="col-lg-6 input-group">
|
<span class="input-group-addon s-style" id='oSum'>0</span>
|
</div>
|
|
<h4>
|
<label class="col-lg-4 control-label no-padding-right"
|
style="font-weight: bolder;">破损数量: </label>
|
</h4>
|
|
<div class="col-lg-6 input-group">
|
<span class="input-group-addon s-style" id='pSum'>0</span>
|
</div>
|
|
<h4>
|
<label class="col-lg-4 control-label no-padding-right"
|
style="font-weight: bolder;">未完成数量: </label>
|
</h4>
|
|
<div class="col-lg-6 input-group">
|
<span class="input-group-addon s-style" id='nSum'>0</span>
|
</div>
|
|
<br /> <br />
|
|
<h4>
|
<label class="col-lg-4 control-label no-padding-right"
|
style="font-weight: bolder;">修改剩余数量为: </label>
|
</h4>
|
|
<div class="col-lg-6 input-group">
|
<input type="text" class="form-control" style="font-size: 18px"
|
id="uNum">
|
</div>
|
|
|
<br />
|
<h4 style="text-align: center">
|
<label class="control-label no-padding-right"
|
style="font-weight: bolder; color: red;" id="aMsg"> </label>
|
</h4>
|
</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-danger btn-lg"
|
id="DEL_button" onclick="UNum_Submit()">确认</button>
|
</div>
|
</div>
|
</div>
|
</form>
|
</div>
|
|
<!-- 修改摆片规则 -->
|
<div class="modal fade" id="BP-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="bp-title"
|
style="font-weight: bolder;"></h3>
|
</div>
|
|
<div class="modal-body">
|
<div class="form-group" id="select_bp_moshi">
|
<h4>
|
<label class="col-lg-4 control-label no-padding-right"
|
style="font-weight: bolder;">选择摆片规则: </label>
|
</h4>
|
|
<div class="col-lg-6 input-group">
|
|
<select id="bp-content" class="span_tasktext form-control"
|
style="font-size: 18px">
|
|
</select>
|
</div>
|
|
</div>
|
|
<div class="form-group" id="add_bp_moshi">
|
<div>
|
<h4>
|
<label class="col-lg-4 control-label no-padding-right"
|
style="font-weight: bolder;">描述名: </label>
|
</h4>
|
<input class="col-lg-6" type="text" class="form-control"
|
style="font-size: 18px" id="add-bp-name">
|
</div>
|
<br /> <br />
|
<div>
|
<h4>
|
<label class="col-lg-4 control-label no-padding-right"
|
style="font-weight: bolder;">最大宽度: </label>
|
</h4>
|
<input class="col-lg-6" type="text" class="form-control"
|
style="font-size: 18px" id="add-bp-maxw">
|
</div>
|
<br /> <br />
|
<div>
|
<h4>
|
<label class="col-lg-4 control-label no-padding-right"
|
style="font-weight: bolder;">最大长度: </label>
|
</h4>
|
<input class="col-lg-6" type="text" class="form-control"
|
style="font-size: 18px" id="add-bp-maxl">
|
</div>
|
<br /> <br />
|
<div>
|
<h4>
|
<label class="col-lg-4 control-label no-padding-right"
|
style="font-weight: bolder;">X轴间隔: </label>
|
</h4>
|
<input class="col-lg-6" type="text" class="form-control"
|
style="font-size: 18px" id="add-bp-x">
|
</div>
|
<br /> <br />
|
<div>
|
<h4>
|
<label class="col-lg-4 control-label no-padding-right"
|
style="font-weight: bolder;">Y轴间隔: </label>
|
</h4>
|
<input class="col-lg-6" type="text" class="form-control"
|
style="font-size: 18px" id="add-bp-y">
|
</div>
|
|
|
</div>
|
|
<div class="form-group">
|
|
<p style="text-align: center; font-size: 20px; color: red"
|
id="bp-warring-info"></p>
|
</div>
|
|
</div>
|
<div class="modal-footer">
|
<button type="button" class="btn btn-success btn-lg" style="float:left"
|
id=BP_Del_button onclick="DelBPShow()">删除</button>
|
|
<button type="button" class="btn btn-success btn-lg"
|
id=BP_Add_button onclick="AddBPShow(1)">新增</button>
|
|
<button type="button" class="btn btn-primary btn-lg"
|
data-dismiss="modal">取消</button>
|
|
|
|
<button type="button" class="btn btn-success btn-lg"
|
id="BP_button" onclick="SureBP()">确认</button>
|
</div>
|
</div>
|
</form>
|
</div>
|
</div>
|
|
<%@ 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_ghq_liuchengka.jsp"%>
|
<%@ include file="/WEB-INF/views/mes/view/modal_tishi.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,
|
filter : {}
|
}, {
|
name : "破损数量",
|
binding : 5,
|
filter : {}
|
}, {
|
name : "优化数量",
|
binding : 6,
|
filter : {}
|
}, {
|
name : "完成数量",
|
binding : 7,
|
filter : {}
|
}, {
|
name : "未完成数量",
|
binding : 8,
|
filter : {}
|
}, {
|
name : "上片剩余数量",
|
binding : 9,
|
type : "element",
|
filter : {}
|
}, {
|
name : "AB面",
|
binding : 10,
|
type : "element",
|
filter : {}
|
}, {
|
name : "操作",
|
binding : 13,
|
style : "width:15%;",
|
type : "element",
|
filter : {}
|
} ]
|
};
|
|
//创建表
|
var db = createTable(document.getElementById("c_detail"), opt);
|
var a = true;
|
var t = false;
|
|
//加载表格内容
|
function loadTable() {
|
if (t == false) {
|
document.getElementById("groupNum").innerHTML = group;
|
t = true;
|
}
|
$.ajax({
|
type : "post",
|
data : {
|
name : "上片位信息",
|
moshi : 1,
|
line : group
|
},
|
dataType : "json",
|
url : gh_url,
|
success : loadSuccess,
|
error : loadError
|
});
|
//a = true;
|
}
|
|
function loadSuccess(data) {
|
|
var d = data;
|
|
var rIndex = new Array();
|
for (var i = 0; i < d.length; i++) {
|
|
var s = "";
|
var aorb = d[i][9] == "A" ? 1 : 2;
|
|
//未上架确认的显示删除上片位信息 d[i][12] !=1000
|
//上片完成的显示删除上片位信息
|
if (d[i][12] == 1000 && d[i][9] != 0) {
|
//已经上架确认,还没上片完成
|
s += "<button class='btn btn-large btn-warning' onclick='empty_JiaZi("
|
+ d[i][0]
|
+ ","
|
+ d[i][1]
|
+ ","
|
+ aorb
|
+ ")'>清空任务信息</button>";
|
|
} else if( d[i][2] != null && (d[i][9]==0 || d[i][12] != 1000)){
|
s += "<button class='btn btn-large btn-success' onclick='del_rackInfo("
|
+ d[i][0]
|
+ ","
|
+ d[i][1]
|
+ ","
|
+ aorb
|
+ ","
|
+ d[i][9] + ")'>删除上片位信息</button>";
|
}else{
|
|
}
|
|
|
if (d[i][11] == 0) {
|
d[i][10] = d[i][10]
|
+ " <button class='btn btn-large btn-success' onclick='chanage_Use("
|
+ d[i][1] + ")'>设置使用面</button>";
|
|
} else {
|
|
rIndex.push(i);
|
}
|
|
//操作,rank 为空时
|
if (d[i][2] == null || d[i][2] == "") {
|
|
s += "<button class='btn btn-large btn-success' onclick='set_JiaZi("
|
+ d[i][0] + "," + aorb + ")'>绑定流程卡</button>";
|
} else {
|
if ( d[i][7] == d[i][4] || (d[i][7] + d[i][5] == d[i][4])) {
|
//完成数等于总数 或者 完成数+破损数 = 总数
|
s += "<button class='btn btn-large btn-success' onclick='del_rackInfo("
|
+ d[i][0]
|
+ ","
|
+ d[i][1]
|
+ ","
|
+ aorb
|
+ ","
|
+ d[i][9] + ")'>删除上片位信息</button>";
|
}
|
|
var lckno = d[i][2];
|
if (d[i][12] == 1000) {
|
d[i][2] = d[i][2]
|
+ " <button class='btn btn-large btn-success' onclick='look_detail(\""
|
+ d[i][2]+"\")'>查看详情</button>";
|
|
}
|
|
d[i][9] = d[i][9]
|
+ " <button class='btn btn-large btn-success' onclick='update_Num("
|
+ d[i][0] + ")'>修改</button>";
|
|
}
|
|
|
|
var a = d[i];
|
a.push(s);
|
d[i][7] = d[i][4] - d[i][5] - d[i][8];
|
|
}
|
|
if(group==2){
|
d.splice(1, 1)
|
d.splice(2, 1)
|
d.splice(3, 1)
|
}
|
|
db.update(d);
|
for ( var r in rIndex) {
|
$("table tbody tr").eq(rIndex[r]).css('background', 'darkgray');
|
}
|
}
|
|
function loadError(data) {
|
|
var d = data;
|
|
/* if (a == true) {
|
setTimeout(loadTable, 5000);
|
a = false;
|
} */
|
}
|
|
//InitLoad();
|
</script>
|
|
<!-- 吸片模式 吸片状态 -->
|
<script>
|
var c_xp_state;//当前吸片状态 1吸片2不吸片
|
function fn_current_XPState() {
|
$.ajax({
|
type : "post",
|
data : {
|
name : "吸片模式",
|
line : group,
|
moshi : 1
|
},
|
dataType : 'json',
|
url : gh_url,
|
success : function(data) {
|
var d = data;
|
if (d.length > 0) {
|
setXpButton(d[0][0]);
|
}
|
},
|
error : function(data) {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("查询当前机械臂吸片状态:");
|
$("#cz_Zhuangtai").html("查询失败!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("请检查原因后刷新页面!" + data);
|
setXpButton(0);
|
}
|
})
|
}
|
|
function change_XPState(s) {
|
$.ajax({
|
type : "post",
|
data : {
|
name : "吸片模式切换",
|
line : group,
|
moshi : 2
|
},
|
dataType : 'text',
|
url : gh_url,
|
success : function(data) {
|
var d = data;
|
if (d > 0) {
|
setXpButton(s);
|
} else {
|
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("机械臂吸片状态切换:");
|
$("#cz_Zhuangtai").html("切换失败!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("请检查原因后刷新页面!" + d);
|
}
|
},
|
error : function(data) {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("查询当前机械臂吸片状态:");
|
$("#cz_Zhuangtai").html("查询失败!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("请检查原因后刷新页面!" + data);
|
setXpButton(0);
|
}
|
})
|
|
}
|
|
function setXpButton(num) {
|
|
if (num == 1) {
|
c_xp_state = 1;
|
$("#ms_xipian").attr("onclick", 'change_XPState(2)');
|
$("#ms_xipian").css({
|
'background-color' : '#5cb85c'
|
});
|
$("#ms_xipian").text("吸片");
|
$("#ms_xipian").attr("data-content", '点击可设置当前机器手暂停吸片!');
|
|
} else if (num == 2) {
|
c_xp_state = 2;
|
$("#ms_xipian").attr("onclick", 'change_XPState(1)');
|
$("#ms_xipian").css({
|
'background-color' : '#d9534f'
|
});
|
$("#ms_xipian").text("不吸片");
|
$("#ms_xipian").attr("data-content", '点击可设置当前机器手继续吸片!');
|
} else {
|
$("#ms_xipian").attr("onclick", '#');
|
$("#ms_xipian").css({
|
'background-color' : '#d9534f'
|
});
|
$("#ms_xipian").text("异常");
|
$("#ms_xipian").attr("data-content", '吸片模式获取异常,请检查原因!');
|
}
|
}
|
</script>
|
|
<!-- 设置使用面 -->
|
<script>
|
function chanage_Use(sId) {
|
$.ajax({
|
type : "post",
|
data : {
|
name : "设置使用面",
|
moshi : 2,
|
line : group,
|
Id : sId
|
},
|
datatype : "text",
|
url : gh_url,
|
success : function(data) {
|
if (data == 2) {
|
loadTable();
|
} else {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("设置使用面:");
|
$("#cz_Zhuangtai").html("可能设置异常!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("设置使用面异常,返回修改的数值:" + data);
|
}
|
},
|
error : function(data) {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("设置使用面:");
|
$("#cz_Zhuangtai").html("设置异常!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("请检查数据连接!" + data);
|
}
|
})
|
|
}
|
</script>
|
|
<!-- 清空信息 -->
|
<script>
|
var current_qkId;//当前位置
|
|
//清空信息提交
|
function QK_Submit() {
|
if (current_qkId == "" || current_qkId == 0) {
|
return;
|
}
|
$.ajax({
|
type : "post",
|
url : gh_url,
|
dataType : 'text',
|
data : {
|
name : "清空信息",
|
Id : current_qkId,
|
moshi : 4,
|
line : group
|
},
|
success : qkSuccess,
|
error : qkError
|
});
|
}
|
|
function qkSuccess(data) {
|
var d = data;
|
d = d.trim();
|
$('#QK-info').modal('hide');
|
if (d != 1) {
|
qkError;
|
} else {
|
loadTable();
|
}
|
}
|
function qkError(data) {
|
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("清空信息操作");
|
$("#cz_Zhuangtai").html("执行失败,请检查原因!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
|
}
|
|
function empty_JiaZi(Id, sId, AorB) {
|
|
if (Id == "" || Id == 0) {
|
var tkmsg = "上片位编号为空,请刷新页面后再次尝试退出操作!";
|
$("#QK_MsgShow").html(msg);
|
$("#QK_button").attr("style", "display:none;");
|
} else {
|
|
var s = sId + " 号上片位 ";
|
s += AorB == 1 ? 'A' : 'B';
|
s += " 面";
|
$("#QK_Id").html(s);
|
current_qkId = Id;
|
$('#QK-info').modal('toggle');
|
|
|
/* $.ajax({
|
type : "post",
|
data : {
|
name : "换架判断",
|
moshi : 1,
|
line : group,
|
Id : Id
|
},
|
dataType : 'json',
|
url : gh_url,
|
success : function(data) {
|
var d = data;
|
if (d > 0) {
|
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("清空信息:");
|
$("#cz_Zhuangtai").html("不允许清空!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("当前流程卡中存在已经优化或已经完成的玻璃");
|
} else {
|
var s = sId + " 号上片位 ";
|
s += AorB == 1 ? 'A' : 'B';
|
s += " 面";
|
$("#QK_Id").html(s);
|
current_qkId = Id;
|
$('#QK-info').modal('toggle');
|
}
|
},
|
error : function(data) {
|
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("清空信息:");
|
$("#cz_Zhuangtai").html("清空信息失败!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html(data);
|
}
|
}) */
|
}
|
}
|
</script>
|
|
<!-- 绑定架子 -->
|
<script>
|
var bj_id = "";
|
function set_JiaZi(Id, AB) {
|
bj_id = Id;
|
/* $.ajax({
|
type : "post",
|
url : gh_url,
|
dataType : 'json',
|
data : {
|
name : "获取流程卡",
|
//AB : AB
|
moshi : 1,
|
line : group
|
},
|
success : getSuccess,
|
error : getError
|
}); */
|
|
$("#txtLCK").val("");
|
$("#BJ-Info").modal('toggle');
|
|
}
|
|
function getSuccess(data) {
|
var d = data;
|
var html = " <option vaule='0'>可选流程卡</option>";
|
$("#kj_content").empty();
|
for (var i = 0; i < d.length; i++) {
|
html += " <option vaule="+d[i][0]+">" + d[i][0] + "-" + d[i][1]
|
+ "</option>";
|
}
|
document.getElementById("kj_content").innerHTML += html;
|
$("#txtLCK").val("");
|
$("#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 lck = $("#txtLCK").val();
|
|
var liuchengkahao = "";
|
if (lck == null || lck == "") {
|
$("#set_lckInfo").html("异常:未选择或输入流程卡号!<br>请选择或输入流程卡号后再次尝试点击确认!");
|
return;
|
}
|
|
if (lck.indexOf("NG") == 0) {
|
|
liuchengkahao = lck;
|
} else if (lck.indexOf("NG") == -1) {
|
|
liuchengkahao = "NG" + $("#txtLCK").val();
|
} else {
|
liuchengkahao = "";
|
}
|
|
if (liuchengkahao != null && liuchengkahao != "") {
|
$.ajax({
|
type : "post",
|
url : gh_url,
|
dataType : 'text',
|
data : {
|
name : "绑定流程卡",
|
Id : bj_id,
|
lckNum : liuchengkahao,
|
moshi : 3
|
},
|
success : BJSuccess,
|
error : BJError
|
});
|
} else {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("绑定料架失败!");
|
$("#cz_Zhuangtai").html("请选择或输入有效的流程卡号!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("当前输入的流程卡号:" + lck);
|
|
}
|
}
|
|
function BJSuccess(data) {
|
var d = data;
|
d = d.trim();
|
if (d.substring(0,1)!='1') {
|
BJError(d);
|
} else {
|
loadTable();
|
$("#BJ-Info").modal('hide');
|
}
|
}
|
function BJError(data) {
|
var lck = $("#txtLCK").val();
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("绑定料架失败!");
|
$("#cz_Zhuangtai").html("请检查原因!" + data);
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("当前输入的流程卡号:" + lck);
|
}
|
function BJError(Msg) {
|
var lck = $("#txtLCK").val();
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("绑定料架失败!");
|
$("#cz_Zhuangtai").html("<br/>错误位置:"+Msg.substring(0,1)+"<br\>"+Msg.substring(2));
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("当前输入的流程卡号:NG" + lck);
|
}
|
</script>
|
|
<!-- 换绑架子 -->
|
<script>
|
function chanage_JiaZi(Id, sId) {
|
$.ajax({
|
type : "post",
|
data : {
|
name : "换架判断",
|
moshi : 1,
|
line : group,
|
Id : Id
|
},
|
dataType : 'json',
|
url : gh_url,
|
success : function(data) {
|
var d = data;
|
if (d > 0) {
|
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("换绑料架:");
|
$("#cz_Zhuangtai").html("不允许换绑!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("当前流程卡中存在已经优化或已经完成的玻璃");
|
} else {
|
set_JiaZi(Id, "");
|
}
|
},
|
error : function(data) {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("换绑料架:");
|
$("#cz_Zhuangtai").html("换绑请求失败!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html(data.responseText);
|
}
|
|
})
|
}
|
</script>
|
|
<!-- 上架确认 -->
|
<script>
|
function sure_ShangJia() {
|
|
var rN = $("#c_detail table tbody tr").length;
|
if (rN == 0 || rN < 0) {
|
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("上架确认:");
|
$("#cz_Zhuangtai").html("上架确认异常!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("没有有效的数据");
|
return;
|
}
|
|
$.ajax({
|
type : "post",
|
data : {
|
moshi : 3,
|
line : group,
|
name : "上架确认"
|
},
|
dataType : 'json',
|
url : gh_url,
|
success : function(data) {
|
if (data != 1) {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("上架确认:");
|
$("#cz_Zhuangtai").html("上架确认异常!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi")
|
.html(
|
"返回值:"
|
+ data
|
+ ",请检查 函数:GlassTask_ganghuaqian 中的相应位置是否存在问题;");
|
} else {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("上架确认:");
|
$("#cz_Zhuangtai").html("上架确认成功!");
|
$("#cz_Zhuangtai")
|
.attr("style", "color:green;");
|
$("#cz_mingxi").html("上架确认执行成功!");
|
|
loadTable();
|
}
|
|
},
|
error : function(data) {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("上架确认:");
|
$("#cz_Zhuangtai").html("上架确认异常!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("返回内容:"+ data.responseText);
|
|
}
|
})
|
}
|
</script>
|
|
<!-- 钢化优化模式 -->
|
<script>
|
function get_guanghua_mode() {
|
$.ajax({
|
type : "post",
|
url : yh_url,
|
data : {
|
line : group,
|
caozuo : "获取"
|
},
|
|
success : function(data) {
|
showMode(data);
|
},
|
error : function(data) {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("查询优化模式:");
|
$("#cz_Zhuangtai").html("获取失败!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("请检查原因后刷新页面!" + data);
|
}
|
|
})
|
|
}
|
|
function change_mode() {
|
|
$.ajax({
|
type : "post",
|
url : yh_url,
|
data : {
|
line : group,
|
caozuo : "切换"
|
},
|
success : function(data) {
|
//window.location.reload();
|
showMode(data);
|
},
|
error : function(data) {
|
//window.location.reload();
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("切换优化模式:");
|
$("#cz_Zhuangtai").html("切换失败!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("请检查原因后刷新页面!" + data);
|
}
|
});
|
|
}
|
function shoudong_mode() {
|
|
$.ajax({
|
type : "post",
|
url : yh_url,
|
data : {
|
line : group,
|
caozuo : "优化"
|
},
|
success : function(data) {
|
//window.location.reload();
|
//showMode(data);
|
},
|
error : function(data) {
|
/* //window.location.reload();
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("手动优化:");
|
$("#cz_Zhuangtai").html("优化失败!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("请检查原因后刷新页面!" + data); */
|
}
|
});
|
|
}
|
|
function showMode(state) {
|
if (state == true) {
|
$("#ms_youhua").text("普通模式");
|
$("#ms_youhua").css({
|
'background-color' : '#5cb85c'
|
});
|
} else if (state == false) {
|
$("#ms_youhua").text("幕墙模式");
|
$("#ms_youhua").css({
|
'background-color' : '#f0ad4e'
|
});
|
} else {
|
$("#ms_youhua").text("异常");
|
$("#ms_youhua").css({
|
'background-color' : '#d9534f'
|
});
|
}
|
$("#ms_youhua").attr("data-content", '点击可切换当前优化模式!');
|
}
|
</script>
|
|
<!-- 页面,刷新,停止刷新 -->
|
<script>
|
var xs = true;
|
function isShow() {
|
if (xs == true) {
|
$("#glass_detail").attr("style", "display:none");
|
$("#switchShow").html("显示当前吸片玻璃尺寸");
|
xs = false;
|
|
} else {
|
$("#glass_detail").attr("style", "");
|
$("#switchShow").html("不显示当前吸片玻璃尺寸");
|
xs = true;
|
}
|
}
|
|
//提示气泡
|
$(document).ready(function() {
|
$('[data-toggle="popover"]').popover();
|
});
|
|
//绑架流程卡选择变更
|
$(document).ready(function() {
|
$('#kj_content').change(function() {
|
var p1 = $(this).children('option:selected').val();//这就是selected的值
|
//var p2 = $(this).children('option:selected').text();//获取本页面其他标签的值
|
|
var c = p1.indexOf('-');
|
if (c > 0) {
|
$("#txtLCK").val(p1.substring(2, c));
|
} else {
|
$("#txtLCK").val("");
|
}
|
})
|
})
|
|
//页面定时刷新 暂停 恢复
|
var interval = setInterval('loadTable()', rTime);//定时刷新
|
function refresh() {
|
interval = setInterval('loadTable()', rTime);//刷新恢复
|
}
|
|
function stopRefresh() {
|
clearInterval(interval);//停止刷新
|
}
|
|
//#DEL-info
|
|
var st_xp;//是否自动停止吸片
|
$(function() {
|
|
$('#QK-info').on('show.bs.modal', function() {
|
stopRefresh();
|
if (c_xp_state == 1) {
|
change_XPState(2);
|
st_xp = 1;
|
}
|
});
|
|
$('#BJ-Info').on('show.bs.modal', function() {
|
stopRefresh();
|
})
|
|
$('#QK-info').on('hide.bs.modal', function() {
|
refresh();
|
if (st_xp == 1) {
|
change_XPState(1);
|
st_xp = 0;
|
}
|
});
|
|
|
|
|
$('#BJ-Info').on('hide.bs.modal', function() {
|
refresh();
|
})
|
|
$('#DEL-info').on('show.bs.modal', function() {
|
stopRefresh();
|
})
|
|
$('#DEL-info').on('hide.bs.modal', function() {
|
refresh();
|
})
|
|
$('#BP-Info').on('show.bs.modal', function() {
|
stopRefresh();
|
})
|
|
$('#BP-Info').on('hide.bs.modal', function() {
|
refresh();
|
})
|
});
|
</script>
|
|
|
|
<script>
|
|
|
function set_glass_posun(glassId, sId) {
|
$.ajax({
|
type : "post",
|
data : {
|
moshi : 2,
|
Id : glassId,
|
name : "设置破损",
|
line : group
|
},
|
url : gh_url,
|
dataType : "text",
|
success : function(data) {
|
var d = data;
|
if (data == 1) {
|
LoadLCKTable(sId);
|
} else if (data > 1) {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("设置玻璃破损:");
|
$("#cz_Zhuangtai").html("设置可能存在异常!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html(
|
"玻璃编号:" + glassId + ",返回值:" + data
|
+ ",可能修改了多条数据,请检查原因!");
|
|
} else {
|
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("设置玻璃破损:");
|
$("#cz_Zhuangtai").html("设置可能失败!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html(
|
"玻璃编号:" + glassId + ",返回值:" + data
|
+ ",设置可能失败,请检查原因!");
|
}
|
},
|
error : function(data) {
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("设置玻璃破损:");
|
$("#cz_Zhuangtai").html("设置失败!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html(
|
"玻璃编号:" + glassId + ",请检查原因后刷新页面!" + data);
|
|
}
|
})
|
}
|
</script>
|
|
<!-- 删除上片位信息 -->
|
<script>
|
var del_id;
|
var cu_sNum;
|
function del_rackInfo(Id, sId, AorB, sNum) {
|
if (Id == "" || Id == 0) {
|
var tkmsg = "上片位编号为空,请刷新页面后再次尝试退出操作!";
|
$("#DEL_MsgShow").html(msg);
|
$("#DEL_button").attr("style", "display:none;");
|
} else {
|
var s = sId + " 号上片位 ";
|
s += AorB == 1 ? 'A' : 'B';
|
s += " 面";
|
$("#DEL_Id").html(s);
|
del_id = Id;
|
cu_sNum = sNum;
|
$('#DEL-info').modal('toggle');
|
|
}
|
}
|
|
function Del_Submit() {
|
if (del_id == "" || del_id == 0) {
|
return;
|
}
|
var ms = 2;
|
if (cu_sNum != 0) {
|
|
ms = 4;
|
}
|
|
$.ajax({
|
type : "post",
|
url : gh_url,
|
dataType : 'text',
|
data : {
|
name : "删除上片位信息",
|
Id : del_id,
|
moshi : ms,
|
line : group
|
},
|
success : delSuccess,
|
error : delError
|
});
|
}
|
|
function delSuccess(data) {
|
var d = data;
|
d = d.trim();
|
$('#DEL-info').modal('hide');
|
if (d != 1) {
|
delError;
|
} else {
|
loadTable();
|
}
|
}
|
function delError(data) {
|
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("清空信息操作");
|
$("#cz_Zhuangtai").html("执行失败,请检查原因!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
|
}
|
</script>
|
|
<!-- 修改上片剩余数量 -->
|
<script>
|
//UNum-info
|
var zong_num;
|
var current_gwId;
|
function update_Num(Id) {
|
current_gwId = Id;
|
$.ajax({
|
type : "post",
|
url : gh_url,
|
dataType : 'json',
|
data : {
|
name : "工位信息",
|
Id : Id,
|
moshi : 1
|
},
|
success : function(data) {
|
|
var d = data;
|
zong_num = d[0][2];
|
$("#spw").html(d[0][0] + " 号上片位 " + d[0][5] + " 面");
|
$("#lckN").html(d[0][1]);
|
$("#zSum").html(d[0][2]);
|
$("#oSum").html(d[0][2] - d[0][3] - d[0][4]);
|
$("#pSum").html(d[0][3]);
|
$("#nSum").html(d[0][4]);
|
$("#uNum").val(null);
|
$("#aMsg").html("");
|
|
$('#UNum-info').modal('toggle');
|
|
},
|
error : function(data) {
|
|
$('#UNum-info').modal('toggle');
|
|
$("#aMsg").html("获取工位信息失败:" + data);
|
}
|
|
});
|
|
}
|
|
|
function UNum_Submit(){
|
var v = $('#uNum').val();
|
if(isIntNum(v)){
|
if(v>zong_num){
|
$('#uNum').focus();
|
$("#aMsg").html("输入的剩余上片数量不能大于总数量!");
|
}else{
|
|
$("#aMsg").html("");
|
|
$.ajax({
|
type:'post',
|
url:gh_url,
|
dataType:'text',
|
data:{
|
name:"修改数量",
|
Id:current_gwId,
|
U_Num:v,
|
moshi:2
|
},success:function(data){
|
var d= data.trim();
|
if(d = 1){
|
$('#UNum-info').modal('hide');
|
loadTable();
|
}
|
},error:function(data){
|
|
$('#uNum').focus();
|
$("#aMsg").html("修改失败,失败原因:"+data);
|
}
|
|
});
|
}
|
}else{
|
$('#uNum').focus();
|
$("#aMsg").html("修改失败,剩余上片数量应为非负整数!");
|
}
|
|
}
|
|
/**
|
|
* 校验正负正数就返回true
|
|
**/
|
|
function isIntNum(val){
|
|
//var regPos = / ^\d+$/; // 非负整数
|
var regPos = /(^[0-9]\d*$)/;
|
|
/* var regNeg = /^\-[1-9][0-9]*$/; // 负整数
|
if(regPos.test(val) && regNeg.test(val)){
|
return true;
|
}else{
|
return false;
|
} */
|
if(regPos.test(val)){
|
return true;
|
}else{
|
return false;
|
}
|
}
|
|
</script>
|
|
<!-- 摆片模式 -->
|
<script>
|
function fn_current_BP_moshi(){
|
$.ajax({
|
type : "post",
|
url : gh_url,
|
dataType : 'json',
|
data : {
|
name : "当前摆片",
|
line : group,
|
moshi : 1
|
},
|
success:function(data){
|
d = data;
|
var dec = "宽:"+d[0][0]+" 长:"+d[0][1]+" X轴间隔:"+d[0][2]+" Y轴间隔:"+d[0][3];
|
$("#current_bp").html(dec);
|
|
},
|
error:function(data){
|
|
|
}
|
});
|
|
}
|
|
|
|
var d ;
|
function show_update_bp(isshow) {
|
d = null;
|
|
$("#add_bp_moshi").css('display','none');
|
$.ajax({
|
type : "post",
|
url : gh_url,
|
dataType : 'json',
|
data : {
|
name : "摆片规则",
|
line : group,
|
moshi : 1
|
},
|
success:function(data){
|
d = data;
|
var html = " <option value='0'>选择摆片规则</option>";
|
$("#bp-content").empty();
|
for (var i = 0; i < d.length; i++) {
|
if(d[i][6] == group){
|
html += " <option selected=\"selected\" style=\"background-color :#5cb85c\" value="+d[i][0]+">"+d[i][0]+"_"+d[i][5]+" "+d[i][1]+"*"+d[i][2]+" X轴间隔"+d[i][3]+" Y轴间隔"+d[i][4] + "</option>";
|
}else{
|
html += " <option value="+d[i][0]+">" +d[i][0]+"_"+d[i][5]+" "+d[i][1]+"*"+d[i][2]+" X轴间隔"+d[i][3]+" Y轴间隔"+d[i][4] + "</option>";
|
}
|
}
|
document.getElementById("bp-content").innerHTML += html;
|
|
AddBPShow(2,isshow);
|
},
|
error:function(data){
|
|
|
}
|
});
|
//$("#BP-Info").modal("toggle");
|
}
|
|
function AddBPShow(type,isshow){
|
if(type==1){
|
$("#bp-title").html("新增钢化前摆片规则:")
|
$("#BP_Add_button").html("去选择");
|
$('#BP_Add_button').attr('onclick','AddBPShow(2,0)');
|
$("#add_bp_moshi").css('display','');
|
$("#select_bp_moshi").css('display','none');
|
$("#BP_button").attr('onclick','InsertBP()');
|
//$("#bp-warring-info").html("");
|
|
}else{
|
|
$("#bp-warring-info").html("");
|
$("#bp-title").html(group+" 号钢化线摆片规则选择:");
|
$("#BP_Add_button").html("新增");
|
$("#BP_Add_button").attr('onclick','AddBPShow(1)');
|
$("#add_bp_moshi").css('display','none');
|
$("#select_bp_moshi").css('display','');
|
$("#BP_button").attr('onclick','SureBP()');
|
//$("#bp-warring-info").html("");
|
if(isshow==1){
|
$("#BP-Info").modal('toggle');
|
}
|
|
}
|
}
|
|
|
function SureBP(){
|
var bpId = $("#bp-content").val();
|
$.ajax({
|
type : "post",
|
url : gh_url,
|
dataType : 'text',
|
data : {
|
name : "摆片修改",
|
line : group,
|
moshi : 3,
|
Id:bpId
|
},
|
success:function(data){
|
var d = data.trim();
|
if(d.indexOf("1") != -1){
|
fn_current_BP_moshi();
|
$("#BP-Info").modal('hide');
|
|
}else{
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("设置摆片模式:");
|
$("#cz_Zhuangtai").html("设置失败!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("请检查原因后刷新页面!" + data);
|
}
|
|
},
|
error:function(data){
|
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("设置摆片模式:");
|
$("#cz_Zhuangtai").html("设置失败!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("请检查原因后刷新页面!" + data.responseText);
|
}
|
});
|
}
|
|
function InsertBP() {
|
var n = $("#add-bp-name").val().trim();
|
if (n == null || n == ""||n.indexOf("_")!=-1) {
|
$("#add-bp-name").focus();
|
$("#bp-warring-info").html("请输入正确的描述名,描述名不可为空,不可包含‘_\/'\"~’等特殊字符!");
|
return;
|
}
|
var w = $("#add-bp-maxw").val();
|
if (!isIntNum(w)||w == null || w == "") {
|
$("#add-bp-maxw").focus();
|
$("#bp-warring-info").html("最大宽度为正整数,且不可为空,请重新输入");
|
return;
|
}
|
var l = $("#add-bp-maxl").val();
|
if (!isIntNum(l)||l == null || l == "") {
|
$("#add-bp-maxl").focus();
|
$("#bp-warring-info").html("最大长度为正整数,且不可为空,请重新输入");
|
return;
|
}
|
var x = $("#add-bp-x").val();
|
if (!isIntNum(x)||x == null || x == "") {
|
$("#add-bp-x").focus();
|
$("#bp-warring-info").html("X间隔为正整数,且不可为空,请重新输入");
|
return;
|
}
|
var y = $("#add-bp-y").val();
|
if (!isIntNum(y)||y == null || y == "") {
|
$("#add-bp-y").focus();
|
$("#bp-warring-info").html("Y间隔为正整数,且不可为空,请重新输入");
|
return;
|
}
|
|
$.ajax({
|
type : 'post',
|
url : gh_url,
|
dataType : 'text',
|
data : {
|
name : "摆片新增",
|
line : group,
|
moshi : 2,
|
bpms : n + "_" + w + "_" + l + "_" + x + "_" + y
|
|
},
|
success : function(data) {
|
$("#bp-warring-info").html("新增成功!!!");
|
$("#bp-warring-info").css("color","green");
|
show_update_bp(2,0);
|
},
|
error : function(data) {
|
|
$("#bp-warring-info").html("新增失败:"+ data.responseText);
|
$("#bp-warring-info").css("color","red");
|
}
|
|
});
|
|
}
|
|
function DelBPShow(){
|
|
var bpId = $("#bp-content").val();
|
if(bpId==0){
|
|
$("#bp-warring-info").text("未选择摆片规则,请选择摆片规则后在执行删除操作");
|
return;
|
}
|
|
$.ajax({
|
type : "post",
|
url : gh_url,
|
dataType : 'text',
|
data : {
|
name : "删除摆片规则",
|
line : group,
|
moshi : 2,
|
Id:bpId
|
},
|
success:function(data){
|
var d = data.trim();
|
if(d.indexOf("1") != -1){
|
show_update_bp();
|
|
}else{
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("删除摆片规则:");
|
$("#cz_Zhuangtai").html("失败!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("请检查原因后刷新页面!" + data);
|
}
|
},
|
error:function(data){
|
|
$("#CZ_Msg").modal('toggle');
|
$("#cz_Ming").html("删除摆片规则:");
|
$("#cz_Zhuangtai").html("失败!");
|
$("#cz_Zhuangtai").attr("style", "color:red;");
|
$("#cz_mingxi").html("请检查原因后刷新页面!" + data.responseText);
|
}
|
});
|
}
|
</script>
|
|
<!-- 显示时间 -->
|
<script>
|
var nextTime;
|
function fn_Next_Time(){
|
$.ajax({
|
type : "post",
|
url : gh_url,
|
dataType : 'json',
|
data : {
|
name : "进炉时间",
|
line : group,
|
moshi : 1
|
},
|
success:function(data){
|
d = data;
|
nextTime = d[0][0];
|
$("#in_f_time").text(d[0][0]);
|
countDate(d[0][0]);
|
},
|
error:function(data){
|
|
}
|
});
|
};
|
|
function countDate(){
|
var daojishi;
|
var nts = new Date(nextTime).getTime();//下一炉进炉时间
|
var cts = new Date().getTime();//当前时间
|
var diff = Math.ceil((nts-cts)/1000);//时间差,向上取正,取秒
|
if(diff<=0 && diff>=-5){
|
//当倒计时结束后获取新的下一炉进炉时间
|
fn_Next_Time();
|
|
}else if(diff <-5){
|
clearTimeout(daojishi);
|
$("#in_f_time").text("");
|
$("#in_f_s").text(0);
|
}else{
|
$("#in_f_s").text(diff);
|
daojishi = window.setTimeout("countDate()", 1000);
|
}
|
}
|
</script>
|
|
|
<!-- 更换班组 -->
|
<!--
|
<script>
|
function getCurrentBanZu(){
|
$.ajax({
|
type : "post",
|
data : {
|
caozuo : "查询",
|
leixing : "当前班组",
|
gongyi : gongyi,
|
line : group
|
},
|
dataType : "json",
|
url : p_url,
|
success : function(data) {
|
current_bz = data[0][0];
|
$("#s_current_banzu").text(data[0][0]);
|
},
|
error : function(data) {
|
|
}
|
});
|
|
$.ajax({
|
type : "post",
|
data : {
|
caozuo : "查询",
|
leixing : "班组列表",
|
gongyi : gongyi,
|
line : group
|
},
|
dataType : "json",
|
url : p_url,
|
success : function(data) {
|
|
d = data;
|
var html = " <option selected=\"selected\" value='0'>选择班组</option>";
|
$("#s_banzu").empty();
|
for (var i = 0; i < d.length; i++) {
|
html += " <option value="+d[i][0]+">"
|
+ d[i][0] + "</option>";
|
}
|
document.getElementById("s_banzu").innerHTML += html;
|
|
//AddBPShow(2,isshow);
|
|
},
|
error : function(data) {
|
|
}
|
});
|
}
|
|
|
|
function onChangeBanZu() {
|
$("#div_banzu").modal('toggle');
|
//$("#s_banzu").selectedIndex= 0;
|
}
|
|
function OK_Submit(type) {
|
|
switch (type) {
|
case "班组":
|
setBanZu();
|
break;
|
case "次破":
|
setCiPo();
|
break;
|
default:
|
;
|
}
|
}
|
|
function setBanZu() {
|
|
var bz = $("#s_banzu").val();
|
if (bz == 0) {
|
$("#bz-warring-info").text("请选择正确的班组");
|
return;
|
}
|
$.ajax({
|
type : "post",
|
data : {
|
caozuo : "修改",
|
leixing : "变更班组",
|
line : group,
|
gongyi : gongyi,
|
info : bz
|
|
},
|
url : p_url,
|
dataType : 'text',
|
success : function(data) {
|
if (data == 1) {
|
current_bz = bz;
|
$("#s_current_banzu").text(bz);
|
$("#div_banzu").modal('toggle');
|
return;
|
} else {
|
$("#bz-warring-info").text("班组变更失败,请检查原因:" + data);
|
}
|
},
|
error : function(data) {
|
$("#bz-warring-info").text("班组变更异常,请检查原因:" + data);
|
}
|
})
|
|
}
|
|
</script> -->
|
|
<!-- 初始执行 -->
|
<script>
|
fn_current_XPState();//当前机械臂吸片模式
|
get_guanghua_mode();//获取钢化优化模式
|
fn_current_BP_moshi();
|
fn_Next_Time();
|
getCiPoInfo();
|
//getCurrentBanZu();
|
loadTable();//表内容加载
|
</script>
|
|
</body>
|
|
|
</html>
|