Commit 129c2ac38c2dd73a1098793ea3965ee510d1f5ad
1 parent
3ffdbbf2
bf
Showing
14 changed files
with
111 additions
and
274 deletions
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/controller/BsthTLineAddController.java
| ... | ... | @@ -109,7 +109,9 @@ public class BsthTLineAddController extends BaseController |
| 109 | 109 | return ajaxResult; |
| 110 | 110 | } |
| 111 | 111 | //不存在新增 |
| 112 | - BsthTLine bl=bsthTLineService.selectBsthTLineExamineByLineName(bsthTLine.getLineName()); | |
| 112 | + BsthTLine bl=new BsthTLine(); | |
| 113 | + bl.setLineName(bsthTLine.getLineName()); | |
| 114 | + bl=bsthTLineService.selectBsthTLineExamineByLineName(bl); | |
| 113 | 115 | if(bl==null){ |
| 114 | 116 | bsthTLine.setLineUpdateType("3"); |
| 115 | 117 | return toAjax(bsthTLineService.insertBsthTLineExamine(bsthTLine)); |
| ... | ... | @@ -142,11 +144,8 @@ public class BsthTLineAddController extends BaseController |
| 142 | 144 | @ResponseBody |
| 143 | 145 | public AjaxResult editSave(BsthTLine bsthTLine) |
| 144 | 146 | { |
| 145 | - | |
| 146 | 147 | User loginUser = ShiroUtils.getSysUser(); |
| 147 | 148 | bsthTLine.setUpdateBy(loginUser.getUserName()); |
| 148 | - bsthTLine.setLineUpdateType("3"); | |
| 149 | - bsthTLine.setExamineStatus("0"); | |
| 150 | 149 | return toAjax(bsthTLineService.updateBsthTLineExamine(bsthTLine)); |
| 151 | 150 | } |
| 152 | 151 | |
| ... | ... | @@ -165,9 +164,9 @@ public class BsthTLineAddController extends BaseController |
| 165 | 164 | |
| 166 | 165 | @PostMapping( "/isExist") |
| 167 | 166 | @ResponseBody |
| 168 | - public AjaxResult isExist(String lineName) | |
| 167 | + public AjaxResult isExist(BsthTLine bsthTLine) | |
| 169 | 168 | { |
| 170 | - BsthTLine bsthTLine=bsthTLineService.selectBsthTLineExamineByLineName(lineName); | |
| 169 | + bsthTLine=bsthTLineService.selectBsthTLineExamineByLineName(bsthTLine); | |
| 171 | 170 | AjaxResult ajaxResult=new AjaxResult(); |
| 172 | 171 | Long id=bsthTLine!=null?bsthTLine.getId():null; |
| 173 | 172 | ajaxResult.put("id",id); | ... | ... |
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/controller/BsthTLineController.java
| ... | ... | @@ -241,7 +241,7 @@ public class BsthTLineController extends BaseController |
| 241 | 241 | |
| 242 | 242 | bsthTLine.setLineName(name); |
| 243 | 243 | BsthTLine bsthTLineOld=bsthTLineService.selectBsthTLineList(bsthTLine).get(0); |
| 244 | - BsthTLine bsthTLineNew=bsthTLineService.selectBsthTLineExamineByLineName(name); | |
| 244 | + BsthTLine bsthTLineNew=bsthTLineService.selectBsthTLineExamineByLineName(bsthTLine); | |
| 245 | 245 | List<BsthTLine> bsthTLines=new ArrayList<>(); |
| 246 | 246 | bsthTLines.add(bsthTLineOld); |
| 247 | 247 | bsthTLines.add(bsthTLineNew); | ... | ... |
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/controller/BsthTLineExamineController.java
| 1 | 1 | package com.ruoyi.project.system.line.controller; |
| 2 | 2 | |
| 3 | 3 | |
| 4 | +import com.ruoyi.framework.aspectj.lang.annotation.Log; | |
| 5 | +import com.ruoyi.framework.aspectj.lang.enums.BusinessType; | |
| 4 | 6 | import com.ruoyi.framework.web.controller.BaseController; |
| 5 | 7 | import com.ruoyi.framework.web.domain.AjaxResult; |
| 6 | 8 | import com.ruoyi.framework.web.page.TableDataInfo; |
| ... | ... | @@ -95,158 +97,10 @@ public class BsthTLineExamineController extends BaseController |
| 95 | 97 | } |
| 96 | 98 | |
| 97 | 99 | |
| 98 | - /* @GetMapping("/getListForMap") | |
| 99 | - @ResponseBody | |
| 100 | - public List<BsthTLine> getListForMap() { | |
| 101 | - return bsthTLineService.selectBsthTLineList(null); | |
| 102 | - } | |
| 103 | - | |
| 104 | - *//** | |
| 105 | - * 导出【请填写功能名称】列表 | |
| 106 | - *//* | |
| 107 | - @RequiresPermissions("system:line:export") | |
| 108 | - @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) | |
| 109 | - @PostMapping("/export") | |
| 110 | - @ResponseBody | |
| 111 | - public AjaxResult export(BsthTLine bsthTLine) throws NoSuchFieldException { | |
| 112 | - | |
| 113 | - List<BsthTLine> list = bsthTLineService.selectBsthTLineList(bsthTLine); | |
| 114 | - | |
| 115 | - List<DictData> dicts = dictDataService.selectDictDataList(null); | |
| 116 | - | |
| 117 | - Map<String,List<DictData>> dictMap = new HashMap(); | |
| 118 | - | |
| 119 | - List<String> titles=new ArrayList<>(); | |
| 120 | - | |
| 121 | - for(DictData d : dicts) { | |
| 122 | - | |
| 123 | - if(dictMap.get(d.getDictType()) == null) { | |
| 124 | - dictMap.put(d.getDictType(), new ArrayList<DictData>()); | |
| 125 | - } | |
| 126 | - | |
| 127 | - dictMap.get(d.getDictType()).add(d); | |
| 128 | - } | |
| 129 | - | |
| 130 | - for(BsthTLine line:list) { | |
| 131 | - | |
| 132 | - Field[] field = line.getClass().getDeclaredFields(); | |
| 133 | - | |
| 134 | - String isWarrant=bsthTLine.getIsWarrant(); | |
| 135 | - if("0".equals(isWarrant)){//现实 | |
| 136 | - for (Field f : field) { | |
| 137 | - String fName=f.getName(); | |
| 138 | - if(!"isWarrantStartTime".equals(fName) && !"isWarrantEndTime".equals(fName) && !"warrantVehiclesLarge".equals(fName) && !"warrantVehiclesMiddle".equals(fName) && !"number_of_manage".equals(fName)){ | |
| 139 | - titles.add(fName); | |
| 140 | - } | |
| 141 | - } | |
| 142 | - }else if("1".equals(isWarrant)){//权证 | |
| 143 | - for (Field f : field) { | |
| 144 | - String fName=f.getName(); | |
| 145 | - if(!"vehiclesNumber".equals(fName) && !"numberVehiclesLarge".equals(fName) && !"numberVehiclesMiddle".equals(fName) ){ | |
| 146 | - titles.add(fName); | |
| 147 | - } | |
| 148 | - } | |
| 149 | - } | |
| 150 | - | |
| 151 | - | |
| 152 | - for(int j=0 ; j<field.length ; j++){ //遍历所有属性 | |
| 153 | - String name = field[j].getName(); //获取属性的名字 | |
| 154 | - | |
| 155 | - String type = name; | |
| 156 | - | |
| 157 | - if(name.equals( "isLogicDelete") || name.equals( "inoutDistrict")|| name.equals( "isMetro") || name.equals( "hasTimelists")|| name.equals( "isWarrant")) { | |
| 158 | - type = "trueFalse"; | |
| 159 | - } | |
| 160 | - | |
| 161 | - | |
| 162 | - | |
| 163 | - | |
| 164 | - | |
| 165 | - if(dictMap.get(type) != null) { | |
| 166 | - name = name.substring(0,1).toUpperCase() + name.substring(1); | |
| 167 | - | |
| 168 | - | |
| 169 | - try { | |
| 170 | - Method param = line.getClass().getMethod("get"+name); | |
| 171 | - | |
| 172 | - String value = (String) param.invoke(line); | |
| 173 | - | |
| 174 | - if(value != null && value.split(",").length > 0) { | |
| 175 | - String result = ""; | |
| 176 | - for(String str:value.split(",")) { | |
| 177 | - for(DictData d:dictMap.get(type)) { | |
| 178 | - if(d.getDictValue().equals(str)) { | |
| 179 | - result += d.getDictLabel() + ","; | |
| 180 | - } | |
| 181 | - } | |
| 182 | - } | |
| 183 | - | |
| 184 | - Method m = line.getClass().getMethod("set"+name, new Class[] {String.class}); | |
| 185 | - | |
| 186 | - if(!result.isEmpty()) { | |
| 187 | - m.invoke(line,new Object[] {new String(result.substring(0,result.length()-1))}); | |
| 188 | - }else { | |
| 189 | - m.invoke(line,new Object[] {new String(value)}); | |
| 190 | - } | |
| 191 | - } | |
| 192 | - | |
| 193 | - } catch (Exception e) { | |
| 194 | - // TODO Auto-generated catch block | |
| 195 | - e.printStackTrace(); | |
| 196 | - } | |
| 197 | - | |
| 198 | - } | |
| 199 | - | |
| 200 | - | |
| 201 | - | |
| 202 | - } | |
| 203 | - | |
| 204 | - | |
| 205 | - } | |
| 206 | - | |
| 207 | - | |
| 208 | - ExcelUtil<BsthTLine> util = new ExcelUtil<BsthTLine>(BsthTLine.class); | |
| 209 | - util.setTitles(titles); | |
| 210 | - return util.exportExcel(list, "line"); | |
| 211 | - } | |
| 212 | - | |
| 213 | - | |
| 214 | - | |
| 215 | - | |
| 216 | - | |
| 217 | - @GetMapping("/getUserLineInfo") | |
| 100 | + @PostMapping( "/remove") | |
| 218 | 101 | @ResponseBody |
| 219 | - public AjaxResult getUserLineInfo() | |
| 102 | + public AjaxResult remove(String ids) | |
| 220 | 103 | { |
| 221 | - User loginUser = ShiroUtils.getSysUser(); | |
| 222 | - | |
| 223 | - loginUser = userService.selectUserById(loginUser.getUserId()); | |
| 224 | - | |
| 225 | - return success(loginUser.getLineinfoData()); | |
| 104 | + return toAjax(bsthTLineService.deleteBsthTLineExamineById(ids)); | |
| 226 | 105 | } |
| 227 | - | |
| 228 | - | |
| 229 | - | |
| 230 | - @PostMapping("/findByName") | |
| 231 | - @ResponseBody | |
| 232 | - public BsthTLine findByName(String name) | |
| 233 | - { | |
| 234 | - BsthTLine bsthTLine = new BsthTLine(); | |
| 235 | - | |
| 236 | - bsthTLine.setLineName(name); | |
| 237 | - | |
| 238 | - return bsthTLineService.selectBsthTLineList(bsthTLine).get(0); | |
| 239 | - } | |
| 240 | - | |
| 241 | - @PostMapping("/updateUserLineInfo") | |
| 242 | - @ResponseBody | |
| 243 | - public AjaxResult updateUserLineInfo(String lineInfo) | |
| 244 | - { | |
| 245 | - User loginUser = ShiroUtils.getSysUser(); | |
| 246 | - | |
| 247 | - loginUser.setLineinfoData(lineInfo); | |
| 248 | - | |
| 249 | - return toAjax(userService.updateUser(loginUser)); | |
| 250 | - }*/ | |
| 251 | - | |
| 252 | 106 | } | ... | ... |
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/controller/BsthTLineHistoryController.java
| ... | ... | @@ -86,8 +86,9 @@ public class BsthTLineHistoryController extends BaseController |
| 86 | 86 | public String edit(@PathVariable("id") Long id, ModelMap mmap) |
| 87 | 87 | { |
| 88 | 88 | BsthTLine bsthTLine = bsthTLineService.selectBsthTLineById(id); |
| 89 | - String lineName=bsthTLine.getLineName(); | |
| 90 | - BsthTLine bsthTLineExamine=bsthTLineService.selectBsthTLineExamineByLineName(lineName); | |
| 89 | + BsthTLine bl=new BsthTLine(); | |
| 90 | + bl.setLineName(bsthTLine.getLineName()); | |
| 91 | + BsthTLine bsthTLineExamine=bsthTLineService.selectBsthTLineExamineByLineName(bl); | |
| 91 | 92 | if(bsthTLineExamine!=null){ |
| 92 | 93 | bsthTLine=bsthTLineExamine; |
| 93 | 94 | } |
| ... | ... | @@ -110,9 +111,9 @@ public class BsthTLineHistoryController extends BaseController |
| 110 | 111 | AjaxResult ajaxResult; |
| 111 | 112 | User loginUser = ShiroUtils.getSysUser(); |
| 112 | 113 | bsthTLine.setUpdateBy(loginUser.getUserName()); |
| 113 | - String lineName=bsthTLine.getLineName(); | |
| 114 | - | |
| 115 | - BsthTLine bsthTLineExamine=bsthTLineService.selectBsthTLineExamineByLineName(lineName); | |
| 114 | + BsthTLine bl=new BsthTLine(); | |
| 115 | + bl.setLineName(bsthTLine.getLineName()); | |
| 116 | + BsthTLine bsthTLineExamine=bsthTLineService.selectBsthTLineExamineByLineName(bl); | |
| 116 | 117 | if(bsthTLineExamine!=null){//有没审核的直接覆盖 |
| 117 | 118 | bsthTLine.setId(bsthTLineExamine.getId()); |
| 118 | 119 | ajaxResult= toAjax(bsthTLineService.updateBsthTLineExamine(bsthTLine)); |
| ... | ... | @@ -120,8 +121,6 @@ public class BsthTLineHistoryController extends BaseController |
| 120 | 121 | bsthTLine.setExamineType("1"); |
| 121 | 122 | ajaxResult= toAjax(bsthTLineService.insertBsthTLineExamine(bsthTLine)); |
| 122 | 123 | } |
| 123 | - BsthTLine bl=new BsthTLine(); | |
| 124 | - bl.setLineName(lineName); | |
| 125 | 124 | bl.setUpdateStatus("1"); |
| 126 | 125 | |
| 127 | 126 | //重复提交删除上一次通过未执行的申请 | ... | ... |
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/mapper/BsthTLineMapper.java
| ... | ... | @@ -37,7 +37,7 @@ public interface BsthTLineMapper |
| 37 | 37 | |
| 38 | 38 | BsthTLine selectBsthTLineExamineById(Long id); |
| 39 | 39 | |
| 40 | - BsthTLine selectBsthTLineExamineByLineName(String lineName); | |
| 40 | + BsthTLine selectBsthTLineExamineByLineName(BsthTLine bsthTLine); | |
| 41 | 41 | |
| 42 | 42 | int updateBsthTLineExamine(BsthTLine bsthTLine); |
| 43 | 43 | ... | ... |
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/service/IBsthTLineService.java
| ... | ... | @@ -54,7 +54,7 @@ public interface IBsthTLineService |
| 54 | 54 | |
| 55 | 55 | int examine(BsthTLine bsthTLine); |
| 56 | 56 | |
| 57 | - BsthTLine selectBsthTLineExamineByLineName(String lineName); | |
| 57 | + BsthTLine selectBsthTLineExamineByLineName(BsthTLine bsthTLine); | |
| 58 | 58 | |
| 59 | 59 | boolean lineNameIsExist(String lineName); |
| 60 | 60 | ... | ... |
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/service/impl/BsthTLineServiceImpl.java
| ... | ... | @@ -400,9 +400,8 @@ public class BsthTLineServiceImpl implements IBsthTLineService |
| 400 | 400 | i=bsthTLineMapper.saveEditHistory(bsthTLine); |
| 401 | 401 | //删除审核表记录 |
| 402 | 402 | bsthTLineMapper.deleteBsthTLineExamineById(new String[]{id}); |
| 403 | - if(bsthTLine.getStartDate()==null){//未选时间立刻启用 | |
| 404 | - this.updateToLineInfo(bsthTLine.getId().toString()); | |
| 405 | - } | |
| 403 | + this.updateToLineInfo(bsthTLine.getId().toString()); | |
| 404 | + | |
| 406 | 405 | }else{//未通过 |
| 407 | 406 | //修改审核表状态 |
| 408 | 407 | bl=new BsthTLine(); |
| ... | ... | @@ -417,14 +416,16 @@ public class BsthTLineServiceImpl implements IBsthTLineService |
| 417 | 416 | } |
| 418 | 417 | |
| 419 | 418 | @Override |
| 420 | - public BsthTLine selectBsthTLineExamineByLineName(String lineName){ | |
| 421 | - return bsthTLineMapper.selectBsthTLineExamineByLineName(lineName); | |
| 419 | + public BsthTLine selectBsthTLineExamineByLineName(BsthTLine bsthTLine){ | |
| 420 | + return bsthTLineMapper.selectBsthTLineExamineByLineName(bsthTLine); | |
| 422 | 421 | } |
| 423 | 422 | |
| 424 | 423 | @Override |
| 425 | 424 | public boolean lineNameIsExist(String lineName) { |
| 426 | 425 | boolean flag=true; |
| 427 | - if(bsthTLineMapper.selectBsthTLineByLineName(lineName)!=null || bsthTLineMapper.selectBsthTLineExamineByLineName(lineName)!=null){ | |
| 426 | + BsthTLine bsthTLine=new BsthTLine(); | |
| 427 | + bsthTLine.setLineName(lineName); | |
| 428 | + if(bsthTLineMapper.selectBsthTLineByLineName(lineName)!=null || bsthTLineMapper.selectBsthTLineExamineByLineName(bsthTLine)!=null){ | |
| 428 | 429 | flag=false; |
| 429 | 430 | } |
| 430 | 431 | return flag; | ... | ... |
bsthLineProfiles/src/main/resources/mybatis/mybatis/system/BsthTLineMapper.xml
| ... | ... | @@ -882,6 +882,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 882 | 882 | resultMap="BsthTLineResult"> |
| 883 | 883 | <include refid="selectBsthTLineExamineVo" /> |
| 884 | 884 | where line_name= #{lineName} |
| 885 | + <if test="examineType != null "> and examine_type = #{examineType}</if> | |
| 885 | 886 | </select> |
| 886 | 887 | |
| 887 | 888 | ... | ... |
bsthLineProfiles/src/main/resources/templates/include.html
| ... | ... | @@ -16,6 +16,16 @@ |
| 16 | 16 | <link th:href="@{/css/animate.css}" rel="stylesheet" /> |
| 17 | 17 | <link th:href="@{/css/style.css?v=20200903}" rel="stylesheet" /> |
| 18 | 18 | <link th:href="@{/ruoyi/css/ry-ui.css?v=4.6.0}" rel="stylesheet" /> |
| 19 | + <style> | |
| 20 | + label.error { | |
| 21 | + position: absolute; | |
| 22 | + left: 40px; | |
| 23 | + top: 30px; | |
| 24 | + color: #ef392b; | |
| 25 | + font-size: 12px; | |
| 26 | + z-index: 99; | |
| 27 | + } | |
| 28 | + </style> | |
| 19 | 29 | </head> |
| 20 | 30 | |
| 21 | 31 | <!-- 通用JS --> | ... | ... |
bsthLineProfiles/src/main/resources/templates/system/lineAdd/add.html
| ... | ... | @@ -460,13 +460,12 @@ |
| 460 | 460 | </select> |
| 461 | 461 | </div> |
| 462 | 462 | <!----------------------------------> |
| 463 | - <!--<label class="col-sm-1 control-label">启用时间:</label> | |
| 463 | + <label class="col-sm-1 control-label">启用时间:</label> | |
| 464 | 464 | <div class="col-sm-2"> |
| 465 | 465 | <div class="input-group date"> |
| 466 | - <input name="startDate" class="form-control" placeholder="yyyy-MM-dd" type="text" autocomplete="off"> | |
| 467 | - <span class="input-group-addon"><i class="fa fa-calendar"></i></span> | |
| 466 | + <input name="startDate" type="text" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss"> | |
| 468 | 467 | </div> |
| 469 | - </div>--> | |
| 468 | + </div> | |
| 470 | 469 | <!----------------------------------> |
| 471 | 470 | <label class="col-sm-1 control-label">备注:</label> |
| 472 | 471 | <div class="col-sm-2"> |
| ... | ... | @@ -529,6 +528,13 @@ |
| 529 | 528 | return $('#isWarrant').val()==='1'; |
| 530 | 529 | }, |
| 531 | 530 | }, |
| 531 | + remark:{ | |
| 532 | + required:true, | |
| 533 | + }, | |
| 534 | + startDate:{ | |
| 535 | + required:true, | |
| 536 | + }, | |
| 537 | + | |
| 532 | 538 | }, |
| 533 | 539 | messages: { |
| 534 | 540 | isWarrantStartTime: { |
| ... | ... | @@ -536,6 +542,12 @@ |
| 536 | 542 | }, |
| 537 | 543 | isWarrantEndTime: { |
| 538 | 544 | required: "请选择日期", |
| 545 | + }, | |
| 546 | + remark: { | |
| 547 | + required: "请写入备注", | |
| 548 | + }, | |
| 549 | + startDate: { | |
| 550 | + required: "请选择时间", | |
| 539 | 551 | } |
| 540 | 552 | },focusCleanup: true |
| 541 | 553 | }); |
| ... | ... | @@ -589,8 +601,7 @@ |
| 589 | 601 | }); |
| 590 | 602 | |
| 591 | 603 | $("input[name='startDate']").datetimepicker({ |
| 592 | - format: "yyyy-mm-dd", | |
| 593 | - minView: "month", | |
| 604 | + format: "yyyy-mm-dd hh:ii:ss", | |
| 594 | 605 | autoclose: true |
| 595 | 606 | }); |
| 596 | 607 | |
| ... | ... | @@ -605,8 +616,9 @@ |
| 605 | 616 | autoclose: true |
| 606 | 617 | }); |
| 607 | 618 | |
| 619 | + | |
| 608 | 620 | function isExist(lineName){ |
| 609 | - var data={'lineName':lineName}; | |
| 621 | + var data={'lineName':lineName,'examineType':'0'}; | |
| 610 | 622 | $.post(prefix + "/isExist",data,function (result){ |
| 611 | 623 | if(result.id!=null){ |
| 612 | 624 | layer.confirm("是否修改上一次的记录",{ |
| ... | ... | @@ -651,7 +663,7 @@ |
| 651 | 663 | } |
| 652 | 664 | } |
| 653 | 665 | |
| 654 | - var index =parent.layer.open({ | |
| 666 | + var index=parent.layer.open({ | |
| 655 | 667 | type: 2, |
| 656 | 668 | area: [width + 'px', height + 'px'], |
| 657 | 669 | fix: false, |
| ... | ... | @@ -660,15 +672,21 @@ |
| 660 | 672 | shade: 0.3, |
| 661 | 673 | title: title, |
| 662 | 674 | content: url, |
| 663 | - btn: ['修改', '删除'], | |
| 675 | + btn: ['保存','提交','删除'], | |
| 664 | 676 | // 弹层外区域关闭 |
| 665 | 677 | shadeClose: true, |
| 666 | 678 | yes: callback, |
| 667 | - btn2: function(index, layero){ | |
| 679 | + btn2: function(index, layero) { | |
| 680 | + var iframeWin = layero.find('iframe')[0]; | |
| 681 | + iframeWin.contentWindow.submitHandlerCommit(index, layero); | |
| 682 | + return false; | |
| 683 | + }, | |
| 684 | + btn3: function(index, layero){ | |
| 668 | 685 | $.operate.remove(id) |
| 669 | 686 | } |
| 670 | 687 | }); |
| 671 | 688 | parent.layer.full(index); |
| 689 | + | |
| 672 | 690 | } |
| 673 | 691 | |
| 674 | 692 | ... | ... |
bsthLineProfiles/src/main/resources/templates/system/lineAdd/edit.html
| ... | ... | @@ -479,15 +479,12 @@ |
| 479 | 479 | </select> |
| 480 | 480 | </div> |
| 481 | 481 | <!----------------------------------> |
| 482 | - <!--<label class="col-sm-1 control-label">启用时间:</label> | |
| 482 | + <label class="col-sm-1 control-label">启用时间:</label> | |
| 483 | 483 | <div class="col-sm-2"> |
| 484 | 484 | <div class="input-group date"> |
| 485 | - <input name="startDate" th:value="${#dates.format(bsthTLine.startDate, 'yyyy-MM-dd')}" | |
| 486 | - class="form-control" placeholder="yyyy-MM-dd" type="text" autocomplete="off"> | |
| 487 | - <span class="input-group-addon"><i class="fa fa-calendar"></i></span> | |
| 485 | + <input name="startDate" type="text" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" th:value="${#dates.format(bsthTLine.startDate, 'yyyy-MM-dd HH:mm:ss')}"> | |
| 488 | 486 | </div> |
| 489 | - | |
| 490 | - </div>--> | |
| 487 | + </div> | |
| 491 | 488 | <!----------------------------------> |
| 492 | 489 | <label class="col-sm-1 control-label">备注:</label> |
| 493 | 490 | <div class="col-sm-2"> |
| ... | ... | @@ -544,68 +541,6 @@ |
| 544 | 541 | $(".file-input").before(obj); |
| 545 | 542 | |
| 546 | 543 | }); |
| 547 | - | |
| 548 | - /*$.get("/system/line/getUserLineInfo", | |
| 549 | - function(data) { | |
| 550 | - if (data.msg != null) { | |
| 551 | - var objs = JSON.parse(data.msg); | |
| 552 | - | |
| 553 | - for (var i = 0; i < objs.length; i++) { | |
| 554 | - | |
| 555 | - if ($($("input[name=" + objs[i].name | |
| 556 | - + "]"))) { | |
| 557 | - if (objs[i].checked) { | |
| 558 | - getParent( | |
| 559 | - $($("input[name=" | |
| 560 | - + objs[i].name | |
| 561 | - + "]")), | |
| 562 | - "form-group").show(); | |
| 563 | - } else { | |
| 564 | - getParent( | |
| 565 | - $($("input[name=" | |
| 566 | - + objs[i].name | |
| 567 | - + "]")), | |
| 568 | - "form-group").hide(); | |
| 569 | - } | |
| 570 | - } | |
| 571 | - | |
| 572 | - if ($($("select[name=" + objs[i].name | |
| 573 | - + "]"))) { | |
| 574 | - if (objs[i].checked) { | |
| 575 | - getParent( | |
| 576 | - $($("select[name=" | |
| 577 | - + objs[i].name | |
| 578 | - + "]")), | |
| 579 | - "form-group").show(); | |
| 580 | - } else { | |
| 581 | - getParent( | |
| 582 | - $($("select[name=" | |
| 583 | - + objs[i].name | |
| 584 | - + "]")), | |
| 585 | - "form-group").hide(); | |
| 586 | - } | |
| 587 | - } | |
| 588 | - | |
| 589 | - if ($($("textarea[name=" + objs[i].name | |
| 590 | - + "]"))) { | |
| 591 | - if (objs[i].checked) { | |
| 592 | - getParent( | |
| 593 | - $($("textarea[name=" | |
| 594 | - + objs[i].name | |
| 595 | - + "]")), | |
| 596 | - "form-group").show(); | |
| 597 | - } else { | |
| 598 | - getParent( | |
| 599 | - $($("textarea[name=" | |
| 600 | - + objs[i].name | |
| 601 | - + "]")), | |
| 602 | - "form-group").hide(); | |
| 603 | - } | |
| 604 | - } | |
| 605 | - | |
| 606 | - } | |
| 607 | - } | |
| 608 | - });*/ | |
| 609 | 544 | }) |
| 610 | 545 | |
| 611 | 546 | function getParent(obj, className) { |
| ... | ... | @@ -630,6 +565,12 @@ |
| 630 | 565 | return $('#isWarrant').val()==='1'; |
| 631 | 566 | }, |
| 632 | 567 | }, |
| 568 | + remark:{ | |
| 569 | + required:true, | |
| 570 | + }, | |
| 571 | + startDate:{ | |
| 572 | + required:true, | |
| 573 | + } | |
| 633 | 574 | }, |
| 634 | 575 | messages: { |
| 635 | 576 | isWarrantStartTime: { |
| ... | ... | @@ -637,6 +578,12 @@ |
| 637 | 578 | }, |
| 638 | 579 | isWarrantEndTime: { |
| 639 | 580 | required: "请选择日期", |
| 581 | + }, | |
| 582 | + remark: { | |
| 583 | + required: "请写入备注", | |
| 584 | + }, | |
| 585 | + startDate: { | |
| 586 | + required: "请选择时间", | |
| 640 | 587 | } |
| 641 | 588 | }, |
| 642 | 589 | focusCleanup : true |
| ... | ... | @@ -650,8 +597,7 @@ |
| 650 | 597 | } |
| 651 | 598 | |
| 652 | 599 | if ($.validate.form()) { |
| 653 | - $.operate.save(prefix + "/edit", $('#form-line-edit') | |
| 654 | - .serialize()); | |
| 600 | + $.operate.save(prefix + "/edit", $('#form-line-edit').serialize()+'&examineStatus=0'); | |
| 655 | 601 | } |
| 656 | 602 | } |
| 657 | 603 | |
| ... | ... | @@ -698,9 +644,8 @@ |
| 698 | 644 | }); |
| 699 | 645 | |
| 700 | 646 | $("input[name='startDate']").datetimepicker({ |
| 701 | - format : "yyyy-mm-dd", | |
| 702 | - minView : "month", | |
| 703 | - autoclose : true | |
| 647 | + format: "yyyy-mm-dd hh:ii:ss", | |
| 648 | + autoclose: true | |
| 704 | 649 | }); |
| 705 | 650 | |
| 706 | 651 | $("input[name='isWarrantStartTime']").datetimepicker({ | ... | ... |
bsthLineProfiles/src/main/resources/templates/system/lineExamine/line.html
| ... | ... | @@ -23,14 +23,21 @@ |
| 23 | 23 | </li> |
| 24 | 24 | <li><label>线路名称:</label> <input type="text" name="lineName" /> |
| 25 | 25 | </li> |
| 26 | - <li ><label>申请开始:</label> | |
| 26 | + <li ><label>申请时间:</label> | |
| 27 | + <li class="select-time"> | |
| 28 | + <input type="text" class="time-input" id="createTimeStr" placeholder="开始时间" name="params[beginTime]" lay-key="1"> | |
| 29 | + <span>-</span> | |
| 30 | + <input type="text" class="time-input" id="createTimeEnd" placeholder="结束时间" name="params[endTime]" lay-key="2"> | |
| 31 | + </li> | |
| 32 | + </li> | |
| 33 | + <!--<li ><label>申请开始:</label> | |
| 27 | 34 | <input name="createTimeStr" id="createTimeStr" class="form-control" placeholder="yyyy-MM-dd" type="text" |
| 28 | 35 | autocomplete="off"> |
| 29 | 36 | </li> |
| 30 | 37 | <li><label>申请结束:</label> |
| 31 | 38 | <input name="createTimeEnd" id="createTimeEnd" class="form-control" placeholder="yyyy-MM-dd" type="text" |
| 32 | 39 | autocomplete="off"> |
| 33 | - </li> | |
| 40 | + </li>--> | |
| 34 | 41 | <li> |
| 35 | 42 | <el-button size="mini" type="primary" icon="el-icon-search" onClick="$.table.search();">搜索</el-button> |
| 36 | 43 | <el-button size="mini" icon="el-icon-refresh" onClick="$.form.reset();">重置</el-button> |
| ... | ... | @@ -166,8 +173,8 @@ |
| 166 | 173 | function queryParams(params) { |
| 167 | 174 | var search = $.table.queryParams(params); |
| 168 | 175 | search.examineStatus='1'; |
| 169 | - var createTimeStr=$('#createTimeStr').val(); | |
| 170 | - var createTimeEnd=$('#createTimeEnd').val(); | |
| 176 | + var createTimeStr=$('#createTimeStr').val()!=''?$('#createTimeStr').val()+' 23:59':''; | |
| 177 | + var createTimeEnd=$('#createTimeEnd').val()!=''?$('#createTimeEnd').val()+' 23:59':''; | |
| 171 | 178 | search.createTimeStr=createTimeStr; |
| 172 | 179 | search.createTimeEnd=createTimeEnd; |
| 173 | 180 | search.company=$('#company').select2('val'); |
| ... | ... | @@ -179,6 +186,7 @@ |
| 179 | 186 | var options = { |
| 180 | 187 | url: prefix + "/list", |
| 181 | 188 | detailUrl: prefix + "/detail/{id}", |
| 189 | + removeUrl: prefix + "/remove", | |
| 182 | 190 | queryParams: queryParams, |
| 183 | 191 | modalName: "线路档案信息审核", |
| 184 | 192 | columns: [], |
| ... | ... | @@ -381,21 +389,20 @@ |
| 381 | 389 | } |
| 382 | 390 | }); |
| 383 | 391 | }, |
| 384 | - btn2:function () { | |
| 385 | - var url=prefix+'/examine' | |
| 386 | - var data={'id':id,'examineType':examineType,'examineStatus':'1'} | |
| 387 | - $.post(url, data, function(result) { | |
| 388 | - if (result.code == web_status.SUCCESS) { | |
| 389 | - $.table.refresh(); | |
| 390 | - $.modal.alertSuccess(result.msg) | |
| 391 | - }else { | |
| 392 | - $.modal.alertError(result.msg); | |
| 393 | - } | |
| 394 | - }); | |
| 392 | + btn2: function(index, layero){ | |
| 393 | + remove(id) | |
| 395 | 394 | } |
| 396 | 395 | }); |
| 397 | 396 | layer.full(index); |
| 398 | 397 | } |
| 398 | + | |
| 399 | + function remove(id) { | |
| 400 | + table.set(); | |
| 401 | + var url = $.common.isEmpty(id) ? table.options.removeUrl : table.options.removeUrl.replace("{id}", id); | |
| 402 | + var data = { "ids": id }; | |
| 403 | + $.operate.submit(url, "post", "json", data); | |
| 404 | + } | |
| 405 | + | |
| 399 | 406 | $("input[name='createTimeStr']").datetimepicker({ |
| 400 | 407 | format: "yyyy-mm-dd", |
| 401 | 408 | minView: "month", | ... | ... |
bsthLineProfiles/src/main/resources/templates/system/lineHistory/edit.html
| ... | ... | @@ -681,7 +681,7 @@ |
| 681 | 681 | |
| 682 | 682 | function submitHandler() { |
| 683 | 683 | if ($.validate.form()) { |
| 684 | - $.operate.save(prefix + "/edit", $('#form-line-edit').serialize()); | |
| 684 | + $.operate.save(prefix + "/edit", $('#form-line-edit').serialize()+'&examineStatus=0'); | |
| 685 | 685 | } |
| 686 | 686 | } |
| 687 | 687 | function submitHandlerCommit() { | ... | ... |
bsthLineProfiles/src/main/resources/templates/system/lineHistory/historyCompare.html
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 | size="large" |
| 29 | 29 | :timestamp="line.startDate" @click.native="change(index);"> |
| 30 | 30 | {{line.lineUpdateType}}( |
| 31 | - {{line.startReason}}) | |
| 31 | + {{line.remark}}) | |
| 32 | 32 | </el-timeline-item> |
| 33 | 33 | </el-timeline> |
| 34 | 34 | </el-col> |
| ... | ... | @@ -812,6 +812,8 @@ |
| 812 | 812 | }, |
| 813 | 813 | methods: { |
| 814 | 814 | change(index) { |
| 815 | + this.tab='first';//每次点击默认选中第一个 | |
| 816 | + //变更前后数据不同标红 | |
| 815 | 817 | var l; |
| 816 | 818 | var ol; |
| 817 | 819 | if (index == 0) { |
| ... | ... | @@ -834,11 +836,12 @@ |
| 834 | 836 | } |
| 835 | 837 | } |
| 836 | 838 | } |
| 837 | - | |
| 839 | + //修改点击时间点的颜色 | |
| 838 | 840 | for (var i in this.lines) { |
| 839 | 841 | this.lines[i].timeLineType = "primary"; |
| 840 | 842 | } |
| 841 | 843 | this.lines[index].timeLineType = "success"; |
| 844 | + | |
| 842 | 845 | }, |
| 843 | 846 | |
| 844 | 847 | } | ... | ... |