| | |
| | | //fetchCYSData(); |
| | | } |
| | | ) |
| | | |
| | | |
| | | document.getElementById('saomiaolb').addEventListener('tap', function() { |
| | | console.log(12); |
| | | var url = 'getScanCode1.html'; |
| | | mui.openWindow({ |
| | | |
| | | url: url, |
| | | extras: {}, |
| | | waiting: { |
| | | autoShow: true, |
| | | title: '加载中' |
| | | } |
| | | }); |
| | | |
| | | }, false) |
| | | |
| | | |
| | | function scaned(t, r, f) { |
| | | console.log(r); |
| | | $("#DAB001").val(r); |
| | | |
| | | GetBJINFO(); |
| | | } |
| | | |
| | | |
| | | |
| | | function populateTable(data) { |
| | | |
| | |
| | | "id" : "H546D0BA6", /*应用的标识*/ |
| | | "name" : "YKD_MES", /*应用名称,程序桌面图标名称*/ |
| | | "version" : { |
| | | "name" : "3.64", /*应用版本名称*/ |
| | | "name" : "3.65", /*应用版本名称*/ |
| | | "code" : "100" |
| | | }, |
| | | "description" : "", /*应用描述信息*/ |
| | |
| | | "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>", |
| | | "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>", |
| | | "<uses-permission android:name=\"android.permission.BLUETOOTH\"/>", |
| | | "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>", |
| | | "<uses-permission android:name=\"android.permission.BLUETOOTH_SCAN\"/>", |
| | | "<uses-permission android:name=\"android.permission.BLUETOOTH_ADVERTISE\"/>", |
| | | "<uses-permission android:name=\"android.permission.BLUETOOTH_CONNECT\"/>" |
| | | "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>" |
| | | ], |
| | | "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ] |
| | | }, |
| | |
| | | <div class="mui-input-group mui-content"> |
| | | |
| | | <div class="mui-input-row" id="row001"> |
| | | <label>条码</label> |
| | | <input id="DAB001" type="text" value="" class="mui-input-clear text-color" placeholder="请扫描条码" onkeypress="GetBJINFO()" /> |
| | | |
| | | <label id="saomiaolb" style="color:#0062CC">点击启动扫描</label> |
| | | <input id="DAB001" type="text" value="" class="mui-input-clear text-color" placeholder="请扫描条码" onkeypress="GetBJINFO()" /> |
| | | </div> |
| | | <div class="mui-input-row" id="row001"> |
| | | <label>指令单号</label> |
| | |
| | | var address_mac = api_localStorageGet("printMac") ? api_localStorageGet("printMac") : |
| | | "DC:1D:30:3F:D2:50"; |
| | | device = BAdapter.getRemoteDevice(address_mac); |
| | | |
| | | |
| | | |
| | | plus.android.requestPermissions(['android.permission.BLUETOOTH_SCAN','android.permission.BLUETOOTH_CONNECT']); |
| | | |
| | | console.log(231); |
| | | |
| | | plus.android.importClass(device); |
| | | |
| | | bluetoothSocket = device.createInsecureRfcommSocketToServiceRecord(uuid); |
| | | |
| | | console.log(231); |
| | | |
| | | console.log(JSON.stringify(bluetoothSocket, null, 2)); |
| | | |
| | | plus.android.importClass(bluetoothSocket); |