Commit c8670bccff86b63500792b41e6adaf45994fc96c

Authored by 娄高锋
1 parent c5221dc5

页面时刻表类型选项改成可以看到包括启用和不启用的时刻表

src/main/resources/static/pages/forms/statement/busInterval.html
... ... @@ -305,6 +305,7 @@
305 305 params['company'] = company;
306 306 params['subCompany'] = subCompany;
307 307 params['type'] = "query";
  308 + var i = layer.load(2);
308 309 // $(".hidden").removeClass("hidden");
309 310 $get('/busInterval/interval', params, function(result){
310 311 // 把数据填充到模版中
... ... @@ -316,6 +317,7 @@
316 317 _w_table_rowspan("#forms tbody", 3);
317 318 _w_table_rowspan("#forms tbody", 4);
318 319 _w_table_rowspan("#forms tbody", 5);
  320 + layer.close(i);
319 321  
320 322 });
321 323 }
... ... @@ -341,10 +343,12 @@
341 343 params['company'] = company;
342 344 params['subCompany'] = subCompany;
343 345 params['type'] = "export";
  346 + var i = layer.load(2);
344 347 $get('/busInterval/interval', params, function(result){
345 348 window.open("/downloadFile/download?fileName=班次间隔统计表"
346 349 +moment(startDate).format("YYYYMMDD")+"-"
347 350 +moment(endDate).format("YYYYMMDD"));
  351 + layer.close(i);
348 352 });
349 353 });
350 354  
... ... @@ -395,21 +399,38 @@
395 399 flag = 1;
396 400 var treeData = [];
397 401 var params = {};
  402 +// if(statu == 0)
  403 +// params['line'] = " ";
  404 +// if(statu == 1)
  405 +// params['line'] = line;
  406 +// params['startDate'] = startDate;
  407 +// params['endDate'] = endDate;
  408 +// $get('/pcpc/getModel', params, function(result){
  409 +// treeData = createTreeData(result);
  410 +// var options = '<option value="">请选择...</option>';
  411 +// $.each(treeData, function(i, g){
  412 +// options += '<option value="'+g.id+'">'+g.name+'</option>';
  413 +// });
  414 +// $('#model').html(options)/* .select2() */;
  415 +// flag = 0;
  416 +// });
398 417 if(statu == 0)
399   - params['line'] = " ";
400   - if(statu == 1)
401   - params['line'] = line;
402   - params['startDate'] = startDate;
403   - params['endDate'] = endDate;
404   - $get('/pcpc/getModel', params, function(result){
405   - treeData = createTreeData(result);
406 418 var options = '<option value="">请选择...</option>';
407   - $.each(treeData, function(i, g){
408   - options += '<option value="'+g.id+'">'+g.name+'</option>';
409   - });
410 419 $('#model').html(options)/* .select2() */;
411 420 flag = 0;
412   - });
  421 + if(statu == 1){
  422 + params['xl.lineCode_eq'] = line;
  423 + $get('/tic_ec', params, function(result){
  424 + treeData = createTreeData(result.data.content);
  425 + var options = '<option value="">请选择...</option>';
  426 + $.each(treeData, function(i, g){
  427 + if(!g.isCancel)
  428 + options += '<option value="'+g.id+'">'+g.name+'</option>';
  429 + });
  430 + $('#model').html(options)/* .select2() */;
  431 + flag = 0;
  432 + });
  433 + }
