From 4e01314d7af9b27128570a452da01fa9bfccc29d Mon Sep 17 00:00:00 2001
From: 81041 <81041@DESKTOP-025NVD9>
Date: 星期四, 27 十二月 2018 17:28:29 +0800
Subject: [PATCH] Merge branch 'dev_lxw' of https://whyclxw1@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw
---
gx_tieta/WebRoot/mobil/ele-param2.html | 8
gx_tieta/WebRoot/mobil/batt-approved1.html | 783 ++++++++++++++++++++++++++++++++
gx_tieta/WebRoot/mobil/auditDetail.html | 4
gx_tieta/WebRoot/mobil/batt-approve-index.html | 249 ++++++++++
gx_tieta/WebRoot/mobil/control.html | 2
gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit2.html | 151 +----
gx_tieta/WebRoot/mobil/batt-unapproved-index.html | 231 +++++++++
gx_tieta/WebRoot/batch-set-curr.jsp | 11
8 files changed, 1,304 insertions(+), 135 deletions(-)
diff --git a/gx_tieta/WebRoot/batch-set-curr.jsp b/gx_tieta/WebRoot/batch-set-curr.jsp
index 830c3f4..2be7f7a 100644
--- a/gx_tieta/WebRoot/batch-set-curr.jsp
+++ b/gx_tieta/WebRoot/batch-set-curr.jsp
@@ -404,26 +404,19 @@
,cellMinWidth: 80
,cols: [[
{type:'checkbox',fixed: 'left'}
- ,{field:'StationName', title:'鏈烘埧鍚嶇О', align:'center', width: 360}
+ ,{field:'StationName', title:'鏈烘埧鍚嶇О', align:'center', width: 470}
,{field:'FBSDeviceName', title:'FBS璁惧鍚嶇О', align:'center', width: 160}
,{field:'GroupIndexInFBSDevice', title:'FBS璁惧绱㈠紩', align:'center', width: 160}
+ ,{field:'StationName9', title:'璁惧鐗堟湰鍙�', align:'center', width: 160}
,{field:'BattGroupId', title:'鐢垫睜缁処D', align:'center', width: 160}
- ,{field:'BattGroupNum', title:'鏈烘埧鍐呯數姹犵粍缂栧彿', align:'center', width: 160}
,{field:'BattGroupName', title:'鐢垫睜缁勫悕绉�', align:'center', width: 160}
- ,{field:'FloatVolLevel', title:'娴厖鐢靛帇闃�鍊�', align:'center', width: 160}
- ,{field:'OfflineVolLevel', title:'绂荤嚎鐢靛帇闃�鍊�', align:'center', width: 160}
- ,{field:'BattFloatCurrent', title:'娴厖闃�鍊�', align:'center', width: 100}
,{field:'MonCount', title:'鍗曚綋鏁伴噺', align:'center', width: 100}
,{field:'MonCapStd', title:'鏍囩О瀹归噺', align:'center', width: 100}
,{field:'MonVolStd', title:'鏍囩О鍗曚綋鐢靛帇', align:'center', width: 140}
,{field:'MonResStd', title:'鏍囩О鍗曚綋鍐呴樆', align:'center', width: 140}
,{field:'MonSerStd', title:'鏍囩О鍗曚綋鐢靛', align:'center', width: 140}
- ,{field:'MonVolLowToAvg', title:'鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�', align:'center', width: 140}
,{field:'Load_curr', title:'璐熻浇鐢垫祦', align:'center', width: 140}
,{field:'DisCurrMax', title:'鏈�澶ф牳瀹圭數娴�', align:'center', width: 140}
- ,{field:'station_phone', title:'鍩虹珯鎵嬫満鍙风爜', align:'center', width: 140}
- ,{field:'BattProducer', title:'鐢垫睜鍝佺墝', align:'center', width: 140}
- ,{field:'BattModel', title:'鐢垫睜鍨嬪彿', align:'center', width: 260}
,{field:'doThings', fixed: 'right', title: '璁剧疆鐘舵��', toolbar: '#setStatus', align: 'center', width: 160}
]]
,data:[]
diff --git a/gx_tieta/WebRoot/mobil/auditDetail.html b/gx_tieta/WebRoot/mobil/auditDetail.html
index b85ab19..3994413 100644
--- a/gx_tieta/WebRoot/mobil/auditDetail.html
+++ b/gx_tieta/WebRoot/mobil/auditDetail.html
@@ -19,10 +19,10 @@
<div data-role="content">
<ul data-role="listview" data-inset="true">
<li>
- <a href="batt-approved.html" target="_top">宸查�氳繃鐢宠</a>
+ <a href="batt-approve-index.html" target="_top">宸查�氳繃鐢宠</a>
</li>
<li>
- <a href="batt-unapproved.html" target="_top">鏈�氳繃鐢宠</a>
+ <a href="batt-unapproved-index.html" target="_top">鏈�氳繃鐢宠</a>
</li>
</ul>
diff --git a/gx_tieta/WebRoot/mobil/batt-approve-index.html b/gx_tieta/WebRoot/mobil/batt-approve-index.html
new file mode 100644
index 0000000..fa21748
--- /dev/null
+++ b/gx_tieta/WebRoot/mobil/batt-approve-index.html
@@ -0,0 +1,249 @@
+<!doctype html>
+<html>
+<head>
+<meta charset="utf-8">
+<title></title>
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<link rel="stylesheet" href="mobilCss/jquery.mobile-1.4.5.min.css"/>
+<link rel="stylesheet" href="css/breadcrumb.css">
+<link rel="stylesheet" type="text/css" href="css/defined.popup.css"/>
+<script type="text/javascript" src="mobilJs/jquery-1.8.2.js"></script>
+<script type="text/javascript" src="mobilJs/jquery.mobile-1.4.5.min.js"></script>
+<script type="text/javascript" src="mobilJs/base.js"></script>
+</head>
+ <body>
+ <div data-role="page" tabindex="0" id="page0">
+ <div data-role="header" data-position="fixed">
+ <a href="index.html" target="_top" style="padding-top:0.7em;padding-bottom:0.7em;">杩斿洖</a>
+ <h1>宸插鎵归�氳繃鏈烘埧鍒楄〃</h1>
+ </div>
+
+ <div data-role="content">
+ <ul class="breadcrumb"></ul>
+ <div id="battList"></div>
+ </div>
+ <div data-role="popup" id="myPopup" class="defined-popup">
+ <div class="popup-container">
+ <div class="popup-title">鏌ヨ鏁版嵁澶辫触</div>
+ <div class="popup-content">
+ <div class="set-option">
+ <p>璇疯缃寘鏈虹粍</p>
+ </div>
+ </div>
+ <div class="popup-footer">
+ <div class="footer-float footer-left">
+ <button type="button" id="right" data-mini="true" style="visibility: hidden;">纭畾</button>
+ </div>
+ <div class="footer-float footer-right">
+ <button type="button" id="hidePopup" data-mini="true">鍙栨秷</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div data-role="footer" data-position="fixed">
+ <!-- <h1>绂忓厜鐢靛瓙鏈夐檺鍏徃</h1> -->
+ </div>
+ </div>
+ </body>
+ <script type="text/javascript" src="js/battNav.js"></script>
+ <script type="text/javascript">
+ var stationlist = new Array();
+
+ // 鍒濆鍖栭〉闈㈠唴瀹�
+ $(document).ready(function(){
+ setCookie("station",null);
+ setCookie("batt",null);
+ searchBattLife();
+ getnumber();//鏌ヨ鎵�鏈夌殑閫氳鎶�鏈苟鏀惧叆缂撳瓨銆�
+ });
+
+ // 鐐瑰嚮鏈烘埧浜嬩欢
+ $(function () {
+ var aLi = -1;
+ $('#battList').on('click', 'ul li', function () {
+ aLi = $(this).index();
+ console.info(aLi);
+ station = getbatt(stationlist,aLi);
+ var arr=setarrbatt(arrdata,station);
+ console.info(arr);
+ window.location.href="batt-approved1.html";
+ });
+ });
+
+ var arrTd = new Array();
+ var arrdata = new Array();
+
+ var Page = {
+ pageSize:20, //姣忛〉鐨勮鏁�
+ pageCurr:1, //褰撳墠椤电爜鏁�
+ pageAll:0,
+ };
+
+ function getcreatArr(){
+ obj = {
+ apply_en : 1,
+ binf : {
+ page:Page,
+ }
+ }
+ return obj;
+ }
+ function getnumber(){ //鍚戣幏鍙栨墍鏈夐�氳璁℃暟骞跺瓨鍏ョ紦瀛�
+ $.ajax({
+ type: 'post',
+ async: true,
+ url: 'Battinf_applyAction!devCommNum',
+ data: null,
+ dataType: 'json',
+ success:function(data) {
+ data = JSON.parse(data.result);
+ if(data.code==1){
+ console.info(data.data);
+ var json =JSON.stringify(data.data);
+ setCookie("numberget",json);
+ //return data.data;
+ }
+ }
+ });
+ }
+ // 鏌ヨ鍐呭
+ function searchBattLife(){
+ var temp = JSON.stringify(getcreatArr());
+ console.info(temp);
+ arrTd = new Array();
+ var index = 0;
+ $.ajax({
+ type: 'post',
+ async: true,
+ url: 'Battinf_applyAction!serchByInfo',
+ data: "json="+temp,
+ dataType: 'json',
+ success:function(data) {
+ data = JSON.parse(data.result);
+ if(data.code!=0&&data.data.length>0){
+ data=data.data
+ var model = new Array();
+ console.info(data);
+ for(var i=0;i<data.length;i++){
+ arrdata.push(data[i]);//瀛樺偍鏁版嵁
+ if(model.length==0){
+ model.push(data[i].binf.StationName);
+ }else{
+ if(model[model.length-1]!=data[i].binf.StationName){
+ model.push(data[i].binf.StationName);
+ }
+ }
+ console.info(model);
+ stationlist=model;
+ }
+ createUl($('#battList'),model);
+ }
+
+ }
+ });
+ }
+
+ function setarrbatt(arrdata,station){
+ console.info(arrdata);
+ if(arrdata.length>0){ //瀛樺叆鐨勪负鎵�鏈夊凡鏌ュ嚭鏁版嵁
+ var arr= creatYanshouObj(arrdata,station);//鐢宠楠屾敹鏂规硶銆�
+ return arr;
+ }else{
+ alert("璇风瓑寰呭嚑绉掑悗鍐嶆彁浜ょ敵璇�");
+ }
+ }
+ function creatYanshouObj(arrdata,station){ //閫氳繃鐐瑰嚮鏈烘埧淇℃伅锛坰tationid锛夛紝鑾峰彇璇ユ満鎴跨數姹犵粍
+ //var StationId = arrdata[index].binf.StationId;
+ //console.info(StationId);
+ var arr = new Array(); //鍒濆鍖栦紶鍙傛暟缁�
+ console.info(station);
+ console.info(arrdata);
+ for(var i=0;i<arrdata.length;i++){//涓�娆¢獙鏀惰鏈烘埧涓嬬殑鎵�鏈夌數姹犵粍鏋勫缓瀵硅薄 銆�
+ if(station == arrdata[i].binf.StationName){
+ var obj = {
+ num :arrdata[i].num,
+ check_en:arrdata[i].check_en,
+ binf:{
+ StationId : arrdata[i].binf.StationId, // 鏈烘埧缂栧彿
+ StationName : (arrdata[i].binf.StationName1+"-"+ arrdata[i].binf.StationName2+"-"+arrdata[i].binf.StationName5+"-"+arrdata[i].binf.StationName3), // 鎷兼帴鏈烘埧鍚嶇О
+ StationName1 :arrdata[i].binf.StationName1, // 鐪�
+ StationName2 : arrdata[i].binf.StationName2, // 甯�
+ StationName5 : arrdata[i].binf.StationName5, // 鍖�/鍘�
+ StationName3 : arrdata[i].binf.StationName3, // 鏈烘埧鍚嶇О
+ StationName4 : arrdata[i].binf.StationName4, // 璁惧鍚嶇О
+ StationIp :arrdata[i].binf.StationIp, //鏈烘埧ip
+ FBSDeviceId : arrdata[i].binf.FBSDeviceId, //璁惧id
+ FbsDeviceIp : arrdata[i].binf.FbsDeviceIp, //璁惧ip
+ FbsDeviceIp_YM : arrdata[i].binf.FbsDeviceIp_YM, // 璁惧鎺╃爜
+ FbsDeviceIp_WG : arrdata[i].binf.FbsDeviceIp_WG , // 缃戝叧
+ FBSDeviceName : arrdata[i].binf.FBSDeviceName, //璁惧鍚嶇О
+ GroupIndexInFBSDevice : arrdata[i].binf.GroupIndexInFBSDevice, //fbs璁惧绱㈠紩
+ BattGroupId : arrdata[i].binf.BattGroupId, //鐢垫睜缁刬d
+ BattGroupNum : arrdata[i].binf.BattGroupNum , //鏈烘埧鍐呯數姹犵粍缂栧彿
+ BattGroupName :arrdata[i].binf.BattGroupName, //鐢垫睜缁勭储寮�
+ FloatVolLevel : arrdata[i].binf.FloatVolLevel, //娴厖鐢靛帇闃�鍊�
+ OfflineVolLevel : arrdata[i].binf.OfflineVolLevel, //绂荤嚎鐢靛帇闃�鍊�
+ BattFloatCurrent : arrdata[i].binf.BattFloatCurrent, //娴厖鐢垫祦闃�鍊�
+ MonCount : arrdata[i].binf.MonCount, //鍗曚綋鏁伴噺
+ MonCapStd : arrdata[i].binf.MonCapStd, //鏍囩О瀹归噺
+ MonVolStd : arrdata[i].binf.MonVolStd, //鏍囩О鐢靛帇
+ MonResStd : arrdata[i].binf.MonResStd, //鏍囩О鍐呴樆
+ MonSerStd : arrdata[i].binf.MonSerStd, //鏍囩О鐢靛
+ MonVolLowToAvg : arrdata[i].binf.MonVolLowToAvg, //鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�
+
+ Load_curr : arrdata[i].binf.Load_curr, //璐熻浇鐢垫祦
+ DisCurrMax : arrdata[i].binf.DisCurrMax, //鏈�澶ф牳瀹圭數娴�
+ station_phone : arrdata[i].binf.station_phone, //鍩虹珯鍙风爜
+
+ BattProducer : arrdata[i].binf.BattProducer, //鐢垫睜鍝佺墝
+ BattModel : arrdata[i].binf.BattModel, //鐢垫睜鍨嬪彿
+ BattProductDate : arrdata[i].binf.BattProductDate, //鐢垫睜鐢熶骇鏃ユ湡
+ BattInUseDate : arrdata[i].binf.BattInUseDate, //鐢垫睜浣跨敤鏃ユ湡
+ install_user : arrdata[i].binf.install_user, //瀹夎浜哄憳
+ }
+
+ }
+ arr.push(obj);
+ }
+ }
+ console.info(arr);
+ //applyendyanshou(arr);//鐢宠楠屾敹鏂规硶銆�
+ var json=window.JSON.stringify(arr);
+ setCookie("eleparm1",json); //杩欓噷setcookie,鑻ユ湁涓婁竴鏉ookie鍒欐竻绌轰笂涓�绗�
+ return arr;
+ }
+
+ function createUl(ulCon, dataList) {
+ //console.info(index);
+ // 娓呯悊瀹瑰櫒涓嬬殑ul
+ ulCon.find('ul').remove();
+
+ // 鍒涘缓ul
+ var _ul = $('<ul data-role="listview" data-inset="true"></ul>');
+
+ // 閬嶅巻dataList鐢熸垚li鍜宎
+ for (var i = 0; i < dataList.length; i++){
+ var _li = $('<li></li');
+
+ var _a = $('<a href="#page1" value="" data-transition="slide">'+dataList[i]+'</a>');
+
+ // 灏哶a娣诲姞鍒癬li锛屽皢_li娣诲姞鍒癬ul涓�
+ _li.append(_a);
+ _ul.append(_li);
+ }
+
+ // 灏哶ul娣诲姞鍒板鍣ㄤ腑
+ ulCon.append(_ul).trigger('create');
+ loadclose();
+ }
+
+ //鑾峰彇褰撳墠閫変腑鐨刡att
+ function getbatt(arr,index){
+ if(arr.length>index){
+ return arr[index];
+ }
+ return undefined;
+ };
+ </script>
+
+</html>
\ No newline at end of file
diff --git a/gx_tieta/WebRoot/mobil/batt-approved1.html b/gx_tieta/WebRoot/mobil/batt-approved1.html
new file mode 100644
index 0000000..a52b1a0
--- /dev/null
+++ b/gx_tieta/WebRoot/mobil/batt-approved1.html
@@ -0,0 +1,783 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>宸插鎵归�氳繃鐢垫満鎴胯鎯�</title>
+ <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0,user-scalable=0">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
+ <link rel="stylesheet" href="mobilCss/jquery.mobile-1.4.5.min.css"/>
+ <link rel="stylesheet" type="text/css" href="css/tbl.css">
+ <link rel="stylesheet" type="text/css" href="src/css/layui.css">
+ <script type="text/javascript" src="mobilJs/jquery-1.8.2.js"></script>
+ <script type="text/javascript" src="js/tbl.js"></script>
+ <script type="text/javascript" src="mobilJs/base.js"></script>
+ <script type="text/javascript" src="mobilJs/jquery.mobile-1.4.5.min.js"></script>
+ <style type="text/css">
+ input{-webkit-appearance: none;}
+ table {
+ margin-top:.5em;
+ border-collapse:separate;
+ border-spacing:0 .5em;
+ }
+
+ tbody tr td{
+ overflow: hidden;
+ text-overflow:ellipsis;
+ white-space: nowrap;
+ }
+ .uncheck{
+ background-color: #dddddd38!important;
+ color: #bdbdbdc4!important;
+ }
+ .ui-btn-icon-right {
+ padding-right: 8.5em;
+ }
+ .hbg{
+ background-color:#ddd9;
+ }
+ #battdata {
+ background-color:#dddddd54
+ }
+ .ui-select .ui-btn select{
+ width:77%;
+ }
+ .ptr0{
+ position: absolute;
+ top: 0;
+ right: 0;
+ margin:0!important;
+ }
+
+ </style>
+ <link rel="stylesheet" href="css/fgpanel.css">
+</head>
+<body>
+ <div data-role="page">
+
+ <!-- 澶撮儴鍐呭 -->
+ <div data-role="header" data-position="fixed">
+ <a href="batt-approve-index.html" target="_top" class="ui-btn ui-corner-all ui-shadow ui-icon-back ui-btn-icon-left" style="padding-top: 0.7em; padding-bottom: 0.7em;">杩斿洖</a>
+ <h1>宸插鎵归�氳繃鏈烘埧璇︽儏</h1>
+ <fieldset data-role="controlgroup" class="ptr0" >
+ </fieldset>
+
+ </div>
+ <!-- 涓讳綋鍐呭 -->
+ <div data-role="main">
+ <!-- <div class="set-option"> -->
+ <table class="layout-set">
+ <tbody>
+ <tr>
+ <td>鏈烘埧缂栧彿</td>
+ <td>
+ <input type="text" id="StationId" class="unable" data-mini="true" onfocus="this.blur()"/>
+ </td>
+ </tr>
+ <tr>
+ <td>FBS璁惧ID(閲嶈)</td>
+ <td>
+ <input type="text" id="FBSDeviceId" class="unable" data-mini="true" onfocus="this.blur()"/>
+ </td>
+ </tr>
+ <tr>
+ <td>FBS璁惧IP(閲嶈)</td>
+ <td>
+ <input type="text" id="FbsDeviceIp" class="unable" data-mini="true" onfocus="this.blur()" />
+ </td>
+ </tr>
+ <tr>
+ <td>鐢垫睜缁処D</td>
+ <td>
+ <input type="text" readonly unselectable="on" value="123"class="unable" id="BattGroupId" class="uncheck" data-mini="true" onfocus="this.blur()" />
+ </td>
+ </tr>
+ <tr>
+ <td>鐪�</td>
+ <td>
+ <input type="text" id="mainteArea" class="unable" data-mini="true" onfocus="this.blur()"/>
+ </td>
+ </tr>
+ <tr>
+ <td>鍩庡競</td>
+ <td>
+ <input type="text" id="city" class="unable" data-mini="true" onfocus="this.blur()"/>
+ </td>
+ </tr>
+ <tr>
+ <td>鍖哄幙</td>
+ <td>
+ <input type="text" id="country" class="unable" data-mini="true" onfocus="this.blur()"/>
+ </td>
+ </tr>
+ <tr>
+ <td>鏈烘埧鍚嶇О</td>
+ <td>
+ <input type="text" id="homeName" class="unable" data-mini="true">
+ </td>
+ </tr>
+
+ <input type="hidden" id="StationName4" data-mini="true" />
+
+ <input type="hidden" id="StationIp" data-mini="true" />
+
+ <input type="hidden" id="FbsDeviceIp_YM" class="unable" data-mini="true" value="456"/>
+
+ <input type="hidden" id="FbsDeviceIp_WG" class="unable" data-mini="true" value="456"/>
+
+ <input type="hidden" id="FBSDeviceName" data-mini="true" />
+
+ <input type="hidden" readonly unselectable="on" value="123" id="BattGroupNum" class="unable" class="uncheck" data-mini="true" />
+
+ <input type="hidden" id="FloatVolLevel" data-mini="true" />
+
+ <input type="hidden" id="OfflineVolLevel" class="unable" data-mini="true" />
+
+ <input type="hidden" id="BattFloatCurrent" class="unable" data-mini="true" />
+
+ <input type="hidden" id="MonResStd" data-mini="true" />
+
+ <input type="hidden" id="MonSerStd" data-mini="true" />
+
+ <input type="hidden" id="MonVolLowToAvg" data-mini="true" />
+
+ <tr>
+ <td>*璐熻浇鐢垫祦(A)</td>
+ <td>
+ <input type="text" id="Load_curr" class="unable" data-mini="true" />
+ </td>
+ </tr>
+ <input type="hidden" id="DisCurrMax" class="unable" data-mini="true" />
+
+ <tr>
+ <td>鍩虹珯鐢佃瘽鍙风爜</td>
+ <td>
+ <input type="text" id="station_phone" class="unable" data-mini="true" />
+ </td>
+ </tr>
+
+ <input id="startTestrecord" type="hidden" name="appDate" class="appDatefir" value="2000-01-01" />
+
+ <input id="endTestrecord" type="hidden" name="appDate" class="appDatesec" value="2017-01-01" />
+
+ <tr>
+ <td>*瀹夎浜哄憳</td>
+ <td>
+ <input type="text" id="install_user" class="unable" data-mini="true" />
+ </td>
+ </tr>
+
+ <tr>
+ <td>*閫氳璁℃暟</td>
+ <td>
+ <input type="text" id="tongxunnumber" class="unable" data-mini="true" />
+ </td>
+ </tr>
+
+ <tr>
+ <td>*涓㈠寘鐜�</td>
+ <td>
+ <input type="text" id="diubaonumber" class="unable" data-mini="true" />
+ </td>
+ </tr>
+
+ <tr>
+ <td>*鏄惁楠屾敹</td>
+ <td>
+ <input type="text" id="check_en" class="unable" data-mini="true" />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <!-- </div> -->
+ <div id="battdata">
+ <!-- <div>
+ <h1 class="hbg">鐢垫睜缁�1</h1>
+ <table class="layout-set">
+ <tbody>
+ <tr>
+ <td>璁惧绱㈠紩</td>
+ <td>
+ <fieldset data-role="controlgroup" data-type="horizontal">
+ <select>
+ <option value="">0</option>
+ <option value="mon">1</option>
+ <option value="mon">2</option>
+ <option value="mon">3</option>
+
+ </select>
+ </fieldset>
+ </td>
+ </tr>
+ <tr>
+ <td>鐢垫睜缁勫悕绉�</td>
+ <td><input type="text" id="" data-mini="true" /></td>
+ </tr>
+ </tbody>
+ </table>
+ </div> -->
+ </div>
+
+
+ </div>
+
+ <div data-role="footer" data-position="fixed" data-theme="a">
+ <div data-role="navbar">
+ <ul>
+ <li><a href="" id="applyyanshou"class="ui-btn ui-btn-inline ui-corner-all operat-but ui-btn-icon-check" data-position-to="window" data-icon="check" data-role="button">鐢宠楠屾敹</a></li>
+ <li><a href="#yourPopup" id="shishishuju" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but ui-btn-icon-check" data-position-to="window" data-icon="delete" data-role="button">瀹炴椂鏁版嵁</a></li>
+ </ul>
+ </div>
+ </div>
+ <div data-role="popup" id="yourPopup" class="ui-content" data-overlay-theme="b">
+ <a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn ui-icon-delete ui-btn-icon-notext ui-btn-right">鍏抽棴</a>
+ <h1>閫夋嫨鏌ョ湅鐢垫睜缁�</h1>
+ <fieldset data-role="controlgroup" >
+ <select id="newbattnum" data-mini="true">
+ <option value="1">鐢垫睜缁�1</option>
+
+ </select>
+ </fieldset>
+
+ <div data-role="controlgroup" data-type="horizontal" class="mt6">
+ <a href="" id="sure" class="ui-btn ui-corner-all ui-shadow ui-btn-icon-left ui-icon-check pl5" >纭畾</a>
+ <a href="" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-icon-left ui-icon-delete pl5" >鍙栨秷</a>
+ </div>
+ </div>
+ <div data-role="popup" id="yourPopup" class="ui-content" data-overlay-theme="b">
+ <a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn ui-icon-delete ui-btn-icon-notext ui-btn-right">鍏抽棴</a>
+ <a href="" data-rel="back" id="sure" class="ui-btn ui-corner-all ui-shadow ui-btn-icon-left ui-icon-check" >鎻愪氦</a>
+ <a href="" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-icon-left ui-icon-delete" >鏀惧純</a>
+ </div>
+ </div>
+ <!-- 瀛樺偍homeinfo鐨勫�� -->
+ <div id="homeInfoIframe"></div>
+ <div id="homeInfoIframeAll"></div>
+</body>
+
+<script type="text/javascript" src="src/layui.all.js"></script>
+<script type="text/javascript">
+ function creatAllView(num){
+ var allString=''
+ ,i=0;
+ if(num>4){return false}
+ for(i=0;i<num;i++){
+ allString+=creatBattView(i);
+ }
+ return $("#battdata").html(allString);
+ }
+
+ function battnumber(){
+ var selected=''
+ for(var i=1;i<=temp.length;i++){
+ selected+= '<option '+'value='+i+'>'+"鐢垫睜缁�"+i+'</option>';
+ }
+ return $('#newbattnum').html(selected);
+ }
+
+ function creatBattView(index){
+ var count=index+1
+ ,battTitle='<div>'+'<h1 class="hbg">'+'鐢垫睜缁�'+count+'</h1>'+
+ '<table class="layout-set">'+'<tbody>'+'<tr>'+'<td>'+'鐢垫睜鍝佺墝'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" data-type="horizontal" >'+'<select '+'id='+'battproducer'+index+' class="unable" '+'>'
+ ,battBrand=selectedIndex(index)+'</select>'+'</fieldset>'+'</td>'+'</tr>'
+ ,battType='<tr>'+'<td>'+'鐢垫睜鍨嬪彿'+'</td>'+'<td>'+'<input type="text" '+' class="unable" '+'id='+'batttype'+index+' data-mini="true"'+'value='+'鐢垫睜鍨嬪彿'+count+' />'+'</td>'+'</tr>'
+ ,battNum='<tr>'+'<td>'+'*鍗曚綋鏁伴噺'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" data-type="horizontal">'+'<select '+ 'id='+'MonCount'+index+' class="unable" '+'>'
+ ,battNumOpt=selectedNum(index)+'</select>'+'</fieldset>'+'</td>'+'</tr>'
+ ,MonVolStd='<tr>'+'<td>'+'*鏍囩О鍗曚綋鐢靛帇(V)'+'</td>'+'<td>'+'<input type="text" '+'id='+'MonVolStd'+index+' data-mini="true"'+' class="unable" '+'/>'+'</td>'+'</tr>'
+ ,nomCap='<tr>'+'<td>'+'*鏍囩О瀹归噺(AH)'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" >'+'<select '+'id='+'MonCapStd'+index+' data-mini="true"'+' class="unable" '+'>'+creatMonCapOpt(index)+'</select>'
+ +'</fieldset>'+'</td>'+'</tr>'
+ ,battIndex='<tr>'+'<input type="hidden" '+'id='+'battindex'+index+' data-mini="true"'+'value='+count+' class="unable" '+' />'+'</tr>'
+ ,battName='<tr>'+'<input type="hidden" '+'id='+'battname'+index+' data-mini="true"'+'value='+'鐢垫睜缁�'+count+' class="unable" '+' />'+'</tr>'+'</tbody>'+'</table>'+'</div>';
+ return battTitle+battBrand+battType+battNum+battNumOpt+MonVolStd+nomCap+battIndex+battName;
+ }
+ function selectedNum(index){
+ var selected='';
+ if(temp[index].binf.MonCount==4){
+ return selected='<option '+'value='+4+' selected=selected' +'>'+'4 涓�'+'</option>'+'<option '+'value='+24 +'>'+'24涓�'+'</option>';
+ }else{
+ return selected='<option '+'value='+24+' selected=selected' +'>'+'24 涓�'+'</option>'+'<option '+'value='+4 +'>'+'4涓�'+'</option>';
+ }
+ }
+
+ function selectedIndex(index){
+ var selected='',
+ i=0;
+ var battproducer = ["鐞嗗+","鍦i槼","鍙岀櫥","SENRY","鍗楅兘","鐖遍粯鐢�","绉戝+杈�","閾舵嘲","涓版棩","涓叴鑳芥淳","鍏夊畤",
+ "鑹捐鏂崕杈�","闆勯煬","椋庡竼","鏂囬殕","涓北"];
+ selected+= '<option '+'value='+temp[index].binf.BattProducer+'>'+temp[index].binf.BattProducer+'</option>';
+ for(var i=0;i<battproducer.length;i++){
+ if(temp[index].binf.BattProducer!=battproducer[i]){
+ selected+= '<option '+'value='+battproducer[i]+'>'+battproducer[i]+'</option>';
+ }
+ }
+ return selected;
+ }
+ var temp = getCookie("eleparm1");
+ temp=JSON.parse(temp);
+ var arr = temp;
+
+ function setcookieCreat(i){
+ var index=Math.ceil(i-1);
+ arrdata = temp[index].binf;
+ //console.info(index);
+ //console.info(temp);
+ console.info(arrdata);
+ var json = JSON.stringify(arrdata);
+ setCookie("batt",json);
+ window.location.href="control.html";
+ }
+ // 鐐瑰嚮鐢宠楠屾敹鏄剧ず闈㈡澘
+ $("#applyyanshou").on('click',function(){
+ console.info(temp);
+ if(temp.length == 0) {
+ layer.msg('鑾峰彇鏁版嵁澶辫触锛侊紒');
+ return ;
+ }
+
+ // 瀛樺偍鎵�鏈夌殑鏁版嵁
+ $('#homeInfoIframeAll').data('allData', temp);
+ var _data = temp[0];
+ var _temp = {
+ homeId: _data.binf.StationId
+ ,homeName: _data.binf.StationName
+ ,addr: ''
+ ,lng: 0
+ ,lat: 0
+ }
+
+ // 瀛樺偍闇�瑕佺殑homeInfo淇℃伅
+ $('#homeInfoIframe').data('homeInfo', _temp);
+
+ iframePopup = layer.open({
+ type: 2
+ ,closeBtn: 0
+ ,title: false
+ ,area: ['100%', '100%']
+ ,full: true
+ ,anim: 4
+ ,content: 'iframe/homeinfo1.html'
+ });
+ layer.full(iframePopup);
+ })
+ var tempgroupid = new Array() ;
+ for(var i=0;i<temp.length;i++){
+ tempgroupid.push(temp[i].binf.BattGroupId);
+ }
+ console.info(tempgroupid);//鐢垫睜缁� ID 鏁扮粍锛岋紙鑻ユ坊鍔狅紝鍒欓渶瑕佹柊寤猴級;
+ var addbattnum = temp.length;//娣诲姞鐢垫睜缁勬暟鐩鏁�
+ var moncount = 0;
+ var fuchongfazhi = [0,0,0,0];
+ var lixiandianyafazhi = [0,0,0,0];
+ battnumber();
+ $(function(){
+ creatAllView(temp.length).trigger('create');
+ setMonVolStd(temp.length);
+ });
+
+ $(function () {
+ //setTimes($("#startTestrecord"),'2000-01-01');
+ //setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd'));
+
+ installstartdata(temp);
+ });
+
+ function creatgroupid(){
+ var dev_id ='';
+ $.ajax({
+ type: 'post'
+ ,async: true
+ ,url: 'BattInfAction!searchmaxdev_id'
+ ,data: null
+ ,dataType: 'json'
+ ,success:function(res) {
+ console.info(res);
+ var data = JSON.parse(res.result);
+ console.info(data);
+ if(data.length!=0){
+ data = data.data;
+ dev_id = data;
+ //console.info(dev_id);
+ document.getElementById("FBSDeviceId").value = dev_id;
+ var ip = getDevIp(dev_id);
+ //console.info(ip);
+ document.getElementById("FbsDeviceIp").value = ip;
+ }else{
+ alert("groupid鐢熸垚澶辫触");
+ }
+ }
+
+ });
+ }
+ // 鏍规嵁璁惧id璁$畻璁惧ip
+ function getDevIp(dev_id) {
+ var ptn = /^91([0-9]{7})$/;
+ var ip = '';
+ console.info(dev_id);
+ if(ptn.test(dev_id)) {
+ var value = Number(RegExp.$1);
+ // console.log(value);
+ var intNum = prefixInteger(Math.floor(value/256), 3);
+ var resNum = prefixInteger(value%256, 3);
+ ip = '127.000.'+intNum+'.'+resNum;
+ }else {
+ ip = '璁惧ID鏍煎紡涓嶆纭�';
+ }
+ console.info(ip);
+ return ip;
+ }
+
+ function applyendyanshou(arr){ //鐢宠楠屾敹
+ var temp = JSON.stringify(arr);
+ $.ajax({ //鐢宠楠屾敹
+ type: 'post',
+ async: true,
+ url: 'Battinf_applyAction!checkPro',
+ data: "json="+temp,
+ dataType: 'json',
+ success:function(data) {
+ console.info(data);
+ data = JSON.parse(data.result);
+ if(data.code==1){
+ alert("鐢宠楠屾敹鎴愬姛");
+ }
+ }
+ });
+
+ }
+ // 璁剧疆娴厖鐢靛帇闃�鍊�/璁剧疆绂荤嚎鐢靛帇闃�鍊� //
+ function setFloatAndoutLine(index) {
+ var monvolstd = "#MonVolStd"+index;
+ var MonCount = "#MonCount" +index;
+ var vol = $(monvolstd).val();
+ var monnum = $(MonCount).val();
+ var chargeVol = (vol*1.117*monnum).toFixed(1); // 娴厖鐢靛帇闃�鍊�
+ var outlineVol = (vol*1.073*monnum).toFixed(1); // 绂荤嚎鐢靛帇闃�鍊�
+
+ //$('#BattFloatCurrent').val(chargeVol); // 娴厖鐢靛帇闃�鍊�
+ //$('#OfflineVolLevel').val(outlineVol); // 绂荤嚎鐢靛帇闃�鍊�
+ fuchongfazhi[index] = chargeVol;
+ lixiandianyafazhi[index] = outlineVol;
+ console.info(vol);
+ }
+
+
+ function prefixInteger(num, length) {
+ return (num/Math.pow(3,length)).toFixed(length).substr(2);
+ }
+
+ //瀵煎叆琛ㄦ牸榛樿鏁版嵁
+ function installstartdata(temp){
+ data=temp[0].binf;
+ setMonVolStd(temp.length);
+ document.getElementById("StationId").value = data.StationId;
+ document.getElementById("mainteArea").value = data.StationName1;
+ document.getElementById("city").value = data.StationName2; //甯�
+ document.getElementById("country").value = data.StationName5; //鍖哄幙
+ document.getElementById("homeName").value = data.StationName3; //鏈烘埧鍚嶇О
+ document.getElementById("StationName4").value = data.StationName4; //璁惧鍚嶇О
+ document.getElementById("StationIp").value = data.StationIp; //璁惧IP
+ document.getElementById("FBSDeviceId").value = data.FBSDeviceId;
+ document.getElementById("FbsDeviceIp").value = data.FbsDeviceIp;
+ document.getElementById("FbsDeviceIp_YM").value = data.FbsDeviceIp_YM;
+ document.getElementById("FbsDeviceIp_WG").value = data.FbsDeviceIp_WG;
+ document.getElementById("FBSDeviceName").value = data.FBSDeviceName;
+ //document.getElementById("GroupIndexInFBSDevice").value = temp[12];
+ document.getElementById("BattGroupId").value = data.BattGroupId;
+ document.getElementById("BattGroupNum").value = data.BattGroupNum;
+ //document.getElementById("BattGroupName").value = temp[15];
+ document.getElementById("FloatVolLevel").value = data.FloatVolLevel;
+ document.getElementById("OfflineVolLevel").value = data.OfflineVolLevel;
+ document.getElementById("BattFloatCurrent").value = data.BattFloatCurrent;
+ //document.getElementById("MonCount").value = data.MonCount;
+ //document.getElementById("MonCapStd").value = data.MonCapStd;
+
+ document.getElementById("MonResStd").value = data.MonResStd;
+ document.getElementById("MonSerStd").value = data.MonSerStd;
+ document.getElementById("MonVolLowToAvg").value = data.MonVolLowToAvg;
+ document.getElementById("Load_curr").value = data.Load_curr;
+ document.getElementById("DisCurrMax").value = data.DisCurrMax;
+ document.getElementById("station_phone").value = data.station_phone;
+ //document.getElementById("BattProducer").value = data.BattProducer;
+ //document.getElementById("BattModel").value = data.BattModel;
+ document.getElementById("startTestrecord").value = data.BattProductDate;
+ document.getElementById("endTestrecord").value = data.BattInUseDate;
+ //setTimes($("#startTestrecord"),data.productDate);
+ //setTimes($("#endTestrecord"),data.useDate);
+ document.getElementById("install_user").value = data.install_user;
+ document.getElementById("tongxunnumber").value = getCookienumber(data.StationId);
+ document.getElementById("diubaonumber").value = getCookiediubao(data.StationId)
+
+ for(var i=0;i<temp.length;i++){
+ data=temp[i];
+ document.getElementById("check_en").value = yanshou(data.check_en);
+ document.getElementById("MonCapStd"+i).value = data.binf.MonCapStd;
+ document.getElementById("MonVolStd"+i).value = data.binf.MonVolStd;
+ //console.info(data.MonCount);
+ $("#MonCount"+i).find("option:selected").val(data.binf.MonCount);
+ var battString = "#battname"+i;
+ var battModel = "#batttype"+i;
+ var battproducer = "#battproducer"+i
+ //var battproducer ="#battproducer"+i;
+ $(battString).val(data.binf.BattGroupName);
+ $(battModel).val(data.binf.BattModel);
+ $(battproducer).val(data.binf.BattProducer);
+ console.info($(battproducer).val());
+ }
+ }
+
+ function getCookienumber(id){//杈撳叆ID锛岃繑鍥為�氳璁℃暟銆傛暟鎹粠缂撳瓨鑾峰彇銆�
+ //var a = getnumber();
+ //console.info(a);
+ if(getCookie("numberget")){
+ var number = getCookie("numberget");
+ number = JSON.parse(number);
+ console.info(number);
+ if(number[0]){
+ for(var i =0; i<number.length;i++){
+ if(id == number[i].dev_id){
+ return number[i].dev_commcount;
+ }
+ }
+ }
+ }
+ return 0;
+ }
+ function getCookiediubao(id){ //涓㈠寘鐜�
+ if(getCookie("numberget")){
+ var number = getCookie("numberget");
+ number = JSON.parse(number);
+ console.info(number);
+ if(number[0]){
+ for(var i =0; i<number.length;i++){
+ if(id == number[i].dev_id){
+ var errorCount = number[i].dev_errcommcount;
+ var allCount = number[i].dev_commcount+errorCount;
+ var parcent = (allCount==0?0:errCount/allCount*100)
+ return parcent;
+ }
+ }
+ }
+ }
+ return 0;
+ }
+ // 鏍煎紡鍖栨彁浜ゅ悗鍙颁俊鎭殑瀵硅薄鏁扮粍骞惰繑鍥� 鍗曚釜淇敼锛屾墜鏈烘柟寮忎笉淇敼澶氫釜鐢垫睜缁�
+ function getUpdateArr(){
+ mon=$('#MonVolStd').val();
+ //moncount = ;
+ var arr = new Array();
+
+ for(var i=0;i<temp.length;i++){
+ setFloatAndoutLine(i);
+
+ var battString = "#battname"+i;
+ var battModel = "#batttype"+i;
+ var battproducer ="#battproducer"+i;
+ var nomCap = "#nomCap"+i;
+ //var id = $('fieldset div div input[data-cacheval=\'true\']').val();
+ //var inputVal = $(id).val();
+ //var input =$(four).option()
+ //console.info(inputVal)
+ var index = String(i);
+ console.info(battString);
+ var obj = {
+ apply_date : new Date().format("yyyy-MM-dd hh:mm:ss"),
+ num : temp[i].num,
+ binf:{
+ StationId : $("#StationId").val(), // 鏈烘埧缂栧彿
+ StationName : ($("#mainteArea").val()+"-"+$("#city").val()+"-"+$("#homeName").val()+"-"+$("#StationName4").val()), // 鎷兼帴鏈烘埧鍚嶇О
+ StationName1 : $("#mainteArea").val(), // 鐪�
+ StationName2 : $("#city").val(), // 甯�
+ StationName5 : $("#country").val(), // 鍖�/鍘�
+ StationName3 : $("#homeName").val(), // 鏈烘埧鍚嶇О
+ StationName4 : $("#StationName4").val(), // 璁惧鍚嶇О
+ StationIp : $("#StationIp").val(), //鏈烘埧ip
+ FBSDeviceId : $("#FBSDeviceId").val(), //璁惧id
+ FbsDeviceIp : $("#FbsDeviceIp").val(), //璁惧ip
+ FbsDeviceIp_YM : $("#FbsDeviceIp_YM").val(), // 璁惧鎺╃爜
+ FbsDeviceIp_WG : $("#FbsDeviceIp_WG").val(), // 缃戝叧
+ FBSDeviceName : $("#FBSDeviceName").val(), //璁惧鍚嶇О
+ GroupIndexInFBSDevice : i, //fbs璁惧绱㈠紩
+ BattGroupId : tempgroupid[i], //鐢垫睜缁刬d
+ BattGroupNum : $("#BattGroupNum").val(), //鏈烘埧鍐呯數姹犵粍缂栧彿
+ BattGroupName : $(battString).val(),
+ FloatVolLevel : fuchongfazhi[i], //娴厖鐢靛帇闃�鍊�
+ OfflineVolLevel : lixiandianyafazhi[i], //绂荤嚎鐢靛帇闃�鍊�
+ BattFloatCurrent : $("#BattFloatCurrent").val(), //娴厖鐢垫祦闃�鍊�
+ MonCount :$("#MonCount"+i).val(), //鍗曚綋鏁伴噺
+ MonCapStd : $("#MonCapStd"+i).val(), //鏍囩О瀹归噺
+ MonVolStd : $("#MonVolStd"+i).val(), //鏍囩О鐢靛帇
+ MonResStd : $("#MonResStd").val(), //鏍囩О鍐呴樆
+ MonSerStd : $("#MonSerStd").val(), //鏍囩О鐢靛
+ MonVolLowToAvg : $("#MonVolLowToAvg").val(), //鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�
+
+ Load_curr : $("#Load_curr").val(), //璐熻浇鐢垫祦
+ DisCurrMax : $("#DisCurrMax").val(), //鏈�澶ф牳瀹圭數娴�
+ station_phone : $("#station_phone").val(), //鍩虹珯鍙风爜
+
+ BattProducer : $("#battproducer"+i).find("option:selected").val(), //鐢垫睜鍝佺墝
+ BattModel : $(battModel).val(), //鐢垫睜鍨嬪彿
+ BattProductDate : $("#startTestrecord").val(), //鐢垫睜鐢熶骇鏃ユ湡
+ BattInUseDate : $("#endTestrecord").val(), //鐢垫睜浣跨敤鏃ユ湡
+ install_user : $("#install_user").val(), //瀹夎浜哄憳
+ }
+ }
+ arr.push(obj);
+ }
+ console.info(arr);
+ return arr;
+ }
+
+
+</script>
+<script type="text/javascript">
+ $(function(){
+ $(".unable").prop("readonly","readonly").attr("unselectable","on").addClass("uncheck");
+ $("#sure").click(function(){
+ console.info($('#newbattnum').val());
+ setcookieCreat($('#newbattnum').val());
+ //window.location.href="control.html";
+ });
+ });
+
+ function nullOrn(){
+
+ return true;
+
+
+ }
+
+ function editBatt(){//
+ console.info(getUpdateArr());
+ var temp = JSON.stringify(getUpdateArr());
+ console.info(temp);
+ $.ajax({
+ type: "post",
+ url: "Battinf_applyAction!updatePro",
+ async:true,
+ dataType:'json',
+ data:"json="+temp,
+ success: function(data){
+ var model = JSON.parse(data.result);
+ //var model = eval('('+data.result+')');
+ console.info(model);
+ if(model.code ==1){
+ alert("淇敼鎴愬姛");
+ window.location.href="batt-unapproved.html"
+ }else{
+ alert("淇敼澶辫触!");
+ window.location.href="batt-unapproved.html"
+ }
+ },
+ error:function(){
+ alert("淇敼鐢垫睜缁勫け璐�!");
+ window.location.href="batt-unapproved.html"
+ }
+ });
+ }
+
+ function yanshou(check_en){
+ if(check_en==0){
+ return "鏈獙鏀�";
+ }else if(check_en==2){
+ return "宸茬敵璇烽獙鏀�";
+ }else if(check_en==1){
+ return"宸插畬鎴愰獙鏀�";s
+ }
+ }
+
+ $('input:radio[name="battnum"]').click(function(){
+ var $this=$(this)
+ , $mon=$('#MonVolStd') ;
+ if ($this.attr("checked")) {
+銆�銆�銆�銆�銆�銆� if($this.val()==4){
+ $mon.val("12");
+ moncount =4;
+ };
+ if($this.val()==24){
+ $mon.val("2");
+ moncount = 24;
+ }
+銆�銆�銆�銆�}
+ });
+
+ /*function creatMonCapOpt(){
+ var k,optionStr='',allString;
+ for(var i=1;i<11;i++){
+ k=i*50;
+ optionStr+='<option'+' value='+k+'>'+k+'</option>';
+ }
+ allString=optionStr+'<option'+' value='+1000+'>'+1000+'</option>'
+ $("#MonCapStd").html(allString);
+ }
+ creatMonCapOpt();
+ */
+ function creatMonCapOpt(index){
+ var selected='',
+ i=0;
+ //console.info(temp[index.binf.MonCapStd]);
+ var battproducer = ["50","100","150","200","250","300","350","400","450","500","1000"];
+ selected+= '<option '+'value='+temp[index].binf.MonCapStd+'>'+temp[index].binf.MonCapStd+'</option>';
+ for(var i=0;i<battproducer.length;i++){
+ if(temp[index].binf.MonCapStd!=battproducer[i]){
+ selected+= '<option '+'value='+battproducer[i]+'>'+battproducer[i]+'</option>';
+ }
+ }
+ return selected;
+ }
+
+
+
+ function getSelected(id){
+ /* var s;
+ $(id).change(function(){
+
+ var g=$(this).find("option:selected").val();
+ console.warn(g);
+ s=g
+ });
+ if(!s){s=$(id).find("option:selected").val()} */
+ var s=$(id).find("option:selected").val();
+ return s;
+ }
+ /* function creatMonCapOpt(suoyin){
+ var optionStr,allString;
+
+ for(var i=1;i<11;i++){
+
+ k=i*50;
+
+ //optionStr+='<option'+' value='+k+'>'+k+'</option>';
+ optionStr+='<option'+' value='+k+'>'+k+'</option>';
+ }
+ allString=optionStr+'<option'+' selected=selected '+' value='+1000+'>'+1000+'</option>'
+ return allString;
+
+
+ }*/
+ function setMonVolStd(suoyin){
+ for(var u=0;u<suoyin;u++){
+ var id='';
+ id='#MonCount'+u;
+ (function(u){
+ var vol='#MonVolStd'+u;
+ $(document).on("change", id, function () {
+ if($(this).find("option:selected").val()==4){$(vol).val(12);}
+ if($(this).find("option:selected").val()==24){$(vol).val(2);}
+ })
+ })(u)
+
+ }
+ }
+ function setMonVolStd(index){
+ for(var i=0;i<index;i++){
+ var s='#MonVolStd'+i;
+ $(s).val(12);
+ }
+ }
+
+ /* 鎿嶄綔鎴愬姛
+ $('#changeSuc').popup('open');
+ 鎿嶄綔澶辫触
+ $('#changeErr').popup('open'); */
+ </script>
+</html>
diff --git a/gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit2.html b/gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit2.html
index 29a9b7a..98df240 100644
--- a/gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit2.html
+++ b/gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit2.html
@@ -47,9 +47,6 @@
right: 0;
margin:0!important;
}
- #newbattnum-button{
- padding: 1em 1.9em;
- }
</style>
<link rel="stylesheet" href="css/fgpanel.css">
</head>
@@ -58,31 +55,18 @@
<!-- 澶撮儴鍐呭 -->
<div data-role="header" data-position="fixed">
- <a href="ele-param2.html" target="_top" class="ui-btn ui-corner-all ui-shadow ui-icon-back ui-btn-icon-left" style="padding-top: 0.7em; padding-bottom: 0.7em;">杩斿洖</a>
- <h1>淇敼鐢垫睜缁勪俊鎭厤缃�</h1>
- <fieldset data-role="controlgroup" class="ptr0" >
-
-
- <select id="newbattnum" data-mini="true">
- <option value=0>鏂板缓鐢垫睜缁�</option>
-
- </select>
-
-
- </fieldset>
-
+ <a href="batt-unapproved-index.html" target="_top" class="ui-btn ui-corner-all ui-shadow ui-icon-back ui-btn-icon-left" style="padding-top: 0.7em; padding-bottom: 0.7em;">杩斿洖</a>
+ <h1>鏈鎵归�氳繃鐢垫睜缁勮鎯�</h1>
+ <fieldset data-role="controlgroup" class="ptr0" >
+ </fieldset>
</div>
<!-- 涓讳綋鍐呭 -->
<div data-role="main">
<!-- <div class="set-option"> -->
<table class="layout-set">
<tbody>
- <tr>
- <td>鏈烘埧缂栧彿</td>
- <td>
- <input type="text" id="StationId" class="unable" data-mini="true" onfocus="this.blur()"/>
- </td>
- </tr>
+ <input type="hidden" id="StationId" class="unable" data-mini="true" onfocus="this.blur()"/>
+
<tr>
<td>FBS璁惧ID(閲嶈)</td>
<td>
@@ -95,12 +79,9 @@
<input type="text" id="FbsDeviceIp" class="unable" data-mini="true" onfocus="this.blur()" />
</td>
</tr>
- <tr>
- <td>鐢垫睜缁処D</td>
- <td>
- <input type="text" readonly unselectable="on" value="123"class="unable" id="BattGroupId" class="uncheck" data-mini="true" onfocus="this.blur()" />
- </td>
- </tr>
+
+ <input type="hidden" readonly unselectable="on" value="123"class="unable" id="BattGroupId" class="uncheck" data-mini="true" onfocus="this.blur()" />
+
<tr>
<td>鐪�</td>
<td>
@@ -122,46 +103,20 @@
<tr>
<td>鏈烘埧鍚嶇О</td>
<td>
- <input type="text" id="homeName" data-mini="true">
+ <input type="text" class="unable" class="unable" id="homeName" data-mini="true">
</td>
</tr>
-
- <input type="hidden" id="StationName4" data-mini="true" />
-
-
- <input type="hidden" id="StationIp" data-mini="true" />
-
-
-
-
-
+ <input type="hidden" id="StationName4" data-mini="true" />
+ <input type="hidden" id="StationIp" data-mini="true" />
<input type="hidden" id="FbsDeviceIp_YM" class="unable" data-mini="true" value="456"/>
<input type="hidden" id="FbsDeviceIp_WG" class="unable" data-mini="true" value="456"/>
- <input type="hidden" id="FBSDeviceName" data-mini="true" />
-
-
-
-
-
-
- <input type="hidden" readonly unselectable="on" value="123" id="BattGroupNum" class="unable" class="uncheck" data-mini="true" />
-
-
- <input type="hidden" id="FloatVolLevel" data-mini="true" />
-
-
-
- <input type="hidden" id="OfflineVolLevel" class="unable" data-mini="true" />
-
-
-
- <input type="hidden" id="BattFloatCurrent" class="unable" data-mini="true" />
-
-
-
-
+ <input type="hidden" id="FBSDeviceName" data-mini="true" />
+ <input type="hidden" readonly unselectable="on" value="123" id="BattGroupNum" class="unable" class="uncheck" data-mini="true" />
+ <input type="hidden" id="FloatVolLevel" data-mini="true" />
+ <input type="hidden" id="OfflineVolLevel" class="unable" data-mini="true" />
+ <input type="hidden" id="BattFloatCurrent" class="unable" data-mini="true" />
<input type="hidden" id="MonResStd" data-mini="true" />
<input type="hidden" id="MonSerStd" data-mini="true" />
<input type="hidden" id="MonVolLowToAvg" data-mini="true" />
@@ -169,17 +124,17 @@
<tr>
<td>*璐熻浇鐢垫祦(A)</td>
<td>
- <input type="text" id="Load_curr" data-mini="true" />
+ <input type="text" id="Load_curr" class="unable" data-mini="true" />
</td>
</tr>
- <input type="hidden" id="DisCurrMax" data-mini="true" />
+ <input type="hidden" id="DisCurrMax" class="unable" data-mini="true" />
<tr>
<td>鍩虹珯鐢佃瘽鍙风爜</td>
<td>
- <input type="text" id="station_phone" data-mini="true" />
+ <input type="text" id="station_phone" class="unable" data-mini="true" />
</td>
</tr>
@@ -190,7 +145,7 @@
<tr>
<td>*瀹夎浜哄憳</td>
<td>
- <input type="text" id="install_user" data-mini="true" />
+ <input type="text" id="install_user" class="unable" data-mini="true" />
</td>
</tr>
</tbody>
@@ -230,8 +185,8 @@
<div data-role="footer" data-position="fixed" data-theme="a">
<div data-role="navbar">
<ul>
- <li><a href="#yourPopup" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but ui-btn-icon-check" data-position-to="window" data-icon="check" data-role="button">纭畾</a></li>
- <li><a href="" id="cancel" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but ui-btn-icon-delete" data-position-to="window" data-icon="delete" data-role="button">鍙栨秷</a></li>
+ <li><a href="batt-approve-index.html" target="_top" class="ui-btn ui-btn-inline ui-corner-all operat-but ui-btn-icon-check" data-position-to="window" data-icon="check" data-role="button">宸插鏍�</a></li>
+ <li><a href="batt-unapproved-index.html" class="ui-btn ui-btn-inline ui-corner-all operat-but ui-btn-icon-delete" data-position-to="window" data-icon="delete" data-role="button">鍙栨秷</a></li>
</ul>
</div>
</div>
@@ -259,16 +214,16 @@
function creatBattView(index){
var count=index+1
,battTitle='<div>'+'<h1 class="hbg">'+'鐢垫睜缁�'+count+'</h1>'+
- '<table class="layout-set">'+'<tbody>'+'<tr>'+'<td>'+'鐢垫睜鍝佺墝'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" data-type="horizontal" >'+'<select '+'id='+'battproducer'+index+'>'
+ '<table class="layout-set">'+'<tbody>'+'<tr>'+'<td>'+'鐢垫睜鍝佺墝'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" data-type="horizontal" >'+'<select '+'id='+'battproducer'+index+' class="unable" '+'>'
,battBrand=selectedIndex(index)+'</select>'+'</fieldset>'+'</td>'+'</tr>'
- ,battType='<tr>'+'<td>'+'鐢垫睜鍨嬪彿'+'</td>'+'<td>'+'<input type="text" '+'id='+'batttype'+index+' data-mini="true"'+'value='+'鐢垫睜鍨嬪彿'+count+' />'+'</td>'+'</tr>'
- ,battNum='<tr>'+'<td>'+'*鍗曚綋鏁伴噺'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" data-type="horizontal">'+'<select '+ 'id='+'MonCount'+index+'>'
+ ,battType='<tr>'+'<td>'+'鐢垫睜鍨嬪彿'+'</td>'+'<td>'+'<input type="text" '+' class="unable" '+'id='+'batttype'+index+' data-mini="true"'+'value='+'鐢垫睜鍨嬪彿'+count+' />'+'</td>'+'</tr>'
+ ,battNum='<tr>'+'<td>'+'*鍗曚綋鏁伴噺'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" data-type="horizontal">'+'<select '+ 'id='+'MonCount'+index+' class="unable" '+'>'
,battNumOpt=selectedNum(index)+'</select>'+'</fieldset>'+'</td>'+'</tr>'
,MonVolStd='<tr>'+'<td>'+'*鏍囩О鍗曚綋鐢靛帇(V)'+'</td>'+'<td>'+'<input type="text" '+'id='+'MonVolStd'+index+' data-mini="true"'+' class="unable" '+'/>'+'</td>'+'</tr>'
- ,nomCap='<tr>'+'<td>'+'*鏍囩О瀹归噺(AH)'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" >'+'<select '+'id='+'MonCapStd'+index+' data-mini="true"'+'>'+creatMonCapOpt(index)+'</select>'
+ ,nomCap='<tr>'+'<td>'+'*鏍囩О瀹归噺(AH)'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" >'+'<select '+'id='+'MonCapStd'+index+' data-mini="true"'+' class="unable" '+'>'+creatMonCapOpt(index)+'</select>'
+'</fieldset>'+'</td>'+'</tr>'
- ,battIndex='<tr>'+'<input type="hidden" '+'id='+'battindex'+index+' data-mini="true"'+'value='+count+' />'+'</tr>'
- ,battName='<tr>'+'<input type="hidden" '+'id='+'battname'+index+' data-mini="true"'+'value='+'鐢垫睜缁�'+count+' />'+'</tr>'+'</tbody>'+'</table>'+'</div>';
+ ,battIndex='<tr>'+'<input type="hidden" '+'id='+'battindex'+index+' data-mini="true"'+'value='+count+' class="unable" '+' />'+'</tr>'
+ ,battName='<tr>'+'<input type="hidden" '+'id='+'battname'+index+' data-mini="true"'+'value='+'鐢垫睜缁�'+count+' class="unable" '+' />'+'</tr>'+'</tbody>'+'</table>'+'</div>';
return battTitle+battBrand+battType+battNum+battNumOpt+MonVolStd+nomCap+battIndex+battName;
}
function selectedNum(index){
@@ -276,22 +231,9 @@
if(temp[index].binf.MonCount==4){
return selected='<option '+'value='+4+' selected=selected' +'>'+'4 涓�'+'</option>'+'<option '+'value='+24 +'>'+'24涓�'+'</option>';
}else{
- return selected='<option '+'value='+24+' selected=selected' +'>'+'24 涓�'+'</option>'+'<option '+'value='+4 +'>'+'4涓�'+'</option>';
-
+ return selected='<option '+'value='+24+' selected=selected' +'>'+'24 涓�'+'</option>'+'<option '+'value='+4 +'>'+'4涓�'+'</option>';
}
- }
- function creatBa(a){
- var battnum=4-a,
- opstring='';
- if(a>4&&battnum<=0){return false;}
- for(var i=0;i<=battnum;i++){
-
- opstring+='<option value='+i+'>鏂板缓'+i+'涓數姹犵粍</option>';
- }
- console.warn(opstring+'ttt');
- return $('#newbattnum').html(opstring);
- }
-
+ }
function selectedIndex(index){
var selected='',
@@ -321,14 +263,9 @@
var lixiandianyafazhi = [0,0,0,0];
$(function(){
creatAllView(temp.length).trigger('create');
- setchangedMonVolStd(temp.length);
- creatBa(temp.length).trigger('create');
+ setMonVolStd(temp.length);
});
-
-
-
-
$(function () {
//setTimes($("#startTestrecord"),'2000-01-01');
//setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd'));
@@ -401,17 +338,7 @@
function prefixInteger(num, length) {
return (num/Math.pow(3,length)).toFixed(length).substr(2);
}
- function creatBa(a){
- var battnum=4-a,
- opstring='';
- if(a>4&&battnum<=0){return false;}
- for(var i=0;i<=battnum;i++){
-
- opstring+='<option value='+i+'>鏂板缓'+i+'涓數姹犵粍</option>';
- }
- console.warn(opstring+'ttt');
- return $('#newbattnum').html(opstring);
- }
+
//瀵煎叆琛ㄦ牸榛樿鏁版嵁
function installstartdata(temp){
data=temp[0].binf;
@@ -633,16 +560,6 @@
}
return selected;
}
- $('#newbattnum').change(function(){
- var numbattnum = parseInt($('#newbattnum').val());
- var index =parseInt(tempindex.length);
- addbattnum=Math.floor((numbattnum)+(tempindex.length));
- console.warn(addbattnum);
- creatAllView(addbattnum).trigger('create');
- creatBattGroupId(addbattnum);
- });
-
-
function getSelected(id){
/* var s;
@@ -674,7 +591,7 @@
}*/
- function setchangedMonVolStd(suoyin){
+ function setMonVolStd(suoyin){
for(var u=0;u<suoyin;u++){
var id='';
id='#MonCount'+u;
diff --git a/gx_tieta/WebRoot/mobil/batt-unapproved-index.html b/gx_tieta/WebRoot/mobil/batt-unapproved-index.html
new file mode 100644
index 0000000..cbd6e4f
--- /dev/null
+++ b/gx_tieta/WebRoot/mobil/batt-unapproved-index.html
@@ -0,0 +1,231 @@
+<!doctype html>
+<html>
+<head>
+<meta charset="utf-8">
+<title></title>
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<link rel="stylesheet" href="mobilCss/jquery.mobile-1.4.5.min.css"/>
+<link rel="stylesheet" href="css/breadcrumb.css">
+<link rel="stylesheet" type="text/css" href="css/defined.popup.css"/>
+<script type="text/javascript" src="mobilJs/jquery-1.8.2.js"></script>
+<script type="text/javascript" src="mobilJs/jquery.mobile-1.4.5.min.js"></script>
+<script type="text/javascript" src="mobilJs/base.js"></script>
+</head>
+ <body>
+ <div data-role="page" tabindex="0" id="page0">
+ <div data-role="header" data-position="fixed">
+ <a href="index.html" target="_top" style="padding-top:0.7em;padding-bottom:0.7em;">杩斿洖</a>
+ <h1>鏈鎵归�氳繃鏈烘埧鍒楄〃</h1>
+ </div>
+
+ <div data-role="content">
+ <ul class="breadcrumb"></ul>
+ <div id="battList"></div>
+ </div>
+ <div data-role="popup" id="myPopup" class="defined-popup">
+ <div class="popup-container">
+ <div class="popup-title">鏌ヨ鏁版嵁澶辫触</div>
+ <div class="popup-content">
+ <div class="set-option">
+ <p>璇疯缃寘鏈虹粍</p>
+ </div>
+ </div>
+ <div class="popup-footer">
+ <div class="footer-float footer-left">
+ <button type="button" id="right" data-mini="true" style="visibility: hidden;">纭畾</button>
+ </div>
+ <div class="footer-float footer-right">
+ <button type="button" id="hidePopup" data-mini="true">鍙栨秷</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div data-role="footer" data-position="fixed">
+ <!-- <h1>绂忓厜鐢靛瓙鏈夐檺鍏徃</h1> -->
+ </div>
+ </div>
+ </body>
+ <script type="text/javascript" src="js/battNav.js"></script>
+ <script type="text/javascript">
+ var stationlist = new Array();
+
+ // 鍒濆鍖栭〉闈㈠唴瀹�
+ $(document).ready(function(){
+ setCookie("station",null);
+ setCookie("batt",null);
+ searchBattLife();
+ });
+
+ // 鐐瑰嚮鏈烘埧浜嬩欢
+ $(function () {
+ var aLi = -1;
+ $('#battList').on('click', 'ul li', function () {
+ aLi = $(this).index();
+ console.info(aLi);
+ station = getbatt(stationlist,aLi);
+ var arr=setarrbatt(arrdata,station);
+ console.info(arr);
+ //var json=window.JSON.stringify(station);
+ //setCookie("StationName",json);
+ window.location.href="batt-infor-unapproved-edit2.html";
+ });
+ });
+
+ var arrTd = new Array();
+ var arrdata = new Array();
+
+ var Page = {
+ pageSize:20, //姣忛〉鐨勮鏁�
+ pageCurr:1, //褰撳墠椤电爜鏁�
+ pageAll:0,
+ };
+
+ function getcreatArr(){
+ obj = {
+ apply_en : 0,
+ binf : {
+ page:Page,
+ }
+ }
+ return obj;
+ }
+ // 鏌ヨ鍐呭
+ function searchBattLife(){
+ var temp = JSON.stringify(getcreatArr());
+ console.info(temp);
+ arrTd = new Array();
+ var index = 0;
+ $.ajax({
+ type: 'post',
+ async: true,
+ url: 'Battinf_applyAction!serchByInfo',
+ data: "json="+temp,
+ dataType: 'json',
+ success:function(data) {
+ data = JSON.parse(data.result);
+ if(data.code!=0&&data.data.length>0){
+ data=data.data
+ var model = new Array();
+ console.info(data);
+ for(var i=0;i<data.length;i++){
+ arrdata.push(data[i]);//瀛樺偍鏁版嵁
+ if(model.length==0){
+ model.push(data[i].binf.StationName);
+ }else{
+ if(model[model.length-1]!=data[i].binf.StationName){
+ model.push(data[i].binf.StationName);
+ }
+ }
+ console.info(model);
+ stationlist=model;
+ }
+ createUl($('#battList'),model);
+ }
+
+ }
+ });
+ }
+
+ function setarrbatt(arrdata,station){
+ console.info(arrdata);
+ if(arrdata.length>0){ //瀛樺叆鐨勪负鎵�鏈夊凡鏌ュ嚭鏁版嵁
+ var arr= creatYanshouObj(arrdata,station);//鐢宠楠屾敹鏂规硶銆�
+ return arr;
+ }else{
+ alert("璇风瓑寰呭嚑绉掑悗鍐嶆彁浜ょ敵璇�");
+ }
+ }
+ function creatYanshouObj(arrdata,station){ //閫氳繃鐐瑰嚮鏈烘埧淇℃伅锛坰tationid锛夛紝鑾峰彇璇ユ満鎴跨數姹犵粍
+ //var StationId = arrdata[index].binf.StationId;
+ //console.info(StationId);
+ var arr = new Array(); //鍒濆鍖栦紶鍙傛暟缁�
+ console.info(station);
+ console.info(arrdata);
+ for(var i=0;i<arrdata.length;i++){//涓�娆¢獙鏀惰鏈烘埧涓嬬殑鎵�鏈夌數姹犵粍鏋勫缓瀵硅薄 銆�
+ if(station == arrdata[i].binf.StationName){
+ var obj = {
+ num :arrdata[i].num,
+ binf:{
+ StationId : arrdata[i].binf.StationId, // 鏈烘埧缂栧彿
+ StationName : (arrdata[i].binf.StationName1+"-"+ arrdata[i].binf.StationName2+"-"+arrdata[i].binf.StationName5+"-"+arrdata[i].binf.StationName3), // 鎷兼帴鏈烘埧鍚嶇О
+ StationName1 :arrdata[i].binf.StationName1, // 鐪�
+ StationName2 : arrdata[i].binf.StationName2, // 甯�
+ StationName5 : arrdata[i].binf.StationName5, // 鍖�/鍘�
+ StationName3 : arrdata[i].binf.StationName3, // 鏈烘埧鍚嶇О
+ StationName4 : arrdata[i].binf.StationName4, // 璁惧鍚嶇О
+ StationIp :arrdata[i].binf.StationIp, //鏈烘埧ip
+ FBSDeviceId : arrdata[i].binf.FBSDeviceId, //璁惧id
+ FbsDeviceIp : arrdata[i].binf.FbsDeviceIp, //璁惧ip
+ FbsDeviceIp_YM : arrdata[i].binf.FbsDeviceIp_YM, // 璁惧鎺╃爜
+ FbsDeviceIp_WG : arrdata[i].binf.FbsDeviceIp_WG , // 缃戝叧
+ FBSDeviceName : arrdata[i].binf.FBSDeviceName, //璁惧鍚嶇О
+ GroupIndexInFBSDevice : arrdata[i].binf.GroupIndexInFBSDevice, //fbs璁惧绱㈠紩
+ BattGroupId : arrdata[i].binf.BattGroupId, //鐢垫睜缁刬d
+ BattGroupNum : arrdata[i].binf.BattGroupNum , //鏈烘埧鍐呯數姹犵粍缂栧彿
+ BattGroupName :arrdata[i].binf.BattGroupName, //鐢垫睜缁勭储寮�
+ FloatVolLevel : arrdata[i].binf.FloatVolLevel, //娴厖鐢靛帇闃�鍊�
+ OfflineVolLevel : arrdata[i].binf.OfflineVolLevel, //绂荤嚎鐢靛帇闃�鍊�
+ BattFloatCurrent : arrdata[i].binf.BattFloatCurrent, //娴厖鐢垫祦闃�鍊�
+ MonCount : arrdata[i].binf.MonCount, //鍗曚綋鏁伴噺
+ MonCapStd : arrdata[i].binf.MonCapStd, //鏍囩О瀹归噺
+ MonVolStd : arrdata[i].binf.MonVolStd, //鏍囩О鐢靛帇
+ MonResStd : arrdata[i].binf.MonResStd, //鏍囩О鍐呴樆
+ MonSerStd : arrdata[i].binf.MonSerStd, //鏍囩О鐢靛
+ MonVolLowToAvg : arrdata[i].binf.MonVolLowToAvg, //鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�
+
+ Load_curr : arrdata[i].binf.Load_curr, //璐熻浇鐢垫祦
+ DisCurrMax : arrdata[i].binf.DisCurrMax, //鏈�澶ф牳瀹圭數娴�
+ station_phone : arrdata[i].binf.station_phone, //鍩虹珯鍙风爜
+
+ BattProducer : arrdata[i].binf.BattProducer, //鐢垫睜鍝佺墝
+ BattModel : arrdata[i].binf.BattModel, //鐢垫睜鍨嬪彿
+ BattProductDate : arrdata[i].binf.BattProductDate, //鐢垫睜鐢熶骇鏃ユ湡
+ BattInUseDate : arrdata[i].binf.BattInUseDate, //鐢垫睜浣跨敤鏃ユ湡
+ install_user : arrdata[i].binf.install_user, //瀹夎浜哄憳
+ }
+
+ }
+ arr.push(obj);
+ }
+ }
+ console.info(arr);
+ //applyendyanshou(arr);//鐢宠楠屾敹鏂规硶銆�
+ var json=window.JSON.stringify(arr);
+ setCookie("eleparm",json); //杩欓噷setcookie,鑻ユ湁涓婁竴鏉ookie鍒欐竻绌轰笂涓�绗�
+ return arr;
+ }
+
+ function createUl(ulCon, dataList) {
+ //console.info(index);
+ // 娓呯悊瀹瑰櫒涓嬬殑ul
+ ulCon.find('ul').remove();
+
+ // 鍒涘缓ul
+ var _ul = $('<ul data-role="listview" data-inset="true"></ul>');
+
+ // 閬嶅巻dataList鐢熸垚li鍜宎
+ for (var i = 0; i < dataList.length; i++){
+ var _li = $('<li></li');
+
+ var _a = $('<a href="#page1" value="" data-transition="slide">'+dataList[i]+'</a>');
+
+ // 灏哶a娣诲姞鍒癬li锛屽皢_li娣诲姞鍒癬ul涓�
+ _li.append(_a);
+ _ul.append(_li);
+ }
+
+ // 灏哶ul娣诲姞鍒板鍣ㄤ腑
+ ulCon.append(_ul).trigger('create');
+ loadclose();
+ }
+
+ //鑾峰彇褰撳墠閫変腑鐨刡att
+ function getbatt(arr,index){
+ if(arr.length>index){
+ return arr[index];
+ }
+ return undefined;
+ };
+ </script>
+
+</html>
\ No newline at end of file
diff --git a/gx_tieta/WebRoot/mobil/control.html b/gx_tieta/WebRoot/mobil/control.html
index 89a59c9..f7861fb 100644
--- a/gx_tieta/WebRoot/mobil/control.html
+++ b/gx_tieta/WebRoot/mobil/control.html
@@ -66,7 +66,7 @@
var batt = JSON.parse(temp);
console.info(batt);
if(batt.install_user||batt.install_user==0){
- window.location.href="batt-approved.html";
+ window.location.href="batt-approve-index.html";
}else{
window.location.href="testdata.html";
}
diff --git a/gx_tieta/WebRoot/mobil/ele-param2.html b/gx_tieta/WebRoot/mobil/ele-param2.html
index a830220..16c3da1 100644
--- a/gx_tieta/WebRoot/mobil/ele-param2.html
+++ b/gx_tieta/WebRoot/mobil/ele-param2.html
@@ -203,16 +203,12 @@
<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn ui-icon-delete ui-btn-icon-notext ui-btn-right">鍏抽棴</a>
<h1>閫夋嫨鏂板缓鐢垫睜缁勪釜鏁�</h1>
<fieldset data-role="controlgroup" >
-
-
+
<select id="newbattnum" data-mini="true">
<option value="1">鏂板缓1涓數姹犵粍</option>
<option value="2">鏂板缓2涓數姹犵粍</option>
- <option value="3">鏂板缓3涓數姹犵粍</option>
- <option value="4">鏂板缓4涓數姹犵粍</option>
</select>
-
-
+
</fieldset>
<div data-role="controlgroup" data-type="horizontal" class="mt6">
--
Gitblit v1.9.1