From 7662665a4f88da0f8afa804bd4a34dfbefc1fb56 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 29 八月 2025 15:17:59 +0800
Subject: [PATCH] get_pre_page_subtable_next_row

---
 pages/modal/3018_2.vue |  679 +++++++++++++++++++-------------------------------------
 1 files changed, 234 insertions(+), 445 deletions(-)

diff --git a/pages/modal/3018_2.vue b/pages/modal/3018_2.vue
index db401f7..7fbcdcf 100644
--- a/pages/modal/3018_2.vue
+++ b/pages/modal/3018_2.vue
@@ -56,6 +56,10 @@
 		Base64
 	} from '@/js/Base64.js';
 	import utils from "@/js/utils.js"
+	import {
+		showInfo,
+		showError
+	} from "@/js/Page.js"
 	import dayjs from "dayjs";
 	import OIForm from '@/components/oi-form/index.vue'
 	import {
@@ -180,12 +184,20 @@
 			this.title = this.param.Add_BtnName ? this.param.Add_BtnName : options
 				.titlename; //璁剧疆鎸夐挳鏂囧瓧
 			this.btnName = this.param.Add_BtnName || ""
-			this.loadData(options.paramValue)
+			const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined
+			this.loadData(paramValue)
 		},
 		computed: {
 			dropdownBtns() {
 				const btns = this.head_styledef.button || [];
 				return btns
+			},
+			initialEvent() {
+				let event = (this.head_styledef.event || []).find((e) => e.event_id == "initial");
+				return {
+					id: event?.scrip_id || "",
+					name: event?.scrip_name || "",
+				};
 			},
 		},
 
@@ -218,30 +230,44 @@
 				await this.Head_UIStyleGetInfo(this.param.DataCls?.id, this.param.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)
+					// 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;
+					// 						}
+					// 					});
+					// 				}
+					// 			});
+					// 		}
+					// 	})
+
 				}
+				await this.loadInitialEvent();
+
+			},
+			async loadInitialEvent() {
+				try {
+					if (this.initialEvent.id) {
+						this.onChange(this.initialEvent)
+					}
+				} catch (ex) {
+					showError(ex, this.translateSys("error"))
 
 
+				}
 			},
 			async Head_UIStyleGetInfo(class_id, style_id) { //鑾峰彇鑷畾涔夎〃鍗曟牱寮� 				var $this = this;
@@ -373,17 +399,7 @@
 					}
 				} catch (ex) {
 					// console.log(ex);
-					console.log(JSON.stringify(ex), ex);
-					let exStr = JSON.stringify(ex)
-					if (exStr == "{}")
-						exStr = ex
-					let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr
-					uni.showModal({
-						title: this.translateSys("error") + "1.1",
-						content: tip,
-						showCancel: false,
-						confirmText: this.translateSys('close')
-					});
+					showError(ex, this.translateSys("error") + " 1.1")
 				}
 			},
 			async DictGetInfo(dict, formModel, formItem) { //Mobox3寰楀埌寰楀埌瀛楀吀淇℃伅瀛楀吀椤瑰垪琛�@@ -412,18 +428,7 @@
 					}
 					formItem.dict = list;
 				} catch (ex) {
-					// console.log(ex);
-					let exStr = JSON.stringify(ex)
-					if (exStr == "{}")
-						exStr = ex
-					let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr
-
-					uni.showModal({
-						title: this.translateSys("error") + "1.3",
-						content: tip,
-						showCancel: false,
-						confirmText: this.translateSys('close')
-					});
+					showError(ex, this.translateSys("error") + " 1.3")
 
 
 				}
@@ -441,51 +446,38 @@
 					};
 					console.log(dataInfo);
 					var data = await runCustomEvent(dataInfo)
