| | |
| | | "version" : "0.0", |
| | | "configurations" : [ |
| | | { |
| | | "app-plus" : |
| | | { |
| | | "app-plus" : { |
| | | "launchtype" : "local" |
| | | }, |
| | | "default" : |
| | | { |
| | | "default" : { |
| | | "launchtype" : "local" |
| | | }, |
| | | "h5" : |
| | | { |
| | | "h5" : { |
| | | "launchtype" : "local" |
| | | }, |
| | | "type" : "uniCloud" |
| | | }, |
| | | { |
| | | "playground" : "standard", |
| | | "playground" : "custom", |
| | | "type" : "uni-app:app-android" |
| | | }, |
| | | { |
| | | "playground" : "standard", |
| | | "type" : "uni-app:app-ios" |
| | | } |
| | | ] |
| | | } |
| | |
| | | showModal, |
| | | showToast, |
| | | } from "@/js/Page.js" |
| | | const rfidModule = uni.requireNativePlugin('RFIDModule'); |
| | | var main |
| | | export default { |
| | | globalData: { |
| | | largeMode: false, |
| | |
| | | onLaunch: function() { |
| | | console.log('App Launch'); |
| | | this.deviceInfo = uni.getSystemInfoSync(); |
| | | this.initscan(); |
| | | this.init(); |
| | | }, |
| | | onUnload() { |
| | | |
| | | // // 汉德霍尔 PDA rfid扫码页面卸载时释放资源 |
| | | // const rfidModule = uni.requireNativePlugin('HandheldRFID'); |
| | | // rfidModule.closeModule(); |
| | | if (this.deviceInfo?.brand.includes('alps')) { // 汉德霍尔设备特征 |
| | | // 汉德霍尔 PDA rfid扫码页面卸载时释放资源 |
| | | if (rfidModule) { |
| | | rfidModule.closeModule(); |
| | | } |
| | | } else { |
| | | main.unregisterReceiver(receiver); // 停止监听广播 |
| | | } |
| | | |
| | | }, |
| | | onShow: function() { |
| | | |
| | |
| | | onHide: function() { |
| | | console.log('App Hide') |
| | | }, |
| | | onError(err) { |
| | | console.error('[UniApp Error]', err) |
| | | // 可上报到服务器 |
| | | }, |
| | | methods: { |
| | | initscan() { |
| | | |
| | | init() { |
| | | let that = this; |
| | | console.log("deviceInfo", this.deviceInfo) |
| | | |
| | | if (this.deviceInfo?.brand.includes('alps')) { // 汉德霍尔设备特征 |
| | | |
| | | // const rfidModule = uni.requireNativePlugin('HandheldRFID'); |
| | | // console.log("rfidModule",rfidModule) |
| | | // rfidModule.initModule((res) => { |
| | | // console.log("rfid initModule", res) |
| | | // }) |
| | | rfidModule.initModule((res) => { |
| | | console.log("rfid initModule", res) |
| | | if (res.code < 0) { |
| | | showToast(res.msg); |
| | | } |
| | | |
| | | }) |
| | | } else if (this.deviceInfo?.brand.includes('mobiwire') || this.deviceInfo?.deviceBrand.includes( |
| | | 'mobiwire')) { // 霍尼韦尔 |
| | | |
| | | this.initMobiwireScan() |
| | | } else { |
| | | var main = plus.android.runtimeMainActivity() //获取activity |
| | | |
| | | this.initScan() |
| | | } |
| | | }, |
| | | initMobiwireScan() { |
| | | main = plus.android.runtimeMainActivity(); // 获取主 activity |
| | | var IntentFilter = plus.android.importClass("android.content.IntentFilter"); |
| | | var filter = new IntentFilter(); |
| | | const action = "com.rfid.scan" //默认广播 com.honeywell.scan.broadcast |
| | | const stringExtra = "data" |
| | | filter.addAction(action); // 添加广播动作 |
| | | |
| | | receiver = plus.android.implements("io.dcloud.feature.internal.reflect.BroadcastReceiver", { |
| | | onReceive: function(context, intent) { |
| | | plus.android.importClass(intent); |
| | | let code = intent.getStringExtra(stringExtra); // 获取广播中的字符串额外参数 |
| | | uni.$emit("scanresult", code); |
| | | }, |
| | | }); |
| | | main.registerReceiver(receiver, filter); // 开始监听广播 |
| | | |
| | | }, |
| | | |
| | | initScan() { |
| | | main = plus.android.runtimeMainActivity() //获取activity |
| | | var IntentFilter = plus.android.importClass('android.content.IntentFilter') //引入过滤器 |
| | | // Intent = plus.android.importClass('android.content.Intent'), |
| | | var filter = new IntentFilter() |
| | |
| | | onReceive: function(context, intent) { //实现onReceiver回调函数 |
| | | //console.log('onReceive',intent); |
| | | plus.android.importClass(intent); |
| | | var decodesource = intent.getStringExtra("com.symbol.datawedge.source"); |
| | | // var decodesource = intent.getStringExtra("com.symbol.datawedge.source"); |
| | | var decodedata = intent.getStringExtra("com.symbol.datawedge.data_string"); |
| | | var data = intent.getStringExtra("data"); |
| | | var decodelabeltype = intent.getStringExtra("com.symbol.datawedge.label_type"); |
| | | var scanResult = { |
| | | decodesource, |
| | | decodedata: decodedata || data, |
| | | decodelabeltype, |
| | | }; |
| | | // var decodelabeltype = intent.getStringExtra("com.symbol.datawedge.label_type"); |
| | | var scanResult = decodedata || data |
| | | console.log('onReceive', scanResult); |
| | | uni.$emit("scanresult", scanResult); |
| | | } |
| | |
| | | filter.addAction("com.pda.formobox"); //监听扫码广播 |
| | | filter.addAction('com.rfid.scan') // |
| | | main.registerReceiver(receiver, filter); //注册监听 |
| | | } |
| | | }, |
| | | onScan(callback) { |
| | | console.log('onScan'); |
| | | if (this.deviceInfo?.brand.includes('alps')) { // 汉德霍尔设备特征 |
| | | // const rfidModule = uni.requireNativePlugin('HandheldRFID'); |
| | | // rfidModule.startScan((res) => { |
| | | // if (res.code) { |
| | | // console.log(res) |
| | | // let data = res.data || "" |
| | | // if (Array.isArray(data)) { |
| | | // data = data.map((a) => a.epc).join(",") |
| | | // } |
| | | // var scanResult = { |
| | | // decodesource: "epc", |
| | | // decodedata: data, |
| | | // decodelabeltype: "", |
| | | // }; |
| | | // console.log(scanResult) |
| | | // callback(scanResult); |
| | | // } else { |
| | | // console.log("rfid startScan", res) |
| | | // } |
| | | // }) |
| | | if (!rfidModule) |
| | | return |
| | | rfidModule.startScan((ret) => { |
| | | console.log("startScan", ret) |
| | | let text = "" |
| | | if (ret.code < 0) { |
| | | showToast(ret.msg); |
| | | } else { |
| | | const data = ret.data || [] |
| | | if (Array.isArray(data)) { |
| | | if (data.length > 0) |
| | | text = data[0].epc |
| | | } else { |
| | | text = data.epc || "" |
| | | } |
| | | callback(text); |
| | | } |
| | | }) |
| | | } else { |
| | | uni.$off("scanresult"); |
| | | uni.$on("scanresult", (result) => { |
| | |
| | | @blur="onChange" @confirm="onConfirm" @click="onClick" :disabled="data.disabled" :maxlength="-1"></input> |
| | | <input v-else class="oi-input" :class="data.disabled?'input-disabled':''" |
| | | :style="{'padding-left':data.setting.prefix?0 : '8rpx','right':data.setting.suffix?0 : '8rpx'}" |
| | | v-model="data.value" :focus="focus" :placeholder="data.placeholder" @blur="onChange" @confirm="onConfirm" |
| | | v-model="data.value" :focus="focus" :placeholder="data.placeholder" @focus="onFocus" @blur="onChange" @confirm="onConfirm" |
| | | @click="onClick" :disabled="data.disabled"></input> |
| | | <text v-if="data.setting.suffix&& !viewMode" class="form-input-icon" :class="[data.setting.suffix]" |
| | | @click="onSuffixButton"></text> |
| | |
| | | this.$emit("on-click", e) |
| | | }, |
| | | onFocus(e) { |
| | | // getApp().onScan((result) => { |
| | | // if (!this.viewMode && !this.data.disabled) { |
| | | // if (this.model) |
| | | // this.model[data.fieldId] = result |
| | | // else |
| | | // this.data.value = result |
| | | // } |
| | | // }) |
| | | this.$emit("on-focus", e) |
| | | }, |
| | | onPrefixButton() { |
| | |
| | | options.method = options.method || this.common.method; |
| | | options.dataType = options.dataType || this.common.dataType; |
| | | return new Promise((resolve, reject) => { |
| | | //console.log("request:", options); |
| | | console.log("request:", options); |
| | | const app = getApp() |
| | | let url = options.url |
| | | let sessionID = app.globalData.sessionId || "" |
| | |
| | | "name" : "MoboxPDA", |
| | | "appid" : "__UNI__56D451E", |
| | | "description" : "", |
| | | "versionName" : "1.1.59", |
| | | "versionCode" : 1159, |
| | | "versionName" : "1.1.61", |
| | | "versionCode" : 1161, |
| | | "transformPx" : false, |
| | | /* 5+App特有相关 */ |
| | | "app-plus" : { |
| | |
| | | "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>", |
| | | "<uses-permission android:name=\"android.permission.VIBRATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", |
| | | "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" |
| | | "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>", |
| | | "<uses-permission android:name=\"android.permission.ACCESS_NOTIFICATION_POLICY\"/>" |
| | | ], |
| | | "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ], |
| | | "schemes" : "wmspda" |
| | |
| | | "ad" : {} |
| | | } |
| | | }, |
| | | "nativePlugins" : {} |
| | | "nativePlugins" : { |
| | | "rfid" : { |
| | | "__plugin_info__" : { |
| | | "name" : "rfid", |
| | | "description" : "My rfid Plugin", |
| | | "platforms" : "Android", |
| | | "url" : "", |
| | | "android_package_name" : "", |
| | | "ios_bundle_id" : "", |
| | | "isCloud" : false, |
| | | "bought" : -1, |
| | | "pid" : "", |
| | | "parameters" : {} |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | /* 快应用特有相关 */ |
| | | "quickapp" : {}, |
New file |
| | |
| | | { |
| | | "name": "rfid", |
| | | "id": "rfid", |
| | | "version": "1.0.0", |
| | | "description": "My rfid Plugin", |
| | | "_dp_type": "nativeplugin", |
| | | "_dp_nativeplugin": { |
| | | "android": { |
| | | "plugins": [{ |
| | | "type": "module", |
| | | "name": "RFIDModule", |
| | | "class": "com.handheld.rfid.RFIDModule" |
| | | }], |
| | | "resources": [ |
| | | "res/raw/barcodebeep", |
| | | "res/raw/beeps", |
| | | "res/raw/beeps" |
| | | ], |
| | | "integrateType": "aar", |
| | | "minSdkVersion": 21 |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | // url:'../index/index?args=9999999999' |
| | | // }); |
| | | }, |
| | | ontap(e) { //扫码功能 |
| | | // console.log(e.target) |
| | | getApp().onScan((result) => { |
| | | // console.log(result.decodedata); |
| | | this.data[e.target.dataset['key']] = result.decodedata; |
| | | }) |
| | | }, |
| | | translate(t) { |
| | | if (typeof this.$t == "function") return this.$t(`page.${t}`) |
| | | else return t; |
| | |
| | | //console.log(e.target) |
| | | getApp().onScan((result) => { |
| | | console.log(result); |
| | | this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']] |
| | | .Value = |
| | | result.decodedata; |
| | | this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value =result; |
| | | uni.hideKeyboard(); |
| | | this.onevent($ele, result.decodedata); |
| | | this.onevent($ele, result); |
| | | }) |
| | | }, |
| | | onarrow(index, open) { |
| | |
| | | |
| | | |
| | | }, |
| | | onevent(e, decodedata) { |
| | | onevent(e, value) { |
| | | // console.log(e.target); |
| | | var data_attr = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']]; |
| | | // console.log(decodedata); |
| | | // console.log(value); |
| | | if (e.detail.value != data_attr.Value) { |
| | | this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = |
| | | decodedata ? decodedata : e.detail.value; |
| | | value ? value : e.detail.value; |
| | | var eventid = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].action; |
| | | if (eventid) { |
| | | // self.event_no_sub = 1; |
| | |
| | | |
| | | |
| | | ontap(item) { //扫码功能 |
| | | // console.log("ontap",item); |
| | | // 打开蓝牙适配器 |
| | | // uni.openBluetoothAdapter({ |
| | | // success: function() { |
| | | // // 开始搜索蓝牙设备 |
| | | // uni.startBluetoothDevicesDiscovery({ |
| | | // success: function() { |
| | | // // 监听找到新设备的事件 |
| | | // uni.onBluetoothDeviceFound(function(devices) { |
| | | // // 这里可以过滤出RFID芯片,连接并读取数据 |
| | | // console.log(devices[0].deviceId); |
| | | // }) |
| | | // } |
| | | // }) |
| | | // } |
| | | // }); |
| | | // 监听NFC功能是否可用 |
| | | // uni.getNFCAdapterState({ |
| | | // success: function(res) { |
| | | // console.log(res); |
| | | // if (res.errCode === 0) { |
| | | // // NFC功能可用,开始监听 |
| | | // uni.onNFCStart((res) => { |
| | | // if (res.errCode === 0) { |
| | | // // 开始NFC标签检测 |
| | | // uni.makeNFCReaderStart({ |
| | | // success: function() { |
| | | // // 监听NFC标签 |
| | | // uni.onNFCTagDiscovered(function(res) { |
| | | // console.log(res); |
| | | // // 这里可以处理NFC标签数据 |
| | | // }) |
| | | // } |
| | | // }) |
| | | // } |
| | | // }) |
| | | // } |
| | | // } |
| | | // }) |
| | | |
| | | this.focusOldFieldId = item.fieldId |
| | | getApp().onScan((result) => { |
| | | console.log(result); |
| | | // uni.hideKeyboard(); |
| | | this.onScanValue(item, result.decodedata) |
| | | this.onScanValue(item, result) |
| | | }) |
| | | }, |
| | | onScanValue(item, value) { |
| | |
| | | ontap(e) { //扫码功能 |
| | | //console.log(e.target) |
| | | getApp().onScan((result) => { |
| | | //console.log(result.decodedata); |
| | | //console.log(result); |
| | | var isVal = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']].Value; |
| | | // if(!isVal){ |
| | | // this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result.decodedata; |
| | | // this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result; |
| | | // var isVald =this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value; |
| | | // return; |
| | | // } |
| | | //主数据类扫码查询数据 |
| | | if (isVal != result.decodedata) { |
| | | if (isVal != result) { |
| | | this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']].Value = result.decodedata; |
| | | 'iindex']].Value = result; |
| | | uni.hideKeyboard(); |
| | | //子数据类扫码区事件脚本 |
| | | var eventid = this.param.Scan_Code.Input_Change_Event.ID; |
| | |
| | | mast_attr: [], |
| | | inputParamter: [{ |
| | | attr: 'mast_input_3037', |
| | | value: result.decodedata |
| | | value: result |
| | | }] |
| | | } |
| | | |
| | |
| | | subontap(e) { //扫码功能 |
| | | //console.log(e.target) |
| | | getApp().onScan((result) => { |
| | | //console.log(result.decodedata); |
| | | //console.log(result); |
| | | var isVal = this.subClassAttrList[e.target.dataset['index']].Attr[e |
| | | .target.dataset['iindex']].Value; |
| | | //主数据类扫码查询数据 |
| | | if (isVal != result.decodedata) { |
| | | if (isVal != result) { |
| | | this.subClassAttrList[e.target.dataset['index']].Attr[e.target |
| | | .dataset['iindex']].Value = result.decodedata; |
| | | .dataset['iindex']].Value = result; |
| | | uni.hideKeyboard(); |
| | | //子数据类扫码区事件脚本 |
| | | var eventid = this.param.Scan_Code.Input_Change_Event.ID; |
| | |
| | | mast_attr: [], |
| | | inputParamter: [{ |
| | | attr: 'mast_input_3037', |
| | | value: result.decodedata |
| | | value: result |
| | | }] |
| | | } |
| | | |
| | |
| | | scan_ontap(e) { //扫码区扫码功能 |
| | | //console.log(e.target) |
| | | getApp().onScan((result) => { |
| | | console.log(result.decodedata); |
| | | console.log(result); |
| | | var isflag = true; |
| | | for (var i in this.subPanelList) { |
| | | if (this.subPanelList[i].scanCodeVal == result.decodedata) |
| | | if (this.subPanelList[i].scanCodeVal == result) |
| | | isflag = false; |
| | | } |
| | | //子数据类扫码查询数据 |
| | | if (isflag) { |
| | | uni.hideKeyboard(); |
| | | this.scanCodeVal = result.decodedata; |
| | | this.scanCodeVal = result; |
| | | var eventid = this.param.Scan_Code.Input_Change_Event.ID; |
| | | if (eventid) { |
| | | var mast_req = []; |
| | |
| | | ontap(item) { //扫码功能 |
| | | //console.log(e.target) |
| | | getApp().onScan((result) => { |
| | | //console.log(result.decodedata); |
| | | //console.log(result); |
| | | uni.hideKeyboard(); |
| | | var $this = this; |
| | | console.log(item); |
| | | item.value = result.decodedata |
| | | item.value = result |
| | | let newVal = item.value.trim() |
| | | if (newVal) { |
| | | item.oldvalue = newVal; |
| | |
| | | scan_ontap(e) { //扫码区扫码功能 |
| | | //console.log(e.target) |
| | | getApp().onScan((result) => { |
| | | console.log(result.decodedata); |
| | | item.value = result.decodedata |
| | | console.log(result); |
| | | item.value = result |
| | | let newVal = item.value |
| | | if (typeof item.value == "string") { |
| | | newVal = item.value.trim() |
| | |
| | | // var $ele = e; |
| | | //console.log(e.target) |
| | | getApp().onScan((result) => { |
| | | console.log(result.decodedata); |
| | | item.value = result.decodedata; |
| | | console.log(result); |
| | | item.value = result; |
| | | uni.hideKeyboard(); |
| | | var $this = this; |
| | | console.log(item); |
| | |
| | | // var $ele = e; |
| | | //console.log(e.target) |
| | | getApp().onScan((result) => { |
| | | console.log(result.decodedata); |
| | | item.value = result.decodedata; |
| | | console.log(result); |
| | | item.value = result; |
| | | uni.hideKeyboard(); |
| | | var $this = this; |
| | | console.log(item); |
| | |
| | | //console.log(e.target) |
| | | this.focusOldFieldId = item.fieldId |
| | | getApp().onScan((result) => { |
| | | console.log(result.decodedata); |
| | | item.value = result.decodedata; |
| | | console.log(result); |
| | | item.value = result; |
| | | // uni.hideKeyboard(); |
| | | var $this = this; |
| | | if (item.oldvalue != item.value && item.value.trim() != "") { |
| | |
| | | //console.log(e.target) |
| | | this.focusOldFieldId = item.fieldId |
| | | getApp().onScan(async (result) => { |
| | | console.log(result.decodedata); |
| | | item.value = result.decodedata; |
| | | console.log(result); |
| | | item.value = result; |
| | | var $this = this; |
| | | let newVal = item.value.trim() |
| | | if (newVal) { |
| | |
| | | // var $ele = e; |
| | | this.focusOldFieldId = item.fieldId |
| | | getApp().onScan((result) => { |
| | | console.log(result.decodedata); |
| | | item.value = result.decodedata; |
| | | console.log(result); |
| | | item.value = result; |
| | | //uni.hideKeyboard(); |
| | | var $this = this; |
| | | |
| | |
| | | //console.log(e.target) |
| | | this.focusOldField = `${e.target.dataset['index']}-${e.target.dataset['iindex']}` |
| | | getApp().onScan((result) => { |
| | | //console.log(result.decodedata); |
| | | //console.log(result); |
| | | this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = |
| | | result.decodedata; |
| | | result; |
| | | uni.hideKeyboard(); |
| | | this.onevent($ele, result.decodedata); |
| | | if (result.decodedata) { //第一个输入框不为空 |
| | | this.onevent($ele, result); |
| | | if (result) { //第一个输入框不为空 |
| | | //初始化,下个输入框focus属性 |
| | | const attrs = this.classAttrList[e.target.dataset['index']].Attr || [] |
| | | var findd = false |
| | |
| | | |
| | | |
| | | }, |
| | | onevent(e, decodedata) { |
| | | onevent(e, value) { |
| | | // console.log(e.target); |
| | | var data_attr = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]; |
| | | // console.log(decodedata); |
| | | // console.log(value); |
| | | if (e.detail.value != data_attr.Value) { |
| | | this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = |
| | | decodedata ? decodedata : e.detail.value; |
| | | value ? value : e.detail.value; |
| | | var eventid = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | .action; |
| | | if (eventid) { |
| | |
| | | //console.log(e.target) |
| | | this.focusOldFieldId = item.fieldId |
| | | getApp().onScan((result) => { |
| | | console.log(result.decodedata); |
| | | item.value = result.decodedata; |
| | | console.log(result); |
| | | item.value = result; |
| | | var $this = this; |
| | | let newVal = item.value.trim() |
| | | if (newVal) { |
| | |
| | | //console.log(e.target) |
| | | this.focusOldField = `${e.target.dataset['index']}-${e.target.dataset['iindex']}` |
| | | getApp().onScan((result) => { |
| | | //console.log(result.decodedata); |
| | | //console.log(result); |
| | | var isVal = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']].Value; |
| | | // if(!isVal){ |
| | | // this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result.decodedata; |
| | | // this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result; |
| | | // var isVald =this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value; |
| | | // return; |
| | | // } |
| | | //主数据类扫码查询数据 |
| | | if (isVal != result.decodedata) { |
| | | if (isVal != result) { |
| | | this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']] |
| | | .Value = result.decodedata; |
| | | .Value = result; |
| | | uni.hideKeyboard(); |
| | | //子数据类扫码区事件脚本 |
| | | var eventid = this.param.Scan_Code.Input_Change_Event.ID; |
| | |
| | | mast_attr: req, |
| | | inputParamter: [{ |
| | | attr: 'mast_input_3037', |
| | | value: result.decodedata |
| | | value: result |
| | | }] |
| | | } |
| | | |
| | | this.scan_DataObjRunCustomEvent(info, ""); |
| | | } |
| | | if (result.decodedata) { //第一个输入框不为空 |
| | | if (result) { //第一个输入框不为空 |
| | | //初始化,下个输入框focus属性 |
| | | const attrs = this.classAttrList[e.target.dataset['index']].Attr || [] |
| | | var findd = false |
| | |
| | | subontap(e) { //扫码功能 |
| | | //console.log(e.target) |
| | | getApp().onScan((result) => { |
| | | //console.log(result.decodedata); |
| | | //console.log(result); |
| | | var isVal = this.subClassAttrList[e.target.dataset['index']].Attr[e.target |
| | | .dataset[ |
| | | 'iindex']].Value; |
| | | //主数据类扫码查询数据 |
| | | if (isVal != result.decodedata) { |
| | | if (isVal != result) { |
| | | this.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']] |
| | | .Value = result.decodedata; |
| | | .Value = result; |
| | | uni.hideKeyboard(); |
| | | //子数据类扫码区事件脚本 |
| | | var eventid = this.param.Scan_Code.Input_Change_Event.ID; |
| | |
| | | mast_attr: [], |
| | | inputParamter: [{ |
| | | attr: 'mast_input_3037', |
| | | value: result.decodedata |
| | | value: result |
| | | }] |
| | | } |
| | | |
| | |
| | | scan_ontap(e) { //扫码区扫码功能 |
| | | //console.log(e.target) |
| | | getApp().onScan((result) => { |
| | | console.log(result.decodedata); |
| | | console.log(result); |
| | | var isflag = true; |
| | | for (var i in this.subPanelList) { |
| | | if (this.subPanelList[i].scanCodeVal == result.decodedata) |
| | | if (this.subPanelList[i].scanCodeVal == result) |
| | | isflag = false; |
| | | } |
| | | //子数据类扫码查询数据 |
| | | if (isflag) { |
| | | uni.hideKeyboard(); |
| | | this.scanCodeVal = result.decodedata; |
| | | this.scanCodeVal = result; |
| | | var eventid = this.param.Scan_Code.Input_Change_Event.ID; |
| | | if (eventid) { |
| | | var mast_req = []; |