|  |  |  | 
|---|
|  |  |  | tips("请提取物料", true); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | console.log(JSON.stringify({ | 
|---|
|  |  |  | barcode: barcode, | 
|---|
|  |  |  | combMats: matData | 
|---|
|  |  |  | })) | 
|---|
|  |  |  | httpRequest({ | 
|---|
|  |  |  | httpUrl: baseUrl+"/mobile/comb/form", | 
|---|
|  |  |  | httpUrl: baseUrl+"/mobile/comb/auth", | 
|---|
|  |  |  | type: 'post', | 
|---|
|  |  |  | headers: [{token: getCookie('token')}], | 
|---|
|  |  |  | data: { | 
|---|
|  |  |  | headers: [ | 
|---|
|  |  |  | {token: getCookie('token')} | 
|---|
|  |  |  | ,{"Content-type":'application/json;charset=UTF-8',} | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | data: JSON.stringify({ | 
|---|
|  |  |  | barcode: barcode, | 
|---|
|  |  |  | combMats: matData | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }) , | 
|---|
|  |  |  | }, function (res) { | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | reset(); | 
|---|
|  |  |  | 
|---|
|  |  |  | if (defaultContentType) { | 
|---|
|  |  |  | xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | console.log(JSON.stringify(requestData)) | 
|---|
|  |  |  | xmlhttp.send(requestData); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | document.onkeyup = function (e) { | 
|---|
|  |  |  | if (window.event)//如果window.event对象存在,就以此事件对象为准 | 
|---|
|  |  |  | e = window.event; | 
|---|
|  |  |  | var code = e.charCode || e.keyCode; | 
|---|
|  |  |  | if (code === 13) { | 
|---|
|  |  |  | comb() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // todo | 
|---|
|  |  |  | setTimeout(function () { | 
|---|
|  |  |  | code.value = "888" | 
|---|