From 359a6a91bd0c2e451cf8d154a4ed79c85c907430 Mon Sep 17 00:00:00 2001
From: CJJ <Administrator@USER-20180117QL>
Date: 星期三, 26 十二月 2018 15:46:19 +0800
Subject: [PATCH] 修改

---
 gx_tieta/WebRoot/mobil/batt-edit2.html                  |   19 ++++-----
 gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html       |    2 
 gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit2.html |   43 +++++++++++++++++----
 3 files changed, 45 insertions(+), 19 deletions(-)

diff --git a/gx_tieta/WebRoot/mobil/batt-edit2.html b/gx_tieta/WebRoot/mobil/batt-edit2.html
index f996126..1f540b2 100644
--- a/gx_tieta/WebRoot/mobil/batt-edit2.html
+++ b/gx_tieta/WebRoot/mobil/batt-edit2.html
@@ -290,7 +290,7 @@
   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"id="battproducer'+index+'">'+'<select>'
+             '<table class="layout-set">'+'<tbody>'+'<tr>'+'<td>'+'鐢垫睜鍝佺墝'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" data-type="horizontal">'+'<select id="battproducer'+index+'>'
             ,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>'+'<input type="text" '+'id='+'battnum'+index+' data-mini="true"'+'value='+'鐢垫睜鏁伴噺'+count+' />'+'</td>'+'</tr>' 
@@ -341,6 +341,7 @@
 	//console.info(temp);
 	temp=JSON.parse(temp);
 	console.info(temp);