-					if (data.ret != 0) {
-						var tip = data.err_info ? typeof data.err_info == 'string' ? data
-							.err_info : data
-							.err_info.join('<br/>') : '';
+					if (data.ret != 0 && data.ret != 1) {
+						let cls_name = data.event_info?.cls_name
+						let event_name = data.event_info?.event_name
+						tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data.err_info.join(
+							'\n') : ''
 						if (data.ret == 801) {
 							if (this.param.Only_Script_Error) {
 								let pos = tip.indexOf("锛�);
 								if (pos > -1) tip = tip.substring(pos + 1);
 							}
-							uni.showModal({
-								title: this.translateSys("tip"),
-								content: tip,
-								showCancel: false,
-								confirmText: this.translateSys('close')
-							});
-						} else uni.showModal({
-							title: this.translateSys("tip"),
-							content: tip + ',' + this.translateSys('tip') + ':' + data
-								.ret,
-							showCancel: false,
-							confirmText: this.translateSys('close')
-						});
+						}
+						if (cls_name && event_name) tip = `鎵ц鈥�{cls_name}鈥濇暟鎹被鐨勨�${event_name}鈥濊剼鏈椂杩斿洖閿欒锛�{tip}`
+						if (data.ret == 801) showInfo(tip)
+						else showError(`${tip}锛屾彁绀猴細${data.ret}`, this.translateSys('tip'))
+						this.saving = false
 						return false
 					} else {
 						var tip = data.info ? typeof data.info == 'string' ? data.info :
-							data.info.join('<br/>') : '';
+							data.info.join('\n') : '';
 						tip = tip || data.err_info
-						if (tip) uni.showModal({
-							title: this.translateSys("tip"),
-							content: tip,
-							showCancel: false,
-							confirmText: this.translateSys('close')
-						});
+						let time = data.info_time || 0
+						if (time)
+							showError(tip, this.translateSys('tip'))
+						else
+							showInfo(tip)
 						if ([0, 2, 3, 4, -1].includes(data.result_type)) {
 
 							if (data.result_type == 2) {
 
 							} else if (typeof data.result == 'string') {
 								if (data.result) {
-									uni.showModal({
-										title: this.translateSys('tip'),
-										content: data.result,
-										showCancel: false,
-										confirmText: this.translateSys('close')
-									});
+									showInfo(data.result)
 								}
 							}
 							try {
@@ -519,22 +511,18 @@
 											})
 										});
 									} else {
-										uni.showModal({
-											title: this.translateSys("tip"),
-											content: this.translate(
-													'execute_init_event_failed') +
-												this.translateSys("full_stop") +
-												this.translate('reason') + this
-												.translateSys(
-													"colon") +
-												this.translateSys("quotation_mark_left") +
-												action
-												.action_type + this.translateSys(
-													"quotation_mark_right") + this
-												.translate('tip_action_unprocessed'),
-											showCancel: false,
-											confirmText: this.translateSys('close')
-										});
+										showInfo(this.translate(
+												'execute_init_event_failed') +
+											this.translateSys("full_stop") +
+											this.translate('reason') + this
+											.translateSys(
+												"colon") +
+											this.translateSys("quotation_mark_left") +
+											action
+											.action_type + this.translateSys(
+												"quotation_mark_right") + this
+											.translate('tip_action_unprocessed'))
+
 									}
 								}
 
@@ -542,31 +530,14 @@
 								let actionList = (data.action || []).map(a => a.action_type).join(';')
 								let tip = typeof ex == 'string' ? ex : ex.message
 								tip = `鎵ц鑴氭湰杩斿洖鐨�{actionList}鏃跺嚭鐜板紓甯革紝璇锋鏌ヨ剼鏈繑鍥炵殑鏁版嵁鏍煎紡鏄惁姝g‘銆�{tip}`
-								uni.showModal({
-									title: this.translateSys('tip'),
-									content: tip,
-									showCancel: false,
-									confirmText: this.translateSys('close')
-								});
-								console.log(ex)
+								showError(tip, this.translateSys('tip'))
 								return
 							}
 						}
 					}
 				} catch (ex) {
-					// console.log(ex);
-					let exStr = JSON.stringify(ex)
-					if (exStr == "{}")
-						exStr = ex
-					let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr
-					uni.showModal({
-						title: this.translateSys("error") + "3",
-						content: this.translate('execute_init_event_failed') +
-							this.translateSys("full_stop") +
-							this.translate('reason') + this.translateSys("colon") + tip,
-						showCancel: false,
-						confirmText: this.translateSys('close')
-					});
+					showError(ex, this.translateSys("error") + " 3")
+
 				}
 			},
 
