From 958b12cccc9e0043eb0c6b9bb84ebdf554ebe1a1 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期四, 03 六月 2021 11:21:22 +0800 Subject: [PATCH] # --- src/main/webapp/views/pda/combAgv.html | 49 +++++++++++++++++++++++++------------------------ 1 files changed, 25 insertions(+), 24 deletions(-) diff --git a/src/main/webapp/views/pda/combAgv.html b/src/main/webapp/views/pda/combAgv.html index ae22ae0..f132cf1 100644 --- a/src/main/webapp/views/pda/combAgv.html +++ b/src/main/webapp/views/pda/combAgv.html @@ -30,7 +30,6 @@ <!-- 宸ヤ綔鍖� --> <div class="layui-inline" style="width: 100px; margin-left: 10px"> <select id="devpSelect"> - <option value="">宸ヤ綔鍖�</option> </select> </div> </div> @@ -81,12 +80,13 @@ // 鑾峰彇宸ヤ綔鍖� function getDevp(){ $.ajax({ - url: baseUrl+"/available/put/site", + url: baseUrl+"/agv/put/site", headers: {'token': localStorage.getItem('token')}, method: 'POST', async: false, success: function (res) { if (res.code === 200){ + $('#devpSelect').html(''); var tpl = $("#devpSelectTemplate").html(); var template = Handlebars.compile(tpl); var html = template(res); @@ -177,28 +177,28 @@ tips("璇烽�夋嫨宸ヤ綔鍖�", true); return; } - alert("灏忚溅缁勬墭鍏ュ簱瀹屾垚锛堝姛鑳借繕鏈疄鐜帮級"); -// $.ajax({ -// url: baseUrl+"/mobile/comb/auth", -// headers: {'token': localStorage.getItem('token')}, -// data: JSON.stringify({ -// barcode: barcode, -// combMats: matData -// }), -// contentType:'application/json;charset=UTF-8', -// method: 'POST', -// async: false, -// success: function (res) { -// if (res.code === 200) { -// reset(); -// tips("缁勬墭鎴愬姛") -// } else if (res.code === 403) { -// top.location.href = baseUrl + "/pda"; -// } else { -// tips(res.msg, true) -// } -// } -// }) + $.ajax({ + url: baseUrl+"/mobile/comb/auth", + headers: {'token': localStorage.getItem('token')}, + data: JSON.stringify({ + barcode: barcode, + combMats: matData, + agvSite: devp + }), + contentType:'application/json;charset=UTF-8', + method: 'POST', + async: false, + success: function (res) { + if (res.code === 200) { + reset(); + tips("缁勬墭鎴愬姛") + } else if (res.code === 403) { + top.location.href = baseUrl + "/pda"; + } else { + tips(res.msg, true) + } + } + }) } /** @@ -232,6 +232,7 @@ </script> <script type="text/template" id="devpSelectTemplate"> + <option value="">宸ヤ綔鍖�</option> {{#each data}} <option value="{{this}}">{{this}}</option> {{/each}} -- Gitblit v1.9.1