From 46a69ec5c8c6dde5249832d46659f988fe16ec3f Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期一, 04 十一月 2024 12:48:45 +0800
Subject: [PATCH] test

---
 pages/modal/3018.vue |   99 ++++++++++++++++++++++++-------------------------
 1 files changed, 48 insertions(+), 51 deletions(-)

diff --git a/pages/modal/3018.vue b/pages/modal/3018.vue
index da25daf..2d58c4a 100644
--- a/pages/modal/3018.vue
+++ b/pages/modal/3018.vue
@@ -149,13 +149,13 @@
 								<a class="class_attr_add_ref"><i class="ace-icon fa fa-plus-circle"></i></a>
 							</div>
 							<input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}"
-								disabled="true">
+								disabled="true" :maxlength="-1">
 						</view>
 						<view v-if="classattr.control_style=='宸﹀彸甯冨眬'">
 							<p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
 							<input type="text" class="attr_field" :data-index="index" :data-iindex="iindex"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}"
-								disabled="true">
+								disabled="true" :maxlength="-1">
 							<div class="text-right2" v-if="attr.Type=='寮曠敤瀵硅薄(鍗曚釜)'|| attr.Type=='obj-ref'">
 								<a @tap="classAttr_AddRef" :data-classid="attr.RelCls[0].id"
 									:data-classname="attr.RelCls[0].name"><i class="ace-icon fa fa-plus-circle"></i></a>
@@ -179,13 +179,14 @@
 								<a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i
 										class="ace-icon fa fa-plus-circle"></i></a>
 							</div>
-							<input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true">
+							<input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true"
+								:maxlength="-1">
 						</view>
 						<view v-if="classattr.control_style=='宸﹀彸甯冨眬'">
 							<p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
 							<input type="text" class="attr_field" :value="attr.Value"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}"
-								disabled="true">
+								disabled="true" :maxlength="-1">
 							<div class="text-right2">
 								<a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i
 										class="ace-icon fa fa-plus-circle"></i></a>
@@ -202,13 +203,14 @@
 								<a href="#" class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i
 										class="ace-icon fa fa-plus-circle"></i></a>
 							</div>
-							<input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true">
+							<input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true"
+								:maxlength="-1">
 						</view>
 						<view v-if="classattr.control_style=='宸﹀彸甯冨眬'">
 							<p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
 							<input type="text" class="attr_field" :value="attr.Value"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}"
-								disabled="true">
+								disabled="true" :maxlength="-1">
 							<div class="text-right2">
 								<a class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i
 										class="ace-icon fa fa-plus-circle"></i></a>
@@ -222,13 +224,13 @@
 							<text class="tx_title">{{attr.DispName}}:<i class="i_tishi"
 									v-if="attr.notempty==true">*</i></text>
 							<input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}"
-								:disabled="attr.edit?false:true">
+								:disabled="attr.edit?false:true" :maxlength="-1">
 						</view>
 						<view v-if="classattr.control_style=='宸﹀彸甯冨眬'">
 							<p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
 							<input type="text" class="attr_field" :data-index="index" :data-iindex="iindex"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}"
-								:disabled="attr.edit?false:true">
+								:disabled="attr.edit?false:true" :maxlength="-1">
 							<i class="i_tishi" v-if="attr.notempty==true">*</i>
 						</view>
 					</view>
@@ -1315,55 +1317,50 @@
 				};
 				console.log(dataInfo);
 				// return
-				DataObjCreate(dataInfo).then((result) => {
-					console.log(result);
+				DataObjCreate(dataInfo).then((res) => {
+					console.log(res);
 					uni.hideLoading();
-					if (result.action) {
-						var action = JSON.parse(result.action);
-						console.log(action);
-						if (action.ret == '0') {
-							if (action.ret != 0) {
-								uni.showModal({
-									title: this.translateSys('tip'),
-									content: this.translate('execute_script_failed') +
-										this
-										.translateSys('comma') + this.translate(
-											'result') +
-										this
-										.translateSys('colon') + action.result,
-									showCancel: false,
-									confirmText: this.translateSys('cancel')
-								});
-								return;
-							}
-							if (action.info) {
-								uni.showModal({
-									title: this.translateSys('tip'),
-									content: this.translate('execute_script_failed') +
-										this
-										.translateSys('comma') +
-										this.translateSys('colon') + action.info,
-									showCancel: false,
-									confirmText: this.translateSys('cancel')
-								});
-								return;
-							}
-							if (action.result_type == '0') {
-								uni.showToast({
-									title: action.result,
-									icon: "success",
-									duration: 3000
-								});
-							}
-
-							// "{"ret":0, "result_type":0, "result":"鍒涘缓鎴愬姛123123123","info":""}"
-						}
-					} else
+					let data = res.lua_result
+					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 == 801) uni.showModal({
+							title: this.translateSys('tip'),
+							content: tip,
+							showCancel: false,
+							confirmText: this.translateSys('cancel')
+						});
+						else uni.showModal({
+							title: this.translateSys('tip'),
+							content: tip + ',' + this.translateSys('tip') + ':' + data
+								.ret,
+							showCancel: false,
+							confirmText: this.translateSys('cancel')
+						});
+						return false
+					} else {
+						var tip = data.info ? typeof data.info == 'string' ? data.info : data
+							.info
+							.join(
+								'<br/>') : '';
+						if (tip) uni.showModal({
+							title: this.translateSys('tip'),
+							content: tip,
+							showCancel: false,
+							confirmText: this.translateSys('cancel')
+						});
 						uni.showToast({
 							title: this.translate('create_success'),
 							icon: "success",
 							duration: 3000
 						});
+					}
+
+
+
+
 					//鍒锋柊
 					uni.redirectTo({
 						url: '../modal/3018?param=' + JSON.stringify(this.$data

--
Gitblit v1.9.1