| | |
| | | <script src="js/jquery-1.8.3.js"></script>
|
| | | <script src="mobilJs/jquery.mobile-1.4.5.min.js"></script>
|
| | | <style type="text/css">
|
| | | /*规定面板的样式*/
|
| | | .ui-panel {
|
| | | width: 80%;
|
| | | }
|
| | | .ui-panel-dismiss{
|
| | | width: 20%;
|
| | | }
|
| | | .ui-panel-inner{
|
| | | padding:0 !important;
|
| | | }
|
| | | .ui-collapsible-heading-toggle{
|
| | | padding-left: 1em !important;
|
| | | }
|
| | | .panel-header{
|
| | | padding: 8px 0;
|
| | | font-size: 1.2em;
|
| | | text-indent: 1em;
|
| | | background-color: #DFDCDC;
|
| | | }
|
| | | /*规定开关的位置*/
|
| | | .ui-flipswitch {
|
| | | margin-left: 0.5em;
|
| | | }
|
| | | |
| | | .ui-field-contain{
|
| | | padding: 0 0.6em ;
|
| | | }
|
| | | .ui-field-contain {
|
| | | border-bottom-color: #828282;
|
| | | border-bottom-color: rgba(0,0,0,.15);
|
| | | border-bottom-width: 1px;
|
| | | border-bottom-style: none;
|
| | | }
|
| | | |
| | | |
| | |
|
| | |
|
| | | .checkdata{
|
| | |
| | | width:100%;
|
| | | }
|
| | | .mt6{
|
| | | margin:6em 0 0 0;
|
| | | margin:16em 0 0 0;
|
| | | }
|
| | | .pl5{
|
| | | padding-left:5.9em;
|
| | |
| | |
|
| | | }
|
| | | .mt7{
|
| | | margin-top:8em;
|
| | | margin-top:18em;
|
| | | }
|
| | | </style>
|
| | | <link rel="stylesheet" href="css/fgpanel.css">
|
| | | </head>
|
| | | <body >
|
| | | |
| | | <body data-genuitec-lp-enabled="false" data-genuitec-file-id="wc1-258" data-genuitec-path="/gx_tieta/WebRoot/mobil/ele-param2.html">
|
| | | <div class="fg-panel" data-genuitec-lp-enabled="false" data-genuitec-file-id="wc1-258" data-genuitec-path="/gx_tieta/WebRoot/mobil/ele-param2.html">
|
| | | <form>
|
| | | <div class="fg-panel-header">筛选</div>
|
| | | <div class="fg-panel-content">
|
| | | <fieldset data-role="controlgroup">
|
| | | <p>省</p>
|
| | | <select id="mainteArea" data-mini="true">
|
| | | <option value="">全部</option>
|
| | | <option value="">一枢纽</option>
|
| | | <option value="">二枢纽</option>
|
| | | <option value="">枢纽楼</option>
|
| | | </select>
|
| | | <p>市</p>
|
| | | <select id="city" data-mini="true">
|
| | | <option value="">全部</option>
|
| | | </select>
|
| | | <p>区/县</p>
|
| | | <select id="country" data-mini="true">
|
| | | <option value="">全部</option>
|
| | | </select>
|
| | | <p>机房站点</p>
|
| | | <select id="homeName" data-mini="true">
|
| | | <option value="">全部</option>
|
| | | </select>
|
| | | |
| | | </fieldset>
|
| | | </div>
|
| | | <div class="fg-panel-btn">
|
| | | <a href="javascript:panel.hide(true);" id="submit" data-role="button" class="ui-btn ui-mini ui-btn-b ui-shadow">确定</a>
|
| | | </div>
|
| | | </form>
|
| | | </div> |
| | | <div class="abs">
|
| | | <div class="rel-full">
|
| | | <div class="page-header bg-gay3">
|
| | |
| | | </div>
|
| | | <div class="layui-col-xs6 layui-col-md10 full-height line-height40">申请电池组安装</div>
|
| | | <div class="layui-col-xs3 layui-col-md1 full-height line-height40 t-align-right t-align-right">
|
| | | <!-- <button class="layui-btn layui-btn-primary layui-btn-sm mrr8" id="homeInfo"><i class="fa fa fa-bars mrr4"></i>功能</button> -->
|
| | | |
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | |
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label"><i class="fa fa-search"></i></label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="title" id="searchInput1" autocomplete="off" placeholder="机房搜索" class="layui-input">
|
| | | <input type="text" name="title" id="searchInput1" autocomplete="off" placeholder="请输入新建机房名或关键字" class="layui-input">
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <button onclick="javascript:panel.show();" class="layui-btn layui-btn-primary layui-btn-sm mrr8" id="screen"><i class="fa fa fa-bars mrr4"></i>筛选</button> |
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | |
| | | <div data-role="navbar">
|
| | | <ul>
|
| | | <li><a href="index.html" id="cancel" class="ui-btn ui-btn-inline ui-corner-all ui-btn-icon-delete" data-position-to="window" data-icon="home" data-role="button">首页</a></li>
|
| | | <li><a href="#yourPopup" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all ui-btn-icon-check" data-position-to="window" data-icon="check" data-role="button">新建</a></li>
|
| | | <li><a href="#yourPopup" data-rel="popup" id="creatn" class="ui-btn ui-btn-inline ui-corner-all ui-btn-icon-check" data-position-to="window" data-icon="check" data-role="button">新建机房</a></li>
|
| | | </ul>
|
| | | </div>
|
| | | </div>
|
| | |
| | | <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">
|
| | |
| | | <div id="homeLocation"></div>
|
| | | <!-- 存在机房信息 -->
|
| | | <div id="homeInfoIframe"></div>
|
| | | <input id="handle_status" value="" type="hidden">
|
| | | <input id="jifangname" value="" type="hidden">
|
| | | <script src="src/layui.all.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="js/panel.js"></script>
|
| | | <script>
|
| | | var iframePopup = '';
|
| | | function getEditButIndex(t){
|
| | | console.warn($(t).attr("but-index")+' 修改');
|
| | | var index = $(t).attr("but-index"); |
| | | var parm = seteditparm(index);
|
| | | console.info(getCookie("eleparm"));
|
| | | //window.location.href="batt-edit.html"; |
| | | var index = $(t).attr("but-index");
|
| | | |
| | | var parm = seteditparm(t);
|
| | | // console.info(getCookie("eleparm"));
|
| | | window.location.href="batt-edit2.html"; |
| | | return ;
|
| | | }
|
| | |
|
| | |
| | |
|
| | |
|
| | |
|
| | | $(document).ready(function(){
|
| | | //setPage();
|
| | | $("#submit").off('click').on('click.cjj123',function(){
|
| | | //newbattnum;
|
| | | //var homename= $('#homename').val()
|
| | | //Page.pageCurr=1;
|
| | | //console.info(homename);
|
| | | //console.info($('#homeName').val());
|
| | | if($('#homeName').val()&&$('#homeName').val()!=""){
|
| | | SearchParam();
|
| | | }else{
|
| | | alert("请选择一个机房");
|
| | | }
|
| | | });
|
| | | });
|
| | | |
| | | |
| | | // 搜索机房获取焦点
|
| | | $('#searchInput1').off('focus.alert').on('focus.alert', function() {
|
| | | $(this).blur();
|
| | |
| | | ,full: true
|
| | | ,anim: 5
|
| | | ,content: 'iframe/searchBatt.html'
|
| | | ,success:function(layero,index){}
|
| | | ,end:function(){
|
| | | var handle_status = $("#handle_status").val();
|
| | | if ( handle_status == '1' ) {
|
| | | $("#creatn").click();
|
| | | |
| | | } |
| | | }
|
| | | });
|
| | | });
|
| | |
|
| | |
| | | StationName1:'',
|
| | | StationName2: '',
|
| | | StationName5:''
|
| | | };
|
| | | |
| | | }; |
| | | loadshow();
|
| | | // 查询机房信息
|
| | | $.post("BattInfAction!serchStationName3","json="+JSON.stringify(tmp),function(result){
|
| | | var rs = JSON.parse(result.result);
|
| | |
| | | //console.log(homeSource)
|
| | | // 设置资源内容
|
| | | $('#searchHomeIframe').data('homeSource', homeSource);
|
| | | loadclose();
|
| | | }
|
| | | });
|
| | |
|
| | | }
|
| | | |
| | | |
| | | |
| | | |
| | |
|
| | | //
|
| | | $('#homeLocation').off('click').on('click.cjj', function() {
|
| | | var homeInfo = $(this).data('homeInfo');
|
| | | console.warn(homeInfo);
|
| | | searchBattLife();
|
| | | var temp=createSearchParam();
|
| | | searchBattLife(temp);
|
| | | });
|
| | |
|
| | |
|
| | |
| | | };
|
| | |
|
| | |
|
| | | $("#sure").click(function(){
|
| | | $("#sure").off('click').on('click.cjj123',function(){
|
| | | var currentlength = Math.floor(arrTd.length/34);
|
| | | if(currentlength<Page.pageSize){
|
| | | setcookieCreat(currentlength-1);
|
| | | }else{
|
| | | setcookieCreat(Page.pageSize-1);
|
| | | }
|
| | | var test=getCookie("eleparm2newbatt");
|
| | | console.info(test);
|
| | | var jiafangname = $("#jifangname").val();
|
| | | console.info($("#jifangname").val());
|
| | | console.info(test);
|
| | | window.location.href="batt-infor-conf-temp1.html";
|
| | | });
|
| | |
|
| | |
| | | var endTime = new Date().format('yyyy-MM-dd');
|
| | | var tbl = $('.tbl-container');
|
| | | createTbl(tbl, arrTh, dataArr);
|
| | | serchProducer();
|
| | | $(document).ready(function(){
|
| | | setPage();
|
| | | //newbattnum;
|
| | |
| | | function seteditparm(index){
|
| | | if(arrdata.length>0){ //存入的为所有已查出数据
|
| | | console.info(arrdata);
|
| | | var arr= creatYanshouObj(arrdata,index);//申请验收方法。
|
| | | var arr= creatYanshouObj(arrdata,index);
|
| | | return arr;
|
| | | }else{
|
| | | alert("请等待几秒后再提交申请");
|
| | |
| | | }
|
| | |
|
| | | function creatYanshouObj(arrdata,index){
|
| | | console.info(arrdata[0]);
|
| | | console.info(index);
|
| | | var StationId = arrdata[index].StationId;
|
| | | //console.info(StationId);
|
| | | var arr = new Array(); //初始化传参数组
|
| | |
| | | StationName2 : arrdata[i].StationName2, // 市
|
| | | StationName5 : arrdata[i].StationName5, // 区/县
|
| | | StationName3 : arrdata[i].StationName3, // 机房名称
|
| | | StationName4 : arrdata[i].StationName5, // 设备名称
|
| | | StationName4 : arrdata[i].StationName4, // 设备名称
|
| | | StationIp :arrdata[i].StationIp, //机房ip
|
| | | FBSDeviceId : arrdata[i].FBSDeviceId, //设备id
|
| | | FbsDeviceIp : arrdata[i].FbsDeviceIp, //设备ip
|
| | |
| | |
|
| | | BattProducer : arrdata[i].BattProducer, //电池品牌
|
| | | BattModel : arrdata[i].BattModel, //电池型号
|
| | | BattProductDate : arrdata[i].BattProductDate+" 00:00:00", //电池生产日期
|
| | | BattInUseDate : arrdata[i].BattInUseDate+" 00:00:00", //电池使用日期
|
| | | BattProductDate : arrdata[i].BattProductDate, //电池生产日期
|
| | | BattInUseDate : arrdata[i].BattInUseDate, //电池使用日期
|
| | | install_user : arrdata[i].install_user, //安装人员
|
| | | }
|
| | | }
|
| | |
| | | setCookie("eleparm",json);
|
| | | }
|
| | |
|
| | |
|
| | | function SearchParam(){
|
| | | var temp = { |
| | | page:Page,
|
| | | binf:{
|
| | | StationName1:$('#mainteArea').val(),
|
| | | StationName2:$('#city').val(),
|
| | | StationName5: $('#country').val(),
|
| | | StationName:$('#homeName').val(),
|
| | | },
|
| | | };
|
| | | console.info(temp);
|
| | | searchBattLife(temp); |
| | | } |
| | | // 查询内容
|
| | | function searchBattLife(){
|
| | | var temp = createSearchParam();
|
| | | function searchBattLife(temp){
|
| | | //var temp = createSearchParam();
|
| | | var json = JSON.stringify(temp);
|
| | | var num =new Array();
|
| | | var groupId = new Array();
|
| | |
| | | arrTd.push(data[i].BattProductDate.substr(0,10)); //电池生产日期
|
| | | arrTd.push(data[i].BattInUseDate.substr(0,10)); //投入使用日期
|
| | | arrTd.push(data[i].install_user); // 设备安装人员
|
| | | arrTd.push('<a onclick="getEditButIndex(this)" id="edit" class="ui-btn ui-btn-inline ui-corner-all operat-but" data-position-to="window"'+'but-index='+i+'>修改</a>');
|
| | | arrTd.push("");
|
| | | //arrTd.push('<a onclick="getEditButIndex(this)" id="edit" class="ui-btn ui-btn-inline ui-corner-all operat-but" data-position-to="window"'+'but-index='+i+'>修改</a>');
|
| | | Page.pageAll = data[i].num;
|
| | | groupName.push(data[i].BattGroupName);
|
| | | |
| | | num.push(data.length);
|
| | | groupId.push(data[i].BattGroupId);
|
| | | |
| | | }
|
| | | var json = JSON.stringify(groupName);
|
| | | var json1 =JSON.stringify(num);
|
| | | var json2 = JSON.stringify(groupId);
|
| | | |
| | | setCookie("eleparmindex",json); //电池组名称
|
| | | setCookie("eleparmnum",json1); //电池组编号
|
| | |
|
| | | setCookie("elegroupid",json2);
|
| | | |
| | | }else{
|
| | | Page.pageAll = 0;
|
| | | }
|
| | | setPage();
|
| | | createTbl(tblCon, arrTh, arrTd); |
| | | //createTbl(tblCon, arrTh, arrTd); |
| | | getEditButIndex(0); |
| | | }
|
| | | });
|
| | |
|
| | |
|
| | | }
|
| | | //构造查询条件
|
| | |
| | | return temp;
|
| | |
|
| | | }
|
| | | |
| | | |
| | | |
| | | |
| | | //页面加载时查询省
|
| | | $.post("BattInfAction_serchByStation",null,function(data){
|
| | | data = data.result;
|
| | | data = eval("("+data+")");
|
| | | if(data.code==1&&data.data.length>0){
|
| | | var $Ostation_name1=$("#mainteArea");
|
| | | $Ostation_name1.text("");
|
| | | var arr = new Array();
|
| | | for(var i=0;i<=data.data.length;i++)
|
| | | {
|
| | | if(i == 0){
|
| | | arr.push({
|
| | | val:"",
|
| | | txt:"全部(共"+data.sum+"个)", |
| | | });
|
| | | }else{
|
| | | arr.push({
|
| | | val:data.data[i-1].StationName1,
|
| | | txt:data.data[i-1].StationName1,
|
| | | });
|
| | | }
|
| | | }
|
| | | updataSel($Ostation_name1, arr);
|
| | | }
|
| | | findCity();
|
| | | });
|
| | |
|
| | | |
| | | //当省改变时更新市
|
| | | function findCity(){
|
| | | var data = {
|
| | | StationName1: $("#mainteArea").val()
|
| | | };
|
| | | $.ajax({ |
| | | type: "post", |
| | | url: "BattInfAction!serchStationName2", |
| | | async:true, |
| | | dataType:'json',
|
| | | data:"json = "+JSON.stringify(data), |
| | | success: function(data){
|
| | | data = data.result;
|
| | | data = eval("("+data+")");
|
| | | //console.info(data);
|
| | | //console.info(data.code); |
| | | if(data.code==1&&data.data.length>0){
|
| | | var $Ostation_name1=$("#city");
|
| | | $Ostation_name1.text("");
|
| | | var arr = new Array();
|
| | | for(var i=0;i<=data.data.length;i++)
|
| | | {
|
| | | if(i == 0){
|
| | | arr.push({
|
| | | val:"",
|
| | | txt:"全部(共"+data.data.length+"个)",
|
| | | });
|
| | | }else{
|
| | | arr.push({
|
| | | val:data.data[i-1].StationName2,
|
| | | txt:data.data[i-1].StationName2,
|
| | | });
|
| | | }
|
| | | }
|
| | | updataSel($Ostation_name1, arr);
|
| | | }
|
| | | findCounty();
|
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | //当市改变时更新区/县
|
| | | function findCounty(){
|
| | | var data = {
|
| | | StationName1: $("#mainteArea").val(),
|
| | | StationName2:$("#city").val(),
|
| | | };
|
| | | //console.info(data);
|
| | | $.ajax({ |
| | | type: "post", |
| | | url: "BattInfAction!serchStationName5", |
| | | async:true, |
| | | dataType:'json',
|
| | | data:"json = "+JSON.stringify(data), |
| | | success: function(data){
|
| | | data = data.result;
|
| | | data = eval("("+data+")");
|
| | | //console.info(data);
|
| | | //console.info(data.code); |
| | | if(data.code==1&&data.data.length>0){
|
| | | var $Ostation_name1=$("#country");
|
| | | $Ostation_name1.text("");
|
| | | var arr = new Array();
|
| | | for(var i=0;i<=data.data.length;i++)
|
| | | {
|
| | | if(i == 0){
|
| | | arr.push({
|
| | | val:"",
|
| | | txt:"全部(共"+data.data.length+"个)",
|
| | | });
|
| | | }else{
|
| | | arr.push({
|
| | | val:data.data[i-1].StationName5,
|
| | | txt:data.data[i-1].StationName5,
|
| | | });
|
| | | }
|
| | | }
|
| | | updataSel($Ostation_name1, arr);
|
| | | }
|
| | | findStationNamebyStationname1(); |
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | //当区县更新时更新机房 |
| | | function findStationNamebyStationname1(){
|
| | | var jifang = new Array();
|
| | | var data = {
|
| | | StationName1: $("#mainteArea").val(),
|
| | | StationName2:$("#city").val(),
|
| | | StationName5:$("#country").val()
|
| | | };
|
| | | //console.info(data);
|
| | | $.ajax({ |
| | | type: "post", |
| | | url: "BattInfAction!serchStationName3", |
| | | async:true, |
| | | dataType:'json',
|
| | | data:"json = "+JSON.stringify(data), |
| | | success: function(data){
|
| | | data = data.result;
|
| | | data = eval("("+data+")");
|
| | | //console.info(data);
|
| | | //console.info(data.code); |
| | | if(data.code==1&&data.data.length>0){
|
| | | var $Ostation_name1=$("#homeName");
|
| | | $Ostation_name1.text("");
|
| | | var arr = new Array();
|
| | | data=data.data
|
| | | for(var i=0;i<data.length;i++){
|
| | | if(data[i].Station_install==0){
|
| | | jifang.push(data[i]);
|
| | | }
|
| | | }
|
| | | |
| | | for(var i=0;i<=jifang.length;i++)
|
| | | {
|
| | | if(i == 0){
|
| | | arr.push({
|
| | | val:"",
|
| | | stationid:"",
|
| | | txt:"全部(共"+jifang.length+"个)",
|
| | | });
|
| | | }else{
|
| | | arr.push({
|
| | | val:jifang[i-1].StationName3,
|
| | | stationid:jifang[i-1].StationId,
|
| | | txt:jifang[i-1].StationName3,
|
| | | });
|
| | | }
|
| | | }
|
| | | //console.info(111111111111111);
|
| | | updataSelStation($Ostation_name1, arr);
|
| | | }
|
| | | |
| | | |
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | |
| | | |
| | | //当省改变时更新市
|
| | | $('#mainteArea').change(function(){
|
| | | findCity(); |
| | | });
|
| | | //当市改变时改变区/县
|
| | | $('#city').change(function(){
|
| | | findCounty(); |
| | | });
|
| | | //当区/县改变时改变机房
|
| | | $('#country').change(function(){
|
| | | findStationNamebyStationname1(); |
| | | }); |
| | | |
| | | |
| | | |
| | |
|
| | |
|
| | | $(function() {
|
| | |
| | |
|
| | | }
|
| | |
|
| | | function serchProducer(){
|
| | | var battproducer = new Array(); |
| | | $.ajax({
|
| | | type: 'post'
|
| | | ,async: false
|
| | | ,url: 'BattInfAction!serchByBattProducer'
|
| | | ,data: null
|
| | | ,dataType: 'json'
|
| | | ,success:function(res) {
|
| | | //console.info(res);
|
| | | data = JSON.parse(res.result);
|
| | | console.info(data.data);
|
| | | if(data.code==1&&data.data.length>0){
|
| | | data = data.data;
|
| | | for(var i=0;i<data.length;i++){
|
| | | //console.info(data);
|
| | | battproducer.push(data[i].BattProducer); |
| | | } |
| | | }
|
| | | var json = window.JSON.stringify(battproducer);
|
| | | setCookie("producer",json);
|
| | | //var battproduce = getCookie("producer");
|
| | | //battproduce1 = JSON.parse(battproduce);
|
| | | //console.info(battproduce1);
|
| | | } |
| | | });
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | |
| | |
|
| | |
|
| | |
|
| | |
|
| | | </script>
|
| | | </body>
|
| | | </html> |