Commit f95acdc44ba2487608334e18228d1d7b600380a9
1 parent
6a337488
服务热线系统报备功能
Showing
19 changed files
with
4015 additions
and
1 deletions
src/main/java/com/bsth/controller/realcontrol/ReportRegisterController.java
0 → 100644
| 1 | +package com.bsth.controller.realcontrol; | |
| 2 | + | |
| 3 | +import com.alibaba.fastjson.JSON; | |
| 4 | +import com.alibaba.fastjson.JSONObject; | |
| 5 | +import com.bsth.common.ResponseCode; | |
| 6 | +import com.bsth.controller.BaseController; | |
| 7 | +import com.bsth.data.report_register.ReportRegisterService; | |
| 8 | +import com.bsth.data.report_register.entity.ReportRegister; | |
| 9 | +import com.bsth.util.HttpClientUtils; | |
| 10 | +import org.apache.poi.ss.formula.functions.T; | |
| 11 | +import org.slf4j.Logger; | |
| 12 | +import org.slf4j.LoggerFactory; | |
| 13 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 14 | +import org.springframework.beans.propertyeditors.CustomDateEditor; | |
| 15 | +import org.springframework.web.bind.WebDataBinder; | |
| 16 | +import org.springframework.web.bind.annotation.InitBinder; | |
| 17 | +import org.springframework.web.bind.annotation.PathVariable; | |
| 18 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 19 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 20 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 21 | +import org.springframework.web.bind.annotation.RestController; | |
| 22 | +import org.springframework.web.context.request.WebRequest; | |
| 23 | + | |
| 24 | +import java.text.DateFormat; | |
| 25 | +import java.text.SimpleDateFormat; | |
| 26 | +import java.util.Date; | |
| 27 | +import java.util.HashMap; | |
| 28 | +import java.util.Map; | |
| 29 | + | |
| 30 | +/** | |
| 31 | + * 报备登记 | |
| 32 | + * Created by yrf on 2019/12/04. | |
| 33 | + */ | |
| 34 | +@RestController | |
| 35 | +@RequestMapping("reportRegister") | |
| 36 | +public class ReportRegisterController extends BaseController<ReportRegister, Long>{ | |
| 37 | + | |
| 38 | + Logger log = LoggerFactory.getLogger(this.getClass()); | |
| 39 | + | |
| 40 | +// final static String url = "http://114.80.178.13/complaint/TsReport/input.do"; | |
| 41 | + final static String url = "http://192.168.168.228:8080/complaint/TsReport/input.do"; | |
| 42 | + | |
| 43 | + @Autowired | |
| 44 | + ReportRegisterService reportRegisterService; | |
| 45 | + | |
| 46 | + @InitBinder | |
| 47 | + public void initBinder(WebDataBinder binder, WebRequest request) { | |
| 48 | + //转换日期 注意这里的转化要和传进来的字符串的格式一直 如2015-9-9 就应该为yyyy-MM-dd | |
| 49 | + DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |
| 50 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));// CustomDateEditor为自定义日期编辑器 | |
| 51 | + } | |
| 52 | + | |
| 53 | + | |
| 54 | + @RequestMapping(value = "/findList", method = RequestMethod.GET) | |
| 55 | + public Map<String, Object> findList(@RequestParam Map<String, String> map) { | |
| 56 | + return reportRegisterService.findList(map); | |
| 57 | + } | |
| 58 | + | |
| 59 | + @RequestMapping(value = "/{id}", method = RequestMethod.GET) | |
| 60 | + public ReportRegister findById(@PathVariable("id") Long id) { | |
| 61 | + ReportRegister reportRegister = reportRegisterService.findById(id); | |
| 62 | + return reportRegister; | |
| 63 | + } | |
| 64 | + | |
| 65 | + @RequestMapping(value = "/delete", method = RequestMethod.POST) | |
| 66 | + public Map<String, Object> deleteInfo(ReportRegister t) { | |
| 67 | + Map<String, Object> map = new HashMap<>(); | |
| 68 | + try{ | |
| 69 | +// map = baseService.delete(id); | |
| 70 | + reportRegisterService.deleteInfo(t); | |
| 71 | + String data = "{ID:'"+t.getID()+"', STATUS:'2'}"; | |
| 72 | + StringBuilder sb = HttpClientUtils.post(url,data); | |
| 73 | + JSONObject obj = JSON.parseObject(sb.toString()); | |
| 74 | + map.put("status2", obj); | |
| 75 | + } catch (Exception e) { | |
| 76 | + log.error(e.toString(), e); | |
| 77 | + } | |
| 78 | + return map; | |
| 79 | + } | |
| 80 | + | |
| 81 | + | |
| 82 | + @RequestMapping(method = RequestMethod.POST) | |
| 83 | + public Map<String, Object> save(ReportRegister t) { | |
| 84 | + Map<String, Object> map = new HashMap<>(); | |
| 85 | + try{ | |
| 86 | + reportRegisterService.save(t); | |
| 87 | + map.put("status", ResponseCode.SUCCESS); | |
| 88 | + map.put("t", t); | |
| 89 | + StringBuilder sb = HttpClientUtils.post(url,t.toString()); | |
| 90 | + JSONObject obj = JSON.parseObject(sb.toString()); | |
| 91 | + map.put("status2", obj); | |
| 92 | + } catch (Exception e) { | |
| 93 | + log.error(e.toString(), e); | |
| 94 | + } | |
| 95 | + return map; | |
| 96 | + } | |
| 97 | +} | ... | ... |
src/main/java/com/bsth/data/report_register/ReportRegisterService.java
0 → 100644
| 1 | +package com.bsth.data.report_register; | |
| 2 | + | |
| 3 | +import com.bsth.data.report_register.entity.ReportRegister; | |
| 4 | +import com.bsth.service.BaseService; | |
| 5 | + | |
| 6 | +import java.util.Map; | |
| 7 | + | |
| 8 | +public interface ReportRegisterService extends BaseService<ReportRegister, Long>{ | |
| 9 | + | |
| 10 | + Map<String, Object> findList(Map<String, String> map); | |
| 11 | + | |
| 12 | + Map<String, Object> deleteInfo( ReportRegister t); | |
| 13 | +} | ... | ... |
src/main/java/com/bsth/data/report_register/ReportRegisterServiceImpl.java
0 → 100644
| 1 | +package com.bsth.data.report_register; | |
| 2 | + | |
| 3 | +import com.bsth.common.ResponseCode; | |
| 4 | +import com.bsth.data.report_register.entity.ReportRegister; | |
| 5 | +import com.bsth.service.impl.BaseServiceImpl; | |
| 6 | +import com.bsth.util.ReportUtils; | |
| 7 | +import org.slf4j.Logger; | |
| 8 | +import org.slf4j.LoggerFactory; | |
| 9 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 10 | +import org.springframework.dao.DataIntegrityViolationException; | |
| 11 | +import org.springframework.jdbc.core.BeanPropertyRowMapper; | |
| 12 | +import org.springframework.jdbc.core.JdbcTemplate; | |
| 13 | +import org.springframework.stereotype.Service; | |
| 14 | + | |
| 15 | +import java.text.SimpleDateFormat; | |
| 16 | +import java.util.ArrayList; | |
| 17 | +import java.util.Date; | |
| 18 | +import java.util.HashMap; | |
| 19 | +import java.util.Iterator; | |
| 20 | +import java.util.List; | |
| 21 | +import java.util.Map; | |
| 22 | + | |
| 23 | +@Service | |
| 24 | +public class ReportRegisterServiceImpl extends BaseServiceImpl<ReportRegister, Long> implements ReportRegisterService{ | |
| 25 | + | |
| 26 | + Logger log = LoggerFactory.getLogger(this.getClass()); | |
| 27 | + | |
| 28 | + @Autowired | |
| 29 | + JdbcTemplate jdbcTemplate; | |
| 30 | + | |
| 31 | + @Override | |
| 32 | + public Map<String, Object> findList(Map<String, String> map) { | |
| 33 | + Map<String, Object> rs = new HashMap(); | |
| 34 | + try { | |
| 35 | + | |
| 36 | + String lineCodes = map.get("lineCodes") == null ? "" : map.get("lineCodes").toString(); | |
| 37 | + String lineName = map.get("lineName") == null ? "" : map.get("lineName").toString(); | |
| 38 | + String type = map.get("type") == null ? "" : map.get("type").toString(); | |
| 39 | + String date1 = "",date2 = ""; | |
| 40 | + String isFindDelete = ""; | |
| 41 | + if(type!=null && (type.equals("query") || type.equals("export"))){ | |
| 42 | + // 导出是不要删除的 | |
| 43 | + if(type.equals("export")) | |
| 44 | + isFindDelete = " and STATUS !=2 "; | |
| 45 | + date1 = map.get("date1") == null ? "" : map.get("date1").toString()+" 00:00:00"; | |
| 46 | + date2 = map.get("date2") == null ? "" : map.get("date2").toString()+" 23:59:59"; | |
| 47 | + } else { | |
| 48 | + Date startDate = new Date(); | |
| 49 | + startDate.setHours(0); | |
| 50 | + startDate.setMinutes(0); | |
| 51 | + startDate.setSeconds(0); | |
| 52 | + Date endDate = new Date(); | |
| 53 | + endDate.setHours(23); | |
| 54 | + endDate.setMinutes(59); | |
| 55 | + endDate.setSeconds(59); | |
| 56 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |
| 57 | + date1 = sdf.format(startDate); | |
| 58 | + date2 = sdf.format(endDate); | |
| 59 | + } | |
| 60 | + String sql = "select * from bsth_t_report where REPORT_DATE >=\""+date1+"\" and REPORT_DATE <= \""+date2+"\" and REPORT_XL in("+lineCodes+") " + isFindDelete; | |
| 61 | + List<ReportRegister> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(ReportRegister.class)); | |
| 62 | + | |
| 63 | + if(type!=null && type.equals("export")){ | |
| 64 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | |
| 65 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | |
| 66 | + String dateTime = ""; | |
| 67 | + try { | |
| 68 | + String dateStr1 = sdfSimple.format(sdfMonth.parse(date1)); | |
| 69 | + String dateStr2 = sdfSimple.format(sdfMonth.parse(date2)); | |
| 70 | + if (dateStr1.equals(dateStr2)) { | |
| 71 | + dateTime = dateStr1; | |
| 72 | + } else { | |
| 73 | + dateTime = dateStr1 + "-" + dateStr2; | |
| 74 | + } | |
| 75 | + } catch (Exception e) { | |
| 76 | + // TODO: handle exception | |
| 77 | + e.printStackTrace(); | |
| 78 | + } | |
| 79 | + List<List<Iterator<?>>> lists = new ArrayList<>(); | |
| 80 | + List<Iterator<?>> list1 = new ArrayList<>(); | |
| 81 | + List<Iterator<?>> list2 = new ArrayList<>(); | |
| 82 | + List<Iterator<?>> list3 = new ArrayList<>(); | |
| 83 | + List<Iterator<?>> list4 = new ArrayList<>(); | |
| 84 | + List<Iterator<?>> list5 = new ArrayList<>(); | |
| 85 | + List<Iterator<?>> list6 = new ArrayList<>(); | |
| 86 | + List<Map<String, Object>> resList1 = new ArrayList<Map<String, Object>>(); | |
| 87 | + List<Map<String, Object>> resList2 = new ArrayList<Map<String, Object>>(); | |
| 88 | + List<Map<String, Object>> resList3 = new ArrayList<Map<String, Object>>(); | |
| 89 | + List<Map<String, Object>> resList4 = new ArrayList<Map<String, Object>>(); | |
| 90 | + List<Map<String, Object>> resList5 = new ArrayList<Map<String, Object>>(); | |
| 91 | + List<Map<String, Object>> resList6 = new ArrayList<Map<String, Object>>(); | |
| 92 | + int i1 =0,i2 =0,i3 =0,i4 =0,i5 =0,i6 =0; | |
| 93 | + ReportUtils ee = new ReportUtils(); | |
| 94 | + for (ReportRegister l : list) { | |
| 95 | + Map<String, Object> m = new HashMap<String, Object>(); | |
| 96 | + String report_type = l.getREPORT_TYPE(); | |
| 97 | + m.put("REPORT_DATE", l.getREPORT_DATE()); | |
| 98 | + m.put("REPORT_TYPE", report_type); | |
| 99 | + m.put("REPORT_GSNAME", l.getREPORT_GSNAME()); | |
| 100 | + m.put("REPORT_FGSNAME", l.getREPORT_FGSNAME()); | |
| 101 | + m.put("REPORT_BBR", l.getREPORT_BBR()); | |
| 102 | + m.put("REPORT_XL", l.getREPORT_XL()); | |
| 103 | + m.put("REPORT_XLNAME", l.getREPORT_XLNAME()); | |
| 104 | + m.put("REPORT_STATION", l.getREPORT_STATION()); | |
| 105 | + m.put("REPORT_DWSBBM", l.getREPORT_DWSBBM()); | |
| 106 | + m.put("REPORT_DWSBSJ", l.getREPORT_DWSBSJ()); | |
| 107 | + m.put("REPORT_YWSJ", l.getREPORT_YWSJ()); | |
| 108 | + m.put("REPORT_SMBWD", l.getREPORT_SMBWD()); | |
| 109 | + m.put("REPORT_DJGSJ", l.getREPORT_DJGSJ()); | |
| 110 | + m.put("REPORT_DJGYY", l.getREPORT_DJGYY()); | |
| 111 | + m.put("REPORT_TFSJ", l.getREPORT_TFSJ()); | |
| 112 | + m.put("REPORT_YXSJ", l.getREPORT_YXSJ()); | |
| 113 | + m.put("REPORT_YXBC", l.getREPORT_YXBC()); | |
| 114 | + m.put("REPORT_TZCS", l.getREPORT_TZCS()); | |
| 115 | + m.put("REPORT_SGBH", l.getREPORT_SGBH()); | |
| 116 | + m.put("REPORT_ZBH", l.getREPORT_ZBH()); | |
| 117 | + m.put("REPORT_PZH", l.getREPORT_PZH()); | |
| 118 | + m.put("REPORT_JSY", l.getREPORT_JSY()); | |
| 119 | + m.put("REPORT_SGSJ", l.getREPORT_SGSJ()); | |
| 120 | + m.put("REPORT_SGDD", l.getREPORT_SGDD()); | |
| 121 | + m.put("REPORT_XSFX", l.getREPORT_XSFX()); | |
| 122 | + m.put("REPORT_SGDX", l.getREPORT_SGDX()); | |
| 123 | + m.put("REPORT_DXPZH", l.getREPORT_DXPZH()); | |
| 124 | + m.put("REPORT_SGGK", l.getREPORT_SGGK()); | |
| 125 | + m.put("REPORT_SSRS", l.getREPORT_SSRS()); | |
| 126 | + m.put("REPORT_SWRS", l.getREPORT_SWRS()); | |
| 127 | + m.put("REPORT_BGR", l.getREPORT_BGR()); | |
| 128 | + m.put("REPORT_BGRDH", l.getREPORT_BGRDH()); | |
| 129 | + m.put("REPORT_BZ", l.getREPORT_BZ()); | |
| 130 | + m.put("REPORT_ROAD", l.getREPORT_ROAD()); | |
| 131 | + if(report_type.equals("1")){ | |
| 132 | + i1++; | |
| 133 | + m.put("i", i1); | |
| 134 | + resList1.add(m); | |
| 135 | + }else if(report_type.equals("2")){ | |
| 136 | + i2++; | |
| 137 | + m.put("i", i2); | |
| 138 | + resList2.add(m); | |
| 139 | + }else if(report_type.equals("3")){ | |
| 140 | + i3++; | |
| 141 | + m.put("i", i3); | |
| 142 | + resList3.add(m); | |
| 143 | + }else if(report_type.equals("4")){ | |
| 144 | + i4++; | |
| 145 | + m.put("i", i4); | |
| 146 | + resList4.add(m); | |
| 147 | + } else if(report_type.equals("5")){ | |
| 148 | + i5++; | |
| 149 | + m.put("i", i5); | |
| 150 | + resList5.add(m); | |
| 151 | + }else if(report_type.equals("6")){ | |
| 152 | + i6++; | |
| 153 | + m.put("i", i6); | |
| 154 | + resList6.add(m); | |
| 155 | + } | |
| 156 | + } | |
| 157 | + try { | |
| 158 | + list1.add(resList1.iterator()); | |
| 159 | + lists.add(list1); | |
| 160 | + list2.add(resList2.iterator()); | |
| 161 | + lists.add(list2); | |
| 162 | + list3.add(resList3.iterator()); | |
| 163 | + lists.add(list3); | |
| 164 | + list4.add(resList4.iterator()); | |
| 165 | + lists.add(list4); | |
| 166 | + list5.add(resList5.iterator()); | |
| 167 | + lists.add(list5); | |
| 168 | + list6.add(resList6.iterator()); | |
| 169 | + lists.add(list6); | |
| 170 | + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | |
| 171 | + ee.excelMoreSheetReplace(lists, new Object[]{map}, path + "mould/report_register.xls", | |
| 172 | + path + "export/" + dateTime +"_"+lineName+ "_报备登记.xls"); | |
| 173 | + } catch (Exception e) { | |
| 174 | + // TODO: handle exception | |
| 175 | + e.printStackTrace(); | |
| 176 | + } | |
| 177 | + } | |
| 178 | + rs.put("status", ResponseCode.SUCCESS); | |
| 179 | + rs.put("list", list); | |
| 180 | + } | |
| 181 | +// catch (ParseException e) { | |
| 182 | +// e.printStackTrace(); | |
| 183 | +// } | |
| 184 | + catch (Exception e){ | |
| 185 | + log.error("", e); | |
| 186 | + rs.put("status", ResponseCode.ERROR); | |
| 187 | + rs.put("msg", e.getMessage()); | |
| 188 | + } | |
| 189 | + return rs; | |
| 190 | + } | |
| 191 | + | |
| 192 | + @Override | |
| 193 | + public Map<String, Object> deleteInfo(ReportRegister rr) { | |
| 194 | + Map<String, Object> map = new HashMap<>(); | |
| 195 | + try{ | |
| 196 | + Long id = rr.getID(); | |
| 197 | + String bbr = rr.getREPORT_BBR(); | |
| 198 | + | |
| 199 | + jdbcTemplate.update("UPDATE bsth_t_report SET STATUS = 2,REPORT_BBR = ? WHERE ID = ? ",bbr,id); | |
| 200 | + map.put("status", ResponseCode.SUCCESS); | |
| 201 | + }catch(DataIntegrityViolationException de){ | |
| 202 | + map.put("status", ResponseCode.ERROR); | |
| 203 | + map.put("msg", "“完整性约束”校验失败,请检查要删除的对象是否存在外键约束"); | |
| 204 | + } | |
| 205 | + return map; | |
| 206 | + } | |
| 207 | +} | ... | ... |
src/main/java/com/bsth/data/report_register/entity/ReportRegister.java
0 → 100644
| 1 | +package com.bsth.data.report_register.entity; | |
| 2 | + | |
| 3 | +import javax.persistence.Column; | |
| 4 | +import javax.persistence.Entity; | |
| 5 | +import javax.persistence.GeneratedValue; | |
| 6 | +import javax.persistence.Id; | |
| 7 | +import javax.persistence.Table; | |
| 8 | +import java.text.DateFormat; | |
| 9 | +import java.text.SimpleDateFormat; | |
| 10 | +import java.util.Date; | |
| 11 | + | |
| 12 | + | |
| 13 | +@Entity | |
| 14 | +@Table(name = "bsth_t_report") | |
| 15 | +public class ReportRegister { | |
| 16 | + | |
| 17 | + @Id | |
| 18 | + @GeneratedValue | |
| 19 | + private long ID; | |
| 20 | + | |
| 21 | + /** 类型*/ | |
| 22 | + private String REPORT_TYPE; | |
| 23 | + /** 公司 */ | |
| 24 | + private String REPORT_GS; | |
| 25 | + /** 分公司 */ | |
| 26 | + private String REPORT_FGS; | |
| 27 | + /** 公司名 */ | |
| 28 | + private String REPORT_GSNAME; | |
| 29 | + /** 分公司名 */ | |
| 30 | + private String REPORT_FGSNAME; | |
| 31 | + /** 时间*/ | |
| 32 | + private Date REPORT_DATE; | |
| 33 | + /** 报备人*/ | |
| 34 | + private String REPORT_BBR; | |
| 35 | + /** 线路编码 */ | |
| 36 | + private String REPORT_XL; | |
| 37 | + /** 线路名*/ | |
| 38 | + private String REPORT_XLNAME; | |
| 39 | + /** 站点*/ | |
| 40 | + private String REPORT_STATION; | |
| 41 | + /** 对外上报部门*/ | |
| 42 | + private String REPORT_DWSBBM; | |
| 43 | + /** 对外上报时间*/ | |
| 44 | + private String REPORT_DWSBSJ; | |
| 45 | + /** 延误时间*/ | |
| 46 | + private String REPORT_YWSJ; | |
| 47 | + /** 首末班误点原因*/ | |
| 48 | + private String REPORT_SMBWD; | |
| 49 | + /** 大间隔时间*/ | |
| 50 | + private String REPORT_DJGSJ; | |
| 51 | + /** 大间隔原因*/ | |
| 52 | + private String REPORT_DJGYY; | |
| 53 | + /** 突发事件*/ | |
| 54 | + private String REPORT_TFSJ; | |
| 55 | + /** 影响时间*/ | |
| 56 | + private String REPORT_YXSJ; | |
| 57 | + /** 影响班次数*/ | |
| 58 | + private String REPORT_YXBC; | |
| 59 | + /** 调整措施*/ | |
| 60 | + private String REPORT_TZCS; | |
| 61 | + /** 报案事故编号*/ | |
| 62 | + private String REPORT_SGBH; | |
| 63 | + /** 车辆自编号*/ | |
| 64 | + private String REPORT_ZBH; | |
| 65 | + /** 车辆牌照号*/ | |
| 66 | + private String REPORT_PZH; | |
| 67 | + /** 驾驶员*/ | |
| 68 | + private String REPORT_JSY; | |
| 69 | + /** 事故发生时间*/ | |
| 70 | + private String REPORT_SGSJ; | |
| 71 | + /** 事故发生地点*/ | |
| 72 | + private String REPORT_SGDD; | |
| 73 | + /** 行驶方向*/ | |
| 74 | + private String REPORT_XSFX; | |
| 75 | + /** 事故对象*/ | |
| 76 | + private String REPORT_SGDX; | |
| 77 | + /** 对象车牌照号*/ | |
| 78 | + private String REPORT_DXPZH; | |
| 79 | + /** 事故概况*/ | |
| 80 | + private String REPORT_SGGK; | |
| 81 | + /** 受伤人数*/ | |
| 82 | + private String REPORT_SSRS; | |
| 83 | + /** 死亡人数*/ | |
| 84 | + private String REPORT_SWRS; | |
| 85 | + /** 报告人 */ | |
| 86 | + private String REPORT_BGR; | |
| 87 | + /** 报告人电话 */ | |
| 88 | + private String REPORT_BGRDH; | |
| 89 | + /** 备注 */ | |
| 90 | + private String REPORT_BZ; | |
| 91 | + /** 路段*/ | |
| 92 | + private String REPORT_ROAD; | |
| 93 | + /** 访问接口时使用的状态码 操作类型,0:新增;1:修改;2:删除 */ | |
| 94 | + private String STATUS; | |
| 95 | + /** 创建人*/ | |
| 96 | + private String CREATE_BY; | |
| 97 | + /** 创建时间 */ | |
| 98 | + @Column(updatable = false, name = "CREATE_DATE", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | |
| 99 | + private Date CREATE_DATE; | |
| 100 | + /** 修改人*/ | |
| 101 | + private String UPDATE_BY; | |
| 102 | + /** 修改时间*/ | |
| 103 | + @Column(updatable = false, name = "UPDATE_DATE", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | |
| 104 | + private Date UPDATE_DATE; | |
| 105 | + | |
| 106 | + public long getID() { | |
| 107 | + return ID; | |
| 108 | + } | |
| 109 | + | |
| 110 | + public void setID(long ID) { | |
| 111 | + this.ID = ID; | |
| 112 | + } | |
| 113 | + | |
| 114 | + public String getREPORT_TYPE() { | |
| 115 | + return REPORT_TYPE; | |
| 116 | + } | |
| 117 | + | |
| 118 | + public void setREPORT_TYPE(String REPORT_TYPE) { | |
| 119 | + this.REPORT_TYPE = REPORT_TYPE; | |
| 120 | + } | |
| 121 | + | |
| 122 | + public String getREPORT_GS() { | |
| 123 | + return REPORT_GS; | |
| 124 | + } | |
| 125 | + | |
| 126 | + public void setREPORT_GS(String REPORT_GS) { | |
| 127 | + this.REPORT_GS = REPORT_GS; | |
| 128 | + } | |
| 129 | + | |
| 130 | + public String getREPORT_FGS() { | |
| 131 | + return REPORT_FGS; | |
| 132 | + } | |
| 133 | + | |
| 134 | + public void setREPORT_FGS(String REPORT_FGS) { | |
| 135 | + this.REPORT_FGS = REPORT_FGS; | |
| 136 | + } | |
| 137 | + | |
| 138 | + public String getREPORT_GSNAME() { | |
| 139 | + return REPORT_GSNAME; | |
| 140 | + } | |
| 141 | + | |
| 142 | + public void setREPORT_GSNAME(String REPORT_GSNAME) { | |
| 143 | + this.REPORT_GSNAME = REPORT_GSNAME; | |
| 144 | + } | |
| 145 | + | |
| 146 | + public String getREPORT_FGSNAME() { | |
| 147 | + return REPORT_FGSNAME; | |
| 148 | + } | |
| 149 | + | |
| 150 | + public void setREPORT_FGSNAME(String REPORT_FGSNAME) { | |
| 151 | + this.REPORT_FGSNAME = REPORT_FGSNAME; | |
| 152 | + } | |
| 153 | + | |
| 154 | + public Date getREPORT_DATE() { | |
| 155 | + return REPORT_DATE; | |
| 156 | + } | |
| 157 | + | |
| 158 | + public void setREPORT_DATE(Date REPORT_DATE) { | |
| 159 | + this.REPORT_DATE = REPORT_DATE; | |
| 160 | + } | |
| 161 | + | |
| 162 | + public String getREPORT_BBR() { | |
| 163 | + return REPORT_BBR; | |
| 164 | + } | |
| 165 | + | |
| 166 | + public void setREPORT_BBR(String REPORT_BBR) { | |
| 167 | + this.REPORT_BBR = REPORT_BBR; | |
| 168 | + } | |
| 169 | + | |
| 170 | + public String getREPORT_XL() { | |
| 171 | + return REPORT_XL; | |
| 172 | + } | |
| 173 | + | |
| 174 | + public void setREPORT_XL(String REPORT_XL) { | |
| 175 | + this.REPORT_XL = REPORT_XL; | |
| 176 | + } | |
| 177 | + | |
| 178 | + public String getREPORT_XLNAME() { | |
| 179 | + return REPORT_XLNAME; | |
| 180 | + } | |
| 181 | + | |
| 182 | + public void setREPORT_XLNAME(String REPORT_XLNAME) { | |
| 183 | + this.REPORT_XLNAME = REPORT_XLNAME; | |
| 184 | + } | |
| 185 | + | |
| 186 | + public String getREPORT_STATION() { | |
| 187 | + return REPORT_STATION; | |
| 188 | + } | |
| 189 | + | |
| 190 | + public void setREPORT_STATION(String REPORT_STATION) { | |
| 191 | + this.REPORT_STATION = REPORT_STATION; | |
| 192 | + } | |
| 193 | + | |
| 194 | + public String getREPORT_DWSBBM() { | |
| 195 | + return REPORT_DWSBBM; | |
| 196 | + } | |
| 197 | + | |
| 198 | + public void setREPORT_DWSBBM(String REPORT_DWSBBM) { | |
| 199 | + this.REPORT_DWSBBM = REPORT_DWSBBM; | |
| 200 | + } | |
| 201 | + | |
| 202 | + public String getREPORT_DWSBSJ() { | |
| 203 | + return REPORT_DWSBSJ; | |
| 204 | + } | |
| 205 | + | |
| 206 | + public void setREPORT_DWSBSJ(String REPORT_DWSBSJ) { | |
| 207 | + this.REPORT_DWSBSJ = REPORT_DWSBSJ; | |
| 208 | + } | |
| 209 | + | |
| 210 | + public String getREPORT_YWSJ() { | |
| 211 | + return REPORT_YWSJ; | |
| 212 | + } | |
| 213 | + | |
| 214 | + public void setREPORT_YWSJ(String REPORT_YWSJ) { | |
| 215 | + this.REPORT_YWSJ = REPORT_YWSJ; | |
| 216 | + } | |
| 217 | + | |
| 218 | + public String getREPORT_SMBWD() { | |
| 219 | + return REPORT_SMBWD; | |
| 220 | + } | |
| 221 | + | |
| 222 | + public void setREPORT_SMBWD(String REPORT_SMBWD) { | |
| 223 | + this.REPORT_SMBWD = REPORT_SMBWD; | |
| 224 | + } | |
| 225 | + | |
| 226 | + public String getREPORT_DJGSJ() { | |
| 227 | + return REPORT_DJGSJ; | |
| 228 | + } | |
| 229 | + | |
| 230 | + public void setREPORT_DJGSJ(String REPORT_DJGSJ) { | |
| 231 | + this.REPORT_DJGSJ = REPORT_DJGSJ; | |
| 232 | + } | |
| 233 | + | |
| 234 | + public String getREPORT_DJGYY() { | |
| 235 | + return REPORT_DJGYY; | |
| 236 | + } | |
| 237 | + | |
| 238 | + public void setREPORT_DJGYY(String REPORT_DJGYY) { | |
| 239 | + this.REPORT_DJGYY = REPORT_DJGYY; | |
| 240 | + } | |
| 241 | + | |
| 242 | + public String getREPORT_TFSJ() { | |
| 243 | + return REPORT_TFSJ; | |
| 244 | + } | |
| 245 | + | |
| 246 | + public void setREPORT_TFSJ(String REPORT_TFSJ) { | |
| 247 | + this.REPORT_TFSJ = REPORT_TFSJ; | |
| 248 | + } | |
| 249 | + | |
| 250 | + public String getREPORT_YXSJ() { | |
| 251 | + return REPORT_YXSJ; | |
| 252 | + } | |
| 253 | + | |
| 254 | + public void setREPORT_YXSJ(String REPORT_YXSJ) { | |
| 255 | + this.REPORT_YXSJ = REPORT_YXSJ; | |
| 256 | + } | |
| 257 | + | |
| 258 | + public String getREPORT_YXBC() { | |
| 259 | + return REPORT_YXBC; | |
| 260 | + } | |
| 261 | + | |
| 262 | + public void setREPORT_YXBC(String REPORT_YXBC) { | |
| 263 | + this.REPORT_YXBC = REPORT_YXBC; | |
| 264 | + } | |
| 265 | + | |
| 266 | + public String getREPORT_TZCS() { | |
| 267 | + return REPORT_TZCS; | |
| 268 | + } | |
| 269 | + | |
| 270 | + public void setREPORT_TZCS(String REPORT_TZCS) { | |
| 271 | + this.REPORT_TZCS = REPORT_TZCS; | |
| 272 | + } | |
| 273 | + | |
| 274 | + public String getREPORT_SGBH() { | |
| 275 | + return REPORT_SGBH; | |
| 276 | + } | |
| 277 | + | |
| 278 | + public void setREPORT_SGBH(String REPORT_SGBH) { | |
| 279 | + this.REPORT_SGBH = REPORT_SGBH; | |
| 280 | + } | |
| 281 | + | |
| 282 | + public String getREPORT_ZBH() { | |
| 283 | + return REPORT_ZBH; | |
| 284 | + } | |
| 285 | + | |
| 286 | + public void setREPORT_ZBH(String REPORT_ZBH) { | |
| 287 | + this.REPORT_ZBH = REPORT_ZBH; | |
| 288 | + } | |
| 289 | + | |
| 290 | + public String getREPORT_PZH() { | |
| 291 | + return REPORT_PZH; | |
| 292 | + } | |
| 293 | + | |
| 294 | + public void setREPORT_PZH(String REPORT_PZH) { | |
| 295 | + this.REPORT_PZH = REPORT_PZH; | |
| 296 | + } | |
| 297 | + | |
| 298 | + public String getREPORT_JSY() { | |
| 299 | + return REPORT_JSY; | |
| 300 | + } | |
| 301 | + | |
| 302 | + public void setREPORT_JSY(String REPORT_JSY) { | |
| 303 | + this.REPORT_JSY = REPORT_JSY; | |
| 304 | + } | |
| 305 | + | |
| 306 | + public String getREPORT_SGSJ() { | |
| 307 | + return REPORT_SGSJ; | |
| 308 | + } | |
| 309 | + | |
| 310 | + public void setREPORT_SGSJ(String REPORT_SGSJ) { | |
| 311 | + this.REPORT_SGSJ = REPORT_SGSJ; | |
| 312 | + } | |
| 313 | + | |
| 314 | + public String getREPORT_SGDD() { | |
| 315 | + return REPORT_SGDD; | |
| 316 | + } | |
| 317 | + | |
| 318 | + public void setREPORT_SGDD(String REPORT_SGDD) { | |
| 319 | + this.REPORT_SGDD = REPORT_SGDD; | |
| 320 | + } | |
| 321 | + | |
| 322 | + public String getREPORT_XSFX() { | |
| 323 | + return REPORT_XSFX; | |
| 324 | + } | |
| 325 | + | |
| 326 | + public void setREPORT_XSFX(String REPORT_XSFX) { | |
| 327 | + this.REPORT_XSFX = REPORT_XSFX; | |
| 328 | + } | |
| 329 | + | |
| 330 | + public String getREPORT_SGDX() { | |
| 331 | + return REPORT_SGDX; | |
| 332 | + } | |
| 333 | + | |
| 334 | + public void setREPORT_SGDX(String REPORT_SGDX) { | |
| 335 | + this.REPORT_SGDX = REPORT_SGDX; | |
| 336 | + } | |
| 337 | + | |
| 338 | + public String getREPORT_DXPZH() { | |
| 339 | + return REPORT_DXPZH; | |
| 340 | + } | |
| 341 | + | |
| 342 | + public void setREPORT_DXPZH(String REPORT_DXPZH) { | |
| 343 | + this.REPORT_DXPZH = REPORT_DXPZH; | |
| 344 | + } | |
| 345 | + | |
| 346 | + public String getREPORT_SGGK() { | |
| 347 | + return REPORT_SGGK; | |
| 348 | + } | |
| 349 | + | |
| 350 | + public void setREPORT_SGGK(String REPORT_SGGK) { | |
| 351 | + this.REPORT_SGGK = REPORT_SGGK; | |
| 352 | + } | |
| 353 | + | |
| 354 | + public String getREPORT_SSRS() { | |
| 355 | + return REPORT_SSRS; | |
| 356 | + } | |
| 357 | + | |
| 358 | + public void setREPORT_SSRS(String REPORT_SSRS) { | |
| 359 | + this.REPORT_SSRS = REPORT_SSRS; | |
| 360 | + } | |
| 361 | + | |
| 362 | + public String getREPORT_SWRS() { | |
| 363 | + return REPORT_SWRS; | |
| 364 | + } | |
| 365 | + | |
| 366 | + public void setREPORT_SWRS(String REPORT_SWRS) { | |
| 367 | + this.REPORT_SWRS = REPORT_SWRS; | |
| 368 | + } | |
| 369 | + | |
| 370 | + public String getREPORT_BGR() { | |
| 371 | + return REPORT_BGR; | |
| 372 | + } | |
| 373 | + | |
| 374 | + public void setREPORT_BGR(String REPORT_BGR) { | |
| 375 | + this.REPORT_BGR = REPORT_BGR; | |
| 376 | + } | |
| 377 | + | |
| 378 | + public String getREPORT_BGRDH() { | |
| 379 | + return REPORT_BGRDH; | |
| 380 | + } | |
| 381 | + | |
| 382 | + public void setREPORT_BGRDH(String REPORT_BGRDH) { | |
| 383 | + this.REPORT_BGRDH = REPORT_BGRDH; | |
| 384 | + } | |
| 385 | + | |
| 386 | + public String getREPORT_BZ() { | |
| 387 | + return REPORT_BZ; | |
| 388 | + } | |
| 389 | + | |
| 390 | + public void setREPORT_BZ(String REPORT_BZ) { | |
| 391 | + this.REPORT_BZ = REPORT_BZ; | |
| 392 | + } | |
| 393 | + | |
| 394 | + public String getCREATE_BY() { | |
| 395 | + return CREATE_BY; | |
| 396 | + } | |
| 397 | + | |
| 398 | + public void setCREATE_BY(String CREATE_BY) { | |
| 399 | + this.CREATE_BY = CREATE_BY; | |
| 400 | + } | |
| 401 | + | |
| 402 | + public Date getCREATE_DATE() { | |
| 403 | + return CREATE_DATE; | |
| 404 | + } | |
| 405 | + | |
| 406 | + public void setCREATE_DATE(Date CREATE_DATE) { | |
| 407 | + this.CREATE_DATE = CREATE_DATE; | |
| 408 | + } | |
| 409 | + | |
| 410 | + public String getUPDATE_BY() { | |
| 411 | + return UPDATE_BY; | |
| 412 | + } | |
| 413 | + | |
| 414 | + public void setUPDATE_BY(String UPDATE_BY) { | |
| 415 | + this.UPDATE_BY = UPDATE_BY; | |
| 416 | + } | |
| 417 | + | |
| 418 | + public Date getUPDATE_DATE() { | |
| 419 | + return UPDATE_DATE; | |
| 420 | + } | |
| 421 | + | |
| 422 | + public void setUPDATE_DATE(Date UPDATE_DATE) { | |
| 423 | + this.UPDATE_DATE = UPDATE_DATE; | |
| 424 | + } | |
| 425 | + | |
| 426 | + public String getREPORT_ROAD() { | |
| 427 | + return REPORT_ROAD; | |
| 428 | + } | |
| 429 | + | |
| 430 | + public void setREPORT_ROAD(String REPORT_ROAD) { | |
| 431 | + this.REPORT_ROAD = REPORT_ROAD; | |
| 432 | + } | |
| 433 | + | |
| 434 | + public String getSTATUS() { | |
| 435 | + return STATUS; | |
| 436 | + } | |
| 437 | + | |
| 438 | + public void setSTATUS(String STATUS) { | |
| 439 | + this.STATUS = STATUS; | |
| 440 | + } | |
| 441 | + | |
| 442 | + @Override | |
| 443 | + public String toString() { | |
| 444 | + DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |
| 445 | + return "{" + | |
| 446 | + "ID:'" + ID + '\'' + | |
| 447 | + ", REPORT_TYPE:'" + REPORT_TYPE + '\'' + | |
| 448 | + ", REPORT_GS:'" + REPORT_GS + '\'' + | |
| 449 | + ", REPORT_FGS:'" + REPORT_FGS + '\'' + | |
| 450 | + ", REPORT_DATE:'" + dateFormat.format(REPORT_DATE) + '\'' + | |
| 451 | + ", REPORT_BBR:'" + REPORT_BBR + '\'' + | |
| 452 | + ", REPORT_XL:'" + REPORT_XL + '\'' + | |
| 453 | + ", REPORT_XLNAME:'" + REPORT_XLNAME + '\'' + | |
| 454 | + ", REPORT_STATION:'" + REPORT_STATION + '\'' + | |
| 455 | + ", REPORT_DWSBBM:'" + REPORT_DWSBBM + '\'' + | |
| 456 | + ", REPORT_DWSBSJ:'" + REPORT_DWSBSJ + '\'' + | |
| 457 | + ", REPORT_YWSJ:'" + REPORT_YWSJ + '\'' + | |
| 458 | + ", REPORT_SMBWD:'" + REPORT_SMBWD + '\'' + | |
| 459 | + ", REPORT_DJGSJ:'" + REPORT_DJGSJ + '\'' + | |
| 460 | + ", REPORT_DJGYY:'" + REPORT_DJGYY + '\'' + | |
| 461 | + ", REPORT_TFSJ:'" + REPORT_TFSJ + '\'' + | |
| 462 | + ", REPORT_YXSJ:'" + REPORT_YXSJ + '\'' + | |
| 463 | + ", REPORT_YXBC:'" + REPORT_YXBC + '\'' + | |
| 464 | + ", REPORT_TZCS:'" + REPORT_TZCS + '\'' + | |
| 465 | + ", REPORT_SGBH:'" + REPORT_SGBH + '\'' + | |
| 466 | + ", REPORT_ZBH:'" + REPORT_ZBH + '\'' + | |
| 467 | + ", REPORT_PZH:'" + REPORT_PZH + '\'' + | |
| 468 | + ", REPORT_JSY:'" + REPORT_JSY + '\'' + | |
| 469 | + ", REPORT_SGSJ:'" + REPORT_SGSJ + '\'' + | |
| 470 | + ", REPORT_SGDD:'" + REPORT_SGDD + '\'' + | |
| 471 | + ", REPORT_XSFX:'" + REPORT_XSFX + '\'' + | |
| 472 | + ", REPORT_SGDX:'" + REPORT_SGDX + '\'' + | |
| 473 | + ", REPORT_DXPZH:'" + REPORT_DXPZH + '\'' + | |
| 474 | + ", REPORT_SGGK:'" + REPORT_SGGK + '\'' + | |
| 475 | + ", REPORT_SSRS:'" + REPORT_SSRS + '\'' + | |
| 476 | + ", REPORT_SWRS:'" + REPORT_SWRS + '\'' + | |
| 477 | + ", REPORT_BGR:'" + REPORT_BGR + '\'' + | |
| 478 | + ", REPORT_BGRDH:'" + REPORT_BGRDH + '\'' + | |
| 479 | + ", REPORT_BZ:'" + REPORT_BZ + '\'' + | |
| 480 | + ", CREATE_BY:'" + CREATE_BY + '\'' + | |
| 481 | + ", CREATE_DATE:" + CREATE_DATE + | |
| 482 | + ", UPDATE_BY:'" + UPDATE_BY + '\'' + | |
| 483 | + ", UPDATE_DATE:" + UPDATE_DATE + | |
| 484 | + ", REPORT_ROAD:'" + REPORT_ROAD + '\'' + | |
| 485 | + ", STATUS:'" + STATUS + '\'' + | |
| 486 | + '}'; | |
| 487 | + } | |
| 488 | +} | ... | ... |
src/main/java/com/bsth/data/report_register/repository/ReportRegisterRepository.java
0 → 100644
| 1 | +package com.bsth.data.report_register.repository; | |
| 2 | + | |
| 3 | +import com.bsth.data.report_register.entity.ReportRegister; | |
| 4 | +import com.bsth.repository.BaseRepository; | |
| 5 | +import org.springframework.stereotype.Repository; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * | |
| 9 | + * @Interface: ReportRegisterRepository(等级报表Repository数据持久层接口) | |
| 10 | + * | |
| 11 | + * @Author yrf | |
| 12 | + * | |
| 13 | + * @Date 2019-12-04 | |
| 14 | + * | |
| 15 | + * @Version 公交调度系统BS版 0.1 | |
| 16 | + * | |
| 17 | + */ | |
| 18 | + | |
| 19 | +@Repository | |
| 20 | +public interface ReportRegisterRepository extends BaseRepository<ReportRegister, Long> { | |
| 21 | + | |
| 22 | +} | ... | ... |
src/main/java/com/bsth/util/HttpClientUtils.java
| ... | ... | @@ -2,6 +2,7 @@ package com.bsth.util; |
| 2 | 2 | |
| 3 | 3 | import org.apache.http.HttpEntity; |
| 4 | 4 | import org.apache.http.client.config.RequestConfig; |
| 5 | +import org.apache.http.client.entity.EntityBuilder; | |
| 5 | 6 | import org.apache.http.client.methods.CloseableHttpResponse; |
| 6 | 7 | import org.apache.http.client.methods.HttpGet; |
| 7 | 8 | import org.apache.http.client.methods.HttpPost; |
| ... | ... | @@ -63,7 +64,7 @@ public class HttpClientUtils { |
| 63 | 64 | HttpPost post = new HttpPost(url); |
| 64 | 65 | |
| 65 | 66 | post.setHeader("Accept", "application/json"); |
| 66 | - post.setHeader("Content-Type", "application/json"); | |
| 67 | + post.setHeader("Content-Type", "application/json;charset=UTF-8"); | |
| 67 | 68 | //超时时间 |
| 68 | 69 | RequestConfig requestConfig = RequestConfig.custom() |
| 69 | 70 | .setConnectTimeout(2500).setConnectionRequestTimeout(2000) | ... | ... |
src/main/java/com/bsth/util/ReportRegisterHTTPUtil.java
0 → 100644
| 1 | +package com.bsth.util; | |
| 2 | + | |
| 3 | +import org.apache.http.client.methods.CloseableHttpResponse; | |
| 4 | +import org.apache.http.client.methods.HttpGet; | |
| 5 | +import org.apache.http.client.methods.HttpPost; | |
| 6 | +import org.apache.http.impl.client.CloseableHttpClient; | |
| 7 | +import org.apache.http.impl.client.HttpClients; | |
| 8 | +import org.apache.http.util.EntityUtils; | |
| 9 | + | |
| 10 | +import javax.servlet.ServletException; | |
| 11 | +import javax.servlet.annotation.WebServlet; | |
| 12 | +import javax.servlet.http.HttpServlet; | |
| 13 | +import javax.servlet.http.HttpServletRequest; | |
| 14 | +import javax.servlet.http.HttpServletResponse; | |
| 15 | +import java.io.IOException; | |
| 16 | + | |
| 17 | + | |
| 18 | +@WebServlet("/FromAjaxservlet") | |
| 19 | +public class ReportRegisterHTTPUtil extends HttpServlet { | |
| 20 | + | |
| 21 | + | |
| 22 | + protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | |
| 23 | + try { | |
| 24 | + //创建默认连接 | |
| 25 | + CloseableHttpClient httpClient = HttpClients.createDefault(); | |
| 26 | + //创建HttpGet对象,处理get请求,转发到A站点 | |
| 27 | + HttpPost httpPost = new HttpPost("http://114.80.178.13/complaint/TsReport/input.do"); | |
| 28 | + //执行 | |
| 29 | + CloseableHttpResponse response = httpClient.execute(httpPost); | |
| 30 | + int code = response.getStatusLine().getStatusCode(); | |
| 31 | + //获取状态 | |
| 32 | + System.out.println("http请求结果为:"+code); | |
| 33 | + if(code == 200){ | |
| 34 | + //获取A站点返回的结果 | |
| 35 | + String result = EntityUtils.toString(response.getEntity()); | |
| 36 | + System.out.println(result); | |
| 37 | + //把结果返回给B站点 | |
| 38 | + resp.getWriter().print(result); | |
| 39 | + } | |
| 40 | + response.close(); | |
| 41 | + httpClient.close(); | |
| 42 | + } catch (Exception e) { | |
| 43 | + } | |
| 44 | + } | |
| 45 | +} | |
| 0 | 46 | \ No newline at end of file | ... | ... |
src/main/java/com/bsth/util/ReportUtils.java
| ... | ... | @@ -115,6 +115,92 @@ public class ReportUtils { |
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | + | |
| 119 | + /** | |
| 120 | + * | |
| 121 | + * @param sheetList 多sheet模板中,需要重复显示的行所需的数据 | |
| 122 | + * @param tArray | |
| 123 | + * @param sourcePath 模板路径 | |
| 124 | + * @param targetPath 生成路径 | |
| 125 | + */ | |
| 126 | + public void excelMoreSheetReplace(List<List<Iterator<?>>> sheetList, Object[] tArray, | |
| 127 | + String sourcePath, String targetPath) { | |
| 128 | + try { | |
| 129 | + // 把源文件放入流中 | |
| 130 | + POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream( | |
| 131 | + sourcePath)); | |
| 132 | + HSSFWorkbook wb = new HSSFWorkbook(fs); | |
| 133 | + for (int s=0; s<sheetList.size(); s++){ | |
| 134 | + List<Iterator<?>> list = sheetList.get(s); | |
| 135 | + if(tArray.length != 0 && tArray[0] instanceof java.util.Map){ | |
| 136 | + Map<String, Object> m = (Map<String, Object>)tArray[0]; | |
| 137 | + if(m.containsKey("sheetName"+s+1) && m.get("sheetName"+s+1)!=null | |
| 138 | + && m.get("sheetName"+s+1).toString().trim().length()!=0) | |
| 139 | + wb.setSheetName(0, m.get("sheetName"+s+1).toString()); | |
| 140 | + } | |
| 141 | + HSSFSheet sheet = wb.getSheetAt(s); | |
| 142 | + HSSFRow row; | |
| 143 | + HSSFCell cell = null; | |
| 144 | + String key; | |
| 145 | + // 取得总行数 | |
| 146 | + int rowNum = sheet.getLastRowNum(); | |
| 147 | + // 取得总列数 | |
| 148 | + int cellNum = sheet.getRow(0).getLastCellNum(); | |
| 149 | + | |
| 150 | + // 遍历行 | |
| 151 | + for (int i = 0; i <= rowNum; i++) { | |
| 152 | + row = sheet.getRow(i); | |
| 153 | + // 遍历列 | |
| 154 | + for (int j = 0; j < cellNum; j++) { | |
| 155 | + if (row == null) { | |
| 156 | + continue; | |
| 157 | + } | |
| 158 | + cell = row.getCell(j); | |
| 159 | + if (cell == null) { | |
| 160 | + continue; | |
| 161 | + } | |
| 162 | + // 取得每列的内容,如果列内容是$key$格式,则替换内容 | |
| 163 | + key = getCellValue(cell); | |
| 164 | + if (key != null && (key.indexOf("$") != -1 || key.indexOf("#list#") != -1)) { | |
| 165 | + // * 列中内容有#list#,则表示该行为模板行,需要以该行为模板 | |
| 166 | + // * 例如:模板行格式 #list#0_0 $Car.id$ | |
| 167 | + // * 第一个0表示需要在list中取iterator的索引值 | |
| 168 | + // * 第二个0表示在iterator中取的第几个对象,如果不为0,则取下一个对象,而不是沿用前面获取的对象 | |
| 169 | + // * $Car.id$表示所取的对象为Car的对象,并且取值为id的值 | |
| 170 | + if (key.indexOf("#list#") != -1) { | |
| 171 | + key = key.replace("#list#", "").trim(); | |
| 172 | + String[] lists = key.split(" "); | |
| 173 | + // 取得list中的索引值 | |
| 174 | + int listIndex = Integer | |
| 175 | + .valueOf(lists[0].split("_")[0]); | |
| 176 | + Iterator<?> iterator = list.get(listIndex); | |
| 177 | + // 根据模板创建行并填充数据,返回增加的行数 | |
| 178 | + int rowCount = iteratorFillCellValue(wb, sheet, | |
| 179 | + cell, iterator, i, rowNum, key); | |
| 180 | + rowNum += rowCount; | |
| 181 | + i += rowCount; | |
| 182 | + break; | |
| 183 | + } else { | |
| 184 | + // 直接填充数据的列,从对象数组中取得值,这里的数组不传值 | |
| 185 | + getValueAndSetCellValue(cell, key, tArray, new String[]{""}); | |
| 186 | + } | |
| 187 | + } | |
| 188 | + | |
| 189 | + } | |
| 190 | + } | |
| 191 | + } | |
| 192 | + | |
| 193 | + // 创建目标文件夹 | |
| 194 | + createFolder(targetPath); | |
| 195 | + // 输出文件 | |
| 196 | + FileOutputStream fileOut = new FileOutputStream(targetPath); | |
| 197 | + wb.write(fileOut); | |
| 198 | + fileOut.close(); | |
| 199 | + } catch (Exception e) { | |
| 200 | + e.printStackTrace(); | |
| 201 | + } | |
| 202 | + } | |
| 203 | + | |
| 118 | 204 | /** |
| 119 | 205 | * 将file1中的一页sheet复制到file2中 |
| 120 | 206 | * |
| ... | ... | @@ -351,6 +437,9 @@ public class ReportUtils { |
| 351 | 437 | * 第一个0表示需要在list中取iterator的索引值 |
| 352 | 438 | * 第二个0表示在iterator中取的第几个对象,如果不为0,则取下一个对象,而不是沿用前面获取的对象 |
| 353 | 439 | */ |
| 440 | + if(key == null || key.equals("")){ | |
| 441 | + obj = iterator.next(); | |
| 442 | + } | |
| 354 | 443 | if (key.indexOf("#list#") != -1 && key.indexOf("_0") == -1) { |
| 355 | 444 | if (iterator.hasNext()) { |
| 356 | 445 | obj = iterator.next(); | ... | ... |
src/main/resources/static/pages/forms/mould/report_register.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/permission/authorize_all/user_auth.html
| ... | ... | @@ -79,6 +79,13 @@ |
| 79 | 79 | <li><label><input class="uk-checkbox" type="checkbox" data-event="signal_state"> 信号标记</label></li> |
| 80 | 80 | </ul> |
| 81 | 81 | </div> |
| 82 | + <div> | |
| 83 | + <h4>服务热线系统</h4> | |
| 84 | + <ul class="uk-list uk-list-large uk-list-divider"> | |
| 85 | + <li><label><input class="uk-checkbox" type="checkbox" data-event="report_register"> 报备登记</label></li> | |
| 86 | + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_report_register"> 报备登记报表</label></li> | |
| 87 | + </ul> | |
| 88 | + </div> | |
| 82 | 89 | |
| 83 | 90 | </div> |
| 84 | 91 | ... | ... |
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/add.html
0 → 100644
| 1 | +<div class="uk-modal" id="report_register_add_mobal"> | |
| 2 | + <div class="uk-modal-dialog" style="width: 600px;"> | |
| 3 | + <a href="" class="uk-modal-close uk-close"></a> | |
| 4 | + <div class="uk-modal-header"> | |
| 5 | + <h2>添加报备登记</h2> | |
| 6 | + </div> | |
| 7 | + <div class="uk-form uk-form-horizontal" id="report_register_form"> | |
| 8 | + <!--<div class="alert alert-danger display-hide">--> | |
| 9 | + <!--您的输入有误,请检查下面的输入项--> | |
| 10 | + <!--</div>--> | |
| 11 | + <!-- 线路ID --> | |
| 12 | + <!--<input type="hidden" name="REPORT_DATE" id="REPORT_DATE">--> | |
| 13 | + <form id="add_head_table"> | |
| 14 | + <input type="hidden" name="REPORT_BBR" id="REPORT_BBR" value=""> | |
| 15 | + <input type="hidden" name="REPORT_GS" id="REPORT_GS" value=""> | |
| 16 | + <input type="hidden" name="REPORT_FGS" id="REPORT_FGS" value=""> | |
| 17 | + <input type="hidden" name="REPORT_GSNAME" id="REPORT_GSNAME" value=""> | |
| 18 | + <input type="hidden" name="REPORT_FGSNAME" id="REPORT_FGSNAME" value=""> | |
| 19 | + <input type="hidden" name="REPORT_XLNAME" id="REPORT_XLNAME" value=""> | |
| 20 | + | |
| 21 | + <!-- 报备时间 --> | |
| 22 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 23 | + <div class="uk-form-row"> | |
| 24 | + <label class="uk-form-label"> | |
| 25 | + 报备时间: | |
| 26 | + </label> | |
| 27 | + <div class="uk-form-controls"> | |
| 28 | + <input type="text" class="form-control" name="REPORT_DATE" id="REPORT_DATE" readonly="readonly"> | |
| 29 | + </div> | |
| 30 | + </div> | |
| 31 | + </div> | |
| 32 | + <!-- 类型 --> | |
| 33 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 34 | + <div class="uk-form-row"> | |
| 35 | + <label class="uk-form-label"> | |
| 36 | + 类型: | |
| 37 | + </label> | |
| 38 | + <div class="uk-form-controls"> | |
| 39 | + <select class="form-control typeSelect" name="REPORT_TYPE" id="REPORT_TYPE"> | |
| 40 | + <option value="1">首末班误点</option> | |
| 41 | + <option value="2">大间隔</option> | |
| 42 | + <option value="3">突发事件</option> | |
| 43 | + <option value="4">事故</option> | |
| 44 | + <option value="5">其他</option> | |
| 45 | + <option value="6">咨询</option> | |
| 46 | + </select> | |
| 47 | + </div> | |
| 48 | + </div> | |
| 49 | + </div> | |
| 50 | + <!-- 路段名称 --> | |
| 51 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 52 | + <div class="uk-form-row"> | |
| 53 | + <label class="uk-form-label"> | |
| 54 | + 线路: | |
| 55 | + </label> | |
| 56 | + <div class="uk-form-controls"> | |
| 57 | + <select class="form-control lineSelect" name="REPORT_XL" id="REPORT_XL"> | |
| 58 | + </select> | |
| 59 | + </div> | |
| 60 | + </div> | |
| 61 | + </div> | |
| 62 | + </form> | |
| 63 | + <!-- 首末班误点--> | |
| 64 | + <form id="add_first_last_late_table" class="c_register_form" style="display:none; margin-top: 35px;"> | |
| 65 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 66 | + <div class="uk-form-row"> | |
| 67 | + <label class="uk-form-label"> | |
| 68 | + 延误站点: | |
| 69 | + </label> | |
| 70 | + <div class="uk-form-controls"> | |
| 71 | + <input type="text" class="form-control" name="REPORT_STATION" placeholder="延误站点" required> | |
| 72 | + </div> | |
| 73 | + </div> | |
| 74 | + </div> | |
| 75 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 76 | + <div class="uk-form-row"> | |
| 77 | + <label class="uk-form-label"> | |
| 78 | + 延误时间: | |
| 79 | + </label> | |
| 80 | + <div class="uk-form-controls"> | |
| 81 | + <input type="text" class="form-control" name="REPORT_YWSJ" placeholder="延误时间" required> | |
| 82 | + </div> | |
| 83 | + </div> | |
| 84 | + </div> | |
| 85 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 86 | + <div class="uk-form-row"> | |
| 87 | + <label class="uk-form-label"> | |
| 88 | + 首末班延误原因: | |
| 89 | + </label> | |
| 90 | + <div class="uk-form-controls"> | |
| 91 | + <input type="text" class="form-control" name="REPORT_SMBWD" placeholder="首末班延误原因" required> | |
| 92 | + </div> | |
| 93 | + </div> | |
| 94 | + </div> | |
| 95 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 96 | + <div class="uk-form-row"> | |
| 97 | + <label class="uk-form-label"> | |
| 98 | + 对外上报部门: | |
| 99 | + </label> | |
| 100 | + <div class="uk-form-controls"> | |
| 101 | + <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required> | |
| 102 | + </div> | |
| 103 | + </div> | |
| 104 | + </div> | |
| 105 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 106 | + <div class="uk-form-row"> | |
| 107 | + <label class="uk-form-label">对外上报时间:</label> | |
| 108 | + <div class="uk-form-controls"> | |
| 109 | + <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required> | |
| 110 | + </div> | |
| 111 | + </div> | |
| 112 | + </div> | |
| 113 | + <div class="uk-modal-footer uk-text-right"> | |
| 114 | + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span> | |
| 115 | + <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 116 | + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> 保存</button> | |
| 117 | + </div> | |
| 118 | + </form> | |
| 119 | + <!-- 大间隔--> | |
| 120 | + <form id="add_large_interval_table" class="c_register_form" style="display:none; margin-top: 35px;"> | |
| 121 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 122 | + <div class="uk-form-row"> | |
| 123 | + <label class="uk-form-label"> | |
| 124 | + 路段: | |
| 125 | + </label> | |
| 126 | + <div class="uk-form-controls"> | |
| 127 | + <input type="text" class="form-control" name="REPORT_ROAD" placeholder="路段" required> | |
| 128 | + </div> | |
| 129 | + </div> | |
| 130 | + </div> | |
| 131 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 132 | + <div class="uk-form-row"> | |
| 133 | + <label class="uk-form-label"> | |
| 134 | + 行驶方向: | |
| 135 | + </label> | |
| 136 | + <div class="uk-form-controls"> | |
| 137 | + <input type="text" class="form-control" name="REPORT_XSFX" placeholder="行驶方向" required> | |
| 138 | + </div> | |
| 139 | + </div> | |
| 140 | + </div> | |
| 141 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 142 | + <div class="uk-form-row"> | |
| 143 | + <label class="uk-form-label"> | |
| 144 | + 站点: | |
| 145 | + </label> | |
| 146 | + <div class="uk-form-controls"> | |
| 147 | + <input type="text" class="form-control" name="REPORT_STATION" placeholder="站点" required > | |
| 148 | + </div> | |
| 149 | + </div> | |
| 150 | + </div> | |
| 151 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 152 | + <div class="uk-form-row"> | |
| 153 | + <label class="uk-form-label"> | |
| 154 | + 大间隔时间: | |
| 155 | + </label> | |
| 156 | + <div class="uk-form-controls"> | |
| 157 | + <input type="text" class="form-control" name="REPORT_DJGSJ" placeholder="大间隔时间" required> | |
| 158 | + </div> | |
| 159 | + </div> | |
| 160 | + </div> | |
| 161 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 162 | + <div class="uk-form-row"> | |
| 163 | + <label class="uk-form-label"> | |
| 164 | + 大间隔原因: | |
| 165 | + </label> | |
| 166 | + <div class="uk-form-controls"> | |
| 167 | + <input type="text" class="form-control" name="REPORT_DJGYY" placeholder="大间隔原因" required> | |
| 168 | + </div> | |
| 169 | + </div> | |
| 170 | + </div> | |
| 171 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 172 | + <div class="uk-form-row"> | |
| 173 | + <label class="uk-form-label"> | |
| 174 | + 对外上报部门: | |
| 175 | + </label> | |
| 176 | + <div class="uk-form-controls"> | |
| 177 | + <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required> | |
| 178 | + </div> | |
| 179 | + </div> | |
| 180 | + </div> | |
| 181 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 182 | + <div class="uk-form-row"> | |
| 183 | + <label class="uk-form-label">对外上报时间:</label> | |
| 184 | + <div class="uk-form-controls"> | |
| 185 | + <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required> | |
| 186 | + </div> | |
| 187 | + </div> | |
| 188 | + </div> | |
| 189 | + <div class="uk-modal-footer uk-text-right"> | |
| 190 | + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span> | |
| 191 | + <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 192 | + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> 保存</button> | |
| 193 | + </div> | |
| 194 | + </form> | |
| 195 | + <!-- 突发事件--> | |
| 196 | + <form id="add_emergency_table" class="c_register_form" style="display:none; margin-top: 35px;"> | |
| 197 | + | |
| 198 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 199 | + <div class="uk-form-row"> | |
| 200 | + <label class="uk-form-label"> | |
| 201 | + 重大活动货突发事件: | |
| 202 | + </label> | |
| 203 | + <div class="uk-form-controls"> | |
| 204 | + <input type="text" class="form-control" name="REPORT_TFSJ" placeholder="重大活动货突发事件" required> | |
| 205 | + </div> | |
| 206 | + </div> | |
| 207 | + </div> | |
| 208 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 209 | + <div class="uk-form-row"> | |
| 210 | + <label class="uk-form-label"> | |
| 211 | + 影响时间: | |
| 212 | + </label> | |
| 213 | + <div class="uk-form-controls"> | |
| 214 | + <input type="text" class="form-control" name="REPORT_YXSJ" placeholder="影响时间" required> | |
| 215 | + </div> | |
| 216 | + </div> | |
| 217 | + </div> | |
| 218 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 219 | + <div class="uk-form-row"> | |
| 220 | + <label class="uk-form-label"> | |
| 221 | + 影响班次数: | |
| 222 | + </label> | |
| 223 | + <div class="uk-form-controls"> | |
| 224 | + <input type="text" class="form-control" name="REPORT_YXBC" placeholder="影响班次数" required> | |
| 225 | + </div> | |
| 226 | + </div> | |
| 227 | + </div> | |
| 228 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 229 | + <div class="uk-form-row"> | |
| 230 | + <label class="uk-form-label"> | |
| 231 | + 调整措施: | |
| 232 | + </label> | |
| 233 | + <div class="uk-form-controls"> | |
| 234 | + <input type="text" class="form-control" name="REPORT_TZCS" placeholder="调整措施" required> | |
| 235 | + </div> | |
| 236 | + </div> | |
| 237 | + </div> | |
| 238 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 239 | + <div class="uk-form-row"> | |
| 240 | + <label class="uk-form-label"> | |
| 241 | + 对外上报部门: | |
| 242 | + </label> | |
| 243 | + <div class="uk-form-controls"> | |
| 244 | + <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required> | |
| 245 | + </div> | |
| 246 | + </div> | |
| 247 | + </div> | |
| 248 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 249 | + <div class="uk-form-row"> | |
| 250 | + <label class="uk-form-label">对外上报时间:</label> | |
| 251 | + <div class="uk-form-controls"> | |
| 252 | + <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required> | |
| 253 | + </div> | |
| 254 | + </div> | |
| 255 | + </div> | |
| 256 | + <div class="uk-modal-footer uk-text-right"> | |
| 257 | + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span> | |
| 258 | + <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 259 | + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> 保存</button> | |
| 260 | + </div> | |
| 261 | + </form> | |
| 262 | + <!-- 事故--> | |
| 263 | + <form id="add_accident_table" class="c_register_form" style="display:none; margin-top: 35px;"> | |
| 264 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 265 | + <div class="uk-form-row"> | |
| 266 | + <label class="uk-form-label"> | |
| 267 | + 车辆自编号: | |
| 268 | + </label> | |
| 269 | + <div class="uk-form-controls"> | |
| 270 | + <input type="text" class="form-control" name="REPORT_ZBH" placeholder="车辆自编号" required> | |
| 271 | + </div> | |
| 272 | + </div> | |
| 273 | + </div> | |
| 274 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 275 | + <div class="uk-form-row"> | |
| 276 | + <label class="uk-form-label"> | |
| 277 | + 驾驶员: | |
| 278 | + </label> | |
| 279 | + <div class="uk-form-controls"> | |
| 280 | + <input type="text" class="form-control" name="REPORT_JSY" placeholder="驾驶员" required> | |
| 281 | + </div> | |
| 282 | + </div> | |
| 283 | + </div> | |
| 284 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 285 | + <div class="uk-form-row"> | |
| 286 | + <label class="uk-form-label"> | |
| 287 | + 事故发生时间: | |
| 288 | + </label> | |
| 289 | + <div class="uk-form-controls"> | |
| 290 | + <input type="text" class="form-control" name="REPORT_SGSJ" placeholder="事故发生时间" required> | |
| 291 | + </div> | |
| 292 | + </div> | |
| 293 | + </div> | |
| 294 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 295 | + <div class="uk-form-row"> | |
| 296 | + <label class="uk-form-label"> | |
| 297 | + 事故发生地点: | |
| 298 | + </label> | |
| 299 | + <div class="uk-form-controls"> | |
| 300 | + <input type="text" class="form-control" name="REPORT_SGDD" placeholder="事故发生地点" required> | |
| 301 | + </div> | |
| 302 | + </div> | |
| 303 | + </div> | |
| 304 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 305 | + <div class="uk-form-row"> | |
| 306 | + <label class="uk-form-label"> | |
| 307 | + 行驶方向: | |
| 308 | + </label> | |
| 309 | + <div class="uk-form-controls"> | |
| 310 | + <input type="text" class="form-control" name="REPORT_XSFX" placeholder="行驶方向" required> | |
| 311 | + </div> | |
| 312 | + </div> | |
| 313 | + </div> | |
| 314 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 315 | + <div class="uk-form-row"> | |
| 316 | + <label class="uk-form-label"> | |
| 317 | + 事故对象: | |
| 318 | + </label> | |
| 319 | + <div class="uk-form-controls"> | |
| 320 | + <input type="text" class="form-control" name="REPORT_SGDX" placeholder="事故对象" required> | |
| 321 | + </div> | |
| 322 | + </div> | |
| 323 | + </div> | |
| 324 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 325 | + <div class="uk-form-row"> | |
| 326 | + <label class="uk-form-label"> | |
| 327 | + 对象车牌号: | |
| 328 | + </label> | |
| 329 | + <div class="uk-form-controls"> | |
| 330 | + <input type="text" class="form-control" name="REPORT_DXPZH" placeholder="对象车牌号" required> | |
| 331 | + </div> | |
| 332 | + </div> | |
| 333 | + </div> | |
| 334 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 335 | + <div class="uk-form-row"> | |
| 336 | + <label class="uk-form-label"> | |
| 337 | + 事故概况: | |
| 338 | + </label> | |
| 339 | + <div class="uk-form-controls"> | |
| 340 | + <input type="text" class="form-control" name="REPORT_SGGK" placeholder="事故概况" required> | |
| 341 | + </div> | |
| 342 | + </div> | |
| 343 | + </div> | |
| 344 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 345 | + <div class="uk-form-row"> | |
| 346 | + <label class="uk-form-label"> | |
| 347 | + 受伤人数: | |
| 348 | + </label> | |
| 349 | + <div class="uk-form-controls"> | |
| 350 | + <input type="text" class="form-control" name="REPORT_SSRS" placeholder="受伤人数" required> | |
| 351 | + </div> | |
| 352 | + </div> | |
| 353 | + </div> | |
| 354 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 355 | + <div class="uk-form-row"> | |
| 356 | + <label class="uk-form-label"> | |
| 357 | + 死亡人数: | |
| 358 | + </label> | |
| 359 | + <div class="uk-form-controls"> | |
| 360 | + <input type="text" class="form-control" name="REPORT_SWRS" placeholder="死亡人数" required> | |
| 361 | + </div> | |
| 362 | + </div> | |
| 363 | + </div> | |
| 364 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 365 | + <div class="uk-form-row"> | |
| 366 | + <label class="uk-form-label"> | |
| 367 | + 报告人: | |
| 368 | + </label> | |
| 369 | + <div class="uk-form-controls"> | |
| 370 | + <input type="text" class="form-control" name="REPORT_BGR" placeholder="报告人" required > | |
| 371 | + </div> | |
| 372 | + </div> | |
| 373 | + </div> | |
| 374 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 375 | + <div class="uk-form-row"> | |
| 376 | + <label class="uk-form-label"> | |
| 377 | + 报告人电话: | |
| 378 | + </label> | |
| 379 | + <div class="uk-form-controls"> | |
| 380 | + <input type="text" class="form-control" name="REPORT_BGRDH" placeholder="报告人电话" required> | |
| 381 | + </div> | |
| 382 | + </div> | |
| 383 | + </div> | |
| 384 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 385 | + <div class="uk-form-row"> | |
| 386 | + <label class="uk-form-label"> 备注:</label> | |
| 387 | + <div class="uk-form-controls"> | |
| 388 | + <input type="text" class="form-control" name="REPORT_BZ" placeholder="备注"> | |
| 389 | + </div> | |
| 390 | + </div> | |
| 391 | + </div> | |
| 392 | + <div class="uk-modal-footer uk-text-right"> | |
| 393 | + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span> | |
| 394 | + <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 395 | + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> 保存</button> | |
| 396 | + </div> | |
| 397 | + </form> | |
| 398 | + <!-- 其他--> | |
| 399 | + <form id="add_rests_table" class="c_register_form" style="display:none; margin-top: 35px;"> | |
| 400 | + | |
| 401 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 402 | + <div class="uk-form-row"> | |
| 403 | + <label class="uk-form-label"> | |
| 404 | + 报备内容: | |
| 405 | + </label> | |
| 406 | + <div class="uk-form-controls"> | |
| 407 | + <input type="text" class="form-control" name="REPORT_BZ" placeholder="报备内容" required> | |
| 408 | + </div> | |
| 409 | + </div> | |
| 410 | + </div> | |
| 411 | + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;"> | |
| 412 | + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span> | |
| 413 | + <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 414 | + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> 保存</button> | |
| 415 | + </div> | |
| 416 | + </form> | |
| 417 | + <!-- 咨询--> | |
| 418 | + <form id="add_consult_table" class="c_register_form" style="display:none; margin-top: 35px;"> | |
| 419 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 420 | + <div class="uk-form-row"> | |
| 421 | + <label class="uk-form-label"> | |
| 422 | + 班线名称: | |
| 423 | + </label> | |
| 424 | + <div class="uk-form-controls"> | |
| 425 | + <input type="text" class="form-control" name="REPORT_STATION" placeholder="班线名称" required> | |
| 426 | + </div> | |
| 427 | + </div> | |
| 428 | + </div> | |
| 429 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 430 | + <div class="uk-form-row"> | |
| 431 | + <label class="uk-form-label"> | |
| 432 | + 内容: | |
| 433 | + </label> | |
| 434 | + <div class="uk-form-controls"> | |
| 435 | + <input type="text" class="form-control" name="REPORT_BZ" placeholder="内容" required> | |
| 436 | + </div> | |
| 437 | + </div> | |
| 438 | + </div> | |
| 439 | + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;"> | |
| 440 | + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span> | |
| 441 | + <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 442 | + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> 保存</button> | |
| 443 | + </div> | |
| 444 | + </form> | |
| 445 | + </div> | |
| 446 | + </div> | |
| 447 | + | |
| 448 | + <script> | |
| 449 | + (function () { | |
| 450 | + var modal = '#report_register_add_mobal'; | |
| 451 | + // var form = '#report_register_form'; | |
| 452 | + var tableActive = '',formActive = ''; | |
| 453 | + var REPORT_TYPE, | |
| 454 | + lineList = {}, | |
| 455 | + companyMap = new Map(), | |
| 456 | + user = {}; | |
| 457 | + | |
| 458 | + $("#REPORT_XL").on("change", function(){ | |
| 459 | + var lineCode = $(this).val(); | |
| 460 | + if(lineCode == "" || lineCode == undefined || lineCode == null){ | |
| 461 | + $('#REPORT_GS').val(); | |
| 462 | + $('#REPORT_FGS').val(); | |
| 463 | + $('#REPORT_GSNAME').val(); | |
| 464 | + $('#REPORT_FGSNAME').val(); | |
| 465 | + } else { | |
| 466 | + // var temp = companyMap[lineCode].split("_"); | |
| 467 | + var code = companyMap[lineCode].split("-")[0].split(":"); | |
| 468 | + var name = companyMap[lineCode].split("-")[1].split(":"); | |
| 469 | + $('#REPORT_GS').val(code[0]); | |
| 470 | + $('#REPORT_FGS').val(code[1]); | |
| 471 | + $('#REPORT_GSNAME').val(name[0]); | |
| 472 | + $('#REPORT_FGSNAME').val(name[1]); | |
| 473 | + $("#REPORT_XLNAME").val($('#REPORT_XL option:selected').text()); | |
| 474 | + } | |
| 475 | + }); | |
| 476 | + | |
| 477 | + $(modal).on('init', function (e, data) { | |
| 478 | + $('#REPORT_DATE').datetimepicker({ | |
| 479 | + format : 'YYYY-MM-DD HH:mm:ss', | |
| 480 | + locale : 'zh-cn' | |
| 481 | + }); | |
| 482 | + $('#REPORT_DATE').val(moment(new Date()).format('YYYY-MM-DD HH:mm:ss')); | |
| 483 | + tableActive = "add_"+data.tableActive; | |
| 484 | + var typeInt = 1; | |
| 485 | + if (tableActive == 'add_first_last_late_table') { | |
| 486 | + typeInt = 1; | |
| 487 | + } else if (tableActive == 'add_large_interval_table') { | |
| 488 | + typeInt = 2; | |
| 489 | + } else if (tableActive == 'add_emergency_table') { | |
| 490 | + typeInt = 3; | |
| 491 | + } else if (tableActive == 'add_accident_table') { | |
| 492 | + typeInt = 4; | |
| 493 | + } else if (tableActive == 'add_rests_table') { | |
| 494 | + typeInt = 5; | |
| 495 | + } else if (tableActive == 'add_consult_table') { | |
| 496 | + typeInt = 6; | |
| 497 | + } else { | |
| 498 | + UIkit.modal(modal).hide(); | |
| 499 | + notify_err('您所选的数据有问题,请重新选择!'); | |
| 500 | + return; | |
| 501 | + } | |
| 502 | + $('#REPORT_TYPE').val(typeInt); | |
| 503 | + document.getElementById(tableActive).style.display = ""; | |
| 504 | + lineList = data.lineList; | |
| 505 | + user = data.user; | |
| 506 | + $('#REPORT_BBR').val(user.userName+'/'+user.name); | |
| 507 | + gb_common.$get("/user/companyData",null,function(result) { | |
| 508 | + var len_ = lineList.length,lineData=[]; | |
| 509 | + if (len_ > 0) { | |
| 510 | + // 遍历线路对应的公司 | |
| 511 | + for (var i = 0; i < result.length; i++) { | |
| 512 | + var companyCode = result[i].companyCode; | |
| 513 | + var children = result[i].children; | |
| 514 | + for (var j = 0; j < children.length; j++) { | |
| 515 | + var code = children[j].code; | |
| 516 | + for (var k = 0; k < lineList.length; k++) { | |
| 517 | + if (lineList[k].brancheCompany == code && lineList[k].company == companyCode) { | |
| 518 | + // companyMap[lineList[k].lineCode] = companyCode + "_" + code; | |
| 519 | + companyMap[lineList[k].lineCode] = companyCode + ":" + code + "-" + result[i].companyName + ":" + result[i].children[j].name; | |
| 520 | + // lineData.push({id: lineList[k]["lineCode"], text: lineList[k]["name"]}); | |
| 521 | + } | |
| 522 | + } | |
| 523 | + } | |
| 524 | + } | |
| 525 | + } | |
| 526 | + | |
| 527 | + // initPinYinSelect2('#REPORT_XL',data,''); | |
| 528 | + | |
| 529 | + // var options = '<option value="">请选择...</option>'; | |
| 530 | + var options = ''; | |
| 531 | + $.each(lineList, function (i,line) { | |
| 532 | + options += '<option value='+line.lineCode+'>'+line.name+'</option>'; | |
| 533 | + }); | |
| 534 | + $('#REPORT_XL').html(options); | |
| 535 | + // 模拟change给公司分公司赋值 | |
| 536 | + $('#REPORT_XL').trigger("change"); | |
| 537 | + | |
| 538 | + }); | |
| 539 | + changeType(tableActive); | |
| 540 | + | |
| 541 | + $('#REPORT_TYPE').on('change',function () { | |
| 542 | + document.getElementById(tableActive).style.display = "none"; | |
| 543 | + REPORT_TYPE = this.value; | |
| 544 | + if (REPORT_TYPE == 1) { | |
| 545 | + tableActive = 'add_first_last_late_table'; | |
| 546 | + } else if (REPORT_TYPE == 2) { | |
| 547 | + tableActive = 'add_large_interval_table'; | |
| 548 | + } else if (REPORT_TYPE == 3) { | |
| 549 | + tableActive = 'add_emergency_table'; | |
| 550 | + } else if (REPORT_TYPE == 4) { | |
| 551 | + tableActive = 'add_accident_table'; | |
| 552 | + } else if (REPORT_TYPE == 5) { | |
| 553 | + tableActive = 'add_rests_table'; | |
| 554 | + } else if (REPORT_TYPE == 6) { | |
| 555 | + tableActive = 'add_consult_table'; | |
| 556 | + } | |
| 557 | + document.getElementById(tableActive).style.display = ""; | |
| 558 | + changeType(tableActive); | |
| 559 | + }); | |
| 560 | + }); | |
| 561 | + | |
| 562 | + function changeType(tableActiveStr) { | |
| 563 | + formActive = $('#'+tableActiveStr); | |
| 564 | + // formActive = $('#'+tableActive); | |
| 565 | + //校验不过 | |
| 566 | + formActive.on('err.field.fv', function () { | |
| 567 | + $('#submitChildTaskBtn', modal).removeClass('disabled').removeAttr('disabled'); | |
| 568 | + }); | |
| 569 | + | |
| 570 | + //校验 | |
| 571 | + formActive.formValidation({framework: 'uikit', locale: 'zh_CN'}); | |
| 572 | + //提交 | |
| 573 | + formActive.on('success.form.fv', function (e) { | |
| 574 | + e.preventDefault(); | |
| 575 | + // disabled_submit_btn(formActive); | |
| 576 | + var headData = $('#add_head_table').serializeJSON(); | |
| 577 | + var bodyData = $(formActive).serializeJSON(); | |
| 578 | + var params = {}; | |
| 579 | + Object.assign(params,headData,bodyData); | |
| 580 | + params.STATUS = 0; | |
| 581 | + gb_common.$post('/reportRegister/', params, function (rs) { | |
| 582 | + if(rs.status == 'SUCCESS'){ | |
| 583 | + // $('#report-register-modal').trigger('refresh', {'tableActive' : tableActive,'companyMap':companyMap,'lineList':lineList,'user':user}); | |
| 584 | + UIkit.modal(modal).hide(); | |
| 585 | + notify_succ('新增成功!'); | |
| 586 | + manageJs.refreshDate(); | |
| 587 | + if(rs.status2.CODE == '0') | |
| 588 | + notify_succ('同步到服务热线系统成功!'); | |
| 589 | + else | |
| 590 | + notify_err('同步到服务热线系统失败!'); | |
| 591 | + } else | |
| 592 | + notify_err('新增失败!'); | |
| 593 | + | |
| 594 | + }); | |
| 595 | + }); | |
| 596 | + } | |
| 597 | + | |
| 598 | + //submit | |
| 599 | + $('.submitBtn', modal).on('click', function () { | |
| 600 | + $(this).addClass('disabled').attr('disabled', 'disabled'); | |
| 601 | + formActive.data('valid', false); | |
| 602 | + formActive.formValidation('validate'); | |
| 603 | + }); | |
| 604 | + })(); | |
| 605 | + </script> | |
| 606 | +</div> | |
| 0 | 607 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/css/main.css
0 → 100644
| 1 | + | |
| 2 | +.report-register-table1 dl dt:nth-of-type(1), .report-register-table1 dl dd:nth-of-type(1) { | |
| 3 | + width: 2%; | |
| 4 | +} | |
| 5 | +.report-register-table1 dl dt:nth-of-type(2), .report-register-table1 dl dd:nth-of-type(2) { | |
| 6 | + width: 4%; | |
| 7 | +} | |
| 8 | +.report-register-table1 dl dt:nth-of-type(3), .report-register-table1 dl dd:nth-of-type(3) { | |
| 9 | + width: 7%; | |
| 10 | +} | |
| 11 | +.report-register-table1 dl dt:nth-of-type(4), .report-register-table1 dl dd:nth-of-type(4) { | |
| 12 | + width: 7%; | |
| 13 | +} | |
| 14 | +.report-register-table1 dl dt:nth-of-type(5), .report-register-table1 dl dd:nth-of-type(5) { | |
| 15 | + width: 7%; | |
| 16 | +} | |
| 17 | +.report-register-table1 dl dt:nth-of-type(6), .report-register-table1 dl dd:nth-of-type(6) { | |
| 18 | + width: 7%; | |
| 19 | +} | |
| 20 | +.report-register-table1 dl dt:nth-of-type(7), .report-register-table1 dl dd:nth-of-type(7) { | |
| 21 | + width: 10%; | |
| 22 | +} | |
| 23 | +.report-register-table1 dl dt:nth-of-type(8), .report-register-table1 dl dd:nth-of-type(8) { | |
| 24 | + width: 7%; | |
| 25 | +} | |
| 26 | +.report-register-table1 dl dt:nth-of-type(9), .report-register-table1 dl dd:nth-of-type(9) { | |
| 27 | + width: 7%; | |
| 28 | +} | |
| 29 | +.report-register-table1 dl dt:nth-of-type(10), .report-register-table1 dl dd:nth-of-type(10) { | |
| 30 | + width: 7%; | |
| 31 | +} | |
| 32 | +.report-register-table1 dl dt:nth-of-type(11), .report-register-table1 dl dd:nth-of-type(11) { | |
| 33 | + width: 7%; | |
| 34 | +} | |
| 35 | +.report-register-table1 dl dt:nth-of-type(12), .report-register-table1 dl dd:nth-of-type(12) { | |
| 36 | + width: 7%; | |
| 37 | +} | |
| 38 | +.report-register-table1 dl dt:nth-of-type(13), .report-register-table1 dl dd:nth-of-type(13) { | |
| 39 | + width: 7%; | |
| 40 | +} | |
| 41 | +.report-register-table1 dl dt:nth-of-type(14), .report-register-table1 dl dd:nth-of-type(14) { | |
| 42 | + width: 7%; | |
| 43 | +} | |
| 44 | +.report-register-table1 dl dt:nth-of-type(15), .report-register-table1 dl dd:nth-of-type(15) { | |
| 45 | + width: 7%; | |
| 46 | +} | |
| 47 | +.report-register-table1 dl dt:nth-of-type(16), .report-register-table1 dl dd:nth-of-type(16) { | |
| 48 | + width: 7%; | |
| 49 | +} | |
| 50 | +.report-register-table1 dl dt:nth-of-type(17), .report-register-table1 dl dd:nth-of-type(17) { | |
| 51 | + width: 7%; | |
| 52 | +} | |
| 53 | +.report-register-table1 dl dt:nth-of-type(18), .report-register-table1 dl dd:nth-of-type(18) { | |
| 54 | + width: 7%; | |
| 55 | +} | |
| 56 | + | |
| 57 | + | |
| 58 | +.report-register-table2 dl dt:nth-of-type(1), .report-register-table2 dl dd:nth-of-type(1) { | |
| 59 | + width: 2%; | |
| 60 | +} | |
| 61 | +.report-register-table2 dl dt:nth-of-type(2), .report-register-table2 dl dd:nth-of-type(2) { | |
| 62 | + width: 4%; | |
| 63 | +} | |
| 64 | +.report-register-table2 dl dt:nth-of-type(3), .report-register-table2 dl dd:nth-of-type(3) { | |
| 65 | + width: 7%; | |
| 66 | +} | |
| 67 | +.report-register-table2 dl dt:nth-of-type(4), .report-register-table2 dl dd:nth-of-type(4) { | |
| 68 | + width: 7%; | |
| 69 | +} | |
| 70 | +.report-register-table2 dl dt:nth-of-type(5), .report-register-table2 dl dd:nth-of-type(5) { | |
| 71 | + width: 7%; | |
| 72 | +} | |
| 73 | +.report-register-table2 dl dt:nth-of-type(6), .report-register-table2 dl dd:nth-of-type(6) { | |
| 74 | + width: 7%; | |
| 75 | +} | |
| 76 | +.report-register-table2 dl dt:nth-of-type(7), .report-register-table2 dl dd:nth-of-type(7) { | |
| 77 | + width: 7%; | |
| 78 | +} | |
| 79 | +.report-register-table2 dl dt:nth-of-type(8), .report-register-table2 dl dd:nth-of-type(8) { | |
| 80 | + width: 7%; | |
| 81 | +} | |
| 82 | +.report-register-table2 dl dt:nth-of-type(9), .report-register-table2 dl dd:nth-of-type(9) { | |
| 83 | + width: 7%; | |
| 84 | +} | |
| 85 | +.report-register-table2 dl dt:nth-of-type(10), .report-register-table2 dl dd:nth-of-type(10) { | |
| 86 | + width: 7%; | |
| 87 | +} | |
| 88 | +.report-register-table2 dl dt:nth-of-type(11), .report-register-table2 dl dd:nth-of-type(11) { | |
| 89 | + width: 7%; | |
| 90 | +} | |
| 91 | + | |
| 92 | +.report-register-table3 dl dt:nth-of-type(1), .report-register-table3 dl dd:nth-of-type(1) { | |
| 93 | + width: 2%; | |
| 94 | +} | |
| 95 | +.report-register-table3 dl dt:nth-of-type(2), .report-register-table3 dl dd:nth-of-type(2) { | |
| 96 | + width: 4%; | |
| 97 | +} | |
| 98 | +.report-register-table3 dl dt:nth-of-type(3), .report-register-table3 dl dd:nth-of-type(3) { | |
| 99 | + width: 7%; | |
| 100 | +} | |
| 101 | +.report-register-table3 dl dt:nth-of-type(4), .report-register-table3 dl dd:nth-of-type(4) { | |
| 102 | + width: 7%; | |
| 103 | +} | |
| 104 | +.report-register-table3 dl dt:nth-of-type(5), .report-register-table3 dl dd:nth-of-type(5) { | |
| 105 | + width: 12%; | |
| 106 | +} | |
| 107 | +.report-register-table3 dl dt:nth-of-type(6), .report-register-table3 dl dd:nth-of-type(6) { | |
| 108 | + width: 7%; | |
| 109 | +} | |
| 110 | +.report-register-table3 dl dt:nth-of-type(7), .report-register-table3 dl dd:nth-of-type(7) { | |
| 111 | + width: 7%; | |
| 112 | +} | |
| 113 | +.report-register-table3 dl dt:nth-of-type(8), .report-register-table3 dl dd:nth-of-type(8) { | |
| 114 | + width: 7%; | |
| 115 | +} | |
| 116 | +.report-register-table3 dl dt:nth-of-type(9), .report-register-table3 dl dd:nth-of-type(9) { | |
| 117 | + width: 7%; | |
| 118 | +} | |
| 119 | +.report-register-table3 dl dt:nth-of-type(10), .report-register-table3 dl dd:nth-of-type(10) { | |
| 120 | + width: 7%; | |
| 121 | +} | |
| 122 | + | |
| 123 | +.report-register-table4 dl dt:nth-of-type(1), .report-register-table4 dl dd:nth-of-type(1) { | |
| 124 | + width: 2%; | |
| 125 | +} | |
| 126 | +.report-register-table4 dl dt:nth-of-type(2), .report-register-table4 dl dd:nth-of-type(2) { | |
| 127 | + width: 4%; | |
| 128 | +} | |
| 129 | +.report-register-table4 dl dt:nth-of-type(3), .report-register-table4 dl dd:nth-of-type(3) { | |
| 130 | + width: 7%; | |
| 131 | +} | |
| 132 | +.report-register-table4 dl dt:nth-of-type(4), .report-register-table4 dl dd:nth-of-type(4) { | |
| 133 | + width: 7%; | |
| 134 | +} | |
| 135 | +.report-register-table4 dl dt:nth-of-type(5), .report-register-table4 dl dd:nth-of-type(5) { | |
| 136 | + width: 7%; | |
| 137 | +} | |
| 138 | +.report-register-table4 dl dt:nth-of-type(6), .report-register-table4 dl dd:nth-of-type(6) { | |
| 139 | + width: 7%; | |
| 140 | +} | |
| 141 | +.report-register-table4 dl dt:nth-of-type(7), .report-register-table4 dl dd:nth-of-type(7) { | |
| 142 | + width: 7%; | |
| 143 | +} | |
| 144 | +.report-register-table4 dl dt:nth-of-type(8), .report-register-table4 dl dd:nth-of-type(8) { | |
| 145 | + width: 9%; | |
| 146 | +} | |
| 147 | +.report-register-table4 dl dt:nth-of-type(9), .report-register-table4 dl dd:nth-of-type(9) { | |
| 148 | + width: 12%; | |
| 149 | +} | |
| 150 | +.report-register-table4 dl dt:nth-of-type(10), .report-register-table4 dl dd:nth-of-type(10) { | |
| 151 | + width: 7%; | |
| 152 | +} | |
| 153 | +.report-register-table4 dl dt:nth-of-type(11), .report-register-table4 dl dd:nth-of-type(11) { | |
| 154 | + width: 7%; | |
| 155 | +} | |
| 156 | +.report-register-table4 dl dt:nth-of-type(12), .report-register-table4 dl dd:nth-of-type(12) { | |
| 157 | + width: 20%; | |
| 158 | +} | |
| 159 | +.report-register-table4 dl dt:nth-of-type(13), .report-register-table4 dl dd:nth-of-type(13) { | |
| 160 | + width: 7%; | |
| 161 | +} | |
| 162 | +.report-register-table4 dl dt:nth-of-type(14), .report-register-table4 dl dd:nth-of-type(14) { | |
| 163 | + width: 7%; | |
| 164 | +} | |
| 165 | +.report-register-table4 dl dt:nth-of-type(15), .report-register-table4 dl dd:nth-of-type(15) { | |
| 166 | + width: 7%; | |
| 167 | +} | |
| 168 | +.report-register-table4 dl dt:nth-of-type(16), .report-register-table4 dl dd:nth-of-type(16) { | |
| 169 | + width: 7%; | |
| 170 | +} | |
| 171 | +.report-register-table4 dl dt:nth-of-type(17), .report-register-table4 dl dd:nth-of-type(17) { | |
| 172 | + width: 7%; | |
| 173 | +} | |
| 174 | + | |
| 175 | + | |
| 176 | +.report-register-table5 dl dt:nth-of-type(1), .report-register-table5 dl dd:nth-of-type(1) { | |
| 177 | + width: 2%; | |
| 178 | +} | |
| 179 | +.report-register-table5 dl dt:nth-of-type(2), .report-register-table5 dl dd:nth-of-type(2) { | |
| 180 | + width: 4%; | |
| 181 | +} | |
| 182 | +.report-register-table5 dl dt:nth-of-type(3), .report-register-table5 dl dd:nth-of-type(3) { | |
| 183 | + width: 7%; | |
| 184 | +} | |
| 185 | +.report-register-table5 dl dt:nth-of-type(4), .report-register-table5 dl dd:nth-of-type(4) { | |
| 186 | + width: 7%; | |
| 187 | +} | |
| 188 | +.report-register-table5 dl dt:nth-of-type(5), .report-register-table5 dl dd:nth-of-type(5) { | |
| 189 | + width: 7%; | |
| 190 | +} | |
| 191 | + | |
| 192 | + | |
| 193 | +.report-register-table6 dl dt:nth-of-type(1), .report-register-table6 dl dd:nth-of-type(1) { | |
| 194 | + width: 2%; | |
| 195 | +} | |
| 196 | +.report-register-table6 dl dt:nth-of-type(2), .report-register-table6 dl dd:nth-of-type(2) { | |
| 197 | + width: 4%; | |
| 198 | +} | |
| 199 | +.report-register-table6 dl dt:nth-of-type(3), .report-register-table6 dl dd:nth-of-type(3) { | |
| 200 | + width: 7%; | |
| 201 | +} | |
| 202 | +.report-register-table6 dl dt:nth-of-type(4), .report-register-table6 dl dd:nth-of-type(4) { | |
| 203 | + width: 7%; | |
| 204 | +} | |
| 205 | +.report-register-table6 dl dt:nth-of-type(5), .report-register-table6 dl dd:nth-of-type(5) { | |
| 206 | + width: 7%; | |
| 207 | +} | |
| 208 | +.report-register-table6 dl dt:nth-of-type(6), .report-register-table6 dl dd:nth-of-type(6) { | |
| 209 | + width: 7%; | |
| 210 | +} | |
| 0 | 211 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/list.html
0 → 100644
| 1 | +<div class="uk-modal ct_move_modal" id="report-register-modal"> | |
| 2 | + <!-- editable --> | |
| 3 | + <!--<link href="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/css/bootstrap-editable.css" rel="stylesheet" type="text/css" />--> | |
| 4 | + <!-- Bootstrap style --> | |
| 5 | + <link href="/metronic_v4.5.4/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
| 6 | + <!-- select2 下拉框插件 --> | |
| 7 | + <link href="/metronic_v4.5.4/plugins/select2/css/select2.min.css" | |
| 8 | + rel="stylesheet" type="text/css" /> | |
| 9 | + <link | |
| 10 | + href="/metronic_v4.5.4/plugins/select2/css/select2-bootstrap.min.css" | |
| 11 | + rel="stylesheet" type="text/css" /> | |
| 12 | + <style> | |
| 13 | + /*ul.navigation_bar:before {*/ | |
| 14 | + /*content: "报备类型";*/ | |
| 15 | + /*position: absolute;*/ | |
| 16 | + /*top: -9px;*/ | |
| 17 | + /*font-size: 12px;*/ | |
| 18 | + /*background: white;*/ | |
| 19 | + /*padding: 0 4px;*/ | |
| 20 | + /*color: #7d7b7b;*/ | |
| 21 | + /*left: 10px;*/ | |
| 22 | + /*}*/ | |
| 23 | + </style> | |
| 24 | + <div class="uk-modal-dialog" style="width: 1800px;"> | |
| 25 | + <a href="" class="uk-modal-close uk-close"></a> | |
| 26 | + <div class="uk-modal-header"> | |
| 27 | + <h2>报备登记报表</h2> | |
| 28 | + </div> | |
| 29 | + | |
| 30 | + | |
| 31 | + <div style="padding-left: 12px;margin: 10px 0"> | |
| 32 | + <ul class="uk-subnav uk-subnav-pill navigation_bar"> | |
| 33 | + <li id="first_last_late" class="uk-active"><a>首末班误点</a></li> | |
| 34 | + <li id="large_interval"><a>大间隔</a></li> | |
| 35 | + <li id="emergency"><a>突发事件</a></li> | |
| 36 | + <li id="accident"><a>事故</a></li> | |
| 37 | + <li id="rests"><a>其他</a></li> | |
| 38 | + <li id="consult"><a>咨询</a></li> | |
| 39 | + </ul> | |
| 40 | + </div> | |
| 41 | + | |
| 42 | + <div class="uk-panel uk-panel-box uk-panel-box-primary" style="margin: 10px 0;"> | |
| 43 | + <!--<form class="uk-form search-form">--> | |
| 44 | + <!--<fieldset data-uk-margin>--> | |
| 45 | + <span class="horizontal-field">线路</span> | |
| 46 | + <select name="line" id="line" style="width: 180px;"></select> | |
| 47 | + <span class="horizontal-field">时间</span> | |
| 48 | + <input class=" horizontal-field" type="text" id="date1" style="width: 180px;"/> - | |
| 49 | + <input class="horizontal-field" type="text" id="date2" style="width: 180px;"/> | |
| 50 | + | |
| 51 | + <button class="uk-button horizontal-field" id="query">检索</button> | |
| 52 | + <button class="uk-button horizontal-field" id="export">导出</button> | |
| 53 | + <!--</fieldset>--> | |
| 54 | + <!--</form>--> | |
| 55 | + </div> | |
| 56 | + | |
| 57 | + <div class="ct_table_wrap" style="height: 510px"> | |
| 58 | + <!-- 首末班误点--> | |
| 59 | + <table class="table table-striped table-bordered table-hover table-checkable report-register-table active" id="first_last_late_table"> | |
| 60 | + <thead > | |
| 61 | + <tr role="row"> | |
| 62 | + <th width="2%">序号</th> | |
| 63 | + <th width="5%">报备时间</th> | |
| 64 | + <th width="5%">报备人</th> | |
| 65 | + <th width="5%">公司</th> | |
| 66 | + <th width="5%">分公司</th> | |
| 67 | + <th width="7%">线路</th> | |
| 68 | + <th width="7%">延误站点</th> | |
| 69 | + <th width="5%">延误时间</th> | |
| 70 | + <th width="10%">首末班延误原因</th> | |
| 71 | + <th width="7%">对外上报部门</th> | |
| 72 | + <th width="7%">对外上报时间</th> | |
| 73 | + </tr> | |
| 74 | + </thead> | |
| 75 | + <tbody class="table_body"> | |
| 76 | + </tbody> | |
| 77 | + </table> | |
| 78 | + <!-- 大间隔--> | |
| 79 | + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="large_interval_table"> | |
| 80 | + <thead > | |
| 81 | + <tr role="row"> | |
| 82 | + <th width="2%">序号</th> | |
| 83 | + <th width="5%">报备时间</th> | |
| 84 | + <th width="5%">报备人</th> | |
| 85 | + <th width="5%">公司</th> | |
| 86 | + <th width="5%">分公司</th> | |
| 87 | + <th width="7%">线路</th> | |
| 88 | + <th width="7%">路段</th> | |
| 89 | + <th width="7%">行驶方向</th> | |
| 90 | + <th width="7%">站点</th> | |
| 91 | + <th width="7%">大间隔时间</th> | |
| 92 | + <th width="7%">大间隔原因</th> | |
| 93 | + <th width="7%">对外上报部门</th> | |
| 94 | + <th width="7%">对外上报时间</th> | |
| 95 | + </tr> | |
| 96 | + </thead> | |
| 97 | + <tbody class="table_body"> | |
| 98 | + </tbody> | |
| 99 | + </table> | |
| 100 | + <!-- 突发事件--> | |
| 101 | + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="emergency_table"> | |
| 102 | + <thead > | |
| 103 | + <tr role="row"> | |
| 104 | + <th width="2%">序号</th> | |
| 105 | + <th width="5%">报备时间</th> | |
| 106 | + <th width="5%">报备人</th> | |
| 107 | + <th width="5%">公司</th> | |
| 108 | + <th width="5%">分公司</th> | |
| 109 | + <th width="7%">影响线路</th> | |
| 110 | + <th width="7%">重大活动货突发事件</th> | |
| 111 | + <th width="7%">影响时间</th> | |
| 112 | + <th width="7%">影响班次数</th> | |
| 113 | + <th width="7%">调整措施</th> | |
| 114 | + <th width="7%">对外上报部门</th> | |
| 115 | + <th width="7%">对外上报时间</th> | |
| 116 | + </tr> | |
| 117 | + </thead> | |
| 118 | + <tbody class="table_body"> | |
| 119 | + </tbody> | |
| 120 | + </table> | |
| 121 | + <!-- 事故--> | |
| 122 | + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="accident_table"> | |
| 123 | + <thead > | |
| 124 | + <tr role="row"> | |
| 125 | + <th width="2%">序号</th> | |
| 126 | + <th width="5%">报备时间</th> | |
| 127 | + <th width="5%">报备人</th> | |
| 128 | + <th width="5%">公司</th> | |
| 129 | + <th width="5%">分公司</th> | |
| 130 | + <th width="5%">线路</th> | |
| 131 | + <th width="5%">车辆自编号</th> | |
| 132 | + <th width="5%">驾驶员</th> | |
| 133 | + <th width="5%">事故发生时间</th> | |
| 134 | + <th width="5%">事故发生地点</th> | |
| 135 | + <th width="5%">行驶方向</th> | |
| 136 | + <th width="5%">事故对象</th> | |
| 137 | + <th width="5%">对象车牌号</th> | |
| 138 | + <th width="5%">事故概况</th> | |
| 139 | + <th width="5%">受伤人数</th> | |
| 140 | + <th width="5%">死亡人数</th> | |
| 141 | + <th width="5%">报告人</th> | |
| 142 | + <th width="5%">报告人电话</th> | |
| 143 | + <th width="5%">备注</th> | |
| 144 | + </tr> | |
| 145 | + </thead> | |
| 146 | + <tbody class="table_body"> | |
| 147 | + </tbody> | |
| 148 | + </table> | |
| 149 | + <!-- 其他--> | |
| 150 | + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="rests_table"> | |
| 151 | + <tr role="row"> | |
| 152 | + <th width="2%">序号</th> | |
| 153 | + <th width="5%">报备时间</th> | |
| 154 | + <th width="5%">报备人</th> | |
| 155 | + <th width="5%">公司</th> | |
| 156 | + <th width="5%">分公司</th> | |
| 157 | + <th width="7%">线路</th> | |
| 158 | + <th width="7%">报备内容</th> | |
| 159 | + </tr> | |
| 160 | + </thead> | |
| 161 | + <tbody class="table_body"> | |
| 162 | + </tbody> | |
| 163 | + </table> | |
| 164 | + <!-- 咨询--> | |
| 165 | + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="consult_table"> | |
| 166 | + <thead > | |
| 167 | + <tr role="row"> | |
| 168 | + <th width="2%">序号</th> | |
| 169 | + <th width="5%">报备时间</th> | |
| 170 | + <th width="5%">报备人</th> | |
| 171 | + <th width="5%">公司</th> | |
| 172 | + <th width="5%">分公司</th> | |
| 173 | + <th width="7%">线路</th> | |
| 174 | + <th width="7%">班线名称</th> | |
| 175 | + <th width="7%">内容</th> | |
| 176 | + </tr> | |
| 177 | + </thead> | |
| 178 | + <tbody class="table_body"> | |
| 179 | + </tbody> | |
| 180 | + </table> | |
| 181 | + </div> | |
| 182 | + | |
| 183 | + <div class="load-panel"> | |
| 184 | + <i class="uk-icon-spinner uk-icon-spin"></i> | |
| 185 | + 正在加载数据 | |
| 186 | + </div> | |
| 187 | + </div> | |
| 188 | + | |
| 189 | + <script id="first_last_late_table_body_list" type="text/html"> | |
| 190 | + {{each data.list as obj i}} | |
| 191 | + {{if obj.status == 2}} | |
| 192 | + <tr style="background-color: #ff5f78"> | |
| 193 | + {{else}} | |
| 194 | + <tr> | |
| 195 | + {{/if}} | |
| 196 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 197 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 198 | + <td style="vertical-align: middle;">{{obj.report_BBR}}</td> | |
| 199 | + <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td> | |
| 200 | + <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td> | |
| 201 | + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td> | |
| 202 | + <td style="vertical-align: middle;">{{obj.report_STATION}}</td> | |
| 203 | + <td style="vertical-align: middle;">{{obj.report_YWSJ}}</td> | |
| 204 | + <td style="vertical-align: middle;">{{obj.report_SMBWD}}</td> | |
| 205 | + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td> | |
| 206 | + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td> | |
| 207 | + </tr> | |
| 208 | + {{/each}} | |
| 209 | + </script> | |
| 210 | + <script id="large_interval_table_body_list" type="text/html"> | |
| 211 | + {{each data.list as obj i}} | |
| 212 | + {{if obj.status == 2}} | |
| 213 | + <tr style="background-color: #ff5f78"> | |
| 214 | + {{else}} | |
| 215 | + <tr> | |
| 216 | + {{/if}} | |
| 217 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 218 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 219 | + <td style="vertical-align: middle;">{{obj.report_BBR}}</td> | |
| 220 | + <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td> | |
| 221 | + <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td> | |
| 222 | + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td> | |
| 223 | + <td style="vertical-align: middle;">{{obj.report_ROAD}}</td> | |
| 224 | + <td style="vertical-align: middle;">{{obj.report_XSFX}}</td> | |
| 225 | + <td style="vertical-align: middle;">{{obj.report_STATION}}</td> | |
| 226 | + <td style="vertical-align: middle;">{{obj.report_DJGSNAMEJ}}</td> | |
| 227 | + <td style="vertical-align: middle;">{{obj.report_DJGYY}}</td> | |
| 228 | + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td> | |
| 229 | + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td> | |
| 230 | + </tr> | |
| 231 | + {{/each}} | |
| 232 | + </script> | |
| 233 | + <script id="emergency_table_body_list" type="text/html"> | |
| 234 | + {{each data.list as obj i}} | |
| 235 | + {{if obj.status == 2}} | |
| 236 | + <tr style="background-color: #ff5f78"> | |
| 237 | + {{else}} | |
| 238 | + <tr> | |
| 239 | + {{/if}} | |
| 240 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 241 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 242 | + <td style="vertical-align: middle;">{{obj.report_BBR}}</td> | |
| 243 | + <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td> | |
| 244 | + <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td> | |
| 245 | + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td> | |
| 246 | + <td style="vertical-align: middle;">{{obj.report_TFSJ}}</td> | |
| 247 | + <td style="vertical-align: middle;">{{obj.report_YXSJ}}</td> | |
| 248 | + <td style="vertical-align: middle;">{{obj.report_YXBC}}</td> | |
| 249 | + <td style="vertical-align: middle;">{{obj.report_TZCS}}</td> | |
| 250 | + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td> | |
| 251 | + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td> | |
| 252 | + </tr> | |
| 253 | + {{/each}} | |
| 254 | + </script> | |
| 255 | + <script id="accident_table_body_list" type="text/html"> | |
| 256 | + {{each data.list as obj i}} | |
| 257 | + {{if obj.status == 2}} | |
| 258 | + <tr style="background-color: #ff5f78"> | |
| 259 | + {{else}} | |
| 260 | + <tr> | |
| 261 | + {{/if}} | |
| 262 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 263 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 264 | + <td style="vertical-align: middle;">{{obj.report_BBR}}</td> | |
| 265 | + <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td> | |
| 266 | + <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td> | |
| 267 | + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td> | |
| 268 | + <td style="vertical-align: middle;">{{obj.report_ZBH}}</td> | |
| 269 | + <td style="vertical-align: middle;">{{obj.report_JSY}}</td> | |
| 270 | + <td style="vertical-align: middle;">{{obj.report_SGSJ}}</td> | |
| 271 | + <td style="vertical-align: middle;">{{obj.report_SGDD}}</td> | |
| 272 | + <td style="vertical-align: middle;">{{obj.report_XSFX}}</td> | |
| 273 | + <td style="vertical-align: middle;">{{obj.report_SGDX}}</td> | |
| 274 | + <td style="vertical-align: middle;">{{obj.report_DXPZH}}</td> | |
| 275 | + <td style="vertical-align: middle;">{{obj.report_SGGK}}</td> | |
| 276 | + <td style="vertical-align: middle;">{{obj.report_SSRS}}</td> | |
| 277 | + <td style="vertical-align: middle;">{{obj.report_SWRS}}</td> | |
| 278 | + <td style="vertical-align: middle;">{{obj.report_BGR}}</td> | |
| 279 | + <td style="vertical-align: middle;">{{obj.report_BGRDH}}</td> | |
| 280 | + <td style="vertical-align: middle;">{{obj.report_BZ}}</td> | |
| 281 | + </tr> | |
| 282 | + {{/each}} | |
| 283 | + </script> | |
| 284 | + <script id="rests_table_body_list" type="text/html"> | |
| 285 | + {{each data.list as obj i}} | |
| 286 | + {{if obj.status == 2}} | |
| 287 | + <tr style="background-color: #ff5f78"> | |
| 288 | + {{else}} | |
| 289 | + <tr> | |
| 290 | + {{/if}} | |
| 291 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 292 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 293 | + <td style="vertical-align: middle;">{{obj.report_BBR}}</td> | |
| 294 | + <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td> | |
| 295 | + <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td> | |
| 296 | + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td> | |
| 297 | + <td style="vertical-align: middle;">{{obj.report_BZ}}</td> | |
| 298 | + </tr> | |
| 299 | + {{/each}} | |
| 300 | + </script> | |
| 301 | + <script id="consult_table_body_list" type="text/html"> | |
| 302 | + {{each data.list as obj i}} | |
| 303 | + {{if obj.status == 2}} | |
| 304 | + <tr style="background-color: #ff5f78"> | |
| 305 | + {{else}} | |
| 306 | + <tr> | |
| 307 | + {{/if}} | |
| 308 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 309 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 310 | + <td style="vertical-align: middle;">{{obj.report_BBR}}</td> | |
| 311 | + <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td> | |
| 312 | + <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td> | |
| 313 | + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td> | |
| 314 | + <td style="vertical-align: middle;">{{obj.report_STATION}}</td> | |
| 315 | + <td style="vertical-align: middle;">{{obj.report_BZ}}</td> | |
| 316 | + </tr> | |
| 317 | + {{/each}} | |
| 318 | + </script> | |
| 319 | + | |
| 320 | + | |
| 321 | + <!-- common js --> | |
| 322 | + <script src="/assets/js/common.js"></script> | |
| 323 | + <!-- select2 下拉框 --> | |
| 324 | + <script src="/metronic_v4.5.4/plugins/select2/js/select2.full.min.js"></script> | |
| 325 | + <!-- moment.js 日期处理类库 --> | |
| 326 | + <script src="/assets/plugins/moment-with-locales.js" data-exclude=1></script> | |
| 327 | + <!-- 日期控件 --> | |
| 328 | + <script src="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/js/bootstrap-datetimepicker.min.js"></script> | |
| 329 | + <!-- bootstrap --> | |
| 330 | + <script src="/metronic_v4.5.4/plugins/bootstrap/js/bootstrap.min.js" data-exclude=1></script> | |
| 331 | + <!--<script src="/metronic_v4.5.4/plugins/bootstrap-wizard/jquery.bootstrap.wizard.min.js"></script>--> | |
| 332 | + <!-- editable.js --> | |
| 333 | + <!--<script src="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.min.js"></script>--> | |
| 334 | + <script> | |
| 335 | + var manageJs = (function () { | |
| 336 | + $('#export').attr('disabled', "true"); | |
| 337 | + | |
| 338 | + var modal = '#report-register-modal'; | |
| 339 | + var activeDiv='first_last_late_table'; | |
| 340 | + var lineList = gb_data_basic.activeLines; | |
| 341 | + var loading=false; | |
| 342 | + | |
| 343 | + var line = $("#line").val(); | |
| 344 | + var date1 = $("#date1").val(); | |
| 345 | + var date2 = $("#date2").val(); | |
| 346 | + var dataType = $("#dataType").val(); | |
| 347 | + var lineName = $('#line option:selected').text(); | |
| 348 | + | |
| 349 | + $(modal).on('init', function (e,data) { | |
| 350 | + | |
| 351 | + $("#date1").datetimepicker({ | |
| 352 | + format : 'YYYY-MM-DD', | |
| 353 | + locale : 'zh-cn' | |
| 354 | + }); | |
| 355 | + $("#date2").datetimepicker({ | |
| 356 | + format : 'YYYY-MM-DD', | |
| 357 | + locale : 'zh-cn' | |
| 358 | + }); | |
| 359 | + $('#date1').val(moment(new Date()).format('YYYY-MM-DD')); | |
| 360 | + $('#date2').val(moment(new Date()).format('YYYY-MM-DD')); | |
| 361 | + var data = []; | |
| 362 | + $.get('/user/companyData', function(result){ | |
| 363 | + for(var i = 0; i < result.length; i++){ | |
| 364 | + var companyCode = result[i].companyCode; | |
| 365 | + var children = result[i].children; | |
| 366 | + for(var j = 0; j < children.length; j++){ | |
| 367 | + var code = children[j].code; | |
| 368 | + for(var k=0;k < lineList.length;k++ ){ | |
| 369 | + if(lineList[k]["brancheCompany"]==code && lineList[k]["company"]==companyCode){ | |
| 370 | + data.push({id: lineList[k]["lineCode"], text: lineList[k]["name"]}); | |
| 371 | + } | |
| 372 | + } | |
| 373 | + } | |
| 374 | + } | |
| 375 | + initPinYinSelect2('#line',data,''); | |
| 376 | + | |
| 377 | + }); | |
| 378 | + | |
| 379 | + //滚动条 | |
| 380 | + $('.report-register-table-wrap', modal).perfectScrollbar(); | |
| 381 | + }); | |
| 382 | + | |
| 383 | + $("#query").on("click",function(){ | |
| 384 | + if(loading) | |
| 385 | + return; | |
| 386 | + $('.load-panel', modal).show(); | |
| 387 | + loading=true; | |
| 388 | + line = $("#line").val(); | |
| 389 | + date1 = $("#date1").val(); | |
| 390 | + date2 = $("#date2").val(); | |
| 391 | + if(line == null || line == '' || line.length == 0){ | |
| 392 | + $('.load-panel', modal).hide(); | |
| 393 | + loading=false; | |
| 394 | + layer.msg("请选择线路"); | |
| 395 | + return; | |
| 396 | + } | |
| 397 | + if(date1 == null || date1.trim().length == 0 || date2 == null || date2.trim().length == 0){ | |
| 398 | + $('.load-panel', modal).hide(); | |
| 399 | + loading=false; | |
| 400 | + layer.msg("请选择时间"); | |
| 401 | + return; | |
| 402 | + } else if(date1 > date2){ | |
| 403 | + $('.load-panel', modal).hide(); | |
| 404 | + loading=false; | |
| 405 | + layer.msg("时间区间不正确,第二个时间不能大于第一个时间"); | |
| 406 | + return; | |
| 407 | + } | |
| 408 | + var type = "query"; | |
| 409 | + gb_common.$get("/reportRegister/findList", {lineCodes:line,date1:date1,date2:date2,type:type}, function (data) { | |
| 410 | + if (data.status == "SUCCESS") { | |
| 411 | + var list = data.list; | |
| 412 | + var tableList1 = [], tableList2 = [], tableList3 = [], tableList4 = [], tableList5 = [], | |
| 413 | + tableList6 = []; | |
| 414 | + $.each(list, function (i, rr) { | |
| 415 | + rr.report_DATE = formatDate(new Date(rr.report_DATE)); | |
| 416 | + if (rr.report_TYPE == 1) { | |
| 417 | + tableList1.push(rr); | |
| 418 | + } else if (rr.report_TYPE == 2) { | |
| 419 | + tableList2.push(rr); | |
| 420 | + } else if (rr.report_TYPE == 3) { | |
| 421 | + tableList3.push(rr); | |
| 422 | + } else if (rr.report_TYPE == 4) { | |
| 423 | + tableList4.push(rr); | |
| 424 | + } else if (rr.report_TYPE == 5) { | |
| 425 | + tableList5.push(rr); | |
| 426 | + } else if (rr.report_TYPE == 6) { | |
| 427 | + tableList6.push(rr); | |
| 428 | + } | |
| 429 | + }); | |
| 430 | + var htmlStr = template('first_last_late_table_body_list', {'data':{'list': tableList1,'line':lineList}}); | |
| 431 | + $('#first_last_late_table .table_body', modal).html(htmlStr); | |
| 432 | + htmlStr = template('large_interval_table_body_list', {'data':{'list': tableList2,'line':lineList}}); | |
| 433 | + $('#large_interval_table .table_body', modal).html(htmlStr); | |
| 434 | + htmlStr = template('emergency_table_body_list', {'data':{'list': tableList3,'line':lineList}}); | |
| 435 | + $('#emergency_table .table_body', modal).html(htmlStr); | |
| 436 | + htmlStr = template('accident_table_body_list', {'data':{'list': tableList4,'line':lineList}}); | |
| 437 | + $('#accident_table .table_body', modal).html(htmlStr); | |
| 438 | + htmlStr = template('rests_table_body_list', {'data':{'list': tableList5,'line':lineList}}); | |
| 439 | + $('#rests_table .table_body', modal).html(htmlStr); | |
| 440 | + htmlStr = template('consult_table_body_list', {'data':{'list': tableList6,'line':lineList}}); | |
| 441 | + $('#consult_table .table_body', modal).html(htmlStr); | |
| 442 | + $('.load-panel', modal).hide(); | |
| 443 | + loading=false; | |
| 444 | + if(list.length == 0) | |
| 445 | + $("#export").attr('disabled',"true"); | |
| 446 | + else | |
| 447 | + $("#export").removeAttr("disabled"); | |
| 448 | + } | |
| 449 | + }); | |
| 450 | + }); | |
| 451 | + | |
| 452 | + $("#export").on("click",function(){ | |
| 453 | + line = $("#line").val(); | |
| 454 | + date1 = $("#date1").val(); | |
| 455 | + date2 = $("#date2").val(); | |
| 456 | + var dateTime=''; | |
| 457 | + if (date1 == date2) { | |
| 458 | + dateTime = moment(date1).format("YYYYMMDD"); | |
| 459 | + } else { | |
| 460 | + dateTime = moment(date1).format("YYYYMMDD") | |
| 461 | + +"-"+moment(date2).format("YYYYMMDD"); | |
| 462 | + } | |
| 463 | + if(date1 == null || date1.trim().length == 0 || date2 == null || date2.trim().length == 0){ | |
| 464 | + layer.msg("请选择时间"); | |
| 465 | + return; | |
| 466 | + } else if(date1 > date2){ | |
| 467 | + layer.msg("时间区间不正确,第二个时间不能大于第一个时间"); | |
| 468 | + return; | |
| 469 | + } | |
| 470 | + lineName = $('#line option:selected').text(); | |
| 471 | + var type = "export"; | |
| 472 | + gb_common.$get("/reportRegister/findList", {lineCodes:line,lineName:lineName,date1:date1,date2:date2,type:type}, function (data) { | |
| 473 | + if (data.status == "SUCCESS") { | |
| 474 | + window.open("/downloadFile/download?fileName=" | |
| 475 | + +dateTime+"_"+lineName+"_报备登记"); | |
| 476 | + } | |
| 477 | + }); | |
| 478 | + }); | |
| 479 | + | |
| 480 | + | |
| 481 | + $(modal).on('click', '.navigation_bar li', function () { | |
| 482 | + $(this).parent().find('li.uk-active').removeClass('uk-active'); | |
| 483 | + $(this).addClass('uk-active'); | |
| 484 | + var typeName = $(this).attr('id'); | |
| 485 | + var oldActiveDivId = $("#"+typeName+"_table").parent().find('.active'); | |
| 486 | + var oldActiveDiv = document.getElementById(oldActiveDivId.attr('id')); | |
| 487 | + oldActiveDiv.style.display = "none"; | |
| 488 | + oldActiveDivId.removeClass("active"); | |
| 489 | + | |
| 490 | + activeDiv = typeName+"_table"; | |
| 491 | + $("#"+typeName+"_table").addClass("active"); | |
| 492 | + var activeTable = document.getElementById(typeName+"_table"); | |
| 493 | + activeTable.style.display = ""; | |
| 494 | + }); | |
| 495 | + | |
| 496 | + var formatDate = function(now) { | |
| 497 | + var year=now.getFullYear(); | |
| 498 | + var month=now.getMonth()+1; | |
| 499 | + var date=now.getDate(); | |
| 500 | + var hour=now.getHours(); | |
| 501 | + var minute=now.getMinutes(); | |
| 502 | + var second=now.getSeconds(); | |
| 503 | + return year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second; | |
| 504 | + }; | |
| 505 | + | |
| 506 | + })(); | |
| 507 | + </script> | |
| 508 | +</div> | |
| 0 | 509 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/list2.html
0 → 100644
| 1 | +<style type="text/css"> | |
| 2 | + .table-bordered { | |
| 3 | + border: 1px solid; } | |
| 4 | + .table-bordered > thead > tr > th, | |
| 5 | + .table-bordered > thead > tr > td, | |
| 6 | + .table-bordered > tbody > tr > th, | |
| 7 | + .table-bordered > tbody > tr > td, | |
| 8 | + .table-bordered > tfoot > tr > th, | |
| 9 | + .table-bordered > tfoot > tr > td { | |
| 10 | + border: 1px solid; } | |
| 11 | + .table-bordered > thead > tr > th, | |
| 12 | + .table-bordered > thead > tr > td { | |
| 13 | + border-bottom-width: 2px; } | |
| 14 | + | |
| 15 | + .table > tbody + tbody { | |
| 16 | + border-top: 1px solid; } | |
| 17 | +</style> | |
| 18 | + | |
| 19 | +<div class="page-head"> | |
| 20 | + <div class="page-title"> | |
| 21 | + <h1>报备登记报表</h1> | |
| 22 | + </div> | |
| 23 | +</div> | |
| 24 | + | |
| 25 | +<div class="row"> | |
| 26 | + <div class="col-md-12"> | |
| 27 | + <div class="portlet light porttlet-fit bordered"> | |
| 28 | + <div class="portlet-title"> | |
| 29 | + <form id="history" class="form-inline" action=""> | |
| 30 | + <div style="display: inline-block;"> | |
| 31 | + <span class="item-label" style="width: 80px;">线路: </span> | |
| 32 | + <select class="form-control" name="line" id="line" style="width: 180px;"></select> | |
| 33 | + </div> | |
| 34 | + <div style="display: inline-block;margin-left: 15px;"> | |
| 35 | + <span class="item-label" style="width: 80px;">时间: </span> | |
| 36 | + <input class="form-control" type="text" id="date1" style="width: 180px;"/> - | |
| 37 | + <input class="form-control" type="text" id="date2" style="width: 180px;"/> | |
| 38 | + </div> | |
| 39 | + <div style="display: inline-block;margin-left: 15px"> | |
| 40 | + <span class="item-label" style="width: 140px;">类型: </span> | |
| 41 | + <select class="form-control" name="code" id="code" style="width: 180px;"> | |
| 42 | + <!--<option value="0">所有类型</option>--> | |
| 43 | + <option value="1">首末班误点</option> | |
| 44 | + <option value="2">大间隔</option> | |
| 45 | + <option value="3">突发事件</option> | |
| 46 | + <option value="4">事故</option> | |
| 47 | + <option value="5">其他</option> | |
| 48 | + <option value="6">咨询</option> | |
| 49 | + </select> | |
| 50 | + </div> | |
| 51 | + <div class="form-group"> | |
| 52 | + <input class="btn btn-default" type="button" id="query" value="筛选"/> | |
| 53 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | |
| 54 | + </div> | |
| 55 | + </form> | |
| 56 | + </div> | |
| 57 | + <div class="portlet-body"> | |
| 58 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px;"> | |
| 59 | + <table class="table table-bordered table-hover table-checkable" id="forms"> | |
| 60 | + | |
| 61 | + </table> | |
| 62 | + </div> | |
| 63 | + </div> | |
| 64 | + </div> | |
| 65 | + </div> | |
| 66 | + | |
| 67 | + <script> | |
| 68 | + $(function(){ | |
| 69 | + $('#export').attr('disabled', "true"); | |
| 70 | + | |
| 71 | + // 关闭左侧栏 | |
| 72 | + if (!$('body').hasClass('page-sidebar-closed')) | |
| 73 | + $('.menu-toggler.sidebar-toggler').click(); | |
| 74 | + | |
| 75 | + $("#date").datetimepicker({ | |
| 76 | + format : 'YYYY-MM-DD', | |
| 77 | + locale : 'zh-cn' | |
| 78 | + }); | |
| 79 | + | |
| 80 | + $.get('/report/lineList',function(xlList){ | |
| 81 | + var data = []; | |
| 82 | + $.get('/user/companyData', function(result){ | |
| 83 | + for(var i = 0; i < result.length; i++){ | |
| 84 | + var companyCode = result[i].companyCode; | |
| 85 | + var children = result[i].children; | |
| 86 | + for(var j = 0; j < children.length; j++){ | |
| 87 | + var code = children[j].code; | |
| 88 | + for(var k=0;k < xlList.length;k++ ){ | |
| 89 | + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){ | |
| 90 | + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]}); | |
| 91 | + } | |
| 92 | + } | |
| 93 | + } | |
| 94 | + } | |
| 95 | + initPinYinSelect2('#line',data,''); | |
| 96 | + | |
| 97 | + }); | |
| 98 | + }); | |
| 99 | + | |
| 100 | + | |
| 101 | + $('#code').select2({ | |
| 102 | + ajax: { | |
| 103 | + url: '/realSchedule/sreachVehic', | |
| 104 | + dataType: 'json', | |
| 105 | + delay: 150, | |
| 106 | + data: function(params){ | |
| 107 | + return{nbbm: params.term}; | |
| 108 | + }, | |
| 109 | + processResults: function (data) { | |
| 110 | + return { | |
| 111 | + results: data | |
| 112 | + }; | |
| 113 | + }, | |
| 114 | + cache: true | |
| 115 | + }, | |
| 116 | + templateResult: function(repo){ | |
| 117 | + if (repo.loading) return repo.text; | |
| 118 | + var h = '<span>'+repo.text+'</span>'; | |
| 119 | + h += (repo.lineName?' <span class="select2-desc">'+repo.lineName+'</span>':''); | |
| 120 | + return h; | |
| 121 | + }, | |
| 122 | + escapeMarkup: function (markup) { return markup; }, | |
| 123 | + minimumInputLength: 1, | |
| 124 | + templateSelection: function(repo){ | |
| 125 | + return repo.text; | |
| 126 | + }, | |
| 127 | + language: { | |
| 128 | + noResults: function(){ | |
| 129 | + return '<span style="color:red;font-size: 12px;">没有搜索到车辆!</span>'; | |
| 130 | + }, | |
| 131 | + inputTooShort : function(e) { | |
| 132 | + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入自编号搜索车辆</span>'; | |
| 133 | + }, | |
| 134 | + searching : function() { | |
| 135 | + return '<span style="color:gray;font-size: 12px;"> 正在搜索车辆...</span>'; | |
| 136 | + } | |
| 137 | + } | |
| 138 | + }); | |
| 139 | + | |
| 140 | + var line = $("#line").val(); | |
| 141 | + var date = $("#date").val(); | |
| 142 | + var code = $("#code").val(); | |
| 143 | + var lineName = $('#line option:selected').text(); | |
| 144 | + $("#query").on("click",function(){ | |
| 145 | + if($("#date").val() == null || $("#date").val().trim().length == 0){ | |
| 146 | + layer.msg("请选择时间"); | |
| 147 | + return; | |
| 148 | + } | |
| 149 | + line = $("#line").val(); | |
| 150 | + date = $("#date").val(); | |
| 151 | + code = $("#code").val(); | |
| 152 | + lineName = $('#line option:selected').text(); | |
| 153 | + var type = "query"; | |
| 154 | + $(".hidden").removeClass("hidden"); | |
| 155 | + var i = layer.load(2); | |
| 156 | + $get('/realSchedule/wxsb',{line:line,date:date,code:code,type:type},function(result){ | |
| 157 | + // 把数据填充到模版中 | |
| 158 | + var tbodyHtml = template('list_repair',{list:result}); | |
| 159 | + // 把渲染好的模版html文本追加到表格中 | |
| 160 | + $('#forms tbody').html(tbodyHtml); | |
| 161 | + layer.close(i); | |
| 162 | + | |
| 163 | + if(result.length == 0) | |
| 164 | + $("#export").attr('disabled',"true"); | |
| 165 | + else | |
| 166 | + $("#export").removeAttr("disabled"); | |
| 167 | + | |
| 168 | + }); | |
| 169 | + }); | |
| 170 | + | |
| 171 | + $("#export").on("click",function(){ | |
| 172 | + var type = "export"; | |
| 173 | + var i = layer.load(2); | |
| 174 | + $get('/realSchedule/wxsb', {line:line,date:date,code:code,type:type}, function(result){ | |
| 175 | + window.open("/downloadFile/download?fileName=" | |
| 176 | + +moment(date).format("YYYYMMDD") | |
| 177 | + +"-"+lineName+"-维修上报记录"); | |
| 178 | + layer.close(i); | |
| 179 | + }); | |
| 180 | + }); | |
| 181 | + | |
| 182 | + }); | |
| 183 | + </script> | |
| 184 | + <script type="text/html" id="table1"> | |
| 185 | + <thead> | |
| 186 | + <tr> | |
| 187 | + <th width="4%">序号</th> | |
| 188 | + <th width="5%">报备时间</th> | |
| 189 | + <th width="7%">线路</th> | |
| 190 | + <th width="7%">延误站点</th> | |
| 191 | + <th width="5%">延误时间</th> | |
| 192 | + <th width="10%">首末班延误原因</th> | |
| 193 | + <th width="7%">对外上报部门</th> | |
| 194 | + <th width="7%">对外上报时间</th> | |
| 195 | + </tr> | |
| 196 | + </thead> | |
| 197 | + <tbody> | |
| 198 | + {{each data.list as obj i}} | |
| 199 | + <tr> | |
| 200 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 201 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 202 | + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td> | |
| 203 | + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td> | |
| 204 | + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td> | |
| 205 | + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td> | |
| 206 | + <td style="vertical-align: middle;">{{obj.report_STATION}}</td> | |
| 207 | + <td style="vertical-align: middle;">{{obj.report_YWSJ}}</td> | |
| 208 | + <td style="vertical-align: middle;">{{obj.report_SMBWD}}</td> | |
| 209 | + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td> | |
| 210 | + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td> | |
| 211 | + </tr> | |
| 212 | + {{/each}} | |
| 213 | + {{if list.length == 0}} | |
| 214 | + <tr> | |
| 215 | + <td colspan="8"><h6 class="muted">没有找到相关数据</h6></td> | |
| 216 | + </tr> | |
| 217 | + {{/if}} | |
| 218 | + </tbody> | |
| 219 | + </script> | |
| 220 | + <script type="text/html" id="table2"> | |
| 221 | + <thead> | |
| 222 | + <tr> | |
| 223 | + <th width="4%">序号</th> | |
| 224 | + <th width="5%">报备时间</th> | |
| 225 | + <th width="7%">线路</th> | |
| 226 | + <th width="7%">路段</th> | |
| 227 | + <th width="7%">行驶方向</th> | |
| 228 | + <th width="7%">站点</th> | |
| 229 | + <th width="7%">大间隔时间</th> | |
| 230 | + <th width="7%">大间隔原因</th> | |
| 231 | + <th width="7%">对外上报部门</th> | |
| 232 | + <th width="7%">对外上报时间</th> | |
| 233 | + </tr> | |
| 234 | + </thead> | |
| 235 | + <tbody> | |
| 236 | + {{each list as obj i}} | |
| 237 | + <tr> | |
| 238 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 239 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 240 | + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td> | |
| 241 | + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td> | |
| 242 | + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td> | |
| 243 | + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td> | |
| 244 | + <td style="vertical-align: middle;">{{obj.report_ROAD}}</td> | |
| 245 | + <td style="vertical-align: middle;">{{obj.report_XSFX}}</td> | |
| 246 | + <td style="vertical-align: middle;">{{obj.report_STATION}}</td> | |
| 247 | + <td style="vertical-align: middle;">{{obj.report_DJGSJ}}</td> | |
| 248 | + <td style="vertical-align: middle;">{{obj.report_DJGYY}}</td> | |
| 249 | + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td> | |
| 250 | + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td> | |
| 251 | + </tr> | |
| 252 | + {{/each}} | |
| 253 | + {{if list.length == 0}} | |
| 254 | + <tr> | |
| 255 | + <td colspan="10"><h6 class="muted">没有找到相关数据</h6></td> | |
| 256 | + </tr> | |
| 257 | + {{/if}} | |
| 258 | + </tbody> | |
| 259 | + </script> | |
| 260 | + <script type="text/html" id="table3"> | |
| 261 | + <thead> | |
| 262 | + <tr> | |
| 263 | + <th width="4%">序号</th> | |
| 264 | + <th width="5%">报备时间</th> | |
| 265 | + <th width="7%">影响线路</th> | |
| 266 | + <th width="7%">重大活动货突发事件</th> | |
| 267 | + <th width="7%">影响时间</th> | |
| 268 | + <th width="7%">影响班次数</th> | |
| 269 | + <th width="7%">调整措施</th> | |
| 270 | + <th width="7%">对外上报部门</th> | |
| 271 | + <th width="7%">对外上报时间</th> | |
| 272 | + </tr> | |
| 273 | + </thead> | |
| 274 | + <tbody> | |
| 275 | + {{each list as obj i}} | |
| 276 | + <tr> | |
| 277 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 278 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 279 | + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td> | |
| 280 | + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td> | |
| 281 | + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td> | |
| 282 | + <td style="vertical-align: middle;display:none">{{obj.report_XLNAME}}</td> | |
| 283 | + <td style="vertical-align: middle;">{{obj.report_TFSJ}}</td> | |
| 284 | + <td style="vertical-align: middle;">{{obj.report_YXSJ}}</td> | |
| 285 | + <td style="vertical-align: middle;">{{obj.report_YXBC}}</td> | |
| 286 | + <td style="vertical-align: middle;">{{obj.report_TZCS}}</td> | |
| 287 | + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td> | |
| 288 | + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td> | |
| 289 | + </tr> | |
| 290 | + {{/each}} | |
| 291 | + {{if list.length == 0}} | |
| 292 | + <tr> | |
| 293 | + <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td> | |
| 294 | + </tr> | |
| 295 | + {{/if}} | |
| 296 | + </tbody> | |
| 297 | + </script> | |
| 298 | + <script type="text/html" id="table4"> | |
| 299 | + <thead> | |
| 300 | + <tr> | |
| 301 | + <th width="3%">序号</th> | |
| 302 | + <th width="5%">报备时间</th> | |
| 303 | + <th width="7%">线路</th> | |
| 304 | + <th width="7%">车辆自编号</th> | |
| 305 | + <th width="7%">驾驶员</th> | |
| 306 | + <th width="7%">事故发生时间</th> | |
| 307 | + <th width="7%">事故发生地点</th> | |
| 308 | + <th width="7%">行驶方向</th> | |
| 309 | + <th width="7%">事故对象</th> | |
| 310 | + <th width="7%">对象车牌号</th> | |
| 311 | + <th width="7%">事故概况</th> | |
| 312 | + <th width="7%">受伤人数</th> | |
| 313 | + <th width="7%">死亡人数</th> | |
| 314 | + <th width="7%">报告人</th> | |
| 315 | + <th width="7%">报告人电话</th> | |
| 316 | + <th width="7%">备注</th> | |
| 317 | + </tr> | |
| 318 | + </thead> | |
| 319 | + <tbody> | |
| 320 | + {{each list as obj i}} | |
| 321 | + <tr> | |
| 322 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 323 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 324 | + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td> | |
| 325 | + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td> | |
| 326 | + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td> | |
| 327 | + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td> | |
| 328 | + <td style="vertical-align: middle;">{{obj.report_ZBH}}</td> | |
| 329 | + <td style="vertical-align: middle;">{{obj.report_JSY}}</td> | |
| 330 | + <td style="vertical-align: middle;">{{obj.report_SGSJ}}</td> | |
| 331 | + <td style="vertical-align: middle;">{{obj.report_SGDD}}</td> | |
| 332 | + <td style="vertical-align: middle;">{{obj.report_XSFX}}</td> | |
| 333 | + <td style="vertical-align: middle;">{{obj.report_SGDX}}</td> | |
| 334 | + <td style="vertical-align: middle;">{{obj.report_DXPZH}}</td> | |
| 335 | + <td style="vertical-align: middle;">{{obj.report_SGGK}}</td> | |
| 336 | + <td style="vertical-align: middle;">{{obj.report_SSRS}}</td> | |
| 337 | + <td style="vertical-align: middle;">{{obj.report_SWRS}}</td> | |
| 338 | + <td style="vertical-align: middle;">{{obj.report_BGR}}</td> | |
| 339 | + <td style="vertical-align: middle;">{{obj.report_BGRDH}}</td> | |
| 340 | + <td style="vertical-align: middle;">{{obj.report_BZ}}</td> | |
| 341 | + </tr> | |
| 342 | + {{/each}} | |
| 343 | + {{if list.length == 0}} | |
| 344 | + <tr> | |
| 345 | + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td> | |
| 346 | + </tr> | |
| 347 | + {{/if}} | |
| 348 | + </tbody> | |
| 349 | + </script> | |
| 350 | + <script type="text/html" id="table5"> | |
| 351 | + <thead> | |
| 352 | + <tr> | |
| 353 | + <th width="4%">序号</th> | |
| 354 | + <th width="5%">报备时间</th> | |
| 355 | + <th width="7%">线路</th> | |
| 356 | + <th width="7%">报备内容</th> | |
| 357 | + </tr> | |
| 358 | + </thead> | |
| 359 | + <tbody> | |
| 360 | + {{each list as obj i}} | |
| 361 | + <tr> | |
| 362 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 363 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 364 | + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td> | |
| 365 | + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td> | |
| 366 | + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td> | |
| 367 | + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td> | |
| 368 | + <td style="vertical-align: middle;">{{obj.report_BZ}}</td> | |
| 369 | + </tr> | |
| 370 | + {{/each}} | |
| 371 | + {{if list.length == 0}} | |
| 372 | + <tr> | |
| 373 | + <td colspan="4"><h6 class="muted">没有找到相关数据</h6></td> | |
| 374 | + </tr> | |
| 375 | + {{/if}} | |
| 376 | + </tbody> | |
| 377 | + </script> | |
| 378 | + <script type="text/html" id="table6"> | |
| 379 | + <thead> | |
| 380 | + <tr> | |
| 381 | + <th width="4%">序号</th> | |
| 382 | + <th width="5%">报备时间</th> | |
| 383 | + <th width="7%">线路</th> | |
| 384 | + <th width="7%">班线名称</th> | |
| 385 | + <th width="7%">内容</th> | |
| 386 | + </tr> | |
| 387 | + </thead> | |
| 388 | + <tbody> | |
| 389 | + {{each list as obj i}} | |
| 390 | + <tr> | |
| 391 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 392 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 393 | + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td> | |
| 394 | + <td style="vertical-align: middle;">{{obj.report_STATION}}</td> | |
| 395 | + <td style="vertical-align: middle;">{{obj.report_BZ}}</td> | |
| 396 | + </tr> | |
| 397 | + {{/each}} | |
| 398 | + {{if list.length == 0}} | |
| 399 | + <tr> | |
| 400 | + <td colspan="5"><h6 class="muted">没有找到相关数据</h6></td> | |
| 401 | + </tr> | |
| 402 | + {{/if}} | |
| 403 | + </tbody> | |
| 404 | + </script> | |
| 405 | + | |
| 406 | + <script> | |
| 407 | + (function () { | |
| 408 | + $('#export').attr('disabled', "true"); | |
| 409 | + | |
| 410 | + // 关闭左侧栏 | |
| 411 | + if (!$('body').hasClass('page-sidebar-closed')) | |
| 412 | + $('.menu-toggler.sidebar-toggler').click(); | |
| 413 | + | |
| 414 | + $("#date1").datetimepicker({ | |
| 415 | + format : 'YYYY-MM-DD', | |
| 416 | + locale : 'zh-cn' | |
| 417 | + }); | |
| 418 | + $("#date2").datetimepicker({ | |
| 419 | + format : 'YYYY-MM-DD', | |
| 420 | + locale : 'zh-cn' | |
| 421 | + }); | |
| 422 | + | |
| 423 | + $.get('/report/lineList',function(xlList){ | |
| 424 | + var data = []; | |
| 425 | + $.get('/user/companyData', function(result){ | |
| 426 | + for(var i = 0; i < result.length; i++){ | |
| 427 | + var companyCode = result[i].companyCode; | |
| 428 | + var children = result[i].children; | |
| 429 | + for(var j = 0; j < children.length; j++){ | |
| 430 | + var code = children[j].code; | |
| 431 | + for(var k=0;k < xlList.length;k++ ){ | |
| 432 | + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){ | |
| 433 | + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]}); | |
| 434 | + } | |
| 435 | + } | |
| 436 | + } | |
| 437 | + } | |
| 438 | + initPinYinSelect2('#line',data,''); | |
| 439 | + | |
| 440 | + }); | |
| 441 | + }); | |
| 442 | + var line = $("#line").val(); | |
| 443 | + var date1 = $("#date1").val(); | |
| 444 | + var date2 = $("#date2").val(); | |
| 445 | + var dataType = $("#dataType").val(); | |
| 446 | + var lineName = $('#line option:selected').text(); | |
| 447 | + $("#query").on("click",function(){ | |
| 448 | + line = $("#line").val(); | |
| 449 | + date1 = $("#date1").val(); | |
| 450 | + date2 = $("#date2").val(); | |
| 451 | + if(date1 == null || date1.trim().length == 0 || date2 == null || date2.trim().length == 0){ | |
| 452 | + layer.msg("请选择时间"); | |
| 453 | + return; | |
| 454 | + } else if(date1 > date2){ | |
| 455 | + layer.msg("时间区间不正确,第二个时间不能大于第一个时间"); | |
| 456 | + return; | |
| 457 | + } | |
| 458 | + dataType = $("#dataType").val(); | |
| 459 | + lineName = $('#line option:selected').text(); | |
| 460 | + var type = "query"; | |
| 461 | + $(".hidden").removeClass("hidden"); | |
| 462 | + var i = layer.load(2); | |
| 463 | + $get('/realSchedule/wxsb',{line:line,date:date,dataType:dataType,type:type},function(result){ | |
| 464 | + // 把数据填充到模版中 | |
| 465 | + var tbodyHtml = template('list_repair',{list:result}); | |
| 466 | + // 把渲染好的模版html文本追加到表格中 | |
| 467 | + $('#forms tbody').html(tbodyHtml); | |
| 468 | + layer.close(i); | |
| 469 | + | |
| 470 | + if(result.length == 0) | |
| 471 | + $("#export").attr('disabled',"true"); | |
| 472 | + else | |
| 473 | + $("#export").removeAttr("disabled"); | |
| 474 | + | |
| 475 | + }); | |
| 476 | + }); | |
| 477 | + | |
| 478 | + $("#export").on("click",function(){ | |
| 479 | + var type = "export"; | |
| 480 | + var i = layer.load(2); | |
| 481 | + $get('/realSchedule/wxsb', {line:line,date:date,code:code,type:type}, function(result){ | |
| 482 | + window.open("/downloadFile/download?fileName=" | |
| 483 | + +moment(date).format("YYYYMMDD") | |
| 484 | + +"-"+lineName+"-维修上报记录"); | |
| 485 | + layer.close(i); | |
| 486 | + }); | |
| 487 | + }); | |
| 488 | + | |
| 489 | + })(); | |
| 490 | + | |
| 491 | + </script> | |
| 492 | +</div> | ... | ... |
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/manage.html
0 → 100644
| 1 | +<div class="uk-modal ct_move_modal" id="report-register-modal"> | |
| 2 | + | |
| 3 | + <!-- editable --> | |
| 4 | + <!--<link href="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/css/bootstrap-editable.css" rel="stylesheet" type="text/css" />--> | |
| 5 | + <!-- Bootstrap style --> | |
| 6 | + <link href="/metronic_v4.5.4/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
| 7 | + <!-- select2 下拉框插件 --> | |
| 8 | + <!--<link href="/metronic_v4.5.4/plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css" />--> | |
| 9 | + <!--<link href="/metronic_v4.5.4/plugins/select2/css/select2-bootstrap.min.css" rel="stylesheet" type="text/css" />--> | |
| 10 | + <style> | |
| 11 | + <style> | |
| 12 | + .lineSelect{ | |
| 13 | + width:174px !important | |
| 14 | + } | |
| 15 | + | |
| 16 | + /*ul.navigation_bar:before { | |
| 17 | + content: "报备类型"; | |
| 18 | + position: absolute; | |
| 19 | + top: -9px; | |
| 20 | + font-size: 12px; | |
| 21 | + background: white; | |
| 22 | + padding: 0 4px; | |
| 23 | + color: #7d7b7b; | |
| 24 | + left: 10px; | |
| 25 | + }*/ | |
| 26 | + </style> | |
| 27 | + <div class="uk-modal-dialog" style="width: 1800px;"> | |
| 28 | + <a href="" class="uk-modal-close uk-close"></a> | |
| 29 | + <div class="uk-modal-header"> | |
| 30 | + <h2>报备登记</h2> | |
| 31 | + </div> | |
| 32 | + | |
| 33 | + | |
| 34 | + <div style="padding-left: 12px;margin: 10px 0"> | |
| 35 | + <ul class="uk-subnav uk-subnav-pill navigation_bar"> | |
| 36 | + <li id="first_last_late" class="uk-active"><a>首末班误点</a></li> | |
| 37 | + <li id="large_interval"><a>大间隔</a></li> | |
| 38 | + <li id="emergency"><a>突发事件</a></li> | |
| 39 | + <li id="accident"><a>事故</a></li> | |
| 40 | + <li id="rests"><a>其他</a></li> | |
| 41 | + <li id="consult"><a>咨询</a></li> | |
| 42 | + </ul> | |
| 43 | + </div> | |
| 44 | + | |
| 45 | + <div style="padding-left: 12px;margin: 10px 0"> | |
| 46 | + <div class=" uk-subnav-pill management_bar" > | |
| 47 | + <button class="uk-button uk-button-primary" id="add">添加</button> | |
| 48 | + <button class="uk-button uk-button-danger" id="update">修改</button> | |
| 49 | + <button class="uk-button uk-button-danger" id="delete">删除</button> | |
| 50 | + </div> | |
| 51 | + | |
| 52 | + <!--<div class=" management_bar" style="padding-right: 12px;float: right;">--> | |
| 53 | + <!--<button class="ui-btn active">保存</button>--> | |
| 54 | + <!--<button class="ui-btn disabled">取消</button>--> | |
| 55 | + <!--</div>--> | |
| 56 | + </div> | |
| 57 | + | |
| 58 | + <div class="ct_table_wrap" style="height: 510px"> | |
| 59 | + <!-- 首末班误点--> | |
| 60 | + <table class="table table-striped table-bordered table-hover table-checkable report-register-table active" id="first_last_late_table"> | |
| 61 | + <thead class=""> | |
| 62 | + <tr role="row"> | |
| 63 | + <!--<th width="2%"><input type="radio" name="checkItems"></th>--> | |
| 64 | + <th width="2%">#</th> | |
| 65 | + <th width="2%">序号</th> | |
| 66 | + <th width="5%">报备时间</th> | |
| 67 | + <th width="7%">线路</th> | |
| 68 | + <th width="7%">延误站点</th> | |
| 69 | + <th width="5%">延误时间</th> | |
| 70 | + <th width="10%">首末班延误原因</th> | |
| 71 | + <th width="7%">对外上报部门</th> | |
| 72 | + <th width="7%">对外上报时间</th> | |
| 73 | + </tr> | |
| 74 | + </thead> | |
| 75 | + <tbody class="table_body"> | |
| 76 | + </tbody> | |
| 77 | + </table> | |
| 78 | + <!-- 大间隔--> | |
| 79 | + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="large_interval_table"> | |
| 80 | + <thead class=""> | |
| 81 | + <tr role="row"> | |
| 82 | + <!--<th width="2%"><input type="radio" name="checkItems"></th>--> | |
| 83 | + <th width="2%">#</th> | |
| 84 | + <th width="2%">序号</th> | |
| 85 | + <th width="5%">报备时间</th> | |
| 86 | + <th width="7%">线路</th> | |
| 87 | + <th width="7%">路段</th> | |
| 88 | + <th width="7%">行驶方向</th> | |
| 89 | + <th width="7%">站点</th> | |
| 90 | + <th width="7%">大间隔时间</th> | |
| 91 | + <th width="7%">大间隔原因</th> | |
| 92 | + <th width="7%">对外上报部门</th> | |
| 93 | + <th width="7%">对外上报时间</th> | |
| 94 | + </tr> | |
| 95 | + </thead> | |
| 96 | + <tbody class="table_body"> | |
| 97 | + </tbody> | |
| 98 | + </table> | |
| 99 | + <!-- 突发事件--> | |
| 100 | + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="emergency_table"> | |
| 101 | + <thead class=""> | |
| 102 | + <tr role="row"> | |
| 103 | + <!--<th width="2%"><input type="radio" name="checkItems"></th>--> | |
| 104 | + <th width="2%">#</th> | |
| 105 | + <th width="2%">序号</th> | |
| 106 | + <th width="5%">报备时间</th> | |
| 107 | + <th width="7%">影响线路</th> | |
| 108 | + <th width="7%">重大活动货突发事件</th> | |
| 109 | + <th width="7%">影响时间</th> | |
| 110 | + <th width="7%">影响班次数</th> | |
| 111 | + <th width="7%">调整措施</th> | |
| 112 | + <th width="7%">对外上报部门</th> | |
| 113 | + <th width="7%">对外上报时间</th> | |
| 114 | + </tr> | |
| 115 | + </thead> | |
| 116 | + <tbody class="table_body"> | |
| 117 | + </tbody> | |
| 118 | + </table> | |
| 119 | + <!-- 事故--> | |
| 120 | + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="accident_table"> | |
| 121 | + <thead class=""> | |
| 122 | + <tr role="row"> | |
| 123 | + <!--<th width="2%"><input type="radio" name="checkItems"></th>--> | |
| 124 | + <th width="1%">#</th> | |
| 125 | + <th width="2%">序号</th> | |
| 126 | + <th width="5%">报备时间</th> | |
| 127 | + <th width="5%">线路</th> | |
| 128 | + <th width="5%">车辆自编号</th> | |
| 129 | + <th width="5%">驾驶员</th> | |
| 130 | + <th width="5%">事故发生时间</th> | |
| 131 | + <th width="5%">事故发生地点</th> | |
| 132 | + <th width="5%">行驶方向</th> | |
| 133 | + <th width="5%">事故对象</th> | |
| 134 | + <th width="5%">对象车牌号</th> | |
| 135 | + <th width="5%">事故概况</th> | |
| 136 | + <th width="5%">受伤人数</th> | |
| 137 | + <th width="5%">死亡人数</th> | |
| 138 | + <th width="5%">报告人</th> | |
| 139 | + <th width="5%">报告人电话</th> | |
| 140 | + <th width="5%">备注</th> | |
| 141 | + </tr> | |
| 142 | + </thead> | |
| 143 | + <tbody class="table_body"> | |
| 144 | + </tbody> | |
| 145 | + </table> | |
| 146 | + <!-- 其他--> | |
| 147 | + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="rests_table"> | |
| 148 | + <thead class=""> | |
| 149 | + <tr role="row"> | |
| 150 | + <!--<th width="2%"><input type="radio" name="checkItems"></th>--> | |
| 151 | + <th width="2%">#</th> | |
| 152 | + <th width="2%">序号</th> | |
| 153 | + <th width="5%">报备时间</th> | |
| 154 | + <th width="7%">线路</th> | |
| 155 | + <th width="7%">报备内容</th> | |
| 156 | + </tr> | |
| 157 | + </thead> | |
| 158 | + <tbody class="table_body"> | |
| 159 | + </tbody> | |
| 160 | + </table> | |
| 161 | + <!-- 咨询--> | |
| 162 | + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="consult_table"> | |
| 163 | + <thead class=""> | |
| 164 | + <tr role="row"> | |
| 165 | + <!--<th width="2%"><input type="radio" name="checkItems"></th>--> | |
| 166 | + <th width="2%">#</th> | |
| 167 | + <th width="2%">序号</th> | |
| 168 | + <th width="5%">报备时间</th> | |
| 169 | + <th width="7%">线路</th> | |
| 170 | + <th width="7%">班线名称</th> | |
| 171 | + <th width="7%">内容</th> | |
| 172 | + </tr> | |
| 173 | + </thead> | |
| 174 | + <tbody class="table_body"> | |
| 175 | + </tbody> | |
| 176 | + </table> | |
| 177 | + </div> | |
| 178 | + | |
| 179 | + <div class="load-panel"> | |
| 180 | + <i class="uk-icon-spinner uk-icon-spin"></i> | |
| 181 | + 正在加载数据 | |
| 182 | + </div> | |
| 183 | + </div> | |
| 184 | + | |
| 185 | + <script id="first_last_late_table_body" type="text/html"> | |
| 186 | + {{each data.list as obj i}} | |
| 187 | + {{if obj.status == 2}} | |
| 188 | + <tr style="background-color: #ff5f78"> | |
| 189 | + <td style="vertical-align: middle;"> | |
| 190 | + <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">--> | |
| 191 | + </td> | |
| 192 | + {{else}} | |
| 193 | + <tr> | |
| 194 | + <td style="vertical-align: middle;"> | |
| 195 | + <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}"> | |
| 196 | + </td> | |
| 197 | + {{/if}} | |
| 198 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 199 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 200 | + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td> | |
| 201 | + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td> | |
| 202 | + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td> | |
| 203 | + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td> | |
| 204 | + <td style="vertical-align: middle;">{{obj.report_STATION}}</td> | |
| 205 | + <td style="vertical-align: middle;">{{obj.report_YWSJ}}</td> | |
| 206 | + <td style="vertical-align: middle;">{{obj.report_SMBWD}}</td> | |
| 207 | + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td> | |
| 208 | + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td> | |
| 209 | + </tr> | |
| 210 | + {{/each}} | |
| 211 | + </script> | |
| 212 | + <script id="large_interval_table_body" type="text/html"> | |
| 213 | + {{each data.list as obj i}} | |
| 214 | + {{if obj.status == 2}} | |
| 215 | + <tr style="background-color: #ff5f78"> | |
| 216 | + <td style="vertical-align: middle;"> | |
| 217 | + <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">--> | |
| 218 | + </td> | |
| 219 | + {{else}} | |
| 220 | + <tr> | |
| 221 | + <td style="vertical-align: middle;"> | |
| 222 | + <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}"> | |
| 223 | + </td> | |
| 224 | + {{/if}} | |
| 225 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 226 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 227 | + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td> | |
| 228 | + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td> | |
| 229 | + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td> | |
| 230 | + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td> | |
| 231 | + <td style="vertical-align: middle;">{{obj.report_ROAD}}</td> | |
| 232 | + <td style="vertical-align: middle;">{{obj.report_XSFX}}</td> | |
| 233 | + <td style="vertical-align: middle;">{{obj.report_STATION}}</td> | |
| 234 | + <td style="vertical-align: middle;">{{obj.report_DJGSJ}}</td> | |
| 235 | + <td style="vertical-align: middle;">{{obj.report_DJGYY}}</td> | |
| 236 | + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td> | |
| 237 | + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td> | |
| 238 | + </tr> | |
| 239 | + {{/each}} | |
| 240 | + </script> | |
| 241 | + <script id="emergency_table_body" type="text/html"> | |
| 242 | + {{each data.list as obj i}} | |
| 243 | + {{if obj.status == 2}} | |
| 244 | + <tr style="background-color: #ff5f78"> | |
| 245 | + <td style="vertical-align: middle;"> | |
| 246 | + <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">--> | |
| 247 | + </td> | |
| 248 | + {{else}} | |
| 249 | + <tr> | |
| 250 | + <td style="vertical-align: middle;"> | |
| 251 | + <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}"> | |
| 252 | + </td> | |
| 253 | + {{/if}} | |
| 254 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 255 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 256 | + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td> | |
| 257 | + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td> | |
| 258 | + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td> | |
| 259 | + <td style="vertical-align: middle;display:none">{{obj.report_XLNAME}}</td> | |
| 260 | + <td style="vertical-align: middle;">{{obj.report_TFSJ}}</td> | |
| 261 | + <td style="vertical-align: middle;">{{obj.report_YXSJ}}</td> | |
| 262 | + <td style="vertical-align: middle;">{{obj.report_YXBC}}</td> | |
| 263 | + <td style="vertical-align: middle;">{{obj.report_TZCS}}</td> | |
| 264 | + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td> | |
| 265 | + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td> | |
| 266 | + </tr> | |
| 267 | + {{/each}} | |
| 268 | + </script> | |
| 269 | + <script id="accident_table_body" type="text/html"> | |
| 270 | + {{each data.list as obj i}} | |
| 271 | + {{if obj.status == 2}} | |
| 272 | + <tr style="background-color: #ff5f78"> | |
| 273 | + <td style="vertical-align: middle;"> | |
| 274 | + <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">--> | |
| 275 | + </td> | |
| 276 | + {{else}} | |
| 277 | + <tr> | |
| 278 | + <td style="vertical-align: middle;"> | |
| 279 | + <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}"> | |
| 280 | + </td> | |
| 281 | + {{/if}} | |
| 282 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 283 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 284 | + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td> | |
| 285 | + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td> | |
| 286 | + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td> | |
| 287 | + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td> | |
| 288 | + <td style="vertical-align: middle;">{{obj.report_ZBH}}</td> | |
| 289 | + <td style="vertical-align: middle;">{{obj.report_JSY}}</td> | |
| 290 | + <td style="vertical-align: middle;">{{obj.report_SGSJ}}</td> | |
| 291 | + <td style="vertical-align: middle;">{{obj.report_SGDD}}</td> | |
| 292 | + <td style="vertical-align: middle;">{{obj.report_XSFX}}</td> | |
| 293 | + <td style="vertical-align: middle;">{{obj.report_SGDX}}</td> | |
| 294 | + <td style="vertical-align: middle;">{{obj.report_DXPZH}}</td> | |
| 295 | + <td style="vertical-align: middle;">{{obj.report_SGGK}}</td> | |
| 296 | + <td style="vertical-align: middle;">{{obj.report_SSRS}}</td> | |
| 297 | + <td style="vertical-align: middle;">{{obj.report_SWRS}}</td> | |
| 298 | + <td style="vertical-align: middle;">{{obj.report_BGR}}</td> | |
| 299 | + <td style="vertical-align: middle;">{{obj.report_BGRDH}}</td> | |
| 300 | + <td style="vertical-align: middle;">{{obj.report_BZ}}</td> | |
| 301 | + </tr> | |
| 302 | + {{/each}} | |
| 303 | + </script> | |
| 304 | + <script id="rests_table_body" type="text/html"> | |
| 305 | + {{each data.list as obj i}} | |
| 306 | + | |
| 307 | + {{if obj.status == 2}} | |
| 308 | + <tr style="background-color: #ff5f78"> | |
| 309 | + <td style="vertical-align: middle;"> | |
| 310 | + <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">--> | |
| 311 | + </td> | |
| 312 | + {{else}} | |
| 313 | + <tr> | |
| 314 | + <td style="vertical-align: middle;"> | |
| 315 | + <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}"> | |
| 316 | + </td> | |
| 317 | + {{/if}} | |
| 318 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 319 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 320 | + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td> | |
| 321 | + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td> | |
| 322 | + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td> | |
| 323 | + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td> | |
| 324 | + <td style="vertical-align: middle;">{{obj.report_BZ}}</td> | |
| 325 | + </tr> | |
| 326 | + {{/each}} | |
| 327 | + </script> | |
| 328 | + <script id="consult_table_body" type="text/html"> | |
| 329 | + {{each data.list as obj i}} | |
| 330 | + | |
| 331 | + {{if obj.status == 2}} | |
| 332 | + <tr style="background-color: #ff5f78"> | |
| 333 | + <td style="vertical-align: middle;"> | |
| 334 | + <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">--> | |
| 335 | + </td> | |
| 336 | + {{else}} | |
| 337 | + <tr> | |
| 338 | + <td style="vertical-align: middle;"> | |
| 339 | + <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}"> | |
| 340 | + </td> | |
| 341 | + {{/if}} | |
| 342 | + <td style="vertical-align: middle;">{{i + 1}}</td> | |
| 343 | + <td style="vertical-align: middle;">{{obj.report_DATE}}</td> | |
| 344 | + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td> | |
| 345 | + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td> | |
| 346 | + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td> | |
| 347 | + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td> | |
| 348 | + <!--<td style="vertical-align: middle;"><select class="form-control lineSelect" name="lineSelect" value="{{obj.report_XLNAME}}" data-id="{{obj.report_XL}}" data-lineName="{{obj.report_XLNAME}}"> | |
| 349 | + <option value="">请选择...</option> | |
| 350 | + {{each data.line as line i}} | |
| 351 | + {{if line.lineCode == obj.report_XL}} | |
| 352 | + <option value="{{line.lineCode}}" selected = "selected">{{line.name}}</option> | |
| 353 | + {{else}} | |
| 354 | + <option value="{{line.lineCode}}">{{line.name}}</option> | |
| 355 | + {{/if}} | |
| 356 | + {{/each}} | |
| 357 | + </select></td>--> | |
| 358 | + <td style="vertical-align: middle;">{{obj.report_STATION}}</td> | |
| 359 | + <td style="vertical-align: middle;">{{obj.report_BZ}}</td> | |
| 360 | + </tr> | |
| 361 | + {{/each}} | |
| 362 | + </script> | |
| 363 | + | |
| 364 | + | |
| 365 | + <!-- common js --> | |
| 366 | + <!--<script src="/assets/js/common.js"></script>--> | |
| 367 | + <!--<!– select2 下拉框 –>--> | |
| 368 | + <!--<script src="/metronic_v4.5.4/plugins/select2/js/select2.full.min.js"></script>--> | |
| 369 | + <!-- moment.js 日期处理类库 --> | |
| 370 | + <script src="/assets/plugins/moment-with-locales.js" data-exclude=1></script> | |
| 371 | + <!-- 日期控件 --> | |
| 372 | + <script src="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/js/bootstrap-datetimepicker.min.js"></script> | |
| 373 | + <!-- bootstrap --> | |
| 374 | + <script src="/metronic_v4.5.4/plugins/bootstrap/js/bootstrap.min.js" data-exclude=1></script> | |
| 375 | + <!--<script src="/metronic_v4.5.4/plugins/bootstrap-wizard/jquery.bootstrap.wizard.min.js"></script>--> | |
| 376 | + <!-- editable.js --> | |
| 377 | + <!--<script src="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.min.js"></script>--> | |
| 378 | + <script> | |
| 379 | + var manageJs = (function () { | |
| 380 | + var modal = '#report-register-modal'; | |
| 381 | + var editType = false;//编辑状态,修改过东西 | |
| 382 | + var lineCodes ='',// 选择的线路 | |
| 383 | + companyMap = {}, | |
| 384 | + user = {};//当前用户信息 | |
| 385 | + var activeDiv='first_last_late_table'; | |
| 386 | + var lineList = gb_data_basic.activeLines; | |
| 387 | + | |
| 388 | + //当前用户信息 | |
| 389 | + gb_common.$get('/user/currentUser', null,function (data) { | |
| 390 | + user = data; | |
| 391 | + }); | |
| 392 | + | |
| 393 | + $(modal).on('init', function (e,data) { | |
| 394 | + // get请求获取公司 | |
| 395 | + gb_common.$get("/user/companyData",null,function(result){ | |
| 396 | + var len_ = lineList.length; | |
| 397 | + if(len_>0) { | |
| 398 | + // 遍历线路对应的公司 | |
| 399 | + for(var i = 0; i < result.length; i++){ | |
| 400 | + var companyCode = result[i].companyCode; | |
| 401 | + var children = result[i].children; | |
| 402 | + for(var j = 0; j < children.length; j++){ | |
| 403 | + var code = children[j].code; | |
| 404 | + for(var k=0;k < lineList.length;k++ ){ | |
| 405 | + if(lineList[k].brancheCompany==code && lineList[k].company==companyCode){ | |
| 406 | + companyMap[lineList[k].lineCode] = companyCode+":"+code+"-"+result[i].companyName+":"+result[i].children[j].name; | |
| 407 | + } | |
| 408 | + } | |
| 409 | + } | |
| 410 | + } | |
| 411 | + // 遍历出所有需要查询的线路 | |
| 412 | + lineCodes = ''; | |
| 413 | + $.each(lineList, function (i, g) { | |
| 414 | + lineCodes += '"'+g.lineCode + '",'; | |
| 415 | + }); | |
| 416 | + | |
| 417 | + refreshDate(); | |
| 418 | + | |
| 419 | + // initPinYinSelect2($('.lineSelect'), paramsD, function (selector) { | |
| 420 | + // selector.select2("val", ""); | |
| 421 | + // }); | |
| 422 | + } | |
| 423 | + }); | |
| 424 | + | |
| 425 | + //滚动条 | |
| 426 | + $('.report-register-table-wrap', modal).perfectScrollbar(); | |
| 427 | + }); | |
| 428 | + | |
| 429 | + var refreshDate = function() { | |
| 430 | + | |
| 431 | + $('.load-panel', modal).show(); | |
| 432 | + loading=true; | |
| 433 | + gb_common.$get("/reportRegister/findList", {lineCodes: lineCodes.substring(0, lineCodes.length - 1)}, function (data) { | |
| 434 | + if (data.status == "SUCCESS") { | |
| 435 | + var list = data.list; | |
| 436 | + var tableList1 = [], tableList2 = [], tableList3 = [], tableList4 = [], tableList5 = [], | |
| 437 | + tableList6 = []; | |
| 438 | + $.each(list, function (i, rr) { | |
| 439 | + rr.report_DATE = formatDate(new Date(rr.report_DATE)); | |
| 440 | + if (rr.report_TYPE == 1) { | |
| 441 | + tableList1.push(rr); | |
| 442 | + } else if (rr.report_TYPE == 2) { | |
| 443 | + tableList2.push(rr); | |
| 444 | + } else if (rr.report_TYPE == 3) { | |
| 445 | + tableList3.push(rr); | |
| 446 | + } else if (rr.report_TYPE == 4) { | |
| 447 | + tableList4.push(rr); | |
| 448 | + } else if (rr.report_TYPE == 5) { | |
| 449 | + tableList5.push(rr); | |
| 450 | + } else if (rr.report_TYPE == 6) { | |
| 451 | + tableList6.push(rr); | |
| 452 | + } | |
| 453 | + }); | |
| 454 | + var htmlStr = template('first_last_late_table_body', {'data':{'list': tableList1,'line':lineList}}); | |
| 455 | + $('#first_last_late_table .table_body', modal).html(htmlStr); | |
| 456 | + htmlStr = template('large_interval_table_body', {'data':{'list': tableList2,'line':lineList}}); | |
| 457 | + $('#large_interval_table .table_body', modal).html(htmlStr); | |
| 458 | + htmlStr = template('emergency_table_body', {'data':{'list': tableList3,'line':lineList}}); | |
| 459 | + $('#emergency_table .table_body', modal).html(htmlStr); | |
| 460 | + htmlStr = template('accident_table_body', {'data':{'list': tableList4,'line':lineList}}); | |
| 461 | + $('#accident_table .table_body', modal).html(htmlStr); | |
| 462 | + htmlStr = template('rests_table_body', {'data':{'list': tableList5,'line':lineList}}); | |
| 463 | + $('#rests_table .table_body', modal).html(htmlStr); | |
| 464 | + htmlStr = template('consult_table_body', {'data':{'list': tableList6,'line':lineList}}); | |
| 465 | + $('#consult_table .table_body', modal).html(htmlStr); | |
| 466 | + $('.load-panel', modal).hide(); | |
| 467 | + loading=false; | |
| 468 | + } | |
| 469 | + }); | |
| 470 | + }; | |
| 471 | + | |
| 472 | + setTimeout(function () { | |
| 473 | + $(".table_body .lineSelect").on("change", function(){ | |
| 474 | + var lineCode = $(this).val(); | |
| 475 | + if(lineCode == " "){ | |
| 476 | + $(this).parent().parent().find('td input[name="report_GS"]').val(); | |
| 477 | + $(this).parent().parent().find('td input[name="report_FGS"]').val(); | |
| 478 | + } else { | |
| 479 | + var temp = companyMap[lineCode].split("-")[1].split(":"); | |
| 480 | + $(this).parent().parent().find('td input[name="report_GS"]').val(temp[0]); | |
| 481 | + $(this).parent().parent().find('td input[name="report_FGS"]').val(temp[1]); | |
| 482 | + } | |
| 483 | + }); | |
| 484 | + },1000); | |
| 485 | + | |
| 486 | + $("#add", modal).on('click', function () { | |
| 487 | + var activeDivId = $('.ct_table_wrap .active').attr('id'); | |
| 488 | + open_modal('/real_control_v2/fragments/north/nav/report_register/add.html', {'tableActive' : activeDivId,'companyMap':companyMap,'lineList':lineList,'user':user}, { | |
| 489 | + bgclose: false, | |
| 490 | + modal: false | |
| 491 | + }); | |
| 492 | + }); | |
| 493 | + $("#update", modal).on('click', function () { | |
| 494 | + var activeDivId = $('.ct_table_wrap .active').attr('id'); | |
| 495 | + var id = $("#"+activeDivId+" .table_body input[name='idRadio']:checked", modal).val(); | |
| 496 | + if(id){ | |
| 497 | + gb_common.$get('/reportRegister/' + id,null, function (rs) { | |
| 498 | + // 全转换为大写 | |
| 499 | + var rr = nameTo_(rs); | |
| 500 | + open_modal('/real_control_v2/fragments/north/nav/report_register/update.html', {'tableActive' : activeDivId,'companyMap':companyMap,'lineList':lineList,'user':user,'rr':rr}, { | |
| 501 | + bgclose: false, | |
| 502 | + modal: false | |
| 503 | + }); | |
| 504 | + }); | |
| 505 | + } else { | |
| 506 | + notify_succ('当前类型没有选中!'); | |
| 507 | + } | |
| 508 | + }); | |
| 509 | + $("#delete").on('click', function () { | |
| 510 | + var activeDivId = $('.ct_table_wrap .active').attr('id'); | |
| 511 | + var id = $("#"+activeDivId+" .table_body input[name='idRadio']:checked", modal).val(); | |
| 512 | + if(id){ | |
| 513 | + alt_confirm('确实要删除这个报备登记吗?', function () { | |
| 514 | + // gb_common.$del('/reportRegister/' + id, function (rs) { | |
| 515 | + gb_common.$post('/reportRegister/delete',{ID:id,REPORT_BBR:user.userName+'/'+user.name}, function (rs) { | |
| 516 | + manageJs.refreshDate(); | |
| 517 | + notify_succ('删除成功!'); | |
| 518 | + if(rs.status2.CODE == '0') | |
| 519 | + notify_succ('同步到服务热线系统成功!'); | |
| 520 | + else | |
| 521 | + notify_err('同步到服务热线系统失败!'); | |
| 522 | + }); | |
| 523 | + }, '确定删除'); | |
| 524 | + } else { | |
| 525 | + notify_succ('当前类型没有选中!'); | |
| 526 | + } | |
| 527 | + }); | |
| 528 | + | |
| 529 | + // $('[name="checkItems"]').on('click',function (e,data) { | |
| 530 | + // // 获取所有的复选框 | |
| 531 | + // activeDiv; | |
| 532 | + // var checkElements = document.getElementsByName('items'); | |
| 533 | + // if (this.checked) { | |
| 534 | + // for ( var i = 0; i < checkElements.length; i++) { | |
| 535 | + // var checkElement = checkElements[i]; | |
| 536 | + // checkElement.checked = "checked"; | |
| 537 | + // } | |
| 538 | + // } else { | |
| 539 | + // for ( var i = 0; i < checkElements.length; i++) { | |
| 540 | + // var checkElement = checkElements[i]; | |
| 541 | + // checkElement.checked = null; | |
| 542 | + // } | |
| 543 | + // } | |
| 544 | + // }); | |
| 545 | + | |
| 546 | + $(modal).on('click', '.navigation_bar li', function () { | |
| 547 | + $(this).parent().find('li.uk-active').removeClass('uk-active'); | |
| 548 | + $(this).addClass('uk-active'); | |
| 549 | + var typeName = $(this).attr('id'); | |
| 550 | + var oldActiveDivId = $("#"+typeName+"_table").parent().find('.active'); | |
| 551 | + var oldActiveDiv = document.getElementById(oldActiveDivId.attr('id')); | |
| 552 | + oldActiveDiv.style.display = "none"; | |
| 553 | + oldActiveDivId.removeClass("active"); | |
| 554 | + | |
| 555 | + activeDiv = typeName+"_table"; | |
| 556 | + $("#"+typeName+"_table").addClass("active"); | |
| 557 | + var activeTable = document.getElementById(typeName+"_table"); | |
| 558 | + activeTable.style.display = ""; | |
| 559 | + }); | |
| 560 | + | |
| 561 | + var formatDate = function(now) { | |
| 562 | + var year=now.getFullYear(); | |
| 563 | + var month=now.getMonth()+1; | |
| 564 | + var date=now.getDate(); | |
| 565 | + var hour=now.getHours(); | |
| 566 | + var minute=now.getMinutes(); | |
| 567 | + var second=now.getSeconds(); | |
| 568 | + return year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second; | |
| 569 | + }; | |
| 570 | + | |
| 571 | + function nameTo_(object) { | |
| 572 | + for (var i in object) { | |
| 573 | + if (object.hasOwnProperty(i)) { | |
| 574 | + var temp = object[i]; | |
| 575 | + var oldI = i; | |
| 576 | + temp = object[i.toUpperCase()] = object[i]; | |
| 577 | + delete object[oldI]; | |
| 578 | + if (typeof temp === 'object' || Object.prototype.toString.call(temp) === '[object Array]') { | |
| 579 | + nameTo_(temp); | |
| 580 | + } | |
| 581 | + } | |
| 582 | + } | |
| 583 | + return object; | |
| 584 | + } | |
| 585 | + | |
| 586 | + return{ | |
| 587 | + refreshDate:refreshDate | |
| 588 | + } | |
| 589 | + })(); | |
| 590 | + </script> | |
| 591 | +</div> | |
| 0 | 592 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/mould/report_register.xls
0 → 100644
No preview for this file type
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/update.html
0 → 100644
| 1 | +<div class="uk-modal" id="report_register_update_mobal"> | |
| 2 | + <div class="uk-modal-dialog" style="width: 600px;"> | |
| 3 | + <a href="" class="uk-modal-close uk-close"></a> | |
| 4 | + <div class="uk-modal-header"> | |
| 5 | + <h2>修改报备登记</h2> | |
| 6 | + </div> | |
| 7 | + <div class="uk-form uk-form-horizontal" id="report_register_form"> | |
| 8 | + <!--<div class="alert alert-danger display-hide">--> | |
| 9 | + <!--您的输入有误,请检查下面的输入项--> | |
| 10 | + <!--</div>--> | |
| 11 | + <!-- 线路ID --> | |
| 12 | + <!--<input type="hidden" name="REPORT_DATE" id="REPORT_DATE">--> | |
| 13 | + <form id="add_head_table"> | |
| 14 | + <input type="hidden" name="ID" id="ID"> | |
| 15 | + <input type="hidden" name="REPORT_BBR" id="REPORT_BBR" value=""> | |
| 16 | + <input type="hidden" name="REPORT_GS" id="REPORT_GS" value=""> | |
| 17 | + <input type="hidden" name="REPORT_FGS" id="REPORT_FGS" value=""> | |
| 18 | + <input type="hidden" name="REPORT_GSNAME" id="REPORT_GSNAME" value=""> | |
| 19 | + <input type="hidden" name="REPORT_FGSNAME" id="REPORT_FGSNAME" value=""> | |
| 20 | + <input type="hidden" name="REPORT_XLNAME" id="REPORT_XLNAME" value=""> | |
| 21 | + | |
| 22 | + <!-- 报备时间 --> | |
| 23 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 24 | + <div class="uk-form-row"> | |
| 25 | + <label class="uk-form-label"> | |
| 26 | + 报备时间: | |
| 27 | + </label> | |
| 28 | + <div class="uk-form-controls"> | |
| 29 | + <input type="text" class="form-control" name="REPORT_DATE" id="REPORT_DATE" readonly="readonly"> | |
| 30 | + </div> | |
| 31 | + </div> | |
| 32 | + </div> | |
| 33 | + <!-- 类型 --> | |
| 34 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 35 | + <div class="uk-form-row"> | |
| 36 | + <label class="uk-form-label"> | |
| 37 | + 类型: | |
| 38 | + </label> | |
| 39 | + <div class="uk-form-controls"> | |
| 40 | + <select class="form-control typeSelect" name="REPORT_TYPE" id="REPORT_TYPE"> | |
| 41 | + <option value="1">首末班误点</option> | |
| 42 | + <option value="2">大间隔</option> | |
| 43 | + <option value="3">突发事件</option> | |
| 44 | + <option value="4">事故</option> | |
| 45 | + <option value="5">其他</option> | |
| 46 | + <option value="6">咨询</option> | |
| 47 | + </select> | |
| 48 | + </div> | |
| 49 | + </div> | |
| 50 | + </div> | |
| 51 | + <!-- 路段名称 --> | |
| 52 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 53 | + <div class="uk-form-row"> | |
| 54 | + <label class="uk-form-label"> | |
| 55 | + 线路: | |
| 56 | + </label> | |
| 57 | + <div class="uk-form-controls"> | |
| 58 | + <select class="form-control lineSelect" name="REPORT_XL" id="REPORT_XL"> | |
| 59 | + </select> | |
| 60 | + </div> | |
| 61 | + </div> | |
| 62 | + </div> | |
| 63 | + </form> | |
| 64 | + <!-- 首末班误点--> | |
| 65 | + <form id="add_first_last_late_table" class="c_register_form" style="display:none; margin-top: 35px;"> | |
| 66 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 67 | + <div class="uk-form-row"> | |
| 68 | + <label class="uk-form-label"> | |
| 69 | + 延误站点: | |
| 70 | + </label> | |
| 71 | + <div class="uk-form-controls"> | |
| 72 | + <input type="text" class="form-control" name="REPORT_STATION" placeholder="延误站点" required> | |
| 73 | + </div> | |
| 74 | + </div> | |
| 75 | + </div> | |
| 76 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 77 | + <div class="uk-form-row"> | |
| 78 | + <label class="uk-form-label"> | |
| 79 | + 延误时间: | |
| 80 | + </label> | |
| 81 | + <div class="uk-form-controls"> | |
| 82 | + <input type="text" class="form-control" name="REPORT_YWSJ" placeholder="延误时间" required> | |
| 83 | + </div> | |
| 84 | + </div> | |
| 85 | + </div> | |
| 86 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 87 | + <div class="uk-form-row"> | |
| 88 | + <label class="uk-form-label"> | |
| 89 | + 首末班延误原因: | |
| 90 | + </label> | |
| 91 | + <div class="uk-form-controls"> | |
| 92 | + <input type="text" class="form-control" name="REPORT_SMBWD" placeholder="首末班延误原因" required> | |
| 93 | + </div> | |
| 94 | + </div> | |
| 95 | + </div> | |
| 96 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 97 | + <div class="uk-form-row"> | |
| 98 | + <label class="uk-form-label"> | |
| 99 | + 对外上报部门: | |
| 100 | + </label> | |
| 101 | + <div class="uk-form-controls"> | |
| 102 | + <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required> | |
| 103 | + </div> | |
| 104 | + </div> | |
| 105 | + </div> | |
| 106 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 107 | + <div class="uk-form-row"> | |
| 108 | + <label class="uk-form-label">对外上报时间:</label> | |
| 109 | + <div class="uk-form-controls"> | |
| 110 | + <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required> | |
| 111 | + </div> | |
| 112 | + </div> | |
| 113 | + </div> | |
| 114 | + <div class="uk-modal-footer uk-text-right"> | |
| 115 | + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span> | |
| 116 | + <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 117 | + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> 保存</button> | |
| 118 | + </div> | |
| 119 | + </form> | |
| 120 | + <!-- 大间隔--> | |
| 121 | + <form id="add_large_interval_table" class="c_register_form" style="display:none; margin-top: 35px;"> | |
| 122 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 123 | + <div class="uk-form-row"> | |
| 124 | + <label class="uk-form-label"> | |
| 125 | + 路段: | |
| 126 | + </label> | |
| 127 | + <div class="uk-form-controls"> | |
| 128 | + <input type="text" class="form-control" name="REPORT_ROAD" placeholder="路段" required> | |
| 129 | + </div> | |
| 130 | + </div> | |
| 131 | + </div> | |
| 132 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 133 | + <div class="uk-form-row"> | |
| 134 | + <label class="uk-form-label"> | |
| 135 | + 行驶方向: | |
| 136 | + </label> | |
| 137 | + <div class="uk-form-controls"> | |
| 138 | + <input type="text" class="form-control" name="REPORT_XSFX" placeholder="行驶方向" required> | |
| 139 | + </div> | |
| 140 | + </div> | |
| 141 | + </div> | |
| 142 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 143 | + <div class="uk-form-row"> | |
| 144 | + <label class="uk-form-label"> | |
| 145 | + 站点: | |
| 146 | + </label> | |
| 147 | + <div class="uk-form-controls"> | |
| 148 | + <input type="text" class="form-control" name="REPORT_STATION" placeholder="站点" required > | |
| 149 | + </div> | |
| 150 | + </div> | |
| 151 | + </div> | |
| 152 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 153 | + <div class="uk-form-row"> | |
| 154 | + <label class="uk-form-label"> | |
| 155 | + 大间隔时间: | |
| 156 | + </label> | |
| 157 | + <div class="uk-form-controls"> | |
| 158 | + <input type="text" class="form-control" name="REPORT_DJGSJ" placeholder="大间隔时间" required> | |
| 159 | + </div> | |
| 160 | + </div> | |
| 161 | + </div> | |
| 162 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 163 | + <div class="uk-form-row"> | |
| 164 | + <label class="uk-form-label"> | |
| 165 | + 大间隔原因: | |
| 166 | + </label> | |
| 167 | + <div class="uk-form-controls"> | |
| 168 | + <input type="text" class="form-control" name="REPORT_DJGYY" placeholder="大间隔原因" required> | |
| 169 | + </div> | |
| 170 | + </div> | |
| 171 | + </div> | |
| 172 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 173 | + <div class="uk-form-row"> | |
| 174 | + <label class="uk-form-label"> | |
| 175 | + 对外上报部门: | |
| 176 | + </label> | |
| 177 | + <div class="uk-form-controls"> | |
| 178 | + <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required> | |
| 179 | + </div> | |
| 180 | + </div> | |
| 181 | + </div> | |
| 182 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 183 | + <div class="uk-form-row"> | |
| 184 | + <label class="uk-form-label">对外上报时间:</label> | |
| 185 | + <div class="uk-form-controls"> | |
| 186 | + <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required> | |
| 187 | + </div> | |
| 188 | + </div> | |
| 189 | + </div> | |
| 190 | + <div class="uk-modal-footer uk-text-right"> | |
| 191 | + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span> | |
| 192 | + <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 193 | + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> 保存</button> | |
| 194 | + </div> | |
| 195 | + </form> | |
| 196 | + <!-- 突发事件--> | |
| 197 | + <form id="add_emergency_table" class="c_register_form" style="display:none; margin-top: 35px;"> | |
| 198 | + | |
| 199 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 200 | + <div class="uk-form-row"> | |
| 201 | + <label class="uk-form-label"> | |
| 202 | + 重大活动货突发事件: | |
| 203 | + </label> | |
| 204 | + <div class="uk-form-controls"> | |
| 205 | + <input type="text" class="form-control" name="REPORT_TFSJ" placeholder="重大活动货突发事件" required> | |
| 206 | + </div> | |
| 207 | + </div> | |
| 208 | + </div> | |
| 209 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 210 | + <div class="uk-form-row"> | |
| 211 | + <label class="uk-form-label"> | |
| 212 | + 影响时间: | |
| 213 | + </label> | |
| 214 | + <div class="uk-form-controls"> | |
| 215 | + <input type="text" class="form-control" name="REPORT_YXSJ" placeholder="影响时间" required> | |
| 216 | + </div> | |
| 217 | + </div> | |
| 218 | + </div> | |
| 219 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 220 | + <div class="uk-form-row"> | |
| 221 | + <label class="uk-form-label"> | |
| 222 | + 影响班次数: | |
| 223 | + </label> | |
| 224 | + <div class="uk-form-controls"> | |
| 225 | + <input type="text" class="form-control" name="REPORT_YXBC" placeholder="影响班次数" required> | |
| 226 | + </div> | |
| 227 | + </div> | |
| 228 | + </div> | |
| 229 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 230 | + <div class="uk-form-row"> | |
| 231 | + <label class="uk-form-label"> | |
| 232 | + 调整措施: | |
| 233 | + </label> | |
| 234 | + <div class="uk-form-controls"> | |
| 235 | + <input type="text" class="form-control" name="REPORT_TZCS" placeholder="调整措施" required> | |
| 236 | + </div> | |
| 237 | + </div> | |
| 238 | + </div> | |
| 239 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 240 | + <div class="uk-form-row"> | |
| 241 | + <label class="uk-form-label"> | |
| 242 | + 对外上报部门: | |
| 243 | + </label> | |
| 244 | + <div class="uk-form-controls"> | |
| 245 | + <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required> | |
| 246 | + </div> | |
| 247 | + </div> | |
| 248 | + </div> | |
| 249 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 250 | + <div class="uk-form-row"> | |
| 251 | + <label class="uk-form-label">对外上报时间:</label> | |
| 252 | + <div class="uk-form-controls"> | |
| 253 | + <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required> | |
| 254 | + </div> | |
| 255 | + </div> | |
| 256 | + </div> | |
| 257 | + <div class="uk-modal-footer uk-text-right"> | |
| 258 | + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span> | |
| 259 | + <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 260 | + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> 保存</button> | |
| 261 | + </div> | |
| 262 | + </form> | |
| 263 | + <!-- 事故--> | |
| 264 | + <form id="add_accident_table" class="c_register_form" style="display:none; margin-top: 35px;"> | |
| 265 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 266 | + <div class="uk-form-row"> | |
| 267 | + <label class="uk-form-label"> | |
| 268 | + 车辆自编号: | |
| 269 | + </label> | |
| 270 | + <div class="uk-form-controls"> | |
| 271 | + <input type="text" class="form-control" name="REPORT_ZBH" placeholder="车辆自编号" required> | |
| 272 | + </div> | |
| 273 | + </div> | |
| 274 | + </div> | |
| 275 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 276 | + <div class="uk-form-row"> | |
| 277 | + <label class="uk-form-label"> | |
| 278 | + 驾驶员: | |
| 279 | + </label> | |
| 280 | + <div class="uk-form-controls"> | |
| 281 | + <input type="text" class="form-control" name="REPORT_JSY" placeholder="驾驶员" required> | |
| 282 | + </div> | |
| 283 | + </div> | |
| 284 | + </div> | |
| 285 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 286 | + <div class="uk-form-row"> | |
| 287 | + <label class="uk-form-label"> | |
| 288 | + 事故发生时间: | |
| 289 | + </label> | |
| 290 | + <div class="uk-form-controls"> | |
| 291 | + <input type="text" class="form-control" name="REPORT_SGSJ" placeholder="事故发生时间" required> | |
| 292 | + </div> | |
| 293 | + </div> | |
| 294 | + </div> | |
| 295 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 296 | + <div class="uk-form-row"> | |
| 297 | + <label class="uk-form-label"> | |
| 298 | + 事故发生地点: | |
| 299 | + </label> | |
| 300 | + <div class="uk-form-controls"> | |
| 301 | + <input type="text" class="form-control" name="REPORT_SGDD" placeholder="事故发生地点" required> | |
| 302 | + </div> | |
| 303 | + </div> | |
| 304 | + </div> | |
| 305 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 306 | + <div class="uk-form-row"> | |
| 307 | + <label class="uk-form-label"> | |
| 308 | + 行驶方向: | |
| 309 | + </label> | |
| 310 | + <div class="uk-form-controls"> | |
| 311 | + <input type="text" class="form-control" name="REPORT_XSFX" placeholder="行驶方向" required> | |
| 312 | + </div> | |
| 313 | + </div> | |
| 314 | + </div> | |
| 315 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 316 | + <div class="uk-form-row"> | |
| 317 | + <label class="uk-form-label"> | |
| 318 | + 事故对象: | |
| 319 | + </label> | |
| 320 | + <div class="uk-form-controls"> | |
| 321 | + <input type="text" class="form-control" name="REPORT_SGDX" placeholder="事故对象" required> | |
| 322 | + </div> | |
| 323 | + </div> | |
| 324 | + </div> | |
| 325 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 326 | + <div class="uk-form-row"> | |
| 327 | + <label class="uk-form-label"> | |
| 328 | + 对象车牌号: | |
| 329 | + </label> | |
| 330 | + <div class="uk-form-controls"> | |
| 331 | + <input type="text" class="form-control" name="REPORT_DXPZH" placeholder="对象车牌号" required> | |
| 332 | + </div> | |
| 333 | + </div> | |
| 334 | + </div> | |
| 335 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 336 | + <div class="uk-form-row"> | |
| 337 | + <label class="uk-form-label"> | |
| 338 | + 事故概况: | |
| 339 | + </label> | |
| 340 | + <div class="uk-form-controls"> | |
| 341 | + <input type="text" class="form-control" name="REPORT_SGGK" placeholder="事故概况" required> | |
| 342 | + </div> | |
| 343 | + </div> | |
| 344 | + </div> | |
| 345 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 346 | + <div class="uk-form-row"> | |
| 347 | + <label class="uk-form-label"> | |
| 348 | + 受伤人数: | |
| 349 | + </label> | |
| 350 | + <div class="uk-form-controls"> | |
| 351 | + <input type="text" class="form-control" name="REPORT_SSRS" placeholder="受伤人数" required> | |
| 352 | + </div> | |
| 353 | + </div> | |
| 354 | + </div> | |
| 355 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 356 | + <div class="uk-form-row"> | |
| 357 | + <label class="uk-form-label"> | |
| 358 | + 死亡人数: | |
| 359 | + </label> | |
| 360 | + <div class="uk-form-controls"> | |
| 361 | + <input type="text" class="form-control" name="REPORT_SWRS" placeholder="死亡人数" required> | |
| 362 | + </div> | |
| 363 | + </div> | |
| 364 | + </div> | |
| 365 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 366 | + <div class="uk-form-row"> | |
| 367 | + <label class="uk-form-label"> | |
| 368 | + 报告人: | |
| 369 | + </label> | |
| 370 | + <div class="uk-form-controls"> | |
| 371 | + <input type="text" class="form-control" name="REPORT_BGR" placeholder="报告人" required > | |
| 372 | + </div> | |
| 373 | + </div> | |
| 374 | + </div> | |
| 375 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 376 | + <div class="uk-form-row"> | |
| 377 | + <label class="uk-form-label"> | |
| 378 | + 报告人电话: | |
| 379 | + </label> | |
| 380 | + <div class="uk-form-controls"> | |
| 381 | + <input type="text" class="form-control" name="REPORT_BGRDH" placeholder="报告人电话" required> | |
| 382 | + </div> | |
| 383 | + </div> | |
| 384 | + </div> | |
| 385 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 386 | + <div class="uk-form-row"> | |
| 387 | + <label class="uk-form-label"> 备注:</label> | |
| 388 | + <div class="uk-form-controls"> | |
| 389 | + <input type="text" class="form-control" name="REPORT_BZ" placeholder="备注"> | |
| 390 | + </div> | |
| 391 | + </div> | |
| 392 | + </div> | |
| 393 | + <div class="uk-modal-footer uk-text-right"> | |
| 394 | + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span> | |
| 395 | + <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 396 | + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> 保存</button> | |
| 397 | + </div> | |
| 398 | + </form> | |
| 399 | + <!-- 其他--> | |
| 400 | + <form id="add_rests_table" class="c_register_form" style="display:none; margin-top: 35px;"> | |
| 401 | + | |
| 402 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 403 | + <div class="uk-form-row"> | |
| 404 | + <label class="uk-form-label"> | |
| 405 | + 报备内容: | |
| 406 | + </label> | |
| 407 | + <div class="uk-form-controls"> | |
| 408 | + <input type="text" class="form-control" name="REPORT_BZ" placeholder="报备内容" required> | |
| 409 | + </div> | |
| 410 | + </div> | |
| 411 | + </div> | |
| 412 | + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;"> | |
| 413 | + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span> | |
| 414 | + <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 415 | + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> 保存</button> | |
| 416 | + </div> | |
| 417 | + </form> | |
| 418 | + <!-- 咨询--> | |
| 419 | + <form id="add_consult_table" class="c_register_form" style="display:none; margin-top: 35px;"> | |
| 420 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 421 | + <div class="uk-form-row"> | |
| 422 | + <label class="uk-form-label"> | |
| 423 | + 班线名称: | |
| 424 | + </label> | |
| 425 | + <div class="uk-form-controls"> | |
| 426 | + <input type="text" class="form-control" name="REPORT_STATION" placeholder="班线名称" required> | |
| 427 | + </div> | |
| 428 | + </div> | |
| 429 | + </div> | |
| 430 | + <div class="uk-grid uk-width-2-3 uk-container-center"> | |
| 431 | + <div class="uk-form-row"> | |
| 432 | + <label class="uk-form-label"> | |
| 433 | + 内容: | |
| 434 | + </label> | |
| 435 | + <div class="uk-form-controls"> | |
| 436 | + <input type="text" class="form-control" name="REPORT_BZ" placeholder="内容" required> | |
| 437 | + </div> | |
| 438 | + </div> | |
| 439 | + </div> | |
| 440 | + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;"> | |
| 441 | + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span> | |
| 442 | + <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 443 | + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> 保存</button> | |
| 444 | + </div> | |
| 445 | + </form> | |
| 446 | + </div> | |
| 447 | + </div> | |
| 448 | + | |
| 449 | + <script> | |
| 450 | + (function () { | |
| 451 | + var modal = '#report_register_update_mobal'; | |
| 452 | + // var form = '#report_register_form'; | |
| 453 | + var tableActive = '',formActive = ''; | |
| 454 | + var REPORT_TYPE, | |
| 455 | + lineList = {}, | |
| 456 | + companyMap = new Map(), | |
| 457 | + user = {},rr={}; | |
| 458 | + | |
| 459 | + $("#REPORT_XL").on("change", function(){ | |
| 460 | + var lineCode = $(this).val(); | |
| 461 | + if(lineCode == "" || lineCode == undefined || lineCode == null){ | |
| 462 | + $('#REPORT_GS').val(); | |
| 463 | + $('#REPORT_FGS').val(); | |
| 464 | + $('#REPORT_GSNAME').val(); | |
| 465 | + $('#REPORT_FGSNAME').val(); | |
| 466 | + } else { | |
| 467 | + // var temp = companyMap[lineCode].split("_"); | |
| 468 | + var code = companyMap[lineCode].split("-")[0].split(":"); | |
| 469 | + var name = companyMap[lineCode].split("-")[1].split(":"); | |
| 470 | + $('#REPORT_GS').val(code[0]); | |
| 471 | + $('#REPORT_FGS').val(code[1]); | |
| 472 | + $('#REPORT_GSNAME').val(name[0]); | |
| 473 | + $('#REPORT_FGSNAME').val(name[1]); | |
| 474 | + $("#REPORT_XLNAME").val($('#REPORT_XL option:selected').text()); | |
| 475 | + } | |
| 476 | + }); | |
| 477 | + | |
| 478 | + $(modal).on('init', function (e, data) { | |
| 479 | + $('#REPORT_DATE').datetimepicker({ | |
| 480 | + format : 'YYYY-MM-DD HH:mm:ss', | |
| 481 | + locale : 'zh-cn' | |
| 482 | + }); | |
| 483 | + tableActive = "add_"+data.tableActive; | |
| 484 | + rr = data.rr; | |
| 485 | + var typeInt = 1; | |
| 486 | + if (tableActive == 'add_first_last_late_table') { | |
| 487 | + typeInt = 1; | |
| 488 | + } else if (tableActive == 'add_large_interval_table') { | |
| 489 | + typeInt = 2; | |
| 490 | + } else if (tableActive == 'add_emergency_table') { | |
| 491 | + typeInt = 3; | |
| 492 | + } else if (tableActive == 'add_accident_table') { | |
| 493 | + typeInt = 4; | |
| 494 | + } else if (tableActive == 'add_rests_table') { | |
| 495 | + typeInt = 5; | |
| 496 | + } else if (tableActive == 'add_consult_table') { | |
| 497 | + typeInt = 6; | |
| 498 | + } | |
| 499 | + $('#REPORT_TYPE').val(typeInt); | |
| 500 | + if(typeInt != rr.REPORT_TYPE ) { | |
| 501 | + UIkit.modal(modal).hide(); | |
| 502 | + notify_err('您所选的数据有问题,请重新选择!'); | |
| 503 | + return; | |
| 504 | + } | |
| 505 | + document.getElementById(tableActive).style.display = ""; | |
| 506 | + | |
| 507 | + // 先给input赋值 | |
| 508 | + $('input,select', modal).each(function () { | |
| 509 | + var domName = $(this).attr('name'); | |
| 510 | + if(domName == 'REPORT_DATE'){ | |
| 511 | + $('#REPORT_DATE').val(moment(new Date(rr[domName])).format('YYYY-MM-DD HH:mm:ss')); | |
| 512 | + } else{ | |
| 513 | + $(this).val(rr[domName]); | |
| 514 | + } | |
| 515 | + }); | |
| 516 | + | |
| 517 | + lineList = data.lineList; | |
| 518 | + user = data.user; | |
| 519 | + $('#REPORT_BBR').val(user.userName+'/'+user.name); | |
| 520 | + gb_common.$get("/user/companyData",null,function(result) { | |
| 521 | + var len_ = lineList.length; | |
| 522 | + if (len_ > 0) { | |
| 523 | + // 遍历线路对应的公司 | |
| 524 | + for (var i = 0; i < result.length; i++) { | |
| 525 | + var companyCode = result[i].companyCode; | |
| 526 | + var children = result[i].children; | |
| 527 | + for (var j = 0; j < children.length; j++) { | |
| 528 | + var code = children[j].code; | |
| 529 | + for (var k = 0; k < lineList.length; k++) { | |
| 530 | + if (lineList[k].brancheCompany == code && lineList[k].company == companyCode) { | |
| 531 | + // companyMap[lineList[k].lineCode] = companyCode + "_" + code; | |
| 532 | + companyMap[lineList[k].lineCode] = companyCode + ":" + code + "-" + result[i].companyName + ":" + result[i].children[j].name; | |
| 533 | + } | |
| 534 | + } | |
| 535 | + } | |
| 536 | + } | |
| 537 | + } | |
| 538 | + // var options = '<option value="">请选择...</option>'; | |
| 539 | + var options = ''; | |
| 540 | + $.each(lineList, function (i,line) { | |
| 541 | + if(line.lineCode == rr.REPORT_XL) | |
| 542 | + options += '<option value='+line.lineCode+' selected = "selected" >'+line.name+'</option>'; | |
| 543 | + else | |
| 544 | + options += '<option value='+line.lineCode+'>'+line.name+'</option>'; | |
| 545 | + }); | |
| 546 | + $('#REPORT_XL').html(options); | |
| 547 | + $('#REPORT_XL').trigger("change"); | |
| 548 | + }); | |
| 549 | + changeType(tableActive); | |
| 550 | + | |
| 551 | + $('#REPORT_TYPE').on('change',function () { | |
| 552 | + document.getElementById(tableActive).style.display = "none"; | |
| 553 | + REPORT_TYPE = this.value; | |
| 554 | + if (REPORT_TYPE == 1) { | |
| 555 | + tableActive = 'add_first_last_late_table'; | |
| 556 | + } else if (REPORT_TYPE == 2) { | |
| 557 | + tableActive = 'add_large_interval_table'; | |
| 558 | + } else if (REPORT_TYPE == 3) { | |
| 559 | + tableActive = 'add_emergency_table'; | |
| 560 | + } else if (REPORT_TYPE == 4) { | |
| 561 | + tableActive = 'add_accident_table'; | |
| 562 | + } else if (REPORT_TYPE == 5) { | |
| 563 | + tableActive = 'add_rests_table'; | |
| 564 | + } else if (REPORT_TYPE == 6) { | |
| 565 | + tableActive = 'add_consult_table'; | |
| 566 | + } | |
| 567 | + document.getElementById(tableActive).style.display = ""; | |
| 568 | + changeType(tableActive); | |
| 569 | + }); | |
| 570 | + }); | |
| 571 | + | |
| 572 | + | |
| 573 | + function changeType(tableActiveStr) { | |
| 574 | + formActive = $('#'+tableActiveStr); | |
| 575 | + //校验不过 | |
| 576 | + formActive.on('err.field.fv', function () { | |
| 577 | + $('#submitChildTaskBtn', modal).removeClass('disabled').removeAttr('disabled'); | |
| 578 | + }); | |
| 579 | + | |
| 580 | + //校验 | |
| 581 | + formActive.formValidation({framework: 'uikit', locale: 'zh_CN'}); | |
| 582 | + //提交 | |
| 583 | + formActive.on('success.form.fv', function (e) { | |
| 584 | + e.preventDefault(); | |
| 585 | + var headData = $('#add_head_table').serializeJSON(); | |
| 586 | + var bodyData = $(formActive).serializeJSON(); | |
| 587 | + var params = {}; | |
| 588 | + Object.assign(params,headData,bodyData); | |
| 589 | + params.STATUS = '1'; | |
| 590 | + gb_common.$post('/reportRegister/', params, function (rs) { | |
| 591 | + if(rs.status == 'SUCCESS'){ | |
| 592 | + // $('#history-sch-maintain-modal').trigger('refresh', {'tableActive' : tableActive,'companyMap':companyMap,'lineList':lineList,'user':user}); | |
| 593 | + UIkit.modal(modal).hide(); | |
| 594 | + notify_succ('修改成功!'); | |
| 595 | + manageJs.refreshDate(); | |
| 596 | + if(rs.status2.CODE == '0') | |
| 597 | + notify_succ('同步到服务热线系统成功!'); | |
| 598 | + else | |
| 599 | + notify_err('同步到服务热线系统失败!'); | |
| 600 | + } else | |
| 601 | + notify_err('修改失败!'); | |
| 602 | + }); | |
| 603 | + }); | |
| 604 | + } | |
| 605 | + | |
| 606 | + //submit | |
| 607 | + $('.submitBtn', modal).on('click', function () { | |
| 608 | + $(this).addClass('disabled').attr('disabled', 'disabled'); | |
| 609 | + formActive.data('valid', false); | |
| 610 | + formActive.formValidation('validate'); | |
| 611 | + }); | |
| 612 | + })(); | |
| 613 | + </script> | |
| 614 | +</div> | |
| 0 | 615 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/js/data/json/north_toolbar.json
| ... | ... | @@ -188,5 +188,22 @@ |
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | ] |
| 191 | + }, | |
| 192 | + { | |
| 193 | + "id": 5, | |
| 194 | + "text": "服务热线系统", | |
| 195 | + "children": [ | |
| 196 | + { | |
| 197 | + "id": 5.1, | |
| 198 | + "text": "报备登记", | |
| 199 | + "event": "report_register" | |
| 200 | + }, | |
| 201 | + { | |
| 202 | + "id": 5.2, | |
| 203 | + "text": "报备登记报表", | |
| 204 | + "event": "form_report_register", | |
| 205 | + "icon": "uk-icon-table" | |
| 206 | + } | |
| 207 | + ] | |
| 191 | 208 | } |
| 192 | 209 | ] |
| 193 | 210 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/js/north/toolbar.js
| ... | ... | @@ -241,6 +241,13 @@ var gb_northToolbar = (function () { |
| 241 | 241 | }, |
| 242 | 242 | form_shifday: function () { |
| 243 | 243 | gb_embed_form_hanlde.open_modal_form_fragment('/pages/mforms/shifdays/shifday.html', '班次车辆人员日统计'); |
| 244 | + }, | |
| 245 | + form_report_register: function () { | |
| 246 | + // gb_embed_form_hanlde.open_modal_form_fragment('/pages/forms/statement/report_register/list2.html', '报备登记报表'); | |
| 247 | + open_modal('/real_control_v2/fragments/north/nav/report_register/list.html', {}, modal_opts); | |
| 248 | + }, | |
| 249 | + report_register: function () { | |
| 250 | + open_modal('/real_control_v2/fragments/north/nav/report_register/manage.html', {}, modal_opts); | |
| 244 | 251 | } |
| 245 | 252 | }; |
| 246 | 253 | ... | ... |