From 619b47962e41f506baf7ce2b535b2de1fecc719e Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期四, 19 六月 2025 10:58:49 +0800
Subject: [PATCH] rfid扫描添加原生插件

---
 pages/modal/5601.vue |   66 ++++++++++++++++++++++-----------
 1 files changed, 44 insertions(+), 22 deletions(-)

diff --git a/pages/modal/5601.vue b/pages/modal/5601.vue
index 1dca303..9545276 100644
--- a/pages/modal/5601.vue
+++ b/pages/modal/5601.vue
@@ -1,5 +1,5 @@
 <template>
-	<view class="uni-page-modal-5601">
+	<view class="uni-page-modal-5601" :class="largeMode?'large-mode':''">
 		<!-- 琛ㄥご鏍峰紡 -->
 		<OIForm ref="refBaseForm" class="v-headStyle" :form="head_styledef.form" :focusId="focusFieldId"
 			@on-click="onClick" @on-focus="ontap" @on-change="onEnterChange" @on-click-prefix="classAttr_extButton"
@@ -17,7 +17,7 @@
 				<swiper class="view-tabpage" :current="current" @change="changeSwiper">
 					<!-- 瀛愮晫闈�-->
 					<swiper-item v-for="(pageData, pageIndex) in pageDetail" :key="pageIndex">
-						<view class="uni-panel-content">
+						<view class="tab-content">
 							<view class="view-tab-content" :id="'tabpanel' + pageData.Name">
 								<image class="logo" v-if="pageData.DefList.length==0"
 									src="../../images/mobox_log_200x40.png">
@@ -139,6 +139,7 @@
 
 		data() {
 			return {
+				largeMode: getApp().globalData.largeMode || false,
 				title: this.translateSys("inventory"),
 				ClsID: '',
 				param: {},
@@ -490,7 +491,25 @@
 								}
 							}
 						}
-
+						const app = getApp()
+						if (app.globalData.bindClasses) {
+							styledefHead.form.items.push({
+								name: "Input",
+								label: this.translate("classes"),
+								labelWidth: 100,
+								disabled: true,
+								value: app.globalData.classes,
+								setting: {
+									width: 100,
+									height: 50,
+								},
+								bind: {
+									attr: "",
+								},
+								fieldId: "S_CLASSES",
+							})
+							styledefHead.form.model["S_CLASSES"] = app.globalData.classes
+						}
 					}
 					this.setData({
 						head_styledef: styledefHead
@@ -625,8 +644,8 @@
 				//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) {
@@ -1427,10 +1446,10 @@
 					return;
 				}
 				var styleStr = JSON.stringify(pageData.StyleDef);
-				var detailStyle = JSON.parse(styleStr);
-				if (detailStyle.form) {
-					data.content.forEach(cont => {
-						detailStyle = JSON.parse(styleStr);
+
+				data.content.forEach(cont => {
+					var detailStyle = JSON.parse(styleStr);
+					if (detailStyle.form) {
 						detailStyle.SelBut_Checked = data.checkbox ?? true;
 
 						detailStyle.form.objId = cont.id;
@@ -1489,9 +1508,9 @@
 						}
 						// $this.setData({pageDetail:pageD})
 						$this.$set(this.pageDetail, pageIndex, pageData)
+					}
+				});
 
-					});
-				}
 				$this.$set(this.pageDetail, pageIndex, pageData)
 			},
 			setFormValues(attrs) {
@@ -2939,6 +2958,12 @@
 			flex-direction: column !important;
 		}
 
+		.tab-content {
+			display: flex;
+			width: 100%;
+			height: 100%;
+			flex-direction: column !important;
+		}
 
 		.view-bottom {
 			display: flex;
@@ -2954,7 +2979,6 @@
 			.btn-left {
 				padding: 20rpx;
 				line-height: 1.5;
-				font-size: 38rpx;
 				font-weight: bold;
 				float: left;
 				display: inline-block;
@@ -2964,7 +2988,6 @@
 			.btn-one {
 				padding: 20rpx;
 				line-height: 1.5;
-				font-size: 38rpx;
 				font-weight: bold;
 				float: left;
 				display: inline-block;
@@ -2975,7 +2998,6 @@
 			.btn-right {
 				padding: 20rpx;
 				line-height: 1.5;
-				font-size: 38rpx;
 				font-weight: bold;
 				float: right;
 				display: inline-block;
@@ -3060,7 +3082,7 @@
 			.dv-panel-button {
 				width: 100%;
 				text-align: left;
-				min-height: 30rpx;
+				min-height: 16px;
 				padding-bottom: 10rpx;
 
 				checkbox {
@@ -3072,7 +3094,7 @@
 					text-align: left;
 					line-height: 1.5;
 					border: none;
-					font-size: 30rpx;
+
 					margin-right: 10rpx;
 					display: inline-block;
 					float: right;
@@ -3132,7 +3154,6 @@
 			background: #94D5EF;
 			display: block;
 			width: 100%;
-			font-size: 36rpx;
 			line-height: 80rpx;
 			font-weight: 500;
 		}
@@ -3151,8 +3172,6 @@
 			background: #FFF;
 			border-radius: 0 !important;
 			color: #2d8cf0;
-			/* padding: 10rpx 8rpx 12rpx; */
-			font-size: 34rpx;
 			font-family: inherit;
 			box-shadow: none !important;
 			transition-duration: 0.1s;
@@ -3206,7 +3225,6 @@
 		}
 
 		.popup-header {
-			font-size: 42rpx;
 			font-weight: bold;
 			margin: 20rpx 20rpx 0px 20rpx;
 		}
@@ -3231,7 +3249,6 @@
 			background: #27A6E1;
 			border: none;
 			color: #fff;
-			font-size: 38rpx;
 			font-weight: bold;
 			/* float: left; */
 			display: inline-block;
@@ -3247,7 +3264,6 @@
 			// color: #fff;
 			background: #fff;
 			color: #000;
-			font-size: 38rpx;
 			font-weight: bold;
 			/* float: right; */
 			display: inline-block;
@@ -3255,4 +3271,10 @@
 
 
 	}
+
+	.uni-page-modal-5601.large-mode {
+		.dv-panel-button {
+			min-height: 32px !important;
+		}
+	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.1