@@ -734,21 +705,13 @@
 				var onSuffixClickEvent = item.bind.onSuffixClickEvent; //鍚庡浘鏍囩偣鍑诲洖璋� 
 				if (!onSuffixClickCallbackEvent.id) {
-					uni.showModal({
-						title: this.translateSys("tip"),
-						content: this.translate('icon_click_callback_empty'),
-						showCancel: false,
-						confirmText: this.translateSys('close')
-					});
+					showInfo(this.translate('icon_click_callback_empty'))
+
 					return;
 				}
 				if (!onSuffixClickEvent.id) {
-					uni.showModal({
-						title: this.translateSys("tip"),
-						content: this.translate('icon_click_event_empty'),
-						showCancel: false,
-						confirmText: this.translateSys('close')
-					});
+					showInfo(this.translate('icon_click_event_empty'))
+
 					return;
 				}
 				this.popupType = 'right'
@@ -797,21 +760,13 @@
 					}
 				}
 				if (!$this.popupParam) {
-					uni.showModal({
-						title: this.translateSys("tip"),
-						content: "popupParam涓虹┖锛�,
-						showCancel: false,
-						confirmText: this.translateSys('close')
-					});
+					showInfo("popupParam涓虹┖锛�)
+
 					return;
 				}
 				if (data.length == 0) {
-					uni.showModal({
-						title: this.translateSys("tip"),
-						content: this.translate("tip_no_select_data"),
-						showCancel: false,
-						confirmText: this.translateSys('close')
-					});
+					showInfo(this.translate("tip_no_select_data"))
+
 					return;
 				}
 				var callback_eventid = $this.popupParam.button_callback.trim();
@@ -900,55 +855,37 @@
 				console.log(dataInfo);
 				// return;
 				runCustomEvent(dataInfo).then(data => {
-					if (data.ret != 0) {
-						var tip = data.err_info ? typeof data.err_info == 'string' ? data
-							.err_info :
-							data
-							.err_info.join('<br/>') : '';
+					if (data.ret != 0 && data.ret != 1) {
+						let cls_name = data.event_info?.cls_name
+						let event_name = data.event_info?.event_name
+						tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data.err_info
+							.join('\n') : ''
 						if (data.ret == 801) {
 							if (this.param.Only_Script_Error) {
 								let pos = tip.indexOf("锛�);
 								if (pos > -1) tip = tip.substring(pos + 1);
 							}
-							uni.showModal({
-								title: this.translateSys("tip"),
-								content: tip,
-								showCancel: false,
-								confirmText: this.translateSys('close')
-							});
-						} else uni.showModal({
-							title: this.translateSys("tip"),
-							content: tip + ',' + this.translateSys('tip') + ':' +
-								data
-								.ret,
-							showCancel: false,
-							confirmText: this.translateSys('close')
-						});
+						}
+						if (cls_name && event_name) tip = `鎵ц鈥�{cls_name}鈥濇暟鎹被鐨勨�${event_name}鈥濊剼鏈椂杩斿洖閿欒锛�{tip}`
+						if (data.ret == 801) showInfo(tip)
+						else showError(`${tip}锛屾彁绀猴細${data.ret}`, this.translateSys('tip'))
+						this.saving = false
 						return false
 					} else {
 						var tip = data.info ? typeof data.info == 'string' ? data.info :
-							data
-							.info
-							.join(
-								'<br/>') : '';
+							data.info.join('\n') : '';
 						tip = tip || data.err_info
-						if (tip) uni.showModal({
-							title: this.translateSys("tip"),
-							content: tip,
-							showCancel: false,
-							confirmText: this.translateSys('close')
-						});
+						let time = data.info_time || 0
+						if (time)
+							showError(tip, this.translateSys('tip'))
+						else
+							showInfo(tip)
 						if ([0, 2, 3, 4, -1].includes(data.result_type)) {
 							if (data.result_type == 2) {
 								$this.setFormValues(data.result || [])
 							} else if (typeof data.result == 'string') {
 								if (data.result) {
-									uni.showModal({
-										title: this.translateSys('tip'),
-										content: data.result,
-										showCancel: false,
-										confirmText: this.translateSys('close')
-									});
+									showInfo(data.result)
 								}
 							}
 							try {
@@ -982,18 +919,14 @@
 											})
 										});
 									} else {
-										uni.showModal({
-											title: this.translateSys("tip"),
-											content: this.translateSys(
-													"quotation_mark_left") +
-												action
-												.action_type + this.translateSys(
-													"quotation_mark_right") + this
-												.translate(
-													"tip_action_unprocessed"),
-											showCancel: false,
-											confirmText: this.translateSys('close')
-										});
+										showInfo(this.translateSys(
+												"quotation_mark_left") +
+											action
+											.action_type + this.translateSys(
+												"quotation_mark_right") + this
+											.translate(
+												"tip_action_unprocessed"))
+
 									}
 								}
 
@@ -1001,13 +934,7 @@
 								let actionList = (data.action || []).map(a => a.action_type).join(';')
 								let tip = typeof ex == 'string' ? ex : ex.message
 								tip = `鎵ц鑴氭湰杩斿洖鐨�{actionList}鏃跺嚭鐜板紓甯革紝璇锋鏌ヨ剼鏈繑鍥炵殑鏁版嵁鏍煎紡鏄惁姝g‘銆�{tip}`
-								uni.showModal({
-									title: this.translateSys('tip'),
-									content: tip,
-									showCancel: false,
-									confirmText: this.translateSys('close')
-								});
-								console.log(ex)
+								showError(tip, this.translateSys('tip'))
 								return
 							}
 
