|  |  |  | 
|---|
|  |  |  | <h6>AUTOMATIC WAREHOUSE WCS MONITORING DIAGRAM</h6> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="head-right"> | 
|---|
|  |  |  | <img src="../static/images/zy-logo.png" alt="中扬" height="44" width="80"> | 
|---|
|  |  |  | <img src="../static/images/RMLogo.png" alt="润美" height="44"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!-- 货架 + 堆垛机 + 入库站点 --> | 
|---|
|  |  |  | <div class="main-part"> | 
|---|
|  |  |  | <div style="width: 1000px;height: 800px;overflow: hidden"> | 
|---|
|  |  |  | <!-- 货架 + 堆垛机 + 入库站点 --> | 
|---|
|  |  |  | <div class="main-part"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div id="body"> | 
|---|
|  |  |  | <!-- 总开关 --> | 
|---|
|  |  |  | <div class="system-state"> | 
|---|
|  |  |  | 
|---|
|  |  |  | headers: {'token': localStorage.getItem('token')}, | 
|---|
|  |  |  | method: 'POST', | 
|---|
|  |  |  | success: function (res) { | 
|---|
|  |  |  | // console.log(res) | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | var crns = res.data; | 
|---|
|  |  |  | for (var i = 0; i < crns.length; i++) { | 
|---|
|  |  |  | var crnEl = $("#crn-" + crns[i].crnId); | 
|---|
|  |  |  | crnEl.attr("class", "machine " + crns[i].crnStatus); | 
|---|
|  |  |  | var unit = 0;//($('.item').eq(0).width() + 13) / 2; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var unit = 0; | 
|---|
|  |  |  | if (crns[i].bay < 0 || crns[i].bay === -2) { | 
|---|
|  |  |  | crns[i].bay = 1 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // crnEl.animate({left: (crns[i].bay * unit) + 'px'}, 1000); | 
|---|
|  |  |  | // crns[i].bay = 15; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var offSet = 0; | 
|---|
|  |  |  | unit = -28.5; | 
|---|
|  |  |  | offSet = 1710; //145 | 
|---|
|  |  |  | offSet = 1552; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // crnEl.animate({left: offSet + 'px'}, 1000); | 
|---|
|  |  |  | if(crns[i].bay === 1){ | 
|---|
|  |  |  | crnEl.animate({left: offSet + 'px'}, 1000); | 
|---|
|  |  |  | if (i == 1) { | 
|---|
|  |  |  | if (crns[i].bay < 27) { | 
|---|
|  |  |  | crnEl.animate() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | crnEl.animate({left: offSet + 'px'}, 1000); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | crnEl.animate({left: (offSet - unit + (crns[i].bay * unit)) + 'px'}, 1000); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | var barcodes = res.data; | 
|---|
|  |  |  | for (var i = 0; i < barcodes.length; i++) { | 
|---|
|  |  |  | $("#code-decoder-data-" + barcodes[i].barcodeId).html(barcodes[i].codeValue); | 
|---|
|  |  |  | $("#barcode-"+barcodes[i].barcodeId).html(barcodes[i].codeValue ? barcodes[i].codeValue : "--"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } else if (res.code === 403) { | 
|---|
|  |  |  | parent.location.href = baseUrl + "/login"; | 
|---|