Commit 95e6681938cd1fb1beccf7ac31d6e8bd3e77acad
1 parent
ccb63a54
LGF 报表
Showing
7 changed files
with
174 additions
and
54 deletions
src/main/java/com/bsth/service/schedule/PeopleCarPlanServiceImpl.java
| @@ -712,7 +712,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -712,7 +712,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 712 | List<Long> longList0 = new ArrayList<Long>(); | 712 | List<Long> longList0 = new ArrayList<Long>(); |
| 713 | Map<Long, ScheduleRealInfo> temp1 = new HashMap<Long, ScheduleRealInfo>(); | 713 | Map<Long, ScheduleRealInfo> temp1 = new HashMap<Long, ScheduleRealInfo>(); |
| 714 | List<Long> longList1 = new ArrayList<Long>(); | 714 | List<Long> longList1 = new ArrayList<Long>(); |
| 715 | + String company = "", subCompany = ""; | ||
| 715 | for(ScheduleRealInfo schedule : keyMap.get(key)){ | 716 | for(ScheduleRealInfo schedule : keyMap.get(key)){ |
| 717 | + if(schedule.getGsName() != null && company.length() == 0) | ||
| 718 | + company = schedule.getGsName(); | ||
| 719 | + if(schedule.getFgsName() != null && subCompany.length() == 0) | ||
| 720 | + subCompany = schedule.getFgsName(); | ||
| 716 | String[] split = schedule.getFcsj().split(":"); | 721 | String[] split = schedule.getFcsj().split(":"); |
| 717 | long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | 722 | long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); |
| 718 | schedule.setFcsjT(min); | 723 | schedule.setFcsjT(min); |
| @@ -731,6 +736,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -731,6 +736,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 731 | ScheduleRealInfo shouban1 = temp1.get(longList1.get(0)); | 736 | ScheduleRealInfo shouban1 = temp1.get(longList1.get(0)); |
| 732 | ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1)); | 737 | ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1)); |
| 733 | tempMap.put("date", date); | 738 | tempMap.put("date", date); |
| 739 | + tempMap.put("company", company); | ||
| 740 | + tempMap.put("subCompany", subCompany); | ||
| 734 | tempMap.put("line", key); | 741 | tempMap.put("line", key); |
| 735 | tempMap.put("qdzFirst0", shouban0.getQdzName()); | 742 | tempMap.put("qdzFirst0", shouban0.getQdzName()); |
| 736 | tempMap.put("jhfcFirst0", shouban0.getFcsj()); | 743 | tempMap.put("jhfcFirst0", shouban0.getFcsj()); |
src/main/resources/static/pages/forms/mould/firstAndLastBus.xls
No preview for this file type
src/main/resources/static/pages/forms/statement/firstAndLastBus.html
| @@ -27,13 +27,21 @@ | @@ -27,13 +27,21 @@ | ||
| 27 | <div class="portlet light porttlet-fit bordered"> | 27 | <div class="portlet light porttlet-fit bordered"> |
| 28 | <div class="portlet-title"> | 28 | <div class="portlet-title"> |
| 29 | <form id="history" class="form-inline" action=""> | 29 | <form id="history" class="form-inline" action=""> |
| 30 | - <div style="display: inline-block;"> | 30 | + <div style="display: inline-block;margin-left: 10px;"> |
| 31 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 32 | + <select class="form-control" name="company" id="company" style="width: 160px;"></select> | ||
| 33 | + </div> | ||
| 34 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 35 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 36 | + <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> | ||
| 37 | + </div> | ||
| 38 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 31 | <span class="item-label" style="width: 80px;">线路: </span> | 39 | <span class="item-label" style="width: 80px;">线路: </span> |
| 32 | - <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 40 | + <select class="form-control" name="line" id="line" style="width: 160px;"></select> |
| 33 | </div> | 41 | </div> |
| 34 | <div style="display: inline-block;margin-left: 15px;"> | 42 | <div style="display: inline-block;margin-left: 15px;"> |
| 35 | <span class="item-label" style="width: 80px;">时间: </span> | 43 | <span class="item-label" style="width: 80px;">时间: </span> |
| 36 | - <input class="form-control" type="text" id="date" style="width: 180px;"/> | 44 | + <input class="form-control" type="text" id="date" style="width: 160px;"/> |
| 37 | </div> | 45 | </div> |
| 38 | <div class="form-group"> | 46 | <div class="form-group"> |
| 39 | <input class="btn btn-default" type="button" id="query" value="筛选"/> | 47 | <input class="btn btn-default" type="button" id="query" value="筛选"/> |
| @@ -46,27 +54,29 @@ | @@ -46,27 +54,29 @@ | ||
| 46 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 54 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 47 | <thead> | 55 | <thead> |
| 48 | <tr class="hidden"> | 56 | <tr class="hidden"> |
| 49 | - <th width="100px" rowspan="2">日期</th> | ||
| 50 | - <th width="100px" rowspan="2">线路</th> | 57 | + <th rowspan="2">日期</th> |
| 58 | + <th rowspan="2">公司</th> | ||
| 59 | + <th rowspan="2">分公司</th> | ||
| 60 | + <th rowspan="2">线路</th> | ||
| 51 | <th colspan="4">上行首发</th> | 61 | <th colspan="4">上行首发</th> |
| 52 | <th colspan="4">上行末发</th> | 62 | <th colspan="4">上行末发</th> |
| 53 | <th colspan="4">下行首发</th> | 63 | <th colspan="4">下行首发</th> |
| 54 | <th colspan="4">下行末发</th> | 64 | <th colspan="4">下行末发</th> |
| 55 | </tr> | 65 | </tr> |
| 56 | <tr class="hidden"> | 66 | <tr class="hidden"> |
| 57 | - <th width="100px">站点</th> | 67 | + <th>站点</th> |
| 58 | <th>计发</th> | 68 | <th>计发</th> |
| 59 | <th>实发</th> | 69 | <th>实发</th> |
| 60 | <th>快慢</th> | 70 | <th>快慢</th> |
| 61 | - <th width="100px">站点</th> | 71 | + <th>站点</th> |
| 62 | <th>计发</th> | 72 | <th>计发</th> |
| 63 | <th>实发</th> | 73 | <th>实发</th> |
| 64 | <th>快慢</th> | 74 | <th>快慢</th> |
| 65 | - <th width="100px">站点</th> | 75 | + <th>站点</th> |
| 66 | <th>计发</th> | 76 | <th>计发</th> |
| 67 | <th>实发</th> | 77 | <th>实发</th> |
| 68 | <th>快慢</th> | 78 | <th>快慢</th> |
| 69 | - <th width="100px">站点</th> | 79 | + <th>站点</th> |
| 70 | <th>计发</th> | 80 | <th>计发</th> |
| 71 | <th>实发</th> | 81 | <th>实发</th> |
| 72 | <th>快慢</th> | 82 | <th>快慢</th> |
| @@ -117,6 +127,32 @@ | @@ -117,6 +127,32 @@ | ||
| 117 | initPinYinSelect2('#line',data,''); | 127 | initPinYinSelect2('#line',data,''); |
| 118 | }); | 128 | }); |
| 119 | 129 | ||
| 130 | + var obj = []; | ||
| 131 | + $.get('/user/companyData', function(result){ | ||
| 132 | + obj = result; | ||
| 133 | + var options = ''; | ||
| 134 | + for(var i = 0; i < obj.length; i++){ | ||
| 135 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 136 | + } | ||
| 137 | + $('#company').html(options); | ||
| 138 | + updateCompany(); | ||
| 139 | + }); | ||
| 140 | + $("#company").on("change",updateCompany); | ||
| 141 | + function updateCompany(){ | ||
| 142 | + var company = $('#company').val(); | ||
| 143 | + var options = ''; | ||
| 144 | + for(var i = 0; i < obj.length; i++){ | ||
| 145 | + if(obj[i].companyCode == company){ | ||
| 146 | + var children = obj[i].children; | ||
| 147 | + for(var j = 0; j < children.length; j++){ | ||
| 148 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 149 | + } | ||
| 150 | + } | ||
| 151 | + } | ||
| 152 | + $('#subCompany').html(options); | ||
| 153 | + } | ||
| 154 | + | ||
| 155 | + | ||
| 120 | $("#query").on("click",jsDoQuery); | 156 | $("#query").on("click",jsDoQuery); |
| 121 | 157 | ||
| 122 | var line = $("#line").val(); | 158 | var line = $("#line").val(); |
| @@ -152,6 +188,8 @@ | @@ -152,6 +188,8 @@ | ||
| 152 | {{each list as obj i}} | 188 | {{each list as obj i}} |
| 153 | <tr> | 189 | <tr> |
| 154 | <td>{{obj.date}}</td> | 190 | <td>{{obj.date}}</td> |
| 191 | + <td>{{obj.company}}</td> | ||
| 192 | + <td>{{obj.subCompany}}</td> | ||
| 155 | <td>{{obj.line}}</td> | 193 | <td>{{obj.line}}</td> |
| 156 | <td>{{obj.qdzFirst0}}</td> | 194 | <td>{{obj.qdzFirst0}}</td> |
| 157 | <td>{{obj.jhfcFirst0}}</td> | 195 | <td>{{obj.jhfcFirst0}}</td> |
| @@ -173,7 +211,7 @@ | @@ -173,7 +211,7 @@ | ||
| 173 | {{/each}} | 211 | {{/each}} |
| 174 | {{if list.length == 0}} | 212 | {{if list.length == 0}} |
| 175 | <tr> | 213 | <tr> |
| 176 | - <td colspan="18"><h6 class="muted">没有找到相关数据</h6></td> | 214 | + <td colspan="20"><h6 class="muted">没有找到相关数据</h6></td> |
| 177 | </tr> | 215 | </tr> |
| 178 | {{/if}} | 216 | {{/if}} |
| 179 | </script> | 217 | </script> |
| 180 | \ No newline at end of file | 218 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/lineTimeAnaly.html
| @@ -78,18 +78,18 @@ | @@ -78,18 +78,18 @@ | ||
| 78 | </div> | 78 | </div> |
| 79 | <div class="portlet-body"> | 79 | <div class="portlet-body"> |
| 80 | <div class="row"> | 80 | <div class="row"> |
| 81 | - <div class="col-md-3"> | 81 | + <div class="col-md-4"> |
| 82 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 320px;"> | 82 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 320px;"> |
| 83 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 83 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 84 | <thead> | 84 | <thead> |
| 85 | <tr class="hidden"> | 85 | <tr class="hidden"> |
| 86 | - <th>公司</th> | ||
| 87 | - <th>日期分段</th> | ||
| 88 | - <th>时段</th> | ||
| 89 | - <th>线路</th> | ||
| 90 | - <th>路牌</th> | ||
| 91 | - <th>站点</th> | ||
| 92 | - <th>计划发车班次数</th> | 86 | + <th >公司</th> |
| 87 | + <th width="30%">日期分段</th> | ||
| 88 | + <th >时段</th> | ||
| 89 | + <th width="20%">线路</th> | ||
| 90 | + <th >路牌</th> | ||
| 91 | + <th width="20%">站点</th> | ||
| 92 | + <th >计划发车班次数</th> | ||
| 93 | <th>实际完成班次数</th> | 93 | <th>实际完成班次数</th> |
| 94 | </tr> | 94 | </tr> |
| 95 | </thead> | 95 | </thead> |
| @@ -100,17 +100,17 @@ | @@ -100,17 +100,17 @@ | ||
| 100 | </div> | 100 | </div> |
| 101 | </div> | 101 | </div> |
| 102 | <div id="works_hidden" class="hidden"> | 102 | <div id="works_hidden" class="hidden"> |
| 103 | - <span class="item-label" style="width: 80px;margin-left: 60px;">明细: </span> | ||
| 104 | - <span class="item-label" style="width: 80px;margin-left: 60px;">日期: </span> | 103 | + <span class="item-label" style="width: 80px;margin-left: 30px;">明细: </span> |
| 104 | + <span class="item-label" style="width: 80px;margin-left: 30px;">日期: </span> | ||
| 105 | <span class="item-label" style="width: 80px;" id="date1"></span> | 105 | <span class="item-label" style="width: 80px;" id="date1"></span> |
| 106 | - <span class="item-label" style="width: 80px;margin-left: 60px;">线路: </span> | 106 | + <span class="item-label" style="width: 80px;margin-left: 40px;">线路: </span> |
| 107 | <span class="item-label" style="width: 80px;" id="line1"></span> | 107 | <span class="item-label" style="width: 80px;" id="line1"></span> |
| 108 | - <span class="item-label" style="width: 80px;margin-left: 60px;">路牌: </span> | 108 | + <span class="item-label" style="width: 80px;margin-left: 40px;">路牌: </span> |
| 109 | <span class="item-label" style="width: 80px;" id="lp1"></span> | 109 | <span class="item-label" style="width: 80px;" id="lp1"></span> |
| 110 | - <span class="item-label" style="width: 80px;margin-left: 60px;">站点: </span> | 110 | + <span class="item-label" style="width: 80px;margin-left: 40px;">站点: </span> |
| 111 | <span class="item-label" style="width: 80px;" id="station1"></span> | 111 | <span class="item-label" style="width: 80px;" id="station1"></span> |
| 112 | </div> | 112 | </div> |
| 113 | - <div class="col-md-9" id="printArea"> | 113 | + <div class="col-md-8" id="printArea"> |
| 114 | <table class="table table-bordered table-hover table-checkable" id="works"> | 114 | <table class="table table-bordered table-hover table-checkable" id="works"> |
| 115 | <thead> | 115 | <thead> |
| 116 | <tr class="hidden"> | 116 | <tr class="hidden"> |
| @@ -122,14 +122,14 @@ | @@ -122,14 +122,14 @@ | ||
| 122 | <th colspan="5">停站时间</th> | 122 | <th colspan="5">停站时间</th> |
| 123 | </tr> | 123 | </tr> |
| 124 | <tr class="hidden"> | 124 | <tr class="hidden"> |
| 125 | - <th width="50px">计划</th> | ||
| 126 | - <th width="50px">实际</th> | ||
| 127 | - <th width="50px">平均提前</th> | ||
| 128 | - <th width="50px">平均延误</th> | ||
| 129 | - <th width="50px">计划</th> | ||
| 130 | - <th width="50px">实际</th> | ||
| 131 | - <th width="50px">平均提前</th> | ||
| 132 | - <th width="50px">平均延误</th> | 125 | + <th>计划</th> |
| 126 | + <th>实际</th> | ||
| 127 | + <th>平均提前</th> | ||
| 128 | + <th>平均延误</th> | ||
| 129 | + <th>计划</th> | ||
| 130 | + <th>实际</th> | ||
| 131 | + <th>平均提前</th> | ||
| 132 | + <th>平均延误</th> | ||
| 133 | <th>快</th> | 133 | <th>快</th> |
| 134 | <th>慢</th> | 134 | <th>慢</th> |
| 135 | <th>计划</th> | 135 | <th>计划</th> |
src/main/resources/static/pages/forms/statement/peopleCarPlan.html
| @@ -28,12 +28,20 @@ | @@ -28,12 +28,20 @@ | ||
| 28 | <div class="portlet-title"> | 28 | <div class="portlet-title"> |
| 29 | <form id="history" class="form-inline" action=""> | 29 | <form id="history" class="form-inline" action=""> |
| 30 | <div style="display: inline-block;"> | 30 | <div style="display: inline-block;"> |
| 31 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 32 | + <select class="form-control" name="company" id="company" style="width: 160px;"></select> | ||
| 33 | + </div> | ||
| 34 | + <div style="display: inline-block;"> | ||
| 35 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 36 | + <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> | ||
| 37 | + </div> | ||
| 38 | + <div style="display: inline-block;"> | ||
| 31 | <span class="item-label" style="width: 80px;">线路: </span> | 39 | <span class="item-label" style="width: 80px;">线路: </span> |
| 32 | - <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 40 | + <select class="form-control" name="line" id="line" style="width: 160px;"></select> |
| 33 | </div> | 41 | </div> |
| 34 | <div style="display: inline-block;margin-left: 15px;"> | 42 | <div style="display: inline-block;margin-left: 15px;"> |
| 35 | <span class="item-label" style="width: 80px;">时间: </span> | 43 | <span class="item-label" style="width: 80px;">时间: </span> |
| 36 | - <input class="form-control" type="text" id="date" style="width: 180px;"/> | 44 | + <input class="form-control" type="text" id="date" style="width: 160px;"/> |
| 37 | </div> | 45 | </div> |
| 38 | <div class="form-group"> | 46 | <div class="form-group"> |
| 39 | <input class="btn btn-default" type="button" id="query" value="筛选"/> | 47 | <input class="btn btn-default" type="button" id="query" value="筛选"/> |
| @@ -93,12 +101,39 @@ | @@ -93,12 +101,39 @@ | ||
| 93 | $.get('/basic/lineCode2Name',function(result){ | 101 | $.get('/basic/lineCode2Name',function(result){ |
| 94 | var data=[]; | 102 | var data=[]; |
| 95 | 103 | ||
| 104 | + data.push({id: " ", text: "全部线路"}); | ||
| 96 | for(var code in result){ | 105 | for(var code in result){ |
| 97 | data.push({id: code, text: result[code]}); | 106 | data.push({id: code, text: result[code]}); |
| 98 | } | 107 | } |
| 99 | console.log(data); | 108 | console.log(data); |
| 100 | initPinYinSelect2('#line',data,''); | 109 | initPinYinSelect2('#line',data,''); |
| 101 | - }) | 110 | + }); |
| 111 | + | ||
| 112 | + var obj = []; | ||
| 113 | + $.get('/user/companyData', function(result){ | ||
| 114 | + obj = result; | ||
| 115 | + var options = ''; | ||
| 116 | + for(var i = 0; i < obj.length; i++){ | ||
| 117 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 118 | + } | ||
| 119 | + $('#company').html(options); | ||
| 120 | + updateCompany(); | ||
| 121 | + }); | ||
| 122 | + $("#company").on("change",updateCompany); | ||
| 123 | + function updateCompany(){ | ||
| 124 | + var company = $('#company').val(); | ||
| 125 | + var options = ''; | ||
| 126 | + for(var i = 0; i < obj.length; i++){ | ||
| 127 | + if(obj[i].companyCode == company){ | ||
| 128 | + var children = obj[i].children; | ||
| 129 | + for(var j = 0; j < children.length; j++){ | ||
| 130 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 131 | + } | ||
| 132 | + } | ||
| 133 | + } | ||
| 134 | + $('#subCompany').html(options); | ||
| 135 | + } | ||
| 136 | + | ||
| 102 | 137 | ||
| 103 | $("#query").on("click",jsDoQuery); | 138 | $("#query").on("click",jsDoQuery); |
| 104 | 139 | ||
| @@ -108,6 +143,8 @@ | @@ -108,6 +143,8 @@ | ||
| 108 | var params = {}; | 143 | var params = {}; |
| 109 | line = $("#line").val(); | 144 | line = $("#line").val(); |
| 110 | date = $("#date").val(); | 145 | date = $("#date").val(); |
| 146 | + if(line == " ") | ||
| 147 | + line = ""; | ||
| 111 | params['line'] = line; | 148 | params['line'] = line; |
| 112 | params['date'] = date; | 149 | params['date'] = date; |
| 113 | params['type'] = "query"; | 150 | params['type'] = "query"; |
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
| @@ -27,21 +27,30 @@ | @@ -27,21 +27,30 @@ | ||
| 27 | <div class="portlet light porttlet-fit bordered"> | 27 | <div class="portlet light porttlet-fit bordered"> |
| 28 | <div class="portlet-title"> | 28 | <div class="portlet-title"> |
| 29 | <form id="history" class="form-inline" action=""> | 29 | <form id="history" class="form-inline" action=""> |
| 30 | - <div style="display: inline-block;"> | 30 | +<!-- <div style="display: inline-block;margin-left: 38px;"> --> |
| 31 | +<!-- <span class="item-label" style="width: 80px;">公司: </span> --> | ||
| 32 | +<!-- <select class="form-control" name="company" id="company" style="width: 160px;"></select> --> | ||
| 33 | +<!-- </div> --> | ||
| 34 | +<!-- <div style="display: inline-block;margin-left: 29px;"> --> | ||
| 35 | +<!-- <span class="item-label" style="width: 80px;">分公司: </span> --> | ||
| 36 | +<!-- <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> --> | ||
| 37 | +<!-- </div> --> | ||
| 38 | + <div style="display: inline-block;margin-left: 43px;"> | ||
| 31 | <span class="item-label" style="width: 80px;">线路: </span> | 39 | <span class="item-label" style="width: 80px;">线路: </span> |
| 32 | - <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 40 | + <select class="form-control" name="line" id="line" style="width: 160px;"></select> |
| 33 | </div> | 41 | </div> |
| 34 | - <div style="display: inline-block;margin-left: 15px;"> | 42 | +<!-- <div style="margin-top: 10px"></div> --> |
| 43 | + <div style="display: inline-block;margin-left: 10px;"> | ||
| 35 | <span class="item-label" style="width: 80px;">开始时间: </span> | 44 | <span class="item-label" style="width: 80px;">开始时间: </span> |
| 36 | - <input class="form-control" type="text" id="startDate" style="width: 180px;"/> | 45 | + <input class="form-control" type="text" id="startDate" style="width: 160px;"/> |
| 37 | </div> | 46 | </div> |
| 38 | <div style="display: inline-block;margin-left: 15px;"> | 47 | <div style="display: inline-block;margin-left: 15px;"> |
| 39 | <span class="item-label" style="width: 80px;">结束时间: </span> | 48 | <span class="item-label" style="width: 80px;">结束时间: </span> |
| 40 | - <input class="form-control" type="text" id="endDate" style="width: 180px;"/> | 49 | + <input class="form-control" type="text" id="endDate" style="width: 160px;"/> |
| 41 | </div> | 50 | </div> |
| 42 | - <div style="display: inline-block;"> | 51 | + <div style="display: inline-block;margin-left: 15px;"> |
| 43 | <span class="item-label" style="width: 80px;">模板类型: </span> | 52 | <span class="item-label" style="width: 80px;">模板类型: </span> |
| 44 | - <select class="form-control" name="model" id="model" style="width: 180px;"> | 53 | + <select class="form-control" name="model" id="model" style="width: 160px;"> |
| 45 | <option value="">请选择...</option> | 54 | <option value="">请选择...</option> |
| 46 | </select> | 55 | </select> |
| 47 | </div> | 56 | </div> |
| @@ -116,16 +125,43 @@ | @@ -116,16 +125,43 @@ | ||
| 116 | $.get('/basic/lineCode2Name',function(result){ | 125 | $.get('/basic/lineCode2Name',function(result){ |
| 117 | var data=[]; | 126 | var data=[]; |
| 118 | 127 | ||
| 128 | + data.push({id:" ", text: "全部线路"}); | ||
| 119 | for(var code in result){ | 129 | for(var code in result){ |
| 120 | data.push({id: code, text: result[code]}); | 130 | data.push({id: code, text: result[code]}); |
| 121 | } | 131 | } |
| 122 | console.log(data); | 132 | console.log(data); |
| 123 | initPinYinSelect2('#line',data,''); | 133 | initPinYinSelect2('#line',data,''); |
| 124 | 134 | ||
| 125 | - line = data[0].id; | 135 | + line = ""; |
| 126 | updateModel(); | 136 | updateModel(); |
| 127 | }); | 137 | }); |
| 128 | 138 | ||
| 139 | + var obj = []; | ||
| 140 | + $.get('/user/companyData', function(result){ | ||
| 141 | + obj = result; | ||
| 142 | + var options = ''; | ||
| 143 | + for(var i = 0; i < obj.length; i++){ | ||
| 144 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 145 | + } | ||
| 146 | + $('#company').html(options); | ||
| 147 | + updateCompany(); | ||
| 148 | + }); | ||
| 149 | + $("#company").on("change",updateCompany); | ||
| 150 | + function updateCompany(){ | ||
| 151 | + var company = $('#company').val(); | ||
| 152 | + var options = ''; | ||
| 153 | + for(var i = 0; i < obj.length; i++){ | ||
| 154 | + if(obj[i].companyCode == company){ | ||
| 155 | + var children = obj[i].children; | ||
| 156 | + for(var j = 0; j < children.length; j++){ | ||
| 157 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 158 | + } | ||
| 159 | + } | ||
| 160 | + } | ||
| 161 | + $('#subCompany').html(options); | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + | ||
| 129 | $("#query").on("click", function(){ | 165 | $("#query").on("click", function(){ |
| 130 | page = 0; | 166 | page = 0; |
| 131 | jsDoQuery(true); | 167 | jsDoQuery(true); |
| @@ -137,7 +173,7 @@ | @@ -137,7 +173,7 @@ | ||
| 137 | var model = $("#model").val(); | 173 | var model = $("#model").val(); |
| 138 | function jsDoQuery(pagination){ | 174 | function jsDoQuery(pagination){ |
| 139 | var params = {}; | 175 | var params = {}; |
| 140 | - line = $("#line").val(); | 176 | +// line = $("#line").val(); |
| 141 | startDate = $("#startDate").val(); | 177 | startDate = $("#startDate").val(); |
| 142 | endDate = $("#endDate").val(); | 178 | endDate = $("#endDate").val(); |
| 143 | model = $("#model").val(); | 179 | model = $("#model").val(); |
| @@ -171,6 +207,8 @@ | @@ -171,6 +207,8 @@ | ||
| 171 | 207 | ||
| 172 | $("#line").on("change", function(){ | 208 | $("#line").on("change", function(){ |
| 173 | line = $("#line").val(); | 209 | line = $("#line").val(); |
| 210 | + if(line == " ") | ||
| 211 | + line = ""; | ||
| 174 | updateModel(); | 212 | updateModel(); |
| 175 | }); | 213 | }); |
| 176 | $('#startDate').on("blur", function(){ | 214 | $('#startDate').on("blur", function(){ |
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
| @@ -81,18 +81,18 @@ | @@ -81,18 +81,18 @@ | ||
| 81 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 81 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 82 | <thead> | 82 | <thead> |
| 83 | <tr class="hidden"> | 83 | <tr class="hidden"> |
| 84 | - <th width="130px">日期</th> | ||
| 85 | - <th width="105px">时段</th> | 84 | + <th>日期</th> |
| 85 | + <th>时段</th> | ||
| 86 | <th>公司</th> | 86 | <th>公司</th> |
| 87 | <th>分公司</th> | 87 | <th>分公司</th> |
| 88 | - <th width="100px">线路</th> | ||
| 89 | - <th width="50px">路牌</th> | ||
| 90 | - <th width="110px">起讫站</th> | ||
| 91 | - <th width="110px">行驶方向</th> | ||
| 92 | - <th width="103px">营运时间(小时/分钟)</th> | ||
| 93 | - <th width="130px">营运车速(公里/小时)</th> | ||
| 94 | - <th width="103px">运送时间(小时/分钟)</th> | ||
| 95 | - <th width="130px">运送车速(公里/小时)</th> | 88 | + <th>线路</th> |
| 89 | + <th>路牌</th> | ||
| 90 | + <th>起讫站</th> | ||
| 91 | + <th>行驶方向</th> | ||
| 92 | + <th>营运时间(小时/分钟)</th> | ||
| 93 | + <th>营运车速(公里/小时)</th> | ||
| 94 | + <th>运送时间(小时/分钟)</th> | ||
| 95 | + <th>运送车速(公里/小时)</th> | ||
| 96 | </tr> | 96 | </tr> |
| 97 | </thead> | 97 | </thead> |
| 98 | <tbody> | 98 | <tbody> |