From b2f21d080425b0ab6e5e6170914ca2c615e5d185 Mon Sep 17 00:00:00 2001
From: 81041 <81041@DESKTOP-025NVD9>
Date: 星期三, 02 一月 2019 10:22:00 +0800
Subject: [PATCH] Merge branch 'dev_lxw' of https://gitlab.com/whyclxw1/gx_tieta.git into dev_lxw

---
 gx_tieta/WebRoot/mobil/batt-approved1.html |   66 +++++++++++++++++++++++++-------
 1 files changed, 51 insertions(+), 15 deletions(-)

diff --git a/gx_tieta/WebRoot/mobil/batt-approved1.html b/gx_tieta/WebRoot/mobil/batt-approved1.html
index 1de45c5..2ac7815 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%;
@@ -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>' 
@@ -315,8 +318,10 @@
 	var arr = temp;
 	
 	function setcookieCreat(i){
-		var index=Math.ceil(i-1);
-		arrdata = temp[index].binf;
+	console.info(temp);
+	console.info(i)
+		//var index=Math.ceil(i-1);
+		arrdata = temp[i].binf;
 		//console.info(index);
 		//console.info(temp);
 		console.info(arrdata);
@@ -376,7 +381,13 @@
 		//setTimes($("#startTestrecord"),'2000-01-01');
 		//setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd'));
 		
-		installstartdata(temp);
+		
+	installstartdata(temp);
+	diubao();
+	timeer = window.setTimeout(function() {
+			diubao();						
+						}, 4000);	//涓㈠寘鐜囷紝閫氫俊璁℃暟锛�4绉掑埛鏂�1娆°��
+		//4绉掑埛鏂颁竴娆¢〉闈�
 	});
     
     function applyendyanshou(arr){   //鐢宠楠屾敹
@@ -397,7 +408,7 @@
 			});
 		
 		}
-  	  // 璁剧疆娴厖鐢靛帇闃�鍊�/璁剧疆绂荤嚎鐢靛帇闃�鍊�   //
+  	// 璁剧疆娴厖鐢靛帇闃�鍊�/璁剧疆绂荤嚎鐢靛帇闃�鍊�   //
   	function setFloatAndoutLine(index) {
   		var monvolstd = "#MonVolStd"+index;
   		var MonCount = "#MonCount" +index;
@@ -453,8 +464,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 +486,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 +510,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