App.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
api/data.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/modal/3200.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/modal/3202.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/modal/3202_view.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/modal/5600.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/modal/5601.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
App.vue
@@ -1,4 +1,8 @@ <script> import { showModal, showToast, } from "@/js/Page.js" export default { globalData: { largeMode: false, @@ -20,21 +24,25 @@ bindClasses: false, classes: "" }, data() { //获取全局参数:url-服务器地址 return { } }, onLaunch: function() { console.log('App Launch'); this.deviceInfo = uni.getSystemInfoSync(); this.initscan(); }, onUnload() { // // 汉德霍尔 PDA rfid扫码页面卸载时释放资源 // const rfidModule = uni.requireNativePlugin('HandheldRFID'); // rfidModule.closeModule(); }, onShow: function() { // const args = plus.runtime.arguments || "" // if(args) // { // uni.showModal({ // title: "App参数", // content: args, // showCancel: false, // confirmText:"cancel" // }); // } console.log('App Show') }, onHide: function() { @@ -43,11 +51,20 @@ methods: { initscan() { let that = this; var main = plus.android.runtimeMainActivity(), //获取activity IntentFilter = plus.android.importClass('android.content.IntentFilter'), //引入过滤器 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) // }) } else { var main = plus.android.runtimeMainActivity() //获取activity var IntentFilter = plus.android.importClass('android.content.IntentFilter') //引入过滤器 // Intent = plus.android.importClass('android.content.Intent'), filter = new IntentFilter(), receiver = plus.android.implements('io.dcloud.feature.internal.reflect.BroadcastReceiver', { var filter = new IntentFilter() var receiver = plus.android.implements('io.dcloud.feature.internal.reflect.BroadcastReceiver', { onReceive: function(context, intent) { //实现onReceiver回调函数 //console.log('onReceive',intent); plus.android.importClass(intent); @@ -59,7 +76,6 @@ decodesource, decodedata: decodedata || data, decodelabeltype, }; console.log('onReceive', scanResult); uni.$emit("scanresult", scanResult); @@ -69,14 +85,39 @@ 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) // } // }) } else { uni.$off("scanresult"); uni.$on("scanresult", (result) => { callback(result); }); } }, } } </script> @@ -148,14 +189,17 @@ .uni-data-tree { font-size: 24px !important; .input-value { height: 45px !important; font-size: 24px !important; } .placeholder { font-size: 24px !important; } } .segmented-control__text { font-size: 24px !important; height: 45px; api/data.js
@@ -4,6 +4,23 @@ } from '@/js/Base64.js'; import utils from "@/js/utils.js" /** * api/wms/basisver/Get?sessionid=SESSION_ID * 数据模型版本 * @returns */ export const basisver_get = () => { const app = getApp() var url = app.globalData.mobox3ApiUrl.data + 'api/wms/basisver/Get?sessionid=' + app.globalData.sessionId return http.request({ method: "GET", header: {}, url, }) } /** * api/class/attr/GetList * 得到数据类属性列表 pages/modal/3200.vue
@@ -1551,10 +1551,11 @@ return; } var styleStr = JSON.stringify($this.detail1_styledef); var detailStyle = JSON.parse(styleStr); if (detailStyle.form) { data.content.forEach(cont => { detailStyle = JSON.parse(styleStr); let detailStyle = JSON.parse(styleStr); if (detailStyle.form) { detailStyle.SelBut_Checked = data.checkbox ?? true; detailStyle.form.objId = cont.id; @@ -1611,8 +1612,8 @@ } else { $this.detail1StyleDefList.push(detailStyle); //待分拣 } }); } }); }, pages/modal/3202.vue
@@ -921,9 +921,10 @@ } var styleStr = JSON.stringify($this.detail1_styledef); var detailStyle = JSON.parse(styleStr); if (detailStyle.form) { data.content.forEach(cont => { detailStyle = JSON.parse(styleStr); var detailStyle = JSON.parse(styleStr); if (detailStyle.form) { detailStyle.SelBut_Checked = data.checkbox ?? true; detailStyle.form.objId = cont.id; @@ -980,8 +981,9 @@ } else { $this.detail1StyleDefList.push(detailStyle); //待分拣 } }); } }); }, //点中表单 pages/modal/3202_view.vue
@@ -322,9 +322,10 @@ return; } let styleStr = JSON.stringify(this.detail1_styledef); //已码盘 let detailStyle = JSON.parse(styleStr); list.forEach((cont) => { let attrs = []; let detailStyle = JSON.parse(styleStr); Object.keys(cont).forEach((a) => { attrs.push({ attr: a, pages/modal/5600.vue
@@ -200,6 +200,7 @@ dictGetInfo } from "@/api/mobox.js" import { basisver_get, getUIStyleInfo, runCustomEvent, dataObjCreate, @@ -279,7 +280,22 @@ }); }); }, async getBasisVer() { try { const res = await basisver_get(); const basisver = (res.ver || "").toLowerCase(); return basisver; } catch (ex) { return ""; } }, async loadData(paramValue) { let clsDetailId = "CG_Detail"; const basisver = await this.getBasisVer(); if (basisver >= "v16.5") { clsDetailId = "INV_Detail"; } this.ClsID = clsDetailId; //获取数据类的自定义表单参数 await this.Head_UIStyleGetInfo(this.ClsID, this.param.Input_UI_Style.ID); //传入参数值 pages/modal/5601.vue
@@ -1446,10 +1446,10 @@ return; } var styleStr = JSON.stringify(pageData.StyleDef); data.content.forEach(cont => { var detailStyle = JSON.parse(styleStr); if (detailStyle.form) { data.content.forEach(cont => { detailStyle = JSON.parse(styleStr); detailStyle.SelBut_Checked = data.checkbox ?? true; detailStyle.form.objId = cont.id; @@ -1508,9 +1508,9 @@ } // $this.setData({pageDetail:pageD}) $this.$set(this.pageDetail, pageIndex, pageData) }); } }); $this.$set(this.pageDetail, pageIndex, pageData) }, setFormValues(attrs) {