Commit af2f9f598ade5512f5d0950ddaf3269865e99611
1 parent
e467b3b7
线路与线路标准信息增删改查基本功能
Showing
22 changed files
with
2904 additions
and
136 deletions
src/main/java/com/bsth/controller/LineController.java
| 1 | package com.bsth.controller; | 1 | package com.bsth.controller; |
| 2 | 2 | ||
| 3 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 3 | import org.springframework.web.bind.annotation.RequestMapping; | 4 | import org.springframework.web.bind.annotation.RequestMapping; |
| 5 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 4 | import org.springframework.web.bind.annotation.RestController; | 6 | import org.springframework.web.bind.annotation.RestController; |
| 5 | 7 | ||
| 6 | import com.bsth.entity.Line; | 8 | import com.bsth.entity.Line; |
| 9 | +import com.bsth.service.LineService; | ||
| 7 | 10 | ||
| 8 | /** | 11 | /** |
| 9 | * | 12 | * |
| @@ -23,5 +26,17 @@ import com.bsth.entity.Line; | @@ -23,5 +26,17 @@ import com.bsth.entity.Line; | ||
| 23 | @RestController | 26 | @RestController |
| 24 | @RequestMapping("line") | 27 | @RequestMapping("line") |
| 25 | public class LineController extends BaseController<Line, Integer> { | 28 | public class LineController extends BaseController<Line, Integer> { |
| 26 | - | 29 | + |
| 30 | + @Autowired | ||
| 31 | + private LineService service; | ||
| 32 | + | ||
| 33 | + /** | ||
| 34 | + * 获取线路编码 | ||
| 35 | + * | ||
| 36 | + * @return int <lineCode:线路编码> | ||
| 37 | + */ | ||
| 38 | + @RequestMapping(value = "getLineCode", method = RequestMethod.GET) | ||
| 39 | + public int getLineCode() { | ||
| 40 | + return service.selectMaxIdToLineCode(); | ||
| 41 | + } | ||
| 27 | } | 42 | } |
src/main/java/com/bsth/controller/LineInformationController.java
0 → 100644
| 1 | +package com.bsth.controller; | ||
| 2 | + | ||
| 3 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 4 | +import org.springframework.web.bind.annotation.RestController; | ||
| 5 | + | ||
| 6 | +import com.bsth.entity.LineInformation; | ||
| 7 | +import com.bsth.entity.Section; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * | ||
| 11 | + * @ClassName: LineInformationController(线路标准信息控制器) | ||
| 12 | + * | ||
| 13 | + * @Extends : BaseController | ||
| 14 | + * | ||
| 15 | + * @Description: TODO(路段控制层) | ||
| 16 | + * | ||
| 17 | + * @Author bsth@lq | ||
| 18 | + * | ||
| 19 | + * @Date 2016年05月03日 上午9:21:17 | ||
| 20 | + * | ||
| 21 | + * @Version 公交调度系统BS版 0.1 | ||
| 22 | + * | ||
| 23 | + */ | ||
| 24 | + | ||
| 25 | +@RestController | ||
| 26 | +@RequestMapping("lineInformation") | ||
| 27 | +public class LineInformationController extends BaseController<LineInformation, Integer> { | ||
| 28 | + | ||
| 29 | +} |
src/main/java/com/bsth/entity/Station.java
src/main/java/com/bsth/repository/LineInformationRepository.java
0 → 100644
| 1 | +package com.bsth.repository; | ||
| 2 | + | ||
| 3 | +import org.springframework.stereotype.Repository; | ||
| 4 | + | ||
| 5 | +import com.bsth.entity.LineInformation; | ||
| 6 | +import com.bsth.entity.Section; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * | ||
| 10 | + * @Interface: LineInformationRepository(线路标准信息Repository数据持久层接口) | ||
| 11 | + * | ||
| 12 | + * @Extends : BaseRepository | ||
| 13 | + * | ||
| 14 | + * @Description: TODO(路段Repository数据持久层接口) | ||
| 15 | + * | ||
| 16 | + * @Author bsth@lq | ||
| 17 | + * | ||
| 18 | + * @Date 2016年05月03日 上午9:21:17 | ||
| 19 | + * | ||
| 20 | + * @Version 公交调度系统BS版 0.1 | ||
| 21 | + * | ||
| 22 | + */ | ||
| 23 | + | ||
| 24 | +@Repository | ||
| 25 | +public interface LineInformationRepository extends BaseRepository<LineInformation, Integer> { | ||
| 26 | + | ||
| 27 | +} |
src/main/java/com/bsth/repository/LineRepository.java
| 1 | package com.bsth.repository; | 1 | package com.bsth.repository; |
| 2 | 2 | ||
| 3 | +import org.springframework.data.jpa.repository.Query; | ||
| 3 | import org.springframework.stereotype.Repository; | 4 | import org.springframework.stereotype.Repository; |
| 4 | 5 | ||
| 5 | import com.bsth.entity.Line; | 6 | import com.bsth.entity.Line; |
| @@ -21,5 +22,12 @@ import com.bsth.entity.Line; | @@ -21,5 +22,12 @@ import com.bsth.entity.Line; | ||
| 21 | */ | 22 | */ |
| 22 | @Repository | 23 | @Repository |
| 23 | public interface LineRepository extends BaseRepository<Line, Integer> { | 24 | public interface LineRepository extends BaseRepository<Line, Integer> { |
| 24 | - | 25 | + |
| 26 | + /** | ||
| 27 | + * 获取线路编码 | ||
| 28 | + * | ||
| 29 | + * @return int <lineCode:线路编码> | ||
| 30 | + */ | ||
| 31 | + @Query(value = " SELECT MAX(id)+1 from bsth_c_line ", nativeQuery = true) | ||
| 32 | + public int selectMaxIdToLineCode(); | ||
| 25 | } | 33 | } |
src/main/java/com/bsth/service/LineInformationService.java
0 → 100644
| 1 | +package com.bsth.service; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.LineInformation; | ||
| 4 | + | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * | ||
| 8 | + * @Interface: LineInformationService(线路标准信息service业务层实现接口) | ||
| 9 | + * | ||
| 10 | + * @extends : BaseService | ||
| 11 | + * | ||
| 12 | + * @Description: TODO(线路service业务层实现接口) | ||
| 13 | + * | ||
| 14 | + * @Author bsth@lq | ||
| 15 | + * | ||
| 16 | + * @Date 2016年4月28日 上午9:21:17 | ||
| 17 | + * | ||
| 18 | + * @Version 公交调度系统BS版 0.1 | ||
| 19 | + * | ||
| 20 | + */ | ||
| 21 | +public interface LineInformationService extends BaseService<LineInformation, Integer> { | ||
| 22 | + | ||
| 23 | +} |
src/main/java/com/bsth/service/LineService.java
| @@ -18,5 +18,11 @@ import com.bsth.entity.Line; | @@ -18,5 +18,11 @@ import com.bsth.entity.Line; | ||
| 18 | * | 18 | * |
| 19 | */ | 19 | */ |
| 20 | public interface LineService extends BaseService<Line, Integer> { | 20 | public interface LineService extends BaseService<Line, Integer> { |
| 21 | - | 21 | + |
| 22 | + /** | ||
| 23 | + * 获取线路编码 | ||
| 24 | + * | ||
| 25 | + * @return int <lineCode:线路编码> | ||
| 26 | + */ | ||
| 27 | + int selectMaxIdToLineCode(); | ||
| 22 | } | 28 | } |
src/main/java/com/bsth/service/impl/LineInformationServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.impl; | ||
| 2 | + | ||
| 3 | +import org.springframework.stereotype.Service; | ||
| 4 | + | ||
| 5 | +import com.bsth.entity.LineInformation; | ||
| 6 | +import com.bsth.service.LineInformationService; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * | ||
| 10 | + * @ClassName: LineInformationServiceImpl(线路标准信息service业务层实现类) | ||
| 11 | + * | ||
| 12 | + * @Extends : BaseService | ||
| 13 | + * | ||
| 14 | + * @Description: TODO(路段service业务层) | ||
| 15 | + * | ||
| 16 | + * @Author bsth@lq | ||
| 17 | + * | ||
| 18 | + * @Date 2016年05月03日 上午9:21:17 | ||
| 19 | + * | ||
| 20 | + * @Version 公交调度系统BS版 0.1 | ||
| 21 | + * | ||
| 22 | + */ | ||
| 23 | + | ||
| 24 | +@Service | ||
| 25 | +public class LineInformationServiceImpl extends BaseServiceImpl<LineInformation, Integer> implements LineInformationService{ | ||
| 26 | + | ||
| 27 | +} |
src/main/java/com/bsth/service/impl/LineServiceImpl.java
| 1 | package com.bsth.service.impl; | 1 | package com.bsth.service.impl; |
| 2 | 2 | ||
| 3 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 3 | import org.springframework.stereotype.Service; | 4 | import org.springframework.stereotype.Service; |
| 4 | 5 | ||
| 5 | import com.bsth.entity.Line; | 6 | import com.bsth.entity.Line; |
| 7 | +import com.bsth.repository.LineRepository; | ||
| 6 | import com.bsth.service.LineService; | 8 | import com.bsth.service.LineService; |
| 7 | 9 | ||
| 8 | /** | 10 | /** |
| @@ -23,5 +25,18 @@ import com.bsth.service.LineService; | @@ -23,5 +25,18 @@ import com.bsth.service.LineService; | ||
| 23 | 25 | ||
| 24 | @Service | 26 | @Service |
| 25 | public class LineServiceImpl extends BaseServiceImpl<Line, Integer> implements LineService{ | 27 | public class LineServiceImpl extends BaseServiceImpl<Line, Integer> implements LineService{ |
| 28 | + | ||
| 29 | + @Autowired | ||
| 30 | + private LineRepository repository; | ||
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * 获取线路编码 | ||
| 34 | + * | ||
| 35 | + * @return int <lineCode:线路编码> | ||
| 36 | + */ | ||
| 37 | + public int selectMaxIdToLineCode() { | ||
| 38 | + // TODO Auto-generated method stub | ||
| 39 | + return repository.selectMaxIdToLineCode(); | ||
| 40 | + } | ||
| 26 | 41 | ||
| 27 | } | 42 | } |
src/main/resources/static/assets/js/common.js
| 1 | -/** | ||
| 2 | - * 删除提示框 | ||
| 3 | - * text 文本 | ||
| 4 | - * url 删除接口 | ||
| 5 | - * success 删除成功之后的回调 | ||
| 6 | - */ | ||
| 7 | -function removeConfirm(text, url, success) { | ||
| 8 | - layer.confirm(text, { | ||
| 9 | - btn : [ '确定删除', '取消' ], | ||
| 10 | - icon : 3, | ||
| 11 | - skin : 'layui-layer-cfm-delete' | ||
| 12 | - }, function(){ | ||
| 13 | - layer.msg('正在删除...', {icon: 16}); | ||
| 14 | - | ||
| 15 | - $post(url, {'_method': 'delete'},function(res){ | ||
| 16 | - layer.msg('删除成功!'); | ||
| 17 | - success && success(); | ||
| 18 | - }); | ||
| 19 | - }); | ||
| 20 | -} | ||
| 21 | - | ||
| 22 | - | ||
| 23 | -function successHandle(json, handle){ | ||
| 24 | - if(!json.status){ | ||
| 25 | - handle && handle(json); | ||
| 26 | - return ; | ||
| 27 | - } | ||
| 28 | - | ||
| 29 | - if(json.status == 'ERROR') | ||
| 30 | - layer.alert(json.msg, {icon: 2, title: '操作失败'}); | ||
| 31 | - else | ||
| 32 | - handle && handle(json); | ||
| 33 | -} | ||
| 34 | - | ||
| 35 | -function ajaxComplete(xhr, ts, succ){ | ||
| 36 | - if(ts == 'success'){ | ||
| 37 | - successHandle(xhr.responseJSON, succ); | ||
| 38 | - } | ||
| 39 | - else if(ts == 'error'){ | ||
| 40 | - layer.alert(xhr.responseText, {icon: 2, title: '操作失败'}); | ||
| 41 | - } | ||
| 42 | -} | ||
| 43 | - | ||
| 44 | -function $get(url,data, successFun) { | ||
| 45 | - $.ajax({ | ||
| 46 | - url: url, | ||
| 47 | - data: data, | ||
| 48 | - complete: function(xhr, ts){ | ||
| 49 | - ajaxComplete(xhr, ts, successFun); | ||
| 50 | - } | ||
| 51 | - }); | ||
| 52 | -} | ||
| 53 | - | ||
| 54 | -function $post(url,data, successFun) { | ||
| 55 | - $.ajax({ | ||
| 56 | - url: url, | ||
| 57 | - method: 'POST', | ||
| 58 | - data: data, | ||
| 59 | - complete: function(xhr, ts){ | ||
| 60 | - ajaxComplete(xhr, ts, successFun); | ||
| 61 | - } | ||
| 62 | - }); | ||
| 63 | -} | ||
| 64 | - | ||
| 65 | -//将数据写入表单 | ||
| 66 | -function putFormData(json, fId){ | ||
| 67 | - json.enable = json.enable==true? 1 : 0; | ||
| 68 | - for(var att in json){ | ||
| 69 | - var f = 'name=' +att | ||
| 70 | - ,elem = $('input['+f+'],select['+f+'],textarea['+f+']', fId); | ||
| 71 | - if(elem.length > 0){ | ||
| 72 | - if(elem.attr('type') == 'checkbox') | ||
| 73 | - elem[0].checked = json[att]; | ||
| 74 | - else | ||
| 75 | - elem.val(json[att]).change(); | ||
| 76 | - } | ||
| 77 | - } | ||
| 78 | -} | ||
| 79 | - | ||
| 80 | -/** | ||
| 81 | - * 将模块List 转换为树结构 | ||
| 82 | - * @param arr | ||
| 83 | - * @returns {Array} | ||
| 84 | - */ | ||
| 85 | -function createTreeData(arr){ | ||
| 86 | - var treeData = []; | ||
| 87 | - var len = arr.length; | ||
| 88 | - for(var i = 0; i < len; i ++){ | ||
| 89 | - var pId = arr[i].pId; | ||
| 90 | - arr[i].text = arr[i].name; | ||
| 91 | - if(!pId){ | ||
| 92 | - treeData.push(arr[i]); | ||
| 93 | - } | ||
| 94 | - | ||
| 95 | - for(var j = 0; j < len; j ++){ | ||
| 96 | - if(pId == arr[j].id){ | ||
| 97 | - if(!arr[j].children) | ||
| 98 | - arr[j].children = []; | ||
| 99 | - arr[j].children.push(arr[i]); | ||
| 100 | - break; | ||
| 101 | - } | ||
| 102 | - } | ||
| 103 | - } | ||
| 104 | - return treeData; | 1 | +/** |
| 2 | + * 删除提示框 | ||
| 3 | + * text 文本 | ||
| 4 | + * url 删除接口 | ||
| 5 | + * success 删除成功之后的回调 | ||
| 6 | + */ | ||
| 7 | +function removeConfirm(text, url, success) { | ||
| 8 | + layer.confirm(text, { | ||
| 9 | + btn : [ '确定删除', '取消' ], | ||
| 10 | + icon : 3, | ||
| 11 | + skin : 'layui-layer-cfm-delete' | ||
| 12 | + }, function(){ | ||
| 13 | + layer.msg('正在删除...', {icon: 16}); | ||
| 14 | + | ||
| 15 | + $post(url, {'_method': 'delete'},function(res){ | ||
| 16 | + layer.msg('删除成功!'); | ||
| 17 | + success && success(); | ||
| 18 | + }); | ||
| 19 | + }); | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | + | ||
| 23 | +function successHandle(json, handle){ | ||
| 24 | + if(!json.status){ | ||
| 25 | + handle && handle(json); | ||
| 26 | + return ; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + if(json.status == 'ERROR') | ||
| 30 | + layer.alert(json.msg, {icon: 2, title: '操作失败'}); | ||
| 31 | + else | ||
| 32 | + handle && handle(json); | ||
| 33 | +} | ||
| 34 | + | ||
| 35 | +function ajaxComplete(xhr, ts, succ){ | ||
| 36 | + if(ts == 'success'){ | ||
| 37 | + successHandle(xhr.responseJSON, succ); | ||
| 38 | + } | ||
| 39 | + else if(ts == 'error'){ | ||
| 40 | + layer.alert(xhr.responseText, {icon: 2, title: '操作失败'}); | ||
| 41 | + } | ||
| 42 | +} | ||
| 43 | + | ||
| 44 | +function $get(url,data, successFun) { | ||
| 45 | + $.ajax({ | ||
| 46 | + url: url, | ||
| 47 | + data: data, | ||
| 48 | + complete: function(xhr, ts){ | ||
| 49 | + ajaxComplete(xhr, ts, successFun); | ||
| 50 | + } | ||
| 51 | + }); | ||
| 52 | +} | ||
| 53 | + | ||
| 54 | +function $post(url,data, successFun) { | ||
| 55 | + $.ajax({ | ||
| 56 | + url: url, | ||
| 57 | + method: 'POST', | ||
| 58 | + data: data, | ||
| 59 | + complete: function(xhr, ts){ | ||
| 60 | + ajaxComplete(xhr, ts, successFun); | ||
| 61 | + } | ||
| 62 | + }); | ||
| 63 | +} | ||
| 64 | + | ||
| 65 | +//将数据写入表单 | ||
| 66 | +function putFormData(json, fId){ | ||
| 67 | + json.enable = json.enable==true? 1 : 0; | ||
| 68 | + for(var att in json){ | ||
| 69 | + var f = 'name=' +att | ||
| 70 | + ,elem = $('input['+f+'],select['+f+'],textarea['+f+']', fId); | ||
| 71 | + if(elem.length > 0){ | ||
| 72 | + if(elem.attr('type') == 'checkbox') | ||
| 73 | + elem[0].checked = json[att]; | ||
| 74 | + else if(elem.attr('type') == 'radio') { | ||
| 75 | + if(json[att]) | ||
| 76 | + $('input['+f+']', fId).get(0).checked = true; | ||
| 77 | + else | ||
| 78 | + $('input['+f+']', fId).get(1).checked = true; | ||
| 79 | + } | ||
| 80 | + else | ||
| 81 | + elem.val(json[att]).change(); | ||
| 82 | + } | ||
| 83 | + } | ||
| 84 | +} | ||
| 85 | + | ||
| 86 | +/** | ||
| 87 | + * 将模块List 转换为树结构 | ||
| 88 | + * @param arr | ||
| 89 | + * @returns {Array} | ||
| 90 | + */ | ||
| 91 | +function createTreeData(arr){ | ||
| 92 | + var treeData = []; | ||
| 93 | + var len = arr.length; | ||
| 94 | + for(var i = 0; i < len; i ++){ | ||
| 95 | + var pId = arr[i].pId; | ||
| 96 | + arr[i].text = arr[i].name; | ||
| 97 | + if(!pId){ | ||
| 98 | + treeData.push(arr[i]); | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + for(var j = 0; j < len; j ++){ | ||
| 102 | + if(pId == arr[j].id){ | ||
| 103 | + if(!arr[j].children) | ||
| 104 | + arr[j].children = []; | ||
| 105 | + arr[j].children.push(arr[i]); | ||
| 106 | + break; | ||
| 107 | + } | ||
| 108 | + } | ||
| 109 | + } | ||
| 110 | + return treeData; | ||
| 105 | } | 111 | } |
| 106 | \ No newline at end of file | 112 | \ No newline at end of file |
src/main/resources/static/pages/base/line/add.html
| @@ -12,19 +12,233 @@ | @@ -12,19 +12,233 @@ | ||
| 12 | </ul> | 12 | </ul> |
| 13 | 13 | ||
| 14 | <div class="portlet light bordered"> | 14 | <div class="portlet light bordered"> |
| 15 | + | ||
| 16 | + <!-- 标题 --> | ||
| 15 | <div class="portlet-title"> | 17 | <div class="portlet-title"> |
| 16 | <div class="caption"> | 18 | <div class="caption"> |
| 17 | <i class="icon-equalizer font-red-sunglo"></i> | 19 | <i class="icon-equalizer font-red-sunglo"></i> |
| 18 | - <span class="caption-subject font-red-sunglo bold uppercase">表单</span> | 20 | + <span class="caption-subject font-red-sunglo bold uppercase">添加线路</span> |
| 19 | </div> | 21 | </div> |
| 20 | </div> | 22 | </div> |
| 23 | + | ||
| 24 | + <!-- 表单 --> | ||
| 21 | <div class="portlet-body form"> | 25 | <div class="portlet-body form"> |
| 26 | + | ||
| 22 | <!-- START FORM --> | 27 | <!-- START FORM --> |
| 23 | <form action="/line" class="form-horizontal" id="line_add_form" > | 28 | <form action="/line" class="form-horizontal" id="line_add_form" > |
| 24 | - <div id="vmap_world" class="vmaps" style="width: 100%; position: relative; overflow: hidden;"> | 29 | + |
| 30 | + <!-- 错误提示 --> | ||
| 31 | + <div class="alert alert-danger display-hide"> | ||
| 32 | + <button class="close" data-close="alert"></button> | ||
| 33 | + 您的输入有误,请检查下面的输入项 | ||
| 34 | + </div> | ||
| 35 | + | ||
| 36 | + <!-- 表单内容 --> | ||
| 37 | + <div class="form-body"> | ||
| 25 | 38 | ||
| 39 | + <!-- 线路名称 --> | ||
| 40 | + <div class="form-group"> | ||
| 41 | + <label class="control-label col-md-3"> | ||
| 42 | + <span class="required"> * </span>线路名称: | ||
| 43 | + </label> | ||
| 44 | + <div class="col-md-4"> | ||
| 45 | + <input type="text" class="form-control" name="name" id="nameInput" placeholder="线路名称" /> | ||
| 46 | + <span class="help-block"> 例如 :浦东88路 </span> | ||
| 47 | + </div> | ||
| 48 | + </div> | ||
| 49 | + | ||
| 50 | + <!-- 英文名称 --> | ||
| 51 | + <div class="form-group"> | ||
| 52 | + <label class="control-label col-md-3"> 英文名称: </label> | ||
| 53 | + <div class="col-md-4"> | ||
| 54 | + <input type="text" class="form-control" name="es" id="esInput" placeholder="英文名称"> | ||
| 55 | + </div> | ||
| 56 | + </div> | ||
| 57 | + | ||
| 58 | + <!-- 线路简称 --> | ||
| 59 | + <div class="form-group"> | ||
| 60 | + <label class="control-label col-md-3"> 线路简称:</label> | ||
| 61 | + <div class="col-md-4"> | ||
| 62 | + <input type="text" class="form-control" name="shortName" id="shortNameInput" placeholder="线路简称"> | ||
| 63 | + </div> | ||
| 64 | + </div> | ||
| 65 | + | ||
| 66 | + <!-- 线路编码 --> | ||
| 67 | + <div class="form-group"> | ||
| 68 | + <label class="control-label col-md-3"> | ||
| 69 | + <span class="required"> * </span>线路编码: | ||
| 70 | + </label> | ||
| 71 | + <div class="col-md-4"> | ||
| 72 | + <input type="text" class="form-control" name="lineCode" id="lineCodeInput" placeholder="线路编码"> | ||
| 73 | + </div> | ||
| 74 | + </div> | ||
| 75 | + | ||
| 76 | + <!-- 所属公司 --> | ||
| 77 | + <div class="form-group"> | ||
| 78 | + <label class="control-label col-md-3"> 所属公司:</label> | ||
| 79 | + <div class="col-md-4"> | ||
| 80 | + <select name="company" class="form-control" id="companySelect"></select> | ||
| 81 | + </div> | ||
| 82 | + </div> | ||
| 83 | + | ||
| 84 | + <!-- 所属分公司 --> | ||
| 85 | + <div class="form-group"> | ||
| 86 | + <label class="control-label col-md-3"> 所属分公司:</label> | ||
| 87 | + <div class="col-md-4"> | ||
| 88 | + <select name="brancheCompany" class="form-control" id="brancheCompanySelect"></select> | ||
| 89 | + </div> | ||
| 90 | + </div> | ||
| 91 | + | ||
| 92 | + <!-- 线路性质 --> | ||
| 93 | + <div class="form-group"> | ||
| 94 | + <label class="control-label col-md-3"> 线路性质:</label> | ||
| 95 | + <div class="col-md-4"> | ||
| 96 | + <select name="nature" class="form-control" id="natureSelect"> | ||
| 97 | + <option value="">-- 请选择线路性质 --</option> | ||
| 98 | + <option value="lj">路救</option> | ||
| 99 | + <option value="bc">备车</option> | ||
| 100 | + <option value="dbc">定班车</option> | ||
| 101 | + <option value="yxl">夜宵路</option> | ||
| 102 | + <option value="cgxl">常规线路</option> | ||
| 103 | + <option value="gjxl">过江线路</option> | ||
| 104 | + <option value="csbs">穿梭巴士</option> | ||
| 105 | + <option value="tyxl">特约线路</option> | ||
| 106 | + <option value="cctxl">村村通线路</option> | ||
| 107 | + <option value="qt">其他</option> | ||
| 108 | + </select> | ||
| 109 | + </div> | ||
| 110 | + </div> | ||
| 111 | + | ||
| 112 | + <!-- 线路等级 --> | ||
| 113 | + <div class="form-group"> | ||
| 114 | + <label class="control-label col-md-3"> 线路等级:</label> | ||
| 115 | + <div class="col-md-4"> | ||
| 116 | + <select name="level" class="form-control" id="levelSelect"> | ||
| 117 | + <option value="">-- 请选择线路等级 --</option> | ||
| 118 | + <option value="1">一级线路</option> | ||
| 119 | + <option value="2">二级线路</option> | ||
| 120 | + <option value="0">未知等级</option> | ||
| 121 | + </select> | ||
| 122 | + </div> | ||
| 123 | + </div> | ||
| 124 | + | ||
| 125 | + <!-- 是否撤销 --> | ||
| 126 | + <div class="form-group"> | ||
| 127 | + <label class="control-label col-md-3">是否撤销:</label> | ||
| 128 | + <div class="col-md-4"> | ||
| 129 | + <div class="md-radio-inline"> | ||
| 130 | + <div class="md-radio"> | ||
| 131 | + <input type="radio" id="radio14" name="destroy" data-title="是" class="md-radiobtn" value="1" > | ||
| 132 | + <label for="radio14"> | ||
| 133 | + <span></span> | ||
| 134 | + <span class="check"></span> | ||
| 135 | + <span class="box"></span> 是 | ||
| 136 | + </label> | ||
| 137 | + </div> | ||
| 138 | + <div class="md-radio has-error"> | ||
| 139 | + <input type="radio" id="radio15" name="destroy" class="md-radiobtn" data-title="否" value="0" checked="checked"> | ||
| 140 | + <label for="radio15" style="color:#FFC0CB"> | ||
| 141 | + <span></span> | ||
| 142 | + <span class="check"></span> | ||
| 143 | + <span class="box"></span> 否 | ||
| 144 | + </label> | ||
| 145 | + </div> | ||
| 146 | + </div> | ||
| 147 | + </div> | ||
| 148 | + </div> | ||
| 149 | + | ||
| 150 | + <!-- 是否宵夜 --> | ||
| 151 | + <div class="form-group"> | ||
| 152 | + <label class="control-label col-md-3">是否宵夜:</label> | ||
| 153 | + <div class="col-md-4"> | ||
| 154 | + <div class="md-radio-inline"> | ||
| 155 | + <div class="md-radio"> | ||
| 156 | + <input type="radio" id="radio16" name="supperLine" class="md-radiobtn" value="1" data-title="是" > | ||
| 157 | + <label for="radio16"> | ||
| 158 | + <span></span> | ||
| 159 | + <span class="check"></span> | ||
| 160 | + <span class="box"></span> 是 | ||
| 161 | + </label> | ||
| 162 | + </div> | ||
| 163 | + <div class="md-radio has-error"> | ||
| 164 | + <input type="radio" id="radio17" name="supperLine" class="md-radiobtn" value="0" data-title="否" checked="checked"> | ||
| 165 | + <label for="radio17" style="color:#FFC0CB"> | ||
| 166 | + <span></span> | ||
| 167 | + <span class="check"></span> | ||
| 168 | + <span class="box"></span> 否 | ||
| 169 | + </label> | ||
| 170 | + </div> | ||
| 171 | + </div> | ||
| 172 | + </div> | ||
| 173 | + </div> | ||
| 174 | + | ||
| 175 | + <!-- 开辟日期 --> | ||
| 176 | + <div class="form-group"> | ||
| 177 | + <label class="control-label col-md-3"> 开辟日期: </label> | ||
| 178 | + <div class="col-md-4"> | ||
| 179 | + <input type="text" class="form-control" name="openDate" id="openDateInput" placeholder="开辟日期"> | ||
| 180 | + </div> | ||
| 181 | + </div> | ||
| 182 | + | ||
| 183 | + <!-- 线路沿革 --> | ||
| 184 | + <div class="form-group"> | ||
| 185 | + <label class="control-label col-md-3"> 线路沿革: </label> | ||
| 186 | + <div class="col-md-4"> | ||
| 187 | + <textarea class="form-control" rows="3" name="history" id="historyTextarea" placeholder="线路沿革"></textarea> | ||
| 188 | + <span class="help-block">日期及内容:如2014-1-1,开辟;2014-5-1,延线;</span> | ||
| 189 | + </div> | ||
| 190 | + </div> | ||
| 191 | + | ||
| 192 | + <!-- 设备线路编码 --> | ||
| 193 | + <div class="form-group"> | ||
| 194 | + <label class="control-label col-md-3"> 设备线路编码: </label> | ||
| 195 | + <div class="col-md-4"> | ||
| 196 | + <input type="text" class="form-control" name="eqLinecode" id="eqLinecodeInput" placeholder="设备线路编码"> | ||
| 197 | + </div> | ||
| 198 | + </div> | ||
| 199 | + | ||
| 200 | + <!-- 上海市线路编码 --> | ||
| 201 | + <div class="form-group"> | ||
| 202 | + <label class="control-label col-md-3"> 上海市线路编码: </label> | ||
| 203 | + <div class="col-md-4"> | ||
| 204 | + <input type="text" class="form-control" name="shanghaiLinecode" id="shanghaiLinecodeInput" placeholder="上海市线路编码"> | ||
| 205 | + </div> | ||
| 206 | + </div> | ||
| 207 | + | ||
| 208 | + <!-- 起始站调度电话 --> | ||
| 209 | + <div class="form-group"> | ||
| 210 | + <label class="control-label col-md-3"> 起始站调度电话: </label> | ||
| 211 | + <div class="col-md-4"> | ||
| 212 | + <input type="text" class="form-control" name="startPhone" id="startPhoneInput" placeholder="起始站调度电话"> | ||
| 213 | + </div> | ||
| 214 | + </div> | ||
| 215 | + | ||
| 216 | + <!-- 终点站调度电话 --> | ||
| 217 | + <div class="form-group"> | ||
| 218 | + <label class="control-label col-md-3"> 终点站调度电话: </label> | ||
| 219 | + <div class="col-md-4"> | ||
| 220 | + <input type="text" class="form-control" name="endPhone" id="startPhoneInput" placeholder="终点站调度电话"> | ||
| 221 | + </div> | ||
| 222 | + </div> | ||
| 223 | + | ||
| 224 | + <!-- --> | ||
| 225 | + <div class="form-group"> | ||
| 226 | + <label class="control-label col-md-3"> 描述/说明: </label> | ||
| 227 | + <div class="col-md-4"> | ||
| 228 | + <textarea class="form-control" rows="3" name="descriptions" id="descriptionsTextarea" placeholder="描述/说明"></textarea> | ||
| 229 | + </div> | ||
| 230 | + </div> | ||
| 231 | + </div> | ||
| 232 | + <div class="form-actions"> | ||
| 233 | + <div class="row"> | ||
| 234 | + <div class="col-md-offset-3 col-md-4"> | ||
| 235 | + <button type="submit" class="btn green" ><i class="fa fa-check"></i> 提交</button> | ||
| 236 | + <a type="button" class="btn default" href="list.html" data-pjax><i class="fa fa-times"></i> 取消</a> | ||
| 237 | + </div> | ||
| 238 | + </div> | ||
| 26 | </div> | 239 | </div> |
| 27 | </form> | 240 | </form> |
| 28 | <!-- END FORM--> | 241 | <!-- END FORM--> |
| 29 | </div> | 242 | </div> |
| 30 | -</div> | ||
| 31 | \ No newline at end of file | 243 | \ No newline at end of file |
| 244 | +</div> | ||
| 245 | +<script src="/pages/base/line/js/line-add-form.js"></script> | ||
| 32 | \ No newline at end of file | 246 | \ No newline at end of file |
src/main/resources/static/pages/base/line/details.html
0 → 100644
| 1 | +<div class="page-head"> | ||
| 2 | + <div class="page-title"> | ||
| 3 | + <h1>线路详细信息</h1> | ||
| 4 | + </div> | ||
| 5 | +</div> | ||
| 6 | + | ||
| 7 | +<ul class="page-breadcrumb breadcrumb"> | ||
| 8 | + <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li> | ||
| 9 | + <li><span class="active">基础信息</span> <i class="fa fa-circle"></i></li> | ||
| 10 | + <li><a href="/pages/base/line/list.html" data-pjax>线路信息</a> <i class="fa fa-circle"></i></li> | ||
| 11 | + <li><span class="active">线路详情</span></li> | ||
| 12 | +</ul> | ||
| 13 | + | ||
| 14 | +<div class="row"> | ||
| 15 | + <div class="col-md-12"> | ||
| 16 | + <div class="portlet light porttlet-fit bordered"> | ||
| 17 | + <div class="portlet-title"> | ||
| 18 | + <div class="caption"> | ||
| 19 | + <i class="fa fa-info-circle font-dark"></i> | ||
| 20 | + <span class="caption-subject font-dark sbold uppercase">线路详情</span> | ||
| 21 | + </div> | ||
| 22 | + </div> | ||
| 23 | + <div class="portlet-body"> | ||
| 24 | + <div class="table-container" style="margin-top: 10px"> | ||
| 25 | + <table class="table table-striped table-bordered table-hover table-checkable" id="line_details"> | ||
| 26 | + <thead> | ||
| 27 | + <tr role="row" class="heading"> | ||
| 28 | + <th width="8%">线路编码</th> | ||
| 29 | + <th width="8%">线路名称</th> | ||
| 30 | + <th width="10%">英文名称</th> | ||
| 31 | + <th width="10%">线路简称</th> | ||
| 32 | + <th width="10%">所属公司</th> | ||
| 33 | + <th width="10%">所属分公司</th> | ||
| 34 | + <th width="10%">线路性质</th> | ||
| 35 | + <th width="10%">线路等级</th> | ||
| 36 | + <th width="10%">是否撤消</th> | ||
| 37 | + <th width="10%">是否夜宵线</th> | ||
| 38 | + <th width="10%">起始站调度电话</th> | ||
| 39 | + <th width="10%">终点站调度电话</th> | ||
| 40 | + <th width="10%">开辟日期</th> | ||
| 41 | + <th width="10%">线路沿革</th> | ||
| 42 | + </tr> | ||
| 43 | + </thead> | ||
| 44 | + <tbody></tbody> | ||
| 45 | + </table> | ||
| 46 | + <div style="text-align: right;"> | ||
| 47 | + <ul id="pagination" class="pagination"></ul> | ||
| 48 | + </div> | ||
| 49 | + </div> | ||
| 50 | + </div> | ||
| 51 | + </div> | ||
| 52 | + </div> | ||
| 53 | +</div> | ||
| 54 | +<script type="text/html" id="line_details_temp"> | ||
| 55 | +{{each list as obj i }} | ||
| 56 | +<tr> | ||
| 57 | + <td> | ||
| 58 | + {{obj.lineCode}} | ||
| 59 | + </td> | ||
| 60 | + <td> | ||
| 61 | + {{obj.name}} | ||
| 62 | + </td> | ||
| 63 | + <td> | ||
| 64 | + {{obj.es}} | ||
| 65 | + </td> | ||
| 66 | + <td> | ||
| 67 | + {{obj.shortName}} | ||
| 68 | + </td> | ||
| 69 | + <td> | ||
| 70 | + {{obj.company}} | ||
| 71 | + </td> | ||
| 72 | + <td> | ||
| 73 | + {{obj.brancheCompany}} | ||
| 74 | + </td> | ||
| 75 | + <td> | ||
| 76 | + {{obj.nature}} | ||
| 77 | + </td> | ||
| 78 | + <td> | ||
| 79 | + {{obj.level}} | ||
| 80 | + </td> | ||
| 81 | + <td> | ||
| 82 | + {{obj.destroy}} | ||
| 83 | + </td> | ||
| 84 | + <td> | ||
| 85 | + {{obj.supperLine}} | ||
| 86 | + </td> | ||
| 87 | + <td> | ||
| 88 | + {{obj.startPhone}} | ||
| 89 | + </td> | ||
| 90 | + <td> | ||
| 91 | + {{obj.endPhone}} | ||
| 92 | + </td> | ||
| 93 | + <td> | ||
| 94 | + {{obj.openDate}} | ||
| 95 | + </td> | ||
| 96 | + <td> | ||
| 97 | + {{obj.history}} | ||
| 98 | + </td> | ||
| 99 | +</tr> | ||
| 100 | +{{/each}} | ||
| 101 | +</script> | ||
| 102 | +<script type="text/javascript" src="/pages/base/line/js/line-details-info.js"></script> | ||
| 0 | \ No newline at end of file | 103 | \ No newline at end of file |
src/main/resources/static/pages/base/line/edit.html
0 → 100644
| 1 | +<div class="page-head"> | ||
| 2 | + <div class="page-title"> | ||
| 3 | + <h1>修改线路信息</h1> | ||
| 4 | + </div> | ||
| 5 | +</div> | ||
| 6 | + | ||
| 7 | +<ul class="page-breadcrumb breadcrumb"> | ||
| 8 | + <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li> | ||
| 9 | + <li><span class="active">基础信息</span> <i class="fa fa-circle"></i></li> | ||
| 10 | + <li><a href="/pages/base/line/list.html" data-pjax>线路信息</a> <i class="fa fa-circle"></i></li> | ||
| 11 | + <li><span class="active">修改线路信息</span></li> | ||
| 12 | +</ul> | ||
| 13 | + | ||
| 14 | +<div class="portlet light bordered"> | ||
| 15 | + <div class="portlet-title"> | ||
| 16 | + <div class="caption"> | ||
| 17 | + <i class="icon-equalizer font-red-sunglo"></i> | ||
| 18 | + <span class="caption-subject font-red-sunglo bold uppercase">修改线路信息</span> | ||
| 19 | + </div> | ||
| 20 | + </div> | ||
| 21 | + <div class="portlet-body form" id="lineEditForm"> | ||
| 22 | + | ||
| 23 | + <!-- START FORM --> | ||
| 24 | + <form action="/" class="form-horizontal" id="line_edit_form" > | ||
| 25 | + | ||
| 26 | + <!-- 错误提示 --> | ||
| 27 | + <div class="alert alert-danger display-hide"> | ||
| 28 | + <button class="close" data-close="alert"></button> | ||
| 29 | + 您的输入有误,请检查下面的输入项 | ||
| 30 | + </div> | ||
| 31 | + | ||
| 32 | + <!-- 表单内容 --> | ||
| 33 | + <div class="form-body"> | ||
| 34 | + | ||
| 35 | + <input type="hidden" name="id" id="lineId"> | ||
| 36 | + | ||
| 37 | + <!-- 线路名称 --> | ||
| 38 | + <div class="form-group"> | ||
| 39 | + <label class="control-label col-md-3"> | ||
| 40 | + <span class="required"> * </span>线路名称: | ||
| 41 | + </label> | ||
| 42 | + <div class="col-md-4"> | ||
| 43 | + <input type="text" class="form-control" name="name" id="nameInput" placeholder="线路名称" /> | ||
| 44 | + <span class="help-block"> 例如 :浦东88路 </span> | ||
| 45 | + </div> | ||
| 46 | + </div> | ||
| 47 | + | ||
| 48 | + <!-- 英文名称 --> | ||
| 49 | + <div class="form-group"> | ||
| 50 | + <label class="control-label col-md-3"> 英文名称: </label> | ||
| 51 | + <div class="col-md-4"> | ||
| 52 | + <input type="text" class="form-control" name="es" id="esInput" placeholder="英文名称"> | ||
| 53 | + </div> | ||
| 54 | + </div> | ||
| 55 | + | ||
| 56 | + <!-- 线路简称 --> | ||
| 57 | + <div class="form-group"> | ||
| 58 | + <label class="control-label col-md-3"> 线路简称:</label> | ||
| 59 | + <div class="col-md-4"> | ||
| 60 | + <input type="text" class="form-control" name="shortName" id="shortNameInput" placeholder="线路简称"> | ||
| 61 | + </div> | ||
| 62 | + </div> | ||
| 63 | + | ||
| 64 | + <!-- 线路编码 --> | ||
| 65 | + <div class="form-group"> | ||
| 66 | + <label class="control-label col-md-3"> | ||
| 67 | + <span class="required"> * </span>线路编码: | ||
| 68 | + </label> | ||
| 69 | + <div class="col-md-4"> | ||
| 70 | + <input type="text" class="form-control" name="lineCode" id="lineCodeInput" placeholder="线路编码"> | ||
| 71 | + </div> | ||
| 72 | + </div> | ||
| 73 | + | ||
| 74 | + <!-- 所属公司 --> | ||
| 75 | + <div class="form-group"> | ||
| 76 | + <label class="control-label col-md-3"> 所属公司:</label> | ||
| 77 | + <div class="col-md-4"> | ||
| 78 | + <select name="company" class="form-control" id="companySelect"></select> | ||
| 79 | + </div> | ||
| 80 | + </div> | ||
| 81 | + | ||
| 82 | + <!-- 所属分公司 --> | ||
| 83 | + <div class="form-group"> | ||
| 84 | + <label class="control-label col-md-3"> 所属分公司:</label> | ||
| 85 | + <div class="col-md-4"> | ||
| 86 | + <select name="brancheCompany" class="form-control" id="brancheCompanySelect"></select> | ||
| 87 | + </div> | ||
| 88 | + </div> | ||
| 89 | + | ||
| 90 | + <!-- 线路性质 --> | ||
| 91 | + <div class="form-group"> | ||
| 92 | + <label class="control-label col-md-3"> 线路性质:</label> | ||
| 93 | + <div class="col-md-4"> | ||
| 94 | + <select name="nature" class="form-control" id="natureSelect"> | ||
| 95 | + <option value="">-- 请选择线路性质 --</option> | ||
| 96 | + <option value="lj">路救</option> | ||
| 97 | + <option value="bc">备车</option> | ||
| 98 | + <option value="dbc">定班车</option> | ||
| 99 | + <option value="yxl">夜宵路</option> | ||
| 100 | + <option value="cgxl">常规线路</option> | ||
| 101 | + <option value="gjxl">过江线路</option> | ||
| 102 | + <option value="csbs">穿梭巴士</option> | ||
| 103 | + <option value="tyxl">特约线路</option> | ||
| 104 | + <option value="cctxl">村村通线路</option> | ||
| 105 | + <option value="qt">其他</option> | ||
| 106 | + </select> | ||
| 107 | + </div> | ||
| 108 | + </div> | ||
| 109 | + | ||
| 110 | + <!-- 线路等级 --> | ||
| 111 | + <div class="form-group"> | ||
| 112 | + <label class="control-label col-md-3"> 线路等级:</label> | ||
| 113 | + <div class="col-md-4"> | ||
| 114 | + <select name="level" class="form-control" id="levelSelect"> | ||
| 115 | + <option value="">-- 请选择线路等级 --</option> | ||
| 116 | + <option value="1">一级线路</option> | ||
| 117 | + <option value="2">二级线路</option> | ||
| 118 | + <option value="0">未知等级</option> | ||
| 119 | + </select> | ||
| 120 | + </div> | ||
| 121 | + </div> | ||
| 122 | + | ||
| 123 | + <!-- 是否撤销 --> | ||
| 124 | + <div class="form-group"> | ||
| 125 | + <label class="control-label col-md-3">是否撤销:</label> | ||
| 126 | + <div class="col-md-4"> | ||
| 127 | + <div class="md-radio-inline"> | ||
| 128 | + <div class="md-radio"> | ||
| 129 | + <input type="radio" id="radio14" name="destroy" data-title="是" class="md-radiobtn" value="1" > | ||
| 130 | + <label for="radio14"> | ||
| 131 | + <span></span> | ||
| 132 | + <span class="check"></span> | ||
| 133 | + <span class="box"></span> 是 | ||
| 134 | + </label> | ||
| 135 | + </div> | ||
| 136 | + <div class="md-radio has-error"> | ||
| 137 | + <input type="radio" id="radio15" name="destroy" class="md-radiobtn" data-title="否" value="0"> | ||
| 138 | + <label for="radio15" style="color:#FFC0CB"> | ||
| 139 | + <span></span> | ||
| 140 | + <span class="check"></span> | ||
| 141 | + <span class="box"></span> 否 | ||
| 142 | + </label> | ||
| 143 | + </div> | ||
| 144 | + </div> | ||
| 145 | + </div> | ||
| 146 | + </div> | ||
| 147 | + | ||
| 148 | + <!-- 是否宵夜 --> | ||
| 149 | + <div class="form-group"> | ||
| 150 | + <label class="control-label col-md-3">是否宵夜:</label> | ||
| 151 | + <div class="col-md-4"> | ||
| 152 | + <div class="md-radio-inline"> | ||
| 153 | + <div class="md-radio"> | ||
| 154 | + <input type="radio" id="radio16" name="supperLine" class="md-radiobtn" data-title="是" value="1"> | ||
| 155 | + <label for="radio16"> | ||
| 156 | + <span></span> | ||
| 157 | + <span class="check"></span> | ||
| 158 | + <span class="box"></span> 是 | ||
| 159 | + </label> | ||
| 160 | + </div> | ||
| 161 | + <div class="md-radio has-error"> | ||
| 162 | + <input type="radio" id="radio17" name="supperLine" class="md-radiobtn" data-title="否" value="0"> | ||
| 163 | + <label for="radio17" style="color:#FFC0CB"> | ||
| 164 | + <span></span> | ||
| 165 | + <span class="check"></span> | ||
| 166 | + <span class="box"></span> 否 | ||
| 167 | + </label> | ||
| 168 | + </div> | ||
| 169 | + </div> | ||
| 170 | + </div> | ||
| 171 | + </div> | ||
| 172 | + | ||
| 173 | + <!-- 开辟日期 --> | ||
| 174 | + <div class="form-group"> | ||
| 175 | + <label class="control-label col-md-3"> 开辟日期: </label> | ||
| 176 | + <div class="col-md-4"> | ||
| 177 | + <input type="text" class="form-control" name="openDate" id="openDateInput" placeholder="开辟日期"> | ||
| 178 | + </div> | ||
| 179 | + </div> | ||
| 180 | + | ||
| 181 | + <!-- 线路沿革 --> | ||
| 182 | + <div class="form-group"> | ||
| 183 | + <label class="control-label col-md-3"> 线路沿革: </label> | ||
| 184 | + <div class="col-md-4"> | ||
| 185 | + <textarea class="form-control" rows="3" name="history" id="historyTextarea" placeholder="线路沿革"></textarea> | ||
| 186 | + <span class="help-block">日期及内容:如2014-1-1,开辟;2014-5-1,延线;</span> | ||
| 187 | + </div> | ||
| 188 | + </div> | ||
| 189 | + | ||
| 190 | + <!-- 设备线路编码 --> | ||
| 191 | + <div class="form-group"> | ||
| 192 | + <label class="control-label col-md-3"> 设备线路编码: </label> | ||
| 193 | + <div class="col-md-4"> | ||
| 194 | + <input type="text" class="form-control" name="eqLinecode" id="eqLinecodeInput" placeholder="设备线路编码"> | ||
| 195 | + </div> | ||
| 196 | + </div> | ||
| 197 | + | ||
| 198 | + <!-- 上海市线路编码 --> | ||
| 199 | + <div class="form-group"> | ||
| 200 | + <label class="control-label col-md-3"> 上海市线路编码: </label> | ||
| 201 | + <div class="col-md-4"> | ||
| 202 | + <input type="text" class="form-control" name="shanghaiLinecode" id="shanghaiLinecodeInput" placeholder="上海市线路编码"> | ||
| 203 | + </div> | ||
| 204 | + </div> | ||
| 205 | + | ||
| 206 | + <!-- 起始站调度电话 --> | ||
| 207 | + <div class="form-group"> | ||
| 208 | + <label class="control-label col-md-3"> 起始站调度电话: </label> | ||
| 209 | + <div class="col-md-4"> | ||
| 210 | + <input type="text" class="form-control" name="startPhone" id="startPhoneInput" placeholder="起始站调度电话"> | ||
| 211 | + </div> | ||
| 212 | + </div> | ||
| 213 | + | ||
| 214 | + <!-- 终点站调度电话 --> | ||
| 215 | + <div class="form-group"> | ||
| 216 | + <label class="control-label col-md-3"> 终点站调度电话: </label> | ||
| 217 | + <div class="col-md-4"> | ||
| 218 | + <input type="text" class="form-control" name="endPhone" id="startPhoneInput" placeholder="终点站调度电话"> | ||
| 219 | + </div> | ||
| 220 | + </div> | ||
| 221 | + | ||
| 222 | + <!-- --> | ||
| 223 | + <div class="form-group"> | ||
| 224 | + <label class="control-label col-md-3"> 描述/说明: </label> | ||
| 225 | + <div class="col-md-4"> | ||
| 226 | + <textarea class="form-control" rows="3" name="descriptions" id="descriptionsTextarea" placeholder="描述/说明"></textarea> | ||
| 227 | + </div> | ||
| 228 | + </div> | ||
| 229 | + </div> | ||
| 230 | + <div class="form-actions"> | ||
| 231 | + <div class="row"> | ||
| 232 | + <div class="col-md-offset-3 col-md-4"> | ||
| 233 | + <button type="submit" class="btn green" ><i class="fa fa-check"></i> 提交</button> | ||
| 234 | + <a type="button" class="btn default" href="list.html" data-pjax><i class="fa fa-times"></i> 取消</a> | ||
| 235 | + </div> | ||
| 236 | + </div> | ||
| 237 | + </div> | ||
| 238 | + </form> | ||
| 239 | + <!-- END FORM--> | ||
| 240 | + | ||
| 241 | + </div> | ||
| 242 | +</div> | ||
| 243 | +<script src="/pages/base/line/js/line-edit-form.js"></script> | ||
| 0 | \ No newline at end of file | 244 | \ No newline at end of file |
src/main/resources/static/pages/base/line/js/line-add-form.js
0 → 100644
| 1 | +$(function(){ | ||
| 2 | + | ||
| 3 | + | ||
| 4 | + // 获取线路编码 | ||
| 5 | + function getLineCode(cb) { | ||
| 6 | + | ||
| 7 | + // 获取线路编码 | ||
| 8 | + $.get('/line/getLineCode',function(lineCode){ | ||
| 9 | + | ||
| 10 | + cb && cb(lineCode); | ||
| 11 | + | ||
| 12 | + }); | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + getLineCode(function(result){ | ||
| 16 | + | ||
| 17 | + // 设置线路编码值 | ||
| 18 | + $('#lineCodeInput').val(result); | ||
| 19 | + | ||
| 20 | + }) | ||
| 21 | + | ||
| 22 | + // 输入线路名称,自动生成英文名称和线路简称 | ||
| 23 | + $('#nameInput').on('keyup', setPinYin); | ||
| 24 | + | ||
| 25 | + // 根据线路名称值设置英文名称值和线路简称 | ||
| 26 | + function setPinYin(){ | ||
| 27 | + | ||
| 28 | + // 获取线路名称值 | ||
| 29 | + var val = $('#nameInput').val(); | ||
| 30 | + | ||
| 31 | + // 设置英文名称值 | ||
| 32 | + $('#esInput').val(pinyin.getFullChars(val)); | ||
| 33 | + | ||
| 34 | + // 设置线路简称值 | ||
| 35 | + $('#shortNameInput').val(pinyin.getCamelChars(val)); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + // 日期控件 | ||
| 39 | + $('#openDateInput').datetimepicker({ | ||
| 40 | + | ||
| 41 | + format : 'YYYY-MM-DD', | ||
| 42 | + | ||
| 43 | + locale: 'zh-cn' | ||
| 44 | + | ||
| 45 | + }); | ||
| 46 | + | ||
| 47 | + // 填充公司下拉框选择值 | ||
| 48 | + $get('/business/all', {upCode_eq: '88'}, function(array){ | ||
| 49 | + | ||
| 50 | + // 公司下拉options属性值 | ||
| 51 | + var options = '<option value="">-- 请选择公司 --</option>'; | ||
| 52 | + | ||
| 53 | + // 遍历array | ||
| 54 | + $.each(array, function(i,d){ | ||
| 55 | + | ||
| 56 | + options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>'; | ||
| 57 | + | ||
| 58 | + }); | ||
| 59 | + | ||
| 60 | + // 填充公司下拉框options,并添加公司下拉框值改变事件setbrancheCompanySelectOptions | ||
| 61 | + $('#companySelect').html(options).on('change', setbrancheCompanySelectOptions); | ||
| 62 | + | ||
| 63 | + }); | ||
| 64 | + | ||
| 65 | + // 填充分公司下拉框 | ||
| 66 | + setbrancheCompanySelectOptions(); | ||
| 67 | + | ||
| 68 | + // 填充分公司下拉框选择值 | ||
| 69 | + function setbrancheCompanySelectOptions(){ | ||
| 70 | + | ||
| 71 | + // 获取公司下拉框选择值 | ||
| 72 | + var businessCode = $('#companySelect').val(); | ||
| 73 | + | ||
| 74 | + // 分公司下拉框options属性值 | ||
| 75 | + var options = '<option value="">-- 请选择分公司 --</option>'; | ||
| 76 | + | ||
| 77 | + // 如果公司选择为空则分公司为空 ; 否则查询出所属公司下的分公司名称和相应分公司代码 | ||
| 78 | + if(businessCode == null || businessCode ==''){ | ||
| 79 | + | ||
| 80 | + // 填充分公司下拉框options | ||
| 81 | + $('#brancheCompanySelect').html(options); | ||
| 82 | + | ||
| 83 | + } else { | ||
| 84 | + | ||
| 85 | + // 查询出所属公司下的分公司名称和相应分公司代码 | ||
| 86 | + $get('/business/all', {upCode_eq: businessCode}, function(array){ | ||
| 87 | + | ||
| 88 | + // 遍历array | ||
| 89 | + $.each(array, function(i,d){ | ||
| 90 | + | ||
| 91 | + options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>'; | ||
| 92 | + | ||
| 93 | + }); | ||
| 94 | + | ||
| 95 | + // 填充分公司下拉框options | ||
| 96 | + $('#brancheCompanySelect').html(options); | ||
| 97 | + | ||
| 98 | + }); | ||
| 99 | + } | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + // 定义表单 | ||
| 103 | + var form = $('#line_add_form'); | ||
| 104 | + | ||
| 105 | + // 定义表单异常 | ||
| 106 | + var error = $('.alert-danger',form); | ||
| 107 | + | ||
| 108 | + // 表单验证 | ||
| 109 | + form.validate({ | ||
| 110 | + | ||
| 111 | + // 错误提示元素span对象 | ||
| 112 | + errorElement : 'span', | ||
| 113 | + | ||
| 114 | + // 错误提示元素class名称 | ||
| 115 | + errorClass : 'help-block help-block-error', | ||
| 116 | + | ||
| 117 | + // 验证错误获取焦点 | ||
| 118 | + focusInvalid : true, | ||
| 119 | + | ||
| 120 | + // 需要验证的表单元素 | ||
| 121 | + rules : { | ||
| 122 | + | ||
| 123 | + // 线路名称 | ||
| 124 | + 'name' : { | ||
| 125 | + | ||
| 126 | + // 必填项 | ||
| 127 | + required : true, | ||
| 128 | + | ||
| 129 | + // 最大长度 | ||
| 130 | + maxlength: 20 | ||
| 131 | + }, | ||
| 132 | + | ||
| 133 | + // 线路编码 | ||
| 134 | + 'lineCode' : { | ||
| 135 | + | ||
| 136 | + // 必填项 | ||
| 137 | + required : true, | ||
| 138 | + | ||
| 139 | + // 最大长度 | ||
| 140 | + maxlength: 20 | ||
| 141 | + }, | ||
| 142 | + | ||
| 143 | + // 起始站调度电话 | ||
| 144 | + 'startPhone' : { | ||
| 145 | + | ||
| 146 | + // 必须输入合法的数字(负数,小数)。 | ||
| 147 | + number : true, | ||
| 148 | + | ||
| 149 | + // 必须输入整数。 | ||
| 150 | + digits : true, | ||
| 151 | + | ||
| 152 | + // 电话号码格式 | ||
| 153 | + isPhone : true | ||
| 154 | + }, | ||
| 155 | + | ||
| 156 | + // 终点站调度电话 | ||
| 157 | + 'endPhone' : { | ||
| 158 | + | ||
| 159 | + // 必须输入合法的数字(负数,小数)。 | ||
| 160 | + number : true, | ||
| 161 | + | ||
| 162 | + // 必须输入整数。 | ||
| 163 | + digits : true, | ||
| 164 | + | ||
| 165 | + // 电话号码格式 | ||
| 166 | + isPhone : true | ||
| 167 | + }, | ||
| 168 | + | ||
| 169 | + // 开辟日期 | ||
| 170 | + 'openDate' : { | ||
| 171 | + | ||
| 172 | + // 正确格式的日期(日期校验 ie6 出错,慎用。) | ||
| 173 | + date : true, | ||
| 174 | + | ||
| 175 | + // 必须输入正确格式的日期(ISO),例如:2009-06-23,1998/01/22。只验证格式,不验证有效性。 | ||
| 176 | + dateISO:true | ||
| 177 | + }, | ||
| 178 | + | ||
| 179 | + // 线路沿革 | ||
| 180 | + 'history' : { | ||
| 181 | + | ||
| 182 | + // 输入长度最多是 200 的字符串(汉字算一个字符)。 | ||
| 183 | + maxlength: 200 | ||
| 184 | + }, | ||
| 185 | + | ||
| 186 | + // 上海市线路编码 | ||
| 187 | + 'shanghaiLinecode' : { | ||
| 188 | + | ||
| 189 | + // 必须输入合法的数字(负数,小数)。 | ||
| 190 | + number : true, | ||
| 191 | + | ||
| 192 | + // 必须输入整数。 | ||
| 193 | + digits : true | ||
| 194 | + }, | ||
| 195 | + | ||
| 196 | + // 设备线路编码 | ||
| 197 | + 'eqLinecode' : { | ||
| 198 | + | ||
| 199 | + // 必须输入合法的数字(负数,小数)。 | ||
| 200 | + number : true, | ||
| 201 | + | ||
| 202 | + // 必须输入整数。 | ||
| 203 | + digits : true | ||
| 204 | + }, | ||
| 205 | + | ||
| 206 | + // 描述/说明 | ||
| 207 | + 'descriptions' : { | ||
| 208 | + | ||
| 209 | + // 输入长度最多是 200 的字符串(汉字算一个字符)。 | ||
| 210 | + maxlength: 200 | ||
| 211 | + } | ||
| 212 | + }, | ||
| 213 | + | ||
| 214 | + /** | ||
| 215 | + * 类型:Callback。当未通过验证的表单提交时,可以在该回调函数中处理一些事情。 | ||
| 216 | + * | ||
| 217 | + * 参数:该回调函数有两个参数:第一个为一个事件对象,第二个为验证器(validator) | ||
| 218 | + */ | ||
| 219 | + invalidHandler : function(event, validator) { | ||
| 220 | + | ||
| 221 | + // 显示表单未通过提示信息 | ||
| 222 | + error.show(); | ||
| 223 | + | ||
| 224 | + // 把提示信息放到指定的位置。 | ||
| 225 | + App.scrollTo(error, -200); | ||
| 226 | + }, | ||
| 227 | + | ||
| 228 | + /** | ||
| 229 | + * 类型:Callback。 | ||
| 230 | + * | ||
| 231 | + * 默认:添加errorClass("has-error")到表单元素。将未通过验证的表单元素设置高亮。 | ||
| 232 | + */ | ||
| 233 | + highlight : function(element) { | ||
| 234 | + | ||
| 235 | + // 添加errorClass("has-error")到表单元素 | ||
| 236 | + $(element).closest('.form-group').addClass('has-error'); | ||
| 237 | + | ||
| 238 | + }, | ||
| 239 | + | ||
| 240 | + /** | ||
| 241 | + * 类型:Callback。 | ||
| 242 | + * | ||
| 243 | + * 默认:移除errorClass("has-error")。与highlight操作相反 | ||
| 244 | + */ | ||
| 245 | + unhighlight : function(element) { | ||
| 246 | + | ||
| 247 | + // 移除errorClass("has-error") | ||
| 248 | + $(element).closest('.form-group').removeClass('has-error'); | ||
| 249 | + | ||
| 250 | + }, | ||
| 251 | + | ||
| 252 | + /** | ||
| 253 | + * 类型:String,Callback。 | ||
| 254 | + * | ||
| 255 | + * 如果指定它,当验证通过时显示一个消息。 | ||
| 256 | + * | ||
| 257 | + * 如果是String类型的,则添加该样式到标签中; | ||
| 258 | + * | ||
| 259 | + * 如果是一个回调函数,则将标签作为其唯一的参数。 | ||
| 260 | + */ | ||
| 261 | + success : function(label) { | ||
| 262 | + | ||
| 263 | + // 当验证通过时,移除errorClass("has-error") | ||
| 264 | + label.closest('.form-group').removeClass('has-error'); | ||
| 265 | + | ||
| 266 | + }, | ||
| 267 | + | ||
| 268 | + /** | ||
| 269 | + * 类型:Callback。 | ||
| 270 | + * | ||
| 271 | + * 默认:default (native) form submit;当表单通过验证,提交表单。回调函数有个默认参数form | ||
| 272 | + */ | ||
| 273 | + submitHandler : function(f) { | ||
| 274 | + | ||
| 275 | + // 隐藏错误提示 | ||
| 276 | + error.hide(); | ||
| 277 | + | ||
| 278 | + // 表单序列化 | ||
| 279 | + var params = form.serializeJSON(); | ||
| 280 | + | ||
| 281 | + // 查询线路编码的顺延号 | ||
| 282 | + $get('/line/all', {lineCode_prefixLike: params.lineCode},function(lineCode){ | ||
| 283 | + | ||
| 284 | + // 定义返回值的长度 | ||
| 285 | + var len = lineCode.length; | ||
| 286 | + | ||
| 287 | + // 如果大于零,则已存在录入的线路编码;否则不存在 | ||
| 288 | + if(len > 0) { | ||
| 289 | + | ||
| 290 | + // 定义已有的线路编码 | ||
| 291 | + var oldCode = params.lineCode; | ||
| 292 | + | ||
| 293 | + // 自动获取线路编码 | ||
| 294 | + getLineCode(function(result) { | ||
| 295 | + | ||
| 296 | + // 重新设置提交参数线路编码值 | ||
| 297 | + params.lineCode = result; | ||
| 298 | + | ||
| 299 | + // 弹出选择框;确认则提交;取消则返回 | ||
| 300 | + layer.confirm('线路编码【'+oldCode+'】已存在!自动顺延为如下:<br>线路编码:'+result, { | ||
| 301 | + btn : [ '确认提示并提交', '取消' ] | ||
| 302 | + }, submit); | ||
| 303 | + | ||
| 304 | + }); | ||
| 305 | + | ||
| 306 | + } else { | ||
| 307 | + | ||
| 308 | + // 提交 | ||
| 309 | + submit(); | ||
| 310 | + | ||
| 311 | + } | ||
| 312 | + }); | ||
| 313 | + | ||
| 314 | + | ||
| 315 | + // 提交 | ||
| 316 | + function submit() { | ||
| 317 | + | ||
| 318 | + // 添加数据 | ||
| 319 | + $post('/line', params, function(result) { | ||
| 320 | + | ||
| 321 | + // 如果返回结果不为空 | ||
| 322 | + if(result){ | ||
| 323 | + | ||
| 324 | + // 返回状态码为"SUCCESS" ,则添加成功;返回状态码为"ERROR" ,则添加失败 | ||
| 325 | + if(result.status=='SUCCESS') { | ||
| 326 | + | ||
| 327 | + // 弹出添加成功提示消息 | ||
| 328 | + layer.msg('添加成功...'); | ||
| 329 | + | ||
| 330 | + } else if(result.status=='ERROR') { | ||
| 331 | + | ||
| 332 | + // 弹出添加失败提示消息 | ||
| 333 | + layer.msg('添加失败...'); | ||
| 334 | + | ||
| 335 | + } | ||
| 336 | + } | ||
| 337 | + | ||
| 338 | + // 返回list.html页面 | ||
| 339 | + loadPage('list.html'); | ||
| 340 | + }); | ||
| 341 | + } | ||
| 342 | + } | ||
| 343 | + }); | ||
| 344 | + | ||
| 345 | + // 联系电话(手机/电话皆可)验证 | ||
| 346 | + $.validator.addMethod("isPhone", function(value,element) { | ||
| 347 | + | ||
| 348 | + // 长度 | ||
| 349 | + var length = value.length; | ||
| 350 | + | ||
| 351 | + // 手机正则表达式 | ||
| 352 | + var mobile = /^(((13[0-9]{1})|(15[0-9]{1}))+\d{8})$/; | ||
| 353 | + | ||
| 354 | + // 固定电话正则表达式 | ||
| 355 | + var tel = /^\d{3,4}-?\d{7,9}$/; | ||
| 356 | + return this.optional(element) || (tel.test(value) || mobile.test(value)); | ||
| 357 | + }, "请正确填写您的联系电话"); | ||
| 358 | +}); | ||
| 0 | \ No newline at end of file | 359 | \ No newline at end of file |
src/main/resources/static/pages/base/line/js/line-details-info.js
0 → 100644
| 1 | +$(function(){ | ||
| 2 | + | ||
| 3 | + // 获取参数ID | ||
| 4 | + var lineId = $.url().param('lineId'); | ||
| 5 | + | ||
| 6 | + if(lineId) { | ||
| 7 | + | ||
| 8 | + $get('/line/all',{id_eq:lineId},function(data) { | ||
| 9 | + | ||
| 10 | + console.log(data); | ||
| 11 | + | ||
| 12 | + if(data) { | ||
| 13 | + | ||
| 14 | + var tbodyHtml = template('line_details_temp',{list : data}); | ||
| 15 | + | ||
| 16 | + // 把渲染好的模版html文本追加到表格中 | ||
| 17 | + $('#line_details tbody').html(tbodyHtml); | ||
| 18 | + | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + }); | ||
| 22 | + | ||
| 23 | + } else { | ||
| 24 | + | ||
| 25 | + // 缺少ID | ||
| 26 | + layer.confirm('【ID缺失,请点击返回,重新进行详情操作】', { | ||
| 27 | + btn : [ '返回' ],icon: 3, title:'提示' | ||
| 28 | + }, function(index){ | ||
| 29 | + layer.close(index); | ||
| 30 | + loadPage('list.html'); | ||
| 31 | + }); | ||
| 32 | + | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | +}); | ||
| 0 | \ No newline at end of file | 36 | \ No newline at end of file |
src/main/resources/static/pages/base/line/js/line-edit-form.js
0 → 100644
| 1 | +!function(){ | ||
| 2 | + | ||
| 3 | + // 获取参数ID | ||
| 4 | + var lineId = $.url().param('lineId'); | ||
| 5 | + | ||
| 6 | + // 如果参数ID不为空 | ||
| 7 | + if(lineId) { | ||
| 8 | + | ||
| 9 | + $('#lineId').val(lineId); | ||
| 10 | + | ||
| 11 | + selectTemp(function(){ | ||
| 12 | + | ||
| 13 | + // 根据ID查询详细信息 | ||
| 14 | + $get('/line/' + lineId ,null, function(result){ | ||
| 15 | + | ||
| 16 | + // 如果不为空 | ||
| 17 | + if(result) { | ||
| 18 | + | ||
| 19 | + // 定义日期格式 | ||
| 20 | + var fs = 'YYYY-MM-DD' | ||
| 21 | + | ||
| 22 | + // 设置日期 | ||
| 23 | + result.openDate = moment(result.openDate).format(fs); | ||
| 24 | + | ||
| 25 | + putFormData(result, '#line_edit_form'); | ||
| 26 | + | ||
| 27 | + // 设置公司值 | ||
| 28 | + $('#companySelect').val(result.company); | ||
| 29 | + | ||
| 30 | + getbrancheCompanyValues(result.company,function(){ | ||
| 31 | + | ||
| 32 | + // 设置分公司 | ||
| 33 | + $('#brancheCompanySelect').val(result.brancheCompany); | ||
| 34 | + | ||
| 35 | + }); | ||
| 36 | + | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + }); | ||
| 40 | + }) | ||
| 41 | + | ||
| 42 | + } else { | ||
| 43 | + | ||
| 44 | + // 缺少ID | ||
| 45 | + layer.confirm('【ID缺失,请点击返回,重新进行修改操作】', { | ||
| 46 | + btn : [ '返回' ],icon: 3, title:'提示' | ||
| 47 | + }, function(index){ | ||
| 48 | + layer.close(index); | ||
| 49 | + loadPage('list.html'); | ||
| 50 | + }); | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + | ||
| 54 | + | ||
| 55 | + // 模块下拉框 | ||
| 56 | + function selectTemp(callback) { | ||
| 57 | + | ||
| 58 | + // 填充公司下拉框选择值 | ||
| 59 | + $.get('/business/all', {upCode_eq: '88'}, function(array){ | ||
| 60 | + | ||
| 61 | + // 公司下拉options属性值 | ||
| 62 | + var options = '<option value="">-- 请选择公司 --</option>'; | ||
| 63 | + | ||
| 64 | + // 遍历array | ||
| 65 | + $.each(array, function(i,d){ | ||
| 66 | + | ||
| 67 | + options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>'; | ||
| 68 | + | ||
| 69 | + }); | ||
| 70 | + | ||
| 71 | + // 填充公司下拉框options | ||
| 72 | + $('#companySelect').html(options); | ||
| 73 | + | ||
| 74 | + callback && callback(); | ||
| 75 | + }); | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + // 填充分公司下拉框选择值 | ||
| 79 | + function getbrancheCompanyValues(businessCode,cb){ | ||
| 80 | + | ||
| 81 | + // 分公司下拉框options属性值 | ||
| 82 | + var options = '<option value="">-- 请选择分公司 --</option>'; | ||
| 83 | + | ||
| 84 | + if(businessCode) { | ||
| 85 | + | ||
| 86 | + $get('/business/all', {upCode_eq: businessCode}, function(brancheCompany){ | ||
| 87 | + | ||
| 88 | + // 遍历brancheCompany | ||
| 89 | + $.each(brancheCompany, function(i,d){ | ||
| 90 | + | ||
| 91 | + options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>'; | ||
| 92 | + | ||
| 93 | + }); | ||
| 94 | + | ||
| 95 | + // 填充分公司下拉框options | ||
| 96 | + $('#brancheCompanySelect').html(options); | ||
| 97 | + | ||
| 98 | + cb && cb(); | ||
| 99 | + | ||
| 100 | + }); | ||
| 101 | + | ||
| 102 | + } else { | ||
| 103 | + | ||
| 104 | + // 填充分公司下拉框options | ||
| 105 | + $('#brancheCompanySelect').html(options); | ||
| 106 | + | ||
| 107 | + cb && cb(); | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + // 公司值改变事件 | ||
| 113 | + $('#companySelect').on('change',companySelectChangeSetBrancheValue); | ||
| 114 | + | ||
| 115 | + function companySelectChangeSetBrancheValue() { | ||
| 116 | + | ||
| 117 | + // 获取公司下拉框选择值 | ||
| 118 | + var businessCode = $('#companySelect').val(); | ||
| 119 | + | ||
| 120 | + // 分公司下拉框options属性值 | ||
| 121 | + var options = '<option value="">-- 请选择分公司 --</option>'; | ||
| 122 | + | ||
| 123 | + // 如果公司选择为空则分公司为空 ; 否则查询出所属公司下的分公司名称和相应分公司代码 | ||
| 124 | + if(businessCode == null || businessCode ==''){ | ||
| 125 | + | ||
| 126 | + // 填充分公司下拉框options | ||
| 127 | + $('#brancheCompanySelect').html(options); | ||
| 128 | + | ||
| 129 | + } else { | ||
| 130 | + | ||
| 131 | + // 查询出所属公司下的分公司名称和相应分公司代码 | ||
| 132 | + $get('/business/all', {upCode_eq: businessCode}, function(array){ | ||
| 133 | + | ||
| 134 | + // 遍历array | ||
| 135 | + $.each(array, function(i,d){ | ||
| 136 | + | ||
| 137 | + options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>'; | ||
| 138 | + | ||
| 139 | + }); | ||
| 140 | + | ||
| 141 | + // 填充分公司下拉框options | ||
| 142 | + $('#brancheCompanySelect').html(options); | ||
| 143 | + | ||
| 144 | + }); | ||
| 145 | + } | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + // 日期控件 | ||
| 149 | + $('#openDateInput').datetimepicker({ | ||
| 150 | + | ||
| 151 | + format : 'YYYY-MM-DD', | ||
| 152 | + | ||
| 153 | + locale: 'zh-cn' | ||
| 154 | + | ||
| 155 | + }); | ||
| 156 | + | ||
| 157 | + // 定义表单 | ||
| 158 | + var form = $('#line_edit_form'); | ||
| 159 | + | ||
| 160 | + // 定义表单异常 | ||
| 161 | + var error = $('.alert-danger',form); | ||
| 162 | + | ||
| 163 | + // 表单验证 | ||
| 164 | + form.validate({ | ||
| 165 | + | ||
| 166 | + // 错误提示元素span对象 | ||
| 167 | + errorElement : 'span', | ||
| 168 | + | ||
| 169 | + // 错误提示元素class名称 | ||
| 170 | + errorClass : 'help-block help-block-error', | ||
| 171 | + | ||
| 172 | + // 验证错误获取焦点 | ||
| 173 | + focusInvalid : true, | ||
| 174 | + | ||
| 175 | + // 需要验证的表单元素 | ||
| 176 | + rules : { | ||
| 177 | + | ||
| 178 | + // 线路名称 | ||
| 179 | + 'name' : { | ||
| 180 | + | ||
| 181 | + // 必填项 | ||
| 182 | + required : true, | ||
| 183 | + | ||
| 184 | + // 最大长度 | ||
| 185 | + maxlength: 20 | ||
| 186 | + }, | ||
| 187 | + | ||
| 188 | + // 线路编码 | ||
| 189 | + 'lineCode' : { | ||
| 190 | + | ||
| 191 | + // 必填项 | ||
| 192 | + required : true, | ||
| 193 | + | ||
| 194 | + // 最大长度 | ||
| 195 | + maxlength: 20 | ||
| 196 | + }, | ||
| 197 | + | ||
| 198 | + // 起始站调度电话 | ||
| 199 | + 'startPhone' : { | ||
| 200 | + | ||
| 201 | + // 必须输入合法的数字(负数,小数)。 | ||
| 202 | + number : true, | ||
| 203 | + | ||
| 204 | + // 必须输入整数。 | ||
| 205 | + digits : true, | ||
| 206 | + | ||
| 207 | + // 电话号码格式 | ||
| 208 | + isPhone : true | ||
| 209 | + }, | ||
| 210 | + | ||
| 211 | + // 终点站调度电话 | ||
| 212 | + 'endPhone' : { | ||
| 213 | + | ||
| 214 | + // 必须输入合法的数字(负数,小数)。 | ||
| 215 | + number : true, | ||
| 216 | + | ||
| 217 | + // 必须输入整数。 | ||
| 218 | + digits : true, | ||
| 219 | + | ||
| 220 | + // 电话号码格式 | ||
| 221 | + isPhone : true | ||
| 222 | + }, | ||
| 223 | + | ||
| 224 | + // 开辟日期 | ||
| 225 | + 'openDate' : { | ||
| 226 | + | ||
| 227 | + // 正确格式的日期(日期校验 ie6 出错,慎用。) | ||
| 228 | + date : true, | ||
| 229 | + | ||
| 230 | + // 必须输入正确格式的日期(ISO),例如:2009-06-23,1998/01/22。只验证格式,不验证有效性。 | ||
| 231 | + dateISO:true | ||
| 232 | + }, | ||
| 233 | + | ||
| 234 | + // 线路沿革 | ||
| 235 | + 'history' : { | ||
| 236 | + | ||
| 237 | + // 输入长度最多是 200 的字符串(汉字算一个字符)。 | ||
| 238 | + maxlength: 200 | ||
| 239 | + }, | ||
| 240 | + | ||
| 241 | + // 上海市线路编码 | ||
| 242 | + 'shanghaiLinecode' : { | ||
| 243 | + | ||
| 244 | + // 必须输入合法的数字(负数,小数)。 | ||
| 245 | + number : true, | ||
| 246 | + | ||
| 247 | + // 必须输入整数。 | ||
| 248 | + digits : true | ||
| 249 | + }, | ||
| 250 | + | ||
| 251 | + // 设备线路编码 | ||
| 252 | + 'eqLinecode' : { | ||
| 253 | + | ||
| 254 | + // 必须输入合法的数字(负数,小数)。 | ||
| 255 | + number : true, | ||
| 256 | + | ||
| 257 | + // 必须输入整数。 | ||
| 258 | + digits : true | ||
| 259 | + }, | ||
| 260 | + | ||
| 261 | + // 描述/说明 | ||
| 262 | + 'descriptions' : { | ||
| 263 | + | ||
| 264 | + // 输入长度最多是 200 的字符串(汉字算一个字符)。 | ||
| 265 | + maxlength: 200 | ||
| 266 | + } | ||
| 267 | + }, | ||
| 268 | + | ||
| 269 | + /** | ||
| 270 | + * 类型:Callback。当未通过验证的表单提交时,可以在该回调函数中处理一些事情。 | ||
| 271 | + * | ||
| 272 | + * 参数:该回调函数有两个参数:第一个为一个事件对象,第二个为验证器(validator) | ||
| 273 | + */ | ||
| 274 | + invalidHandler : function(event, validator) { | ||
| 275 | + | ||
| 276 | + // 显示表单未通过提示信息 | ||
| 277 | + error.show(); | ||
| 278 | + | ||
| 279 | + // 把提示信息放到指定的位置。 | ||
| 280 | + App.scrollTo(error, -200); | ||
| 281 | + }, | ||
| 282 | + | ||
| 283 | + /** | ||
| 284 | + * 类型:Callback。 | ||
| 285 | + * | ||
| 286 | + * 默认:添加errorClass("has-error")到表单元素。将未通过验证的表单元素设置高亮。 | ||
| 287 | + */ | ||
| 288 | + highlight : function(element) { | ||
| 289 | + | ||
| 290 | + // 添加errorClass("has-error")到表单元素 | ||
| 291 | + $(element).closest('.form-group').addClass('has-error'); | ||
| 292 | + | ||
| 293 | + }, | ||
| 294 | + | ||
| 295 | + /** | ||
| 296 | + * 类型:Callback。 | ||
| 297 | + * | ||
| 298 | + * 默认:移除errorClass("has-error")。与highlight操作相反 | ||
| 299 | + */ | ||
| 300 | + unhighlight : function(element) { | ||
| 301 | + | ||
| 302 | + // 移除errorClass("has-error") | ||
| 303 | + $(element).closest('.form-group').removeClass('has-error'); | ||
| 304 | + | ||
| 305 | + }, | ||
| 306 | + | ||
| 307 | + /** | ||
| 308 | + * 类型:String,Callback。 | ||
| 309 | + * | ||
| 310 | + * 如果指定它,当验证通过时显示一个消息。 | ||
| 311 | + * | ||
| 312 | + * 如果是String类型的,则添加该样式到标签中; | ||
| 313 | + * | ||
| 314 | + * 如果是一个回调函数,则将标签作为其唯一的参数。 | ||
| 315 | + */ | ||
| 316 | + success : function(label) { | ||
| 317 | + | ||
| 318 | + // 当验证通过时,移除errorClass("has-error") | ||
| 319 | + label.closest('.form-group').removeClass('has-error'); | ||
| 320 | + | ||
| 321 | + }, | ||
| 322 | + | ||
| 323 | + /** | ||
| 324 | + * 类型:Callback。 | ||
| 325 | + * | ||
| 326 | + * 默认:default (native) form submit;当表单通过验证,提交表单。回调函数有个默认参数form | ||
| 327 | + */ | ||
| 328 | + submitHandler : function(f) { | ||
| 329 | + | ||
| 330 | + // 隐藏错误提示 | ||
| 331 | + error.hide(); | ||
| 332 | + | ||
| 333 | + // 表单序列化 | ||
| 334 | + var params = form.serializeJSON(); | ||
| 335 | + | ||
| 336 | + // 查询线路编码的顺延号 | ||
| 337 | + $get('/line/all', {lineCode_prefixLike: params.lineCode},function(lineCode){ | ||
| 338 | + | ||
| 339 | + // 定义返回值的长度 | ||
| 340 | + var len = lineCode.length; | ||
| 341 | + | ||
| 342 | + // 如果大于零,则已存在录入的线路编码;否则不存在 | ||
| 343 | + if(len > 0) { | ||
| 344 | + | ||
| 345 | + // 如果id相等则为同一条数据的线路编码。 | ||
| 346 | + if(lineCode[0].id == lineId) { | ||
| 347 | + | ||
| 348 | + // 提交 | ||
| 349 | + submit(); | ||
| 350 | + | ||
| 351 | + } else { | ||
| 352 | + | ||
| 353 | + // 定义已有的线路编码 | ||
| 354 | + var oldCode = params.lineCode; | ||
| 355 | + | ||
| 356 | + // 重新设置提交参数线路编码值 | ||
| 357 | + params.lineCode = lineId; | ||
| 358 | + | ||
| 359 | + // 弹出选择框;确认则提交;取消则返回 | ||
| 360 | + layer.confirm('线路编码【'+oldCode+'】已存在!自动顺延为如下:<br>线路编码:'+lineId, { | ||
| 361 | + btn : [ '确认提示并提交', '取消' ] | ||
| 362 | + }, submit); | ||
| 363 | + | ||
| 364 | + } | ||
| 365 | + | ||
| 366 | + } else { | ||
| 367 | + | ||
| 368 | + // 提交 | ||
| 369 | + submit(); | ||
| 370 | + | ||
| 371 | + } | ||
| 372 | + }); | ||
| 373 | + | ||
| 374 | + // 提交 | ||
| 375 | + function submit() { | ||
| 376 | + | ||
| 377 | + // 添加数据 | ||
| 378 | + $post('/line', params, function(result) { | ||
| 379 | + | ||
| 380 | + // 如果返回结果不为空 | ||
| 381 | + if(result){ | ||
| 382 | + | ||
| 383 | + // 返回状态码为"SUCCESS" ,则添加成功;返回状态码为"ERROR" ,则添加失败 | ||
| 384 | + if(result.status=='SUCCESS') { | ||
| 385 | + | ||
| 386 | + // 弹出添加成功提示消息 | ||
| 387 | + layer.msg('添加成功...'); | ||
| 388 | + | ||
| 389 | + } else if(result.status=='ERROR') { | ||
| 390 | + | ||
| 391 | + // 弹出添加失败提示消息 | ||
| 392 | + layer.msg('添加失败...'); | ||
| 393 | + | ||
| 394 | + } | ||
| 395 | + } | ||
| 396 | + | ||
| 397 | + // 返回list.html页面 | ||
| 398 | + loadPage('list.html'); | ||
| 399 | + }); | ||
| 400 | + } | ||
| 401 | + } | ||
| 402 | + }); | ||
| 403 | + | ||
| 404 | + // 联系电话(手机/电话皆可)验证 | ||
| 405 | + $.validator.addMethod("isPhone", function(value,element) { | ||
| 406 | + | ||
| 407 | + // 长度 | ||
| 408 | + var length = value.length; | ||
| 409 | + | ||
| 410 | + // 手机正则表达式 | ||
| 411 | + var mobile = /^(((13[0-9]{1})|(15[0-9]{1}))+\d{8})$/; | ||
| 412 | + | ||
| 413 | + // 固定电话正则表达式 | ||
| 414 | + var tel = /^\d{3,4}-?\d{7,9}$/; | ||
| 415 | + return this.optional(element) || (tel.test(value) || mobile.test(value)); | ||
| 416 | + }, "请正确填写您的联系电话"); | ||
| 417 | + | ||
| 418 | +}(); | ||
| 0 | \ No newline at end of file | 419 | \ No newline at end of file |
src/main/resources/static/pages/base/line/js/line-list-table.js
0 → 100644
| 1 | +/** | ||
| 2 | + * | ||
| 3 | + * @JSName : list.js(线路信息list.html页面js) | ||
| 4 | + * | ||
| 5 | + * @Author : bsth@lq | ||
| 6 | + * | ||
| 7 | + * @Description : TODO(线路信息list.html页面js) | ||
| 8 | + * | ||
| 9 | + * @Data : 2016年4月28日 上午9:21:17 | ||
| 10 | + * | ||
| 11 | + * @Version 公交调度系统BS版 0.1 | ||
| 12 | + * | ||
| 13 | + */ | ||
| 14 | + | ||
| 15 | +(function(){ | ||
| 16 | + | ||
| 17 | + // 填充公司下拉框选择值 | ||
| 18 | + $get('/business/all', {upCode_eq: '88'}, function(array){ | ||
| 19 | + | ||
| 20 | + // 公司下拉options属性值 | ||
| 21 | + var options = '<option value="">请选择...</option>'; | ||
| 22 | + | ||
| 23 | + // 遍历array | ||
| 24 | + $.each(array, function(i,d){ | ||
| 25 | + | ||
| 26 | + options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>'; | ||
| 27 | + | ||
| 28 | + }); | ||
| 29 | + | ||
| 30 | + // 填充公司下拉框options,并添加公司下拉框值改变事件setbrancheCompanySelectOptions | ||
| 31 | + $('#companySelect').html(options).on('change', setbrancheCompanySelectOptions); | ||
| 32 | + | ||
| 33 | + }); | ||
| 34 | + | ||
| 35 | + // 填充分公司下拉框 | ||
| 36 | + setbrancheCompanySelectOptions(); | ||
| 37 | + | ||
| 38 | + // 填充分公司下拉框选择值 | ||
| 39 | + function setbrancheCompanySelectOptions(){ | ||
| 40 | + | ||
| 41 | + // 获取公司下拉框选择值 | ||
| 42 | + var businessCode = $('#companySelect').val(); | ||
| 43 | + | ||
| 44 | + // 分公司下拉框options属性值 | ||
| 45 | + var options = '<option value="">请选择...</option>'; | ||
| 46 | + | ||
| 47 | + // 如果公司选择为空则分公司为空 ; 否则查询出所属公司下的分公司名称和相应分公司代码 | ||
| 48 | + if(businessCode == null || businessCode ==''){ | ||
| 49 | + | ||
| 50 | + // 填充分公司下拉框options | ||
| 51 | + $('#brancheCompanySelect').html(options); | ||
| 52 | + | ||
| 53 | + } else { | ||
| 54 | + | ||
| 55 | + // 查询出所属公司下的分公司名称和相应分公司代码 | ||
| 56 | + $get('/business/all', {upCode_eq: businessCode}, function(array){ | ||
| 57 | + | ||
| 58 | + // 遍历array | ||
| 59 | + $.each(array, function(i,d){ | ||
| 60 | + | ||
| 61 | + options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>'; | ||
| 62 | + | ||
| 63 | + // 填充分公司下拉框options | ||
| 64 | + $('#brancheCompanySelect').html(options); | ||
| 65 | + | ||
| 66 | + }); | ||
| 67 | + }); | ||
| 68 | + } | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + /** | ||
| 72 | + * -----page : 当前页 | ||
| 73 | + * | ||
| 74 | + * -----initPag : | ||
| 75 | + * | ||
| 76 | + */ | ||
| 77 | + var page = 0,initPag; | ||
| 78 | + | ||
| 79 | + // 选择框 | ||
| 80 | + var icheckOptions = { | ||
| 81 | + checkboxClass: 'icheckbox_flat-blue', | ||
| 82 | + increaseArea: '20%' | ||
| 83 | + }; | ||
| 84 | + | ||
| 85 | + // 表格数据分页加载 | ||
| 86 | + loadTableDate(null,true); | ||
| 87 | + | ||
| 88 | + /** | ||
| 89 | + * 重置按钮事件 | ||
| 90 | + * | ||
| 91 | + */ | ||
| 92 | + $('tr.filter .filter-cancel').on('click',function(){ | ||
| 93 | + // 清空搜索框值 | ||
| 94 | + $('tr.filter input,select').val('').change(); | ||
| 95 | + // 重新加载表格数据 | ||
| 96 | + loadTableDate(null,true); | ||
| 97 | + }); | ||
| 98 | + | ||
| 99 | + /** | ||
| 100 | + * 搜索按钮事件 | ||
| 101 | + * | ||
| 102 | + */ | ||
| 103 | + $('tr.filter .filter-submit').on('click',function(){ | ||
| 104 | + // cells 集合返回表格中所有(列)单元格的一个数组 | ||
| 105 | + var cells = $('tr.filter')[0].cells; | ||
| 106 | + // 搜索参数集合 | ||
| 107 | + var params = {}; | ||
| 108 | + // 搜索字段名称 | ||
| 109 | + var name; | ||
| 110 | + // 遍历cells数组 | ||
| 111 | + $.each(cells, function(i, cell){ | ||
| 112 | + // 获取第i列的input或者select集合 | ||
| 113 | + var items = $('input,select', cell); | ||
| 114 | + // 遍历items集合 | ||
| 115 | + for(var j = 0, item; item = items[j++];){ | ||
| 116 | + // 获取字段名称 | ||
| 117 | + name = $(item).attr('name'); | ||
| 118 | + if(name){ | ||
| 119 | + // 赋取相对应的值 | ||
| 120 | + params[name] = $(item).val(); | ||
| 121 | + } | ||
| 122 | + } | ||
| 123 | + }); | ||
| 124 | + page = 0; | ||
| 125 | + loadTableDate(params,true); | ||
| 126 | + }); | ||
| 127 | + | ||
| 128 | + /** | ||
| 129 | + * 表格数据分页加载事件 | ||
| 130 | + * | ||
| 131 | + * ------@param : 查询参数 | ||
| 132 | + * | ||
| 133 | + * ------@isPon : 是否重新分页 | ||
| 134 | + * | ||
| 135 | + */ | ||
| 136 | + function loadTableDate(param,isPon){ | ||
| 137 | + // 搜索参数 | ||
| 138 | + var params = {}; | ||
| 139 | + if(param) | ||
| 140 | + params = param; | ||
| 141 | + // 排序(按更新时间) | ||
| 142 | + params['order'] = 'id'; | ||
| 143 | + // 记录当前页数 | ||
| 144 | + params['page'] = page; | ||
| 145 | + // 弹出正在加载层 | ||
| 146 | + var i = layer.load(2); | ||
| 147 | + // 异步请求获取表格数据 | ||
| 148 | + $.get('/line',params,function(result){ | ||
| 149 | + // 把数据填充到模版中 | ||
| 150 | + var tbodyHtml = template('line_list_temp',{list:result.content}); | ||
| 151 | + // 把渲染好的模版html文本追加到表格中 | ||
| 152 | + $('#datatable_line tbody').html(tbodyHtml); | ||
| 153 | + // 制定复选框 | ||
| 154 | + $('#datatable_line tbody').find('.icheck').iCheck(icheckOptions); | ||
| 155 | + // 复选框改变事件 | ||
| 156 | + $('#datatable_line tbody').find('.icheck').on('ifChanged', iCheckChange); | ||
| 157 | + // 是重新分页且返回数据长度大于0 | ||
| 158 | + if(isPon && result.content.length > 0){ | ||
| 159 | + // 重新分页 | ||
| 160 | + initPag = true; | ||
| 161 | + // 分页栏 | ||
| 162 | + showPagination(result); | ||
| 163 | + } | ||
| 164 | + // 关闭弹出加载层 | ||
| 165 | + layer.close(i); | ||
| 166 | + }); | ||
| 167 | + } | ||
| 168 | + | ||
| 169 | + /** | ||
| 170 | + * 复选框组件 | ||
| 171 | + * | ||
| 172 | + */ | ||
| 173 | + function iCheckChange(){ | ||
| 174 | + // 获取当前的父节点tr | ||
| 175 | + var tr = $(this).parents('tr'); | ||
| 176 | + | ||
| 177 | + // 判断当前是否选中 | ||
| 178 | + if(this.checked) | ||
| 179 | + // 选中,则增添父节点tr的样式 | ||
| 180 | + tr.addClass('row-active'); | ||
| 181 | + else | ||
| 182 | + // 未选中,则删除父节点tr的样式 | ||
| 183 | + tr.removeClass('row-active'); | ||
| 184 | + } | ||
| 185 | + | ||
| 186 | + /** | ||
| 187 | + * 分页栏组件 | ||
| 188 | + * | ||
| 189 | + */ | ||
| 190 | + function showPagination(data){ | ||
| 191 | + // 分页组件 | ||
| 192 | + $('#pagination').jqPaginator({ | ||
| 193 | + // 总页数 | ||
| 194 | + totalPages: data.totalPages, | ||
| 195 | + // 中间显示页数 | ||
| 196 | + visiblePages: 6, | ||
| 197 | + // 当前页 | ||
| 198 | + currentPage: page + 1, | ||
| 199 | + first: '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>', | ||
| 200 | + prev: '<li class="prev"><a href="javascript:void(0);">上一页<\/a><\/li>', | ||
| 201 | + next: '<li class="next"><a href="javascript:void(0);">下一页<\/a><\/li>', | ||
| 202 | + last: '<li class="last"><a href="javascript:void(0);">尾页<\/a><\/li>', | ||
| 203 | + page: '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>', | ||
| 204 | + onPageChange: function (num, type) { | ||
| 205 | + if(initPag){ | ||
| 206 | + initPag = false; | ||
| 207 | + return; | ||
| 208 | + } | ||
| 209 | + page = num - 1; | ||
| 210 | + loadTableDate(null, false); | ||
| 211 | + } | ||
| 212 | + }); | ||
| 213 | + } | ||
| 214 | +})(); | ||
| 0 | \ No newline at end of file | 215 | \ No newline at end of file |
src/main/resources/static/pages/base/line/js/lineinformation-add-form.js
0 → 100644
| 1 | +$(function(){ | ||
| 2 | + | ||
| 3 | + // 获取参数ID | ||
| 4 | + var lineId = $.url().param('lineId'); | ||
| 5 | + | ||
| 6 | + if(lineId) { | ||
| 7 | + | ||
| 8 | + $('.lineinformation_back').attr('href','/pages/base/line/lineinformation/lineinformation.html?lineId='+lineId); | ||
| 9 | + | ||
| 10 | + $('#lineIdInput').val(lineId); | ||
| 11 | + | ||
| 12 | + // 日期控件 | ||
| 13 | + $('#earlyStartTimeInput').datetimepicker({ | ||
| 14 | + | ||
| 15 | + format : 'HH:mm', | ||
| 16 | + | ||
| 17 | + locale: 'zh-cn', | ||
| 18 | + }); | ||
| 19 | + | ||
| 20 | + // 日期控件 | ||
| 21 | + $('#earlyEndTimeInput').datetimepicker({ | ||
| 22 | + | ||
| 23 | + format : 'HH:mm', | ||
| 24 | + | ||
| 25 | + locale: 'zh-cn' | ||
| 26 | + | ||
| 27 | + }); | ||
| 28 | + | ||
| 29 | + // 日期控件 | ||
| 30 | + $('#lateStartTimeInput').datetimepicker({ | ||
| 31 | + | ||
| 32 | + format : 'HH:mm', | ||
| 33 | + | ||
| 34 | + locale: 'zh-cn' | ||
| 35 | + | ||
| 36 | + }); | ||
| 37 | + | ||
| 38 | + // 日期控件 | ||
| 39 | + $('#lateEndTimeInput').datetimepicker({ | ||
| 40 | + | ||
| 41 | + format : 'HH:mm', | ||
| 42 | + | ||
| 43 | + locale: 'zh-cn' | ||
| 44 | + | ||
| 45 | + }); | ||
| 46 | + | ||
| 47 | + // 定义表单 | ||
| 48 | + var form = $('#lineinformation_add_form'); | ||
| 49 | + | ||
| 50 | + // 定义表单异常 | ||
| 51 | + var error = $('.alert-danger',form); | ||
| 52 | + | ||
| 53 | + form.validate({ | ||
| 54 | + | ||
| 55 | + // 错误提示元素span对象 | ||
| 56 | + errorElement : 'span', | ||
| 57 | + | ||
| 58 | + // 错误提示元素class名称 | ||
| 59 | + errorClass : 'help-block help-block-error', | ||
| 60 | + | ||
| 61 | + // 验证错误获取焦点 | ||
| 62 | + focusInvalid : true, | ||
| 63 | + | ||
| 64 | + // 需要验证的表单元素 | ||
| 65 | + rules : { | ||
| 66 | + | ||
| 67 | + // 线路标准信息类型 | ||
| 68 | + 'type' : { | ||
| 69 | + | ||
| 70 | + //必填项 | ||
| 71 | + required:true, | ||
| 72 | + }, | ||
| 73 | + | ||
| 74 | + // 标准总里程 | ||
| 75 | + 'totalMileage' : { | ||
| 76 | + | ||
| 77 | + //必填项 | ||
| 78 | + required:true, | ||
| 79 | + | ||
| 80 | + // 必须输入合法的数字(负数,小数)。 | ||
| 81 | + number : true, | ||
| 82 | + | ||
| 83 | + }, | ||
| 84 | + | ||
| 85 | + // 空放里程 | ||
| 86 | + 'emptyMileage' : { | ||
| 87 | + | ||
| 88 | + // 必须输入合法的数字(负数,小数)。 | ||
| 89 | + number : true | ||
| 90 | + | ||
| 91 | + }, | ||
| 92 | + | ||
| 93 | + // 上行里程 | ||
| 94 | + 'upMileage' : { | ||
| 95 | + | ||
| 96 | + //必填项 | ||
| 97 | + required:true, | ||
| 98 | + | ||
| 99 | + // 必须输入合法的数字(负数,小数)。 | ||
| 100 | + number : true | ||
| 101 | + | ||
| 102 | + }, | ||
| 103 | + | ||
| 104 | + // 下行里程 | ||
| 105 | + 'downMileage' : { | ||
| 106 | + | ||
| 107 | + //必填项 | ||
| 108 | + required:true, | ||
| 109 | + | ||
| 110 | + // 必须输入合法的数字(负数,小数)。 | ||
| 111 | + number : true | ||
| 112 | + | ||
| 113 | + }, | ||
| 114 | + | ||
| 115 | + // 上行行驶时间 | ||
| 116 | + 'upTravelTime' : { | ||
| 117 | + | ||
| 118 | + // 必须输入合法的数字(负数,小数)。 | ||
| 119 | + number : true | ||
| 120 | + | ||
| 121 | + }, | ||
| 122 | + | ||
| 123 | + // 下行行驶时间 | ||
| 124 | + 'downTravelTime' : { | ||
| 125 | + | ||
| 126 | + // 必须输入合法的数字(负数,小数)。 | ||
| 127 | + number : true | ||
| 128 | + | ||
| 129 | + }, | ||
| 130 | + | ||
| 131 | + // 早高峰开始时间 | ||
| 132 | + 'earlyStartTime' : { | ||
| 133 | + | ||
| 134 | + //验证日期格式(类似00:00的格式,不验证日期准确性只验证格 | ||
| 135 | + isDate : true | ||
| 136 | + | ||
| 137 | + }, | ||
| 138 | + | ||
| 139 | + // 早高峰结束时间 | ||
| 140 | + 'earlyEndTime' : { | ||
| 141 | + | ||
| 142 | + //验证日期格式(类似00:00的格式,不验证日期准确性只验证格 | ||
| 143 | + isDate : true | ||
| 144 | + | ||
| 145 | + }, | ||
| 146 | + | ||
| 147 | + // 早高峰上行行驶时间 | ||
| 148 | + 'earlyUpTime' : { | ||
| 149 | + | ||
| 150 | + // 必须输入合法的数字(负数,小数)。 | ||
| 151 | + number : true | ||
| 152 | + | ||
| 153 | + }, | ||
| 154 | + | ||
| 155 | + // 早高峰下行行驶时间 | ||
| 156 | + 'earlyDownTime' : { | ||
| 157 | + | ||
| 158 | + // 必须输入合法的数字(负数,小数)。 | ||
| 159 | + number : true | ||
| 160 | + | ||
| 161 | + }, | ||
| 162 | + | ||
| 163 | + // 晚高峰开始时间 | ||
| 164 | + 'lateStartTime' : { | ||
| 165 | + | ||
| 166 | + //验证日期格式(类似00:00的格式,不验证日期准确性只验证格 | ||
| 167 | + isDate : true | ||
| 168 | + | ||
| 169 | + }, | ||
| 170 | + | ||
| 171 | + // 晚高峰结束时间 | ||
| 172 | + 'lateEndTime' : { | ||
| 173 | + | ||
| 174 | + //验证日期格式(类似00:00的格式,不验证日期准确性只验证格 | ||
| 175 | + isDate : true | ||
| 176 | + | ||
| 177 | + }, | ||
| 178 | + | ||
| 179 | + // 晚高峰上行行驶时间 | ||
| 180 | + 'lateUpTime' : { | ||
| 181 | + | ||
| 182 | + // 必须输入合法的数字(负数,小数)。 | ||
| 183 | + number : true | ||
| 184 | + | ||
| 185 | + }, | ||
| 186 | + | ||
| 187 | + // 晚高峰下行行驶时间 | ||
| 188 | + 'lateDownTime' : { | ||
| 189 | + | ||
| 190 | + // 必须输入合法的数字(负数,小数)。 | ||
| 191 | + number : true | ||
| 192 | + | ||
| 193 | + }, | ||
| 194 | + | ||
| 195 | + // 小夜高峰上行行驶时间 | ||
| 196 | + 'nightStartTime' : { | ||
| 197 | + | ||
| 198 | + // 必须输入合法的数字(负数,小数)。 | ||
| 199 | + number : true | ||
| 200 | + | ||
| 201 | + }, | ||
| 202 | + | ||
| 203 | + // 晚高峰下行行驶时间 | ||
| 204 | + 'nightEndTime' : { | ||
| 205 | + | ||
| 206 | + // 必须输入合法的数字(负数,小数)。 | ||
| 207 | + number : true | ||
| 208 | + | ||
| 209 | + }, | ||
| 210 | + | ||
| 211 | + // 低谷上行行驶时间 | ||
| 212 | + 'troughUpTime' : { | ||
| 213 | + | ||
| 214 | + // 必须输入合法的数字(负数,小数)。 | ||
| 215 | + number : true | ||
| 216 | + | ||
| 217 | + }, | ||
| 218 | + | ||
| 219 | + // 低谷下行行驶时间 | ||
| 220 | + 'troughDownTime' : { | ||
| 221 | + | ||
| 222 | + // 必须输入合法的数字(负数,小数)。 | ||
| 223 | + number : true | ||
| 224 | + | ||
| 225 | + }, | ||
| 226 | + | ||
| 227 | + // 进场时间 | ||
| 228 | + 'paradeTime' : { | ||
| 229 | + | ||
| 230 | + // 必须输入合法的数字(负数,小数)。 | ||
| 231 | + number : true | ||
| 232 | + | ||
| 233 | + }, | ||
| 234 | + | ||
| 235 | + // 出场时间 | ||
| 236 | + 'outTime' : { | ||
| 237 | + | ||
| 238 | + // 必须输入合法的数字(负数,小数)。 | ||
| 239 | + number : true | ||
| 240 | + | ||
| 241 | + }, | ||
| 242 | + | ||
| 243 | + // 进场里程 | ||
| 244 | + 'paradeMileage' : { | ||
| 245 | + | ||
| 246 | + // 必须输入合法的数字(负数,小数)。 | ||
| 247 | + number : true | ||
| 248 | + | ||
| 249 | + }, | ||
| 250 | + | ||
| 251 | + // 出场里程 | ||
| 252 | + 'outMileage' : { | ||
| 253 | + | ||
| 254 | + // 必须输入合法的数字(负数,小数)。 | ||
| 255 | + number : true | ||
| 256 | + | ||
| 257 | + }, | ||
| 258 | + | ||
| 259 | + // 早高峰大间隔 | ||
| 260 | + 'earlyIntervalLg' : { | ||
| 261 | + | ||
| 262 | + // 必须输入合法的数字(负数,小数)。 | ||
| 263 | + number : true | ||
| 264 | + | ||
| 265 | + }, | ||
| 266 | + | ||
| 267 | + // 晚高峰大间隔 | ||
| 268 | + 'lateIntervalLg' : { | ||
| 269 | + | ||
| 270 | + // 必须输入合法的数字(负数,小数)。 | ||
| 271 | + number : true | ||
| 272 | + | ||
| 273 | + }, | ||
| 274 | + | ||
| 275 | + // 平时大间隔 | ||
| 276 | + 'intervalLg' : { | ||
| 277 | + | ||
| 278 | + // 必须输入合法的数字(负数,小数)。 | ||
| 279 | + number : true | ||
| 280 | + | ||
| 281 | + }, | ||
| 282 | + | ||
| 283 | + // 限速(平时) | ||
| 284 | + 'speedLimit' : { | ||
| 285 | + | ||
| 286 | + // 必须输入合法的数字(负数,小数)。 | ||
| 287 | + number : true | ||
| 288 | + }, | ||
| 289 | + | ||
| 290 | + // 限速(雨天) | ||
| 291 | + 'rainLimit' : { | ||
| 292 | + | ||
| 293 | + // 必须输入合法的数字(负数,小数)。 | ||
| 294 | + number : true | ||
| 295 | + | ||
| 296 | + }, | ||
| 297 | + | ||
| 298 | + // 限速(大雾) | ||
| 299 | + 'fogLimit' : { | ||
| 300 | + | ||
| 301 | + // 必须输入合法的数字(负数,小数)。 | ||
| 302 | + number : true | ||
| 303 | + | ||
| 304 | + }, | ||
| 305 | + | ||
| 306 | + // 限速(冰雪) | ||
| 307 | + 'snowLimit' : { | ||
| 308 | + | ||
| 309 | + // 必须输入合法的数字(负数,小数)。 | ||
| 310 | + number : true | ||
| 311 | + }, | ||
| 312 | + | ||
| 313 | + // 限速(节庆) | ||
| 314 | + 'festivalSpeedLimit' : { | ||
| 315 | + | ||
| 316 | + // 必须输入合法的数字(负数,小数)。 | ||
| 317 | + number : true | ||
| 318 | + | ||
| 319 | + }, | ||
| 320 | + | ||
| 321 | + // 描述/说明: | ||
| 322 | + 'descriptions' : { | ||
| 323 | + | ||
| 324 | + //设置最大长度 | ||
| 325 | + maxlength:240, | ||
| 326 | + | ||
| 327 | + } | ||
| 328 | + }, | ||
| 329 | + | ||
| 330 | + /** | ||
| 331 | + * 类型:Callback。当未通过验证的表单提交时,可以在该回调函数中处理一些事情。 | ||
| 332 | + * | ||
| 333 | + * 参数:该回调函数有两个参数:第一个为一个事件对象,第二个为验证器(validator) | ||
| 334 | + */ | ||
| 335 | + invalidHandler : function(event, validator) { | ||
| 336 | + | ||
| 337 | + // 显示表单未通过提示信息 | ||
| 338 | + error.show(); | ||
| 339 | + | ||
| 340 | + // 把提示信息放到指定的位置。 | ||
| 341 | + App.scrollTo(error, -200); | ||
| 342 | + }, | ||
| 343 | + | ||
| 344 | + /** | ||
| 345 | + * 类型:Callback。 | ||
| 346 | + * | ||
| 347 | + * 默认:添加errorClass("has-error")到表单元素。将未通过验证的表单元素设置高亮。 | ||
| 348 | + */ | ||
| 349 | + highlight : function(element) { | ||
| 350 | + | ||
| 351 | + // 添加errorClass("has-error")到表单元素 | ||
| 352 | + $(element).closest('.form-group').addClass('has-error'); | ||
| 353 | + | ||
| 354 | + }, | ||
| 355 | + | ||
| 356 | + /** | ||
| 357 | + * 类型:Callback。 | ||
| 358 | + * | ||
| 359 | + * 默认:移除errorClass("has-error")。与highlight操作相反 | ||
| 360 | + */ | ||
| 361 | + unhighlight : function(element) { | ||
| 362 | + | ||
| 363 | + // 移除errorClass("has-error") | ||
| 364 | + $(element).closest('.form-group').removeClass('has-error'); | ||
| 365 | + | ||
| 366 | + }, | ||
| 367 | + | ||
| 368 | + /** | ||
| 369 | + * 类型:String,Callback。 | ||
| 370 | + * | ||
| 371 | + * 如果指定它,当验证通过时显示一个消息。 | ||
| 372 | + * | ||
| 373 | + * 如果是String类型的,则添加该样式到标签中; | ||
| 374 | + * | ||
| 375 | + * 如果是一个回调函数,则将标签作为其唯一的参数。 | ||
| 376 | + */ | ||
| 377 | + success : function(label) { | ||
| 378 | + | ||
| 379 | + // 当验证通过时,移除errorClass("has-error") | ||
| 380 | + label.closest('.form-group').removeClass('has-error'); | ||
| 381 | + | ||
| 382 | + }, | ||
| 383 | + | ||
| 384 | + /** | ||
| 385 | + * 类型:Callback。 | ||
| 386 | + * | ||
| 387 | + * 默认:default (native) form submit;当表单通过验证,提交表单。回调函数有个默认参数form | ||
| 388 | + */ | ||
| 389 | + submitHandler : function(f) { | ||
| 390 | + | ||
| 391 | + // 隐藏错误提示 | ||
| 392 | + error.hide(); | ||
| 393 | + | ||
| 394 | + var params = form.serializeJSON(); | ||
| 395 | + | ||
| 396 | + if (params.line) { | ||
| 397 | + | ||
| 398 | + // 添加数据 | ||
| 399 | + $post('/lineInformation', params, function(result) { | ||
| 400 | + | ||
| 401 | + // 如果返回结果不为空 | ||
| 402 | + if(result){ | ||
| 403 | + | ||
| 404 | + // 返回状态码为"SUCCESS" ,则添加成功;返回状态码为"ERROR" ,则添加失败 | ||
| 405 | + if(result.status=='SUCCESS') { | ||
| 406 | + | ||
| 407 | + // 弹出添加成功提示消息 | ||
| 408 | + layer.msg('添加成功...'); | ||
| 409 | + | ||
| 410 | + } else if(result.status=='ERROR') { | ||
| 411 | + | ||
| 412 | + // 弹出添加失败提示消息 | ||
| 413 | + layer.msg('添加失败...'); | ||
| 414 | + | ||
| 415 | + } | ||
| 416 | + } | ||
| 417 | + | ||
| 418 | + // 返回list.html页面 | ||
| 419 | + loadPage('lineinformation.html?lineId='+lineId); | ||
| 420 | + }); | ||
| 421 | + | ||
| 422 | + } | ||
| 423 | + } | ||
| 424 | + }); | ||
| 425 | + | ||
| 426 | + // 时间时分验证 | ||
| 427 | + $.validator.addMethod("isDate", function(value,element) { | ||
| 428 | + | ||
| 429 | + // 长度 | ||
| 430 | + var length = value.length; | ||
| 431 | + | ||
| 432 | + // 手机正则表达式 | ||
| 433 | + var dateStr = /^(?:(?:0?|1)\d|2[0-3]):[0-5]\d$/; | ||
| 434 | + | ||
| 435 | + return this.optional(element) || dateStr.test(value); | ||
| 436 | + }, "请正确填写您的时间格式"); | ||
| 437 | + | ||
| 438 | + | ||
| 439 | + } else { | ||
| 440 | + | ||
| 441 | + // 缺少ID | ||
| 442 | + layer.confirm('【线路ID缺失,请点击返回,重新进行添加线路标准信息操作】', { | ||
| 443 | + btn : [ '返回' ],icon: 3, title:'提示' | ||
| 444 | + }, function(index){ | ||
| 445 | + layer.close(index); | ||
| 446 | + loadPage('lineinformation.html'); | ||
| 447 | + }); | ||
| 448 | + } | ||
| 449 | + | ||
| 450 | +}); | ||
| 0 | \ No newline at end of file | 451 | \ No newline at end of file |
src/main/resources/static/pages/base/line/js/lineinformation-list-table.js
0 → 100644
| 1 | +$(function(){ | ||
| 2 | + | ||
| 3 | + // 获取参数ID | ||
| 4 | + var lineId = $.url().param('lineId'); | ||
| 5 | + | ||
| 6 | + if(lineId) { | ||
| 7 | + | ||
| 8 | + $('#lineinformation_add').attr('href','lineinformation_add.html?lineId='+lineId); | ||
| 9 | + | ||
| 10 | + $.get('/line',{id_eq:lineId},function(result){ | ||
| 11 | + | ||
| 12 | + if(result) { | ||
| 13 | + | ||
| 14 | + var tbodyHtml; | ||
| 15 | + | ||
| 16 | + if(result.lineInformation) { | ||
| 17 | + | ||
| 18 | + tbodyHtml = template('lineinformation_table_temp',{list:result.content}); | ||
| 19 | + | ||
| 20 | + } else { | ||
| 21 | + | ||
| 22 | + tbodyHtml = '<tr><td colspan=9><h6 class="muted">没有找到相关数据</h6></td></tr>' | ||
| 23 | + | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + $('#datatable_lineinformation tbody').html(tbodyHtml); | ||
| 27 | + | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + }); | ||
| 31 | + | ||
| 32 | + | ||
| 33 | + } else { | ||
| 34 | + | ||
| 35 | + // 缺少ID | ||
| 36 | + layer.confirm('【ID缺失,请点击返回,重新进行查看线路标准信息详情操作】', { | ||
| 37 | + btn : [ '返回' ],icon: 3, title:'提示' | ||
| 38 | + }, function(index){ | ||
| 39 | + layer.close(index); | ||
| 40 | + loadPage('list.html'); | ||
| 41 | + }); | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | +}); | ||
| 0 | \ No newline at end of file | 45 | \ No newline at end of file |
src/main/resources/static/pages/base/line/lineinformation/lineinformation.html
0 → 100644
| 1 | +<div class="page-head"> | ||
| 2 | + <div class="page-title"> | ||
| 3 | + <h1>线路标准信息</h1> | ||
| 4 | + </div> | ||
| 5 | +</div> | ||
| 6 | + | ||
| 7 | +<ul class="page-breadcrumb breadcrumb"> | ||
| 8 | + <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li> | ||
| 9 | + <li><span class="active">基础信息</span> <i class="fa fa-circle"></i></li> | ||
| 10 | + <li><a href="/pages/base/line/list.html" data-pjax>线路信息</a> <i class="fa fa-circle"></i></li> | ||
| 11 | + <li><span class="active">线路标准信息</span></li> | ||
| 12 | +</ul> | ||
| 13 | + | ||
| 14 | +<div class="row"> | ||
| 15 | + <div class="col-md-12"> | ||
| 16 | + <div class="portlet light porttlet-fit bordered"> | ||
| 17 | + <div class="portlet-title"> | ||
| 18 | + <div class="caption"> | ||
| 19 | + <i class="fa fa-info-circle font-dark"></i> | ||
| 20 | + <span class="caption-subject font-dark sbold uppercase">线路标准信息</span> | ||
| 21 | + </div> | ||
| 22 | + <div class="actions"> | ||
| 23 | + <div class="btn-group btn-group-devided" data-toggle="buttons"> | ||
| 24 | + <a class="btn btn-circle blue" href="lineinformation_add.html" id="lineinformation_add" data-pjax><i class="fa fa-plus"></i> 添加线路标准信息</a> | ||
| 25 | + </div> | ||
| 26 | + </div> | ||
| 27 | + </div> | ||
| 28 | + <div class="portlet-body"> | ||
| 29 | + <div class="table-container" style="margin-top: 10px"> | ||
| 30 | + <table class="table table-striped table-bordered table-hover table-checkable" id="datatable_lineinformation"> | ||
| 31 | + <thead> | ||
| 32 | + <tr role="row" class="heading"> | ||
| 33 | + <th width="3%">#</th> | ||
| 34 | + <th width="8%">线路编码</th> | ||
| 35 | + <th width="8%">线路名称</th> | ||
| 36 | + <th width="10%">标准信息类型</th> | ||
| 37 | + <th width="10%">上行总里程</th> | ||
| 38 | + <th width="10%">下行总里程</th> | ||
| 39 | + <th width="10%">上行行驶时间</th> | ||
| 40 | + <th width="10%">下行行驶时间</th> | ||
| 41 | + <th width="15%">操作</th> | ||
| 42 | + </tr> | ||
| 43 | + <tr role="row" class="filter"> | ||
| 44 | + <td></td> | ||
| 45 | + <td> | ||
| 46 | + <input type="text" class="form-control form-filter input-sm" name="lineCode"> | ||
| 47 | + </td> | ||
| 48 | + <td> | ||
| 49 | + <input type="text" class="form-control form-filter input-sm" name="name"> | ||
| 50 | + </td> | ||
| 51 | + <td> | ||
| 52 | + <select class="form-control form-filter " name="destroy"> | ||
| 53 | + <option value="">请选择...</option> | ||
| 54 | + <option value="1">运营</option> | ||
| 55 | + <option value="0">撤销</option> | ||
| 56 | + </select> | ||
| 57 | + </td> | ||
| 58 | + <td> | ||
| 59 | + <input type="text" class="form-control form-filter input-sm" name="name"> | ||
| 60 | + </td> | ||
| 61 | + <td> | ||
| 62 | + <input type="text" class="form-control form-filter input-sm" name="name"> | ||
| 63 | + </td> | ||
| 64 | + <td> | ||
| 65 | + <input type="text" class="form-control form-filter input-sm" name="name"> | ||
| 66 | + </td> | ||
| 67 | + <td> | ||
| 68 | + <input type="text" class="form-control form-filter input-sm" name="name"> | ||
| 69 | + </td> | ||
| 70 | + <td> | ||
| 71 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" > | ||
| 72 | + <i class="fa fa-search"></i> 搜索 | ||
| 73 | + </button> | ||
| 74 | + | ||
| 75 | + <button class="btn btn-sm red btn-outline filter-cancel"> | ||
| 76 | + <i class="fa fa-times"></i> 重置 | ||
| 77 | + </button> | ||
| 78 | + </td> | ||
| 79 | + </tr> | ||
| 80 | + </thead> | ||
| 81 | + <tbody></tbody> | ||
| 82 | + </table> | ||
| 83 | + <div style="text-align: right;"> | ||
| 84 | + <ul id="pagination" class="pagination"></ul> | ||
| 85 | + </div> | ||
| 86 | + </div> | ||
| 87 | + </div> | ||
| 88 | + </div> | ||
| 89 | + </div> | ||
| 90 | +</div> | ||
| 91 | +<script type="text/html" id="lineinformation_table_temp"> | ||
| 92 | + {{each list as obj i }} | ||
| 93 | + <tr> | ||
| 94 | + <td style="vertical-align: middle;"> | ||
| 95 | + <input type="checkbox" class="group-checkable icheck" data-id="{{obj.lineInformation.id}}"> | ||
| 96 | + </td> | ||
| 97 | + <td> | ||
| 98 | + {{obj.lineCode}} | ||
| 99 | + </td> | ||
| 100 | + <td> | ||
| 101 | + {{obj.name}} | ||
| 102 | + </td> | ||
| 103 | + <td> | ||
| 104 | + {{obj.lineInformation.type}} | ||
| 105 | + </td> | ||
| 106 | + <td> | ||
| 107 | + {{obj.lineInformation.upMileage}} | ||
| 108 | + </td> | ||
| 109 | + <td> | ||
| 110 | + {{obj.lineInformation.downMileage}} | ||
| 111 | + </td> | ||
| 112 | + <td> | ||
| 113 | + {{obj.lineInformation.upTravelTime}} | ||
| 114 | + </td> | ||
| 115 | + <td> | ||
| 116 | + {{obj.lineInformation.downTravelTime}} | ||
| 117 | + </td> | ||
| 118 | + <td> | ||
| 119 | + <a href="details.html?lineId={{obj.lineInformation.id}}" class="btn default blue-stripe btn-sm" data-pjax> 详细 </a> | ||
| 120 | + <a href="edit.html?lineId={{obj.lineInformation.id}}" class="btn default blue-stripe btn-sm" data-pjax> 修改 </a> | ||
| 121 | + </td> | ||
| 122 | + </tr> | ||
| 123 | + {{/each}} | ||
| 124 | +</script> | ||
| 125 | +<script src="/pages/base/line/js/lineinformation-list-table.js"></script> | ||
| 0 | \ No newline at end of file | 126 | \ No newline at end of file |
src/main/resources/static/pages/base/line/lineinformation/lineinformation_add.html
0 → 100644
| 1 | +<div class="page-head"> | ||
| 2 | + <div class="page-title"> | ||
| 3 | + <h1>添加线路标准信息</h1> | ||
| 4 | + </div> | ||
| 5 | +</div> | ||
| 6 | + | ||
| 7 | +<ul class="page-breadcrumb breadcrumb"> | ||
| 8 | + <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li> | ||
| 9 | + <li><span class="active">基础信息</span> <i class="fa fa-circle"></i></li> | ||
| 10 | + <li><a href="/pages/base/line/list.html" data-pjax>线路信息</a> <i class="fa fa-circle"></i></li> | ||
| 11 | + <li><a href="/pages/base/line/lineinformation/lineinformation.html" class="lineinformation_back" data-pjax>线路标准信息</a> <i class="fa fa-circle"></i></li> | ||
| 12 | + <li><span class="active">添加线路标准信息</span></li> | ||
| 13 | +</ul> | ||
| 14 | + | ||
| 15 | +<div class="portlet light bordered"> | ||
| 16 | + <!-- 标题 --> | ||
| 17 | + <div class="portlet-title"> | ||
| 18 | + <div class="caption"> | ||
| 19 | + <i class="icon-equalizer font-red-sunglo"></i> | ||
| 20 | + <span class="caption-subject font-red-sunglo bold uppercase">添加线路标准信息</span> | ||
| 21 | + </div> | ||
| 22 | + </div> | ||
| 23 | + | ||
| 24 | + <!-- 表单 --> | ||
| 25 | + <div class="portlet-body form"> | ||
| 26 | + | ||
| 27 | + <!-- START FORM --> | ||
| 28 | + <form action="/lineinformation" class="form-horizontal" id="lineinformation_add_form" > | ||
| 29 | + | ||
| 30 | + <!-- 错误提示 --> | ||
| 31 | + <div class="alert alert-danger display-hide"> | ||
| 32 | + <button class="close" data-close="alert"></button> | ||
| 33 | + 您的输入有误,请检查下面的输入项 | ||
| 34 | + </div> | ||
| 35 | + | ||
| 36 | + <!-- 表单内容 --> | ||
| 37 | + <div class="form-body"> | ||
| 38 | + | ||
| 39 | + <!-- 线路信息ID --> | ||
| 40 | + <input type="hidden" name="line" id="lineIdInput"> | ||
| 41 | + | ||
| 42 | + <!-- 线路标准信息类型 --> | ||
| 43 | + <div class="form-group"> | ||
| 44 | + <label class="control-label col-md-3"> | ||
| 45 | + <span class="required"> * </span>线路标准信息类型: | ||
| 46 | + </label> | ||
| 47 | + <div class="col-md-4"> | ||
| 48 | + <select name="type" class="form-control" id="typeInput"> | ||
| 49 | + <option value="">-- 请选择类型 --</option> | ||
| 50 | + <option value="zc">正常</option> | ||
| 51 | + <option value="qj">区间</option> | ||
| 52 | + <option value="fk">放空</option> | ||
| 53 | + </select> | ||
| 54 | + </div> | ||
| 55 | + </div> | ||
| 56 | + | ||
| 57 | + <!-- 标准总里程 --> | ||
| 58 | + <div class="form-group"> | ||
| 59 | + <label class="control-label col-md-3"> | ||
| 60 | + <span class="required"> * </span>标准总里程: | ||
| 61 | + </label> | ||
| 62 | + <div class="col-md-4"> | ||
| 63 | + <input type="text" class="form-control" name="totalMileage" id="totalMileageInput" placeholder="标准总里程"> | ||
| 64 | + <span class="help-block"> 单位:公里 </span> | ||
| 65 | + </div> | ||
| 66 | + </div> | ||
| 67 | + | ||
| 68 | + <!-- 空放里程 --> | ||
| 69 | + <div class="form-group"> | ||
| 70 | + <label class="control-label col-md-3"> 空放里程: </label> | ||
| 71 | + <div class="col-md-4"> | ||
| 72 | + <input type="text" class="form-control" name="emptyMileage" id="emptyMileageInput" placeholder="空放里程"> | ||
| 73 | + <span class="help-block"> 单位:公里 </span> | ||
| 74 | + </div> | ||
| 75 | + </div> | ||
| 76 | + | ||
| 77 | + <!-- 上行里程 --> | ||
| 78 | + <div class="form-group"> | ||
| 79 | + <label class="control-label col-md-3"> | ||
| 80 | + <span class="required"> * </span>上行里程: | ||
| 81 | + </label> | ||
| 82 | + <div class="col-md-4"> | ||
| 83 | + <input type="text" class="form-control" name="upMileage" id="upMileageInput" placeholder="上行里程"> | ||
| 84 | + <span class="help-block"> 单位:公里 </span> | ||
| 85 | + </div> | ||
| 86 | + </div> | ||
| 87 | + | ||
| 88 | + <!-- 下行里程 --> | ||
| 89 | + <div class="form-group"> | ||
| 90 | + <label class="control-label col-md-3"> | ||
| 91 | + <span class="required"> * </span>下行里程: | ||
| 92 | + </label> | ||
| 93 | + <div class="col-md-4"> | ||
| 94 | + <input type="text" class="form-control" name="downMileage" id="downMileageInput" placeholder="下行里程"> | ||
| 95 | + <span class="help-block"> 单位:公里 </span> | ||
| 96 | + </div> | ||
| 97 | + </div> | ||
| 98 | + | ||
| 99 | + <!-- 上行行驶时间 --> | ||
| 100 | + <div class="form-group"> | ||
| 101 | + <label class="control-label col-md-3"> 上行行驶时间: </label> | ||
| 102 | + <div class="col-md-4"> | ||
| 103 | + <input type="text" class="form-control" name="upTravelTime" id="upTravelTimeInput" placeholder="上行行驶时间"> | ||
| 104 | + <span class="help-block"> 单位:分钟 </span> | ||
| 105 | + </div> | ||
| 106 | + </div> | ||
| 107 | + | ||
| 108 | + <!-- 下行行驶时间 --> | ||
| 109 | + <div class="form-group"> | ||
| 110 | + <label class="control-label col-md-3"> 下行行驶时间: </label> | ||
| 111 | + <div class="col-md-4"> | ||
| 112 | + <input type="text" class="form-control" name="downTravelTime" id="downTravelTimeInput" placeholder="下行行驶时间"> | ||
| 113 | + <span class="help-block"> 单位:分钟 </span> | ||
| 114 | + </div> | ||
| 115 | + </div> | ||
| 116 | + | ||
| 117 | + <!-- 早高峰开始时间 --> | ||
| 118 | + <div class="form-group"> | ||
| 119 | + <label class="control-label col-md-3"> 早高峰开始时间: </label> | ||
| 120 | + <div class="col-md-4"> | ||
| 121 | + <input type="text" class="form-control" name="earlyStartTime" id="earlyStartTimeInput" placeholder="早高峰开始时间"> | ||
| 122 | + <span class="help-block"> 格式:00:00 </span> | ||
| 123 | + </div> | ||
| 124 | + </div> | ||
| 125 | + | ||
| 126 | + <!-- 早高峰结束时间 --> | ||
| 127 | + <div class="form-group"> | ||
| 128 | + <label class="control-label col-md-3"> 早高峰结束时间: </label> | ||
| 129 | + <div class="col-md-4"> | ||
| 130 | + <input type="text" class="form-control" name="earlyEndTime" id="earlyEndTimeInput" placeholder="早高峰结束时间"> | ||
| 131 | + <span class="help-block"> 格式:00:00 </span> | ||
| 132 | + </div> | ||
| 133 | + </div> | ||
| 134 | + | ||
| 135 | + <!-- 早高峰上行行驶时间 --> | ||
| 136 | + <div class="form-group"> | ||
| 137 | + <label class="control-label col-md-3"> 早高峰上行行驶时间: </label> | ||
| 138 | + <div class="col-md-4"> | ||
| 139 | + <input type="text" class="form-control" name="earlyUpTime" id="earlyUpTimeInput" placeholder="早高峰上行行驶时间"> | ||
| 140 | + <span class="help-block"> 单位:分钟 </span> | ||
| 141 | + </div> | ||
| 142 | + </div> | ||
| 143 | + | ||
| 144 | + <!-- 早高峰下行行驶时间 --> | ||
| 145 | + <div class="form-group"> | ||
| 146 | + <label class="control-label col-md-3"> 早高峰下行行驶时间: </label> | ||
| 147 | + <div class="col-md-4"> | ||
| 148 | + <input type="text" class="form-control" name="earlyDownTime" id="earlyDownTimeInput" placeholder="早高峰下行行驶时间"> | ||
| 149 | + <span class="help-block"> 单位:分钟 </span> | ||
| 150 | + </div> | ||
| 151 | + </div> | ||
| 152 | + | ||
| 153 | + <!-- 晚高峰开始时间 --> | ||
| 154 | + <div class="form-group"> | ||
| 155 | + <label class="control-label col-md-3"> 晚高峰开始时间: </label> | ||
| 156 | + <div class="col-md-4"> | ||
| 157 | + <input type="text" class="form-control" name="lateStartTime" id="lateStartTimeInput" placeholder="晚高峰开始时间"> | ||
| 158 | + <span class="help-block"> 格式:00:00 </span> | ||
| 159 | + </div> | ||
| 160 | + </div> | ||
| 161 | + | ||
| 162 | + <!-- 晚高峰结束时间 --> | ||
| 163 | + <div class="form-group"> | ||
| 164 | + <label class="control-label col-md-3"> 晚高峰结束时间: </label> | ||
| 165 | + <div class="col-md-4"> | ||
| 166 | + <input type="text" class="form-control" name="lateEndTime" id="lateEndTimeInput" placeholder="晚高峰结束时间"> | ||
| 167 | + <span class="help-block"> 格式:00:00 </span> | ||
| 168 | + </div> | ||
| 169 | + </div> | ||
| 170 | + | ||
| 171 | + <!-- 晚高峰上行行驶时间 --> | ||
| 172 | + <div class="form-group"> | ||
| 173 | + <label class="control-label col-md-3"> 晚高峰上行行驶时间: </label> | ||
| 174 | + <div class="col-md-4"> | ||
| 175 | + <input type="text" class="form-control" name="lateUpTime" id="lateUpTimeInput" placeholder="晚高峰上行行驶时间"> | ||
| 176 | + <span class="help-block"> 单位:分钟 </span> | ||
| 177 | + </div> | ||
| 178 | + </div> | ||
| 179 | + | ||
| 180 | + <!-- 晚高峰下行行驶时间 --> | ||
| 181 | + <div class="form-group"> | ||
| 182 | + <label class="control-label col-md-3"> 晚高峰下行行驶时间: </label> | ||
| 183 | + <div class="col-md-4"> | ||
| 184 | + <input type="text" class="form-control" name="lateDownTime" id="lateDownTimeInput" placeholder="晚高峰下行行驶时间"> | ||
| 185 | + <span class="help-block"> 单位:分钟 </span> | ||
| 186 | + </div> | ||
| 187 | + </div> | ||
| 188 | + | ||
| 189 | + <!-- 小夜高峰上行行驶时间 --> | ||
| 190 | + <div class="form-group"> | ||
| 191 | + <label class="control-label col-md-3"> 小夜高峰上行行驶时间: </label> | ||
| 192 | + <div class="col-md-4"> | ||
| 193 | + <input type="text" class="form-control" name="nightStartTime" id="nightStartTimeInput" placeholder="小夜高峰上行行驶时间"> | ||
| 194 | + <span class="help-block"> 单位:分钟 </span> | ||
| 195 | + </div> | ||
| 196 | + </div> | ||
| 197 | + | ||
| 198 | + <!-- 小夜高峰下行行驶时间 --> | ||
| 199 | + <div class="form-group"> | ||
| 200 | + <label class="control-label col-md-3"> 小夜高峰下行行驶时间: </label> | ||
| 201 | + <div class="col-md-4"> | ||
| 202 | + <input type="text" class="form-control" name="nightEndTime" id="nightEndTimeInput" placeholder="晚高峰下行行驶时间"> | ||
| 203 | + <span class="help-block"> 单位:分钟 </span> | ||
| 204 | + </div> | ||
| 205 | + </div> | ||
| 206 | + | ||
| 207 | + <!-- 低谷上行行驶时间 --> | ||
| 208 | + <div class="form-group"> | ||
| 209 | + <label class="control-label col-md-3"> 低谷上行行驶时间: </label> | ||
| 210 | + <div class="col-md-4"> | ||
| 211 | + <input type="text" class="form-control" name="troughUpTime" id="troughUpTimeInput" placeholder="低谷上行行驶时间"> | ||
| 212 | + <span class="help-block"> 单位:分钟 </span> | ||
| 213 | + </div> | ||
| 214 | + </div> | ||
| 215 | + | ||
| 216 | + <!-- 低谷下行行驶时间 --> | ||
| 217 | + <div class="form-group"> | ||
| 218 | + <label class="control-label col-md-3"> 低谷下行行驶时间: </label> | ||
| 219 | + <div class="col-md-4"> | ||
| 220 | + <input type="text" class="form-control" name="troughDownTime" id="troughDownTimeInput" placeholder="低谷下行行驶时间"> | ||
| 221 | + <span class="help-block"> 单位:分钟 </span> | ||
| 222 | + </div> | ||
| 223 | + </div> | ||
| 224 | + | ||
| 225 | + <!-- 停车场 --> | ||
| 226 | + <div class="form-group"> | ||
| 227 | + <label class="control-label col-md-3"> 停车场 : </label> | ||
| 228 | + <div class="col-md-4"> | ||
| 229 | + <input type="text" class="form-control" name="carPark" id="carParkInput" placeholder="停车场"> | ||
| 230 | + </div> | ||
| 231 | + </div> | ||
| 232 | + | ||
| 233 | + <!-- 进场时间 --> | ||
| 234 | + <div class="form-group"> | ||
| 235 | + <label class="control-label col-md-3"> 进场时间 : </label> | ||
| 236 | + <div class="col-md-4"> | ||
| 237 | + <input type="text" class="form-control" name="paradeTime" id="paradeTimeInput" placeholder="进场时间"> | ||
| 238 | + <span class="help-block"> 描述:起点至停车场的时间 </span> | ||
| 239 | + </div> | ||
| 240 | + </div> | ||
| 241 | + | ||
| 242 | + <!-- 出场时间 --> | ||
| 243 | + <div class="form-group"> | ||
| 244 | + <label class="control-label col-md-3"> 出场时间 : </label> | ||
| 245 | + <div class="col-md-4"> | ||
| 246 | + <input type="text" class="form-control" name="outTime" id="outTimeInput" placeholder="出场时间"> | ||
| 247 | + <span class="help-block"> 描述:停车场至起点的时间 </span> | ||
| 248 | + </div> | ||
| 249 | + </div> | ||
| 250 | + | ||
| 251 | + <!-- 进场里程 --> | ||
| 252 | + <div class="form-group"> | ||
| 253 | + <label class="control-label col-md-3"> 进场里程 : </label> | ||
| 254 | + <div class="col-md-4"> | ||
| 255 | + <input type="text" class="form-control" name="paradeMileage" id="paradeMileageInput" placeholder="进场里程"> | ||
| 256 | + <span class="help-block"> 描述:起点至停车场的里程 </span> | ||
| 257 | + </div> | ||
| 258 | + </div> | ||
| 259 | + | ||
| 260 | + <!-- 出场里程 --> | ||
| 261 | + <div class="form-group"> | ||
| 262 | + <label class="control-label col-md-3"> 出场里程: </label> | ||
| 263 | + <div class="col-md-4"> | ||
| 264 | + <input type="text" class="form-control" name="outMileage" id="outMileageInput" placeholder="出场里程"> | ||
| 265 | + <span class="help-block"> 描述:停车场至起点的里程 </span> | ||
| 266 | + </div> | ||
| 267 | + </div> | ||
| 268 | + | ||
| 269 | + <!-- 早高峰大间隔 --> | ||
| 270 | + <div class="form-group"> | ||
| 271 | + <label class="control-label col-md-3"> 早高峰大间隔: </label> | ||
| 272 | + <div class="col-md-4"> | ||
| 273 | + <input type="text" class="form-control" name="earlyIntervalLg" id="earlyIntervalLgInput" placeholder="早高峰大间隔"> | ||
| 274 | + </div> | ||
| 275 | + </div> | ||
| 276 | + | ||
| 277 | + <!-- 晚高峰大间隔 --> | ||
| 278 | + <div class="form-group"> | ||
| 279 | + <label class="control-label col-md-3"> 晚高峰大间隔: </label> | ||
| 280 | + <div class="col-md-4"> | ||
| 281 | + <input type="text" class="form-control" name="lateIntervalLg" id="lateIntervalLgInput" placeholder="晚高峰大间隔"> | ||
| 282 | + </div> | ||
| 283 | + </div> | ||
| 284 | + | ||
| 285 | + <!-- 平时大间隔 --> | ||
| 286 | + <div class="form-group"> | ||
| 287 | + <label class="control-label col-md-3"> 平时大间隔: </label> | ||
| 288 | + <div class="col-md-4"> | ||
| 289 | + <input type="text" class="form-control" name="intervalLg" id="intervalLgInput" placeholder="平时大间隔"> | ||
| 290 | + </div> | ||
| 291 | + </div> | ||
| 292 | + | ||
| 293 | + <!-- 限速(平时) --> | ||
| 294 | + <div class="form-group"> | ||
| 295 | + <label class="control-label col-md-3"> 限速(平时): </label> | ||
| 296 | + <div class="col-md-4"> | ||
| 297 | + <input type="text" class="form-control" name="speedLimit" id="speedLimitInput" placeholder="限速(平时)"> | ||
| 298 | + </div> | ||
| 299 | + </div> | ||
| 300 | + | ||
| 301 | + <!-- 限速(雨天) --> | ||
| 302 | + <div class="form-group"> | ||
| 303 | + <label class="control-label col-md-3"> 限速(雨天): </label> | ||
| 304 | + <div class="col-md-4"> | ||
| 305 | + <input type="text" class="form-control" name="rainLimit" id="rainLimitInput" placeholder="限速(雨天)"> | ||
| 306 | + </div> | ||
| 307 | + </div> | ||
| 308 | + | ||
| 309 | + <!-- 限速(大雾) --> | ||
| 310 | + <div class="form-group"> | ||
| 311 | + <label class="control-label col-md-3"> 限速(大雾): </label> | ||
| 312 | + <div class="col-md-4"> | ||
| 313 | + <input type="text" class="form-control" name="fogLimit" id="fogLimitInput" placeholder="限速(大雾)"> | ||
| 314 | + </div> | ||
| 315 | + </div> | ||
| 316 | + | ||
| 317 | + <!-- 限速(冰雪) --> | ||
| 318 | + <div class="form-group"> | ||
| 319 | + <label class="control-label col-md-3"> 限速(冰雪): </label> | ||
| 320 | + <div class="col-md-4"> | ||
| 321 | + <input type="text" class="form-control" name="snowLimit" id="snowLimitInput" placeholder="限速(冰雪)"> | ||
| 322 | + </div> | ||
| 323 | + </div> | ||
| 324 | + | ||
| 325 | + <!-- 限速(节庆) --> | ||
| 326 | + <div class="form-group"> | ||
| 327 | + <label class="control-label col-md-3"> 限速(节庆): </label> | ||
| 328 | + <div class="col-md-4"> | ||
| 329 | + <input type="text" class="form-control" name="festivalSpeedLimit" id="festivalSpeedLimitInput" placeholder="限速(节庆)"> | ||
| 330 | + </div> | ||
| 331 | + </div> | ||
| 332 | + | ||
| 333 | + <!-- 滞站 --> | ||
| 334 | + <div class="form-group"> | ||
| 335 | + <label class="control-label col-md-3"> 滞站: </label> | ||
| 336 | + <div class="col-md-4"> | ||
| 337 | + <input type="text" class="form-control" name="lagStation" id="lagStationInput" placeholder="滞站"> | ||
| 338 | + </div> | ||
| 339 | + </div> | ||
| 340 | + | ||
| 341 | + <!-- 越站 --> | ||
| 342 | + <div class="form-group"> | ||
| 343 | + <label class="control-label col-md-3"> 越站: </label> | ||
| 344 | + <div class="col-md-4"> | ||
| 345 | + <input type="text" class="form-control" name="Skip" id="SkipInput" placeholder="越站"> | ||
| 346 | + </div> | ||
| 347 | + </div> | ||
| 348 | + | ||
| 349 | + <!-- 超速 --> | ||
| 350 | + <div class="form-group"> | ||
| 351 | + <label class="control-label col-md-3"> 超速: </label> | ||
| 352 | + <div class="col-md-4"> | ||
| 353 | + <input type="text" class="form-control" name="speeding" id="speedingInput" placeholder="超速"> | ||
| 354 | + </div> | ||
| 355 | + </div> | ||
| 356 | + | ||
| 357 | + <!-- 串线 --> | ||
| 358 | + <div class="form-group"> | ||
| 359 | + <label class="control-label col-md-3"> 串线: </label> | ||
| 360 | + <div class="col-md-4"> | ||
| 361 | + <input type="text" class="form-control" name="crossedLine" id="crossedLineInput" placeholder="串线"> | ||
| 362 | + </div> | ||
| 363 | + </div> | ||
| 364 | + | ||
| 365 | + <!-- 越界 --> | ||
| 366 | + <div class="form-group"> | ||
| 367 | + <label class="control-label col-md-3"> 越界: </label> | ||
| 368 | + <div class="col-md-4"> | ||
| 369 | + <input type="text" class="form-control" name="overflights" id="overflightsInput" placeholder="越界"> | ||
| 370 | + </div> | ||
| 371 | + </div> | ||
| 372 | + | ||
| 373 | + <!-- 描述/说明 --> | ||
| 374 | + <div class="form-group"> | ||
| 375 | + <label class="col-md-3 control-label">描述/说明:</label> | ||
| 376 | + <div class="col-md-4"> | ||
| 377 | + <textarea class="form-control" rows="3" name="descriptions" id="descriptionsInput" placeholder="描述/说明"></textarea> | ||
| 378 | + </div> | ||
| 379 | + </div> | ||
| 380 | + </div> | ||
| 381 | + <div class="form-actions"> | ||
| 382 | + <div class="row"> | ||
| 383 | + <div class="col-md-offset-3 col-md-4"> | ||
| 384 | + <button type="submit" class="btn green" ><i class="fa fa-check"></i> 提交</button> | ||
| 385 | + <a type="button" class="btn default lineinformation_back" href="lineinformation.html" data-pjax><i class="fa fa-times"></i> 取消</a> | ||
| 386 | + </div> | ||
| 387 | + </div> | ||
| 388 | + </div> | ||
| 389 | + </form> | ||
| 390 | + </div> | ||
| 391 | +</div> | ||
| 392 | +<script src="/pages/base/line/js/lineinformation-add-form.js"></script> | ||
| 0 | \ No newline at end of file | 393 | \ No newline at end of file |
src/main/resources/static/pages/base/line/list.html
| @@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
| 20 | </div> | 20 | </div> |
| 21 | <div class="actions"> | 21 | <div class="actions"> |
| 22 | <div class="btn-group btn-group-devided" data-toggle="buttons"> | 22 | <div class="btn-group btn-group-devided" data-toggle="buttons"> |
| 23 | - <a class="btn btn-circle blue" href="add_.html" data-pjax><i class="fa fa-plus"></i> 添加线路</a> | 23 | + <a class="btn btn-circle blue" href="add.html" data-pjax><i class="fa fa-plus"></i> 添加线路</a> |
| 24 | </div> | 24 | </div> |
| 25 | </div> | 25 | </div> |
| 26 | </div> | 26 | </div> |
| @@ -32,13 +32,13 @@ | @@ -32,13 +32,13 @@ | ||
| 32 | <th width="3%">#</th> | 32 | <th width="3%">#</th> |
| 33 | <th width="8%">线路编码</th> | 33 | <th width="8%">线路编码</th> |
| 34 | <th width="8%">线路名称</th> | 34 | <th width="8%">线路名称</th> |
| 35 | - <th width="8%">配车总数</th> | ||
| 36 | - <th width="8%">停车场编码</th> | ||
| 37 | - <th width="8%">起始站名称</th> | ||
| 38 | - <th width="8%">终点站名称</th> | ||
| 39 | - <th width="8%">所属分公司</th> | ||
| 40 | - <th width="8%">所属公司</th> | ||
| 41 | - <th width="8%">运营状态</th> | 35 | + <th width="10%">所属公司</th> |
| 36 | + <th width="10%">所属分公司</th> | ||
| 37 | + <th width="10%">线路性质</th> | ||
| 38 | + <th width="10%">线路等级</th> | ||
| 39 | + <th width="7%">上海市线路编码</th> | ||
| 40 | + <th width="10%">是否撤销</th> | ||
| 41 | + <th width="8%">线路标准</th> | ||
| 42 | <th width="15%">操作</th> | 42 | <th width="15%">操作</th> |
| 43 | </tr> | 43 | </tr> |
| 44 | <tr role="row" class="filter"> | 44 | <tr role="row" class="filter"> |
| @@ -50,22 +50,36 @@ | @@ -50,22 +50,36 @@ | ||
| 50 | <input type="text" class="form-control form-filter input-sm" name="name"> | 50 | <input type="text" class="form-control form-filter input-sm" name="name"> |
| 51 | </td> | 51 | </td> |
| 52 | <td> | 52 | <td> |
| 53 | - <input type="text" class="form-control form-filter input-sm" name="carSumNumber"> | 53 | + <select name="company" class="form-control" id="companySelect"></select> |
| 54 | </td> | 54 | </td> |
| 55 | <td> | 55 | <td> |
| 56 | - <input type="text" class="form-control form-filter input-sm" name="carParkCode"> | 56 | + <select name="brancheCompany" class="form-control" id="brancheCompanySelect"></select> |
| 57 | </td> | 57 | </td> |
| 58 | <td> | 58 | <td> |
| 59 | - <input type="text" class="form-control form-filter input-sm" name="startStationName"> | 59 | + <select name="nature" class="form-control" id="natureSelect"> |
| 60 | + <option value="">请选择...</option> | ||
| 61 | + <option value="lj">路救</option> | ||
| 62 | + <option value="bc">备车</option> | ||
| 63 | + <option value="dbc">定班车</option> | ||
| 64 | + <option value="yxl">夜宵路</option> | ||
| 65 | + <option value="cgxl">常规线路</option> | ||
| 66 | + <option value="gjxl">过江线路</option> | ||
| 67 | + <option value="csbs">穿梭巴士</option> | ||
| 68 | + <option value="tyxl">特约线路</option> | ||
| 69 | + <option value="cctxl">村村通线路</option> | ||
| 70 | + <option value="qt">其他</option> | ||
| 71 | + </select> | ||
| 60 | </td> | 72 | </td> |
| 61 | <td> | 73 | <td> |
| 62 | - <input type="text" class="form-control form-filter input-sm" name="endStationName"> | 74 | + <select name="level" class="form-control" id="levelSelect"> |
| 75 | + <option value="">请选择...</option> | ||
| 76 | + <option value="1">一级线路</option> | ||
| 77 | + <option value="2">二级线路</option> | ||
| 78 | + <option value="0">未知等级</option> | ||
| 79 | + </select> | ||
| 63 | </td> | 80 | </td> |
| 64 | <td> | 81 | <td> |
| 65 | - <input type="text" class="form-control form-filter input-sm" name="brancheCompany"> | ||
| 66 | - </td> | ||
| 67 | - <td> | ||
| 68 | - <input type="text" class="form-control form-filter input-sm" name="company"> | 82 | + <input type="text" class="form-control form-filter input-sm" name="shanghaiLinecode"> |
| 69 | </td> | 83 | </td> |
| 70 | <td> | 84 | <td> |
| 71 | <select class="form-control form-filter " name="destroy"> | 85 | <select class="form-control form-filter " name="destroy"> |
| @@ -75,6 +89,8 @@ | @@ -75,6 +89,8 @@ | ||
| 75 | </select> | 89 | </select> |
| 76 | </td> | 90 | </td> |
| 77 | <td> | 91 | <td> |
| 92 | + </td> | ||
| 93 | + <td> | ||
| 78 | <button class="btn btn-sm green btn-outline filter-submit margin-bottom" > | 94 | <button class="btn btn-sm green btn-outline filter-submit margin-bottom" > |
| 79 | <i class="fa fa-search"></i> 搜索 | 95 | <i class="fa fa-search"></i> 搜索 |
| 80 | </button> | 96 | </button> |
| @@ -108,28 +124,29 @@ | @@ -108,28 +124,29 @@ | ||
| 108 | {{obj.name}} | 124 | {{obj.name}} |
| 109 | </td> | 125 | </td> |
| 110 | <td> | 126 | <td> |
| 111 | - {{obj.carSumNumber}} | 127 | + {{obj.company}} |
| 112 | </td> | 128 | </td> |
| 113 | <td> | 129 | <td> |
| 114 | - {{obj.carParkCode}} | 130 | + {{obj.brancheCompany}} |
| 115 | </td> | 131 | </td> |
| 116 | <td> | 132 | <td> |
| 117 | - {{obj.startStationName}} | 133 | + {{obj.nature}} |
| 118 | </td> | 134 | </td> |
| 119 | <td> | 135 | <td> |
| 120 | - {{obj.endStationName}} | 136 | + {{obj.level}} |
| 121 | </td> | 137 | </td> |
| 122 | <td> | 138 | <td> |
| 123 | - {{obj.company}} | 139 | + {{obj.shanghaiLinecode}} |
| 124 | </td> | 140 | </td> |
| 125 | <td> | 141 | <td> |
| 126 | - {{obj.brancheCompany}} | 142 | + {{obj.destroy}} |
| 127 | </td> | 143 | </td> |
| 128 | <td> | 144 | <td> |
| 129 | - {{obj.destroy}} | 145 | + <a href="lineinformation/lineinformation.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 查看 </a> |
| 130 | </td> | 146 | </td> |
| 131 | <td> | 147 | <td> |
| 132 | - <a href="edit.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 详细 </a> | 148 | + <a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 详细 </a> |
| 149 | + <a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 修改 </a> | ||
| 133 | </td> | 150 | </td> |
| 134 | </tr> | 151 | </tr> |
| 135 | {{/each}} | 152 | {{/each}} |
| @@ -139,4 +156,4 @@ | @@ -139,4 +156,4 @@ | ||
| 139 | </tr> | 156 | </tr> |
| 140 | {{/if}} | 157 | {{/if}} |
| 141 | </script> | 158 | </script> |
| 142 | -<script src="/pages/base/line/js/list.js"></script> | ||
| 143 | \ No newline at end of file | 159 | \ No newline at end of file |
| 160 | +<script src="/pages/base/line/js/line-list-table.js"></script> | ||
| 144 | \ No newline at end of file | 161 | \ No newline at end of file |