|  |  |  | 
|---|
|  |  |  | box-shadow: inset 2px 2px 2px 0px rgba(255, 255, 255, 0.5), 7px 7px 20px 0px rgba(0, 0, 0, 0.1), | 
|---|
|  |  |  | 4px 4px 5px 0px rgba(0, 0, 0, 0.1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .barcode { | 
|---|
|  |  |  | position: absolute; | 
|---|
|  |  |  | color: #a19c9c; | 
|---|
|  |  |  | border: 1px solid rgb(108,167,168); | 
|---|
|  |  |  | cursor: pointer; | 
|---|
|  |  |  | text-align: center; | 
|---|
|  |  |  | background-color: rgb(157, 217, 162); | 
|---|
|  |  |  | font-size: 10px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /* 16 */ | 
|---|
|  |  |  | .btn-16 { | 
|---|
|  |  |  | border: none; | 
|---|
|  |  |  | 
|---|
|  |  |  | track = '', | 
|---|
|  |  |  | tracks = '', | 
|---|
|  |  |  | stn = '', | 
|---|
|  |  |  | barcode = '', | 
|---|
|  |  |  | stns = '', | 
|---|
|  |  |  | stnArr = [], | 
|---|
|  |  |  | barcodeArr = [], | 
|---|
|  |  |  | floorBtn = '', | 
|---|
|  |  |  | floorBtns = '', | 
|---|
|  |  |  | floorBtnss = '', | 
|---|
|  |  |  | 
|---|
|  |  |  | for (let i = 0; i < areas.length;i++) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | let stnss = areas[i].stns | 
|---|
|  |  |  | let barcodes = areas[i].barcode | 
|---|
|  |  |  | let floor = areas[i].text | 
|---|
|  |  |  | floorId = areas[i].id | 
|---|
|  |  |  | var position = (i+1)*100 | 
|---|
|  |  |  | 
|---|
|  |  |  | var index = i | 
|---|
|  |  |  | var n = 1 | 
|---|
|  |  |  | stnArr[index] = '' | 
|---|
|  |  |  | barcodeArr[index] = '' | 
|---|
|  |  |  | total[index] = '' | 
|---|
|  |  |  | for (let j = 0; j < stnss.length; j++) { | 
|---|
|  |  |  | if (stnss[j].type == "stn") { | 
|---|
|  |  |  | 
|---|
|  |  |  | "px'>" + stnss[j].text  + "</div>" | 
|---|
|  |  |  | stnArr[i] = stnArr[i] + stn | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | for (let k = 0; k < barcodes.length; k++) { | 
|---|
|  |  |  | barcode = "<div class='barcode' id='" + barcodes[k].id + | 
|---|
|  |  |  | "'style='width:" + barcodes[k].width + | 
|---|
|  |  |  | "px;height: " + barcodes[k].height + | 
|---|
|  |  |  | "px;line-height: " + barcodes[k].height + | 
|---|
|  |  |  | "px;top: "+ barcodes[k].top + | 
|---|
|  |  |  | "px;left: "+ barcodes[k].left + "px'>" + "</div>" | 
|---|
|  |  |  | barcodeArr[i] = barcodeArr[i] + barcode | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | floorInfo = racks + rackDescs + tracks + crns + stnArr[0] + floorBtnss | 
|---|
|  |  |  | floorInfo = racks + rackDescs + tracks + crns + stnArr[0] + floorBtnss + barcodeArr[0] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $(".main-part").append(floorInfo) | 
|---|
|  |  |  | $("#line-total").html(total[0]) | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function changFloor(e) { | 
|---|
|  |  |  | $(".main-part").empty()  // 清空节点 | 
|---|
|  |  |  | floorInfo = racks  + stnArr[e] +rackDescs + crns + tracks + floorBtnss | 
|---|
|  |  |  | floorInfo = racks  + stnArr[e] +rackDescs + crns + tracks + floorBtnss + barcodeArr[e] | 
|---|
|  |  |  | $(".main-part").append(floorInfo) | 
|---|
|  |  |  | $("#line-total").empty() | 
|---|
|  |  |  | $("#line-total").html(total[e]) | 
|---|
|  |  |  | 
|---|
|  |  |  | "id": "site-304", | 
|---|
|  |  |  | "text": "304", | 
|---|
|  |  |  | "top": 458, | 
|---|
|  |  |  | "left": 360, | 
|---|
|  |  |  | "left": 361, | 
|---|
|  |  |  | "width": 66, | 
|---|
|  |  |  | "height": 24 | 
|---|
|  |  |  | }, { | 
|---|
|  |  |  | 
|---|
|  |  |  | "id": "site-301", | 
|---|
|  |  |  | "text": "301", | 
|---|
|  |  |  | "top": 399, | 
|---|
|  |  |  | "left": 360, | 
|---|
|  |  |  | "left": 361, | 
|---|
|  |  |  | "width": 66, | 
|---|
|  |  |  | "height": 24 | 
|---|
|  |  |  | }, { | 
|---|
|  |  |  | 
|---|
|  |  |  | "width": 100, | 
|---|
|  |  |  | "height": 24 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | "barcode": [ | 
|---|
|  |  |  | { | 
|---|
|  |  |  | "type": "barcode", | 
|---|
|  |  |  | "id": "barcode-1", | 
|---|
|  |  |  | "text": "", | 
|---|
|  |  |  | "top": 206, | 
|---|
|  |  |  | "left": 326, | 
|---|
|  |  |  | "width": 100, | 
|---|
|  |  |  | "height": 20 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | "type": "barcode", | 
|---|
|  |  |  | "id": "barcode-2", | 
|---|
|  |  |  | "text": "", | 
|---|
|  |  |  | "top": 345, | 
|---|
|  |  |  | "left": 326, | 
|---|
|  |  |  | "width": 100, | 
|---|
|  |  |  | "height": 20 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | "type": "barcode", | 
|---|
|  |  |  | "id": "barcode-3", | 
|---|
|  |  |  | "text": "", | 
|---|
|  |  |  | "top": 483, | 
|---|
|  |  |  | "left": 291, | 
|---|
|  |  |  | "width": 67, | 
|---|
|  |  |  | "height": 20 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | "type": "barcode", | 
|---|
|  |  |  | "id": "barcode-4", | 
|---|
|  |  |  | "text": "", | 
|---|
|  |  |  | "top": 637, | 
|---|
|  |  |  | "left": 325, | 
|---|
|  |  |  | "width": 100, | 
|---|
|  |  |  | "height": 20 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | 
|---|
|  |  |  | url: baseUrl + '/console/barcode/output/site', | 
|---|
|  |  |  | method: 'GET', | 
|---|
|  |  |  | success: function (res) { | 
|---|
|  |  |  | console.log(res) | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | tData = eval(res.data); | 
|---|
|  |  |  | if (tData.length <= 5) { | 
|---|
|  |  |  | 
|---|
|  |  |  | 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"; | 
|---|