From 10158179b0044b3979c22c0b4eb3f903630f4a62 Mon Sep 17 00:00:00 2001
From: hdw <hdw@192.168.7.127>
Date: 星期二, 15 一月 2019 11:29:06 +0800
Subject: [PATCH] 修改电池信息配置的编辑和添加的电池品牌列表查询已有的

---
 /dev/null                                   |  236 -----------------------------------------------
 gx_tieta/WebRoot/iframe/batt-info-edit.html |    4 
 gx_tieta/WebRoot/iframe/batt-info-add.html  |    2 
 gx_tieta/WebRoot/pages/js/mylayui.js        |   36 +++++++
 4 files changed, 39 insertions(+), 239 deletions(-)

diff --git a/gx_tieta/WebRoot/iframe/batt-info-add.html b/gx_tieta/WebRoot/iframe/batt-info-add.html
index 34ebeec..b43ff93 100644
--- a/gx_tieta/WebRoot/iframe/batt-info-add.html
+++ b/gx_tieta/WebRoot/iframe/batt-info-add.html
@@ -406,7 +406,7 @@
 			var editInfo = parent.$('#iframeEdit').data('data');
 			var editPopupShow = parent.$('#iframeShowEidt');
 			var monCapStds = [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 1000];
-			var battProducers = ['鍦i槼', '鐞嗗+', '閾舵嘲', '鍗楅兘', '鍙岀櫥', 'SENRY', '鑹鹃粯鐢�', '绉戝+杈�', '涓版棩', '涓叴鑳芥淳', '鍏夊畤', '閮庤揪', '鑹捐鏂崕杈�', '闆勯煬', '椋庡竼', '鏂囬殕', '涓北'];
+			var battProducers = getBattProducers();
 			var monNums = [4, 24]
 			
 			// 娣诲姞瀹屾垚鍚庢彁绀轰俊鎭殑妯℃澘
diff --git a/gx_tieta/WebRoot/iframe/batt-info-edit.html b/gx_tieta/WebRoot/iframe/batt-info-edit.html
index 606ecc2..15838a1 100644
--- a/gx_tieta/WebRoot/iframe/batt-info-edit.html
+++ b/gx_tieta/WebRoot/iframe/batt-info-edit.html
@@ -484,7 +484,9 @@
 			</div>
 		</div>
 	</script>
+	<script type="text/javascript" src="../js/jquery-1.8.3.js"></script>
     <script type="text/javascript" src="../src/layui.js"></script>