@@ -1016,16 +943,8 @@
 
 				}).catch(ex => {
 					// console.log(ex);
-					let exStr = JSON.stringify(ex)
-					if (exStr == "{}")
-						exStr = ex
-					let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr
-					uni.showModal({
-						title: this.translateSys("error") + "3.1",
-						content: exStr,
-						showCancel: false,
-						confirmText: this.translateSys('close')
-					});
+					showError(ex, this.translateSys("error") + " 3.1")
+
 				});
 			},
 			dataObjRunCustomEvent_Return(eventid, data_attr, button_callback, item) {
@@ -1091,55 +1010,38 @@
 				console.log(dataInfo);
 				// return;
 				runCustomEvent(dataInfo).then(data => {
-					if (data.ret != 0) {
-						var tip = data.err_info ? typeof data.err_info == 'string' ? data
-							.err_info :
-							data
-							.err_info.join('<br/>') : '';
+					if (data.ret != 0 && data.ret != 1) {
+						let cls_name = data.event_info?.cls_name
+						let event_name = data.event_info?.event_name
+						tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data.err_info
+							.join('\n') : ''
 						if (data.ret == 801) {
-							if ($this.param.Only_Script_Error) {
+							if (this.param.Only_Script_Error) {
 								let pos = tip.indexOf("锛�);
 								if (pos > -1) tip = tip.substring(pos + 1);
 							}
-							uni.showModal({
-								title: $this.translateSys("tip"),
-								content: tip,
-								showCancel: false,
-								confirmText: $this.translateSys('close')
-							});
-						} else uni.showModal({
-							title: $this.translateSys("tip"),
-							content: tip + ',' + $this.translateSys('tip') + ':' +
-								data
-								.ret,
-							showCancel: false,
-							confirmText: $this.translateSys('close')
-						});
+						}
+						if (cls_name && event_name) tip = `鎵ц鈥�{cls_name}鈥濇暟鎹被鐨勨�${event_name}鈥濊剼鏈椂杩斿洖閿欒锛�{tip}`
+						if (data.ret == 801) showInfo(tip)
+						else showError(`${tip}锛屾彁绀猴細${data.ret}`, this.translateSys('tip'))
+						this.saving = false
 						return false
 					} else {
 						var tip = data.info ? typeof data.info == 'string' ? data.info :
-							data
-							.info
-							.join(
-								'<br/>') : '';
+							data.info.join('\n') : '';
 						tip = tip || data.err_info
-						if (tip) uni.showModal({
-							title: $this.translateSys("tip"),
-							content: tip,
-							showCancel: false,
-							confirmText: $this.translateSys('close')
-						});
+						let time = data.info_time || 0
+						if (time)
+							showError(tip, this.translateSys('tip'))
+						else
+							showInfo(tip)
 						if ([0, 2, 3, 4, -1].includes(data.result_type)) {
 							if (data.result_type == 2) {
 
 							} else if (typeof data.result == 'string') {
 								if (data.result) {
-									uni.showModal({
-										title: this.translateSys('tip'),
-										content: data.result,
-										showCancel: false,
-										confirmText: this.translateSys('close')
-									});
+									showInfo(data.result)
+
 								}
 							}
 							try {
@@ -1317,19 +1219,14 @@
 											}
 										});
 									} else {
-										uni.showModal({
-											title: $this.translateSys("tip"),
-											content: $this.translateSys(
-													"quotation_mark_left") +
-												action.action_type + $this
-												.translateSys(
-													"quotation_mark_right") + $this
-												.translate(
-													"tip_action_unprocessed"),
-											showCancel: false,
-											confirmText: $this.translateSys(
-												'close')
-										});
+										showInfo($this.translateSys(
+												"quotation_mark_left") +
+											action.action_type + $this
+											.translateSys(
+												"quotation_mark_right") + $this
+											.translate(
+												"tip_action_unprocessed"))
+
 									}
 								}
 
@@ -1337,13 +1234,7 @@
 								let actionList = (data.action || []).map(a => a.action_type).join(';')
 								let tip = typeof ex == 'string' ? ex : ex.message
 								tip = `鎵ц鑴氭湰杩斿洖鐨�{actionList}鏃跺嚭鐜板紓甯革紝璇锋鏌ヨ剼鏈繑鍥炵殑鏁版嵁鏍煎紡鏄惁姝g‘銆�{tip}`
-								uni.showModal({
-									title: this.translateSys('tip'),
-									content: tip,
-									showCancel: false,
-									confirmText: this.translateSys('close')
-								});
-								console.log(ex)
+								showError(tip, this.translateSys('tip'))
 								return
 							}
 						}
@@ -1351,16 +1242,8 @@
 
 				}).catch(ex => {
 					// console.log(ex);
-					let exStr = JSON.stringify(ex)
-					if (exStr == "{}")
-						exStr = ex
-					let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr
-					uni.showModal({
-						title: $this.translateSys('tip') + "5.1",
-						content: exStr,
-						showCancel: false,
-						confirmText: $this.translateSys('close')
-					});
+					showError(ex, this.translateSys("error") + " 5.1")
+
 				});
 			},
 