+	var moncount = 0;
 	var tempgroupid = new Array() ;
 	for(var i=0;i<temp.length;i++){
 		tempgroupid.push(temp[i].binf.BattGroupId);
@@ -488,13 +489,8 @@
 	// 鏍煎紡鍖栨彁浜ゅ悗鍙颁俊鎭殑瀵硅薄鏁扮粍骞惰繑鍥� 鍗曚釜淇敼锛屾墜鏈烘柟寮忎笉淇敼澶氫釜鐢垫睜缁�
 		function getUpdateArr(){
 			mon=$('#MonVolStd').val();
-			var moncount = 0;
-			if(mon==12){
-				console.info("aa");
-				moncount=4;
-			}else if(mon==2){
-				moncount==24;
-			}
+		
+			
 			var arr = new Array();
 			
 			for(var i=0;i<temp.length;i++){
@@ -623,9 +619,12 @@
         if ($this.attr("checked")) { 
 銆�銆�銆�銆�銆�銆�  if($this.val()==4){
                $mon.val("12");
-              
+              	moncount = 12;
            };
-         if($this.val()==24){$mon.val("2");}  
+         if($this.val()==24){
+         	$mon.val("2");
+         	moncount = 2;
+         }  
 銆�銆�銆�銆�}
    });
    
diff --git a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html
index d51dda2..c07a384 100644
--- a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html
+++ b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html
@@ -271,7 +271,7 @@
   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" id="battproducer" data-type="horizontal">'+'<select>'
+             '<table class="layout-set">'+'<tbody>'+'<tr>'+'<td>'+'鐢垫睜鍝佺墝'+'</td>'+'<td>'+'<fieldset data-role="controlgroup"  data-type="horizontal">'+'<select id="battproducer'+index+'>'
             ,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>'+'<input type="text" '+'id='+'battnum'+index+' data-mini="true"'+'value='+'鐢垫睜鏁伴噺'+count+' />'+'</td>'+'</tr>' 
diff --git a/gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit2.html b/gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit2.html
index 18a3ddc..3bca2e7 100644
--- a/gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit2.html
+++ b/gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit2.html
@@ -290,7 +290,7 @@
   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"id="battproducer'+index+'">'+'<select>'
+             '<table class="layout-set">'+'<tbody>'+'<tr>'+'<td>'+'鐢垫睜鍝佺墝'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" data-type="horizontal" >'+'<select id="battproducer'+index+'">'
             ,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>'+'<input type="text" '+'id='+'battnum'+index+' data-mini="true"'+'value='+'鐢垫睜鏁伴噺'+count+' />'+'</td>'+'</tr>' 
@@ -316,6 +316,9 @@
   function selectedIndex(index){
        var selected='',
            i=0;
+           var pruducer = temp[index].binf.BattProducer;
+           
+       selected+= '<option '+'value='+pruducer+'>'+pruducer+'</option>';
        selected+= '<option '+'value='+'鐞嗗+'+'>'+'鐞嗗+'+'</option>';
        selected+= '<option '+'value='+'鍦i槼'+'>'+'鍦i槼'+'</option>';
        selected+= '<option '+'value='+'鍙岀櫥'+'>'+'鍙岀櫥'+'</option>';
@@ -438,6 +441,7 @@
 	//瀵煎叆琛ㄦ牸榛樿鏁版嵁
 	function installstartdata(temp){
 			data=temp[0].binf;
+			
 			document.getElementById("StationId").value = data.StationId;
 			document.getElementById("mainteArea").value = data.StationName1;
 			document.getElementById("city").value = data.StationName2;			//甯�
@@ -466,7 +470,8 @@
 			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(battproducer).value = data.BattProducer;
+			$(battproducer).val(data.BattProducer);
 			//document.getElementById("BattModel").value = data.BattModel;
 			document.getElementById("startTestrecord").value = data.BattProductDate;
 			document.getElementById("endTestrecord").value = data.BattInUseDate;
@@ -474,15 +479,18 @@
 			//setTimes($("#endTestrecord"),data.useDate);
 			document.getElementById("install_user").value = data.install_user;		
 			for(var i=0;i<temp.length;i++){
+			var battproducer ="#battproducer"+i;
 				data=temp[i].binf;
 				var battString = "#battname"+i;
-				var battModel = "#batttype"+i;
+				//var battModel = "#batttype"+i;
 				var battproducer = "#battproducer"+i
 				//var battproducer ="#battproducer"+i; 
 				$(battString).val(data.BattGroupName);
-				$(battModel).val(data.BattModel);
-				$(battproducer).val(data.BattProducer);
-				console.info($(battproducer).val());
+				//$(battModel).val(data.BattModel);
+				//$(battproducer).val(data.BattProducer);
+				//console.info(data.BattProducer);
+				$(battproducer).prepend('<option value="4343" selected="selected">344343</option>');
+				console.info($(battproducer)[0]);
 			}
 	}
 	
@@ -498,6 +506,7 @@
 				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()
@@ -539,7 +548,7 @@
 						DisCurrMax : $("#DisCurrMax").val(),				//鏈�澶ф牳瀹圭數娴�
 						station_phone : $("#station_phone").val(),			//鍩虹珯鍙风爜
 										
-						BattProducer : "鍙岀櫥",			//鐢垫睜鍝佺墝
+						BattProducer :getSelected(battproducer) ,			//鐢垫睜鍝佺墝
 						BattModel : $(battModel).val(),				//鐢垫睜鍨嬪彿
 						BattProductDate :  $("#startTestrecord").val(),		//鐢垫睜鐢熶骇鏃ユ湡
 						BattInUseDate :  $("#endTestrecord").val(),			//鐢垫睜浣跨敤鏃ユ湡
@@ -596,7 +605,7 @@
 					console.info(model);
 					if(model.code ==1){
 						alert("淇敼鎴愬姛");
-						window.location.href="batt-unapproved.html"
+						//window.location.href="batt-unapproved.html"
 					}else{
 						alert("淇敼澶辫触!");
 						window.location.href="batt-unapproved.html"
@@ -645,6 +654,24 @@
     	creatAllView(addbattnum).trigger('create');
     	creatBattGroupId(addbattnum);
    });
+   
+   
+   
+   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;
+   }
+  
+    
+  
     /* 鎿嶄綔鎴愬姛 
    $('#changeSuc').popup('open');
        鎿嶄綔澶辫触

--
Gitblit v1.9.1