|  |  | 
 |  |  |     <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> | 
 |  |  |     <style> | 
 |  |  |         .form-box { | 
 |  |  |             padding: 15px 5px 5px 5px; | 
 |  |  |             padding: 15px 5px 5px 0px; | 
 |  |  |             font-size: 16px; | 
 |  |  |             text-align: center; | 
 |  |  |         } | 
 |  |  | 
 |  |  |             display: inline-block; | 
 |  |  |             text-align: right; | 
 |  |  |             width: 70px; | 
 |  |  |             vertical-align: middle; | 
 |  |  |         } | 
 |  |  |         .form-box input { | 
 |  |  |             width: 120px; | 
 |  |  | 
 |  |  |             overflow:hidden; | 
 |  |  |             white-space:nowrap; | 
 |  |  |             text-overflow:ellipsis; | 
 |  |  |             vertical-align: middle; | 
 |  |  |         } | 
 |  |  |         .form-box textarea { | 
 |  |  |             height: 60px; | 
 |  |  |             width: 120px; | 
 |  |  |             margin-left: 10px; | 
 |  |  |             padding-left: 5px; | 
 |  |  |             height: 30px; | 
 |  |  |             border: 1px solid #777777; | 
 |  |  |             display: inline-block; | 
 |  |  |             vertical-align: middle; | 
 |  |  |         } | 
 |  |  |         #selectBtn { | 
 |  |  |             vertical-align: middle; | 
 |  |  |             padding: 3px 5px; | 
 |  |  |             height: 32px; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         #confirm { | 
 |  |  |             margin-top: 10px; | 
 |  |  |             padding: 5px 20px; | 
 |  |  | 
 |  |  | <body> | 
 |  |  |  | 
 |  |  | <div class="form-box"> | 
 |  |  |     <div class="form-item"> | 
 |  |  |     <div class="form-item" style="padding-left: 33px;"> | 
 |  |  |         <span>商品编码</span> | 
 |  |  |         <input id="matnr" type="text" placeholder="扫码 / 输入" onkeyup="find(this)" autocomplete="off"> | 
 |  |  |         <button id="selectBtn">选</button> | 
 |  |  |     </div> | 
 |  |  |     <div class="form-item"> | 
 |  |  |         <span style="float: left;margin-left: 38px">商品名称</span> | 
 |  |  |         <textarea id="maktx" type="text" disabled="disabled" style="height: 60px;float: left;"></textarea> | 
 |  |  |         <span>商品名称</span> | 
 |  |  |         <textarea id="maktx" type="text" disabled="disabled"></textarea> | 
 |  |  |         <div style="clear: both"></div> | 
 |  |  |     </div> | 
 |  |  |     <div class="form-item"> | 
 |  |  | 
 |  |  |  | 
 |  |  | </body> | 
 |  |  | <script> | 
 |  |  |     var layer; | 
 |  |  |     layui.use(['layer'], function() { | 
 |  |  |         layer = layui.layer; | 
 |  |  |     }) | 
 |  |  |     var countDom = $('#count'); | 
 |  |  |     var initMatCount = 1; | 
 |  |  |     var pageCurr; | 
 |  |  | 
 |  |  |                         $('#specs').val(res.data.specs); | 
 |  |  |                         $('#unit').val(res.data.unit); | 
 |  |  |                         countDom.val(initMatCount); | 
 |  |  |                         $('#count').focus().select(); | 
 |  |  |                         // $('#count').focus().select(); | 
 |  |  |                     } | 
 |  |  |                 } else if (res.code === 403) { | 
 |  |  |                     top.location.href = baseUrl + "/pda"; | 
 |  |  | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |         }) | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     function findBySelect(el) { | 
 |  |  |         $("#matnr").val(el.value); | 
 |  |  |         find(el); | 
 |  |  |         layer.close(matSelectIdx); | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     window.onload = function(){document.getElementById("matnr").focus();} | 
 |  |  |     $(document).on('click','#confirm', function () { | 
 |  |  |     var matSelectIdx; | 
 |  |  |     $(document).on('click','#selectBtn', function () { | 
 |  |  |         matSelectIdx = layer.open({ | 
 |  |  |             type: 2, | 
 |  |  |             title: false, | 
 |  |  |             area: ['100%', '100%'], | 
 |  |  |             content: 'selectMat.html', | 
 |  |  |             success: function(layero, index){ | 
 |  |  |                 $('.layui-layer-setwin .layui-layer-close2').hide(); | 
 |  |  |             } | 
 |  |  |         }); | 
 |  |  |     }) | 
 |  |  |  | 
 |  |  |     // $('body').keydown(function () { | 
 |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | </script> | 
 |  |  | </html> | 
 |  |  | </html> |