413 434 }
414 435  
415 436 /**
... ...
src/main/resources/static/pages/forms/statement/lineTimeAnaly.html
... ... @@ -388,11 +388,14 @@
388 388 params['company'] = company;
389 389 params['subCompany'] = subCompany;
390 390 params['type'] = "query";
  391 + var i = layer.load(2);
391 392 $("#forms .hidden").removeClass("hidden");
392 393 $get('/busInterval/lineTimeAnaliy', params, function(result){
393 394 console.log(result);
394 395 // 把数据填充到模版中
395 396 var tbodyHtml = template('list_lineTimeAnaly',{list:result});
  397 + layer.close(i);
  398 +
396 399 // 把渲染好的模版html文本追加到表格中
397 400 $('#forms tbody').html(tbodyHtml);
398 401 $("#works_hidden").addClass("hidden");
... ... @@ -470,14 +473,25 @@
470 473 flag = 1;
471 474 var treeData = [];
472 475 var params = {};
473   - params['line'] = line;
474   - params['startDate'] = startDate;
475   - params['endDate'] = endDate;
476   - $get('/pcpc/getModel', params, function(result){
477   - treeData = createTreeData(result);
  476 +// params['line'] = line;
  477 +// params['startDate'] = startDate;
  478 +// params['endDate'] = endDate;
  479 +// $get('/pcpc/getModel', params, function(result){
  480 +// treeData = createTreeData(result);
  481 +// var options = '<option value="">请选择...</option>';
  482 +// $.each(treeData, function(i, g){
  483 +// options += '<option value="'+g.id+'">'+g.name+'</option>';
  484 +// });
  485 +// $('#model').html(options)/* .select2() */;
  486 +// flag = 0;
  487 +// });
  488 + params['xl.lineCode_eq'] = line;
  489 + $get('/tic_ec', params, function(result){
  490 + treeData = createTreeData(result.data.content);
478 491 var options = '<option value="">请选择...</option>';
479 492 $.each(treeData, function(i, g){
480   - options += '<option value="'+g.id+'">'+g.name+'</option>';
  493 + if(!g.isCancel)
  494 + options += '<option value="'+g.id+'">'+g.name+'</option>';
481 495 });
482 496 $('#model').html(options)/* .select2() */;
483 497 flag = 0;
... ...
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
... ... @@ -252,11 +252,13 @@
252 252 params['subCompany'] = subCompany;
253 253 params['type'] = "query";
254 254 $(".hidden").removeClass("hidden");
  255 + var i = layer.load(2);
255 256 $get('/pcpc/scheduleAnaly', params, function(result){
256 257 // 把数据填充到模版中
257 258 var tbodyHtml = template('list_scheduleAnaly',{list:result.dataList});
258 259 // 把渲染好的模版html文本追加到表格中
259 260 $('#forms tbody').html(tbodyHtml);
  261 + layer.close(i);
260 262  
261 263 if(result.dataList.length == 0)
262 264 $("#export").attr('disabled',"true");
... ... @@ -286,8 +288,10 @@
286 288 params['subCompany'] = subCompany;
287 289 params['bcType'] = bcType;
288 290 params['type'] = "export";
  291 + var i = layer.load(2);
289 292 $get('/pcpc/scheduleAnaly', params, function(result){
290 293 window.open("/downloadFile/download?fileName=时刻表分析"+moment(startDate).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD"));
  294 + layer.close(i);
291 295 });
292 296 });
293 297  
... ... @@ -311,16 +315,27 @@
311 315 flag = 1;
312 316 var treeData = [];
313 317 var params = {};
314   - params['line'] = line;
315   - params['startDate'] = startDate;
316   - params['endDate'] = endDate;
317   - $get('/pcpc/getModel', params, function(result){
318   - treeData = createTreeData(result);
  318 +// params['line'] = line;
  319 +// params['startDate'] = startDate;
  320 +// params['endDate'] = endDate;
  321 +// $get('/pcpc/getModel', params, function(result){
  322 +// treeData = createTreeData(result);
  323 +// var options = '<option value="">请选择...</option>';
  324 +// var size = 0;
  325 +// $.each(treeData, function(i, g){
  326 +// options += '<option value="'+g.id+'">'+g.name+'</option>';
  327 +// size++;
  328 +// });
  329 +// $('#model').html(options)/* .select2() */;
  330 +// flag = 0;
  331 +// });
  332 + params['xl.lineCode_eq'] = line;
  333 + $get('/tic_ec', params, function(result){
  334 + treeData = createTreeData(result.data.content);
319 335 var options = '<option value="">请选择...</option>';
320   - var size = 0;
321 336 $.each(treeData, function(i, g){
322   - options += '<option value="'+g.id+'">'+g.name+'</option>';
323   - size++;
  337 + if(!g.isCancel)
  338 + options += '<option value="'+g.id+'">'+g.name+'</option>';
324 339 });
325 340 $('#model').html(options)/* .select2() */;
326 341 flag = 0;
... ...
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
... ... @@ -121,14 +121,6 @@
121 121 if (!$('body').hasClass('page-sidebar-closed'))
122 122 $('.menu-toggler.sidebar-toggler').click();
123 123  
124   - $("#startDate").datetimepicker({
125   - format : 'YYYY-MM-DD',
126   - locale : 'zh-cn'
127   - });
128   - $("#endDate").datetimepicker({
129   - format : 'YYYY-MM-DD',
130   - locale : 'zh-cn'
131   - });
132 124  
133 125 $("#times1").datetimepicker({
134 126 format : 'HH:mm',
... ... @@ -140,6 +132,7 @@
140 132 });
141 133  
142 134 var d = new Date();
  135 + d.setTime(d.getTime() - 1*1000*60*60*24);
143 136 var year = d.getFullYear();
144 137 var month = d.getMonth() + 1;
145 138 var day = d.getDate();
... ... @@ -147,8 +140,19 @@
147 140 month = "0" + month;
148 141 if(day < 10)
149 142 day = "0" + day;
150   - $("#startDate").val(year + "-" + month + "-" + day);
151   - $("#endDate").val(year + "-" + month + "-" + day);
  143 + var dateTime = year + "-" + month + "-" + day;
  144 + $("#startDate").datetimepicker({
  145 + format : 'YYYY-MM-DD',
  146 + locale : 'zh-cn',
  147 + maxDate : dateTime
  148 + });
  149 + $("#endDate").datetimepicker({
  150 + format : 'YYYY-MM-DD',
  151 + locale : 'zh-cn',
  152 + maxDate : dateTime
  153 + });
  154 + $("#startDate").val(dateTime);
  155 + $("#endDate").val(dateTime);
152 156  
153 157 $("#times1").val("05:00");
154 158 $("#times2").val("23:00");
... ... @@ -329,6 +333,7 @@
329 333 params['subCompany'] = subCompany;
330 334 params['type'] = "query";
331 335 // $(".hidden").removeClass("hidden");
  336 + var i = layer.load(2);
332 337 $get('/busInterval/timeAndSpeed', params, function(result){
333 338 // 把数据填充到模版中
334 339 var tbodyHtml = template('list_timeAndSpeed', {list:result});
... ... @@ -336,6 +341,7 @@
336 341 $('#forms').html(tbodyHtml);
337 342 list = result;
338 343 $("#works_hidden").addClass("hidden");
  344 + layer.close(i);
339 345  
340 346 _w_table_rowspan("#forms", 1);
341 347 _w_table_rowspan("#forms", 2);
... ... @@ -388,10 +394,12 @@
388 394 params['company'] = company;
389 395 params['subCompany'] = subCompany;
390 396 params['type'] = "export";
  397 + var i = layer.load(2);
391 398 $get('/busInterval/timeAndSpeed', params, function(result){
392 399 window.open("/downloadFile/download?fileName=行驶时间及车速统计表"
393 400 +moment(startDate).format("YYYYMMDD")+"-"
394 401 +moment(endDate).format("YYYYMMDD"));
  402 + layer.close(i);
395 403 });
396 404 });
397 405  
... ... @@ -447,21 +455,38 @@
447 455 flag = 1;
448 456 var treeData = [];
449 457 var params = {};
  458 +// if(statu == 0)
  459 +// params['line'] = " ";
  460 +// if(statu == 1)
  461 +// params['line'] = line;
  462 +// params['startDate'] = startDate;
  463 +// params['endDate'] = endDate;
  464 +// $get('/pcpc/getModel', params, function(result){
  465 +// treeData = createTreeData(result);
  466 +// var options = '<option value="">请选择...</option>';
  467 +// $.each(treeData, function(i, g){
  468 +// options += '<option value="'+g.id+'">'+g.name+'</option>';
  469 +// });
  470 +// $('#model').html(options);
  471 +// flag = 0;
  472 +// });
450 473 if(statu == 0)
451   - params['line'] = " ";
452   - if(statu == 1)
453   - params['line'] = line;
454   - params['startDate'] = startDate;
455   - params['endDate'] = endDate;
456   - $get('/pcpc/getModel', params, function(result){
457   - treeData = createTreeData(result);
458 474 var options = '<option value="">请选择...</option>';
459   - $.each(treeData, function(i, g){
460   - options += '<option value="'+g.id+'">'+g.name+'</option>';
461   - });
462   - $('#model').html(options);
  475 + $('#model').html(options)/* .select2() */;
463 476 flag = 0;
464   - });
  477 + if(statu == 1){
  478 + params['xl.lineCode_eq'] = line;
  479 + $get('/tic_ec', params, function(result){
  480 + treeData = createTreeData(result.data.content);
  481 + var options = '<option value="">请选择...</option>';
  482 + $.each(treeData, function(i, g){
  483 + if(!g.isCancel)
  484 + options += '<option value="'+g.id+'">'+g.name+'</option>';
  485 + });
  486 + $('#model').html(options)/* .select2() */;
  487 + flag = 0;
  488 + });
  489 + }
465 490 }
466 491  
467 492 function updateLp(ttId){
... ...