@@ -1418,56 +1301,34 @@
 					uni.hideLoading();
 					let data = res.lua_result
 					if (data) {
-						if (data.ret != 0) {
-							var tip = data.err_info ? typeof data.err_info == 'string' ? data
-								.err_info :
-								data
-								.err_info.join('<br/>') : '';
+						if (data.ret != 0 && data.ret != 1) {
+							let cls_name = data.event_info?.cls_name
+							let event_name = data.event_info?.event_name
+							tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data.err_info
+								.join('\n') : ''
 							if (data.ret == 801) {
 								if (this.param.Only_Script_Error) {
 									let pos = tip.indexOf("锛�);
 									if (pos > -1) tip = tip.substring(pos + 1);
 								}
-								if (tip) {
-									uni.showModal({
-										title: this.translateSys("tip"),
-										content: tip,
-										showCancel: false,
-										confirmText: this.translateSys('close')
-									});
-								}
-							} else uni.showModal({
-								title: this.translateSys("tip"),
-								content: tip + ',' + this.translateSys('tip') + ':' +
-									data.ret || "",
-								showCancel: false,
-								confirmText: this.translateSys('close')
-							});
+							}
+							if (cls_name && event_name) tip = `鎵ц鈥�{cls_name}鈥濇暟鎹被鐨勨�${event_name}鈥濊剼鏈椂杩斿洖閿欒锛�{tip}`
+							if (data.ret == 801) showInfo(tip)
+							else showError(`${tip}锛屾彁绀猴細${data.ret}`, this.translateSys('tip'))
 							this.saving = false
 							return false
 						} else {
 							var tip = data.info ? typeof data.info == 'string' ? data.info :
-								data
-								.info
-								.join(
-									'<br/>') : '';
+								data.info.join('\n') : '';
 							tip = tip || data.err_info
-							if (tip) uni.showModal({
-								title: this.translateSys("tip"),
-								content: tip,
-								showCancel: false,
-								confirmText: this.translateSys('close')
-							});
-							else {
-
-								uni.showToast({
-									title: this.translate('create_success'),
-									icon: "success",
-									duration: 3000
-								});
+							if (tip) {
+								let time = data.info_time || 0
+								if (time)
+									showError(tip, this.translateSys('tip'))
+								elseshowInfo(tip)
+							} else {
+								showInfo(this.translate('create_success'));
 							}
-
-
 							if (!this.param.After_Btn_Not_Refresh) {
 								//鍒锋柊
 								uni.redirectTo({
@@ -1482,12 +1343,8 @@
 										$this.setFormValues(data.result || [])
 									} else if (typeof data.result == 'string') {
 										if (data.result) {
-											uni.showModal({
-												title: this.translateSys('tip'),
-												content: data.result,
-												showCancel: false,
-												confirmText: this.translateSys('close')
-											});
+											showInfo(data.result)
+
 										}
 									}
 									try {
@@ -1527,13 +1384,7 @@
 										let actionList = (data.action || []).map(a => a.action_type).join(';')
 										let tip = typeof ex == 'string' ? ex : ex.message
 										tip = `鎵ц鑴氭湰杩斿洖鐨�{actionList}鏃跺嚭鐜板紓甯革紝璇锋鏌ヨ剼鏈繑鍥炵殑鏁版嵁鏍煎紡鏄惁姝g‘銆�{tip}`
-										uni.showModal({
-											title: this.translateSys('tip'),
-											content: tip,
-											showCancel: false,
-											confirmText: this.translateSys('close')
-										});
-										console.log(ex)
+										showError(tip, this.translateSys('tip'))
 										return
 									}
 								}
@@ -1547,21 +1398,17 @@
 					this.saving = false
 
 					uni.hideLoading();
-					let exStr = JSON.stringify(ex)
-					if (exStr == "{}")
-						exStr = ex
-					let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr
-					uni.showModal({
-						title: this.translateSys("tip"),
-						content: tip,
-						showCancel: false,
-						confirmText: this.translateSys('close')
-					});
+					showError(ex, this.translateSys("tip"))
+
+
 				});
 			},
 			setFormValues(data) {
 				const $this = this
 				const head_styledef = this.head_styledef
+				if (!Array.isArray(data)) {
+					return
+				}
 				for (var i = 0; i < data.length; i++) {
 					const attr = data[i]
 					if (attr.choice_list) {
@@ -1714,45 +1561,31 @@
 				// return;
 				runCustomEvent(dataInfo).then(data => {
 
-					if (data.ret != 0) {
-						var tip = data.err_info ? typeof data.err_info == 'string' ? data
-							.err_info :
-							data
-							.err_info.join('<br/>') : '';
+					if (data.ret != 0 && data.ret != 1) {
+						let cls_name = data.event_info?.cls_name
+						let event_name = data.event_info?.event_name
+						tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data.err_info
+							.join('\n') : ''
 						if (data.ret == 801) {
 							if (this.param.Only_Script_Error) {
 								let pos = tip.indexOf("锛�);
 								if (pos > -1) tip = tip.substring(pos + 1);
 							}
-							uni.showModal({
-								title: this.translateSys("tip"),
-								content: tip,
-								showCancel: false,
-								confirmText: this.translateSys('close')
-							});
-						} else uni.showModal({
-							title: this.translateSys("tip"),
-							content: tip + ',' + this.translateSys('tip') + ':' +
-								data
-								.ret,
-							showCancel: false,
-							confirmText: this.translateSys('close')
-						});
+						}
+						if (cls_name && event_name) tip = `鎵ц鈥�{cls_name}鈥濇暟鎹被鐨勨�${event_name}鈥濊剼鏈椂杩斿洖閿欒锛�{tip}`
+						if (data.ret == 801) showInfo(tip)
+						else showError(`${tip}锛屾彁绀猴細${data.ret}`, this.translateSys('tip'))
 						this.saving = false
 						return false
 					} else {
 						var tip = data.info ? typeof data.info == 'string' ? data.info :
-							data
-							.info
-							.join(
-								'<br/>') : '';
+							data.info.join('\n') : '';
 						tip = tip || data.err_info
-						if (tip) uni.showModal({
-							title: this.translateSys("tip"),
-							content: tip,
-							showCancel: false,
-							confirmText: this.translateSys('close')
-						});
+						let time = data.info_time || 0
+						if (time)
+							showError(tip, this.translateSys('tip'))
+						else
+							showInfo(tip)
 						if (!this.param.After_Btn_Not_Refresh) {
 							//鍒锋柊
 							uni.redirectTo({
@@ -1766,14 +1599,10 @@
 								if (data.result_type == 2) {
 
 								} else if (typeof data.result == 'string') {
-									if (data.result) {
-										uni.showModal({
-											title: this.translateSys('tip'),
-											content: data.result,
-											showCancel: false,
-											confirmText: this.translateSys('close')
-										});
-									}
+
+									showInfo(data.result)
+
+
 								}
 								try {
 									var actionlist = data.action || []
@@ -1813,13 +1642,7 @@
 									let actionList = (data.action || []).map(a => a.action_type).join(';')
 									let tip = typeof ex == 'string' ? ex : ex.message
 									tip = `鎵ц鑴氭湰杩斿洖鐨�{actionList}鏃跺嚭鐜板紓甯革紝璇锋鏌ヨ剼鏈繑鍥炵殑鏁版嵁鏍煎紡鏄惁姝g‘銆�{tip}`
-									uni.showModal({
-										title: this.translateSys('tip'),
-										content: tip,
-										showCancel: false,
-										confirmText: this.translateSys('close')
-									});
-									console.log(ex)
+									showError(tip, this.translateSys('tip'))
 									return
 								}
 							}
@@ -1829,18 +1652,8 @@
 
 					this.saving = false
 				}).catch(ex => {
-					// console.log(ex);
-					this.saving = false
-					let exStr = JSON.stringify(ex)
-					if (exStr == "{}")
-						exStr = ex
-					let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr
-					uni.showModal({
-						title: this.translateSys('tip') + "7.1",
-						content: tip,
-						showCancel: false,
-						confirmText: this.translateSys('close')
-					});
+					showError(ex, this.translateSys("tip") + " 7.1")
+
 				});
 			},
 			//鐐瑰嚮鎸夐挳鍒楄〃
@@ -1873,12 +1686,8 @@
 					if (btn.Edit_dlg.Model == "small") {
 						this.showAddSmallDialog(btn, enviroment);
 					} else {
-						uni.showModal({
-							title: this.translateSys("tip"),
-							content: this.translateSys("unrealized"),
-							showCancel: false,
-							confirmText: this.translateSys('close')
-						});
+						showInfo(this.translateSys("unrealized"))
+
 					}
 				} else if (btn.FunCode == "TriggerEvent") {
 					this.onTriggerEvent(btn, enviroment);
@@ -1918,44 +1727,32 @@
 				console.log(dataInfo);
 				// return;
 				runCustomEvent(dataInfo).then(data => {
-					if (data.ret != 0) {
-						var tip = data.err_info ? typeof data.err_info == 'string' ? data
-							.err_info :
-							data
-							.err_info.join('<br/>') : '';
+
+					if (data.ret != 0 && data.ret != 1) {
+						let cls_name = data.event_info?.cls_name
+						let event_name = data.event_info?.event_name
+						tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data.err_info
+							.join('\n') : ''
 						if (data.ret == 801) {
 							if (this.param.Only_Script_Error) {
 								let pos = tip.indexOf("锛�);
 								if (pos > -1) tip = tip.substring(pos + 1);
 							}
-							uni.showModal({
-								title: this.translateSys("tip"),
-								content: tip,
-								showCancel: false,
-								confirmText: this.translateSys('close')
-							});
-						} else uni.showModal({
-							title: this.translateSys("tip"),
-							content: tip + ',' + this.translateSys('tip') + ':' +
-								data
-								.ret,
-							showCancel: false,
-							confirmText: this.translateSys('close')
-						});
+						}
+						if (cls_name && event_name) tip = `鎵ц鈥�{cls_name}鈥濇暟鎹被鐨勨�${event_name}鈥濊剼鏈椂杩斿洖閿欒锛�{tip}`
+						if (data.ret == 801) showInfo(tip)
+						else showError(`${tip}锛屾彁绀猴細${data.ret}`, this.translateSys('tip'))
+						this.saving = false
 						return false
 					} else {
 						var tip = data.info ? typeof data.info == 'string' ? data.info :
-							data
-							.info
-							.join(
-								'<br/>') : '';
+							data.info.join('\n') : '';
 						tip = tip || data.err_info
-						if (tip) uni.showModal({
-							title: this.translateSys("tip"),
-							content: tip,
-							showCancel: false,
-							confirmText: this.translateSys('close')
-						});
+						let time = data.info_time || 0
+						if (time)
+							showError(tip, this.translateSys('tip'))
+						else
+							showInfo(tip)
 						if (!this.param.After_Btn_Not_Refresh) {
 							//鍒锋柊
 							uni.redirectTo({
@@ -1969,14 +1766,8 @@
 								if (data.result_type == 2) {
 
 								} else if (typeof data.result == 'string') {
-									if (data.result) {
-										uni.showModal({
-											title: this.translateSys('tip'),
-											content: data.result,
-											showCancel: false,
-											confirmText: this.translateSys('close')
-										});
-									}
+									showInfo(data.result)
+
 								}
 								try {
 									var actionlist = data.action || []
@@ -2008,8 +1799,21 @@
 														.value
 												})
 											});
+										} else if (action.action_type == 'get_pre_page_subtable_next_row') {
+											var value = action.value;
+											const eventChannel = this.getOpenerEventChannel();
+											eventChannel.emit('get_pre_page_subtable_next_row', value);
+										} else if (action.action_type == 'remove_pre_page_subtable_row') {
+											var value = action.value;
+											const eventChannel = this.getOpenerEventChannel();
+											eventChannel.emit('remove_pre_page_subtable_row', value);
 										}
-
+										else if (action.action_type == "goback_to_pre_page") {
+											//杩斿洖涓婁竴椤�+											uni.navigateBack({
+												delta: 1, //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
+											});
+										}
 									}
 
 
@@ -2017,13 +1821,7 @@
 									let actionList = (data.action || []).map(a => a.action_type).join(';')
 									let tip = typeof ex == 'string' ? ex : ex.message
 									tip = `鎵ц鑴氭湰杩斿洖鐨�{actionList}鏃跺嚭鐜板紓甯革紝璇锋鏌ヨ剼鏈繑鍥炵殑鏁版嵁鏍煎紡鏄惁姝g‘銆�{tip}`
-									uni.showModal({
-										title: this.translateSys('tip'),
-										content: tip,
-										showCancel: false,
-										confirmText: this.translateSys('close')
-									});
-									console.log(ex)
+									showError(tip, this.translateSys('tip'))
 									return
 								}
 							}
@@ -2031,17 +1829,8 @@
 					}
 
 				}).catch(ex => {
-					// console.log(ex);
-					let exStr = JSON.stringify(ex)
-					if (exStr == "{}")
-						exStr = ex
-					let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr
-					uni.showModal({
-						title: this.translateSys('tip') + "7.1",
-						content: tip,
-						showCancel: false,
-						confirmText: this.translateSys("close")
-					});
+					showError(ex, this.translateSys("tip") + " 7.1")
+
 				});
 
 			},

--
Gitblit v1.9.1