From f41b4b2fdca909f2fb0cec4242f5abd9882ee770 Mon Sep 17 00:00:00 2001 From: YYC <1833023622@qq.com> Date: 星期四, 11 五月 2023 18:22:04 +0800 Subject: [PATCH] 入库值仓,电子巡更 --- igds-app/js/admin/inout-in-handle-list.js | 309 ++++++++++++++++++++++++++++++ igds-app/security-patrol.html | 49 ---- igds-app/inout-handle-in.html | 2 igds-app/inout-in-handle.html | 45 ++-- igds-app/js/admin/inout-out-handle.js | 29 -- igds-app/js/admin/warn-list.js | 2 igds-app/js/admin/inout-out-handle-list.js | 152 +++++--------- igds-app/inout-in-handle-list.html | 7 igds-app/inout-out-handle.html | 1 9 files changed, 400 insertions(+), 196 deletions(-) diff --git a/igds-app/inout-handle-in.html b/igds-app/inout-handle-in.html index 72efe4f..f9cf425 100644 --- a/igds-app/inout-handle-in.html +++ b/igds-app/inout-handle-in.html @@ -533,6 +533,8 @@ }); //鎼哄甫杞︾墝鍙傛暟 task.addData("plateNum", plateNum); + //涓氬姟绫诲瀷 + task.addData("bizType","01"); //鍥剧墖淇℃伅 task.addFile(path, { key: "uploadkey" diff --git a/igds-app/inout-in-handle-list.html b/igds-app/inout-in-handle-list.html index bb4dc1a..fa75943 100644 --- a/igds-app/inout-in-handle-list.html +++ b/igds-app/inout-in-handle-list.html @@ -11,6 +11,8 @@ <link rel="stylesheet" href="./css/admin/public.css" /> <!-- 椤甸潰css --> <link rel="stylesheet" href="./css/admin/inout-in-handle-list.css"> + <!--App鑷畾涔夌殑css--> + <link rel="stylesheet" type="text/css" href="./css/mui.picker.min.css" /> </head> <body class="g-bg" style="background-image: url(images/m-bg2.png);"> <header id="header" class="mui-bar mui-bar-nav m-pagetit"> @@ -41,7 +43,7 @@ <div style="text-align: center;font-size: 20px;color:#dd524d;padding-top: 16px;">鏆傛棤鍏ュ簱寰呭�间粨淇℃伅</div> </div> </li> --> - <!-- <li> + <li> <div class="con"> <div class="top"> <div class="info">杞︾墝鍙�: <b>璞獳123GM</b></div> @@ -124,7 +126,7 @@ </div> </div> </div> - </li> --> + </li> </ul> </div> </div> @@ -132,6 +134,7 @@ </div> </body> <script src="./js/mui.min.js"></script> + <script src="./js/mui.picker.min.js"></script> <script src="./js/jquery.js"></script> <script src="./js/admin/inout-in-handle-list.js"></script> <script type="text/javascript" charset="utf-8"> diff --git a/igds-app/inout-in-handle.html b/igds-app/inout-in-handle.html index 2e2d6d3..66d88b1 100644 --- a/igds-app/inout-in-handle.html +++ b/igds-app/inout-in-handle.html @@ -11,6 +11,8 @@ <link rel="stylesheet" href="./css/admin/public.css" /> <!-- 椤甸潰css --> <link rel="stylesheet" href="./css/admin/inout-in-handle.css"> + <!--App鑷畾涔夌殑css--> + <link rel="stylesheet" type="text/css" href="./css/mui.picker.min.css" /> </head> <body class="g-bg" style="background-image: url(images/m-bg2.png);"> <header id="header" class="mui-bar mui-bar-nav m-pagetit"> @@ -24,16 +26,16 @@ <form action=""> <div class="m-box_zc1 p15"> <div class="item"> - <div class="tit">杞︾墝鍙�: <b>璞獳123GM</b></div> + <div class="tit">杞︾墝鍙�: <b id="plateNum">璞獳123GM</b></div> <ul class="g-listb2"> <li> <div class="con" style="background-image: url(images/icons/g-i24.png);"> - 鍊间粨浠撳簱: <b>15鍙蜂粨</b> + 鍊间粨浠撳簱: <b id="depotName">15鍙蜂粨</b> </div> </li> <li> <div class="con" style="background-image: url(images/icons/g-i25.png);"> - 淇濈鍛�: <b>寮犱笁</b> + 淇濈鍛�: <b id="storeKeeperName">寮犱笁</b> </div> </li> </ul> @@ -41,10 +43,9 @@ <div class="item"> <div class="tit"><b>娣诲姞鐓х墖</b></div> <div class="m-files"> - <div class="box"> + <div class="box" onclick="choosePic('1')"> <div class="con"> - <label class="lab"> - <input type="file" name="" id="" hidden/> + <label class="lab" id="boxImg1"> <div class="icon"> <img src="images/icons/g-i23.png" alt=""> </div> @@ -52,10 +53,9 @@ </label> </div> </div> - <div class="box"> + <div class="box" onclick="choosePic('2')"> <div class="con"> - <label class="lab"> - <input type="file" name="" id="" hidden/> + <label class="lab" id="boxImg2"> <div class="icon"> <img src="images/icons/g-i23.png" alt=""> </div> @@ -69,14 +69,7 @@ <div class="m-box_zc1"> <div class="mui-input-row"> <label>鍊间粨鎵i噸:</label> - <input type="text" class="mui-input-clear" placeholder="璇疯緭鍏ラ噸閲�"> - <span class="unit">KG</span> - </div> - </div> - <div class="m-box_zc1"> - <div class="mui-input-row"> - <label>鍊间粨鎵i噸:</label> - <input type="text" class="mui-input-clear" placeholder="璇疯緭鍏ラ噸閲�"> + <input id="number" type="text" class="mui-input-clear" placeholder="璇疯緭鍏ラ噸閲�"> <span class="unit">KG</span> </div> </div> @@ -91,20 +84,22 @@ </div> <div class="m-bot_btn"> <div class="box"> - <button type="button" class="mui-btn mui-btn-block bot-btn end">缁撴潫鍊间粨</button> - <button type="button" class="mui-btn mui-btn-block bot-btn start">寮�濮嬪�间粨</button> + <button type="button" class="mui-btn mui-btn-block bot-btn end" onclick="toHandle('end')">缁撴潫鍊间粨</button> + <button type="button" class="mui-btn mui-btn-block bot-btn start" onclick="toHandle('start')">寮�濮嬪�间粨</button> </div> </div> </div> </body> <script src="js/mui.min.js"></script> + <script src="./js/mui.picker.min.js"></script> + <script src="./js/jquery.js"></script> + <script src="./js/admin/inout-in-handle.js"></script> <script type="text/javascript" charset="utf-8"> + //mui鍒濆鍖� mui.init(); - mui('.mui-scroll-wrapper').scroll({ - indicators: false, //鏄惁鏄剧ず婊氬姩鏉� - deceleration: 0.0006, //闃诲凹绯绘暟,绯绘暟瓒婂皬婊戝姩瓒婄伒鏁� - bounce: false, //鏄惁鍚敤鍥炲脊 - deceleration: 0.0005 //flick 鍑忛�熺郴鏁帮紝绯绘暟瓒婂ぇ锛屾粴鍔ㄩ�熷害瓒婃參锛屾粴鍔ㄨ窛绂昏秺灏忥紝榛樿鍊�0.0006 - }); + mui.plusReady(function() { + //鏁版嵁鍒濆鍖� + init(); + }) </script> </html> diff --git a/igds-app/inout-out-handle.html b/igds-app/inout-out-handle.html index 4b2d2db..28ead73 100644 --- a/igds-app/inout-out-handle.html +++ b/igds-app/inout-out-handle.html @@ -51,7 +51,6 @@ <img src="images/icons/g-i23.png" alt=""> </div> <div class="t">鎷嶇収涓婁紶</div> - <!-- <img src="images/spad0.png"/> --> </label> </div> diff --git a/igds-app/js/admin/inout-in-handle-list.js b/igds-app/js/admin/inout-in-handle-list.js index 5fa693f..d63cb19 100644 --- a/igds-app/js/admin/inout-in-handle-list.js +++ b/igds-app/js/admin/inout-in-handle-list.js @@ -13,13 +13,24 @@ "intelCard": "" } }; - +var data1 = { + "interfaceId": "5208", + "outId": "10208", + "reqDateTime": new Date(), + "tokenAuth": "", + "data": { + "type": "IN", + "id": "", + "intelCard": "" + } +}; //鍒濆鍖栨暟鎹� function init() { var user = JSON.parse(localStorage.getItem('user')); var selectDeptId = JSON.parse(localStorage.getItem('selectDeptId')); url = user.url + "/api-phone/v35/gateway"; data.tokenAuth = user.tokenAuth; + data1.tokenAuth = user.tokenAuth; data.data.deptId = selectDeptId; //鑾峰彇鍏ュ簱寰呭�间粨鍒楄〃 @@ -30,7 +41,7 @@ function getInHandleList() { inHandleData = null; - //璧嬪�煎弬鏁扮殑鏃ユ湡 + //鏌ヨ鐨勮溅鐗屽彿 data.data.plateNum = mui("#plateNum")[0].value; //璇锋眰 @@ -53,6 +64,56 @@ mui.alert("绯荤粺绻佸繖,璇烽噸璇曪紒", "鎻愮ず", ["纭畾"], function() {}, "div") } }) + + inHandleData = [{ + "id": "44", + "plateNum": "97", + "deHandle": "ut", + "depotId": "16", + "depotName": "闈掑紶鍒楀仛鎬�", + "foodVariety": "magna pariatur laboris sunt dolor", + "foodVarietyName": "鎻愭竻闄�", + "foodLevel": "fugiat", + "foodLevelName": "搴斿彂鐑洓姘戞槸濮�", + "storeKeeperName": "" + }, + { + "id": "62", + "plateNum": "71", + "deHandle": "dolore ut non", + "depotId": "79", + "depotName": "澧炶薄瀹氱珛鏍�", + "foodVariety": "Lorem est", + "foodVarietyName": "甯傛潯缇ゆ眰琚洟涓�", + "foodLevel": "ex labore", + "foodLevelName": "鎸佸湪鍐欑О鎯呭苟", + "storeKeeperName": "2" + }, + { + "id": "96", + "plateNum": "61", + "deHandle": "nulla magna ut proident cillum", + "depotId": "42", + "depotName": "鏉″叏浠�", + "foodVariety": "aliquip", + "foodVarietyName": "杩炲紑闃跺姩闄呭共", + "foodLevel": "in id sunt", + "foodLevelName": "娌$疆瀹氫娇鏂�", + "storeKeeperName": "3" + }, + { + "id": "61", + "plateNum": "17", + "deHandle": "commodo", + "depotId": "80", + "depotName": "灞曡蹇伀鍏ㄩ", + "foodVariety": "voluptate eu Lorem", + "foodVarietyName": "浠栬竟娲炬柉閲嶇", + "foodLevel": "dolor", + "foodLevelName": "瑁呯涓�", + "storeKeeperName": "4" + } + ] } //娓叉煋椤甸潰 @@ -63,7 +124,8 @@ $.each(inHandleData, function(index, item) { html += '<li><div class="con"><div class="top">'; html += '<div class="info">杞︾墝鍙�: <b>' + (item.plateNum == null ? "" : item.plateNum) +'</b></div>'; - html += '<a href="" class="link">鍊间粨<span class="mui-icon mui-icon-arrowright"></span></a>'; + html += '<a href="" id = "' + item.id + '" plateNum = "' + item.plateNum + '" depotName = "' + item.depotName + '" storeKeeperName = "' + (item.storeKeeperName == "" || item + .storeKeeperName == "" ? '--' : item.storeKeeperName) + '" class="link">鍊间粨<span class="mui-icon mui-icon-arrowright"></span></a>'; html += '</div><div class="box">'; html += '<div class="item"><div class="conbox" style="background-image: url(images/icons/g-i19.png);">'; html += '<div class="h3">' + (item.depotName == null ? "" : item.depotName) + '</div>'; @@ -77,14 +139,251 @@ html += '</div></div></li>'; }) } else { - html += '<li><div class="con"><div style="text-align: center;font-size: 20px;color:#dd524d;padding-top: 16px;">鏆傛棤鍏ュ簱寰呭�间粨淇℃伅</div></div></li>'; + html += '<li><div class="con"><div style="text-align: center;font-size: 20px;color:#dd524d;padding-top: 18px;">鏆傛棤鍏ュ簱寰呭�间粨淇℃伅</div></div></li>'; } }else{ - html += '<li><div class="con"><div style="text-align: center;font-size: 20px;color:#dd524d;padding-top: 16px;">鏆傛棤鍏ュ簱寰呭�间粨淇℃伅</div></div></li>'; + html += '<li><div class="con"><div style="text-align: center;font-size: 20px;color:#dd524d;padding-top: 18px;">鏆傛棤鍏ュ簱寰呭�间粨淇℃伅</div></div></li>'; } $("#handleList").html(html); } +//鍔熻兘妯″潡璺宠浆 +mui(".mui-scroll-wrapper").on("tap", ".mui-scroll ul li a", function() { + var id = this.getAttribute("id"); + var depotName = this.getAttribute("depotName") + var plateNum = this.getAttribute("plateNum") + var storeKeeperName = this.getAttribute("storeKeeperName") + + var picker = new mui.PopPicker(); + picker.setData([{ + value: "photo", + text: "鐜板満鍊间粨" + + }, { + value: "snap", + text: "杩滅▼鍊间粨" + }]) + picker.pickers[0].setSelectedValue('photo'); + picker.show(function(SelectedItem) { + console.log(JSON.stringify(SelectedItem)); + //鐜板満鍊间粨 + if(SelectedItem.value == 'photo'){ + mui.openWindow({ + url: "inout-in-handle.html", + id: "inout-in-handle", + extras: { + data: { + serialNumber: id, + plateNum: plateNum, + depotName: depotName, + storeKeeperName: storeKeeperName + } + } + }) + }else{ //杩滅▼鍊间粨 + mui.openWindow({ + url: "inout-in-handle.html", + id: "inout-in-handle", + extras: { + data: { + serialNumber: id, + plateNum: plateNum, + depotName: depotName, + storeKeeperName: storeKeeperName + } + } + }) + } + }) +}); + + +/*---------------NFC璇诲崱鍔熻兘-------------------*/ +var waiting; +var readyRead = false; +//璇诲崱鏂规硶 +function readCard() { + readyRead = true; + listenNFCStatus(); +} + +var NfcAdapter; +var NdefRecord; +var NdefMessage; +var count = 0; + +//鐩戝惉NFC鐘舵�� +function listenNFCStatus() { + try { + var main = plus.android.runtimeMainActivity(); + var Intent = plus.android.importClass('android.content.Intent'); + var Activity = plus.android.importClass('android.app.Activity'); + var PendingIntent = plus.android.importClass('android.app.PendingIntent'); + var IntentFilter = plus.android.importClass('android.content.IntentFilter'); + NfcAdapter = plus.android.importClass('android.nfc.NfcAdapter'); + var nfcAdapter = NfcAdapter.getDefaultAdapter(main); + //鍒ゆ柇璁惧鏄惁鏀寔NFC鍔熻兘 + if (nfcAdapter == null) { + mui.alert("璁惧涓嶆敮鎸丯FC鍔熻兘锛�", '鎻愮ず', ["纭畾"], function() {}, "div"); + return; + } + //鍒ゆ柇璁惧鏄惁寮�鍚疦FC鍔熻兘 + if (!nfcAdapter.isEnabled()) { + mui.alert("璇峰湪绯荤粺璁剧疆涓惎鐢∟FC鍔熻兘锛�", '鎻愮ず', ["纭畾"], function() {}, "div"); + return; + } + waiting = plus.nativeUI.showWaiting("璇峰皢NFC鏍囩闈犺繎锛�"); + + //鍊掕鏃�10绉掞紝璇诲彇涓嶅埌鍚庢彁绀烘槸鍚﹂噸鏂拌鍗� + var interval = setInterval(function() { //瀹氫箟瀹氭椂鍣� + count++; + if (count == 10 && readyRead) { + readyRead = false; + count = 0; + waiting.close(); + clearInterval(interval); //娓呴櫎瀹氭椂鍣� + var btnArray = ["閲嶈瘯", "鍙栨秷"]; + mui.confirm("宸茶秴鏃讹紝鏄惁閲嶆柊璇诲崱锛�", "鎻愮ず", btnArray, function(e) { + if (e.index == 0) { + readCard(); + } + }, "div") + } + }, 1000); + + var intent = new Intent(main, main.getClass()); + intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); + var pendingIntent = PendingIntent.getActivity(main, 0, intent, 0); + var ndef = new IntentFilter("android.nfc.action.TECH_DISCOVERED"); + ndef.addDataType("*/*"); + var intentFiltersArray = [ndef]; + var techListsArray = [ + ["android.nfc.tech.IsoDep"], + ["android.nfc.tech.NfcA"], + ["android.nfc.tech.NfcB"], + ["android.nfc.tech.NfcF"], + ["android.nfc.tech.Ndef"], + ["android.nfc.tech.NfcV"], + ["android.nfc.tech.NdefFormatable"], + ["android.nfc.tech.MifareClassic"], + ["android.nfc.tech.MifareUltralight"] + ]; + document.addEventListener("newintent", + function() { + setTimeout(readData, 1000); + }, false); + document.addEventListener("pause", function(e) { + if (nfcAdapter) { + nfcAdapter.disableForegroundDispatch(main); + } + }, false); + document.addEventListener("resume", function(e) { + if (nfcAdapter) { + nfcAdapter.enableForegroundDispatch(main, pendingIntent, intentFiltersArray, techListsArray); + } + }, false); + nfcAdapter.enableForegroundDispatch(main, pendingIntent, intentFiltersArray, techListsArray); + } catch (e) { + mui.toast("璇诲崱澶辫触锛岃閲嶈瘯锛�"); + waiting.close(); + } +} + +//璇诲彇鏁版嵁 +function readData() { + NdefRecord = plus.android.importClass("android.nfc.NdefRecord"); + NdefMessage = plus.android.importClass("android.nfc.NdefMessage"); + var main = plus.android.runtimeMainActivity(); + var intent = main.getIntent(); + // if ("android.nfc.action.TAG_DISCOVERED" == intent.getAction()) { //鐪熸満璋冭瘯 + if ("android.nfc.action.TECH_DISCOVERED" == intent.getAction()) { //鎵撳寘 + if (readyRead) { + readyRead = false; + + waiting.setTitle('璇峰嬁绉诲紑鏍囩\n姝e湪璇诲彇鏁版嵁...'); + var Parcelable = plus.android.importClass("android.os.Parcelable"); + //璇诲彇id + var byteId = intent.getByteArrayExtra(NfcAdapter.EXTRA_ID); + //灏唅d杞负16杩涘埗瀛楃涓� + var id = ByteArrayToHexString(byteId); + //鍏抽棴绛夊緟鍦嗗湀 + waiting.close(); + + //璇诲彇id鎴愬姛锛岃祴鍊煎苟鍙戦�佽姹傛煡璇� + data1.data.intelCard = id; + getInoutDetail(); + } + } else { + waiting.close(); + mui.alert('璇诲彇澶辫触锛岃閲嶈瘯锛�', '鎻愮ず', ["纭畾"], function() {}, "div"); + } +} + +//鑾峰彇鍊间粨鍗曞瓙璇︾粏淇℃伅 +function getInoutDetail() { + mui.ajax(url, { + type: "POST", + dataType: "json", + crossDomain: true, + contentType: "application/json;charset=utf-8", + data: JSON.stringify(data1), + success: function(result) { + if (result.code == "0000") { + //寮圭獥淇℃伅锛氬崟瀛愯溅鐗岃窡浠撳簱锛屽幓鍊间粨鍒欒繘鍏ュ�间粨椤甸潰锛屼紶閫掑崟瀛恑d锛� + var btnArray = ["鍘诲�间粨", "鍙栨秷"]; + var text = '鍊间粨浠撳簱:' + result.data.depotName + '<br/>杞︾墝鍙凤細' + result.data.plateNum + '<br/>淇濈鍛橈細' + result.data.plateNum + mui.confirm(text, "妫�娴嬪埌寰呭�间粨淇℃伅濡備笅", btnArray, function(e) { + if (e.index == 0) { + //鍏堝垽鏂崟瀛愭槸鍚﹀湪鍊间粨鐘舵�� + if (result.data.progress == "HANDLE") { + //鍘诲�间粨鏃跺垽鏂崟瀛愮被鍨嬫槸鍚︽槸鍏ュ簱锛屼笉鏄粰鍑烘彁閱掞紱 + if (result.data.type == "IN") { + mui.openWindow({ + url: "inout-in-handle.html", + id: "inout-in-handle", + extras: { + data: { + serialNumber: result.data.id, + plateNum: result.data.plateNum, + depotName: result.data.depotName, + storeKeeperName: result.data.storeKeeperName + } + } + }) + } else { + mui.alert("璇ュ崱淇℃伅涓嶆槸鍑哄簱绫诲瀷锛岃鏍稿锛�", "鎻愮ず", ["纭畾"], function() {}, "div") + } + } else { + mui.alert("褰撳墠鍗′笉鍦ㄥ�间粨鐘舵�侊紝璇锋牳鏌ワ紒", "鎻愮ず", ["纭畾"], function() {}, "div") + } + } + }, "div") + } else { + mui.toast(result.msg); + } + }, + error: function() { + mui.alert('绯荤粺绻佸繖,璇烽噸璇曪紒', '鎻愮ず', ["纭畾"], function() {}, "div"); + } + }) +} + +//灏嗗瓧鑺傛暟缁勮浆涓�16杩涘埗瀛楃涓� +function ByteArrayToHexString(inarray) { + var i, j, inn; + hex = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"]; + out = ""; + for (j = 0; j < inarray.length; ++j) { + inn = inarray[j] & 0xff; + i = (inn >>> 4) & 0x0f; + out += hex[i]; + i = inn & 0x0f; + out += hex[i]; + } + return out; +} + + //婊戝姩 mui('.mui-scroll-wrapper').scroll({ indicators: false, //鏄惁鏄剧ず婊氬姩鏉� diff --git a/igds-app/js/admin/inout-out-handle-list.js b/igds-app/js/admin/inout-out-handle-list.js index 24b8a53..d62554d 100644 --- a/igds-app/js/admin/inout-out-handle-list.js +++ b/igds-app/js/admin/inout-out-handle-list.js @@ -29,13 +29,15 @@ var selectDeptId = JSON.parse(localStorage.getItem('selectDeptId')); url = user.url + "/api-phone/v35/gateway"; data.tokenAuth = user.tokenAuth; + data1.tokenAuth = user.tokenAuth; data.data.deptId = selectDeptId; - getOutHandleList(); + getInHandleList(); } //鏌ヨ鍑哄簱璁板綍 -function getOutHandleList() { +function getInHandleList() { outHandleData = null; + //鏌ヨ鐨勮溅鐗屽彿 data.data.plateNum = mui("#plateNum")[0].value; //璇锋眰 mui.ajax(url, { @@ -59,55 +61,55 @@ mui.alert("绯荤粺绻佸繖,璇烽噸璇曪紒", "鎻愮ず", ["纭畾"], function() {}, "div") } }) - // outHandleData = [{ - // "id": "44", - // "plateNum": "97", - // "deHandle": "ut", - // "depotId": "16", - // "depotName": "闈掑紶鍒楀仛鎬�", - // "foodVariety": "magna pariatur laboris sunt dolor", - // "foodVarietyName": "鎻愭竻闄�", - // "foodLevel": "fugiat", - // "foodLevelName": "搴斿彂鐑洓姘戞槸濮�", - // "storeKeeperName": "" - // }, - // { - // "id": "62", - // "plateNum": "71", - // "deHandle": "dolore ut non", - // "depotId": "79", - // "depotName": "澧炶薄瀹氱珛鏍�", - // "foodVariety": "Lorem est", - // "foodVarietyName": "甯傛潯缇ゆ眰琚洟涓�", - // "foodLevel": "ex labore", - // "foodLevelName": "鎸佸湪鍐欑О鎯呭苟", - // "storeKeeperName": "2" - // }, - // { - // "id": "96", - // "plateNum": "61", - // "deHandle": "nulla magna ut proident cillum", - // "depotId": "42", - // "depotName": "鏉″叏浠�", - // "foodVariety": "aliquip", - // "foodVarietyName": "杩炲紑闃跺姩闄呭共", - // "foodLevel": "in id sunt", - // "foodLevelName": "娌$疆瀹氫娇鏂�", - // "storeKeeperName": "3" - // }, - // { - // "id": "61", - // "plateNum": "17", - // "deHandle": "commodo", - // "depotId": "80", - // "depotName": "灞曡蹇伀鍏ㄩ", - // "foodVariety": "voluptate eu Lorem", - // "foodVarietyName": "浠栬竟娲炬柉閲嶇", - // "foodLevel": "dolor", - // "foodLevelName": "瑁呯涓�", - // "storeKeeperName": "4" - // } - // ] + outHandleData = [{ + "id": "44", + "plateNum": "97", + "deHandle": "ut", + "depotId": "16", + "depotName": "闈掑紶鍒楀仛鎬�", + "foodVariety": "magna pariatur laboris sunt dolor", + "foodVarietyName": "鎻愭竻闄�", + "foodLevel": "fugiat", + "foodLevelName": "搴斿彂鐑洓姘戞槸濮�", + "storeKeeperName": "" + }, + { + "id": "62", + "plateNum": "71", + "deHandle": "dolore ut non", + "depotId": "79", + "depotName": "澧炶薄瀹氱珛鏍�", + "foodVariety": "Lorem est", + "foodVarietyName": "甯傛潯缇ゆ眰琚洟涓�", + "foodLevel": "ex labore", + "foodLevelName": "鎸佸湪鍐欑О鎯呭苟", + "storeKeeperName": "2" + }, + { + "id": "96", + "plateNum": "61", + "deHandle": "nulla magna ut proident cillum", + "depotId": "42", + "depotName": "鏉″叏浠�", + "foodVariety": "aliquip", + "foodVarietyName": "杩炲紑闃跺姩闄呭共", + "foodLevel": "in id sunt", + "foodLevelName": "娌$疆瀹氫娇鏂�", + "storeKeeperName": "3" + }, + { + "id": "61", + "plateNum": "17", + "deHandle": "commodo", + "depotId": "80", + "depotName": "灞曡蹇伀鍏ㄩ", + "foodVariety": "voluptate eu Lorem", + "foodVarietyName": "浠栬竟娲炬柉閲嶇", + "foodLevel": "dolor", + "foodLevelName": "瑁呯涓�", + "storeKeeperName": "4" + } + ] renderData(); } @@ -121,8 +123,7 @@ html += '<div class="info">杞︾墝鍙�: <b>' + (item.plateNum == null ? "" : item.plateNum) + '</b></div>'; html += '<a href="" id = "' + item.id + '" plateNum = "' + item.plateNum + '" depotName = "' + item.depotName + '" storeKeeperName = "' + (item.storeKeeperName == "" || item - .storeKeeperName == "" ? '--' : item.storeKeeperName) + - '" class="link">鍊间粨<span class="mui-icon mui-icon-arrowright"></span></a>'; + .storeKeeperName == "" ? '--' : item.storeKeeperName) + '" class="link">鍊间粨<span class="mui-icon mui-icon-arrowright"></span></a>'; html += '</div><div class="box">'; html += '<div class="item"><div class="conbox" style="background-image: url(images/icons/g-i19.png);">'; html += '<div class="h3">' + (item.depotName == null ? "" : item.depotName) + '</div>'; @@ -193,49 +194,6 @@ }) } }) - - // var btnArray = [{ - // title:"鐜板満鍊间粨" - // },{ - // title:"杩滅▼鍊间粨" - // }]; - // plus.nativeUI.actionSheet({ - // title:"璇烽�夋嫨", - // cancel:"鍙栨秷", - // buttons:btnArray - // },function(e) { - // var index = e.index; - // switch (index) { - // case 1: - // mui.openWindow({ - // url: "inout-out-handle.html", - // id: "inout-out-handle", - // extras: { - // data: { - // serialNumber: id, - // plateNum: plateNum, - // depotName: depotName, - // storeKeeperName: storeKeeperName - // } - // } - // }) - // break; - // case 2: - // mui.openWindow({ - // url: "inout-out-handle.html", - // id: "inout-out-handle", - // extras: { - // data: { - // serialNumber: id, - // plateNum: plateNum, - // depotName: depotName, - // storeKeeperName: storeKeeperName - // } - // } - // }) - // break; - // } - // }); }); /*---------------NFC璇诲崱鍔熻兘-------------------*/ @@ -350,7 +308,7 @@ waiting.close(); //璇诲彇id鎴愬姛锛岃祴鍊煎苟鍙戦�佽姹傛煡璇� - data.data.intelCard = id; + data1.data.intelCard = id; getInoutDetail(); } } else { diff --git a/igds-app/js/admin/inout-out-handle.js b/igds-app/js/admin/inout-out-handle.js index d21528f..e72585c 100644 --- a/igds-app/js/admin/inout-out-handle.js +++ b/igds-app/js/admin/inout-out-handle.js @@ -43,11 +43,12 @@ url = user.url + "/api-phone/v35/gateway"; uploadUrl = user.url + "/api-phone/v35/upload-img"; data.tokenAuth = user.tokenAuth; + data1.tokenAuth = user.tokenAuth; //鑾峰彇浠庝笂涓�涓〉闈紶閫掔殑鏁版嵁 var self = plus.webview.currentWebview(); depotData = self.data; data.data.id = depotData.serialNumber; - // data.data.intelCard = depotData.intelCard; + data.data.intelCard = depotData.intelCard; $("#plateNum").html(depotData.plateNum); $("#depotName").html(depotData.depotName); $("#storeKeeperName").html(depotData.storeKeeperName); @@ -179,27 +180,6 @@ success: function(result) { if (result.code == '0000') { if (result.data.handleStart != null) { - var btnArray = [{ - title: "鎷嶇収涓婁紶" - }, { - title: "浠庣浉鍐岄�夋嫨" - }]; - plus.nativeUI.actionSheet({ - title: "璇烽�夋嫨", - cancel: "鍙栨秷", - buttons: btnArray - }, - function(e) { - var index = e.index; - switch (index) { - case 1: - cameraImg(typeNum); - break; - case 2: - galleryImg(typeNum); - break; - } - }); var picker = new mui.PopPicker(); picker.setData([{ value: "cameraImg", @@ -243,9 +223,6 @@ // galleryImg(typeNum); // } // }) - - }); - }; //浣跨敤鐩告満鎷嶇収 @@ -308,6 +285,8 @@ }); //鎼哄甫杞︾墝鍙傛暟 task.addData("plateNum", depotData.plateNum); + //涓氬姟绫诲瀷 + task.addData("bizType","01"); //鍥剧墖淇℃伅 task.addFile(path, { key: "uploadkey" diff --git a/igds-app/js/admin/warn-list.js b/igds-app/js/admin/warn-list.js index 287d930..fcc2d10 100644 --- a/igds-app/js/admin/warn-list.js +++ b/igds-app/js/admin/warn-list.js @@ -81,7 +81,7 @@ // "time": "2006-11-01 14:01:36", // "info": "dolor", // "depotId": "6", - // "depotName": "鐭垮叡鍜屼腑杩�", + // "depotName": "", // "remark":"00000" // }, // { diff --git a/igds-app/security-patrol.html b/igds-app/security-patrol.html index b76777f..5530f01 100644 --- a/igds-app/security-patrol.html +++ b/igds-app/security-patrol.html @@ -28,7 +28,7 @@ </div> <div class="mui-scroll-wrapper index-dzxg"> <div class="mui-scroll"> - <ul class="ul-cardb1"> + <ul class="ul-cardb1" id="recordList"> <li> <div class="item"> <div class="top"> @@ -144,14 +144,14 @@ </div> <div class="m-bot_btn"> <div class="box"> - <button type="button" class="mui-btn mui-btn-block bot-btn">鎷嶇収鎵撳崱</button> + <button type="button" class="mui-btn mui-btn-block bot-btn" onclick="cameraImg()">鎷嶇収鎵撳崱</button> </div> </div> <!-- 棰勮鍥剧墖 --> <div class="m-pop"> <div class="pop-bg"></div> <div class="inner"> - <div class="m-viewer"> + <div class="m-viewer" id="viewerImg"> <img src="images/p-j1.jpg" alt="" class="img" /> </div> <div class="close"><span class="mui-icon mui-icon-close"></span></div> @@ -162,45 +162,14 @@ <script src="./js/mui.min.js"></script> <script src="./js/mui.picker.min.js"></script> <script src="./js/jquery.js"></script> + <script src="./js/admin/security-patrol.js"></script> <script type="text/javascript" charset="utf-8"> + //mui鍒濆鍖� mui.init(); - function chooseDate() { - var dtpicker = new mui.DtPicker({ - type: "date", //璁剧疆鏃ュ巻鍒濆瑙嗗浘妯″紡 - // beginDate: new Date(2015, 04, 25), //璁剧疆寮�濮嬫棩鏈� - // endDate: new Date(2016, 04, 25), //璁剧疆缁撴潫鏃ユ湡 - - }) - dtpicker.show(function(e) { - document.getElementById("date").value = e.value - }) - } - - mui('.mui-scroll-wrapper').scroll({ - indicators: false, //鏄惁鏄剧ず婊氬姩鏉� - deceleration: 0.0006, //闃诲凹绯绘暟,绯绘暟瓒婂皬婊戝姩瓒婄伒鏁� - bounce: false, //鏄惁鍚敤鍥炲脊 - deceleration: 0.0005 //flick 鍑忛�熺郴鏁帮紝绯绘暟瓒婂ぇ锛屾粴鍔ㄩ�熷害瓒婃參锛屾粴鍔ㄨ窛绂昏秺灏忥紝榛樿鍊�0.0006 - }); - - mui(".mui-content").on("tap", ".g-date_box .prev", function() { - var curDate = document.getElementById("date").value; - document.getElementById("date").value = e.value - }); - mui(".mui-content").on("tap", ".g-date_box .next", function() { - var curDate = document.getElementById("date").value; - document.getElementById("date").value = e.value - }); - - //鏌ョ湅鐓х墖 - mui(".mui-content").on("tap", ".ul-cardb1 li .r-btn", function() { - $('.m-pop').css('display', 'flex'); - }); - //鍏抽棴鐓х墖 - $('.pop-bg,.m-pop .close').click(function(e) { - e.stopPropagation(); - $('.m-pop').fadeOut(); - }); + mui.plusReady(function(){ + //鏁版嵁鍒濆鍖� + init(); + }) </script> </html> -- Gitblit v1.9.3