From e540e5b44f56ce8e8edc377dfa4c5b343b1a9eef Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期四, 14 八月 2025 16:12:15 +0800
Subject: [PATCH] paramvalue

---
 pages/modal/3202.vue |   44 ++++++++++++++++++++++++++++++++------------
 1 files changed, 32 insertions(+), 12 deletions(-)

diff --git a/pages/modal/3202.vue b/pages/modal/3202.vue
index 5ac47af..9a13d72 100644
--- a/pages/modal/3202.vue
+++ b/pages/modal/3202.vue
@@ -18,7 +18,7 @@
 									<button size="mini" v-for="(btn,btnIndex) in rowButtons" :key="btnIndex"
 										type="primary" @click="onRowBtnClick(btn, ii)">
 										<text v-if="btn.Style == 'img' || btn.Style == 'img_text'" class="img"></text>
-										{{btn.ShowName}}
+										{{btn.ShowName || ""}}
 									</button>
 								</div>
 							</div>
@@ -111,6 +111,7 @@
 			}); //璁剧疆椤堕儴鏍囬 
 			this.title = options.titlename;
 			this.param = JSON.parse(options.param);
+			const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined
 			this.styledef = {};
 			this.head_styledef = {
 				form: {
@@ -126,7 +127,7 @@
 			if (this.param?.ClickItem_Event?.id)
 				this.click_item_view = true
 			await this.Detail1_UIstyleGetInfo(this.param.ClsID, this.param.ListItem_Panel.id);
-			this.initial()
+			this.initial(paramValue)
 
 		},
 		methods: {
@@ -153,7 +154,7 @@
 				});
 			},
 			//鍒濆鍖�-			async initial() {
+			async initial(paramValue) {
 				this.refreshing = true
 				await this.Head_UIStyleGetInfo(this.param.ClsID, this.param.Input_Panel.id);
 				this.wheres = '';
@@ -162,6 +163,10 @@
 				this.query_id = "";
 				this.detail1StyleDefList = [];
 				this.refreshing = false
+				if (paramValue) {
+
+					this.setFormValues(paramValue)
+				}
 
 			},
 
@@ -821,6 +826,7 @@
 						defCode == "3037" ||
 						defCode == "3200" ||
 						defCode == "3201" ||
+						defCode == "3202" ||
 						defCode == "5600" ||
 						defCode == "5601" ||
 						defCode == "5602"
@@ -857,19 +863,33 @@
 								});
 								return;
 							}
+							const attrValues = []
 
+							style.form.items.forEach(item => {
+								if (item.name == "Layout") { //鍒ゆ柇鏄惁鏄爡鏍忔牸寮�+									item.setting.colList.forEach(col => {
+										if (col != null) {
+											attrValues.push({
+												attr: col.fieldId,
+												value: col.value || ""
+											})
+										}
+
+									});
+								} else
+									attrValues.push({
+										attr: item.fieldId,
+										value: item.value || ""
+									})
+							});
 							uni.navigateTo({
 								url: '../modal/' + name + '?param=' +
 									param + "&titlename=" +
 									appName +
 									"&type=relatedFunction&paramValue=" +
-									JSON.stringify(style
-										.form),
+									JSON.stringify(attrValues),
 								events: {
-									relatedFunction: function(data) {
-										console.log(data);
-										$this.Refresh();
-									},
+
 								}
 							});
 						} else {
@@ -1162,8 +1182,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) => {
@@ -1807,7 +1827,7 @@
 			// justify-content: right;
 
 			button {
-				 line-height:1.6;
+				line-height: 1.6;
 				// border: none;
 				// margin-right: 10rpx;
 				// text-align: center;

--
Gitblit v1.9.1