From 3ddb7987b031a152309c58dabd949e23d3419a72 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 01 八月 2025 15:33:50 +0800
Subject: [PATCH] test

---
 pages/modal/3037.vue | 1964 ++++++++++++++++++++++++++++++----------------------------
 1 files changed, 1,022 insertions(+), 942 deletions(-)

diff --git a/pages/modal/3037.vue b/pages/modal/3037.vue
index 74b983c..ebdda44 100644
--- a/pages/modal/3037.vue
+++ b/pages/modal/3037.vue
@@ -2620,6 +2620,7 @@
 							.info : data.info
 							.join('<br/>') :
 							'';
+						tip = tip || data.err_info
 						if (tip) uni
 							.showModal({
 								title: this.translateSys('tip'),
@@ -2627,152 +2628,154 @@
 								showCancel: false,
 								confirmText: this.translateSys('close')
 							});
-						if (data.result_type == 2) {
+						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')
-								});
+							} else if (typeof data.result == 'string') {
+								if (data.result) {
+									uni.showModal({
+										title: this.translateSys('tip'),
+										content: data.result,
+										showCancel: false,
+										confirmText: this.translateSys('close')
+									});
+								}
 							}
-						}
-						try {
-							var actionlist =
-								data.action || []
-							if (actionlist) {
-								for (var j =
-										0; j <
-									actionlist
-									.length; j++
-								) {
-									var action =
-										actionlist[
-											j]
-									var action_type =
-										action
-										.action_type;
-									var value =
-										action
-										.value;
-									if (action_type ==
-										'set_dlg_attr'
+							try {
+								var actionlist =
+									data.action || []
+								if (actionlist) {
+									for (var j =
+											0; j <
+										actionlist
+										.length; j++
 									) {
-										if (
-											value) {
-											var val =
-												value;
-											if (typeof value ==
-												'string'
-											) {
-												val =
-													JSON
-													.parse(
-														value
+										var action =
+											actionlist[
+												j]
+										var action_type =
+											action
+											.action_type;
+										var value =
+											action
+											.value;
+										if (action_type ==
+											'set_dlg_attr'
+										) {
+											if (
+												value) {
+												var val =
+													value;
+												if (typeof value ==
+													'string'
+												) {
+													val =
+														JSON
+														.parse(
+															value
+														);
+												}
+												console
+													.log(
+														val
 													);
-											}
-											console
-												.log(
-													val
-												);
-											for (
-												var i =
-													0; i <
-												val
-												.length; i++
-											) {
 												for (
-													var a =
-														0; a <
-													this.classAttrList
-													.length; a++
+													var i =
+														0; i <
+													val
+													.length; i++
 												) {
 													for (
-														var l =
-															0; l <
-														this.classAttrList[
-															a
-														]
-														.Attr
-														.length; l++
+														var a =
+															0; a <
+														this.classAttrList
+														.length; a++
 													) {
-														var ca =
+														for (
+															var l =
+																0; l <
 															this.classAttrList[
 																a
 															]
-															.Attr[
-																l
-															];
-														if (val[
-																i]
-															.attr ==
-															ca
-															.Name
+															.Attr
+															.length; l++
 														) {
-															if (utils.classUtils.attrTypeIsDict(ca.Type)) {
-																var
-																	dictItemList = [];
-																for (
-																	var d in
-																		val[
-																			i]
-																		.choice_list
-																) {
-																	var val =
-																		val[
-																			i]
-																		.choice_list[
-																			d
-																		];
-																	dictItemList
-																		.push({
-																			"CN_S_NAME": val,
-																			"CN_S_VALUE": val,
-																			"Name": val,
-																			"label": val,
-																			"value": val
-																		});
+															var ca =
+																this.classAttrList[
+																	a
+																]
+																.Attr[
+																	l
+																];
+															if (val[
+																	i]
+																.attr ==
+																ca
+																.Name
+															) {
+																if (utils.classUtils.attrTypeIsDict(ca.Type)) {
+																	var
+																		dictItemList = [];
+																	for (
+																		var d in
+																			val[
+																				i]
+																			.choice_list
+																	) {
+																		var val =
+																			val[
+																				i]
+																			.choice_list[
+																				d
+																			];
+																		dictItemList
+																			.push({
+																				"CN_S_NAME": val,
+																				"CN_S_VALUE": val,
+																				"Name": val,
+																				"label": val,
+																				"value": val
+																			});
 
+																	}
+																	ca.dictitem =
+																		dictItemList;
+																	// attr[j].dictitem = val[i].choice_list;
+																} else {
+																	// ca.value = val[i].value;
 																}
-																ca.dictitem =
-																	dictItemList;
-																// attr[j].dictitem = val[i].choice_list;
-															} else {
-																// ca.value = val[i].value;
 															}
 														}
 													}
-												}
 
+												}
 											}
 										}
-									}
-									if (action_type ==
-										'open_select_userdlg'
-									) {
-										uni.showModal({
-											title: this.translateSys('error') + " 2.2",
-											content: "open_select_userdlg杩欎釜action_type杩樻湭澶勭悊锛�,
-											showCancel: false,
-											confirmText: this.translateSys('close')
-										});
+										if (action_type ==
+											'open_select_userdlg'
+										) {
+											uni.showModal({
+												title: this.translateSys('error') + " 2.2",
+												content: "open_select_userdlg杩欎釜action_type杩樻湭澶勭悊锛�,
+												showCancel: false,
+												confirmText: this.translateSys('close')
+											});
+										}
 									}
 								}
+							} catch (ex) {
+								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)
+								return
 							}
-						} catch (ex) {
-							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)
-							return
 						}
 					}
 
@@ -2907,35 +2910,200 @@
 								showCancel: false,
 								confirmText: this.translateSys('close')
 							});
-
-						var actionlist = data
-							.action;
-						if (actionlist) {
-							console.log(
-								actionlist);
-							for (var i = 0; i <
-								actionlist
-								.length; i++) {
-								var action =
-									actionlist[
-										i];
-								if (action
-									.action_type ==
-									'set_dlg_attr'
-								) {
-									var result =
-										action
-										.value;
-									for (var i =
-											0; i <
-										result
-										.length; i++
+						if ([0, 2, 3, 4, -1].includes(data.result_type)) {
+							if (data.result_type == 2) {
+								var result = data
+									.result || []
+								for (var i = 0; i <
+									result
+									.length; i++) {
+									for (var c =
+											0; c <
+										$this.classAttrList
+										.length; c++
 									) {
-										if (result[
-												i
-											]
-											.choice_list
+										var attr =
+											$this
+											.classAttrList[
+												c]
+											.Attr;
+										for (var j =
+												0; j <
+											attr
+											.length; j++
 										) {
+											if (attr[
+													j
+												]
+												.Name ==
+												result[
+													i
+												]
+												.attr
+											) {
+												attr[
+														j]
+													.Value =
+													result[
+														i
+													]
+													.value;
+											}
+										}
+									}
+
+									var length = 0;
+									if (!$this
+										.refdatastore
+										.filter(
+											function(
+												s
+											) {
+												return result[
+														i
+													]
+													.attr ==
+													s
+													.attr
+											})
+										.length) {
+										length = 1;
+										$this.refdatastore
+											.push(
+												result[
+													i
+												]
+											);
+									}
+									if (length ==
+										0) {
+										for (var j =
+												0; j <
+											$this
+											.refdatastore
+											.length; j++
+										) {
+											if ($this
+												.refdatastore[
+													j
+												]
+												.attr ==
+												result[
+													i
+												]
+												.attr
+											) {
+												$this
+													.refdatastore[
+														j
+													]
+													.value =
+													result[
+														i
+													]
+													.value;
+											}
+										}
+									}
+								}
+
+							} else if (typeof data.result == 'string') {
+								if (data.result) {
+									uni.showModal({
+										title: this.translateSys('tip'),
+										content: data.result,
+										showCancel: false,
+										confirmText: this.translateSys('close')
+									});
+								}
+							}
+							try {
+								var actionlist = data.action || []
+								for (var i = 0; i <
+									actionlist
+									.length; i++) {
+									var action =
+										actionlist[
+											i];
+									if (action
+										.action_type ==
+										'set_dlg_attr'
+									) {
+										var result =
+											action
+											.value;
+										for (var i =
+												0; i <
+											result
+											.length; i++
+										) {
+											if (result[
+													i
+												]
+												.choice_list
+											) {
+												for (
+													var c =
+														0; c <
+													$this.classAttrList
+													.length; c++
+												) {
+													var attr =
+														$this.classAttrList[
+															c
+														]
+														.Attr;
+													for (
+														var j =
+															0; j <
+														attr
+														.length; j++
+													) {
+														if (attr[
+																j
+															]
+															.Name ==
+															result[
+																i
+															]
+															.attr
+														) {
+															if (utils.classUtils.attrTypeIsDict(attr[j].Type)) {
+																var
+																	dictItemList = [];
+																for (
+																	var d in
+																		result[
+																			i
+																		]
+																		.choice_list
+																) {
+																	var val =
+																		result[
+																			i
+																		]
+																		.choice_list[
+																			d
+																		];
+																	dictItemList
+																		.push({
+																			"CN_S_NAME": val,
+																			"CN_S_VALUE": val,
+																			"Name": val,
+																			"label": val,
+																			"value": val
+																		});
+																}
+																attr[
+																		j]
+																	.dictitem =
+																	dictItemList;
+																// attr[j].dictitem = result[i].choice_list;
+															}
+														}
+													}
+												}
+											}
 											for (
 												var c =
 													0; c <
@@ -2953,6 +3121,18 @@
 													attr
 													.length; j++
 												) {
+													console
+														.log(
+															attr[
+																j
+															]
+															.Name +
+															'==' +
+															result[
+																i
+															]
+															.attr
+														);
 													if (attr[
 															j
 														]
@@ -2962,261 +3142,105 @@
 														]
 														.attr
 													) {
-														if (utils.classUtils.attrTypeIsDict(attr[j].Type)) {
-															var
-																dictItemList = [];
-															for (
-																var d in
-																	result[
-																		i
-																	]
-																	.choice_list
-															) {
-																var val =
-																	result[
-																		i
-																	]
-																	.choice_list[
-																		d
-																	];
-																dictItemList
-																	.push({
-																		"CN_S_NAME": val,
-																		"CN_S_VALUE": val,
-																		"Name": val,
-																		"label": val,
-																		"value": val
-																	});
-															}
-															attr[
-																	j]
-																.dictitem =
-																dictItemList;
-															// attr[j].dictitem = result[i].choice_list;
-														}
+														attr[
+																j]
+															.Value =
+															result[
+																i
+															]
+															.value;
+													}
+												}
+											}
+											0;
+											if (!
+												$this.refdatastore
+												.filter(
+													function(
+														s
+													) {
+														return result[
+																i
+															]
+															.attr ==
+															s
+															.attr
+													}
+												)
+												.length
+											) {
+												length
+													=
+													1;
+												$this
+													.refdatastore
+													.push(
+														result[
+															i
+														]
+													);
+											}
+											if (length ==
+												0
+											) {
+												for (
+													var j =
+														0; j <
+													$this
+													.refdatastore
+													.length; j++
+												) {
+													if ($this
+														.refdatastore[
+															j
+														]
+														.attr ==
+														result[
+															i
+														]
+														.attr
+													) {
+														$this
+															.refdatastore[
+																j
+															]
+															.value =
+															result[
+																i
+															]
+															.value;
 													}
 												}
 											}
 										}
-										for (
-											var c =
-												0; c <
-											$this.classAttrList
-											.length; c++
-										) {
-											var attr =
-												$this.classAttrList[
-													c
-												]
-												.Attr;
-											for (
-												var j =
-													0; j <
-												attr
-												.length; j++
-											) {
-												console
-													.log(
-														attr[
-															j
-														]
-														.Name +
-														'==' +
-														result[
-															i
-														]
-														.attr
-													);
-												if (attr[
-														j
-													]
-													.Name ==
-													result[
-														i
-													]
-													.attr
-												) {
-													attr[
-															j]
-														.Value =
-														result[
-															i
-														]
-														.value;
-												}
-											}
-										}
-										0;
-										if (!
-											$this.refdatastore
-											.filter(
-												function(
-													s
-												) {
-													return result[
-															i
-														]
-														.attr ==
-														s
-														.attr
-												}
-											)
-											.length
-										) {
-											length
-												=
-												1;
-											$this
-												.refdatastore
-												.push(
-													result[
-														i
-													]
-												);
-										}
-										if (length ==
-											0
-										) {
-											for (
-												var j =
-													0; j <
-												$this
-												.refdatastore
-												.length; j++
-											) {
-												if ($this
-													.refdatastore[
-														j
-													]
-													.attr ==
-													result[
-														i
-													]
-													.attr
-												) {
-													$this
-														.refdatastore[
-															j
-														]
-														.value =
-														result[
-															i
-														]
-														.value;
-												}
-											}
-										}
-									}
-								} else if (data
-									.action[i]
-									.action_type ==
-									'set_global_attr'
-								) {
-									$this.global_attr =
-										data
-										.action[
-											i]
-										.value || [];
-								}
-							}
-						}
-
-						if (data.result) {
-							var result = data
-								.result;
-							for (var i = 0; i <
-								result
-								.length; i++) {
-								for (var c =
-										0; c <
-									$this.classAttrList
-									.length; c++
-								) {
-									var attr =
-										$this
-										.classAttrList[
-											c]
-										.Attr;
-									for (var j =
-											0; j <
-										attr
-										.length; j++
+									} else if (data
+										.action[i]
+										.action_type ==
+										'set_global_attr'
 									) {
-										if (attr[
-												j
-											]
-											.Name ==
-											result[
-												i
-											]
-											.attr
-										) {
-											attr[
-													j]
-												.Value =
-												result[
-													i
-												]
-												.value;
-										}
+										$this.global_attr =
+											data
+											.action[
+												i]
+											.value || [];
 									}
 								}
 
-								var length = 0;
-								if (!$this
-									.refdatastore
-									.filter(
-										function(
-											s
-										) {
-											return result[
-													i
-												]
-												.attr ==
-												s
-												.attr
-										})
-									.length) {
-									length = 1;
-									$this.refdatastore
-										.push(
-											result[
-												i
-											]
-										);
-								}
-								if (length ==
-									0) {
-									for (var j =
-											0; j <
-										$this
-										.refdatastore
-										.length; j++
-									) {
-										if ($this
-											.refdatastore[
-												j
-											]
-											.attr ==
-											result[
-												i
-											]
-											.attr
-										) {
-											$this
-												.refdatastore[
-													j
-												]
-												.value =
-												result[
-													i
-												]
-												.value;
-										}
-									}
-								}
+							} catch (ex) {
+								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)
+								return
 							}
 						}
+
 					}
 
 				}).catch(ex => {
@@ -3360,67 +3384,79 @@
 							.info : data.info
 							.join('<br/>') :
 							'';
-						if (tip) uni
-							.showModal({
+						tip = tip || data.err_info
+						if (tip)
+							uni.showModal({
 								title: this.translateSys('tip'),
 								content: tip,
 								showCancel: false,
 								confirmText: this.translateSys('close')
 							});
-						if (data.result) {
-							var result = data
-								.result;
-							for (var i = 0; i <
-								result.length; i++
-							) {
-								// self.class_attr_ele.find('.attr_field[data-field="' + result[i].attr + '"]').val(result[i].value).data('val', result[i].value);
-								var length = 0;
-								if (!this.refdatastore
-									.filter(
-										function(
-											s) {
-											return result[
-													i
-												]
-												.attr ==
-												s
-												.attr
-										}).length
+						if ([0, 2, 3, 4, -1].includes(data.result_type)) {
+							if (data.result_type == 2) {
+								var result = data.result || []
+								for (var i = 0; i <
+									result.length; i++
 								) {
-									length = 1;
-									this.refdatastore.push(
-										result[
-											i]
-									);
-								}
-								if (length == 0) {
-									for (var j =
-											0; j < this
-										.refdatastore
-										.length; j++
+									// self.class_attr_ele.find('.attr_field[data-field="' + result[i].attr + '"]').val(result[i].value).data('val', result[i].value);
+									var length = 0;
+									if (!this.refdatastore
+										.filter(
+											function(
+												s) {
+												return result[
+														i
+													]
+													.attr ==
+													s
+													.attr
+											}).length
 									) {
-										if (this
-											.refdatastore[
-												j]
-											.attr ==
+										length = 1;
+										this.refdatastore.push(
 											result[
 												i]
-											.attr
+										);
+									}
+									if (length == 0) {
+										for (var j =
+												0; j < this
+											.refdatastore
+											.length; j++
 										) {
-											this.refdatastore[
-													j
-												]
-												.value =
+											if (this
+												.refdatastore[
+													j]
+												.attr ==
 												result[
-													i
-												]
-												.value;
+													i]
+												.attr
+											) {
+												this.refdatastore[
+														j
+													]
+													.value =
+													result[
+														i
+													]
+													.value;
+											}
 										}
 									}
 								}
-							}
 
-							this.add();
+								this.add();
+
+							} else if (typeof data.result == 'string') {
+								if (data.result) {
+									uni.showModal({
+										title: this.translateSys('tip'),
+										content: data.result,
+										showCancel: false,
+										confirmText: this.translateSys('close')
+									});
+								}
+							}
 						}
 					}
 
@@ -3570,6 +3606,7 @@
 							.info : data.info
 							.join('<br/>') :
 							'';
+						tip = tip || data.err_info
 						if (tip) uni
 							.showModal({
 								title: this.translateSys('tip'),
@@ -3577,13 +3614,21 @@
 								showCancel: false,
 								confirmText: this.translateSys('close')
 							});
+						if ([0, 2, 3, 4, -1].includes(data.result_type)) {
+							if (data.result_type == 2) {
 
-						if (data != "") {
-							var actions = data
-								.action;
-							console.log(
-								actions);
-							if (actions) {
+							} else if (typeof data.result == 'string') {
+								if (data.result) {
+									uni.showModal({
+										title: this.translateSys('tip'),
+										content: data.result,
+										showCancel: false,
+										confirmText: this.translateSys('close')
+									});
+								}
+							}
+							try {
+								var actions = data.action || []
 								for (var i =
 										0; i <
 									actions
@@ -3863,15 +3908,20 @@
 											.show();
 									}
 								}
+
+							} catch (ex) {
+								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)
+								return
 							}
-						} else {
-							uni.showModal({
-								title: this.translateSys('tip') + "5.2",
-								content: '璋冪敤 before_click_button 鑴氭湰杩斿洖绌猴紝event_id' +
-									eventid,
-								showCancel: false,
-								confirmText: this.translateSys('close')
-							});
 						}
 					}
 
@@ -3980,6 +4030,7 @@
 								.info : data.info
 								.join('<br/>') :
 								'';
+							tip = tip || data.err_info
 							if (tip) uni
 								.showModal({
 									title: this.translateSys('tip'),
@@ -3987,69 +4038,74 @@
 									showCancel: false,
 									confirmText: this.translateSys('close')
 								});
+							if ([0, 2, 3, 4, -1].includes(data.result_type)) {
+								if (data.result_type == 2) {
 
-							var actionlist = data
-								.action;
-							if (actionlist) {
-								for (var j = 0; j <
-									actionlist
-									.length; j++) {
-									var action =
-										actionlist[
-											j]
-									var action_type =
-										action
-										.action_type;
-									var value =
-										action
-										.value;
-									if (action_type ==
-										'set_dlg_attr'
-									) {
-										if (value) {
-											var val = value;
-											if (typeof value == 'string') {
-												val = JSON.parse(value);
-											}
-											console.log(val);
+								} else if (typeof data.result == 'string') {
+									if (data.result) {
+										uni.showModal({
+											title: this.translateSys('tip'),
+											content: data.result,
+											showCancel: false,
+											confirmText: this.translateSys('close')
+										});
+									}
+								}
+								try {
+									var actionlist = data.action || []
+									for (var j = 0; j < actionlist.length; j++) {
+										var action = actionlist[j]
+										var action_type = action.action_type;
+										var value = action.value;
+										if (action_type == 'set_dlg_attr') {
+											if (value) {
+												var val = value;
+												if (typeof value == 'string') {
+													val = JSON.parse(value);
+												}
+												console.log(val);
 
-											for (var i = 0; i < val.length; i++) {
-												for (var a = 0; a < this.subClassAttrList.length; a++) {
-													for (var l = 0; l < this.subClassAttrList[a].Attr.length; l++) {
-														var ca = this.subClassAttrList[a].Attr[l];
-														if (val[i].attr == .Name) {
-															if (utils.classUtils.attrTypeIsDict(ca.Type)) {
-																var dictItemList = [];
-																for (var d in val[i].choice_list) {
-																	var val = val[i].choice_list[d];
-																	dictItemList.push({
-																		"CN_S_NAME": val,
-																		"CN_S_VALUE": val,
-																		"Name": val,
-																		"label": val,
-																		"value": val
-																	});
+												for (var i = 0; i < val.length; i++) {
+													for (var a = 0; a < this.subClassAttrList.length; a++) {
+														for (var l = 0; l < this.subClassAttrList[a].Attr
+															.length; l++) {
+															var ca = this.subClassAttrList[a].Attr[l];
+															if (val[i].attr == .Name) {
+																if (utils.classUtils.attrTypeIsDict(ca.Type)) {
+																	var dictItemList = [];
+																	for (var d in val[i].choice_list) {
+																		var val = val[i].choice_list[d];
+																		dictItemList.push({
+																			"CN_S_NAME": val,
+																			"CN_S_VALUE": val,
+																			"Name": val,
+																			"label": val,
+																			"value": val
+																		});
 
+																	}
+																	ca.dictitem = dictItemList;
 																}
-																ca.dictitem = dictItemList;
-															}
 
+															}
 														}
 													}
 												}
 											}
 										}
 									}
-								}
-								if (action_type ==
-									'open_select_userdlg'
-								) {
+								} catch (ex) {
+									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('error') + " 6.2",
-										content: "open_select_userdlg杩欎釜action_type杩樻湭澶勭悊锛�,
+										title: this.translateSys('tip'),
+										content: tip,
 										showCancel: false,
 										confirmText: this.translateSys('close')
 									});
+									console.log(ex)
+									return
 								}
 							}
 						}
@@ -4170,265 +4226,37 @@
 						.info : data.info
 						.join('<br/>') :
 						'';
-					if (tip) uni
-						.showModal({
+					tip = tip || data.err_info
+					if (tip)
+						uni.showModal({
 							title: this.translateSys('tip'),
 							content: tip,
 							showCancel: false,
 							confirmText: this.translateSys('close')
 						});
-
-					var actionlist = data
-						.action;
-					if (actionlist) {
-						console.log(
-							actionlist);
-						for (var ii =
-								0; ii <
-							actionlist
-							.length; ii++
-						) {
-							var action =
-								actionlist[
-									ii];
-							if (action
-								.action_type ==
-								'set_dlg_attr'
-							) {
-								var result =
-									action
-									.value;
-								for (var i =
-										0; i <
-									result
-									.length; i++
-								) {
-									if (result[
-											i
-										]
-										.choice_list
-									) {
-										for (
-											var s =
-												0; s <
-											$this.subPanelList
-											.length; s++
-										) {
-											for (var c = 0; c < $this.subPanelList[s].subClassAttrList
-												.length; c++) {
-												var attr =
-													$this.subPanelList[
-														s
-													]
-													.subClassAttrList[
-														c
-													]
-													.Attr;
-												for (
-													var j =
-														0; j <
-													attr
-													.length; j++
-												) {
-													if (attr[
-															j
-														]
-														.Name ==
-														result[
-															i
-														]
-														.attr
-													) {
-														if (utils.classUtils.attrTypeIsDict(attr[j]
-																.Type)) {
-															var
-																dictItemList = [];
-															for (
-																var d in
-																	result[
-																		i
-																	]
-																	.choice_list
-															) {
-																var val =
-																	result[
-																		i
-																	]
-																	.choice_list[
-																		d
-																	];
-																dictItemList
-																	.push({
-																		"CN_S_NAME": val,
-																		"CN_S_VALUE": val,
-																		"Name": val,
-																		"label": val,
-																		"value": val
-																	});
-															}
-															attr[
-																	j]
-																.dictitem =
-																dictItemList;
-															// attr[j].dictitem = result[i].choice_list;
-														}
-													}
-												}
-											}
-										}
-									}
-									for (
-										var s =
-											0; s <
-										$this
-										.subPanelList
-										.length; s++
-									) {
-										for (
-											var c =
-												0; c <
-											$this
-											.subPanelList[
-												s
-											]
-											.subClassAttrList
-											.length; c++
-										) {
-											var attr =
-												$this
-												.subPanelList[
-													s
-												]
-												.subClassAttrList[
-													c
-												]
-												.Attr;
-											for (
-												var j =
-													0; j <
-												attr
-												.length; j++
-											) {
-												console
-													.log(
-														attr[
-															j
-														]
-														.Name +
-														'==' +
-														result[
-															i
-														]
-														.attr
-													);
-												if (attr[
-														j
-													]
-													.Name ==
-													result[
-														i
-													]
-													.attr
-												) {
-													attr[
-															j]
-														.Value =
-														result[
-															i
-														]
-														.value;
-												}
-											}
-										}
-									}
-								}
-							} else if (
-								action
-								.action_type ==
-								'set_global_attr'
-							) {
-								$this
-									.$actiontr =
-									action
-									.value || [];
-							} else if (
-								action
-								.action_type ==
-								'open_common_dlg'
-							) { //鎵撳紑渚ф粦寮规
-								var $this =
-									this;
-								if (action
-									.value
-									.common_dlg_id ==
-									'check_list'
-								) {
-									$this.check_list =
-										action
-										.value
-										.config;
-									if (action
-										.value
-										.config
-										.appear_style ==
-										'sideslip'
-									) //鍒ゆ柇鏄惁鏄晶婊�-										$this
-										.popupType =
-										'right';
-									else
-										$this.popupType =
-										'center'
-									// open 鏂规硶浼犲叆鍙傛暟 绛夊悓鍦�uni-popup 缁勪欢涓婄粦瀹�type灞炴�
-									$this
-										.$refs
-										.popup
-										.open(
-											$this
-											.popupType
-										);
-								}
-							} else if (
-								action
-								.action_type ==
-								'add_subcls_panel'
-							) { //涓讳粠鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�-								var result =
-									action
-									.value;
-								var $this =
-									this;
-								var list_1 =
-									JSON
-									.parse(
-										JSON
+					if ([0, 2, 3, 4, -1].includes(data.result_type)) {
+						if (data.result_type == 2) {
+							if (data.result) {
+								var list_1 = JSON
+									.parse(JSON
 										.stringify(
 											this.subClassAttrList
-										)
-									);
+										));
 								var scanCodeVal =
 									$this.scanCodeVal;
-								var rand =
-									'';
-								for (var i =
-										0; i <
+								var rand = '';
+								for (var i = 0; i <
 									5; i++
 								) { //鐢熸垚5浣嶉殢鏈烘暟
-									rand +=
-										Math
-										.floor(
-											Math
+									rand += Math
+										.floor(Math
 											.random() *
-											10
-										);
+											10);
 								}
 								if (inputParamter[
-										0]
-									.attr
-								) {
+										0].attr) {
 									if (inputParamter[
-											0
-										]
+											0]
 										.attr ==
 										"mast_input_3037"
 									) //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�@@ -4436,15 +4264,10 @@
 										"mast_input_3037-" +
 										rand;
 								}
-								if (info
-									.attr[
-										0]
-									.attr
-								) {
-									if (info
-										.attr[
-											0
-										]
+								if (info.attr[0]
+									.attr) {
+									if (info.attr[
+											0]
 										.attr ==
 										"mast_input_3037"
 									) //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�@@ -4457,20 +4280,18 @@
 										scanCodeVal: scanCodeVal,
 										subClassAttr: list_1
 									});
-								for (var i =
-										0; i <
+								var result = data
+									.result;
+								for (var i = 0; i <
 									result
-									.length; i++
-								) {
-									for (
-										var s =
+									.length; i++) {
+									for (var s =
 											0; s <
 										$this.subPanelList
 										.length; s++
 									) {
 										if ($this.subPanelList[
-												s
-											]
+												s]
 											.scanCodeVal ==
 											scanCodeVal
 										) {
@@ -4530,15 +4351,11 @@
 													}
 												}
 											}
-
-											// $this.subPanelList[s].subClassAttr=list_1;
 										}
 									}
 
-									var length =
-										0;
-									if (!
-										$this.refdatastore
+									var length = 0;
+									if (!$this.refdatastore
 										.filter(
 											function(
 												s
@@ -4549,13 +4366,9 @@
 													.attr ==
 													s
 													.attr
-											}
-										)
-										.length
-									) {
-										length
-											=
-											1;
+											})
+										.length) {
+										length = 1;
 										$this.refdatastore
 											.push(
 												result[
@@ -4564,15 +4377,15 @@
 											);
 									}
 									if (length ==
-										0
-									) {
-										for (
-											var j =
+										0) {
+										for (var j =
 												0; j <
-											$this.refdatastore
+											$this
+											.refdatastore
 											.length; j++
 										) {
-											if ($this.refdatastore[
+											if ($this
+												.refdatastore[
 													j
 												]
 												.attr ==
@@ -4581,7 +4394,8 @@
 												]
 												.attr
 											) {
-												$this.refdatastore[
+												$this
+													.refdatastore[
 														j
 													]
 													.value =
@@ -4594,181 +4408,447 @@
 									}
 								}
 							}
-						}
-					}
 
-					if (data.result) {
-						var list_1 = JSON
-							.parse(JSON
-								.stringify(
-									this.subClassAttrList
-								));
-						var scanCodeVal =
-							$this.scanCodeVal;
-						var rand = '';
-						for (var i = 0; i <
-							5; i++
-						) { //鐢熸垚5浣嶉殢鏈烘暟
-							rand += Math
-								.floor(Math
-									.random() *
-									10);
+						} else if (typeof data.result == 'string') {
+							if (data.result) {
+								uni.showModal({
+									title: this.translateSys('tip'),
+									content: data.result,
+									showCancel: false,
+									confirmText: this.translateSys('close')
+								});
+							}
 						}
-						if (inputParamter[
-								0].attr) {
-							if (inputParamter[
-									0]
-								.attr ==
-								"mast_input_3037"
-							) //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�-								scanCodeVal =
-								"mast_input_3037-" +
-								rand;
-						}
-						if (info.attr[0]
-							.attr) {
-							if (info.attr[
-									0]
-								.attr ==
-								"mast_input_3037"
-							) //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�-								scanCodeVal =
-								"mast_input_3037-" +
-								rand;
-						}
-						$this.subPanelList
-							.push({
-								scanCodeVal: scanCodeVal,
-								subClassAttr: list_1
-							});
-						var result = data
-							.result;
-						for (var i = 0; i <
-							result
-							.length; i++) {
-							for (var s =
-									0; s <
-								$this.subPanelList
-								.length; s++
+						try {
+							var actionlist = data.action || []
+							for (var ii =
+									0; ii <
+								actionlist
+								.length; ii++
 							) {
-								if ($this.subPanelList[
-										s]
-									.scanCodeVal ==
-									scanCodeVal
+								var action =
+									actionlist[
+										ii];
+								if (action
+									.action_type ==
+									'set_dlg_attr'
 								) {
-									if (result[
-											i
-										]
-										.attr ==
-										"S_ID"
-									)
-										$this.subPanelList[
-											s
-										]
-										.ObjID =
-										result[
-											i
-										]
+									var result =
+										action
 										.value;
-									var _subClassAttr =
-										$this.subPanelList[
-											s
-										]
-										.subClassAttr;
-									for (
-										var c =
-											0; c <
-										_subClassAttr
-										.length; c++
+									for (var i =
+											0; i <
+										result
+										.length; i++
 									) {
-										var attr =
-											_subClassAttr[
-												c
+										if (result[
+												i
 											]
-											.Attr;
-										for (
-											var j =
-												0; j <
-											attr
-											.length; j++
+											.choice_list
 										) {
-											// console.log(attr[j].Name+'=='+result[i].attr);
-											if (attr[
-													j
-												]
-												.Name ==
-												result[
-													i
-												]
-												.attr
+											for (
+												var s =
+													0; s <
+												$this.subPanelList
+												.length; s++
 											) {
-												attr[
-														j]
-													.Value =
+												for (var c = 0; c < $this.subPanelList[s].subClassAttrList
+													.length; c++) {
+													var attr =
+														$this.subPanelList[
+															s
+														]
+														.subClassAttrList[
+															c
+														]
+														.Attr;
+													for (
+														var j =
+															0; j <
+														attr
+														.length; j++
+													) {
+														if (attr[
+																j
+															]
+															.Name ==
+															result[
+																i
+															]
+															.attr
+														) {
+															if (utils.classUtils.attrTypeIsDict(attr[j]
+																	.Type)) {
+																var
+																	dictItemList = [];
+																for (
+																	var d in
+																		result[
+																			i
+																		]
+																		.choice_list
+																) {
+																	var val =
+																		result[
+																			i
+																		]
+																		.choice_list[
+																			d
+																		];
+																	dictItemList
+																		.push({
+																			"CN_S_NAME": val,
+																			"CN_S_VALUE": val,
+																			"Name": val,
+																			"label": val,
+																			"value": val
+																		});
+																}
+																attr[
+																		j]
+																	.dictitem =
+																	dictItemList;
+																// attr[j].dictitem = result[i].choice_list;
+															}
+														}
+													}
+												}
+											}
+										}
+										for (
+											var s =
+												0; s <
+											$this
+											.subPanelList
+											.length; s++
+										) {
+											for (
+												var c =
+													0; c <
+												$this
+												.subPanelList[
+													s
+												]
+												.subClassAttrList
+												.length; c++
+											) {
+												var attr =
+													$this
+													.subPanelList[
+														s
+													]
+													.subClassAttrList[
+														c
+													]
+													.Attr;
+												for (
+													var j =
+														0; j <
+													attr
+													.length; j++
+												) {
+													console
+														.log(
+															attr[
+																j
+															]
+															.Name +
+															'==' +
+															result[
+																i
+															]
+															.attr
+														);
+													if (attr[
+															j
+														]
+														.Name ==
+														result[
+															i
+														]
+														.attr
+													) {
+														attr[
+																j]
+															.Value =
+															result[
+																i
+															]
+															.value;
+													}
+												}
+											}
+										}
+									}
+								} else if (
+									action
+									.action_type ==
+									'set_global_attr'
+								) {
+									$this
+										.$actiontr =
+										action
+										.value || [];
+								} else if (
+									action
+									.action_type ==
+									'open_common_dlg'
+								) { //鎵撳紑渚ф粦寮规
+									var $this =
+										this;
+									if (action
+										.value
+										.common_dlg_id ==
+										'check_list'
+									) {
+										$this.check_list =
+											action
+											.value
+											.config;
+										if (action
+											.value
+											.config
+											.appear_style ==
+											'sideslip'
+										) //鍒ゆ柇鏄惁鏄晶婊�+											$this
+											.popupType =
+											'right';
+										else
+											$this.popupType =
+											'center'
+										// open 鏂规硶浼犲叆鍙傛暟 绛夊悓鍦�uni-popup 缁勪欢涓婄粦瀹�type灞炴�
+										$this
+											.$refs
+											.popup
+											.open(
+												$this
+												.popupType
+											);
+									}
+								} else if (
+									action
+									.action_type ==
+									'add_subcls_panel'
+								) { //涓讳粠鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�+									var result =
+										action
+										.value;
+									var $this =
+										this;
+									var list_1 =
+										JSON
+										.parse(
+											JSON
+											.stringify(
+												this.subClassAttrList
+											)
+										);
+									var scanCodeVal =
+										$this.scanCodeVal;
+									var rand =
+										'';
+									for (var i =
+											0; i <
+										5; i++
+									) { //鐢熸垚5浣嶉殢鏈烘暟
+										rand +=
+											Math
+											.floor(
+												Math
+												.random() *
+												10
+											);
+									}
+									if (inputParamter[
+											0]
+										.attr
+									) {
+										if (inputParamter[
+												0
+											]
+											.attr ==
+											"mast_input_3037"
+										) //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�+											scanCodeVal =
+											"mast_input_3037-" +
+											rand;
+									}
+									if (info
+										.attr[
+											0]
+										.attr
+									) {
+										if (info
+											.attr[
+												0
+											]
+											.attr ==
+											"mast_input_3037"
+										) //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�+											scanCodeVal =
+											"mast_input_3037-" +
+											rand;
+									}
+									$this.subPanelList
+										.push({
+											scanCodeVal: scanCodeVal,
+											subClassAttr: list_1
+										});
+									for (var i =
+											0; i <
+										result
+										.length; i++
+									) {
+										for (
+											var s =
+												0; s <
+											$this.subPanelList
+											.length; s++
+										) {
+											if ($this.subPanelList[
+													s
+												]
+												.scanCodeVal ==
+												scanCodeVal
+											) {
+												if (result[
+														i
+													]
+													.attr ==
+													"S_ID"
+												)
+													$this.subPanelList[
+														s
+													]
+													.ObjID =
 													result[
 														i
 													]
 													.value;
+												var _subClassAttr =
+													$this.subPanelList[
+														s
+													]
+													.subClassAttr;
+												for (
+													var c =
+														0; c <
+													_subClassAttr
+													.length; c++
+												) {
+													var attr =
+														_subClassAttr[
+															c
+														]
+														.Attr;
+													for (
+														var j =
+															0; j <
+														attr
+														.length; j++
+													) {
+														// console.log(attr[j].Name+'=='+result[i].attr);
+														if (attr[
+																j
+															]
+															.Name ==
+															result[
+																i
+															]
+															.attr
+														) {
+															attr[
+																	j]
+																.Value =
+																result[
+																	i
+																]
+																.value;
+														}
+													}
+												}
+
+												// $this.subPanelList[s].subClassAttr=list_1;
+											}
+										}
+
+										var length =
+											0;
+										if (!
+											$this.refdatastore
+											.filter(
+												function(
+													s
+												) {
+													return result[
+															i
+														]
+														.attr ==
+														s
+														.attr
+												}
+											)
+											.length
+										) {
+											length
+												=
+												1;
+											$this.refdatastore
+												.push(
+													result[
+														i
+													]
+												);
+										}
+										if (length ==
+											0
+										) {
+											for (
+												var j =
+													0; j <
+												$this.refdatastore
+												.length; j++
+											) {
+												if ($this.refdatastore[
+														j
+													]
+													.attr ==
+													result[
+														i
+													]
+													.attr
+												) {
+													$this.refdatastore[
+															j
+														]
+														.value =
+														result[
+															i
+														]
+														.value;
+												}
 											}
 										}
 									}
 								}
 							}
 
-							var length = 0;
-							if (!$this.refdatastore
-								.filter(
-									function(
-										s
-									) {
-										return result[
-												i
-											]
-											.attr ==
-											s
-											.attr
-									})
-								.length) {
-								length = 1;
-								$this.refdatastore
-									.push(
-										result[
-											i
-										]
-									);
-							}
-							if (length ==
-								0) {
-								for (var j =
-										0; j <
-									$this
-									.refdatastore
-									.length; j++
-								) {
-									if ($this
-										.refdatastore[
-											j
-										]
-										.attr ==
-										result[
-											i
-										]
-										.attr
-									) {
-										$this
-											.refdatastore[
-												j
-											]
-											.value =
-											result[
-												i
-											]
-											.value;
-									}
-								}
-							}
+						} catch (ex) {
+							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)
+							return
 						}
 					}
+
 				}
 
 			}).catch(ex => {
@@ -4981,16 +5061,16 @@
 						.info : data.info
 						.join('<br/>') :
 						'';
-					if (tip) uni
-						.showModal({
+					tip = tip || data.err_info
+					if (tip)
+						uni.showModal({
 							title: this.translateSys('tip'),
 							content: tip,
 							showCancel: false,
 							confirmText: this.translateSys('close')
 						});
 
-					var result = data
-						.result;
+					//	var result = data.result;
 					if (eventID != $this.param.After_OK_Event.ID)
 						$this.scan_OKDataObjRunCustomEvent(
 							$this.param

--
Gitblit v1.9.1