Commit c8670bccff86b63500792b41e6adaf45994fc96c
1 parent
c5221dc5
页面时刻表类型选项改成可以看到包括启用和不启用的时刻表
Showing
4 changed files
with
122 additions
and
47 deletions
src/main/resources/static/pages/forms/statement/busInterval.html
| @@ -305,6 +305,7 @@ | @@ -305,6 +305,7 @@ | ||
| 305 | params['company'] = company; | 305 | params['company'] = company; |
| 306 | params['subCompany'] = subCompany; | 306 | params['subCompany'] = subCompany; |
| 307 | params['type'] = "query"; | 307 | params['type'] = "query"; |
| 308 | + var i = layer.load(2); | ||
| 308 | // $(".hidden").removeClass("hidden"); | 309 | // $(".hidden").removeClass("hidden"); |
| 309 | $get('/busInterval/interval', params, function(result){ | 310 | $get('/busInterval/interval', params, function(result){ |
| 310 | // 把数据填充到模版中 | 311 | // 把数据填充到模版中 |
| @@ -316,6 +317,7 @@ | @@ -316,6 +317,7 @@ | ||
| 316 | _w_table_rowspan("#forms tbody", 3); | 317 | _w_table_rowspan("#forms tbody", 3); |
| 317 | _w_table_rowspan("#forms tbody", 4); | 318 | _w_table_rowspan("#forms tbody", 4); |
| 318 | _w_table_rowspan("#forms tbody", 5); | 319 | _w_table_rowspan("#forms tbody", 5); |
| 320 | + layer.close(i); | ||
| 319 | 321 | ||
| 320 | }); | 322 | }); |
| 321 | } | 323 | } |
| @@ -341,10 +343,12 @@ | @@ -341,10 +343,12 @@ | ||
| 341 | params['company'] = company; | 343 | params['company'] = company; |
| 342 | params['subCompany'] = subCompany; | 344 | params['subCompany'] = subCompany; |
| 343 | params['type'] = "export"; | 345 | params['type'] = "export"; |
| 346 | + var i = layer.load(2); | ||
| 344 | $get('/busInterval/interval', params, function(result){ | 347 | $get('/busInterval/interval', params, function(result){ |
| 345 | window.open("/downloadFile/download?fileName=班次间隔统计表" | 348 | window.open("/downloadFile/download?fileName=班次间隔统计表" |
| 346 | +moment(startDate).format("YYYYMMDD")+"-" | 349 | +moment(startDate).format("YYYYMMDD")+"-" |
| 347 | +moment(endDate).format("YYYYMMDD")); | 350 | +moment(endDate).format("YYYYMMDD")); |
| 351 | + layer.close(i); | ||
| 348 | }); | 352 | }); |
| 349 | }); | 353 | }); |
| 350 | 354 | ||
| @@ -395,21 +399,38 @@ | @@ -395,21 +399,38 @@ | ||
| 395 | flag = 1; | 399 | flag = 1; |
| 396 | var treeData = []; | 400 | var treeData = []; |
| 397 | var params = {}; | 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 | if(statu == 0) | 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 | var options = '<option value="">请选择...</option>'; | 418 | var options = '<option value="">请选择...</option>'; |
| 407 | - $.each(treeData, function(i, g){ | ||
| 408 | - options += '<option value="'+g.id+'">'+g.name+'</option>'; | ||
| 409 | - }); | ||
| 410 | $('#model').html(options)/* .select2() */; | 419 | $('#model').html(options)/* .select2() */; |
| 411 | flag = 0; | 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,11 +388,14 @@ | ||
| 388 | params['company'] = company; | 388 | params['company'] = company; |
| 389 | params['subCompany'] = subCompany; | 389 | params['subCompany'] = subCompany; |
| 390 | params['type'] = "query"; | 390 | params['type'] = "query"; |
| 391 | + var i = layer.load(2); | ||
| 391 | $("#forms .hidden").removeClass("hidden"); | 392 | $("#forms .hidden").removeClass("hidden"); |
| 392 | $get('/busInterval/lineTimeAnaliy', params, function(result){ | 393 | $get('/busInterval/lineTimeAnaliy', params, function(result){ |
| 393 | console.log(result); | 394 | console.log(result); |
| 394 | // 把数据填充到模版中 | 395 | // 把数据填充到模版中 |
| 395 | var tbodyHtml = template('list_lineTimeAnaly',{list:result}); | 396 | var tbodyHtml = template('list_lineTimeAnaly',{list:result}); |
| 397 | + layer.close(i); | ||
| 398 | + | ||
| 396 | // 把渲染好的模版html文本追加到表格中 | 399 | // 把渲染好的模版html文本追加到表格中 |
| 397 | $('#forms tbody').html(tbodyHtml); | 400 | $('#forms tbody').html(tbodyHtml); |
| 398 | $("#works_hidden").addClass("hidden"); | 401 | $("#works_hidden").addClass("hidden"); |
| @@ -470,14 +473,25 @@ | @@ -470,14 +473,25 @@ | ||
| 470 | flag = 1; | 473 | flag = 1; |
| 471 | var treeData = []; | 474 | var treeData = []; |
| 472 | var params = {}; | 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 | var options = '<option value="">请选择...</option>'; | 491 | var options = '<option value="">请选择...</option>'; |
| 479 | $.each(treeData, function(i, g){ | 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 | $('#model').html(options)/* .select2() */; | 496 | $('#model').html(options)/* .select2() */; |
| 483 | flag = 0; | 497 | flag = 0; |
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
| @@ -252,11 +252,13 @@ | @@ -252,11 +252,13 @@ | ||
| 252 | params['subCompany'] = subCompany; | 252 | params['subCompany'] = subCompany; |
| 253 | params['type'] = "query"; | 253 | params['type'] = "query"; |
| 254 | $(".hidden").removeClass("hidden"); | 254 | $(".hidden").removeClass("hidden"); |
| 255 | + var i = layer.load(2); | ||
| 255 | $get('/pcpc/scheduleAnaly', params, function(result){ | 256 | $get('/pcpc/scheduleAnaly', params, function(result){ |
| 256 | // 把数据填充到模版中 | 257 | // 把数据填充到模版中 |
| 257 | var tbodyHtml = template('list_scheduleAnaly',{list:result.dataList}); | 258 | var tbodyHtml = template('list_scheduleAnaly',{list:result.dataList}); |
| 258 | // 把渲染好的模版html文本追加到表格中 | 259 | // 把渲染好的模版html文本追加到表格中 |
| 259 | $('#forms tbody').html(tbodyHtml); | 260 | $('#forms tbody').html(tbodyHtml); |
| 261 | + layer.close(i); | ||
| 260 | 262 | ||
| 261 | if(result.dataList.length == 0) | 263 | if(result.dataList.length == 0) |
| 262 | $("#export").attr('disabled',"true"); | 264 | $("#export").attr('disabled',"true"); |
| @@ -286,8 +288,10 @@ | @@ -286,8 +288,10 @@ | ||
| 286 | params['subCompany'] = subCompany; | 288 | params['subCompany'] = subCompany; |
| 287 | params['bcType'] = bcType; | 289 | params['bcType'] = bcType; |
| 288 | params['type'] = "export"; | 290 | params['type'] = "export"; |
| 291 | + var i = layer.load(2); | ||
| 289 | $get('/pcpc/scheduleAnaly', params, function(result){ | 292 | $get('/pcpc/scheduleAnaly', params, function(result){ |
| 290 | window.open("/downloadFile/download?fileName=时刻表分析"+moment(startDate).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD")); | 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,16 +315,27 @@ | ||
| 311 | flag = 1; | 315 | flag = 1; |
| 312 | var treeData = []; | 316 | var treeData = []; |
| 313 | var params = {}; | 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 | var options = '<option value="">请选择...</option>'; | 335 | var options = '<option value="">请选择...</option>'; |
| 320 | - var size = 0; | ||
| 321 | $.each(treeData, function(i, g){ | 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 | $('#model').html(options)/* .select2() */; | 340 | $('#model').html(options)/* .select2() */; |
| 326 | flag = 0; | 341 | flag = 0; |
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
| @@ -121,14 +121,6 @@ | @@ -121,14 +121,6 @@ | ||
| 121 | if (!$('body').hasClass('page-sidebar-closed')) | 121 | if (!$('body').hasClass('page-sidebar-closed')) |
| 122 | $('.menu-toggler.sidebar-toggler').click(); | 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 | $("#times1").datetimepicker({ | 125 | $("#times1").datetimepicker({ |
| 134 | format : 'HH:mm', | 126 | format : 'HH:mm', |
| @@ -140,6 +132,7 @@ | @@ -140,6 +132,7 @@ | ||
| 140 | }); | 132 | }); |
| 141 | 133 | ||
| 142 | var d = new Date(); | 134 | var d = new Date(); |
| 135 | + d.setTime(d.getTime() - 1*1000*60*60*24); | ||
| 143 | var year = d.getFullYear(); | 136 | var year = d.getFullYear(); |
| 144 | var month = d.getMonth() + 1; | 137 | var month = d.getMonth() + 1; |
| 145 | var day = d.getDate(); | 138 | var day = d.getDate(); |
| @@ -147,8 +140,19 @@ | @@ -147,8 +140,19 @@ | ||
| 147 | month = "0" + month; | 140 | month = "0" + month; |
| 148 | if(day < 10) | 141 | if(day < 10) |
| 149 | day = "0" + day; | 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 | $("#times1").val("05:00"); | 157 | $("#times1").val("05:00"); |
| 154 | $("#times2").val("23:00"); | 158 | $("#times2").val("23:00"); |
| @@ -329,6 +333,7 @@ | @@ -329,6 +333,7 @@ | ||
| 329 | params['subCompany'] = subCompany; | 333 | params['subCompany'] = subCompany; |
| 330 | params['type'] = "query"; | 334 | params['type'] = "query"; |
| 331 | // $(".hidden").removeClass("hidden"); | 335 | // $(".hidden").removeClass("hidden"); |
| 336 | + var i = layer.load(2); | ||
| 332 | $get('/busInterval/timeAndSpeed', params, function(result){ | 337 | $get('/busInterval/timeAndSpeed', params, function(result){ |
| 333 | // 把数据填充到模版中 | 338 | // 把数据填充到模版中 |
| 334 | var tbodyHtml = template('list_timeAndSpeed', {list:result}); | 339 | var tbodyHtml = template('list_timeAndSpeed', {list:result}); |
| @@ -336,6 +341,7 @@ | @@ -336,6 +341,7 @@ | ||
| 336 | $('#forms').html(tbodyHtml); | 341 | $('#forms').html(tbodyHtml); |
| 337 | list = result; | 342 | list = result; |
| 338 | $("#works_hidden").addClass("hidden"); | 343 | $("#works_hidden").addClass("hidden"); |
| 344 | + layer.close(i); | ||
| 339 | 345 | ||
| 340 | _w_table_rowspan("#forms", 1); | 346 | _w_table_rowspan("#forms", 1); |
| 341 | _w_table_rowspan("#forms", 2); | 347 | _w_table_rowspan("#forms", 2); |
| @@ -388,10 +394,12 @@ | @@ -388,10 +394,12 @@ | ||
| 388 | params['company'] = company; | 394 | params['company'] = company; |
| 389 | params['subCompany'] = subCompany; | 395 | params['subCompany'] = subCompany; |
| 390 | params['type'] = "export"; | 396 | params['type'] = "export"; |
| 397 | + var i = layer.load(2); | ||
| 391 | $get('/busInterval/timeAndSpeed', params, function(result){ | 398 | $get('/busInterval/timeAndSpeed', params, function(result){ |
| 392 | window.open("/downloadFile/download?fileName=行驶时间及车速统计表" | 399 | window.open("/downloadFile/download?fileName=行驶时间及车速统计表" |
| 393 | +moment(startDate).format("YYYYMMDD")+"-" | 400 | +moment(startDate).format("YYYYMMDD")+"-" |
| 394 | +moment(endDate).format("YYYYMMDD")); | 401 | +moment(endDate).format("YYYYMMDD")); |
| 402 | + layer.close(i); | ||
| 395 | }); | 403 | }); |
| 396 | }); | 404 | }); |
| 397 | 405 | ||
| @@ -447,21 +455,38 @@ | @@ -447,21 +455,38 @@ | ||
| 447 | flag = 1; | 455 | flag = 1; |
| 448 | var treeData = []; | 456 | var treeData = []; |
| 449 | var params = {}; | 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 | if(statu == 0) | 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 | var options = '<option value="">请选择...</option>'; | 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 | flag = 0; | 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 | function updateLp(ttId){ | 492 | function updateLp(ttId){ |