| | |
| | | <link rel="stylesheet" type="text/css" href="../static/css/crn.css"> |
| | | <script type="text/javascript" src="../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/js/common.js"></script> |
| | | <script type="text/javascript" src="../static/js/layer/layer.js"></script> |
| | | <style> |
| | | |
| | | </style> |
| | |
| | | </div> |
| | | <!-- 手动操作 --> |
| | | <div class="crn-operation"> |
| | | |
| | | <!-- 遮罩层 --> |
| | | <div class="crn-operation-shade"> |
| | | <span class="crn-operation-shade-span"> |
| | | WCS 系统运行中,请停止后操作 |
| | | </span> |
| | | </div> |
| | | |
| | | <!-- 设备任务选择 --> |
| | | <div class="task-select"> |
| | |
| | | getCrnStateInfo(); |
| | | initCrnMsgTable(); |
| | | getCrnMsgInfo(); |
| | | operatorBlockShow(); |
| | | }); |
| | | // 数据更新 |
| | | setInterval(function () { |
| | |
| | | },1000); |
| | | setInterval(function () { |
| | | getSiteOutput(); |
| | | operatorBlockShow(); |
| | | },500); |
| | | |
| | | // 判断手动操作模块是否可用 |
| | | function operatorBlockShow() { |
| | | if (parent.systemRunning) { |
| | | $('.crn-operation').css("opacity", "0.5"); |
| | | $('.crn-operation-shade').show(); |
| | | $('.crn-operation-shade-span').show(); |
| | | } else { |
| | | $('.crn-operation').css("opacity", "1"); |
| | | $('.crn-operation-shade').hide(); |
| | | $('.crn-operation-shade-span').hide(); |
| | | } |
| | | } |
| | | |
| | | // 获取堆垛机执行中的命令 |
| | | function getCommandLog() { |
| | |
| | | $("#crn"+commands[i].crnNo).val(commands[i].command); |
| | | } |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/login"; |
| | | window.location.href = baseUrl + "/login"; |
| | | } else { |
| | | alert(res.msg); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | // 堆垛机信息表获取 ---- 表一 |
| | | function getCrnStateInfo() { |
| | |
| | | setVal(tr.children("td").eq(12), table[i-1].warnCode); |
| | | } |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/login"; |
| | | window.location.href = baseUrl+"/login"; |
| | | } else { |
| | | alert(res.msg); |
| | | } |
| | |
| | | setVal(tr.children("td").eq(9), table[i-1].command); |
| | | } |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/login"; |
| | | window.location.href = baseUrl+"/login"; |
| | | } else { |
| | | alert(res.msg); |
| | | } |
| | |
| | | // 入库 |
| | | function put() { |
| | | http.post(baseUrl+"/crn/operator/put", getReqParam(), function (res) { |
| | | alert(res.msg); |
| | | layer.msg(res.msg); |
| | | }); |
| | | } |
| | | |
| | | // 出库 |
| | | function take() { |
| | | http.post(baseUrl+"/crn/operator/take", getReqParam(), function (res) { |
| | | alert(res.msg); |
| | | layer.msg(res.msg); |
| | | }); |
| | | } |
| | | |
| | | // 库位转移 |
| | | function stockMove() { |
| | | http.post(baseUrl+"/crn/operator/stockMove", getReqParam(), function (res) { |
| | | alert(res.msg); |
| | | layer.msg(res.msg); |
| | | }); |
| | | } |
| | | |
| | | // 站到站 |
| | | function siteMove() { |
| | | http.post(baseUrl+"/crn/operator/siteMove", getReqParam(), function (res) { |
| | | alert(res.msg); |
| | | layer.msg(res.msg); |
| | | }); |
| | | } |
| | | |
| | | // 坐标移动 |
| | | function coorMove() { |
| | | http.post(baseUrl+"/crn/operator/coorMove", getReqParam(), function (res) { |
| | | alert(res.msg); |
| | | layer.msg(res.msg); |
| | | }); |
| | | } |
| | | |
| | | // 回原点 |
| | | function bacOrigin() { |
| | | http.post(baseUrl+"/crn/operator/bacOrigin", getReqParam(), function (res) { |
| | | alert(res.msg); |
| | | layer.msg(res.msg); |
| | | }); |
| | | } |
| | | |
| | | // 任务完成 |
| | | function taskComplete() { |
| | | http.post(baseUrl+"/crn/operator/taskComplete", getReqParam(), function (res) { |
| | | alert(res.msg); |
| | | layer.msg(res.msg); |
| | | }); |
| | | } |
| | | |
| | | // 暂停 |
| | | function pause() { |
| | | http.post(baseUrl+"/crn/operator/pause", getReqParam(), function (res) { |
| | | alert(res.msg); |
| | | layer.msg(res.msg); |
| | | }); |
| | | } |
| | | |
| | | // 启动 |
| | | function boot() { |
| | | http.post(baseUrl+"/crn/operator/boot", getReqParam(), function (res) { |
| | | alert(res.msg); |
| | | layer.msg(res.msg); |
| | | }); |
| | | } |
| | | |
| | | // 清除命令 |
| | | function clearCommand() { |
| | | http.post(baseUrl+"/crn/operator/clearCommand", getReqParam(), function (res) { |
| | | alert(res.msg); |
| | | layer.msg(res.msg); |
| | | }); |
| | | } |
| | | |
| | |
| | | if (res.code === 200) { |
| | | crnOutput(res.data); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/login"; |
| | | window.location.href = baseUrl + "/login"; |
| | | } else { |
| | | alert(res.msg); |
| | | } |