From e1c66494568b0295db030cb58ee0fc6f7b443443 Mon Sep 17 00:00:00 2001
From: jt <jt@activesoft.com.cn>
Date: 星期三, 30 八月 2023 17:30:15 +0800
Subject: [PATCH] tset

---
 pages/modal/ms_classAttr.vue |  329 +++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 283 insertions(+), 46 deletions(-)

diff --git a/pages/modal/ms_classAttr.vue b/pages/modal/ms_classAttr.vue
index 7dc2336..463dbc3 100644
--- a/pages/modal/ms_classAttr.vue
+++ b/pages/modal/ms_classAttr.vue
@@ -257,7 +257,67 @@
 	    right: -10px;
 	    z-index: 100;
 	}
-	
+	.view-popup{
+		position:relative;
+	}
+	.popup-content {
+		@include flex;
+		align-items: center;
+		justify-content: center;
+		padding: 30rpx;
+		background-color: #fff;
+		/* height: 150px; */
+		/* border: 1px solid red; */
+	}
+	.popup-cont {
+		overflow-y: auto;
+		/* border: 1px solid red; */
+	}
+	.popup-height {
+		@include height;
+		/* width: 200px; */
+	}
+	.popup-header{
+		font-size: 42rpx;
+		font-weight: bold;
+		margin:20rpx 20rpx 0px 20rpx;
+	}
+	.view_popup_CheckList{
+		margin-bottom: 20rpx;
+	}
+	.popup-footer{
+		float: right;
+		position:absolute;
+		bottom:0;
+		right:20rpx;
+	}
+	button.btn_popup_add {
+		width:180rpx;
+		margin-top: 50rpx;
+		margin-right: 20rpx;
+		padding: 15rpx;
+		line-height: 1.5;
+		background: #27A6E1;
+		border: none;
+		color: #fff;
+	    font-size: 38rpx;
+		font-weight: bold;
+		/* float: left; */
+		display: inline-block;
+	}
+	button.btn_popup_cancel {
+		width:180rpx;
+		margin-top: 50rpx;
+		padding: 15rpx;
+		line-height: 1.5;
+		background: #27A6E1;
+		border: none;
+		color: #fff;
+	    font-size: 38rpx;
+		font-weight: bold;
+		/* float: right; */
+		display: inline-block;
+	}
 </style>
 
 <template>
@@ -283,7 +343,7 @@
 							</div>
 							<!-- <div style='width: 100px;position: relative;'> 
 							<image class="divX" src="../../images/msg_50_new.png"></image>-->
-							<input type="text" :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true" > <!-- =='flase'?true:false -->
+							<input :type="attr.Type=='鏁存暟' || attr.Type=='娴偣鏁�?'number':'text'" :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true" > <!-- =='flase'?true:false -->
 							<textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='2'" :data-index="index":data-iindex="iindex" style="height:60px;" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea>
 							<textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='3'" :data-index="index":data-iindex="iindex" style="height:90px;" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea>
 							<!-- </div> -->
@@ -293,7 +353,7 @@
 							<i class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</p>
 							<!-- <div style='width: 100%;position: relative;'>
 								<image class="divX" src="../../images/msg_50_new.png"></image> -->
-							<input type="text" class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" :disabled="attr.edit?false:true" >
+							<input :type="attr.Type=='鏁存暟' || attr.Type=='娴偣鏁�?'number':'text'" class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" :disabled="attr.edit?false:true" >
 							<textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='2'" :data-index="index":data-iindex="iindex" style="height:60px;" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" :disabled="attr.edit?false:true"></textarea>
 							<textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='3'" :data-index="index":data-iindex="iindex" style="height:90px;" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" :disabled="attr.edit?false:true"></textarea>
 							<!-- </div> -->
@@ -324,7 +384,7 @@
 							</picker>
 						</view>
 					</view>
