| | |
| | | "reqDateTime": new Date(), |
| | | "tokenAuth": "", |
| | | "data": { |
| | | "deviceId":"", |
| | | "deptId": "", |
| | | "depotId": "", |
| | | "type": "05", |
| | |
| | | |
| | | var user = JSON.parse(localStorage.getItem('user')); |
| | | var selectDeptId = JSON.parse(localStorage.getItem('selectDeptId')); |
| | | url = user.url + "/api-phone/v35/gateway"; |
| | | url = user.url + "/api/phone/v35/gateway"; |
| | | data.tokenAuth = user.tokenAuth; |
| | | data.data.deptId = user.deptId; |
| | | data1.tokenAuth = user.tokenAuth; |
| | |
| | | html += '<div class="m-tf"><div class="g-tittf1">仓库正面</div><ul class="ul-listmana1 ullisttf1">'; |
| | | $.each(frontList, function(index, item) { |
| | | targetStatus = item.status |
| | | html += '<li><div class="con myfancy" passCode="' + item.passCode + '" serId="' + |
| | | html += '<li><div class="con myfancy" deviceId="'+item.id+'" passCode="' + item.passCode + '" serId="' + |
| | | item.serId + '" targetStatus="' + item.status + '" name="' + item.name + |
| | | '" data-win="#win_kt"><div class="pic pic2"><img src="images/e1.png"></div>'; |
| | | if (targetStatus == 'OPEN') { |
| | | html += '<div class="info out" style="background-image: url(images/e8.png);">' + |
| | | item.name + '</div>' |
| | | item.name + '</div></div></li>' |
| | | } else { |
| | | html += '<div class="info out" style="background-image: url(images/e9.png);">' + |
| | | item.name + '</div>' |
| | | item.name + '</div></div></li>' |
| | | } |
| | | html += '</div></div></li>' |
| | | |
| | | }) |
| | | html += '</ul></div>' |
| | | } |
| | | if (backList && backList.length > 0) { |
| | | console.log("backList") |
| | | html += '<div class="m-tf"><div class="g-tittf1">仓库反面</div><ul class="ul-listmana1 ullisttf1">'; |
| | | $.each(backList, function(index, item) { |
| | | targetStatus = item.status |
| | | html += '<li><div class="con myfancy" passCode="' + item.passCode + '" serId="' + |
| | | html += '<li><div class="con myfancy" deviceId="'+item.id+'" passCode="' + item.passCode + '" serId="' + |
| | | item.serId + '" targetStatus="' + item.status + '" name="' + item.name + |
| | | '" data-win="#win_kt"><div class="pic pic2"><img src="images/e1.png"></div>'; |
| | | if (targetStatus == 'OPEN') { |
| | | html += '<div class="info out" style="background-image: url(images/e8.png);">' + |
| | | item.name + '</div>' |
| | | item.name + '</div></div></li>' |
| | | } else { |
| | | html += '<div class="info out" style="background-image: url(images/e9.png);">' + |
| | | item.name + '</div>' |
| | | item.name + '</div></div></li>' |
| | | } |
| | | html += '</div></div></li>' |
| | | |
| | | }) |
| | | html += '</ul></div>' |
| | | } |
| | |
| | | html += '<div class="m-tf"><div class="g-tittf1">仓库左侧面</div><ul class="ul-listmana1 ullisttf1">'; |
| | | $.each(leftList, function(index, item) { |
| | | targetStatus = item.status |
| | | html += '<li><div class="con myfancy" passCode="' + item.passCode + '" serId="' + |
| | | html += '<li><div class="con myfancy" deviceId="'+item.id+'" passCode="' + item.passCode + '" serId="' + |
| | | item.serId + '" targetStatus="' + item.status + '" name="' + item.name + |
| | | '" data-win="#win_kt"><div class="pic pic2"><img src="images/e1.png"></div>'; |
| | | if (targetStatus == 'OPEN') { |
| | | html += '<div class="info out" style="background-image: url(images/e8.png);">' + |
| | | item.name + '</div>' |
| | | item.name + '</div></div></li>' |
| | | } else { |
| | | html += '<div class="info out" style="background-image: url(images/e9.png);">' + |
| | | item.name + '</div>' |
| | | item.name + '</div></div></li>' |
| | | } |
| | | html += '</div></div></li>' |
| | | |
| | | }) |
| | | html += '</ul></div>' |
| | | } |
| | | if (rightList && rightList.length > 0) { |
| | | console.log("rightList") |
| | | html += '<div class="m-tf"><div class="g-tittf1">仓库右侧面</div><ul class="ul-listmana1 ullisttf1">'; |
| | | $.each(rightList, function(index, item) { |
| | | targetStatus = item.status |
| | | html += '<li><div class="con myfancy" passCode="' + item.passCode + '" serId="' + |
| | | html += '<li><div class="con myfancy" deviceId="'+item.id+'" passCode="' + item.passCode + '" serId="' + |
| | | item.serId + '" targetStatus="' + item.status + '" name="' + item.name + |
| | | '" data-win="#win_kt"><div class="pic pic2"><img src="images/e1.png"></div>'; |
| | | if (targetStatus == 'OPEN') { |
| | | html += '<div class="info out" style="background-image: url(images/e8.png);">' + |
| | | item.name + '</div>' |
| | | item.name + '</div></div></li>' |
| | | } else { |
| | | html += '<div class="info out" style="background-image: url(images/e9.png);">' + |
| | | item.name + '</div>' |
| | | item.name + '</div></div></li>' |
| | | } |
| | | html += '</div></div></li>' |
| | | |
| | | }) |
| | | html += '</ul></div>' |
| | | } |
| | |
| | | mui(".mui-scroll-wrapper").on("tap", ".m-tf ul li .con", function() { |
| | | |
| | | targetStatus = this.getAttribute("targetStatus") |
| | | data.data.targetStatus = targetStatus |
| | | data.data.targetStatus = targetStatus; |
| | | console.log(targetStatus) |
| | | var html = ''; |
| | | if (targetStatus == 'OPEN') { |
| | | document.getElementById("vibrationSwitch").classList.add('mui-active'); |
| | |
| | | console.log("关") |
| | | } |
| | | |
| | | var deviceId = this.getAttribute("deviceId"); |
| | | var passCode = this.getAttribute("passCode"); |
| | | var serId = this.getAttribute("serId"); |
| | | var name = this.getAttribute("name"); |
| | | data.data.deviceId = deviceId |
| | | data.data.passCode = passCode; |
| | | data.data.serId = serId; |
| | | data.data.name = name; |