| | |
| | | var tableIns; |
| | | window.onload = function(){ |
| | | document.getElementById("code").focus(); |
| | | getInBound(); |
| | | } |
| | | |
| | | |
| | |
| | | $('#mat-btn').focus(); |
| | | getMat(); |
| | | } |
| | | } |
| | | |
| | | // 获取入库口 |
| | | function getInBound(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/available/put/site", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | var tpl = $("#putSiteSelectTemplate").html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | | $('#putSiteSelect').append(html); |
| | | layui.form.render('select'); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/pda"; |
| | | }else { |
| | | tips("获取入库口失败", true) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 提取物料 |
| | |
| | | $("#code").focus(); |
| | | } |
| | | } |
| | | </script> |
| | | <script type="text/template" id="putSiteSelectTemplate"> |
| | | {{#each data}} |
| | | <option value="{{this}}">{{this}}</option> |
| | | {{/each}} |
| | | </script> |
| | | </html> |