| | |
| | | <!-- 工作区 --> |
| | | <div class="layui-inline" style="width: 100px; margin-left: 10px"> |
| | | <select id="devpSelect"> |
| | | <option value="">工作区</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | // 获取工作区 |
| | | 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); |
| | |
| | | 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) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | |
| | | </script> |
| | | |
| | | <script type="text/template" id="devpSelectTemplate"> |
| | | <option value="">工作区</option> |
| | | {{#each data}} |
| | | <option value="{{this}}">{{this}}</option> |
| | | {{/each}} |