|  |  | 
 |  |  |  | 
 |  |  |         .form-box { | 
 |  |  |             padding: 15px 5px 5px 5px; | 
 |  |  |             font-size: 12px; | 
 |  |  |             font-size: 16px; | 
 |  |  |             text-align: center; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         .form-box span { | 
 |  |  |             font-size: 12px; | 
 |  |  |             font-size: 16px; | 
 |  |  |             display: inline-block; | 
 |  |  |             text-align: right; | 
 |  |  |             width: 50px; | 
 |  |  |             width: 70px; | 
 |  |  |         } | 
 |  |  |         .form-box input { | 
 |  |  |             width: 120px; | 
 |  |  |             margin-left: 10px; | 
 |  |  |             padding-left: 5px; | 
 |  |  |             height: 20px; | 
 |  |  |             height: 30px; | 
 |  |  |             border: 1px solid #777777; | 
 |  |  |             overflow:hidden; | 
 |  |  |             white-space:nowrap; | 
 |  |  | 
 |  |  |         } | 
 |  |  |         .number-tool button { | 
 |  |  |             background-color: #fff; | 
 |  |  |             margin-top: 2px; | 
 |  |  |             font-size: 13px; | 
 |  |  |             height: 18px; | 
 |  |  |             margin-top: 3px; | 
 |  |  |             font-size: 16px; | 
 |  |  |             height: 25px; | 
 |  |  |             float: left; | 
 |  |  |             width: 20px; | 
 |  |  |             width: 25px; | 
 |  |  |             border: 1px solid #777777; | 
 |  |  |         } | 
 |  |  |         .number-tool input { | 
 |  |  |             text-align: center; | 
 |  |  |             height: 20px; | 
 |  |  |             height: 30px; | 
 |  |  |             float: left; | 
 |  |  |             margin: 0 5px; | 
 |  |  |             width: 30px; | 
 |  |  |             width: 40px; | 
 |  |  |             padding: 0; | 
 |  |  |         } | 
 |  |  |     </style> | 
 |  |  | 
 |  |  |  | 
 |  |  | <div class="form-box"> | 
 |  |  |     <div class="form-item"> | 
 |  |  |         <span>物料编码</span> | 
 |  |  |         <span>商品编号</span> | 
 |  |  |         <input id="matNo" type="text" placeholder="扫码 / 输入" onkeyup="find(this)" autocomplete="off"> | 
 |  |  |     </div> | 
 |  |  |     <div class="form-item"> | 
 |  |  |         <span>物料名称</span> | 
 |  |  |         <span>商品名称</span> | 
 |  |  |         <input id="matName" type="text" disabled="disabled"> | 
 |  |  |     </div> | 
 |  |  |     <div class="form-item"> | 
 |  |  |         <span>物料规格</span> | 
 |  |  |         <span>规格</span> | 
 |  |  |         <input id="str2" type="text" disabled="disabled"> | 
 |  |  |     </div> | 
 |  |  |     <div class="form-item"> | 
 |  |  | 
 |  |  |     var pageCurr; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 根据物料编码查询物料详情 | 
 |  |  |      * 根据商品编号查询物料详情 | 
 |  |  |      */ | 
 |  |  |     function find(el){ | 
 |  |  |         if (isEmpty(el.value)) { | 
 |  |  | 
 |  |  |                         $('#matName').val(res.data.matName); | 
 |  |  |                         $('#str1').val(res.data.str1); | 
 |  |  |                         $('#str2').val(res.data.str2); | 
 |  |  |                         countDom.focus().val(initMatCount) | 
 |  |  |                         countDom.val(initMatCount); | 
 |  |  |                         $('#count').focus().select(); | 
 |  |  |                     } | 
 |  |  |                 } else if (res.code === 403) { | 
 |  |  |                     top.location.href = baseUrl + "/pda"; | 
 |  |  | 
 |  |  |     $(document).on('click','#confirm', function () { | 
 |  |  |     }) | 
 |  |  |  | 
 |  |  |     $('body').keydown(function () { | 
 |  |  |         if (event.keyCode === 13) { | 
 |  |  |             $("#confirm").click(); | 
 |  |  |         } | 
 |  |  |     }); | 
 |  |  |     // $('body').keydown(function () { | 
 |  |  |     //     if (event.keyCode === 13) { | 
 |  |  |     //         $("#confirm").click(); | 
 |  |  |     //     } | 
 |  |  |     // }); | 
 |  |  |  | 
 |  |  |     function add() { | 
 |  |  |         countDom.val(Number(countDom.val()) + 1); | 
 |  |  | 
 |  |  |         countDom.val(countDom.val() - 1); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     document.onkeyup = function (e) { | 
 |  |  |         if (window.event)//如果window.event对象存在,就以此事件对象为准 | 
 |  |  |             e = window.event; | 
 |  |  |         var key = e.charCode || e.keyCode; | 
 |  |  |         if (key === 115) { | 
 |  |  |             confirm(); | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | </script> | 
 |  |  | </html> |