From 398be7e48387b49ac209dd5ed5fe7a135f268e5c Mon Sep 17 00:00:00 2001
From: 81041 <81041@DESKTOP-025NVD9>
Date: 星期五, 28 十二月 2018 17:38:35 +0800
Subject: [PATCH] Merge branch 'dev_lxw' of https://gitlab.com/whyclxw1/gx_tieta.git into dev_lxw

---
 gx_tieta/WebRoot/ele-param1.jsp |  113 ++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 73 insertions(+), 40 deletions(-)

diff --git a/gx_tieta/WebRoot/ele-param1.jsp b/gx_tieta/WebRoot/ele-param1.jsp
index 558ba33..7cd9197 100644
--- a/gx_tieta/WebRoot/ele-param1.jsp
+++ b/gx_tieta/WebRoot/ele-param1.jsp
@@ -90,7 +90,7 @@
                             	<div class="layui-form" lay-filter="homeFilter">
                             		<div class="layui-form-item">
                             			<div class="layui-input-block">
-                            				<select name="home" id="home" lay-filter="home">
+                            				<select name="home" id="home" lay-filter="home" lay-search="">
 												<option value="">璇烽�夋嫨鏈烘埧</option>
 											</select>
                             			</div>
@@ -485,14 +485,6 @@
 				function editBattGroup(obj) {
 					//console.log(obj);
 					searchHomeInfoByName(obj.data.StationName);
-					return;
-					$('#iframeEdit').data('data', obj.data);
-					iframePopup = layer.open({
-						type: 2
-						,area:['1200px', '520px']
-						,resize: false
-						,content: 'iframe/batt-info-edit.html'
-					});
 				}
 				
 				// 鏍规嵁鏈烘埧鐨勫悕绉版煡璇㈡満鎴跨殑淇℃伅
@@ -538,6 +530,16 @@
 				        					_tmp.BattGroupName = _data.BattGroupName;
 				        				}else if(key == 'BattGroupId') {	// 鐢垫睜缁処D
 				        					_tmp.BattGroupId = _data.BattGroupId;
+				        				}else if(key == 'MonCount') {		// 鍗曚綋鏁伴噺
+				        					_tmp.MonCount = _data.MonCount;
+				        				}else if(key == 'MonCapStd') {		// 鏍囩О瀹归噺
+				        					_tmp.MonCapStd = _data.MonCapStd;
+				        				}else if(key == 'MonVolStd') {		// 鍗曚綋鐢靛帇
+				        					_tmp.MonVolStd = _data.MonVolStd;
+				        				}else if(key == 'BattProducer') {	// 鐢垫睜鍝佺墝
+				        					_tmp.BattProducer = _data.BattProducer;
+				        				}else if(key == 'BattModel') {		// 鐢垫睜鍨嬪彿
+				        					_tmp.BattModel = _data.BattModel;
 				        				}else {
 				        					tmp[key] = _data[key];
 				        				}
@@ -550,6 +552,7 @@
 				        		$('#iframeEdit').data('data', tmp);
 								iframePopup = layer.open({
 									type: 2
+									,title: '淇敼鐢垫睜缁�'
 									,area:['1200px', '520px']
 									,resize: false
 									,content: 'iframe/batt-info-edit.html'
@@ -660,36 +663,67 @@
 					if(len) {
 						_rsData = tOptions.data[len-1];
 					}
-					 
-					// 鎵撳紑闈㈡澘璁剧疆鏂板缓鐢垫睜缁勪釜鏁�
-					layer.open({
-						type: 1
-						,title: '閫夋嫨鏂板缓鐢垫睜缁勪釜鏁�'
-						,content: addGroupContent
-						,fixed: true
-						,resize: false
-						,btn:['纭畾', '鍙栨秷']
-						,yes: function(index) {
-							var groupNum = $('#addGroupnum').val();
-							layer.close(index);
-							// 鐢熸垚鏁扮粍
-							var _arr = [];
-							for(var i=0; i<groupNum; i++) {
-								_arr.push(i+1);
+					getMaxDevId(function(id) {
+						// 鎵撳紑闈㈡澘璁剧疆鏂板缓鐢垫睜缁勪釜鏁�
+						layer.open({
+							type: 1
+							,title: '閫夋嫨鏂板缓鐢垫睜缁勪釜鏁�'
+							,content: addGroupContent
+							,fixed: true
+							,resize: false
+							,btn:['纭畾', '鍙栨秷']
+							,yes: function(index) {
+								var groupNum = $('#addGroupnum').val();
+								layer.close(index);
+								// 鐢熸垚鏁扮粍
+								var _arr = [];
+								for(var i=0; i<groupNum; i++) {
+									_arr.push(i+1);
+								}
+								
+								_rsData.addGroupNum = _arr;
+								_rsData.FBSDeviceId = id;
+								$('#iframeEdit').data('data', _rsData);
+								
+								iframePopup = layer.open({
+									type: 2
+									,title: '鏂板缓鐢垫睜缁�'
+									,area:['1200px', '520px']
+									,resize: false
+									,content: 'iframe/batt-info-add.html'
+								});
 							}
-							
-							_rsData.addGroupNum = _arr;
-							$('#iframeEdit').data('data', _rsData);
-							
-							iframePopup = layer.open({
-								type: 2
-								,area:['1200px', '520px']
-								,resize: false
-								,content: 'iframe/batt-info-add.html'
-							});
-						}
-					});
+						});
+					}); 
+					
 				});
+				
+				// 鑾峰彇鏈�澶ц澶噄d
+				function getMaxDevId(callback) {
+					var load = layer.load(1);
+					// 鏌ヨ鍚庡彴
+					$.ajax({
+						type: 'post'
+						,async: true
+						,url: 'BattInfAction!searchmaxdev_id'
+						,data:null
+						,dataType: 'json'
+						,success:function(res) {
+							var rs = JSON.parse(res.result);
+							if(rs.data.length != 0) {
+								if(isFunction(callback)) {
+									callback(rs.data);
+								}
+							}else {
+								layer.msg('璁$畻璁惧id澶辫触锛�')
+							}
+						}
+						,complete: function() {
+							layer.close(load);
+						}
+						
+					});
+				}
 				
 				
 				// 鏌ヨ鐢垫睜缁勪俊鎭�
@@ -767,7 +801,6 @@
 				
 				//棣栭〉
 				$('#page_home').click(function(){
-					alert(123);
 					if(Page != undefined){
 						if(Page.curr != 1){
 							Page.setCurr(1);
@@ -799,7 +832,7 @@
 				//灏鹃〉
 				$('#page_last').click(function(){
 					if(Page != undefined){
-						if(Page.pageCurr < Page.num){
+						if(Page.curr < Page.num){
 							Page.setCurr(Page.num);
 							search(createSearchParam(), true);
 						}
@@ -811,7 +844,7 @@
 					var value=$('#number').val();
 					//褰撹緭鍏ョ殑鏁板ぇ浜�0鏃�
 					if(value>0){
-						if(value != Page.pageSize){
+						if(value != Page.size){
 							Page.setSize(parseInt(value));
 							Page.setCurr(1);
 						}

--
Gitblit v1.9.1