-					<view class="form-group" v-if="attr.Type=='瀛楀吀' || attr.Type=='瀛楀吀-瀛楃涓�" :style="{'display':attr.hidden == true?'none':''}">
+					<view class="form-group" v-if="attr.Type=='瀛楀吀' || attr.Type=='瀛楀吀-瀛楃涓� || attr.Type=='瀛楀吀-鏁存暟'" :style="{'display':attr.hidden == true?'none':''}">
 						<view v-if="classattr.control_style=='涓婁笅甯冨眬'">
 							<text class="tx_title" :style="{'font-family':classattr.Font.Name?classattr.Font.Name:'initial','font-size':classattr.Font.Size?classattr.Font.Size:'initial','font-weight':classattr.Font.Bold?'bold':'initial','font-style':classattr.Font.Tilt?'italic':'initial','text-decoration':classattr.Font.Underline?'underline':'initial','background-color':classattr.Font.Bk_Color,'color':classattr.Font.Text_Color,'width':classattr.title_p_wdith+'%'}"><i class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</text>
 							<picker class="section_iput" @change="onchange" :range="attr.dictitem" range-key="CN_S_NAME" v-if="attr.select==false" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true">
@@ -337,7 +397,7 @@
 							<picker class="section_iput attr_field" @change="onchange" :range="attr.dictitem" range-key="CN_S_NAME" v-if="attr.select==false" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}">
 								<label class="">{{ attr.Value }}</label>
 							</picker>
-							<select-cy :value="attr.Value" :name="attr.Name" :options="attr.dictitem" showClearIcon="true" @change="onchange2" v-else-if="attr.select==true" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}"></select-cy>
+							<select-cy :value="attr.Value" :name="attr.Name" :options="attr.dictitem" showClearIcon="true" @change="onchange2" v-else-if="attr.select==true" :data-index="index" :data-iindex="iindex" :style="{'display':'inline-block','margin-left':'8px','width':attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}"></select-cy>
 						</view>
 					</view>
 					<view class="form-group" v-if="attr.Type=='寮曠敤瀵硅薄(鍗曚釜)' || attr.Type=='寮曠敤瀵硅薄(澶氫釜)'" :style="{'display':attr.hidden == true?'none':''}">
@@ -465,13 +525,13 @@
 									<div class="text-right" v-if="attr.ext_button==true">
 										<a @tap="classAttr_extButton(index,iindex)" ><i class="ace-icon fa fa-plus-circle"></i></a>
 									</div>
-									<input type="text" :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" :data-iiindex="iiindex" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width.split('%')[0] - 2.5 +'%'}" :disabled="attr.edit?false:true" > <!-- =='flase'?true:false -->
+									<input :type="attr.Type=='鏁存暟' || attr.Type=='娴偣鏁�?'number':'text'" :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" :data-iiindex="iiindex" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width.split('%')[0] - 2.5 +'%'}" :disabled="attr.edit?false:true" > <!-- =='flase'?true:false -->
 									<textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='2'" :data-iiindex="iiindex" :data-index="index":data-iindex="iindex" style="height:60px;" :style="{'width':attr.Width.split('%')[0] - 2.5 +'%'}" :disabled="attr.edit?false:true"></textarea>
 									<textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='3'" :data-iiindex="iiindex" :data-index="index":data-iindex="iindex" style="height:90px;" :style="{'width':attr.Width.split('%')[0] - 2.5 +'%'}" :disabled="attr.edit?false:true"></textarea>
 								</view>
 								<view v-if="subclassattr.control_style=='宸﹀彸甯冨眬'">
 									<p class="tx_title2" :style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith +'%'}"><i class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</p>
-									<input type="text" class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" :data-iiindex="iiindex" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 7 - (attr.ext_button==true?9:0) +'%'}" :disabled="attr.edit?false:true" >
+									<input :type="attr.Type=='鏁存暟' || attr.Type=='娴偣鏁�?'number':'text'" class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" :data-iiindex="iiindex" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 7 - (attr.ext_button==true?9:0) +'%'}" :disabled="attr.edit?false:true" >
 									<textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='2'" :data-iiindex="iiindex" :data-index="index":data-iindex="iindex" style="height:60px;" :style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 7 - (attr.ext_button==true?9:0) +'%'}" :disabled="attr.edit?false:true"></textarea>
 									<textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='3'" :data-iiindex="iiindex" :data-index="index":data-iindex="iindex" style="height:90px;" :style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 7 - (attr.ext_button==true?9:0) +'%'}" :disabled="attr.edit?false:true"></textarea>
 									<div class="text-right2" v-if="attr.ext_button==true">
