From 07925905f1a596e20e980de6d42db217abb753b0 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 12 十二月 2025 18:06:11 +0800
Subject: [PATCH] plugin

---
 pages/modal/5602.vue |   54 ++++++++++++++++++++----------------------------------
 1 files changed, 20 insertions(+), 34 deletions(-)

diff --git a/pages/modal/5602.vue b/pages/modal/5602.vue
index 2214147..1af3b47 100644
--- a/pages/modal/5602.vue
+++ b/pages/modal/5602.vue
@@ -38,7 +38,7 @@
 				<!-- 椤电 -->
 				<view class="dv-tab">
 					<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem"
-						styvarype="button">
+						styvarype="text">
 					</uni-segmented-control>
 				</view>
 				<swiper class="view-tabpage" :current="current" @change="changeSwiper">
@@ -199,7 +199,7 @@
 <script>
 	import {
 		Base64
-	} from  '@/js/Base64.js';
+	} from '@/js/Base64.js';
 	import {
 		appGetInfo,
 		dictGetInfo
@@ -210,11 +210,12 @@
 		dataObjCreate,
 		dataObjDel
 	} from "@/api/data.js"
-
+import {showInfo,
+		showError} from "@/js/Page.js"
 	export default {
 		data() {
 			return {
-					largeMode: getApp().globalData.largeMode || false,
+				largeMode: getApp().globalData.largeMode || false,
 				title: this.translateSys("sorting"),
 				ClsID: "Distribution_CNTR_Detail",
 				ClsID2: "Picking_Result",
@@ -251,15 +252,18 @@
 				popupParam: {},
 			};
 		},
+		onReady() {
+			uni.setNavigationBarTitle({
+				title: this.title 
+			}); //璁剧疆椤堕儴鏍囬 
+		},
 		onLoad(options) {
 			// console.log(options);
-			uni.setNavigationBarTitle({
-				title: options.titlename
-			}); //璁剧疆椤堕儴鏍囬 
 			this.title = options.titlename;
 			this.param = JSON.parse(options.param);
 			// console.log(this.param);
-			this.loadData(options.paramValue)
+			const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined
+			this.loadData(paramValue)
 		},
 		methods: {
 			setData: function(obj) {
@@ -289,27 +293,7 @@
 				await this.Head_UIStyleGetInfo(this.ClsID, this.param.Input_UI_Style.ID);
 				//浼犲叆鍙傛暟鍊� 				if (paramValue) {
-					const attrs = paramValue.attrs || [];
-					(this.head_styledef?.form?.items || []).forEach(async (ele, index) => {
-						if (ele.name != "Layout") {
-							attrs.forEach(async (ele2, index2) => {
-								if (ele.fieldId == ele2.name) {
-									ele.value = ele2.value;
-								}
-							});
-						} else {
-							ele.setting.colList.forEach(async (col) => {
-								if (col) {
-									attrs.forEach(async (ele2,
-										index2) => {
-										if (col.fieldId == ele2.name) {
-											col.value = ele2.value;
-										}
-									});
-								}
-							});
-						}
-					})
+					this.setFormValues(paramValue)
 				}
 
 				//鍔犺浇鍒濆鐣岄潰
@@ -573,8 +557,8 @@
 				// 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;
 
@@ -844,6 +828,8 @@
 							} else {
 								var tip = result.info ? typeof result.info == 'string' ? result.info :
 									result.info.join('<br/>') : '';
+								tip = tip || result.err_info
+
 								if (tip) uni.showModal({
 									title: this.translateSys("tip"),
 									content: tip,
@@ -1073,8 +1059,8 @@
 			},
 			setFormValues(attrs) {
 				const head_styledef = this.head_styledef
-				if (JSON.stringify(attrs) == '{}') {
-					return;
+				if (!Array.isArray(attrs)) {
+					return
 				}
 				console.log(attrs)
 				attrs.forEach(async (attr, key) => {
@@ -2515,6 +2501,7 @@
 					} else {
 						var tip = result.info ? typeof result.info == 'string' ? result.info : result.info
 							.join('<br/>') : '';
+						tip = tip || result.err_info
 						if (tip) uni.showModal({
 							title: this.translateSys("tip"),
 							content: tip,
@@ -2716,7 +2703,6 @@
 						this.okLoading = false
 					else if (type == "2")
 						this.ok2Loading = false
-
 					let tip = typeof ex.errMsg == "string" ? ex.errMsg : ex
 					uni.showModal({
 						title: this.translateSys("error") + "8.1",

--
Gitblit v1.9.1