Commit f0d23567eea0fefda15f9bf9f6832b2daf0eb1b6
1 parent
113a6784
LGF 报表
Showing
1 changed file
with
61 additions
and
67 deletions
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
| @@ -39,21 +39,14 @@ | @@ -39,21 +39,14 @@ | ||
| 39 | </div> | 39 | </div> |
| 40 | <div style="display: inline-block; margin-left: 24px;"> | 40 | <div style="display: inline-block; margin-left: 24px;"> |
| 41 | <span class="item-label" style="width: 80px;">线路: </span> | 41 | <span class="item-label" style="width: 80px;">线路: </span> |
| 42 | - <select class="form-control" name="statu" id="statu" style="width: 140px;"> | ||
| 43 | - <option value="0">多线</option> | ||
| 44 | - <option value="1">单线</option> | ||
| 45 | - </select> | 42 | + <select class="form-control" name="line" id="line" style="width: 140px;"></select> |
| 46 | </div> | 43 | </div> |
| 47 | - <div style="display: inline-block; margin-left: 0px;" id="line1"> | ||
| 48 | - <span class="item-label" style="width: 80px;"> - </span> | ||
| 49 | - <select class="form-control" name="line" id="line" style="width: 140px;"/> | 44 | + <div style="display: inline-block; margin-left: 8px;"> |
| 45 | + <span class="item-label" style="width: 80px;">方向: </span> | ||
| 46 | + <select class="form-control" name="upDown" id="upDown" style="width: 140px;"> | ||
| 47 | + <option value="">请先选择线路</option> | ||
| 48 | + </select> | ||
| 50 | </div> | 49 | </div> |
| 51 | -<!-- <div style="display: inline-block; margin-left: 8px;"> --> | ||
| 52 | -<!-- <span class="item-label" style="width: 80px;">方向: </span> --> | ||
| 53 | -<!-- <select class="form-control" name="upDown" id="upDown" style="width: 140px;"> --> | ||
| 54 | -<!-- <option value="">请先选择线路</option> --> | ||
| 55 | -<!-- </select> --> | ||
| 56 | -<!-- </div> --> | ||
| 57 | <div style="display: inline-block; margin-left: 10px"> | 50 | <div style="display: inline-block; margin-left: 10px"> |
| 58 | <span class="item-label" style="width: 80px;">时刻类型: </span> | 51 | <span class="item-label" style="width: 80px;">时刻类型: </span> |
| 59 | <select class="form-control" name="model" id="model" style="width: 165px;"> | 52 | <select class="form-control" name="model" id="model" style="width: 165px;"> |
| @@ -69,9 +62,13 @@ | @@ -69,9 +62,13 @@ | ||
| 69 | <span class="item-label" style="width: 80px;">结束时间: </span> | 62 | <span class="item-label" style="width: 80px;">结束时间: </span> |
| 70 | <input class="form-control" type="text" id="endDate" style="width: 140px;"/> | 63 | <input class="form-control" type="text" id="endDate" style="width: 140px;"/> |
| 71 | </div> | 64 | </div> |
| 72 | - <div style="display: inline-block; margin-left: 24px" id="lp1"> | ||
| 73 | - <span class="item-label" style="width: 80px;">路牌: </span> | ||
| 74 | - <select class="form-control" name="lp" id="lp" style="width: 140px;"></select> | 65 | + <div style="display: inline-block; margin-left: 10px;"> |
| 66 | + <span class="item-label" style="width: 80px;">时间段: </span> | ||
| 67 | + <input class="form-control" type="text" id="times1" style="width: 60px;"/> | ||
| 68 | + </div> | ||
| 69 | + <div style="display: inline-block;"> | ||
| 70 | + <span class="item-label" style="width: 80px;"> - </span> | ||
| 71 | + <input class="form-control" type="text" id="times2" style="width: 60px;"/> | ||
| 75 | </div> | 72 | </div> |
| 76 | <div class="form-group" style="margin-left: 10px"> | 73 | <div class="form-group" style="margin-left: 10px"> |
| 77 | <input class="btn btn-default" type="button" id="query" value="筛选"/> | 74 | <input class="btn btn-default" type="button" id="query" value="筛选"/> |
| @@ -113,7 +110,7 @@ | @@ -113,7 +110,7 @@ | ||
| 113 | 110 | ||
| 114 | <script> | 111 | <script> |
| 115 | $(function(){ | 112 | $(function(){ |
| 116 | - | 113 | + |
| 117 | // 关闭左侧栏 | 114 | // 关闭左侧栏 |
| 118 | if (!$('body').hasClass('page-sidebar-closed')) | 115 | if (!$('body').hasClass('page-sidebar-closed')) |
| 119 | $('.menu-toggler.sidebar-toggler').click(); | 116 | $('.menu-toggler.sidebar-toggler').click(); |
| @@ -126,7 +123,15 @@ | @@ -126,7 +123,15 @@ | ||
| 126 | format : 'YYYY-MM-DD', | 123 | format : 'YYYY-MM-DD', |
| 127 | locale : 'zh-cn' | 124 | locale : 'zh-cn' |
| 128 | }); | 125 | }); |
| 129 | - | 126 | + $("#times1").datetimepicker({ |
| 127 | + format : 'HH:mm', | ||
| 128 | + locale : 'zh-cn' | ||
| 129 | + }); | ||
| 130 | + $("#times2").datetimepicker({ | ||
| 131 | + format : 'HH:mm', | ||
| 132 | + locale : 'zh-cn' | ||
| 133 | + }); | ||
| 134 | + | ||
| 130 | var d = new Date(); | 135 | var d = new Date(); |
| 131 | var year = d.getFullYear(); | 136 | var year = d.getFullYear(); |
| 132 | var month = d.getMonth() + 1; | 137 | var month = d.getMonth() + 1; |
| @@ -137,7 +142,10 @@ | @@ -137,7 +142,10 @@ | ||
| 137 | day = "0" + day; | 142 | day = "0" + day; |
| 138 | $("#startDate").val(year + "-" + month + "-" + day); | 143 | $("#startDate").val(year + "-" + month + "-" + day); |
| 139 | $("#endDate").val(year + "-" + month + "-" + day); | 144 | $("#endDate").val(year + "-" + month + "-" + day); |
| 140 | - | 145 | + |
| 146 | + $("#times1").val("06:00"); | ||
| 147 | + $("#times2").val("07:00"); | ||
| 148 | + | ||
| 141 | var obj = []; | 149 | var obj = []; |
| 142 | $.get('/user/companyData', function(result){ | 150 | $.get('/user/companyData', function(result){ |
| 143 | obj = result; | 151 | obj = result; |
| @@ -171,16 +179,26 @@ | @@ -171,16 +179,26 @@ | ||
| 171 | $.get('/basic/lineCode2Name',function(result){ | 179 | $.get('/basic/lineCode2Name',function(result){ |
| 172 | var data=[]; | 180 | var data=[]; |
| 173 | 181 | ||
| 182 | + data.push({id: " ", text: "全部线路"}); | ||
| 174 | for(var code in result){ | 183 | for(var code in result){ |
| 175 | data.push({id: code, text: result[code]}); | 184 | data.push({id: code, text: result[code]}); |
| 176 | } | 185 | } |
| 177 | console.log(data); | 186 | console.log(data); |
| 178 | initPinYinSelect2('#line',data,''); | 187 | initPinYinSelect2('#line',data,''); |
| 179 | 188 | ||
| 180 | - line = data[0].id; | ||
| 181 | - | 189 | + line = ""; |
| 182 | updateModel(); | 190 | updateModel(); |
| 183 | - updateLp(""); | 191 | + |
| 192 | + var params = {}; | ||
| 193 | + params['line'] = line; | ||
| 194 | + $get('/busInterval/getDir', params, function(result){ | ||
| 195 | + dirData = createTreeData(result); | ||
| 196 | + var options = '<option value="">全部方向</option>';; | ||
| 197 | + $.each(dirData, function(i, g){ | ||
| 198 | + options += '<option value="'+g.name+'">'+g.name+'</option>'; | ||
| 199 | + }); | ||
| 200 | + $('#upDown').html(options); | ||
| 201 | + }); | ||
| 184 | }) | 202 | }) |
| 185 | 203 | ||
| 186 | $("#query").on("click", function (){ | 204 | $("#query").on("click", function (){ |
| @@ -188,28 +206,29 @@ | @@ -188,28 +206,29 @@ | ||
| 188 | }); | 206 | }); |
| 189 | 207 | ||
| 190 | var line = $("#line").val(); | 208 | var line = $("#line").val(); |
| 191 | - var statu = $("#statu").val(); | ||
| 192 | var startDate = $("#startDate").val(); | 209 | var startDate = $("#startDate").val(); |
| 193 | var endDate = $("#endDate").val(); | 210 | var endDate = $("#endDate").val(); |
| 194 | var model = $("#model").val(); | 211 | var model = $("#model").val(); |
| 212 | + var times = $("#times1").val() + "-" + $("#times2").val(); | ||
| 213 | + var upDown = $("#upDown").val(); | ||
| 195 | var company = $("#company").val(); | 214 | var company = $("#company").val(); |
| 196 | var subCompany = $("#subCompany").val(); | 215 | var subCompany = $("#subCompany").val(); |
| 197 | - var lp = $("#lp").val(); | ||
| 198 | function jsDoQuery(pagination){ | 216 | function jsDoQuery(pagination){ |
| 199 | var params = {}; | 217 | var params = {}; |
| 200 | - line = $("#line").val(); | 218 | +// line = $("#line").val(); |
| 201 | startDate = $("#startDate").val(); | 219 | startDate = $("#startDate").val(); |
| 202 | endDate = $("#endDate").val(); | 220 | endDate = $("#endDate").val(); |
| 203 | model = $("#model").val(); | 221 | model = $("#model").val(); |
| 222 | + times = $("#times1").val() + "-" + $("#times2").val(); | ||
| 223 | + upDown = $("#upDown").val(); | ||
| 204 | company = $("#company").val(); | 224 | company = $("#company").val(); |
| 205 | subCompany = $("#subCompany").val(); | 225 | subCompany = $("#subCompany").val(); |
| 206 | - lp = $("#lp").val(); | ||
| 207 | - params['lp'] = lp; | ||
| 208 | params['line'] = line; | 226 | params['line'] = line; |
| 209 | - params['statu'] = statu; | ||
| 210 | params['startDate'] = startDate; | 227 | params['startDate'] = startDate; |
| 211 | params['endDate'] = endDate; | 228 | params['endDate'] = endDate; |
| 212 | params['model'] = model; | 229 | params['model'] = model; |
| 230 | + params['times'] = times; | ||
| 231 | + params['upDown'] = upDown; | ||
| 213 | params['company'] = company; | 232 | params['company'] = company; |
| 214 | params['subCompany'] = subCompany; | 233 | params['subCompany'] = subCompany; |
| 215 | params['type'] = "query"; | 234 | params['type'] = "query"; |
| @@ -235,28 +254,21 @@ | @@ -235,28 +254,21 @@ | ||
| 235 | // }); | 254 | // }); |
| 236 | 255 | ||
| 237 | 256 | ||
| 238 | - $("#lp1").hide(); | ||
| 239 | - $("#line1").hide(); | ||
| 240 | - $("#statu").on("change", function(){ | ||
| 241 | - statu = $("#statu").val(); | ||
| 242 | - if(statu == 0){ | ||
| 243 | - $("#line1").hide(); | ||
| 244 | - $("#lp1").hide(); | ||
| 245 | - }else{ | ||
| 246 | - $("#line1").show(); | ||
| 247 | - $("#lp1").show(); | ||
| 248 | - updateLp(""); | ||
| 249 | - } | ||
| 250 | - updateModel(); | ||
| 251 | - }); | ||
| 252 | $("#line").on("change", function(){ | 257 | $("#line").on("change", function(){ |
| 253 | line = $("#line").val(); | 258 | line = $("#line").val(); |
| 259 | + if(line == " ") | ||
| 260 | + line = ""; | ||
| 254 | updateModel(); | 261 | updateModel(); |
| 255 | - updateLp(""); | ||
| 256 | - }); | ||
| 257 | - $("#model").on("change", function(){ | ||
| 258 | - model = $("#model").val(); | ||
| 259 | - updateLp(model); | 262 | + var params = {}; |
| 263 | + params['line'] = line; | ||
| 264 | + $get('/busInterval/getDir', params, function(result){ | ||
| 265 | + dirData = createTreeData(result); | ||
| 266 | + var options = '<option value="">全部方向</option>'; | ||
| 267 | + $.each(dirData, function(i, g){ | ||
| 268 | + options += '<option value="'+g.name+'">'+g.name+'</option>'; | ||
| 269 | + }); | ||
| 270 | + $('#upDown').html(options); | ||
| 271 | + }); | ||
| 260 | }); | 272 | }); |
| 261 | $('#startDate').on("blur", function(){ | 273 | $('#startDate').on("blur", function(){ |
| 262 | startDate = $("#startDate").val(); | 274 | startDate = $("#startDate").val(); |
| @@ -276,10 +288,7 @@ | @@ -276,10 +288,7 @@ | ||
| 276 | flag = 1; | 288 | flag = 1; |
| 277 | var treeData = []; | 289 | var treeData = []; |
| 278 | var params = {}; | 290 | var params = {}; |
| 279 | - if(statu == 0) | ||
| 280 | - params['line'] = ""; | ||
| 281 | - if(statu == 1) | ||
| 282 | - params['line'] = line; | 291 | + params['line'] = line; |
| 283 | params['startDate'] = startDate; | 292 | params['startDate'] = startDate; |
| 284 | params['endDate'] = endDate; | 293 | params['endDate'] = endDate; |
| 285 | $get('/pcpc/getModel', params, function(result){ | 294 | $get('/pcpc/getModel', params, function(result){ |
| @@ -288,26 +297,11 @@ | @@ -288,26 +297,11 @@ | ||
| 288 | $.each(treeData, function(i, g){ | 297 | $.each(treeData, function(i, g){ |
| 289 | options += '<option value="'+g.id+'">'+g.name+'</option>'; | 298 | options += '<option value="'+g.id+'">'+g.name+'</option>'; |
| 290 | }); | 299 | }); |
| 291 | - $('#model').html(options); | 300 | + $('#model').html(options)/* .select2() */; |
| 292 | flag = 0; | 301 | flag = 0; |
| 293 | }); | 302 | }); |
| 294 | } | 303 | } |
| 295 | 304 | ||
| 296 | - function updateLp(ttId){ | ||
| 297 | - var treeData = []; | ||
| 298 | - var params = {}; | ||
| 299 | - params['line'] = line; | ||
| 300 | - params['ttId'] = ttId; | ||
| 301 | - $get('/busInterval/getLp', params, function(result){ | ||
| 302 | - treeData = createTreeData(result); | ||
| 303 | - var options = '<option value="">全部路牌</option>'; | ||
| 304 | - $.each(treeData, function(i, g){ | ||
| 305 | -// options += '<option value="'+g.id+'">'+g.name+'</option>'; | ||
| 306 | - options += '<option value="'+g.name+'">'+g.name+'</option>'; | ||
| 307 | - }); | ||
| 308 | - $('#lp').html(options); | ||
| 309 | - }); | ||
| 310 | - } | ||
| 311 | 305 | ||
| 312 | function _w_table_rowspan(_w_table_id, _w_table_colnum){ | 306 | function _w_table_rowspan(_w_table_id, _w_table_colnum){ |
| 313 | _w_table_firsttd = ""; | 307 | _w_table_firsttd = ""; |