|  |  | 
 |  |  |             margin-bottom: 5px; | 
 |  |  |         } | 
 |  |  |         .site-list label { | 
 |  |  |             padding: 0 0 0 15px; | 
 |  |  |             padding-right: 15px; | 
 |  |  |         } | 
 |  |  |         .site-list span { | 
 |  |  |         .site-list label span { | 
 |  |  |             vertical-align: middle; | 
 |  |  |             font-size: 13px; | 
 |  |  |         } | 
 |  |  | 
 |  |  | <footer> | 
 |  |  |     <!-- 入库口 --> | 
 |  |  |     <div class="site-list"> | 
 |  |  |         <label><input class="cool-checkbox" type="radio" name="site"><span>1</span></label> | 
 |  |  |         <label><input class="cool-checkbox" type="radio" name="site"><span>2</span></label> | 
 |  |  |         <label><input class="cool-checkbox" type="radio" name="site"><span>3</span></label> | 
 |  |  |         <span style="display: inline-block; margin:0 0 0 10px; font-size: 12px">入库口:</span> | 
 |  |  |     </div> | 
 |  |  |     <div class="layui-btn-container"> | 
 |  |  |         <button type="button" class="layui-btn layui-btn-xs layui-btn-primary" onclick="reset()">重置</button> | 
 |  |  | 
 |  |  | </body> | 
 |  |  | <script> | 
 |  |  |     var tableIns; | 
 |  |  |     window.onload = function(){ | 
 |  |  |         document.getElementById("code").focus(); | 
 |  |  |         getInBound(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     layui.use(['table','laydate', 'form'], function() { | 
 |  |  |         var table = layui.table; | 
 |  |  |         var $ = layui.jquery; | 
 |  |  | 
 |  |  |  | 
 |  |  |     }); | 
 |  |  |  | 
 |  |  |     window.onload = function(){document.getElementById("code").focus();} | 
 |  |  |     // 获取入库口 | 
 |  |  |     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 = $("#inSitesTemplate").html(); | 
 |  |  |                     var template = Handlebars.compile(tpl); | 
 |  |  |                     var html = template(res); | 
 |  |  |                     $('.site-list').append(html); | 
 |  |  |                 } else if (res.code === 403){ | 
 |  |  |                     top.location.href = baseUrl+"/pda"; | 
 |  |  |                 }else { | 
 |  |  |                     tips("获取入库口失败", true) | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |         }) | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     // 提取物料 | 
 |  |  |     var matCodeLayerIdx; | 
 |  |  |     function getMat() { | 
 |  |  |         matCodeLayerIdx = layer.open({ | 
 |  |  | 
 |  |  |         $('#code').val(""); | 
 |  |  |         matData = []; | 
 |  |  |         tableIns.reload({data: matData}); | 
 |  |  |         $('input:radio[name="site"]').prop('checked',false); | 
 |  |  |         tips(""); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |             tips("请提取物料", true); | 
 |  |  |             return; | 
 |  |  |         } | 
 |  |  |         let site = $('input:radio[name="site"]:checked').next("span").html(); | 
 |  |  |         if (null === site || undefined === site) { | 
 |  |  |             tips("请选择入库口", true); | 
 |  |  |             return; | 
 |  |  |         } | 
 |  |  |         $.ajax({ | 
 |  |  |             url: baseUrl+"/mobile/comb/auth", | 
 |  |  |             url: baseUrl+"/full/store/put/start", | 
 |  |  |             headers: {'token': localStorage.getItem('token')}, | 
 |  |  |             data: JSON.stringify({ | 
 |  |  |                 barcode: barcode, | 
 |  |  |                 combMats: matData | 
 |  |  |                 devpNo: site, | 
 |  |  |                 list: matData | 
 |  |  |             }), | 
 |  |  |             contentType:'application/json;charset=UTF-8', | 
 |  |  |             method: 'POST', | 
 |  |  | 
 |  |  |             success: function (res) { | 
 |  |  |                 if (res.code === 200) { | 
 |  |  |                     reset(); | 
 |  |  |                     tips("组托成功") | 
 |  |  |                     tips("启动入库成功") | 
 |  |  |                 } else if (res.code === 403) { | 
 |  |  |                     top.location.href = baseUrl + "/pda"; | 
 |  |  |                 } else { | 
 |  |  | 
 |  |  |         tips.css("color", warn?"red":'#666'); | 
 |  |  |     } | 
 |  |  | </script> | 
 |  |  | <script type="text/template" id="inSitesTemplate"> | 
 |  |  |     {{#each data}} | 
 |  |  |     <label><input class="cool-checkbox" type="radio" name="site"><span>{{this}}</span></label> | 
 |  |  |     {{/each}} | 
 |  |  | </script> | 
 |  |  | </html> |