From e37e5966f637f62b59b247ded62a7b6aa9ee144f Mon Sep 17 00:00:00 2001
From: hdw <hdw@192.168.7.112>
Date: 星期四, 03 一月 2019 16:11:09 +0800
Subject: [PATCH] 电池信息配置添加投入使用日期
---
gx_tieta/WebRoot/mobil/batt-approved1.html | 150 +++++++++++++++++++++++++++++++++++--------------
1 files changed, 106 insertions(+), 44 deletions(-)
diff --git a/gx_tieta/WebRoot/mobil/batt-approved1.html b/gx_tieta/WebRoot/mobil/batt-approved1.html
index 1de45c5..1c7d0ff 100644
--- a/gx_tieta/WebRoot/mobil/batt-approved1.html
+++ b/gx_tieta/WebRoot/mobil/batt-approved1.html
@@ -27,17 +27,17 @@
white-space: nowrap;
}
.uncheck{
- background-color: #dddddde0!important;
+ background-color: #ddd!important;
color: #000!important;
}
.ui-btn-icon-right {
padding-right: 8.5em;
}
.hbg{
- background-color:#ddd9;
+ background-color:#ddd;
}
#battdata {
- background-color:#dddddd54
+ background-color:#eee;
}
.ui-select .ui-btn select{
width:77%;
@@ -112,29 +112,29 @@
</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="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="BattFloatCurrent" class="unable" data-mini="true" />
+ <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="MonResStd" data-mini="true" />
-
- <input type="hidden" id="MonSerStd" data-mini="true" />
-
- <input type="hidden" id="MonVolLowToAvg" 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>
@@ -145,7 +145,7 @@
<input type="hidden" id="DisCurrMax" class="unable" data-mini="true" />
<tr>
- <td>鍩虹珯鐢佃瘽鍙风爜</td>
+ <td>*鍩虹珯鐢佃瘽鍙风爜</td>
<td>
<input type="text" id="station_phone" class="unable" data-mini="true" />
</td>
@@ -264,15 +264,18 @@
function battnumber(){
var selected=''
- for(var i=1;i<=temp.length;i++){
- selected+= '<option '+'value='+i+'>'+"鐢垫睜缁�"+i+'</option>';
+ console.info(temp);
+ if(temp.length>0){
+ for(var i=0;i<temp.length;i++){
+ selected+= '<option '+'value='+i+'>'+temp[i].binf.BattGroupName+'</option>';
+ }
+ return $('#newbattnum').html(selected);
}
- return $('#newbattnum').html(selected);
}
function creatBattView(index){
var count=index+1
- ,battTitle='<div>'+'<h1 class="hbg">'+'鐢垫睜缁�'+count+'</h1>'+
+ ,battTitle='<div>'+'<h1 class="hbg">'+temp[index].binf.BattGroupName+'</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>'*/
,battBrand='<tr>'+'<td>'+'鐢垫睜鍝佺墝'+'</td>'+'<td>'+'<input type="text" '+' class="unable" '+'id='+'battproducer'+index+' data-mini="true"'+'value='+'鐢垫睜鍝佺墝'+count+' />'+'</td>'+'</tr>'
@@ -289,11 +292,11 @@
return battTitle+battBrand+battType+battNum+MonVolStd+nomCap+battIndex+battName;
}
function selectedNum(index){
- var selected='';
+ var selected='';
if(temp[index].binf.MonCount==4){
- return selected='<option '+'value='+4+' selected=selected' +'>'+'4 涓�'+'</option>'+'<option '+'value='+24 +'>'+'24涓�'+'</option>';
+ 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>';
}
}
@@ -315,10 +318,10 @@
var arr = temp;
function setcookieCreat(i){
- var index=Math.ceil(i-1);
- arrdata = temp[index].binf;
- //console.info(index);
- //console.info(temp);
+ console.info(temp);
+ console.info(i)
+ //var index=Math.ceil(i-1);
+ arrdata = temp[i].binf;
console.info(arrdata);
var json = JSON.stringify(arrdata);
setCookie("batt",json);
@@ -364,8 +367,8 @@
console.info(tempgroupid);//鐢垫睜缁� ID 鏁扮粍锛岋紙鑻ユ坊鍔狅紝鍒欓渶瑕佹柊寤猴級;
var addbattnum = temp.length;//娣诲姞鐢垫睜缁勬暟鐩鏁�
var moncount = 0;
- var fuchongfazhi = [0,0,0,0];
- var lixiandianyafazhi = [0,0,0,0];
+ //var fuchongfazhi = [0,0,0,0];
+ //var lixiandianyafazhi = [0,0,0,0];
battnumber();
$(function(){
creatAllView(temp.length).trigger('create');
@@ -375,10 +378,44 @@
$(function () {
//setTimes($("#startTestrecord"),'2000-01-01');
//setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd'));
-
- installstartdata(temp);
+
+ installstartdata(temp);//瀵煎叆鍒濆椤甸潰鍊�
+ diubao();//鍒濆涓㈠寘鐜�
+ updateinstalldata(temp);//瀹炴椂鏇存柊楠屾敹鐘舵��
+ timeer = window.setTimeout(function() {
+ diubao();
+ updateinstalldata(temp);
+ }, 4000); //涓㈠寘鐜囷紝閫氫俊璁℃暟锛�4绉掑埛鏂�1娆°��
+ //4绉掑埛鏂颁竴娆¢〉闈�
});
+ function updateinstalldata(temp){
+ //console.info(temp);
+ var data=temp[0].binf.StationId;
+ var _data ={ binf:{
+ StationId:data
+ }
+ }
+ data=JSON.stringify(_data);
+ //console.info(data);
+ $.ajax({ //鐢宠楠屾敹
+ type: 'post',
+ async: true,
+ url: 'Battinf_applyAction!serchById',
+ data: "json="+data,
+ dataType: 'json',
+ success:function(data) {
+
+ data = JSON.parse(data.result);
+ console.info(data);
+ if(data.code==1&&data.data.length>0){
+ data = data.data;
+ //console.info(data[0].check_en);
+ document.getElementById("check_en").value = yanshou(data[0].check_en);
+ }
+ }
+ });
+ }
function applyendyanshou(arr){ //鐢宠楠屾敹
var temp = JSON.stringify(arr);
$.ajax({ //鐢宠楠屾敹
@@ -397,7 +434,7 @@
});
}
- // 璁剧疆娴厖鐢靛帇闃�鍊�/璁剧疆绂荤嚎鐢靛帇闃�鍊� //
+ // 璁剧疆娴厖鐢靛帇闃�鍊�/璁剧疆绂荤嚎鐢靛帇闃�鍊� //
function setFloatAndoutLine(index) {
var monvolstd = "#MonVolStd"+index;
var MonCount = "#MonCount" +index;
@@ -453,8 +490,7 @@
//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];
@@ -476,8 +512,15 @@
}
}
+ function diubao(){
+ if(temp.length>0){
+ data=temp[0].binf;
+ document.getElementById("tongxunnumber").value = getCookienumber(data.StationId);
+ document.getElementById("diubaonumber").value = getCookiediubao(data.StationId);
+ }
+ }
function getCookienumber(id){//杈撳叆ID锛岃繑鍥為�氳璁℃暟銆傛暟鎹粠缂撳瓨鑾峰彇銆�
- //var a = getnumber();
+ var a = getnumber();
//console.info(a);
if(getCookie("numberget")){
var number = getCookie("numberget");
@@ -493,6 +536,25 @@
}
return 0;
}
+ 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 getCookiediubao(id){ //涓㈠寘鐜�
if(getCookie("numberget")){
var number = getCookie("numberget");
--
Gitblit v1.9.1