Commit 6112723728a021ac6a3566318c056105cc9405de
1 parent
9227cfcc
添加新增
Showing
3 changed files
with
298 additions
and
88 deletions
bsthLineProfiles/src/main/resources/templates/system/line/add.html
| 1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
| 2 | <html lang="zh" xmlns:th="http://www.thymeleaf.org" > | 2 | <html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
| 3 | <head> | 3 | <head> |
| 4 | - <th:block th:include="include :: header('新增【请填写功能名称】')" /> | 4 | + <th:block th:include="include :: header('添加线路档案信息')" /> |
| 5 | <th:block th:include="include :: datetimepicker-css" /> | 5 | <th:block th:include="include :: datetimepicker-css" /> |
| 6 | </head> | 6 | </head> |
| 7 | <body class="white-bg"> | 7 | <body class="white-bg"> |
| 8 | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> | 8 | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
| 9 | <form class="form-horizontal m" id="form-line-add"> | 9 | <form class="form-horizontal m" id="form-line-add"> |
| 10 | <div class="form-group"> | 10 | <div class="form-group"> |
| 11 | - <label class="col-sm-3 control-label">夜间停车场(无):</label> | ||
| 12 | - <div class="col-sm-8"> | ||
| 13 | - <input name="eventId" class="form-control" type="text"> | ||
| 14 | - </div> | ||
| 15 | - </div> | ||
| 16 | - <div class="form-group"> | ||
| 17 | - <label class="col-sm-3 control-label">夜间停车场(无):</label> | ||
| 18 | - <div class="col-sm-8"> | ||
| 19 | - <input name="lineId" class="form-control" type="text"> | ||
| 20 | - </div> | ||
| 21 | - </div> | ||
| 22 | - <div class="form-group"> | ||
| 23 | <label class="col-sm-3 control-label">线路名称:</label> | 11 | <label class="col-sm-3 control-label">线路名称:</label> |
| 24 | <div class="col-sm-8"> | 12 | <div class="col-sm-8"> |
| 25 | <input name="lineName" class="form-control" type="text"> | 13 | <input name="lineName" class="form-control" type="text"> |
| @@ -46,76 +34,128 @@ | @@ -46,76 +34,128 @@ | ||
| 46 | <div class="form-group"> | 34 | <div class="form-group"> |
| 47 | <label class="col-sm-3 control-label">营运方式 全程/区间/大站/定班/跨线/B线:</label> | 35 | <label class="col-sm-3 control-label">营运方式 全程/区间/大站/定班/跨线/B线:</label> |
| 48 | <div class="col-sm-8"> | 36 | <div class="col-sm-8"> |
| 49 | - <select name="serviceType" class="form-control m-b"> | ||
| 50 | - <option value="">所有</option> | 37 | + <select name="serviceType"/> |
| 38 | + th:with="type=${@dict.getType('serviceType')}" | ||
| 39 | + class="form-control m-b"> | ||
| 40 | + <option value=""></option> | ||
| 41 | + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" | ||
| 42 | + th:value="${dict.dictValue}"> | ||
| 43 | + | ||
| 44 | + </option> | ||
| 51 | </select> | 45 | </select> |
| 52 | - <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> | ||
| 53 | </div> | 46 | </div> |
| 54 | </div> | 47 | </div> |
| 55 | - <div class="form-group"> | 48 | + |
| 49 | + <div class="form-group"> | ||
| 56 | <label class="col-sm-3 control-label">线路属性:</label> | 50 | <label class="col-sm-3 control-label">线路属性:</label> |
| 57 | <div class="col-sm-8"> | 51 | <div class="col-sm-8"> |
| 58 | - <input name="lineLevel" class="form-control" type="text"> | 52 | + <select name="lineLevel" |
| 53 | + th:with="type=${@dict.getType('lineLevel')}" | ||
| 54 | + class="form-control m-b"> | ||
| 55 | + <option value=""></option> | ||
| 56 | + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" | ||
| 57 | + th:value="${dict.dictValue}"> | ||
| 58 | + </option> | ||
| 59 | + </select> | ||
| 59 | </div> | 60 | </div> |
| 60 | </div> | 61 | </div> |
| 61 | <div class="form-group"> | 62 | <div class="form-group"> |
| 62 | - <label class="col-sm-3 control-label">线路属性:</label> | 63 | + <label class="col-sm-3 control-label">线路类型:</label> |
| 63 | <div class="col-sm-8"> | 64 | <div class="col-sm-8"> |
| 64 | - <select name="lineType" class="form-control m-b"> | ||
| 65 | - <option value="">所有</option> | 65 | + <select name="lineType" th:with="type=${@dict.getType('lineType')}" |
| 66 | + class="form-control m-b"> | ||
| 67 | + <option value=""></option> | ||
| 68 | + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" | ||
| 69 | + th:value="${dict.dictValue}"> | ||
| 70 | + </option> | ||
| 66 | </select> | 71 | </select> |
| 67 | - <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> | ||
| 68 | </div> | 72 | </div> |
| 69 | </div> | 73 | </div> |
| 70 | <div class="form-group"> | 74 | <div class="form-group"> |
| 71 | <label class="col-sm-3 control-label">区属:</label> | 75 | <label class="col-sm-3 control-label">区属:</label> |
| 72 | <div class="col-sm-8"> | 76 | <div class="col-sm-8"> |
| 73 | - <input name="district" class="form-control" type="text"> | 77 | + <select name="district" th:with="type=${@dict.getType('district')}" |
| 78 | + class="form-control m-b"> | ||
| 79 | + <option value=""></option> | ||
| 80 | + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" | ||
| 81 | + th:value="${dict.dictValue}"> | ||
| 82 | + </option> | ||
| 83 | + </select> | ||
| 74 | </div> | 84 | </div> |
| 75 | </div> | 85 | </div> |
| 76 | <div class="form-group"> | 86 | <div class="form-group"> |
| 77 | <label class="col-sm-3 control-label">是否区内:</label> | 87 | <label class="col-sm-3 control-label">是否区内:</label> |
| 78 | <div class="col-sm-8"> | 88 | <div class="col-sm-8"> |
| 79 | - <input name="inoutDistrict" class="form-control" type="text"> | 89 | + <select name="inoutDistrict" |
| 90 | + th:with="type=${@dict.getType('trueFalse')}" | ||
| 91 | + class="form-control m-b"> | ||
| 92 | + <option value=""></option> | ||
| 93 | + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" | ||
| 94 | + th:value="${dict.dictValue}"> | ||
| 95 | + | ||
| 96 | + </option> | ||
| 97 | + </select> | ||
| 80 | </div> | 98 | </div> |
| 81 | </div> | 99 | </div> |
| 82 | <div class="form-group"> | 100 | <div class="form-group"> |
| 83 | <label class="col-sm-3 control-label">营运状态 运营中/撤销/暂停:</label> | 101 | <label class="col-sm-3 control-label">营运状态 运营中/撤销/暂停:</label> |
| 84 | <div class="col-sm-8"> | 102 | <div class="col-sm-8"> |
| 85 | - <input name="serviceState" class="form-control" type="text"> | 103 | + <select name="serviceState" |
| 104 | + th:with="type=${@dict.getType('serviceState')}" | ||
| 105 | + class="form-control m-b"> | ||
| 106 | + <option value=""></option> | ||
| 107 | + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" | ||
| 108 | + th:value="${dict.dictValue}"> | ||
| 109 | + </option> | ||
| 110 | + </select> | ||
| 86 | </div> | 111 | </div> |
| 87 | </div> | 112 | </div> |
| 88 | <div class="form-group"> | 113 | <div class="form-group"> |
| 89 | <label class="col-sm-3 control-label">车辆类型 多选:</label> | 114 | <label class="col-sm-3 control-label">车辆类型 多选:</label> |
| 90 | - <div class="col-sm-8"> | ||
| 91 | - <select name="busType" class="form-control m-b"> | ||
| 92 | - <option value="">所有</option> | ||
| 93 | - </select> | ||
| 94 | - <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> | 115 | + <div class="col-sm-8" th:with="type=${@dict.getType('busType')}"> |
| 116 | + <label class="checkbox-inline" th:each="dict : ${type}" | ||
| 117 | + style="display: block"> <input type="checkbox" | ||
| 118 | + name="busType" | ||
| 119 | + th:text="${dict.dictLabel}" th:value="${dict.dictValue}" /></label> | ||
| 95 | </div> | 120 | </div> |
| 96 | </div> | 121 | </div> |
| 97 | <div class="form-group"> | 122 | <div class="form-group"> |
| 98 | <label class="col-sm-3 control-label">是否空调:</label> | 123 | <label class="col-sm-3 control-label">是否空调:</label> |
| 99 | <div class="col-sm-8"> | 124 | <div class="col-sm-8"> |
| 100 | - <select name="airConditionerType" class="form-control m-b"> | ||
| 101 | - <option value="">所有</option> | 125 | + <select name="airConditionerType" |
| 126 | + th:with="type=${@dict.getType('airConditionerType')}" | ||
| 127 | + class="form-control m-b"> | ||
| 128 | + <option value=""></option> | ||
| 129 | + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" | ||
| 130 | + th:value="${dict.dictValue}"> | ||
| 131 | + </option> | ||
| 102 | </select> | 132 | </select> |
| 103 | - <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> | ||
| 104 | </div> | 133 | </div> |
| 105 | </div> | 134 | </div> |
| 106 | <div class="form-group"> | 135 | <div class="form-group"> |
| 107 | <label class="col-sm-3 control-label">售票类型:</label> | 136 | <label class="col-sm-3 control-label">售票类型:</label> |
| 108 | <div class="col-sm-8"> | 137 | <div class="col-sm-8"> |
| 109 | - <select name="sellTicketType" class="form-control m-b"> | ||
| 110 | - <option value="">所有</option> | 138 | + <select name="sellTicketType" |
| 139 | + th:with="type=${@dict.getType('sellTicketType')}" | ||
| 140 | + class="form-control m-b"> | ||
| 141 | + <option value=""></option> | ||
| 142 | + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" | ||
| 143 | + th:value="${dict.dictValue}"> | ||
| 144 | + </option> | ||
| 111 | </select> | 145 | </select> |
| 112 | - <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> | ||
| 113 | </div> | 146 | </div> |
| 114 | </div> | 147 | </div> |
| 115 | <div class="form-group"> | 148 | <div class="form-group"> |
| 116 | <label class="col-sm-3 control-label">运营时间:</label> | 149 | <label class="col-sm-3 control-label">运营时间:</label> |
| 117 | <div class="col-sm-8"> | 150 | <div class="col-sm-8"> |
| 118 | - <input name="serviceTime" class="form-control" type="text"> | 151 | + <select name="serviceTime" |
| 152 | + th:with="type=${@dict.getType('serviceTime')}" | ||
| 153 | + class="form-control m-b"> | ||
| 154 | + <option value=""></option> | ||
| 155 | + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" | ||
| 156 | + th:value="${dict.dictValue}"> | ||
| 157 | + </option> | ||
| 158 | + </select> | ||
| 119 | </div> | 159 | </div> |
| 120 | </div> | 160 | </div> |
| 121 | <div class="form-group"> | 161 | <div class="form-group"> |
| @@ -187,7 +227,14 @@ | @@ -187,7 +227,14 @@ | ||
| 187 | <div class="form-group"> | 227 | <div class="form-group"> |
| 188 | <label class="col-sm-3 control-label">是否逻辑删除:</label> | 228 | <label class="col-sm-3 control-label">是否逻辑删除:</label> |
| 189 | <div class="col-sm-8"> | 229 | <div class="col-sm-8"> |
| 190 | - <input name="isLogicDelete" class="form-control" type="text"> | 230 | + <select name="isLogicDelete" |
| 231 | + th:with="type=${@dict.getType('trueFalse')}" | ||
| 232 | + class="form-control m-b"> | ||
| 233 | + <option value=""></option> | ||
| 234 | + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" | ||
| 235 | + th:value="${dict.dictValue}"> | ||
| 236 | + </option> | ||
| 237 | + </select> | ||
| 191 | </div> | 238 | </div> |
| 192 | </div> | 239 | </div> |
| 193 | <div class="form-group"> | 240 | <div class="form-group"> |
| @@ -223,16 +270,49 @@ | @@ -223,16 +270,49 @@ | ||
| 223 | <div class="form-group"> | 270 | <div class="form-group"> |
| 224 | <label class="col-sm-3 control-label">是否权证:</label> | 271 | <label class="col-sm-3 control-label">是否权证:</label> |
| 225 | <div class="col-sm-8"> | 272 | <div class="col-sm-8"> |
| 226 | - <input name="isWarrant" class="form-control" type="text"> | 273 | + <select name="isWarrant" id="isWarrant" |
| 274 | + th:with="type=${@dict.getType('trueFalse')}" | ||
| 275 | + class="form-control m-b"> | ||
| 276 | + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" | ||
| 277 | + th:value="${dict.dictValue}" th:selected="${dict.dictValue=='1'}"> | ||
| 278 | + </option> | ||
| 279 | + </select> | ||
| 280 | + </div> | ||
| 281 | + </div> | ||
| 282 | + <div class="form-group"> | ||
| 283 | + <label class="col-sm-3 control-label">权证开通日期:</label> | ||
| 284 | + <div class="col-sm-8"> | ||
| 285 | + <div class="input-group date"> | ||
| 286 | + <input name="isWarrantStartTime" id="isWarrantStartTime" | ||
| 287 | + class="form-control" placeholder="yyyy-MM-dd" type="text" | ||
| 288 | + autocomplete="off"> <span class="input-group-addon"><i | ||
| 289 | + class="fa fa-calendar"></i></span> | ||
| 290 | + </div> | ||
| 291 | + | ||
| 292 | + </div> | ||
| 293 | + </div> | ||
| 294 | + <div class="form-group"> | ||
| 295 | + <label class="col-sm-3 control-label">权证到期日期:</label> | ||
| 296 | + <div class="col-sm-8"> | ||
| 297 | + <div class="input-group date"> | ||
| 298 | + <input name="isWarrantEndTime" id="isWarrantEndTime" | ||
| 299 | + class="form-control" placeholder="yyyy-MM-dd" type="text" | ||
| 300 | + autocomplete="off"> <span class="input-group-addon"><i | ||
| 301 | + class="fa fa-calendar"></i></span> | ||
| 302 | + </div> | ||
| 303 | + | ||
| 227 | </div> | 304 | </div> |
| 228 | </div> | 305 | </div> |
| 229 | <div class="form-group"> | 306 | <div class="form-group"> |
| 230 | <label class="col-sm-3 control-label">道路类型:</label> | 307 | <label class="col-sm-3 control-label">道路类型:</label> |
| 231 | <div class="col-sm-8"> | 308 | <div class="col-sm-8"> |
| 232 | - <select name="roadType" class="form-control m-b"> | ||
| 233 | - <option value="">所有</option> | ||
| 234 | - </select> | ||
| 235 | - <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> | 309 | + <div class="col-sm-8" th:with="type=${@dict.getType('roadType')}"> |
| 310 | + <label class="checkbox-inline" th:each="dict : ${type}" | ||
| 311 | + style="display: block"> <input type="checkbox" | ||
| 312 | + name="roadType" | ||
| 313 | + th:text="${dict.dictLabel}" th:value="${dict.dictValue}" /> | ||
| 314 | + </label> | ||
| 315 | + </div> | ||
| 236 | </div> | 316 | </div> |
| 237 | </div> | 317 | </div> |
| 238 | <div class="form-group"> | 318 | <div class="form-group"> |
| @@ -326,13 +406,13 @@ | @@ -326,13 +406,13 @@ | ||
| 326 | </div> | 406 | </div> |
| 327 | </div> | 407 | </div> |
| 328 | <div class="form-group"> | 408 | <div class="form-group"> |
| 329 | - <label class="col-sm-3 control-label">经营权证:</label> | 409 | + <label class="col-sm-3 control-label">经营权证(大巴):</label> |
| 330 | <div class="col-sm-8"> | 410 | <div class="col-sm-8"> |
| 331 | <input name="warrantVehiclesLarge" class="form-control" type="text"> | 411 | <input name="warrantVehiclesLarge" class="form-control" type="text"> |
| 332 | </div> | 412 | </div> |
| 333 | </div> | 413 | </div> |
| 334 | <div class="form-group"> | 414 | <div class="form-group"> |
| 335 | - <label class="col-sm-3 control-label">经营权证:</label> | 415 | + <label class="col-sm-3 control-label">经营权证(中巴):</label> |
| 336 | <div class="col-sm-8"> | 416 | <div class="col-sm-8"> |
| 337 | <input name="warrantVehiclesMiddle" class="form-control" type="text"> | 417 | <input name="warrantVehiclesMiddle" class="form-control" type="text"> |
| 338 | </div> | 418 | </div> |
| @@ -344,13 +424,13 @@ | @@ -344,13 +424,13 @@ | ||
| 344 | </div> | 424 | </div> |
| 345 | </div> | 425 | </div> |
| 346 | <div class="form-group"> | 426 | <div class="form-group"> |
| 347 | - <label class="col-sm-3 control-label">实际车辆数:</label> | 427 | + <label class="col-sm-3 control-label">实际车辆数(大):</label> |
| 348 | <div class="col-sm-8"> | 428 | <div class="col-sm-8"> |
| 349 | <input name="numberVehiclesLarge" class="form-control" type="text"> | 429 | <input name="numberVehiclesLarge" class="form-control" type="text"> |
| 350 | </div> | 430 | </div> |
| 351 | </div> | 431 | </div> |
| 352 | <div class="form-group"> | 432 | <div class="form-group"> |
| 353 | - <label class="col-sm-3 control-label">实际车辆数:</label> | 433 | + <label class="col-sm-3 control-label">实际车辆数(中):</label> |
| 354 | <div class="col-sm-8"> | 434 | <div class="col-sm-8"> |
| 355 | <input name="numberVehiclesMiddle" class="form-control" type="text"> | 435 | <input name="numberVehiclesMiddle" class="form-control" type="text"> |
| 356 | </div> | 436 | </div> |
| @@ -424,14 +504,24 @@ | @@ -424,14 +504,24 @@ | ||
| 424 | <div class="form-group"> | 504 | <div class="form-group"> |
| 425 | <label class="col-sm-3 control-label">是否挂牌:</label> | 505 | <label class="col-sm-3 control-label">是否挂牌:</label> |
| 426 | <div class="col-sm-8"> | 506 | <div class="col-sm-8"> |
| 427 | - <input name="hasTimelists" class="form-control" type="text"> | 507 | + <select name="hasTimelists" |
| 508 | + th:with="type=${@dict.getType('trueFalse')}" | ||
| 509 | + class="form-control m-b"> | ||
| 510 | + <option value=""></option> | ||
| 511 | + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" | ||
| 512 | + th:value="${dict.dictValue}"> | ||
| 513 | + </option> | ||
| 514 | + </select> | ||
| 428 | </div> | 515 | </div> |
| 429 | </div> | 516 | </div> |
| 430 | <div class="form-group"> | 517 | <div class="form-group"> |
| 431 | <label class="col-sm-3 control-label">是否轨交末班车衔接:</label> | 518 | <label class="col-sm-3 control-label">是否轨交末班车衔接:</label> |
| 432 | - <div class="col-sm-8"> | ||
| 433 | - <input name="isMetro" class="form-control" type="text"> | ||
| 434 | - </div> | 519 | + <select name="isMetro" th:with="type=${@dict.getType('trueFalse')}" |
| 520 | + class="form-control m-b"> | ||
| 521 | + <option value=""></option> | ||
| 522 | + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" | ||
| 523 | + th:value="${dict.dictValue}"></option> | ||
| 524 | + </select> | ||
| 435 | </div> | 525 | </div> |
| 436 | <div class="form-group"> | 526 | <div class="form-group"> |
| 437 | <label class="col-sm-3 control-label">轨交时间:</label> | 527 | <label class="col-sm-3 control-label">轨交时间:</label> |
| @@ -445,10 +535,7 @@ | @@ -445,10 +535,7 @@ | ||
| 445 | <div class="form-group"> | 535 | <div class="form-group"> |
| 446 | <label class="col-sm-3 control-label">冷僻线路补贴类型:</label> | 536 | <label class="col-sm-3 control-label">冷僻线路补贴类型:</label> |
| 447 | <div class="col-sm-8"> | 537 | <div class="col-sm-8"> |
| 448 | - <select name="coldBonusType" class="form-control m-b"> | ||
| 449 | - <option value="">所有</option> | ||
| 450 | - </select> | ||
| 451 | - <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> | 538 | + <input name="coldBonusType" lass="form-control" type="text"> |
| 452 | </div> | 539 | </div> |
| 453 | </div> | 540 | </div> |
| 454 | <div class="form-group"> | 541 | <div class="form-group"> |
| @@ -508,12 +595,6 @@ | @@ -508,12 +595,6 @@ | ||
| 508 | </div> | 595 | </div> |
| 509 | </div> | 596 | </div> |
| 510 | </div> | 597 | </div> |
| 511 | - <div class="form-group"> | ||
| 512 | - <label class="col-sm-3 control-label">夜间停车场(无):</label> | ||
| 513 | - <div class="col-sm-8"> | ||
| 514 | - <input name="nightParking" class="form-control" type="text"> | ||
| 515 | - </div> | ||
| 516 | - </div> | ||
| 517 | </form> | 598 | </form> |
| 518 | </div> | 599 | </div> |
| 519 | <th:block th:include="include :: footer" /> | 600 | <th:block th:include="include :: footer" /> |
| @@ -521,7 +602,26 @@ | @@ -521,7 +602,26 @@ | ||
| 521 | <script th:inline="javascript"> | 602 | <script th:inline="javascript"> |
| 522 | var prefix = ctx + "system/line" | 603 | var prefix = ctx + "system/line" |
| 523 | $("#form-line-add").validate({ | 604 | $("#form-line-add").validate({ |
| 524 | - focusCleanup: true | 605 | + rules:{ |
| 606 | + isWarrantStartTime:{ | ||
| 607 | + required:function (){ | ||
| 608 | + return $('#isWarrant').val()==='1'; | ||
| 609 | + }, | ||
| 610 | + }, | ||
| 611 | + isWarrantEndTime:{ | ||
| 612 | + required:function (){ | ||
| 613 | + return $('#isWarrant').val()==='1'; | ||
| 614 | + }, | ||
| 615 | + }, | ||
| 616 | + }, | ||
| 617 | + messages: { | ||
| 618 | + isWarrantStartTime: { | ||
| 619 | + required: "请选择日期", | ||
| 620 | + }, | ||
| 621 | + isWarrantEndTime: { | ||
| 622 | + required: "请选择日期", | ||
| 623 | + } | ||
| 624 | + },focusCleanup: true | ||
| 525 | }); | 625 | }); |
| 526 | 626 | ||
| 527 | function submitHandler() { | 627 | function submitHandler() { |
| @@ -577,6 +677,18 @@ | @@ -577,6 +677,18 @@ | ||
| 577 | minView: "month", | 677 | minView: "month", |
| 578 | autoclose: true | 678 | autoclose: true |
| 579 | }); | 679 | }); |
| 680 | + | ||
| 681 | + $("input[name='isWarrantStartTime']").datetimepicker({ | ||
| 682 | + format: "yyyy-mm-dd", | ||
| 683 | + minView: "month", | ||
| 684 | + autoclose: true | ||
| 685 | + }); | ||
| 686 | + $("input[name='isWarrantEndTime']").datetimepicker({ | ||
| 687 | + format: "yyyy-mm-dd", | ||
| 688 | + minView: "month", | ||
| 689 | + autoclose: trueg | ||
| 690 | + }); | ||
| 691 | + | ||
| 580 | </script> | 692 | </script> |
| 581 | </body> | 693 | </body> |
| 582 | </html> | 694 | </html> |
| 583 | \ No newline at end of file | 695 | \ No newline at end of file |
bsthLineProfiles/src/main/resources/templates/system/line/edit.html
| @@ -283,10 +283,9 @@ | @@ -283,10 +283,9 @@ | ||
| 283 | <div class="form-group"> | 283 | <div class="form-group"> |
| 284 | <label class="col-sm-3 control-label">是否权证:</label> | 284 | <label class="col-sm-3 control-label">是否权证:</label> |
| 285 | <div class="col-sm-8"> | 285 | <div class="col-sm-8"> |
| 286 | - <select name="isWarrant" | 286 | + <select name="isWarrant" id="isWarrant" |
| 287 | th:with="type=${@dict.getType('trueFalse')}" | 287 | th:with="type=${@dict.getType('trueFalse')}" |
| 288 | class="form-control m-b"> | 288 | class="form-control m-b"> |
| 289 | - <option value=""></option> | ||
| 290 | <option th:each="dict : ${type}" th:text="${dict.dictLabel}" | 289 | <option th:each="dict : ${type}" th:text="${dict.dictLabel}" |
| 291 | th:value="${dict.dictValue}" | 290 | th:value="${dict.dictValue}" |
| 292 | th:selected="${#arrays.contains(#strings.toString(bsthTLine.isWarrant== null ? '' : bsthTLine.isWarrant),#strings.toString(dict.dictValue))}"></option> | 291 | th:selected="${#arrays.contains(#strings.toString(bsthTLine.isWarrant== null ? '' : bsthTLine.isWarrant),#strings.toString(dict.dictValue))}"></option> |
| @@ -294,6 +293,32 @@ | @@ -294,6 +293,32 @@ | ||
| 294 | </div> | 293 | </div> |
| 295 | </div> | 294 | </div> |
| 296 | <div class="form-group"> | 295 | <div class="form-group"> |
| 296 | + <label class="col-sm-3 control-label">权证开通日期:</label> | ||
| 297 | + <div class="col-sm-8"> | ||
| 298 | + <div class="input-group date"> | ||
| 299 | + <input name="isWarrantStartTime" id="isWarrantStartTime" | ||
| 300 | + th:value="${#dates.format(bsthTLine.isWarrantStartTime, 'yyyy-MM-dd')}" | ||
| 301 | + class="form-control" placeholder="yyyy-MM-dd" type="text" | ||
| 302 | + autocomplete="off"> <span class="input-group-addon"><i | ||
| 303 | + class="fa fa-calendar"></i></span> | ||
| 304 | + </div> | ||
| 305 | + | ||
| 306 | + </div> | ||
| 307 | + </div> | ||
| 308 | + <div class="form-group"> | ||
| 309 | + <label class="col-sm-3 control-label">权证到期日期:</label> | ||
| 310 | + <div class="col-sm-8"> | ||
| 311 | + <div class="input-group date"> | ||
| 312 | + <input name="isWarrantEndTime" id="isWarrantEndTime" | ||
| 313 | + th:value="${#dates.format(bsthTLine.isWarrantEndTime, 'yyyy-MM-dd')}" | ||
| 314 | + class="form-control" placeholder="yyyy-MM-dd" type="text" | ||
| 315 | + autocomplete="off"> <span class="input-group-addon"><i | ||
| 316 | + class="fa fa-calendar"></i></span> | ||
| 317 | + </div> | ||
| 318 | + | ||
| 319 | + </div> | ||
| 320 | + </div> | ||
| 321 | + <div class="form-group"> | ||
| 297 | <label class="col-sm-3 control-label">道路类型:</label> | 322 | <label class="col-sm-3 control-label">道路类型:</label> |
| 298 | <div class="col-sm-8"> | 323 | <div class="col-sm-8"> |
| 299 | <div class="col-sm-8" th:with="type=${@dict.getType('roadType')}"> | 324 | <div class="col-sm-8" th:with="type=${@dict.getType('roadType')}"> |
| @@ -641,7 +666,6 @@ | @@ -641,7 +666,6 @@ | ||
| 641 | <select name="lineUpdateType" | 666 | <select name="lineUpdateType" |
| 642 | th:with="type=${@dict.getType('lineUpdateType')}" | 667 | th:with="type=${@dict.getType('lineUpdateType')}" |
| 643 | class="form-control m-b"> | 668 | class="form-control m-b"> |
| 644 | - <option value=""></option> | ||
| 645 | <option th:each="dict : ${type}" th:text="${dict.dictLabel}" | 669 | <option th:each="dict : ${type}" th:text="${dict.dictLabel}" |
| 646 | th:value="${dict.dictValue}"></option> | 670 | th:value="${dict.dictValue}"></option> |
| 647 | </select> | 671 | </select> |
| @@ -774,6 +798,26 @@ | @@ -774,6 +798,26 @@ | ||
| 774 | } | 798 | } |
| 775 | 799 | ||
| 776 | $("#form-line-edit").validate({ | 800 | $("#form-line-edit").validate({ |
| 801 | + rules:{ | ||
| 802 | + isWarrantStartTime:{ | ||
| 803 | + required:function (){ | ||
| 804 | + return $('#isWarrant').val()==='1'; | ||
| 805 | + }, | ||
| 806 | + }, | ||
| 807 | + isWarrantEndTime:{ | ||
| 808 | + required:function (){ | ||
| 809 | + return $('#isWarrant').val()==='1'; | ||
| 810 | + }, | ||
| 811 | + }, | ||
| 812 | + }, | ||
| 813 | + messages: { | ||
| 814 | + isWarrantStartTime: { | ||
| 815 | + required: "请选择日期", | ||
| 816 | + }, | ||
| 817 | + isWarrantEndTime: { | ||
| 818 | + required: "请选择日期", | ||
| 819 | + } | ||
| 820 | + }, | ||
| 777 | focusCleanup : true | 821 | focusCleanup : true |
| 778 | }); | 822 | }); |
| 779 | 823 | ||
| @@ -834,6 +878,19 @@ | @@ -834,6 +878,19 @@ | ||
| 834 | minView : "month", | 878 | minView : "month", |
| 835 | autoclose : true | 879 | autoclose : true |
| 836 | }); | 880 | }); |
| 881 | + | ||
| 882 | + $("input[name='isWarrantStartTime']").datetimepicker({ | ||
| 883 | + format : "yyyy-mm-dd", | ||
| 884 | + minView : "month", | ||
| 885 | + autoclose : true | ||
| 886 | + }); | ||
| 887 | + | ||
| 888 | + $("input[name='isWarrantEndTime']").datetimepicker({ | ||
| 889 | + format : "yyyy-mm-dd", | ||
| 890 | + minView : "month", | ||
| 891 | + autoclose : true | ||
| 892 | + }); | ||
| 893 | + | ||
| 837 | </script> | 894 | </script> |
| 838 | </body> | 895 | </body> |
| 839 | </html> | 896 | </html> |
| 840 | \ No newline at end of file | 897 | \ No newline at end of file |
bsthLineProfiles/src/main/resources/templates/system/line/line.html
| @@ -220,7 +220,9 @@ | @@ -220,7 +220,9 @@ | ||
| 220 | <div class="btn-group-sm" id="toolbar" role="group"> | 220 | <div class="btn-group-sm" id="toolbar" role="group"> |
| 221 | 221 | ||
| 222 | <el-button plain size="mini" type="success" icon="el-icon-search" onClick="$.table.search();" data-toggle="modal" data-target="#myModal">选择显示的列</el-button> | 222 | <el-button plain size="mini" type="success" icon="el-icon-search" onClick="$.table.search();" data-toggle="modal" data-target="#myModal">选择显示的列</el-button> |
| 223 | - | 223 | + |
| 224 | + <el-button plain size="mini" type="primary" icon="el-icon-plus" onClick="add(this);" shiro:hasPermission="system:line:add">新增</el-button> | ||
| 225 | + | ||
| 224 | <el-button plain size="mini" type="primary" icon="el-icon-edit" onClick="edit(this);" class="btn single disabled" shiro:hasPermission="system:line:edit">修改</el-button> | 226 | <el-button plain size="mini" type="primary" icon="el-icon-edit" onClick="edit(this);" class="btn single disabled" shiro:hasPermission="system:line:edit">修改</el-button> |
| 225 | 227 | ||
| 226 | <el-button plain size="mini" type="danger" icon="el-icon-delete" onClick="remove(this);" class="btn multiple disabled" shiro:hasPermission="system:line:remove"> 删除</el-button> | 228 | <el-button plain size="mini" type="danger" icon="el-icon-delete" onClick="remove(this);" class="btn multiple disabled" shiro:hasPermission="system:line:remove"> 删除</el-button> |
| @@ -261,7 +263,12 @@ | @@ -261,7 +263,12 @@ | ||
| 261 | 263 | ||
| 262 | 264 | ||
| 263 | <script th:inline="javascript"> | 265 | <script th:inline="javascript"> |
| 264 | - | 266 | + |
| 267 | + function add(obj){ | ||
| 268 | + if($(obj)[0].className.indexOf("disabled") == -1) | ||
| 269 | + $.operate.add(); | ||
| 270 | + | ||
| 271 | + } | ||
| 265 | 272 | ||
| 266 | function edit(obj){ | 273 | function edit(obj){ |
| 267 | if($(obj)[0].className.indexOf("disabled") == -1) | 274 | if($(obj)[0].className.indexOf("disabled") == -1) |
| @@ -289,15 +296,15 @@ | @@ -289,15 +296,15 @@ | ||
| 289 | 296 | ||
| 290 | function initTable(){ | 297 | function initTable(){ |
| 291 | var objs = $("#cols div"); | 298 | var objs = $("#cols div"); |
| 292 | - | ||
| 293 | - | 299 | + |
| 300 | + | ||
| 294 | var data = []; | 301 | var data = []; |
| 295 | 302 | ||
| 296 | for(var i = 0;i< objs.length;i++){ | 303 | for(var i = 0;i< objs.length;i++){ |
| 297 | var name = $(objs[i]).find("input")[0].name; | 304 | var name = $(objs[i]).find("input")[0].name; |
| 298 | var text = $(objs[i]).find("label")[0].innerText; | 305 | var text = $(objs[i]).find("label")[0].innerText; |
| 299 | var checked = $(objs[i]).find("input")[0].checked; | 306 | var checked = $(objs[i]).find("input")[0].checked; |
| 300 | - | 307 | + |
| 301 | data.push({ | 308 | data.push({ |
| 302 | name:name, | 309 | name:name, |
| 303 | text:text, | 310 | text:text, |
| @@ -306,12 +313,12 @@ | @@ -306,12 +313,12 @@ | ||
| 306 | } | 313 | } |
| 307 | 314 | ||
| 308 | createTable(data); | 315 | createTable(data); |
| 309 | - | 316 | + |
| 310 | $.post("/system/line/updateUserLineInfo",{lineInfo:JSON.stringify(data)},function(data){ | 317 | $.post("/system/line/updateUserLineInfo",{lineInfo:JSON.stringify(data)},function(data){ |
| 311 | $.modal.msg(data.msg); | 318 | $.modal.msg(data.msg); |
| 312 | }); | 319 | }); |
| 313 | } | 320 | } |
| 314 | - | 321 | + |
| 315 | function createTable(objs){ | 322 | function createTable(objs){ |
| 316 | var options = { | 323 | var options = { |
| 317 | url: prefix + "/list", | 324 | url: prefix + "/list", |
| @@ -320,7 +327,16 @@ | @@ -320,7 +327,16 @@ | ||
| 320 | removeUrl: prefix + "/remove", | 327 | removeUrl: prefix + "/remove", |
| 321 | exportUrl: prefix + "/export", | 328 | exportUrl: prefix + "/export", |
| 322 | modalName: "线路档案信息", | 329 | modalName: "线路档案信息", |
| 323 | - columns: [] | 330 | + columns: [], |
| 331 | + rowStyle:function(row,index) { | ||
| 332 | + var flag=DateMinus(row.isWarrantEndTime); | ||
| 333 | + if(row.isWarrant==='1'&&!flag){ | ||
| 334 | + var strClass='danger'; | ||
| 335 | + return {classes:strClass}; | ||
| 336 | + } | ||
| 337 | + return ""; | ||
| 338 | + | ||
| 339 | + } | ||
| 324 | }; | 340 | }; |
| 325 | 341 | ||
| 326 | 342 | ||
| @@ -337,27 +353,27 @@ | @@ -337,27 +353,27 @@ | ||
| 337 | visible:objs[i].checked, | 353 | visible:objs[i].checked, |
| 338 | align: 'center', | 354 | align: 'center', |
| 339 | formatter: function(value, row, index) { | 355 | formatter: function(value, row, index) { |
| 340 | - | ||
| 341 | - | 356 | + |
| 357 | + | ||
| 342 | if(this.field == "roadType" || this.field == "busType"){ | 358 | if(this.field == "roadType" || this.field == "busType"){ |
| 343 | if(value != null){ | 359 | if(value != null){ |
| 344 | - | 360 | + |
| 345 | var arr = value.split(","); | 361 | var arr = value.split(","); |
| 346 | value = ""; | 362 | value = ""; |
| 347 | for(var i in arr){ | 363 | for(var i in arr){ |
| 348 | - | 364 | + |
| 349 | for(var j in dicts[this.field]){ | 365 | for(var j in dicts[this.field]){ |
| 350 | if(dicts[this.field][j].dictValue == arr[i]){ | 366 | if(dicts[this.field][j].dictValue == arr[i]){ |
| 351 | value += dicts[this.field][j].dictLabel + "," | 367 | value += dicts[this.field][j].dictLabel + "," |
| 352 | break; | 368 | break; |
| 353 | } | 369 | } |
| 354 | } | 370 | } |
| 355 | - | 371 | + |
| 356 | } | 372 | } |
| 357 | return $.table.tooltip(value.substring(0,value.length -1), 5); | 373 | return $.table.tooltip(value.substring(0,value.length -1), 5); |
| 358 | } | 374 | } |
| 359 | } | 375 | } |
| 360 | - | 376 | + |
| 361 | if(this.field == "isLogicDelete" || this.field == "inoutDistrict"|| this.field == "isMetro" || this.field == "hasTimelists"){ | 377 | if(this.field == "isLogicDelete" || this.field == "inoutDistrict"|| this.field == "isMetro" || this.field == "hasTimelists"){ |
| 362 | for(var j in dicts["trueFalse"]){ | 378 | for(var j in dicts["trueFalse"]){ |
| 363 | if(dicts["trueFalse"][j].dictValue == value){ | 379 | if(dicts["trueFalse"][j].dictValue == value){ |
| @@ -366,9 +382,9 @@ | @@ -366,9 +382,9 @@ | ||
| 366 | } | 382 | } |
| 367 | } | 383 | } |
| 368 | } | 384 | } |
| 369 | - | ||
| 370 | - | ||
| 371 | - | 385 | + |
| 386 | + | ||
| 387 | + | ||
| 372 | if(dicts[this.field]){ | 388 | if(dicts[this.field]){ |
| 373 | for(var j in dicts[this.field]){ | 389 | for(var j in dicts[this.field]){ |
| 374 | if(dicts[this.field][j].dictValue == value){ | 390 | if(dicts[this.field][j].dictValue == value){ |
| @@ -377,7 +393,7 @@ | @@ -377,7 +393,7 @@ | ||
| 377 | } | 393 | } |
| 378 | } | 394 | } |
| 379 | } | 395 | } |
| 380 | - | 396 | + |
| 381 | return $.table.tooltip(value, 5); | 397 | return $.table.tooltip(value, 5); |
| 382 | } | 398 | } |
| 383 | } | 399 | } |
| @@ -400,7 +416,7 @@ | @@ -400,7 +416,7 @@ | ||
| 400 | } | 416 | } |
| 401 | 417 | ||
| 402 | options.columns.push(col); | 418 | options.columns.push(col); |
| 403 | - | 419 | + |
| 404 | } | 420 | } |
| 405 | 421 | ||
| 406 | $.table.destroy(); | 422 | $.table.destroy(); |
| @@ -440,12 +456,12 @@ | @@ -440,12 +456,12 @@ | ||
| 440 | } | 456 | } |
| 441 | 457 | ||
| 442 | dicts = allDicts; | 458 | dicts = allDicts; |
| 443 | - | ||
| 444 | - | 459 | + |
| 460 | + | ||
| 445 | 461 | ||
| 446 | 462 | ||
| 447 | 463 | ||
| 448 | - | 464 | + |
| 449 | var cols = [{ | 465 | var cols = [{ |
| 450 | field: 'lineName', | 466 | field: 'lineName', |
| 451 | title: '线路名称' | 467 | title: '线路名称' |
| @@ -562,6 +578,14 @@ | @@ -562,6 +578,14 @@ | ||
| 562 | field: 'isWarrant', | 578 | field: 'isWarrant', |
| 563 | title: '是否权证' | 579 | title: '是否权证' |
| 564 | }, | 580 | }, |
| 581 | + { | ||
| 582 | + field: 'isWarrantStartTime', | ||
| 583 | + title: '权证开通日期' | ||
| 584 | + }, | ||
| 585 | + { | ||
| 586 | + field: 'isWarrantEndTime', | ||
| 587 | + title: '权证到期日期' | ||
| 588 | + }, | ||
| 565 | { | 589 | { |
| 566 | field: 'roadType', | 590 | field: 'roadType', |
| 567 | title: '道路类型' | 591 | title: '道路类型' |
| @@ -741,8 +765,25 @@ | @@ -741,8 +765,25 @@ | ||
| 741 | } | 765 | } |
| 742 | }); | 766 | }); |
| 743 | 767 | ||
| 744 | - | 768 | + |
| 745 | }); | 769 | }); |
| 770 | + | ||
| 771 | + | ||
| 772 | + function DateMinus(date1){ | ||
| 773 | + if(date1==null){ | ||
| 774 | + return true; | ||
| 775 | + } | ||
| 776 | + | ||
| 777 | + var sdate = new Date(date1); | ||
| 778 | + var now = new Date(); | ||
| 779 | + var days = sdate.getTime()-now.getTime(); | ||
| 780 | + var day = parseInt(days / (1000 * 60 * 60 * 24)); | ||
| 781 | + console.log(day); | ||
| 782 | + if(day<120){ | ||
| 783 | + return false; | ||
| 784 | + } | ||
| 785 | + return true; | ||
| 786 | + } | ||
| 746 | </script> | 787 | </script> |
| 747 | 788 | ||
| 748 | <style> | 789 | <style> |