+    <script type="text/javascript" src="../pages/js/mylayui.js"></script>
     <script  type="text/javascript">
         layui.use(['form', 'laytpl', 'jquery', 'element', 'laydate'], function() {
             var form = layui.form;
@@ -494,7 +496,7 @@
             var laydate = layui.laydate;
 			
 			var monCapStds = [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 1000];
-			var battProducers = ['鍦i槼', '鐞嗗+', '閾舵嘲', '鍗楅兘', '鍙岀櫥', 'SENRY', '鑹鹃粯鐢�', '绉戝+杈�', '涓版棩', '涓叴鑳芥淳', '鍏夊畤', '閮庤揪', '鑹捐鏂崕杈�', '闆勯煬', '椋庡竼', '鏂囬殕', '涓北'];
+			var battProducers = getBattProducers();
 			var monNums = [4, 24]
 			
             var battInfoTpl = $('#battInfoTpl').html();
diff --git a/gx_tieta/WebRoot/pages/js/mylayui.js b/gx_tieta/WebRoot/pages/js/mylayui.js
index 86ac70f..f78d1de 100644
--- a/gx_tieta/WebRoot/pages/js/mylayui.js
+++ b/gx_tieta/WebRoot/pages/js/mylayui.js
@@ -637,4 +637,38 @@
 		var str = this.mol+'/'+this.den;
 		this.ele.text(str)
 	}
-};
\ No newline at end of file
+};
+
+
+//鑾峰彇鐢垫睜鍝佺墝鍒楄〃
+function getBattProducers() {
+	let producers = [];
+	// 璇锋眰鍚庡彴鏌ヨ鐢垫睜鍝佺墝
+	$.ajax({
+		type: 'post'
+		,async: false
+		,url: 'BattInfAction!serchByBattProducer'
+		,data: null
+		,dataType: 'json'
+		,success: function(res) {
+			let rs = JSON.parse(res.result);
+			// 鍒ゆ柇鏌ヨ缁撴灉
+			if(rs.code == 1) {
+				let data = rs.data;
+				// 閬嶅巻鏌ヨ缁撴灉
+				for(let i=0; i<data.length; i++) {
+					let _data = data[i];
+					if(_data.BattProducer) {		// 澶勭悊涓虹┖鐨勫搧鐗�
+						producers.push(_data.BattProducer);
+					}
+				}
+				producers.push('鍏朵粬');
+			}
+		}
+		,complete: function() {
+			
+		}
+	});
+	
+	return producers;
+}
\ No newline at end of file
diff --git a/gx_tieta/WebRoot/zzlogin1.jsp b/gx_tieta/WebRoot/zzlogin1.jsp
deleted file mode 100644
index 3572c01..0000000
--- a/gx_tieta/WebRoot/zzlogin1.jsp
+++ /dev/null
@@ -1,236 +0,0 @@
-<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
-<%
-String path = request.getContextPath();
-String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
-%>
-<%@ taglib uri="/struts-tags" prefix="s" %>
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-<%
-		ServletContext context = getServletContext();
-        String serverInfo = context.getServerInfo();
-        System.out.println(serverInfo);
- %>
-<!DOCTYPE HTML123>
-<html>
-  <head>
-  	<!-- 榛樿浣跨敤鏈�楂樺唴鏍� -->
-	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" >
-    <base href="<%=basePath%>">
-    <title><s:text name="User_Login">dsadgghh</s:text></title>
-	<link href="css/basic.css" type="text/css" rel="stylesheet" />
-	<link href="css/login_style.css" type="text/css" rel="stylesheet" />	
-	<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
-	<script type="text/javascript" src="js/qrcode.js"></script>
-	<link rel="stylesheet" type="text/css" href="css/btools.css">	
-	</head>
-  
-  <body>
-	<!--澶撮儴鍐呭寮�濮�-->
-	<div id="top">
-		<div id="top_cont">
-			<img src="image/tieta-logo.gif" alt="" title="绂忓缓绂忓厜鏈夐檺鍏徃" />
-			<div class="international">
-				<c:choose>
-					<c:when test="${sessionScope.WW_TRANS_I18N_LOCALE eq 'en_US'}">
-						<a href="javascript:;" value="CH">绠�浣撲腑鏂�</a>
-						<span>|</span>
-						<a href="javascript:;" value="US"  class="inter_action">English</a>
-					</c:when>
-					<c:when test="${sessionScope.WW_TRANS_I18N_LOCALE != 'en_US'}">
-						<a href="javascript:;" value="CH" class="inter_action">绠�浣撲腑鏂�</a>
-						<span>|</span>
-						<a href="javascript:;" value="US">English</a>
-					</c:when>
-				</c:choose>
-				
-			</div>
-		</div>
-	</div>
-	<div id="main">
-		<div id="main_cont">
-			<div id="main_top">
-				<p><s:text name="User_Login"></s:text></p>
-			</div>
-			<form method="post" id="register">
-				<p id="user_t"><s:text name="Username"></s:text>锛�</p>
-				<i class="user-img"></i>
-				<input id="user" name="user" placeholder="<s:text name='Enter_username'/>" type="text"  autofocus/> <br />
-				<p id="password_t"><s:text name="Password"></s:text>锛�</p>
-				<i class="psd-img"></i>
-				<input id="password" name="password" placeholder="<s:text name='Enter_password'/>" type="password" /><br/> 
-				<input id="check" name="check" type="checkbox" alt="" /><span style="color:#909090;"><s:text name="Remember_password"></s:text></span><br>
-				<span id="msg"></span><br/> 
-				<input id="sub" type="button" value="<s:text name="Enter"/>"/>
-			</form>
-		</div>
-	</div>
-	<div class="bottom-tools">
-		<div class="qr-tool"></div>
-		<div class="qr-img">
-			<div class="qr-code"><a href="javascript:;"></a></div>
-		</div>
-	</div>
-	<div class="audioContainer">
-        <audio id="warnAudio" controls>
-            <source src="" type="audio/ogg"></source>
-            <source src="" type="audio/mpeg"></source>
-            <source src="" type="audio/wav"></source>
-        </audio>
-    </div>
-    <pre id="code"></pre>
-</body>
-<script type="text/javascript" src="js/base.js"></script>
-<script type="text/javascript">
-	var temp = {
-		price:105.20
-	};
-	console.info(temp);
-	
-	
-	var now = new Date();
-	
-	var test = new Date('2018-09-03 14:49:00');
-	console.info((now.getTime()-test.getTime())/1000);
-	
-	
-	var CMD_GETGPRSPARAM = 145;					//鍙戦�佸懡浠ょ粰gprs
-	var CMD_GETSTATIONSIGNAL = "CSQ";
-	
-	var CMD_GETDEVICETHREADINFO =	0x17;
-
-	var temp = {
-		num:CMD_GETDEVICETHREADINFO,
-		dev_id:910000001
-	};
-	console.info(JSON.stringify(temp));
-	SendDeviceThreadInfo(temp,function(data){
-		console.info(data);
-		    
-		 searchDeviceThreadInfo({dev_id:910000001});
-	});
-	
-	
-	//缁橤PRS鍙戦�佹寚瀹氱殑鍛戒护锛岃幏鍙朅T杩斿洖鍊�
-	function SendDeviceThreadInfo(param,callback){
-		$.ajax({ 	
-	        type:"post", 								
-	        url: "Bts_gprs_stateAction_action_update_bts_task_inf",						
-	        async:true,				
-	        dataType:'json',
-	        data:'json='+JSON.stringify(param),		
-	        success: function(data){ 
-				var model = eval('('+data.result+')');
-				console.info(model);
-				if(callback && typeof callback == 'function'){
-					callback(model);
-				}
-        	},error:function(e){
-        		var model = {
-        			code:0,
-        			data:e,
-        			msg:'閫氫俊澶辫触'
-        		};
-        		if(callback && typeof callback == 'function'){
-					callback(model);
-				}
-        	} 				
-		});
-	}
-	
-	//鏌ヨ璁惧鐨勮繘绋嬩俊鎭�
-	function searchDeviceThreadInfo(param,callback){
-		$.ajax({ 	
-	        type:"post", 								
-	        url: "Bts_gprs_stateAction_action_serchByCondition",						
-	        async:true,				
-	        dataType:'json',
-	        data:'json='+JSON.stringify(param),		
-	        success: function(data){ 
-				var model = eval('('+data.result+')');
-				console.info(model);
-				$('#code').text(model.data[0].bts_task_inf);
-				if(callback && typeof callback == 'function'){
-					callback(model);
-				}
-        	},error:function(e){
-        		var model = {
-        			code:0,
-        			data:e,
-        			msg:'閫氫俊澶辫触'
-        		};
-        		if(callback && typeof callback == 'function'){
-					callback(model);
-				}
-        	} 				
-		});
-	}
-	
-	
-	//缁橤PRS鍙戦�佹寚瀹氱殑鍛戒护锛岃幏鍙朅T杩斿洖鍊�
-	function searchStationSignal(param,callback){
-		$.ajax({ 	
-	        type:"post", 								
-	        url: "Bts_gprs_stateAction_action_update",						
-	        async:true,				
-	        dataType:'json',
-	        data:'json='+JSON.stringify(param),		
-	        success: function(data){ 
-				var model = eval('('+data.result+')');
-				console.info(model);
-				if(callback && typeof callback == 'function'){
-					callback(model);
-				}
-        	},error:function(e){
-        		var model = {
-        			code:0,
-        			data:e,
-        			msg:'閫氫俊澶辫触'
-        		};
-        		if(callback && typeof callback == 'function'){
-					callback(model);
-				}
-        	} 				
-		});
-	}
-	
-	
-	//鐢ㄦ埛瑕佽缃殑閰嶇疆椤�
-	var temp = {
-		echarts1_enable:0,
-		echarts2_enable:0,
-		echarts3_enable:0,
-		echarts4_enable:0,
-		echarts5_enable:0,
-		echarts6_enable:0,
-		echarts7_enable:0,
-		echarts8_enable:0,
-		echarts9_enable:0,
-		echarts10_enable:0
-	};
-	
-	//updateUserBieState(temp);
-	//鏌ヨ褰撳墠鐢ㄦ埛璁剧疆楗肩姸鍥剧殑浣胯兘鐘舵��
-	function updateUserBieState(temp){
-		$.ajax({ 	
-	        type:"post", 								
-	        url: "Echarts_usrAction!add",						
-	        async:true,				
-	        dataType:'json',
-	        data:'json='+JSON.stringify(temp),		
-	        success: function(data){ 
-				var model = eval('('+data.result+')');
-				console.info(model);
-        	} 				
-		});
-	}	
-	
-	
-	
-	function setWarnAudio(filename) {
-		var src = '../mediafiles/'+filename;
-        $('#warnAudio source').prop('src', src);
-        $('#warnAudio').get(0).load();
-        $('#warnAudio').get(0).play();
-    }
-</script>
-</html>

--
Gitblit v1.9.1