@@ -501,7 +561,7 @@
 									</picker>
 								</view>
 							</view>
-							<view class="form-group" v-if="attr.Type=='瀛楀吀' || attr.Type=='瀛楀吀-瀛楃涓�" :style="{'display':attr.hidden == true?'none':''}">
+							<view class="form-group" v-if="attr.Type=='瀛楀吀' || attr.Type=='瀛楀吀-瀛楃涓� || attr.Type=='瀛楀吀-鏁存暟'" :style="{'display':attr.hidden == true?'none':''}">
 								<view v-if="subclassattr.control_style=='涓婁笅甯冨眬'">
 									<text class="tx_title" :style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith+'%'}"><i class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</text>
 									<picker class="section_iput" @change="onchange" :range="attr.dictitem" range-key="CN_S_NAME" v-if="attr.select==false" :data-iiindex="iiindex" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width.split('%')[0] - 2.5 +'%'}" :disabled="attr.edit?false:true">
@@ -514,7 +574,7 @@
 									<picker class="section_iput attr_field" @change="onchange" :range="attr.dictitem" range-key="CN_S_NAME" v-if="attr.select==false" :data-iiindex="iiindex" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 7 +'%'}">
 										<label class="">{{ attr.Value }}</label>
 									</picker>
-									<select-cy :value="attr.Value" :name="attr.Name" :options="attr.dictitem" showClearIcon="true" @change="sub_onchange2" v-else-if="attr.select==true" :data-iiindex="iiindex" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}"></select-cy>
+									<select-cy :value="attr.Value" :name="attr.Name" :options="attr.dictitem" showClearIcon="true" @change="sub_onchange2" v-else-if="attr.select==true" :data-iiindex="iiindex" :data-index="index" :data-iindex="iindex" :style="{'display':'inline-block','margin-left':'8px','width':attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}"></select-cy>
 									
 								</view>
 							</view>
@@ -611,6 +671,30 @@
 		<button type="default" @tap="cancel" class="btn_cancel" v-if="param.Sub_Cls.Can_Add_Delete == true">鍙栨秷</button>
 		<button type="default" @tap="sava" class="btn_add" v-if="param.Sub_Cls.Can_Add_Delete == true">{{title}}</button>
 		<button type="default" @tap="sava" class="btn_sava" v-else-if="param.Sub_Cls.Can_Add_Delete == false">{{title}}</button>
+		
+		<!-- 鏅�寮圭獥 top bottom center left right -->
+		<view>
+			<uni-popup class="view-popup" ref="popup" background-color="#fff" @change="popupChange">
+				<view class="popup-header">{{check_list.title}}</view>
+				<view class="popup-content" :class="{ 'popup-height': popupType === 'left' || popupType === 'right' }" 
+				:style="{'width':check_list.width?check_list.width+'px':'200px','height':check_list.height?check_list.height+'px':'88%'}">
+					<view class="popup-cont" :style="{'height':check_list.height?check_list.height-45+'px':'415px'}">
+						<view class="view_popup_CheckList" v-for="(item,index) in check_list.items">
+							<checkbox-group class="check_list" @change="checkChange" :data-ischeck="item.check" :data-index="index"  :style="{'margin-left': '10rpx'}">
+								<label>
+									<checkbox :value="item.check" :checked="item.check"/>
+									<text>{{item.name}}</text>
+								</label>
+							</checkbox-group>
+						</view>
+					</view>
+					<view class="popup-footer">
+						<button type="default" @tap="popup_sava" class="btn_popup_add">纭畾</button>
+						<button type="default" @tap="popup_cancel" class="btn_popup_cancel">鍙栨秷</button>
+					</view>
+				</view>
+			</uni-popup>
+		</view>
 	</view>
 </template> 
 
