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 | 39 | </div> |
| 40 | 40 | <div style="display: inline-block; margin-left: 24px;"> |
| 41 | 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 | 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 | 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 | 50 | <div style="display: inline-block; margin-left: 10px"> |
| 58 | 51 | <span class="item-label" style="width: 80px;">时刻类型: </span> |
| 59 | 52 | <select class="form-control" name="model" id="model" style="width: 165px;"> |
| ... | ... | @@ -69,9 +62,13 @@ |
| 69 | 62 | <span class="item-label" style="width: 80px;">结束时间: </span> |
| 70 | 63 | <input class="form-control" type="text" id="endDate" style="width: 140px;"/> |
| 71 | 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 | 72 | </div> |
| 76 | 73 | <div class="form-group" style="margin-left: 10px"> |
| 77 | 74 | <input class="btn btn-default" type="button" id="query" value="筛选"/> |
| ... | ... | @@ -113,7 +110,7 @@ |
| 113 | 110 | |
| 114 | 111 | <script> |
| 115 | 112 | $(function(){ |
| 116 | - | |
| 113 | + | |
| 117 | 114 | // 关闭左侧栏 |
| 118 | 115 | if (!$('body').hasClass('page-sidebar-closed')) |
| 119 | 116 | $('.menu-toggler.sidebar-toggler').click(); |
| ... | ... | @@ -126,7 +123,15 @@ |
| 126 | 123 | format : 'YYYY-MM-DD', |
| 127 | 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 | 135 | var d = new Date(); |
| 131 | 136 | var year = d.getFullYear(); |
| 132 | 137 | var month = d.getMonth() + 1; |
| ... | ... | @@ -137,7 +142,10 @@ |
| 137 | 142 | day = "0" + day; |
| 138 | 143 | $("#startDate").val(year + "-" + month + "-" + day); |
| 139 | 144 | $("#endDate").val(year + "-" + month + "-" + day); |
| 140 | - | |
| 145 | + | |
| 146 | + $("#times1").val("06:00"); | |
| 147 | + $("#times2").val("07:00"); | |
| 148 | + | |
| 141 | 149 | var obj = []; |
| 142 | 150 | $.get('/user/companyData', function(result){ |
| 143 | 151 | obj = result; |
| ... | ... | @@ -171,16 +179,26 @@ |
| 171 | 179 | $.get('/basic/lineCode2Name',function(result){ |
| 172 | 180 | var data=[]; |
| 173 | 181 | |
| 182 | + data.push({id: " ", text: "全部线路"}); | |
| 174 | 183 | for(var code in result){ |
| 175 | 184 | data.push({id: code, text: result[code]}); |
| 176 | 185 | } |
| 177 | 186 | console.log(data); |
| 178 | 187 | initPinYinSelect2('#line',data,''); |
| 179 | 188 | |
| 180 | - line = data[0].id; | |
| 181 | - | |
| 189 | + line = ""; | |
| 182 | 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 | 204 | $("#query").on("click", function (){ |
| ... | ... | @@ -188,28 +206,29 @@ |
| 188 | 206 | }); |
| 189 | 207 | |
| 190 | 208 | var line = $("#line").val(); |
| 191 | - var statu = $("#statu").val(); | |
| 192 | 209 | var startDate = $("#startDate").val(); |
| 193 | 210 | var endDate = $("#endDate").val(); |
| 194 | 211 | var model = $("#model").val(); |
| 212 | + var times = $("#times1").val() + "-" + $("#times2").val(); | |
| 213 | + var upDown = $("#upDown").val(); | |
| 195 | 214 | var company = $("#company").val(); |
| 196 | 215 | var subCompany = $("#subCompany").val(); |
| 197 | - var lp = $("#lp").val(); | |
| 198 | 216 | function jsDoQuery(pagination){ |
| 199 | 217 | var params = {}; |
| 200 | - line = $("#line").val(); | |
| 218 | +// line = $("#line").val(); | |
| 201 | 219 | startDate = $("#startDate").val(); |
| 202 | 220 | endDate = $("#endDate").val(); |
| 203 | 221 | model = $("#model").val(); |
| 222 | + times = $("#times1").val() + "-" + $("#times2").val(); | |
| 223 | + upDown = $("#upDown").val(); | |
| 204 | 224 | company = $("#company").val(); |
| 205 | 225 | subCompany = $("#subCompany").val(); |
| 206 | - lp = $("#lp").val(); | |
| 207 | - params['lp'] = lp; | |
| 208 | 226 | params['line'] = line; |
| 209 | - params['statu'] = statu; | |
| 210 | 227 | params['startDate'] = startDate; |
| 211 | 228 | params['endDate'] = endDate; |
| 212 | 229 | params['model'] = model; |
| 230 | + params['times'] = times; | |
| 231 | + params['upDown'] = upDown; | |
| 213 | 232 | params['company'] = company; |
| 214 | 233 | params['subCompany'] = subCompany; |
| 215 | 234 | params['type'] = "query"; |
| ... | ... | @@ -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 | 257 | $("#line").on("change", function(){ |
| 253 | 258 | line = $("#line").val(); |
| 259 | + if(line == " ") | |
| 260 | + line = ""; | |
| 254 | 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 | 273 | $('#startDate').on("blur", function(){ |
| 262 | 274 | startDate = $("#startDate").val(); |
| ... | ... | @@ -276,10 +288,7 @@ |
| 276 | 288 | flag = 1; |
| 277 | 289 | var treeData = []; |
| 278 | 290 | var params = {}; |
| 279 | - if(statu == 0) | |
| 280 | - params['line'] = ""; | |
| 281 | - if(statu == 1) | |
| 282 | - params['line'] = line; | |
| 291 | + params['line'] = line; | |
| 283 | 292 | params['startDate'] = startDate; |
| 284 | 293 | params['endDate'] = endDate; |
| 285 | 294 | $get('/pcpc/getModel', params, function(result){ |
| ... | ... | @@ -288,26 +297,11 @@ |
| 288 | 297 | $.each(treeData, function(i, g){ |
| 289 | 298 | options += '<option value="'+g.id+'">'+g.name+'</option>'; |
| 290 | 299 | }); |
| 291 | - $('#model').html(options); | |
| 300 | + $('#model').html(options)/* .select2() */; | |
| 292 | 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 | 306 | function _w_table_rowspan(_w_table_id, _w_table_colnum){ |
| 313 | 307 | _w_table_firsttd = ""; | ... | ... |