| | |
| | | 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>'
|
| | | ,nomCap='<tr>'+'<td>'+'标称容量'+'</td>'+'<td>'+'<input type="text" '+'id='+'nomCap'+index+' data-mini="true"'+'value='+'标称容量'+count+' />'+'</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>';
|
| | | return battTitle+battBrand+battType+battNum+nomCap+battIndex+battName; |
| | | |
| | | return battTitle+battBrand+battType+battNum+nomCap+battIndex+battName; |
| | | }
|
| | | function creatBa(a){
|
| | | var battnum=4-a,
|
| | |
| | | }
|
| | |
|
| | |
|
| | | function selectedIndex(index){
|
| | | function selectedIndex(index){
|
| | | var selected='',
|
| | | i=0;
|
| | | selected+= '<option '+'value='+'理士'+'>'+'理士'+'</option>';
|
| | | selected+= '<option '+'value='+'圣阳'+'>'+'圣阳'+'</option>';
|
| | | selected+= '<option '+'value='+'双登'+'>'+'双登'+'</option>';
|
| | | selected+= '<option '+'value='+'SENRY'+'>'+'SENRY'+'</option>';
|
| | | selected+= '<option '+'value='+'南都'+'>'+'南都'+'</option>';
|
| | | selected+= '<option '+'value='+'爱默生'+'>'+'爱默生'+'</option>';
|
| | | selected+= '<option '+'value='+'科士达'+'>'+'科士达'+'</option>';
|
| | | selected+= '<option '+'value='+'银泰'+'>'+' 银泰'+'</option>';
|
| | | selected+= '<option '+'value='+'丰日'+'>'+' 丰日'+'</option>';
|
| | | selected+= '<option '+'value='+'中兴能派'+'>'+' 中兴能派'+'</option>';
|
| | | selected+= '<option '+'value='+'光宇'+'>'+' 光宇'+'</option>'; |
| | | selected+= '<option '+'value='+'艾诺斯华达'+'>'+'艾诺斯华达'+'</option>';
|
| | | selected+= '<option '+'value='+'雄韬'+'>'+' 雄韬'+'</option>';
|
| | | selected+= '<option '+'value='+'风帆'+'>'+' 风帆'+'</option>';
|
| | | selected+= '<option '+'value='+'文隆'+'>'+' 文隆'+'</option>';
|
| | | selected+= '<option '+'value='+'风帆'+'>'+' 风帆'+'</option>';
|
| | | selected+= '<option '+'value='+'中山'+'>'+' 中山'+'</option>';
|
| | | selected+= '<option '+'value='+'美的'+'>'+' 美的'+'</option>';
|
| | | selected+= '<option '+'value='+'朗达'+'>'+' 朗达'+'</option>';
|
| | | var battproducer = ["理士","圣阳","双登","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("eleparm");
|
| | |
| | | //导入表格默认数据
|
| | | 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; //市
|
| | |
| | | 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;
|
| | |
| | | //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); |
| | | console.info($(battproducer)[0]);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | 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()
|
| | |
| | | DisCurrMax : $("#DisCurrMax").val(), //最大核容电流
|
| | | station_phone : $("#station_phone").val(), //基站号码
|
| | |
|
| | | BattProducer : "双登", //电池品牌
|
| | | BattProducer :getSelected(battproducer) , //电池品牌
|
| | | BattModel : $(battModel).val(), //电池型号
|
| | | BattProductDate : $("#startTestrecord").val(), //电池生产日期
|
| | | BattInUseDate : $("#endTestrecord").val(), //电池使用日期
|
| | |
| | | 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');
|
| | | 操作失败
|