@@ -636,6 +720,8 @@
 				subClassAttrList:[],
 				subPanelList:[],
 				subClassGridStyle:[],
+				popupType:"center",
+				check_list:{},
 			}
 		},
 		onLoad(options) {
@@ -708,6 +794,157 @@
 			}
 		},
 		methods: {
+			scan_classAttr_extButton(e){ //閫夋嫨鎸夐挳鍓�+				var $this = this;
+				var Before_Select_Event = $this.$data.param.Scan_Code.Before_Select_Event;
+				if(!Before_Select_Event){
+					uni.showModal({title:"鎻愮ず",content:"閫夋嫨鍓嶄簨浠朵负绌猴紒",showCancel:false,confirmText:"鍙栨秷"});
+					return;
+				}
+				// if(!After_Select_Event){
+				// 	uni.showModal({title:"鎻愮ず",content:"閫夋嫨鍚庝簨浠朵负绌猴紒",showCancel:false,confirmText:"鍙栨秷"});
+				// 	return;
+				// }
+				// var data_attr = this.$data.classAttrList[index].Attr[iindex];
+				// this.DataObjRunCustomEvent_Return(Before_Select_Event, '', After_Select_Event, '', '');
+				var mast_attr=[];
+				var attrlist = this.$data.classAttrList;
+				for (var i = 0; i < attrlist.length; i++) {
+					var attr = attrlist[i].Attr;
+					for (var j = 0; j < attr.length; j++) {
+						var ar = attr[j];
+						if(ar.Value=='璇烽�鎷�){
+							uni.showModal({title:"鎻愮ず",content:ar.DispName+"鏈�鎷╂暟鎹紒",showCancel:false,confirmText:"鍙栨秷"});
+							return;
+						}
+						if(ar.Type=='寮曠敤瀵硅薄(澶氫釜)')
+							if(ar.Value=='璇�) ar.Value='';
+						if(ar.Type=='寮曠敤浜哄憳' || ar.Type=='寮曠敤椤圭洰')
+							mast_attr.push({ attr: ar.Name, value: ar.ValID ?ar.ValID :'' });
+						else if(ar.Type=='甯冨皵鍊�)
+							mast_attr.push({ attr: ar.Name, value: ar.Value?'1':'0'});
+						else
+							mast_attr.push({ attr: ar.Name, value: ar.Value ?ar.Value :''});
+					}
+				}
+				
+				var req=[];
+				var attrlist = this.$data.subClassAttrList;
+				var msg='';
+				for (var i = 0; i < attrlist.length; i++) {
+					var attr = attrlist[i].Attr;
+					for (var j = 0; j < attr.length; j++) {
+						var ar = attr[j];
+						if(ar.Type=='寮曠敤瀵硅薄(澶氫釜)')
+							if(ar.Value=='璇�) ar.Value='';
+						if(ar.Type=='寮曠敤浜哄憳' || ar.Type=='寮曠敤椤圭洰')
+							req.push({ attr: ar.Name, value: ar.ValID ?ar.ValID :'' });
+						else if(ar.Type=='甯冨皵鍊�)
+							req.push({ attr: ar.Name, value: ar.Value?'1':'0'});
+						else
+							req.push({ attr: ar.Name, value: ar.Value ?ar.Value :''});
+					}
+				}
+				
+				var info = {
+				    eventid: Before_Select_Event.ID,
+				    edtype: "7",//"0",
+				    projectid: '',
+				    rclsid: '',
+				    robjid: '',
+				    userlogin: '',
+				    clsid: 'MBOX',//this.$data.param.Sub_Cls.ID,
+				    objid: "",
+				    attr: req,
+					mast_attr: mast_attr,
+					inputParamter: mast_attr
+				}
+				// console.log(info);
+				this.scan_DataObjRunCustomEvent(info, "");
+			},
+			popupChange(e) {
+				console.log('褰撳墠妯″紡锛� + e.type + ',鐘舵�锛� + e.show);
+			},
+			checkChange(e){ //寮规check閫夋嫨
+				// console.log(e.target.dataset);
+				var index = e.target.dataset.index;
+				var ischeck = e.target.dataset.ischeck;
+				var data = this.$data.check_list.items;
+				// this.$data.check_list.items=[];
+				if(this.$data.check_list.multiple_choice=="0"){ //鍒ゆ柇鏃跺崟閫夎繕鏄閫�+					for(var i in data){
+						data[i].check=false;
+					}
+				}
+				data[index].check=ischeck?false:true;
+				this.$data.check_list.items=data;
+				
+			},
+			popup_cancel(e){ //寮规鍙栨秷
+				this.$refs.popup.close();
+			},
+			popup_sava(e){ //寮规纭畾 閫夋嫨鎸夐挳鍚�+				var $this = this;
+				var After_Select_Event = $this.$data.param.Scan_Code.After_Select_Event;
+				if(!After_Select_Event){
+					uni.showModal({title:"鎻愮ず",content:"閫夋嫨鍚庝簨浠朵负绌猴紒",showCancel:false,confirmText:"鍙栨秷"});
+					return;
+				}
+				var items = $this.$data.check_list.items;
+				var data=[];
+				var name="";
+				for (var i = 0; i < items.length; i++) {
+					if(items[i].check==true){
+						if(name)
+							name+=';';
+						name+=items[i].name;
+						data.push({id:items[i].id,name:items[i].name});
+					}
+				}
+				if(data.length==0){
+					uni.showModal({title:"鎻愮ず",content:"鏈�鎷╂暟鎹紒",showCancel:false,confirmText:"鍙栨秷"});
+					return;
+				}
+				var mast_attr=[];
+				var attrlist = this.$data.classAttrList;
+				for (var i = 0; i < attrlist.length; i++) {
+					var attr = attrlist[i].Attr;
+					for (var j = 0; j < attr.length; j++) {
+						var ar = attr[j];
+						if(ar.Value=='璇烽�鎷�){
+							uni.showModal({title:"鎻愮ず",content:ar.DispName+"鏈�鎷╂暟鎹紒",showCancel:false,confirmText:"鍙栨秷"});
+							return;
+						}
+						if(ar.Type=='寮曠敤瀵硅薄(澶氫釜)')
+							if(ar.Value=='璇�) ar.Value='';
+						if(ar.Type=='寮曠敤浜哄憳' || ar.Type=='寮曠敤椤圭洰')
+							mast_attr.push({ attr: ar.Name, value: ar.ValID ?ar.ValID :'' });
+						else if(ar.Type=='甯冨皵鍊�)
+							mast_attr.push({ attr: ar.Name, value: ar.Value?'1':'0'});
+						else
+							mast_attr.push({ attr: ar.Name, value: ar.Value ?ar.Value :''});
+					}
+				}
+				
+				$this.$data.scanCodeVal=name;
+				var info = {
+				    eventid: After_Select_Event.ID,
+				    edtype: "7",
+				    projectid: '',
+				    rclsid: '',
+				    robjid: '',
+					userlogin: '',
+					clsid: 'MBOX',
+					objid: "",
+				    attr: mast_attr,
+					inputParamter: data,
+					enviroment: ''
+				}
+				// console.log(info);
+				this.scan_DataObjRunCustomEvent(info, "");
+				this.$refs.popup.close();
+			},
+			
 			cancel(e){
 				uni.navigateBack({
 					delta:1 //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
@@ -1103,10 +1340,8 @@
 					var index ,iindex,dindex=0;
 					for(var i in this.$data.classAttrList){
 						for(var j in this.$data.classAttrList[i].Attr){
-							for(var d in this.$data.classAttrList[i].Attr[j].dictitem){
-								if(delvalue[0].Name == this.$data.classAttrList[i].Attr[j].dictitem[d].Name){
-									this.$data.classAttrList[i].Attr[j].Value="";
-								}
+							if(delvalue[0].attr == this.$data.classAttrList[i].Attr[j].Name){
+								this.$data.classAttrList[i].Attr[j].Value="";
 							}
 						}
 					}
@@ -1116,10 +1351,8 @@
 					var index ,iindex,dindex=0;
 					for(var i in this.$data.classAttrList){
 						for(var j in this.$data.classAttrList[i].Attr){
-							for(var d in this.$data.classAttrList[i].Attr[j].dictitem){
-								if(item[v].Name == this.$data.classAttrList[i].Attr[j].dictitem[d].Name){
-									index=i;iindex=j;dindex=d;
-								}
+							if(item[v].attr == this.$data.classAttrList[i].Attr[j].Name){
+								index=i;iindex=j;
 							}
 						}
 					}
@@ -1145,7 +1378,7 @@
 					        			req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' });
 					        		else if(ar.Type=='甯冨皵鍊�)
 										req.push({ attr: ar.Name, val: ar.Value?'1':'0'});
-					        		else if(ar.Type=='瀛楀吀' || ar.Type=='瀛楀吀-瀛楃涓�)
+					        		else if(ar.Type=='瀛楀吀' || ar.Type=='瀛楀吀-瀛楃涓� || ar.Type=='瀛楀吀-鏁存暟')
 										req.push({ attr: ar.Name, val: itemvalue.Name});
 					        		else
 					        			req.push({ attr: ar.Name, val: ar.Value ?ar.Value :''});
@@ -1263,7 +1496,7 @@
 					        			req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' });
 					        		else if(ar.Type=='甯冨皵鍊�)
 										req.push({ attr: ar.Name, val: ar.Value?'1':'0'});
-					        		else if(ar.Type=='瀛楀吀' || ar.Type=='瀛楀吀-瀛楃涓�)
+					        		else if(ar.Type=='瀛楀吀' || ar.Type=='瀛楀吀-瀛楃涓� || ar.Type=='瀛楀吀-鏁存暟')
 										req.push({ attr: ar.Name, val: itemvalue.Name});
 					        		else
 					        			req.push({ attr: ar.Name, val: ar.Value ?ar.Value :''});
@@ -1409,21 +1642,6 @@
 				var data_attr = this.$data.classAttrList[index].Attr[iindex];
 				this.DataObjRunCustomEvent_Return(before_click_button, data_attr, button_callback, index,iindex);
 			},
-			scan_classAttr_extButton(e){  //---------鏈畬鎴�----------
-				var $this = this;
-				var Before_Select_Event = $this.$data.param.Scan_Code.Before_Select_Event.ID;
-				var After_Select_Event = $this.$data.param.Scan_Code.After_Select_Event.ID;
-				if(!Before_Select_Event){
-					uni.showModal({title:"鎻愮ず",content:"閫夋嫨鎸夐挳鍓嶄簨浠朵负绌猴紒",showCancel:false,confirmText:"鍙栨秷"});
-					return;
-				}
-				if(!After_Select_Event){
-					uni.showModal({title:"鎻愮ず",content:"鏂板鎸夐挳鍚庝簨浠朵负绌猴紒",showCancel:false,confirmText:"鍙栨秷"});
-					return;
-				}
-				// var data_attr = this.$data.classAttrList[index].Attr[iindex];
-				this.DataObjRunCustomEvent_Return(Before_Select_Event, '', After_Select_Event, '', '');
-			},
 			classAttr_AddPer(index,iindex){
 				var param={index:index,iindex:iindex};
 				var $this = this;
@@ -1512,7 +1730,8 @@
 			},
 			add(){
 				uni.showLoading({
-					title:"鍔犺浇涓�.."
+					title:"鍔犺浇涓�..",
+					mask:true
 				});
 				var req=[];
 				var attrlist = this.$data.classAttrList;
@@ -1527,7 +1746,7 @@
 				        	req.push({ name: ar.Name, value: ar.ValID ?ar.ValID :'' });
 				        else if(ar.Type=='甯冨皵鍊�)
 							req.push({ name: ar.Name, value: ar.Value?'1':'0'});
-				        else if(ar.Type=='瀛楀吀' || ar.Type=='瀛楀吀-瀛楃涓�){
+				        else if(ar.Type=='瀛楀吀' || ar.Type=='瀛楀吀-瀛楃涓� || ar.Type=='瀛楀吀-鏁存暟'){
 							if(ar.select==true){ //鍒ゆ柇涓嬫媺鏄惁澶氶�
 								var valStr ="";
 								for(var v in ar.Value){
@@ -1631,6 +1850,7 @@
 												for (var d = 0; d < ca.dictitem.length; d++) {
 													ca.dictitem[d].label=ca.dictitem[d].CN_S_NAME;
 													ca.dictitem[d].value=ca.dictitem[d].CN_S_NAME;
+													ca.dictitem[d].attr=ca.Name;
 													if(ca.dictitem[d].CN_C_IS_DEFAULT=='1')
 														ca.Value=ca.dictitem[d].CN_S_NAME;
 												}
@@ -1769,6 +1989,7 @@
 												for (var d = 0; d < ca.dictitem.length; d++) {
 													ca.dictitem[d].label=ca.dictitem[d].CN_S_NAME;
 													ca.dictitem[d].value=ca.dictitem[d].CN_S_NAME;
+													ca.dictitem[d].attr=ca.Name;
 													if(ca.dictitem[d].CN_C_IS_DEFAULT=='1')
 														ca.Value=ca.dictitem[d].CN_S_NAME;
 												}
@@ -1918,7 +2139,7 @@
 												for (var l = 0; l < this.$data.classAttrList[a].Attr.length; l++) {
 													var ca = this.$data.classAttrList[a].Attr[l];
 													if (val[i].attr  == ca.Name) {
-														if(ca.Type=='瀛楀吀' || ca.Type=='瀛楀吀-瀛楃涓�){
+														if(ca.Type=='瀛楀吀' || ca.Type=='瀛楀吀-瀛楃涓� || ca.Type=='瀛楀吀-鏁存暟'){
 															var dictItemList=[];
 															for(var d in val[i].choice_list){
 																var val =val[i].choice_list[d];
@@ -2016,7 +2237,7 @@
 												var attr = $this.$data.classAttrList[c].Attr;
 												for (var j = 0; j < attr.length; j++) {
 													if(attr[j].Name==result[i].attr){
-														if(attr[j].Type=='瀛楀吀' || attr[j].Type=='瀛楀吀-瀛楃涓�){
+														if(attr[j].Type=='瀛楀吀' || attr[j].Type=='瀛楀吀-瀛楃涓� || attr[j].Type=='瀛楀吀-鏁存暟'){
 															var dictItemList=[];
 															for(var d in result[i].choice_list){
 																var val =result[i].choice_list[d];
@@ -2427,7 +2648,7 @@
 		    									for (var l = 0; l < this.$data.subClassAttrList[a].Attr.length; l++) {
 		    										var ca = this.$data.subClassAttrList[a].Attr[l];
 		    										if (val[i].attr  == ca.Name) {
-		    											if(ca.Type=='瀛楀吀' || ca.Type=='瀛楀吀-瀛楃涓�){
+		    											if(ca.Type=='瀛楀吀' || ca.Type=='瀛楀吀-瀛楃涓� || ca.Type=='瀛楀吀-鏁存暟'){
 		    												var dictItemList=[];
 		    												for(var d in val[i].choice_list){
 		    													var val =val[i].choice_list[d];
@@ -2528,7 +2749,7 @@
 		    										var attr = $this.$data.subPanelList[s].subClassAttrList[c].Attr;
 													for (var j = 0; j < attr.length; j++) {
 														if(attr[j].Name==result[i].attr){
-															if(attr[j].Type=='瀛楀吀' || attr[j].Type=='瀛楀吀-瀛楃涓�){
+															if(attr[j].Type=='瀛楀吀' || attr[j].Type=='瀛楀吀-瀛楃涓� || attr[j].Type=='瀛楀吀-鏁存暟'){
 																var dictItemList=[];
 																for(var d in result[i].choice_list){
 																	var val =result[i].choice_list[d];
@@ -2570,12 +2791,26 @@
 		    			            }
 		    			        } else if (action.action_type == 'set_global_attr') {
 		    			            $this.$actiontr = action.value || [];
-		    			        } else if (action.action_type == 'add_subcls_panel') { //涓讳粠鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�+		    			        } else if (action.action_type == 'open_common_dlg') {  //鎵撳紑渚ф粦寮规
+									var $this = this;
+						            if(action.value.common_dlg_id == 'check_list'){
+									   $this.$data.check_list= action.value.config;
+									   if(action.value.config.appear_style == 'sideslip') //鍒ゆ柇鏄惁鏄晶婊�+											$this.$data.popupType = 'right';
+									   else
+											$this.$data.popupType = 'center'
+									   // open 鏂规硶浼犲叆鍙傛暟 绛夊悓鍦�uni-popup 缁勪欢涓婄粦瀹�type灞炴�
+									   $this.$refs.popup.open($this.$data.popupType);
+								    }
+						        } else if (action.action_type == 'add_subcls_panel') { //涓讳粠鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹� 		    			            var result = action.value;
+									var $this = this;
 									let list_1 = JSON.parse(JSON.stringify(this.$data.subClassAttrList));
 									var scanCodeVal = $this.$data.scanCodeVal;
-									if(info.inputParamter[0].attr=="mast_input_3037") //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�-										scanCodeVal = "mast_input_3037-"+ii;
+									if(info.inputParamter[0].attr){
+										if(info.inputParamter[0].attr=="mast_input_3037") //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�+											scanCodeVal = "mast_input_3037-"+ii;
+									}
 									$this.$data.subPanelList.push({
 										scanCodeVal:scanCodeVal,
 										subClassAttr:list_1
@@ -2615,6 +2850,7 @@
 										}
 									}
 		    			        }
+								
 		    			    }
 		    			}
 		    			
@@ -2672,7 +2908,8 @@
 		    },
 		    scan_OKDataObjRunCustomEvent(eventID){
 				uni.showLoading({
-					title:"鍔犺浇涓�.."
+					title:"鍔犺浇涓�..",
+					mask:true
 				});
 				var $this = this;
 				var req=[];
@@ -2688,7 +2925,7 @@
 							req.push({ attr: ar.Name, value: ar.ValID ?ar.ValID :'' });
 						else if(ar.Type=='甯冨皵鍊�)
 							req.push({ attr: ar.Name, value: ar.Value?'1':'0'});
-						else if(ar.Type=='瀛楀吀' || ar.Type=='瀛楀吀-瀛楃涓�){
+						else if(ar.Type=='瀛楀吀' || ar.Type=='瀛楀吀-瀛楃涓� || ar.Type=='瀛楀吀-鏁存暟'){
 							if(ar.select==true){ //鍒ゆ柇涓嬫媺鏄惁澶氶�
 								var valStr ="";
 								for(var v in ar.Value){
@@ -2727,7 +2964,7 @@
 								sub_req.push({ attr: ar.Name, value: ar.ValID ?ar.ValID :'' });
 							else if(ar.Type=='甯冨皵鍊�)
 								sub_req.push({ attr: ar.Name, value: ar.Value?'1':'0'});
-							else if(ar.Type=='瀛楀吀' || ar.Type=='瀛楀吀-瀛楃涓�){
+							else if(ar.Type=='瀛楀吀' || ar.Type=='瀛楀吀-瀛楃涓� || ar.Type=='瀛楀吀-鏁存暟'){
 								if(ar.select==true){ //鍒ゆ柇涓嬫媺鏄惁澶氶�
 									var valStr ="";
 									for(var v in ar.Value){

--
Gitblit v1.9.1