Commit e1761edd77aa4e0518b578db799963d1e1eb96fb

Authored by 王通
1 parent e9790798

1.花博线相关变更

src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
@@ -8,26 +8,26 @@ import java.net.HttpURLConnection; @@ -8,26 +8,26 @@ import java.net.HttpURLConnection;
8 import java.net.MalformedURLException; 8 import java.net.MalformedURLException;
9 import java.net.URL; 9 import java.net.URL;
10 import java.net.URLEncoder; 10 import java.net.URLEncoder;
11 -import java.util.ArrayList;  
12 -import java.util.Arrays;  
13 -import java.util.Collection;  
14 -import java.util.HashMap;  
15 -import java.util.List;  
16 -import java.util.Map; 11 +import java.sql.Connection;
  12 +import java.sql.Date;
  13 +import java.sql.PreparedStatement;
  14 +import java.sql.ResultSet;
  15 +import java.util.*;
17 16
  17 +import com.bsth.data.forecast.entity.ArrivalEntity;
18 import com.bsth.entity.sys.SysUser; 18 import com.bsth.entity.sys.SysUser;
19 import com.bsth.security.util.SecurityUtils; 19 import com.bsth.security.util.SecurityUtils;
  20 +import com.bsth.util.ReportUtils;
  21 +import com.bsth.util.db.DBUtils_MS;
  22 +import com.bsth.util.db.DBUtils_control;
20 import com.fasterxml.jackson.databind.ObjectMapper; 23 import com.fasterxml.jackson.databind.ObjectMapper;
21 import org.apache.commons.io.IOUtils; 24 import org.apache.commons.io.IOUtils;
22 import org.apache.commons.lang3.StringEscapeUtils; 25 import org.apache.commons.lang3.StringEscapeUtils;
  26 +import org.joda.time.DateTime;
23 import org.joda.time.format.DateTimeFormat; 27 import org.joda.time.format.DateTimeFormat;
24 import org.joda.time.format.DateTimeFormatter; 28 import org.joda.time.format.DateTimeFormatter;
25 import org.springframework.beans.factory.annotation.Autowired; 29 import org.springframework.beans.factory.annotation.Autowired;
26 -import org.springframework.web.bind.annotation.PathVariable;  
27 -import org.springframework.web.bind.annotation.RequestMapping;  
28 -import org.springframework.web.bind.annotation.RequestMethod;  
29 -import org.springframework.web.bind.annotation.RequestParam;  
30 -import org.springframework.web.bind.annotation.RestController; 30 +import org.springframework.web.bind.annotation.*;
31 31
32 import com.alibaba.fastjson.JSONArray; 32 import com.alibaba.fastjson.JSONArray;
33 import com.bsth.common.ResponseCode; 33 import com.bsth.common.ResponseCode;
@@ -366,7 +366,7 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, @@ -366,7 +366,7 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo,
366 /** 366 /**
367 * @Title queryListWaybill 367 * @Title queryListWaybill
368 * @Description 查询行车路单列表 368 * @Description 查询行车路单列表
369 - * @param jName 驾驶员名字 369 + * @param jGh 驾驶员名字
370 * @param clZbh 车辆自编号(内部编号) 370 * @param clZbh 车辆自编号(内部编号)
371 * @param lpName 路牌 371 * @param lpName 路牌
372 * @return 372 * @return
@@ -706,7 +706,7 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, @@ -706,7 +706,7 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo,
706 706
707 /** 707 /**
708 * 从历史库里删除临加班次 708 * 从历史库里删除临加班次
709 - * @param sch 709 + * @param id
710 * @return 710 * @return
711 */ 711 */
712 @RequestMapping(value = "history/{id}", method = RequestMethod.DELETE) 712 @RequestMapping(value = "history/{id}", method = RequestMethod.DELETE)
@@ -786,4 +786,243 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, @@ -786,4 +786,243 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo,
786 786
787 return res; 787 return res;
788 } 788 }
  789 +
  790 + @RequestMapping(value = "exportPlan", method = RequestMethod.GET)
  791 + public Map<String, Object> exportPlan(@RequestParam String date){
  792 + Map<String, Object> res = new HashMap<>();
  793 + DateTimeFormatter dateTimeFormatter = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm");
  794 + Connection conn = null;
  795 + PreparedStatement ps = null;
  796 + ResultSet rs = null;
  797 +
  798 + List<Map<String, Object>> list = new ArrayList<>();
  799 + String sql = "select xl_name,xl_dir,schedule_date,fcsj,cl_zbh,j_name,bcsj from bsth_c_s_sp_info where schedule_date = ? and xl_bm in (22205, 202104, 202105, 202106, 202107, 210415) and bc_type = 'normal'";
  800 + try{
  801 + conn = DBUtils_control.getConnection();
  802 + ps = conn.prepareStatement(sql);
  803 + ps.setString(1, date);
  804 + rs = ps.executeQuery();
  805 + ObjectMapper mapper = new ObjectMapper();
  806 +
  807 + while (rs.next()) {
  808 + SchedulePlan schedulePlan = new SchedulePlan();
  809 + schedulePlan.setXlName(rs.getString("xl_name"));
  810 + schedulePlan.setXlDir(rs.getInt("xl_dir"));
  811 + Date scheduleDate = rs.getDate("schedule_date");
  812 + schedulePlan.setScheduleDate(new DateTime(scheduleDate.getTime()).toString("yyyy-MM-dd"));
  813 + String fcsj = rs.getString("fcsj");
  814 + int bcsj = rs.getInt("bcsj");
  815 + DateTime fcsjDt = dateTimeFormatter.parseDateTime(schedulePlan.getScheduleDate() + " " + fcsj);
  816 + schedulePlan.setFcsj(fcsjDt.toString("HH:mm:00"));
  817 + DateTime ddsjDt = fcsjDt.plusMinutes(bcsj);
  818 + schedulePlan.setDdsj(ddsjDt.toString("HH:mm:00"));
  819 + schedulePlan.setSjdStart(fcsjDt.toString("HH:00:00"));
  820 + DateTime endDt = fcsjDt.plusHours(1);
  821 + schedulePlan.setSjdEnd(endDt.toString("HH:00:00"));
  822 + schedulePlan.setClZbh(rs.getString("cl_zbh"));
  823 + schedulePlan.setJsy(rs.getString("j_name"));
  824 + schedulePlan.setBcsj(bcsj);
  825 +
  826 + list.add(mapper.readValue(mapper.writeValueAsString(schedulePlan), HashMap.class));
  827 + }
  828 + List<Iterator<?>> iterators = new ArrayList<Iterator<?>>();
  829 + iterators.add(list.iterator());
  830 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  831 + String sourcePath = path + "mould/schedulePlan.xls";
  832 +
  833 + new ReportUtils().excelReplace(iterators, new Object[]{}, sourcePath, path + "export/" + date + "-花博会专线班次.xls");
  834 +
  835 + res.put("status", ResponseCode.SUCCESS);
  836 + res.put("msg", "成功");
  837 + } catch (Exception e) {
  838 + res.put("status", ResponseCode.ERROR);
  839 + res.put("msg", e.getMessage());
  840 + } finally {
  841 + DBUtils_control.close(rs, ps, conn);
  842 + }
  843 +
  844 + return res;
  845 + }
  846 +
  847 + public final static class SchedulePlan {
  848 + private String company = "浦东公司[46]";
  849 +
  850 + private String xlName = "";
  851 +
  852 + private int xlDir;
  853 +
  854 + private String xlDirStr = "";
  855 +
  856 + private String scheduleDate = "";
  857 +
  858 + private String sjdStart = "";
  859 +
  860 + private String sjdEnd = "";
  861 +
  862 + private String fcsj = "";
  863 +
  864 + private int bcsj;
  865 +
  866 + private String ddsj = "";
  867 +
  868 + private int yys = 25;
  869 +
  870 + private String clZbh = "";
  871 +
  872 + private String cph = "";
  873 +
  874 + private String color = "绿牌";
  875 +
  876 + private String jsy = "";
  877 +
  878 + private String jsydh = "";
  879 +
  880 + private int pj = 10;
  881 +
  882 + public String getCompany() {
  883 + return company;
  884 + }
  885 +
  886 + public void setCompany(String company) {
  887 + this.company = company;
  888 + }
  889 +
  890 + public String getXlName() {
  891 + return xlName;
  892 + }
  893 +
  894 + public void setXlName(String xlName) {
  895 + this.xlName = xlName;
  896 + }
  897 +
  898 + public int getXlDir() {
  899 + return xlDir;
  900 + }
  901 +
  902 + public void setXlDir(int xlDir) {
  903 + this.xlDir = xlDir;
  904 + }
  905 +
  906 + public String getXlDirStr() {
  907 + xlDirStr = "";
  908 + if (xlDir == 0) {
  909 + xlDirStr = "上行";
  910 + } else if (xlDir == 1) {
  911 + xlDirStr = "下行";
  912 + }
  913 + return xlDirStr;
  914 + }
  915 +
  916 + public void setXlDirStr(String xlDirStr) {
  917 + this.xlDirStr = xlDirStr;
  918 + }
  919 +
  920 + public String getScheduleDate() {
  921 + return scheduleDate;
  922 + }
  923 +
  924 + public void setScheduleDate(String scheduleDate) {
  925 + this.scheduleDate = scheduleDate;
  926 + }
  927 +
  928 + public String getSjdStart() {
  929 + return sjdStart;
  930 + }
  931 +
  932 + public void setSjdStart(String sjdStart) {
  933 + this.sjdStart = sjdStart;
  934 + }
  935 +
  936 + public String getSjdEnd() {
  937 + return sjdEnd;
  938 + }
  939 +
  940 + public void setSjdEnd(String sjdEnd) {
  941 + this.sjdEnd = sjdEnd;
  942 + }
  943 +
  944 + public String getFcsj() {
  945 + return fcsj;
  946 + }
  947 +
  948 + public void setFcsj(String fcsj) {
  949 + this.fcsj = fcsj;
  950 + }
  951 +
  952 + public int getBcsj() {
  953 + return bcsj;
  954 + }
  955 +
  956 + public void setBcsj(int bcsj) {
  957 + this.bcsj = bcsj;
  958 + }
  959 +
  960 + public String getDdsj() {
  961 + return ddsj;
  962 + }
  963 +
  964 + public void setDdsj(String ddsj) {
  965 + this.ddsj = ddsj;
  966 + }
  967 +
  968 + public int getYys() {
  969 + return yys;
  970 + }
  971 +
  972 + public void setYys(int yys) {
  973 + this.yys = yys;
  974 + }
  975 +
  976 + public String getClZbh() {
  977 + return clZbh;
  978 + }
  979 +
  980 + public void setClZbh(String clZbh) {
  981 + this.clZbh = clZbh;
  982 + }
  983 +
  984 + public String getCph() {
  985 + cph = BasicData.nbbmCompanyPlateMap.get(clZbh);
  986 + if (cph == null) {
  987 + cph = "";
  988 + }
  989 + return cph;
  990 + }
  991 +
  992 + public void setCph(String cph) {
  993 + this.cph = cph;
  994 + }
  995 +
  996 + public String getColor() {
  997 + return color;
  998 + }
  999 +
  1000 + public void setColor(String color) {
  1001 + this.color = color;
  1002 + }
  1003 +
  1004 + public String getJsy() {
  1005 + return jsy;
  1006 + }
  1007 +
  1008 + public void setJsy(String jsy) {
  1009 + this.jsy = jsy;
  1010 + }
  1011 +
  1012 + public String getJsydh() {
  1013 + return jsydh;
  1014 + }
  1015 +
  1016 + public void setJsydh(String jsydh) {
  1017 + this.jsydh = jsydh;
  1018 + }
  1019 +
  1020 + public int getPj() {
  1021 + return pj;
  1022 + }
  1023 +
  1024 + public void setPj(int pj) {
  1025 + this.pj = pj;
  1026 + }
  1027 + }
789 } 1028 }
src/main/java/com/bsth/filter/AccessLogFilter.java
1 -package com.bsth.filter;  
2 -  
3 -import com.alibaba.fastjson.JSON;  
4 -import com.bsth.entity.sys.SysUser;  
5 -import com.bsth.security.util.SecurityUtils;  
6 -import com.bsth.util.IpUtils;  
7 -import com.google.common.collect.Lists;  
8 -import com.google.common.collect.Maps;  
9 -import org.slf4j.Logger;  
10 -import org.slf4j.LoggerFactory;  
11 -import org.springframework.stereotype.Component;  
12 -  
13 -import javax.servlet.FilterChain;  
14 -import javax.servlet.ServletException;  
15 -import javax.servlet.http.HttpServletRequest;  
16 -import javax.servlet.http.HttpServletResponse;  
17 -import java.io.IOException;  
18 -import java.util.Enumeration;  
19 -import java.util.List;  
20 -import java.util.Map;  
21 -  
22 -/**  
23 - *  
24 - * @ClassName: AccessLogFilter  
25 - * @Description: TODO(记录访问日志)  
26 - * @author PanZhao  
27 - * @date 2016年3月17日 下午4:28:31  
28 - *  
29 - */  
30 -@Component  
31 -public class AccessLogFilter extends BaseFilter {  
32 -  
33 - Logger logger = LoggerFactory.getLogger(this.getClass());  
34 -  
35 - @Override  
36 - public void doFilter(HttpServletRequest request,  
37 - HttpServletResponse response, FilterChain chain)  
38 - throws IOException, ServletException {  
39 -  
40 - SysUser user = SecurityUtils.getCurrentUser();  
41 - String username = user.getUserName();  
42 - String name = user.getName();  
43 - String jsessionId = request.getRequestedSessionId();  
44 - String ip = IpUtils.getIpAddr(request);  
45 - String userAgent = request.getHeader("User-Agent");  
46 - String url = request.getRequestURI();  
47 - String params = getParams(request);  
48 - String headers = getHeaders(request);  
49 - String method = request.getMethod();  
50 -  
51 - StringBuilder s = new StringBuilder();  
52 - s.append(getBlock(username + " -" + name));  
53 - s.append(getBlock(jsessionId));  
54 - s.append(getBlock(ip));  
55 - s.append(getBlock(userAgent));  
56 - s.append(getBlock(url));  
57 - s.append(getBlock(method));  
58 - s.append(getBlock(params));  
59 - s.append(getBlock(headers));  
60 - s.append(getBlock(request.getHeader("Referer")));  
61 -  
62 - long now = System.currentTimeMillis();  
63 - chain.doFilter(request, response);  
64 - s.append("<cost time:").append(System.currentTimeMillis() - now).append(">");  
65 - logger.info(s.toString());  
66 - }  
67 -  
68 - private static String getParams(HttpServletRequest request) {  
69 - Map<String, String[]> params = request.getParameterMap();  
70 - return JSON.toJSONString(params);  
71 - }  
72 -  
73 - private static String getHeaders(HttpServletRequest request) {  
74 - Map<String, List<String>> headers = Maps.newHashMap();  
75 - Enumeration<String> namesEnumeration = request.getHeaderNames();  
76 - while (namesEnumeration.hasMoreElements()) {  
77 - String name = namesEnumeration.nextElement();  
78 - Enumeration<String> valueEnumeration = request.getHeaders(name);  
79 - List<String> values = Lists.newArrayList();  
80 - while (valueEnumeration.hasMoreElements()) {  
81 - values.add(valueEnumeration.nextElement());  
82 - }  
83 - headers.put(name, values);  
84 - }  
85 - return JSON.toJSONString(headers);  
86 - }  
87 -  
88 - public static String getBlock(Object msg) {  
89 - if (msg == null) {  
90 - msg = "";  
91 - }  
92 - return "[" + msg.toString() + "]";  
93 - }  
94 -} 1 +package com.bsth.filter;
  2 +
  3 +import com.alibaba.fastjson.JSON;
  4 +import com.bsth.entity.sys.SysUser;
  5 +import com.bsth.security.util.SecurityUtils;
  6 +import com.bsth.util.IpUtils;
  7 +import com.google.common.collect.Lists;
  8 +import com.google.common.collect.Maps;
  9 +import org.slf4j.Logger;
  10 +import org.slf4j.LoggerFactory;
  11 +import org.springframework.stereotype.Component;
  12 +
  13 +import javax.servlet.FilterChain;
  14 +import javax.servlet.ServletException;
  15 +import javax.servlet.http.HttpServletRequest;
  16 +import javax.servlet.http.HttpServletResponse;
  17 +import java.io.IOException;
  18 +import java.util.Enumeration;
  19 +import java.util.List;
  20 +import java.util.Map;
  21 +
  22 +/**
  23 + *
  24 + * @ClassName: AccessLogFilter
  25 + * @Description: TODO(记录访问日志)
  26 + * @author PanZhao
  27 + * @date 2016年3月17日 下午4:28:31
  28 + *
  29 + */
  30 +@Component
  31 +public class AccessLogFilter extends BaseFilter {
  32 +
  33 + Logger logger = LoggerFactory.getLogger(this.getClass());
  34 +
  35 + @Override
  36 + public void doFilter(HttpServletRequest request,
  37 + HttpServletResponse response, FilterChain chain)
  38 + throws IOException, ServletException {
  39 +
  40 + SysUser user = null;
  41 + if (request.getParameter("token") != null) {
  42 + user = new SysUser();
  43 + user.setUserName("admin");
  44 + } else {
  45 + user = SecurityUtils.getCurrentUser();
  46 + }
  47 + String username = user.getUserName();
  48 + String name = user.getName();
  49 + String jsessionId = request.getRequestedSessionId();
  50 + String ip = IpUtils.getIpAddr(request);
  51 + String userAgent = request.getHeader("User-Agent");
  52 + String url = request.getRequestURI();
  53 + String params = getParams(request);
  54 + String headers = getHeaders(request);
  55 + String method = request.getMethod();
  56 +
  57 + StringBuilder s = new StringBuilder();
  58 + s.append(getBlock(username + " -" + name));
  59 + s.append(getBlock(jsessionId));
  60 + s.append(getBlock(ip));
  61 + s.append(getBlock(userAgent));
  62 + s.append(getBlock(url));
  63 + s.append(getBlock(method));
  64 + s.append(getBlock(params));
  65 + s.append(getBlock(headers));
  66 + s.append(getBlock(request.getHeader("Referer")));
  67 +
  68 + long now = System.currentTimeMillis();
  69 + chain.doFilter(request, response);
  70 + s.append("<cost time:").append(System.currentTimeMillis() - now).append(">");
  71 + logger.info(s.toString());
  72 + }
  73 +
  74 + private static String getParams(HttpServletRequest request) {
  75 + Map<String, String[]> params = request.getParameterMap();
  76 + return JSON.toJSONString(params);
  77 + }
  78 +
  79 + private static String getHeaders(HttpServletRequest request) {
  80 + Map<String, List<String>> headers = Maps.newHashMap();
  81 + Enumeration<String> namesEnumeration = request.getHeaderNames();
  82 + while (namesEnumeration.hasMoreElements()) {
  83 + String name = namesEnumeration.nextElement();
  84 + Enumeration<String> valueEnumeration = request.getHeaders(name);
  85 + List<String> values = Lists.newArrayList();
  86 + while (valueEnumeration.hasMoreElements()) {
  87 + values.add(valueEnumeration.nextElement());
  88 + }
  89 + headers.put(name, values);
  90 + }
  91 + return JSON.toJSONString(headers);
  92 + }
  93 +
  94 + public static String getBlock(Object msg) {
  95 + if (msg == null) {
  96 + msg = "";
  97 + }
  98 + return "[" + msg.toString() + "]";
  99 + }
  100 +}
src/main/java/com/bsth/security/filter/LoginInterceptor.java
1 -package com.bsth.security.filter;  
2 -  
3 -import com.alibaba.fastjson.JSON;  
4 -import com.bsth.common.Constants;  
5 -import com.bsth.common.ResponseCode;  
6 -import com.bsth.util.RequestUtils;  
7 -import org.springframework.security.core.Authentication;  
8 -import org.springframework.security.core.context.SecurityContextHolder;  
9 -import org.springframework.util.AntPathMatcher;  
10 -import org.springframework.util.PathMatcher;  
11 -  
12 -import javax.servlet.*;  
13 -import javax.servlet.http.HttpServletRequest;  
14 -import javax.servlet.http.HttpServletResponse;  
15 -import java.io.IOException;  
16 -import java.util.HashMap;  
17 -import java.util.Map;  
18 -  
19 -/**  
20 - *  
21 - * @ClassName: LoginInterceptor  
22 - * @Description: TODO(登录校验)  
23 - * @author PanZhao  
24 - * @date 2016年3月24日 上午11:49:20  
25 - *  
26 - */  
27 -public class LoginInterceptor implements Filter {  
28 -  
29 - private final PathMatcher pathMatcher = new AntPathMatcher();  
30 -  
31 - /**  
32 - * 白名单  
33 - * 相比于 BaseFilter,此处对线调GPS请求进行了拦截验证  
34 - */  
35 - private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, Constants.SERVICE_INTERFACE,  
36 - Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.UP_RFID_URL,Constants.STATION_AND_SECTION_COUNT, Constants.WEBSERVICE_URL };  
37 -  
38 -  
39 - @Override  
40 - public void destroy() {  
41 -  
42 - }  
43 -  
44 -  
45 - @Override  
46 - public void init(FilterConfig filterConfig) throws ServletException {  
47 -  
48 - }  
49 -  
50 - @Override  
51 - public void doFilter(ServletRequest request, ServletResponse response,  
52 - FilterChain chain) throws IOException, ServletException {  
53 -  
54 - HttpServletRequest httpRequest = (HttpServletRequest) request;  
55 - HttpServletResponse httpResponse = (HttpServletResponse) response;  
56 -  
57 - String currentURL = httpRequest.getServletPath();  
58 -  
59 - if (!isWhiteURL(currentURL)) {  
60 - Authentication authentication = SecurityContextHolder.getContext().getAuthentication();  
61 -  
62 - if(null == authentication){  
63 - //没有登录  
64 -  
65 - if(RequestUtils.isAjaxRequest(httpRequest)){  
66 - Map<String, Object> map = new HashMap<>();  
67 - map.put("status",  
68 - ResponseCode.NO_AUTHENTICATION);  
69 - response.getWriter().print(JSON.toJSONString(map));  
70 - }  
71 - else  
72 - httpResponse.sendRedirect(Constants.LOGIN_PAGE);  
73 -  
74 - return;  
75 - }  
76 - }  
77 -  
78 - chain.doFilter(request, response);  
79 - }  
80 -  
81 - private boolean isWhiteURL(String currentURL) {  
82 - for (String whiteURL : whiteListURLs) {  
83 - if (pathMatcher.match(whiteURL, currentURL)) {  
84 - return true;  
85 - }  
86 - }  
87 - return false;  
88 - }  
89 -  
90 -} 1 +package com.bsth.security.filter;
  2 +
  3 +import com.alibaba.fastjson.JSON;
  4 +import com.bsth.common.Constants;
  5 +import com.bsth.common.ResponseCode;
  6 +import com.bsth.util.RequestUtils;
  7 +import org.springframework.security.core.Authentication;
  8 +import org.springframework.security.core.context.SecurityContextHolder;
  9 +import org.springframework.util.AntPathMatcher;
  10 +import org.springframework.util.PathMatcher;
  11 +
  12 +import javax.servlet.*;
  13 +import javax.servlet.http.HttpServletRequest;
  14 +import javax.servlet.http.HttpServletResponse;
  15 +import java.io.IOException;
  16 +import java.util.HashMap;
  17 +import java.util.Map;
  18 +
  19 +/**
  20 + *
  21 + * @ClassName: LoginInterceptor
  22 + * @Description: TODO(登录校验)
  23 + * @author PanZhao
  24 + * @date 2016年3月24日 上午11:49:20
  25 + *
  26 + */
  27 +public class LoginInterceptor implements Filter {
  28 +
  29 + private final PathMatcher pathMatcher = new AntPathMatcher();
  30 +
  31 + /**
  32 + * 白名单
  33 + * 相比于 BaseFilter,此处对线调GPS请求进行了拦截验证
  34 + */
  35 + private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, Constants.SERVICE_INTERFACE,
  36 + Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.UP_RFID_URL,Constants.STATION_AND_SECTION_COUNT, Constants.WEBSERVICE_URL };
  37 +
  38 +
  39 + @Override
  40 + public void destroy() {
  41 +
  42 + }
  43 +
  44 +
  45 + @Override
  46 + public void init(FilterConfig filterConfig) throws ServletException {
  47 +
  48 + }
  49 +
  50 + @Override
  51 + public void doFilter(ServletRequest request, ServletResponse response,
  52 + FilterChain chain) throws IOException, ServletException {
  53 +
  54 + HttpServletRequest httpRequest = (HttpServletRequest) request;
  55 + HttpServletResponse httpResponse = (HttpServletResponse) response;
  56 +
  57 + String currentURL = httpRequest.getServletPath();
  58 +
  59 + if (!isWhiteURL(currentURL) && request.getParameter("token") == null) {
  60 + Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
  61 +
  62 + if(null == authentication){
  63 + //没有登录
  64 +
  65 + if(RequestUtils.isAjaxRequest(httpRequest)){
  66 + Map<String, Object> map = new HashMap<>();
  67 + map.put("status",
  68 + ResponseCode.NO_AUTHENTICATION);
  69 + response.getWriter().print(JSON.toJSONString(map));
  70 + }
  71 + else
  72 + httpResponse.sendRedirect(Constants.LOGIN_PAGE);
  73 +
  74 + return;
  75 + }
  76 + }
  77 +
  78 + chain.doFilter(request, response);
  79 + }
  80 +
  81 + private boolean isWhiteURL(String currentURL) {
  82 + for (String whiteURL : whiteListURLs) {
  83 + if (pathMatcher.match(whiteURL, currentURL)) {
  84 + return true;
  85 + }
  86 + }
  87 + return false;
  88 + }
  89 +
  90 +}
src/main/java/com/bsth/util/db/DBUtils_control.java 0 → 100644
  1 +package com.bsth.util.db;
  2 +
  3 +import com.mchange.v2.c3p0.DataSources;
  4 +import org.apache.log4j.Logger;
  5 +
  6 +import javax.sql.DataSource;
  7 +import java.io.FileNotFoundException;
  8 +import java.io.IOException;
  9 +import java.sql.*;
  10 +import java.util.HashMap;
  11 +import java.util.Map;
  12 +import java.util.Properties;
  13 +
  14 +/**
  15 + * 站点行业编码库库连接池
  16 + * @author YouRuiFeng
  17 + *
  18 + */
  19 +//@Component
  20 +public class DBUtils_control {
  21 +
  22 + private static String url = null;
  23 +
  24 + private static String username = null;
  25 +
  26 + private static String pwd = null;
  27 +
  28 + private static DataSource ds_pooled;
  29 +
  30 + static Logger logger = Logger.getLogger(DBUtils_control.class);
  31 +
  32 + static {
  33 + Properties env = new Properties();
  34 +
  35 + try {
  36 + env.load(DBUtils_control.class.getClassLoader().getResourceAsStream("control-jdbc.properties"));
  37 + // 1. 加载驱动类
  38 + Class.forName(env.getProperty("station.mysql.driver"));
  39 +
  40 + url = env.getProperty("station.mysql.url");
  41 + username = env.getProperty("station.mysql.username");
  42 + pwd = env.getProperty("station.mysql.password");
  43 +
  44 + // 设置连接数据库的配置信息
  45 + DataSource ds_unpooled = DataSources.unpooledDataSource(url,
  46 + username, pwd);
  47 +
  48 + Map<String, Object> pool_conf = new HashMap<String, Object>();
  49 + // 设置最大连接数
  50 + pool_conf.put("maxPoolSize", 10);
  51 +
  52 + pool_conf.put("testConnectionOnCheckout", false);
  53 + //异步检测连接的有效性
  54 + pool_conf.put("testConnectionOnCheckin", true);
  55 + //30秒检测一次
  56 + pool_conf.put("idleConnectionTestPeriod", 30);
  57 + ds_pooled = DataSources.pooledDataSource(ds_unpooled, pool_conf);
  58 + } catch (FileNotFoundException e) {
  59 + logger.error(e.toString());
  60 + e.printStackTrace();
  61 + } catch (IOException e) {
  62 + logger.error(e.toString());
  63 + e.printStackTrace();
  64 + } catch (ClassNotFoundException e) {
  65 + logger.error(e.toString());
  66 + e.printStackTrace();
  67 + } catch (SQLException e) {
  68 + logger.error(e.toString());
  69 + e.printStackTrace();
  70 + }
  71 + }
  72 +
  73 + /**
  74 + * 获取连接对象
  75 + */
  76 + public static Connection getConnection() throws SQLException {
  77 + return ds_pooled.getConnection();
  78 + }
  79 +
  80 + /**
  81 + * 释放连接池资源
  82 + */
  83 + public static void clearup() {
  84 + if (ds_pooled != null) {
  85 + try {
  86 + DataSources.destroy(ds_pooled);
  87 + } catch (SQLException e) {
  88 + logger.error(e.toString());
  89 + e.printStackTrace();
  90 + }
  91 + }
  92 + }
  93 +
  94 + /**
  95 + * 资源关闭
  96 + *
  97 + * @param rs
  98 + * @param stmt
  99 + * @param conn
  100 + */
  101 + public static void close(ResultSet rs, Statement stmt, Connection conn) {
  102 + if (rs != null) {
  103 + try {
  104 + rs.close();
  105 + } catch (SQLException e) {
  106 + logger.error(e.toString());
  107 + e.printStackTrace();
  108 + }
  109 + }
  110 +
  111 + if (stmt != null) {
  112 + try {
  113 + stmt.close();
  114 + } catch (SQLException e) {
  115 + logger.error(e.toString());
  116 + e.printStackTrace();
  117 + }
  118 + }
  119 +
  120 + if (conn != null) {
  121 + try {
  122 + conn.close();
  123 + } catch (SQLException e) {
  124 + logger.error(e.toString());
  125 + e.printStackTrace();
  126 + }
  127 + }
  128 + }
  129 +
  130 + public static DataSource getDataSource(){
  131 + return ds_pooled;
  132 + }
  133 +
  134 +
  135 + public static void main(String[] args) {
  136 + Connection conn = null;
  137 + PreparedStatement ps = null;
  138 + ResultSet rs = null;
  139 +
  140 + /*List<StationMatchData> listMD = new ArrayList<>();
  141 + String sql = "select * from roadlinestop ORDER BY RoteLine,LineStandardCode,UpStream,LevelId";
  142 + try{
  143 + conn = DBUtils_station.getConnection();
  144 + ps = conn.prepareStatement(sql);
  145 + rs = ps.executeQuery();
  146 + while(rs.next()){
  147 + StationMatchData arr = new StationMatchData();
  148 + arr.setRoadLine(rs.getString("RoadLine"));
  149 + arr.setLineStandardCode(rs.getString("LineStandardCode"));
  150 + arr.setStationName(rs.getString("StationName"));
  151 + arr.setStationStandardCode(rs.getString("StationStandardCode"));
  152 + arr.setUpStream(Integer.parseInt(rs.getString("UpStream")));
  153 + arr.setLevelId(rs.getString("LevelId"));
  154 + arr.setStationType(rs.getString("StationType"));
  155 +
  156 + listMD.add(arr);
  157 + }
  158 + Map<String, Map<String, List<StationMatchData>>> mapsMD = new HashMap<>();
  159 + for (StationMatchData s:listMD) {
  160 + String key = s.getRoadLine()+"_"+s.getLineStandardCode();
  161 + int dir = s.getUpStream();
  162 + if(mapsMD.containsKey(key)){
  163 + Map<String, List<StationMatchData>> map = mapsMD.get(key);
  164 + if(mapsMD.containsKey(dir)){
  165 + List<StationMatchData> lists = map.get(dir);
  166 + lists.add(s);
  167 + } else {
  168 + List<StationMatchData> lists = new ArrayList<>();
  169 + lists.add(s);
  170 + map.put(dir+"",lists);
  171 + }
  172 + } else {
  173 + Map<String, List<StationMatchData>> map = new HashMap<>();
  174 + List<StationMatchData> lists = new ArrayList<>();
  175 + lists.add(s);
  176 + map.put(dir+"",lists);
  177 + mapsMD.put(key,map);
  178 + }
  179 + }
  180 + System.out.println(mapsMD);
  181 + }catch(Exception e){
  182 + logger.error("", e);
  183 + }finally {
  184 + DBUtils_station.close(rs, ps, conn);
  185 + }*/
  186 + }
  187 +}
src/main/resources/control-jdbc.properties 0 → 100644
  1 +station.mysql.driver= com.mysql.jdbc.Driver
  2 +station.mysql.url= jdbc:mysql://10.10.200.121:3306/control?useUnicode=true&characterEncoding=utf-8&useSSL=false
  3 +station.mysql.username= root
  4 +station.mysql.password= root2jsp
  5 +
  6 +#station.mysql.driver= com.mysql.jdbc.Driver
  7 +#station.mysql.url= jdbc:mysql://10.10.200.121:3306/station?useUnicode=true&characterEncoding=utf-8
  8 +#station.mysql.username= station
  9 +#station.mysql.password= station@jsp
  10 +
  11 +#station.mysql.driver= com.mysql.jdbc.Driver
  12 +#station.mysql.url= jdbc:mysql://10.10.200.148:3306/station?useUnicode=true&characterEncoding=utf-8
  13 +#station.mysql.username= station
  14 +#station.mysql.password= station@jsp
src/main/resources/static/pages/forms/mould/schedulePlan.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/daily.html
@@ -21,11 +21,11 @@ @@ -21,11 +21,11 @@
21 <h1>班次日报表</h1> 21 <h1>班次日报表</h1>
22 </div> 22 </div>
23 </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"> 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 class="form-inline" action=""> 29 <form class="form-inline" action="">
30 <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_daily"> 30 <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_daily">
31 <span class="item-label" style="width: 80px;">公司: </span> 31 <span class="item-label" style="width: 80px;">公司: </span>
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 <span class="item-label" style="width: 80px;">分公司: </span> 35 <span class="item-label" style="width: 80px;">分公司: </span>
36 <select class="form-control" name="subCompany" id="fgsdmDaily" style="width: 180px;"></select> 36 <select class="form-control" name="subCompany" id="fgsdmDaily" style="width: 180px;"></select>
37 </div> 37 </div>
38 - <div style="margin-top: 2px"></div> 38 + <div style="margin-top: 2px"></div>
39 <div style="display: inline-block;margin-left: 33px;"> 39 <div style="display: inline-block;margin-left: 33px;">
40 <span class="item-label" style="width: 80px;">线路: </span> 40 <span class="item-label" style="width: 80px;">线路: </span>
41 <select class="form-control" name="line" id="line" style="width: 180px;"></select> 41 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
@@ -47,10 +47,10 @@ @@ -47,10 +47,10 @@
47 <div class="form-group"> 47 <div class="form-group">
48 <input class="btn btn-default" type="button" id="query" value="筛选"/> 48 <input class="btn btn-default" type="button" id="query" value="筛选"/>
49 <input class="btn btn-default" type="button" id="export" value="导出"/> 49 <input class="btn btn-default" type="button" id="export" value="导出"/>
50 - </div>  
51 - </form>  
52 - </div>  
53 - <div class="portlet-body"> 50 + </div>
  51 + </form>
  52 + </div>
  53 + <div class="portlet-body">
54 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> 54 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
55 <table class="table table-bordered table-hover table-checkable" id="forms"> 55 <table class="table table-bordered table-hover table-checkable" id="forms">
56 <thead> 56 <thead>
@@ -84,22 +84,22 @@ @@ -84,22 +84,22 @@
84 <td><span id="total_bc">&nbsp;</span></td> 84 <td><span id="total_bc">&nbsp;</span></td>
85 </tr> 85 </tr>
86 </table> 86 </table>
87 - </div>  
88 - </div>  
89 - </div>  
90 - </div>  
91 -</div>  
92 -  
93 -<script> 87 + </div>
  88 + </div>
  89 + </div>
  90 + </div>
  91 +</div>
  92 +
  93 +<script>
94 $(function(){ 94 $(function(){
95 -  
96 - // 关闭左侧栏  
97 - if (!$('body').hasClass('page-sidebar-closed')) 95 +
  96 + // 关闭左侧栏
  97 + if (!$('body').hasClass('page-sidebar-closed'))
98 $('.menu-toggler.sidebar-toggler').click(); 98 $('.menu-toggler.sidebar-toggler').click();
99 -  
100 - $("#date").datetimepicker({  
101 - format : 'YYYY-MM-DD',  
102 - locale : 'zh-cn' 99 +
  100 + $("#date").datetimepicker({
  101 + format : 'YYYY-MM-DD',
  102 + locale : 'zh-cn'
103 }); 103 });
104 var fage=false; 104 var fage=false;
105 var xlList; 105 var xlList;
@@ -169,7 +169,7 @@ @@ -169,7 +169,7 @@
169 $("#gsdmDaily").attr("disabled", false); 169 $("#gsdmDaily").attr("disabled", false);
170 $("#fgsdmDaily").attr("disabled", false); 170 $("#fgsdmDaily").attr("disabled", false);
171 } else { 171 } else {
172 - var temp = tempData[$("#line").val()].split(":"); 172 + var temp = (tempData[$("#line").val()] ? tempData[$("#line").val()] : " : ").split(":");
173 $("#gsdmDaily").val(temp[0]); 173 $("#gsdmDaily").val(temp[0]);
174 updateCompany(); 174 updateCompany();
175 $("#fgsdmDaily").val(temp[1]); 175 $("#fgsdmDaily").val(temp[1]);
@@ -255,23 +255,23 @@ @@ -255,23 +255,23 @@
255 layer.close(i); 255 layer.close(i);
256 }); 256 });
257 }); 257 });
258 -});  
259 -</script>  
260 -<script type="text/html" id="dailyInfo">  
261 - {{each list as obj i}}  
262 - <tr> 258 +});
  259 +</script>
  260 +<script type="text/html" id="dailyInfo">
  261 + {{each list as obj i}}
  262 + <tr>
263 <td>{{obj.zbh}}</td> 263 <td>{{obj.zbh}}</td>
264 <td>{{obj.jgh}}</td> 264 <td>{{obj.jgh}}</td>
265 <td>{{obj.jName}}</td> 265 <td>{{obj.jName}}</td>
266 <td>{{obj.zlc}}</td> 266 <td>{{obj.zlc}}</td>
267 <td>{{obj.jzl1}}</td> 267 <td>{{obj.jzl1}}</td>
268 <td>{{obj.yh}}</td> 268 <td>{{obj.yh}}</td>
269 - <td>{{obj.bc}}</td>  
270 - </tr> 269 + <td>{{obj.bc}}</td>
  270 + </tr>
271 {{/each}} 271 {{/each}}
272 {{if list.length == 0}} 272 {{if list.length == 0}}
273 <tr> 273 <tr>
274 <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> 274 <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td>
275 </tr> 275 </tr>
276 - {{/if}} 276 + {{/if}}
277 </script> 277 </script>
278 \ No newline at end of file 278 \ No newline at end of file
src/main/resources/static/pages/forms/statement/jobSummary.html
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 class="form-inline" action="">  
30 - <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_job">  
31 - <span class="item-label" style="width: 80px;">公司: </span>  
32 - <select class="form-control" name="company" id="gsdmJob" style="width: 180px;"></select>  
33 - </div>  
34 - <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_job">  
35 - <span class="item-label" style="width: 80px;">分公司: </span>  
36 - <select class="form-control" name="subCompany" id="fgsdmJob" style="width: 180px;"></select>  
37 - </div>  
38 - <div style="margin-top: 2px"></div>  
39 - <div style="display: inline-block;">  
40 - <span class="item-label" style="width: 80px; margin-left: 33px;">线路: </span>  
41 - <select class="form-control" name="line" id="line" style="width: 180px;"></select>  
42 - </div>  
43 - <div style="display: inline-block;margin-left: 24px;">  
44 - <span class="item-label" style="width: 80px;">&nbsp;时间: </span>  
45 - <input class="form-control" type="text" id="date" style="width: 180px;"/>  
46 - </div>  
47 - <div class="form-group">  
48 - <input class="btn btn-default" type="button" id="query" value="查询"/>  
49 - <input class="btn btn-default" type="button" id="export" value="导出"/>  
50 - </div>  
51 - </form>  
52 - </div>  
53 - <div class="portlet-body">  
54 - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">  
55 - <table class="table table-bordered table-hover table-checkable" id="forms">  
56 - <thead>  
57 - <tr>  
58 - <th colspan="10">调度员工作汇总日报</th>  
59 - </tr>  
60 - <tr>  
61 - <td colspan="10">线路:<label id="xlid"></label> &nbsp;&nbsp;&nbsp;&nbsp;日期:<label id="dateid"></label></td>  
62 - </tr>  
63 - <tr>  
64 - <td colspan="10">安全服务情况</td>  
65 - </tr>  
66 - <tr>  
67 - <td colspan="2">少驶班次数</td>  
68 - <td colspan="2"><label id="lbbcs"></label> </td>  
69 - <td colspan="2">少驶公里数</td>  
70 - <td colspan="4"><label id="lbgls"></label> </td>  
71 - </tr>  
72 - </thead>  
73 - <tbody>  
74 -  
75 - </tbody >  
76 - <tr>  
77 - <td>内容</td>  
78 - <td>路牌</td>  
79 - <td>车号</td>  
80 - <td>司售</td>  
81 - <td>地点</td>  
82 - <td>时间</td>  
83 - <td>故障分</td>  
84 - <td>烂班班次</td>  
85 - <td>烂班里程</td>  
86 - <td>简要情况</td>  
87 - </tr>  
88 - <tbody class="list_lbqk">  
89 -  
90 - </tbody>  
91 - <tr><td colspan="10">&nbsp;</td></tr>  
92 - <tr>  
93 - <td colspan="10">服务临加增加情况</td>  
94 - </tr>  
95 - <tr>  
96 - <td colspan="2">临加班次数</td>  
97 - <td colspan="2"><label id="ljbcs"></label> </td>  
98 - <td colspan="2">临加公里数</td>  
99 - <td colspan="4"><label id="ljgls"></label> </td>  
100 - </tr>  
101 - <tr>  
102 - <td>路牌</td>  
103 - <td>车号</td>  
104 - <td>司售</td>  
105 - <td>地点</td>  
106 - <td>时间</td>  
107 - <td>临加公里</td>  
108 - <td colspan="4">简要情况</td>  
109 - </tr>  
110 - <tbody class="list_ljqk">  
111 -  
112 - </tbody>  
113 - <tr><td colspan="10">&nbsp;</td></tr>  
114 - <tr>  
115 - <td colspan="10">当日汇总</td>  
116 - </tr>  
117 - <tr>  
118 - <td colspan="2">内容</td>  
119 - <td>计划</td>  
120 - <td>实际</td>  
121 - <td colspan="3">6:31~8:30</td>  
122 - <td colspan="3">16:01~18:00</td>  
123 - </tr>  
124 - <tbody class="list_xxsj">  
125 -  
126 - </tbody>  
127 - </table>  
128 - </div>  
129 - </div>  
130 - </div>  
131 - </div>  
132 -</div>  
133 -  
134 -<script>  
135 - $(function(){  
136 - var fage=false;  
137 - // 关闭左侧栏  
138 - if (!$('body').hasClass('page-sidebar-closed'))  
139 - $('.menu-toggler.sidebar-toggler').click();  
140 -  
141 - $("#date").datetimepicker({  
142 - format : 'YYYY-MM-DD',  
143 - locale : 'zh-cn'  
144 - });  
145 -  
146 - var xlList;  
147 - var obj = [];  
148 -  
149 -  
150 - $.get('/report/lineList',function(result){  
151 - xlList=result;  
152 - $.get('/user/companyData', function(result){  
153 - obj = result;  
154 - var options = '';  
155 - for(var i = 0; i < obj.length; i++){  
156 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
157 - }  
158 -  
159 - if(obj.length ==0){  
160 - $("#gsdmDiv_job").css('display','none');  
161 - }else if(obj.length ==1){  
162 - $("#gsdmDiv_job").css('display','none');  
163 - if(obj[0].children.length == 1 || obj[0].children.length ==0)  
164 - $('#fgsdmDiv_job').css('display','none');  
165 - }  
166 - $('#gsdmJob').html(options);  
167 - updateCompany();  
168 - });  
169 - })  
170 - $("#gsdmJob").on("change",updateCompany);  
171 - function updateCompany(){  
172 - var company = $('#gsdmJob').val();  
173 - var options = '';  
174 - for(var i = 0; i < obj.length; i++){  
175 - if(obj[i].companyCode == company){  
176 - var children = obj[i].children;  
177 - for(var j = 0; j < children.length; j++){  
178 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';  
179 - }  
180 - }  
181 - }  
182 - $('#fgsdmJob').html(options);  
183 -// initXl();  
184 - }  
185 -  
186 - var tempData = {};  
187 - $.get('/report/lineList',function(xlList){  
188 - var data = [];  
189 -// data.push({id: " ", text: "全部线路"});  
190 - $.get('/user/companyData', function(result){  
191 - for(var i = 0; i < result.length; i++){  
192 - var companyCode = result[i].companyCode;  
193 - var children = result[i].children;  
194 - for(var j = 0; j < children.length; j++){  
195 - var code = children[j].code;  
196 - for(var k=0;k < xlList.length;k++ ){  
197 - if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){  
198 - data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});  
199 - tempData[xlList[k]["xlbm"]] = companyCode+":"+code;  
200 - }  
201 - }  
202 - }  
203 - }  
204 - initPinYinSelect2('#line',data,'');  
205 -  
206 - });  
207 - });  
208 -  
209 - $("#line").on("change", function(){  
210 - if($("#line").val() == " "){  
211 - $("#gsdmJob").attr("disabled", false);  
212 - $("#fgsdmJob").attr("disabled", false);  
213 - } else {  
214 - var temp = tempData[$("#line").val()].split(":");  
215 - $("#gsdmJob").val(temp[0]);  
216 - updateCompany();  
217 - $("#fgsdmJob").val(temp[1]);  
218 - $("#gsdmJob").attr("disabled", true);  
219 - $("#fgsdmJob").attr("disabled", true);  
220 - }  
221 - });  
222 -  
223 -  
224 - jQuery.fn.rowspan = function(colIdx) { //封装的一个JQuery小插件  
225 - return this.each(function(){  
226 - var that;  
227 - $('tr', this).each(function(row) {  
228 - $('td:eq('+colIdx+')', this).filter(':visible').each(function(col) {  
229 - if (that!=null && $(this).html() == $(that).html()) {  
230 - rowspan = $(that).attr("rowSpan");  
231 - if (rowspan == undefined) {  
232 - $(that).attr("rowSpan",1);  
233 - rowspan = $(that).attr("rowSpan"); }  
234 - rowspan = Number(rowspan)+1;  
235 - $(that).attr("rowSpan",rowspan);  
236 - $(this).hide();  
237 - } else {  
238 - that = this;  
239 - }  
240 - });  
241 - });  
242 - });  
243 - }  
244 - $('#export').attr('disabled', "true");  
245 - $("#query").on("click",function(){  
246 - var line=$("#line").val();  
247 - var lineName=$(".select2-selection__rendered").html();  
248 - var date =$("#date").val();  
249 - $("#export").removeAttr("disabled");  
250 - if(line=="" || line==null){  
251 - layer.msg('请选择线路.');  
252 - }else if(date==""||date==null){  
253 - layer.msg('请选择日期.');  
254 - }else{  
255 - $("#xlid").html(lineName);  
256 - $("#dateid").html(date);  
257 - var i = layer.load(2);  
258 - $get('/report/jobFwqk',{line:line,date:date},function(result){  
259 - console.log(result);  
260 - var list_lbqk = template('list_lbqk',{list:result});  
261 - // 把渲染好的模版html文本追加到表格中  
262 - $('#forms .list_lbqk').html(list_lbqk);  
263 - $('#forms .list_lbqk').rowspan(0);  
264 - $('#forms .list_lbqk').rowspan(1);  
265 - $('#forms .list_lbqk').rowspan(2);  
266 - $('#forms .list_lbqk').rowspan(3);  
267 - layer.close(i);  
268 -  
269 - })  
270 -  
271 - $get('/report/jobLjqk',{line:line,date:date},function(result){  
272 - var list_ljqk = template('list_ljqk',{list:result});  
273 - // 把渲染好的模版html文本追加到表格中  
274 - $('#forms .list_ljqk').html(list_ljqk);  
275 - layer.close(i);  
276 - })  
277 -  
278 - $get('/report/jobHzxx',{line:line,date:date},function(result){  
279 - //临加  
280 - $("#ljbcs").html(result.ljbc);  
281 - $("#ljgls").html(result.ljgl)  
282 -  
283 - //烂班  
284 - $("#lbbcs").html(result.lbbc);  
285 - $("#lbgls").html(result.lbgl)  
286 - var list_xxsj=template('list_xxsj',result);  
287 - $('#forms .list_xxsj').html(list_xxsj);  
288 - layer.close(i);  
289 -  
290 - })  
291 -  
292 - }  
293 -  
294 - });  
295 -  
296 - $("#export").on("click",function(){  
297 - var line=$("#line").val();  
298 - var lineName=$(".select2-selection__rendered").html();  
299 - var date =$("#date").val();  
300 - if(line=="" || line==null){  
301 - layer.msg('请选择线路.');  
302 - }else if(date==""||date==null){  
303 - layer.msg('请选择日期.');  
304 - }else{  
305 - var i = layer.load(2);  
306 - $get('/report/jobSummaryExport',{line:line,date:date,lineName:lineName},function(result){  
307 - window.open("/downloadFile/download?fileName="  
308 - +moment(date).format("YYYYMMDD")  
309 - +"-"+lineName+"-调度员工作汇总日报");  
310 - layer.close(i);  
311 - });  
312 - }  
313 - });  
314 -  
315 - });  
316 -</script>  
317 -<script type="text/html" id="list_lbqk">  
318 - {{each list as obj i}}  
319 - <tr>  
320 - <td>{{obj.nr}}</td>  
321 - <td>{{obj.lp}}</td>  
322 - <td>{{obj.nbbm}}</td>  
323 - <td {{if obj.lx ==1}} colspan="4" {{/if}}>{{obj.jgh}}</td>  
324 - {{if obj.lx ==0}}  
325 - <td>{{obj.dz}}</td>  
326 - <td>{{obj.sj}}</td>  
327 - <td>&nbsp;</td>  
328 - {{/if}}  
329 - <td>{{obj.lbbc}}</td>  
330 - <td {{if obj.lx ==1}} colspan="2" {{/if}}>{{obj.lblc}}</td>  
331 - {{if obj.lx ==0}}  
332 - <td>{{obj.jyqp}}</td>  
333 - {{/if}}  
334 - </tr>  
335 - {{/each}}  
336 - {{if list.length == 0}}  
337 - <tr>  
338 - <td colspan="10"><h6 class="muted">没有找到相关数据</h6></td>  
339 - </tr>  
340 - {{/if}}  
341 -</script>  
342 -  
343 -<script type="text/html" id="list_ljqk">  
344 - {{each list as obj i}}  
345 - <tr>  
346 - <td>{{obj.lp}}</td>  
347 - <td>{{obj.nbbm}}</td>  
348 - <td>{{obj.jgh}}</td>  
349 - <td>{{obj.dz}}</td>  
350 - <td>{{obj.sj}}</td>  
351 - <td>{{obj.ljlc}}</td>  
352 - <td colspan="4">{{obj.jyqp}}</td>  
353 - </tr>  
354 - {{/each}}  
355 - {{if list.length == 0}}  
356 - <tr>  
357 - <td colspan="10"><h6 class="muted">没有找到相关数据</h6></td>  
358 - </tr>  
359 - {{/if}}  
360 -</script>  
361 -  
362 -<script type="text/html" id="list_xxsj">  
363 - <tr>  
364 - <td colspan="2">班次</td>  
365 - <td>{{jhbc}}</td>  
366 - <td>{{sjbc}}</td>  
367 - <td colspan="3">{{sjbczgf}}</td>  
368 - <td colspan="3">{{sjbcwgf}}</td>  
369 - </tr>  
370 - <tr>  
371 - <td colspan="2">公里</td>  
372 - <td>{{jhgl}}</td>  
373 - <td>{{sjgl}}</td>  
374 - <td colspan="3">{{sjglzgf}}</td>  
375 - <td colspan="3">{{sjglwgf}}</td>  
376 - </tr>  
377 - <tr>  
378 - <td colspan="2">临加</td>  
379 - <td>&nbsp;</td>  
380 - <td>{{ljgl}}</td>  
381 - <td colspan="3">{{ljglzgf}}</td>  
382 - <td colspan="3">{{ljglwgf}}</td>  
383 - </tr>  
384 - <tr>  
385 - <td colspan="2">上行快误点</td>  
386 - <td>&nbsp;</td>  
387 - <td>{{sxk}}</td>  
388 - <td colspan="3">{{sxkzgf}}</td>  
389 - <td colspan="3">{{sxkwgf}}</td>  
390 - </tr>  
391 - <tr>  
392 - <td colspan="2">上行慢误点</td>  
393 - <td></td>  
394 - <td>{{sxm}}</td>  
395 - <td colspan="3">{{sxmzgf}}</td>  
396 - <td colspan="3">{{sxmwgf}}</td>  
397 - </tr>  
398 - <tr>  
399 - <td colspan="2">下行快误点</td>  
400 - <td>&nbsp;</td>  
401 - <td>{{xxk}}</td>  
402 - <td colspan="3">{{xxkzgf}}</td>  
403 - <td colspan="3">{{xxkwgf}}</td>  
404 - </tr>  
405 - <tr>  
406 - <td colspan="2">下行慢误点</td>  
407 - <td>&nbsp;</td>  
408 - <td>{{xxm}}</td>  
409 - <td colspan="3">{{xxmzgf}}</td>  
410 - <td colspan="3">{{xxmwgf}}</td>  
411 - </tr>  
412 - <tr>  
413 - <td colspan="2">放班班次</td>  
414 - <td>{{jhfbbc}}</td>  
415 - <td>{{sjfbbc}}</td>  
416 - <td colspan="3">{{sjfbbczgf}}</td>  
417 - <td colspan="3">{{sjfbbcwgf}}</td>  
418 - </tr>  
419 - <tr>  
420 - <td colspan="2">调头班次</td>  
421 - <td>{{jhdtbc}}</td>  
422 - <td>{{sjdtbc}}</td>  
423 - <td colspan="3">{{sjdtbczgf}}</td>  
424 - <td colspan="3">{{sjdtbcwgf}}</td> 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 class="form-inline" action="">
  30 + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_job">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="gsdmJob" style="width: 180px;"></select>
  33 + </div>
  34 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_job">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="fgsdmJob" style="width: 180px;"></select>
  37 + </div>
  38 + <div style="margin-top: 2px"></div>
  39 + <div style="display: inline-block;">
  40 + <span class="item-label" style="width: 80px; margin-left: 33px;">线路: </span>
  41 + <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  42 + </div>
  43 + <div style="display: inline-block;margin-left: 24px;">
  44 + <span class="item-label" style="width: 80px;">&nbsp;时间: </span>
  45 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
  46 + </div>
  47 + <div class="form-group">
  48 + <input class="btn btn-default" type="button" id="query" value="查询"/>
  49 + <input class="btn btn-default" type="button" id="export" value="导出"/>
  50 + </div>
  51 + </form>
  52 + </div>
  53 + <div class="portlet-body">
  54 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  55 + <table class="table table-bordered table-hover table-checkable" id="forms">
  56 + <thead>
  57 + <tr>
  58 + <th colspan="10">调度员工作汇总日报</th>
  59 + </tr>
  60 + <tr>
  61 + <td colspan="10">线路:<label id="xlid"></label> &nbsp;&nbsp;&nbsp;&nbsp;日期:<label id="dateid"></label></td>
  62 + </tr>
  63 + <tr>
  64 + <td colspan="10">安全服务情况</td>
  65 + </tr>
  66 + <tr>
  67 + <td colspan="2">少驶班次数</td>
  68 + <td colspan="2"><label id="lbbcs"></label> </td>
  69 + <td colspan="2">少驶公里数</td>
  70 + <td colspan="4"><label id="lbgls"></label> </td>
  71 + </tr>
  72 + </thead>
  73 + <tbody>
  74 +
  75 + </tbody >
  76 + <tr>
  77 + <td>内容</td>
  78 + <td>路牌</td>
  79 + <td>车号</td>
  80 + <td>司售</td>
  81 + <td>地点</td>
  82 + <td>时间</td>
  83 + <td>故障分</td>
  84 + <td>烂班班次</td>
  85 + <td>烂班里程</td>
  86 + <td>简要情况</td>
  87 + </tr>
  88 + <tbody class="list_lbqk">
  89 +
  90 + </tbody>
  91 + <tr><td colspan="10">&nbsp;</td></tr>
  92 + <tr>
  93 + <td colspan="10">服务临加增加情况</td>
  94 + </tr>
  95 + <tr>
  96 + <td colspan="2">临加班次数</td>
  97 + <td colspan="2"><label id="ljbcs"></label> </td>
  98 + <td colspan="2">临加公里数</td>
  99 + <td colspan="4"><label id="ljgls"></label> </td>
  100 + </tr>
  101 + <tr>
  102 + <td>路牌</td>
  103 + <td>车号</td>
  104 + <td>司售</td>
  105 + <td>地点</td>
  106 + <td>时间</td>
  107 + <td>临加公里</td>
  108 + <td colspan="4">简要情况</td>
  109 + </tr>
  110 + <tbody class="list_ljqk">
  111 +
  112 + </tbody>
  113 + <tr><td colspan="10">&nbsp;</td></tr>
  114 + <tr>
  115 + <td colspan="10">当日汇总</td>
  116 + </tr>
  117 + <tr>
  118 + <td colspan="2">内容</td>
  119 + <td>计划</td>
  120 + <td>实际</td>
  121 + <td colspan="3">6:31~8:30</td>
  122 + <td colspan="3">16:01~18:00</td>
  123 + </tr>
  124 + <tbody class="list_xxsj">
  125 +
  126 + </tbody>
  127 + </table>
  128 + </div>
  129 + </div>
  130 + </div>
  131 + </div>
  132 +</div>
  133 +
  134 +<script>
  135 + $(function(){
  136 + var fage=false;
  137 + // 关闭左侧栏
  138 + if (!$('body').hasClass('page-sidebar-closed'))
  139 + $('.menu-toggler.sidebar-toggler').click();
  140 +
  141 + $("#date").datetimepicker({
  142 + format : 'YYYY-MM-DD',
  143 + locale : 'zh-cn'
  144 + });
  145 +
  146 + var xlList;
  147 + var obj = [];
  148 +
  149 +
  150 + $.get('/report/lineList',function(result){
  151 + xlList=result;
  152 + $.get('/user/companyData', function(result){
  153 + obj = result;
  154 + var options = '';
  155 + for(var i = 0; i < obj.length; i++){
  156 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  157 + }
  158 +
  159 + if(obj.length ==0){
  160 + $("#gsdmDiv_job").css('display','none');
  161 + }else if(obj.length ==1){
  162 + $("#gsdmDiv_job").css('display','none');
  163 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  164 + $('#fgsdmDiv_job').css('display','none');
  165 + }
  166 + $('#gsdmJob').html(options);
  167 + updateCompany();
  168 + });
  169 + })
  170 + $("#gsdmJob").on("change",updateCompany);
  171 + function updateCompany(){
  172 + var company = $('#gsdmJob').val();
  173 + var options = '';
  174 + for(var i = 0; i < obj.length; i++){
  175 + if(obj[i].companyCode == company){
  176 + var children = obj[i].children;
  177 + for(var j = 0; j < children.length; j++){
  178 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  179 + }
  180 + }
  181 + }
  182 + $('#fgsdmJob').html(options);
  183 +// initXl();
  184 + }
  185 +
  186 + var tempData = {};
  187 + $.get('/report/lineList',function(xlList){
  188 + var data = [];
  189 +// data.push({id: " ", text: "全部线路"});
  190 + $.get('/user/companyData', function(result){
  191 + for(var i = 0; i < result.length; i++){
  192 + var companyCode = result[i].companyCode;
  193 + var children = result[i].children;
  194 + for(var j = 0; j < children.length; j++){
  195 + var code = children[j].code;
  196 + for(var k=0;k < xlList.length;k++ ){
  197 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  198 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  199 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  200 + }
  201 + }
  202 + }
  203 + }
  204 + initPinYinSelect2('#line',data,'');
  205 +
  206 + });
  207 + });
  208 +
  209 + $("#line").on("change", function(){
  210 + if($("#line").val() == " "){
  211 + $("#gsdmJob").attr("disabled", false);
  212 + $("#fgsdmJob").attr("disabled", false);
  213 + } else {
  214 + var temp = (tempData[$("#line").val()] ? tempData[$("#line").val()] : " : ").split(":");
  215 + $("#gsdmJob").val(temp[0]);
  216 + updateCompany();
  217 + $("#fgsdmJob").val(temp[1]);
  218 + $("#gsdmJob").attr("disabled", true);
  219 + $("#fgsdmJob").attr("disabled", true);
  220 + }
  221 + });
  222 +
  223 +
  224 + jQuery.fn.rowspan = function(colIdx) { //封装的一个JQuery小插件
  225 + return this.each(function(){
  226 + var that;
  227 + $('tr', this).each(function(row) {
  228 + $('td:eq('+colIdx+')', this).filter(':visible').each(function(col) {
  229 + if (that!=null && $(this).html() == $(that).html()) {
  230 + rowspan = $(that).attr("rowSpan");
  231 + if (rowspan == undefined) {
  232 + $(that).attr("rowSpan",1);
  233 + rowspan = $(that).attr("rowSpan"); }
  234 + rowspan = Number(rowspan)+1;
  235 + $(that).attr("rowSpan",rowspan);
  236 + $(this).hide();
  237 + } else {
  238 + that = this;
  239 + }
  240 + });
  241 + });
  242 + });
  243 + }
  244 + $('#export').attr('disabled', "true");
  245 + $("#query").on("click",function(){
  246 + var line=$("#line").val();
  247 + var lineName=$(".select2-selection__rendered").html();
  248 + var date =$("#date").val();
  249 + $("#export").removeAttr("disabled");
  250 + if(line=="" || line==null){
  251 + layer.msg('请选择线路.');
  252 + }else if(date==""||date==null){
  253 + layer.msg('请选择日期.');
  254 + }else{
  255 + $("#xlid").html(lineName);
  256 + $("#dateid").html(date);
  257 + var i = layer.load(2);
  258 + $get('/report/jobFwqk',{line:line,date:date},function(result){
  259 + console.log(result);
  260 + var list_lbqk = template('list_lbqk',{list:result});
  261 + // 把渲染好的模版html文本追加到表格中
  262 + $('#forms .list_lbqk').html(list_lbqk);
  263 + $('#forms .list_lbqk').rowspan(0);
  264 + $('#forms .list_lbqk').rowspan(1);
  265 + $('#forms .list_lbqk').rowspan(2);
  266 + $('#forms .list_lbqk').rowspan(3);
  267 + layer.close(i);
  268 +
  269 + })
  270 +
  271 + $get('/report/jobLjqk',{line:line,date:date},function(result){
  272 + var list_ljqk = template('list_ljqk',{list:result});
  273 + // 把渲染好的模版html文本追加到表格中
  274 + $('#forms .list_ljqk').html(list_ljqk);
  275 + layer.close(i);
  276 + })
  277 +
  278 + $get('/report/jobHzxx',{line:line,date:date},function(result){
  279 + //临加
  280 + $("#ljbcs").html(result.ljbc);
  281 + $("#ljgls").html(result.ljgl)
  282 +
  283 + //烂班
  284 + $("#lbbcs").html(result.lbbc);
  285 + $("#lbgls").html(result.lbgl)
  286 + var list_xxsj=template('list_xxsj',result);
  287 + $('#forms .list_xxsj').html(list_xxsj);
  288 + layer.close(i);
  289 +
  290 + })
  291 +
  292 + }
  293 +
  294 + });
  295 +
  296 + $("#export").on("click",function(){
  297 + var line=$("#line").val();
  298 + var lineName=$(".select2-selection__rendered").html();
  299 + var date =$("#date").val();
  300 + if(line=="" || line==null){
  301 + layer.msg('请选择线路.');
  302 + }else if(date==""||date==null){
  303 + layer.msg('请选择日期.');
  304 + }else{
  305 + var i = layer.load(2);
  306 + $get('/report/jobSummaryExport',{line:line,date:date,lineName:lineName},function(result){
  307 + window.open("/downloadFile/download?fileName="
  308 + +moment(date).format("YYYYMMDD")
  309 + +"-"+lineName+"-调度员工作汇总日报");
  310 + layer.close(i);
  311 + });
  312 + }
  313 + });
  314 +
  315 + });
  316 +</script>
  317 +<script type="text/html" id="list_lbqk">
  318 + {{each list as obj i}}
  319 + <tr>
  320 + <td>{{obj.nr}}</td>
  321 + <td>{{obj.lp}}</td>
  322 + <td>{{obj.nbbm}}</td>
  323 + <td {{if obj.lx ==1}} colspan="4" {{/if}}>{{obj.jgh}}</td>
  324 + {{if obj.lx ==0}}
  325 + <td>{{obj.dz}}</td>
  326 + <td>{{obj.sj}}</td>
  327 + <td>&nbsp;</td>
  328 + {{/if}}
  329 + <td>{{obj.lbbc}}</td>
  330 + <td {{if obj.lx ==1}} colspan="2" {{/if}}>{{obj.lblc}}</td>
  331 + {{if obj.lx ==0}}
  332 + <td>{{obj.jyqp}}</td>
  333 + {{/if}}
  334 + </tr>
  335 + {{/each}}
  336 + {{if list.length == 0}}
  337 + <tr>
  338 + <td colspan="10"><h6 class="muted">没有找到相关数据</h6></td>
  339 + </tr>
  340 + {{/if}}
  341 +</script>
  342 +
  343 +<script type="text/html" id="list_ljqk">
  344 + {{each list as obj i}}
  345 + <tr>
  346 + <td>{{obj.lp}}</td>
  347 + <td>{{obj.nbbm}}</td>
  348 + <td>{{obj.jgh}}</td>
  349 + <td>{{obj.dz}}</td>
  350 + <td>{{obj.sj}}</td>
  351 + <td>{{obj.ljlc}}</td>
  352 + <td colspan="4">{{obj.jyqp}}</td>
  353 + </tr>
  354 + {{/each}}
  355 + {{if list.length == 0}}
  356 + <tr>
  357 + <td colspan="10"><h6 class="muted">没有找到相关数据</h6></td>
  358 + </tr>
  359 + {{/if}}
  360 +</script>
  361 +
  362 +<script type="text/html" id="list_xxsj">
  363 + <tr>
  364 + <td colspan="2">班次</td>
  365 + <td>{{jhbc}}</td>
  366 + <td>{{sjbc}}</td>
  367 + <td colspan="3">{{sjbczgf}}</td>
  368 + <td colspan="3">{{sjbcwgf}}</td>
425 </tr> 369 </tr>
426 -</script> 370 + <tr>
  371 + <td colspan="2">公里</td>
  372 + <td>{{jhgl}}</td>
  373 + <td>{{sjgl}}</td>
  374 + <td colspan="3">{{sjglzgf}}</td>
  375 + <td colspan="3">{{sjglwgf}}</td>
  376 + </tr>
  377 + <tr>
  378 + <td colspan="2">临加</td>
  379 + <td>&nbsp;</td>
  380 + <td>{{ljgl}}</td>
  381 + <td colspan="3">{{ljglzgf}}</td>
  382 + <td colspan="3">{{ljglwgf}}</td>
  383 + </tr>
  384 + <tr>
  385 + <td colspan="2">上行快误点</td>
  386 + <td>&nbsp;</td>
  387 + <td>{{sxk}}</td>
  388 + <td colspan="3">{{sxkzgf}}</td>
  389 + <td colspan="3">{{sxkwgf}}</td>
  390 + </tr>
  391 + <tr>
  392 + <td colspan="2">上行慢误点</td>
  393 + <td></td>
  394 + <td>{{sxm}}</td>
  395 + <td colspan="3">{{sxmzgf}}</td>
  396 + <td colspan="3">{{sxmwgf}}</td>
  397 + </tr>
  398 + <tr>
  399 + <td colspan="2">下行快误点</td>
  400 + <td>&nbsp;</td>
  401 + <td>{{xxk}}</td>
  402 + <td colspan="3">{{xxkzgf}}</td>
  403 + <td colspan="3">{{xxkwgf}}</td>
  404 + </tr>
  405 + <tr>
  406 + <td colspan="2">下行慢误点</td>
  407 + <td>&nbsp;</td>
  408 + <td>{{xxm}}</td>
  409 + <td colspan="3">{{xxmzgf}}</td>
  410 + <td colspan="3">{{xxmwgf}}</td>
  411 + </tr>
  412 + <tr>
  413 + <td colspan="2">放班班次</td>
  414 + <td>{{jhfbbc}}</td>
  415 + <td>{{sjfbbc}}</td>
  416 + <td colspan="3">{{sjfbbczgf}}</td>
  417 + <td colspan="3">{{sjfbbcwgf}}</td>
  418 + </tr>
  419 + <tr>
  420 + <td colspan="2">调头班次</td>
  421 + <td>{{jhdtbc}}</td>
  422 + <td>{{sjdtbc}}</td>
  423 + <td colspan="3">{{sjdtbczgf}}</td>
  424 + <td colspan="3">{{sjdtbcwgf}}</td>
  425 + </tr>
  426 +</script>
src/main/resources/static/pages/forms/statement/scheduleDaily.html
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 - text-align: center; }  
12 - .table-bordered > thead > tr > th,  
13 - .table-bordered > thead > tr > td {  
14 - border-bottom-width: 2px; }  
15 -  
16 - .table > tbody + tbody {  
17 - border-top: 1px solid; }  
18 -  
19 -  
20 -  
21 - #ddrbBody tr> td >span{  
22 - word-break: keep-all;white-space:nowrap;  
23 - }  
24 -</style>  
25 -  
26 -<div class="page-head" >  
27 - <div class="page-title">  
28 - <h1>调度日报</h1>  
29 - </div>  
30 -</div>  
31 -  
32 -<!-- <div class="row" > -->  
33 - <div class=" row col-md-12 portlet light porttlet-fit bordered" style="height:calc(100% - 56px)">  
34 -<!-- <div class="" > -->  
35 - <div class="portlet-title">  
36 - <form class="form-inline" action="">  
37 - <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_ddrb">  
38 - <span class="item-label" style="width: 80px;">公司: </span>  
39 - <select class="form-control" name="company" id="gsdmDdrb" style="width: 180px;"></select>  
40 - </div>  
41 - <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_ddrb">  
42 - <span class="item-label" style="width: 80px;">分公司: </span>  
43 - <select class="form-control" name="subCompany" id="fgsdmDdrb" style="width: 180px;"></select>  
44 - </div>  
45 - <div style="margin-top: 2px"></div>  
46 - <div style="display: inline-block;">  
47 - <span class="item-label" style="width: 80px;margin-left: 33px;">线路: </span>  
48 - <select class="form-control" name="line" id="line" style="width: 180px;"></select>  
49 - </div>  
50 - <div style="display: inline-block;margin-left: 38px;">  
51 - <span class="item-label" style="width: 80px;">时间: </span>  
52 - <input class="form-control" type="text" id="date" style="width: 180px;"/>  
53 - </div>  
54 - <div class="form-group">  
55 - <input class="btn btn-default" type="button" id="query" value="查询"/>  
56 -<!-- <input class="btn btn-default" type="button" id="month" value="按月查询"/> -->  
57 - <input class="btn btn-default" type="button" id="export" value="导出"/>  
58 - </div>  
59 - </form>  
60 - </div>  
61 - <div class="portlet-body" id="ddrbBody" style="overflow:auto;height: calc(100% - 80px)">  
62 - <div class="table-container" style="margin-top: 10px;min-width: 906px">  
63 - <label>日期:<span id="rqxs"></span>&nbsp;&nbsp;&nbsp;&nbsp;早高峰:6:31~8:30&nbsp;&nbsp;&nbsp;&nbsp;晚高峰:16:01~18:00</label>  
64 - <br/><label>计划+临加-少驶=<span id="jls"></span>&nbsp;&nbsp;计算机实驶:<span id="jsjss"></span></label>  
65 - &nbsp;&nbsp;当班调派:<span id="dbdp"></span></label>  
66 - <table class="table table-bordered table-hover table-checkable" id="forms">  
67 - <thead>  
68 - <tr>  
69 - <th colspan="40"><label id="xlmc"></label>线路调度日报</th>  
70 - </tr>  
71 - <tr>  
72 - <td rowspan="3"><span>路线</span></td>  
73 - <td colspan="16">全日营运里程(公里)</td>  
74 - <td colspan="15">全日营运班次</td>  
75 - <td colspan="9">大间隔情况</td>  
76 - </tr>  
77 - <tr>  
78 - <td rowspan="2"><span >计划</span></td>  
79 - <td rowspan="2"><span >实驶</span></td>  
80 - <td rowspan="2"><span>少驶公里</span></td>  
81 - <td rowspan="2"><span>少驶班次</span></td>  
82 - <td colspan="11">少驶原因(公里)</td>  
83 - <td rowspan="2"><span >临加公里</span></td>  
84 - <td colspan="3">计划班次</td>  
85 - <td colspan="3">实际班次</td>  
86 - <td colspan="3">临加班次</td>  
87 - <td colspan="3">放站班次</td>  
88 - <td colspan="3">调头班次</td>  
89 - <td colspan="3">发生次数</td>  
90 - <td rowspan="2">最大间隔时间(分)</td>  
91 - <td colspan="5" rowspan="2">原因</td>  
92 - </tr>  
93 - <tr>  
94 - <td><span>路阻</span></td>  
95 - <td><span>吊慢</span></td>  
96 - <td><span>故障</span></td>  
97 - <td><span>纠纷</span></td>  
98 - <td><span>肇事</span></td>  
99 - <td><span>缺人</span></td>  
100 - <td><span>缺车</span></td>  
101 - <td><span>客稀</span></td>  
102 - <td><span>气候</span></td>  
103 - <td><span>援外</span></td>  
104 - <td><span>其他</span></td>  
105 - <td><span>全日</span></td>  
106 - <td><span>早高峰</span></td>  
107 - <td><span>晚高峰</span></td>  
108 - <td><span>全日</span></td>  
109 - <td><span>早高峰</span></td>  
110 - <td><span>晚高峰</span></td>  
111 - <td><span>全日</span></td>  
112 - <td><span>早高峰</span></td>  
113 - <td><span>晚高峰</span></td>  
114 - <td><span>全日</span></td>  
115 - <td><span>早高峰</span></td>  
116 - <td><span>晚高峰</span></td>  
117 - <td><span>全日</span></td>  
118 - <td><span>早高峰</span></td>  
119 - <td><span>晚高峰</span></td>  
120 - <td><span>全日</span></td>  
121 - <td><span>早高峰</span></td>  
122 - <td><span>晚高峰</span></td>  
123 - </tr>  
124 - </thead>  
125 -  
126 - <tbody class="scheduleDaily_1">  
127 -  
128 - </tbody>  
129 - <tr>  
130 - <td colspan="40">&nbsp;</td>  
131 - </tr>  
132 - </table>  
133 - <!-- <tr>  
134 - <td colspan="40">合计</td>  
135 - </tr>  
136 - <tr>  
137 - <td>售票</td>  
138 - <td colspan="2">1元</td>  
139 - <td colspan="2">2元</td>  
140 - <td colspan="2">3元</td>  
141 - <td colspan="2">4元</td>  
142 - <td colspan="2">5元</td>  
143 - <td colspan="2">6元</td>  
144 - <td colspan="2">7元</td>  
145 - <td colspan="2">8元</td>  
146 - <td colspan="2">9元</td>  
147 - <td colspan="2">10元</td>  
148 - <td colspan="2">&nbsp;</td>  
149 - <td colspan="2">合计张数</td>  
150 - <td colspan="2">&nbsp;</td>  
151 - <td colspan="2">预售票</td>  
152 - <td colspan="2">1元</td>  
153 - <td colspan="2">1.5元</td>  
154 - <td colspan="2">合计张数</td>  
155 - <td colspan="5">&nbsp;</td>  
156 - </tr>  
157 - <tr>  
158 - <td>张数</td>  
159 - <td colspan="2">&nbsp;</td>  
160 - <td colspan="2">&nbsp;</td>  
161 - <td colspan="2">&nbsp;</td>  
162 - <td colspan="2">&nbsp;</td>  
163 - <td colspan="2">&nbsp;</td>  
164 - <td colspan="2">&nbsp;</td>  
165 - <td colspan="2">&nbsp;</td>  
166 - <td colspan="2">&nbsp;</td>  
167 - <td colspan="2">&nbsp;</td>  
168 - <td colspan="2">&nbsp;</td>  
169 - <td colspan="2">&nbsp;</td>  
170 - <td colspan="2">合计金额</td>  
171 - <td colspan="2">&nbsp;</td>  
172 - <td colspan="2">张数</td>  
173 - <td colspan="2">&nbsp;</td>  
174 - <td colspan="2">&nbsp;</td>  
175 - <td colspan="2">合计金额</td>  
176 - <td colspan="5">&nbsp;</td>  
177 - </tr>  
178 - <tr>  
179 - <td colspan="40">&nbsp;</td>  
180 - </tr> -->  
181 - <table class="table table-bordered table-hover table-checkable" id="forms_1">  
182 - <tr>  
183 - <td colspan="2"><label>路牌</label></td>  
184 - <td colspan="2"><label>车号</label></td>  
185 - <td> <label>司早</label></td>  
186 - <td><label>售早</label></td>  
187 - <td><label>司晚</label></td>  
188 - <td><label>售晚</label></td>  
189 - <td colspan="2"><label>路牌</label></td>  
190 - <td colspan="2"><label>车号</label></td>  
191 - <td><label>司早</label></td>  
192 - <td><label>售早</label></td>  
193 - <td><label>司晚</label></td>  
194 - <td><label>售晚</label></td>  
195 - <td colspan="2"><label>路牌</label></td>  
196 - <td colspan="2"><label>车号</label></td>  
197 - <td><label>司早</label></td>  
198 - <td><label>售早</label></td>  
199 - <td><label>司晚</label></td>  
200 - <td><label>售晚</label></td>  
201 - <td colspan="2"><label>路牌</label></td>  
202 - <td colspan="2"><label>车号</label></td>  
203 - <td><label>司早</label></td>  
204 - <td><label>售早</label></td>  
205 - <td><label>司晚</label></td>  
206 - <td><label>售晚</label></td>  
207 - <td colspan="2"><label>路牌</label></td>  
208 - <td colspan="2"><label>车号</label></td>  
209 - <td><label>司早</label></td>  
210 - <td><label>售早</label></td>  
211 - <td><label>司晚</label></td>  
212 - <td><label>售晚</label></td>  
213 - </tr>  
214 - <tbody class="scheduleDaily_2">  
215 -  
216 - </tbody>  
217 - <tr>  
218 - <td colspan="40">&nbsp;</td>  
219 - </tr>  
220 - </table>  
221 - <table class="table table-bordered table-hover table-checkable" id="forms_2">  
222 - <tr>  
223 - <td rowspan="2">路牌</td>  
224 - <td colspan="2" rowspan="2" style="word-break: keep-all;white-space:nowrap;">起点站</td>  
225 - <td colspan="4">到达时间</td>  
226 - <td colspan="4">发车时间</td>  
227 - <td colspan="2" rowspan="2">备注</td>  
228 - <td rowspan="2">路牌</td>  
229 - <td colspan="2" rowspan="2" style="word-break: keep-all;white-space:nowrap;">起点站</td>  
230 - <td colspan="4">到达时间</td>  
231 - <td colspan="4">发车时间</td>  
232 - <td colspan="2" rowspan="2">备注</td>  
233 - <td rowspan="2">路牌</td>  
234 - <td colspan="2" rowspan="2" style="word-break: keep-all;white-space:nowrap;">起点站</td>  
235 - <td colspan="4">到达时间</td>  
236 - <td colspan="4">发车时间</td>  
237 - <td colspan="2" rowspan="2">备注</td>  
238 - <td>&nbsp;</td>  
239 - </tr>  
240 - <tr>  
241 - <td>应到</td>  
242 - <td>实到</td>  
243 - <td>快</td>  
244 - <td>慢</td>  
245 - <td>应发</td>  
246 - <td>实发</td>  
247 - <td>快</td>  
248 - <td>慢</td>  
249 - <td>应到</td>  
250 - <td>实到</td>  
251 - <td>快</td>  
252 - <td>慢</td>  
253 - <td>应发</td>  
254 - <td>实发</td>  
255 - <td>快</td>  
256 - <td>慢</td>  
257 - <td>应到</td>  
258 - <td>实到</td>  
259 - <td>快</td>  
260 - <td>慢</td>  
261 - <td>应发</td>  
262 - <td>实发</td>  
263 - <td>快</td>  
264 - <td>慢</td>  
265 - <td>&nbsp;</td>  
266 - </tr>  
267 - <tbody class="scheduleDaily_3">  
268 -  
269 - </tbody>  
270 - </table>  
271 - </div>  
272 - </div>  
273 -<!-- </div> -->  
274 -<!-- </div> -->  
275 -</div>  
276 -  
277 -<script>  
278 - $(function(){  
279 - // 关闭左侧栏  
280 - if (!$('body').hasClass('page-sidebar-closed'))  
281 - $('.menu-toggler.sidebar-toggler').click();  
282 -  
283 - $("#date").datetimepicker({  
284 - format : 'YYYY-MM-DD',  
285 - locale : 'zh-cn'  
286 - });  
287 - var d = new Date();  
288 - var year = d.getFullYear();  
289 - var month = d.getMonth() + 1;  
290 - var day = d.getDate();  
291 - if(month < 10)  
292 - month = "0" + month;  
293 - if(day < 10)  
294 - day = "0" + day;  
295 - $("#date").val(year + "-" + month + "-" + day);  
296 -  
297 -// $("#ddrbBody").height($(window).height()-200);  
298 -  
299 - var divFrom1 = window.document.getElementById('forms');  
300 - var divFrom2 = window.document.getElementById('forms_1');  
301 - var divFrom3 = window.document.getElementById('forms_2');  
302 - divFrom2.style.width=divFrom1.offsetWidth+"px";  
303 - divFrom3.style.width=divFrom1.offsetWidth+"px";  
304 - /* $.get('/basic/lineCode2Name',function(result){  
305 - var data=[];  
306 -  
307 - for(var code in result){  
308 - data.push({id: code, text: result[code]});  
309 - }  
310 - initPinYinSelect2('#line',data,'');  
311 -  
312 - }) */  
313 - var fage=false;  
314 - var obj = [];  
315 - var xlList;  
316 - $.get('/report/lineList',function(result){  
317 - xlList=result;  
318 - $.get('/user/companyData', function(result){  
319 - obj = result;  
320 - var options = '';  
321 - for(var i = 0; i < obj.length; i++){  
322 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
323 - }  
324 -  
325 - if(obj.length ==0){  
326 - $("#gsdmDiv_ddrb").css('display','none');  
327 - }else if(obj.length ==1){  
328 - $("#gsdmDiv_ddrb").css('display','none');  
329 - if(obj[0].children.length == 1 || obj[0].children.length ==0)  
330 - $('#fgsdmDiv_ddrb').css('display','none');  
331 - }  
332 - $('#gsdmDdrb').html(options);  
333 - updateCompany();  
334 - });  
335 - })  
336 - $("#gsdmDdrb").on("change",updateCompany);  
337 - function updateCompany(){  
338 - var company = $('#gsdmDdrb').val();  
339 - var options = '';  
340 - for(var i = 0; i < obj.length; i++){  
341 - if(obj[i].companyCode == company){  
342 - var children = obj[i].children;  
343 - for(var j = 0; j < children.length; j++){  
344 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';  
345 - }  
346 - }  
347 - }  
348 - $('#fgsdmDdrb').html(options);  
349 - }  
350 -  
351 -  
352 - var tempData = {};  
353 - $.get('/report/lineList',function(xlList){  
354 - var data = [];  
355 - $.get('/user/companyData', function(result){  
356 - for(var i = 0; i < result.length; i++){  
357 - var companyCode = result[i].companyCode;  
358 - var children = result[i].children;  
359 - for(var j = 0; j < children.length; j++){  
360 - var code = children[j].code;  
361 - for(var k=0;k < xlList.length;k++ ){  
362 - if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){  
363 - data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});  
364 - tempData[xlList[k]["xlbm"]] = companyCode+":"+code;  
365 - }  
366 - }  
367 - }  
368 - }  
369 - initPinYinSelect2('#line',data,'');  
370 -  
371 - });  
372 - });  
373 -  
374 - $("#line").on("change", function(){  
375 - if($("#line").val() == " "){  
376 - $("#gsdmDdrb").attr("disabled", false);  
377 - $("#fgsdmDdrb").attr("disabled", false);  
378 - } else {  
379 - var temp = tempData[$("#line").val()].split(":");  
380 - $("#gsdmDdrb").val(temp[0]);  
381 - updateCompany();  
382 - $("#fgsdmDdrb").val(temp[1]);  
383 - $("#gsdmDdrb").attr("disabled", true);  
384 - $("#fgsdmDdrb").attr("disabled", true);  
385 - }  
386 - });  
387 -  
388 -  
389 - $('#export').attr('disabled', "true");  
390 -  
391 - var line = $("#line").val();  
392 - var xlName = $("#select2-line-container").html();  
393 - var date = $("#date").val();  
394 -  
395 - function getTime(list){  
396 - $.each(list, function(i, obj) {  
397 - if(obj.zdsj != null && obj.zdsjActual != null ){  
398 - var zdsjActual = (obj.zdsjActual).split(":");  
399 - var zdsj = (obj.zdsj).split(":");  
400 - if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){  
401 - if((zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1]))>1200){  
402 - obj["fast"] = 1440-((zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1])));  
403 -  
404 - }else{  
405 - obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1]));  
406 -  
407 - }  
408 - }  
409 - else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){  
410 - if((zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1]))>1200){  
411 - obj["slow"] =1440-((zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1])));  
412 - }else{  
413 - obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1]));  
414 -  
415 - }  
416 - }  
417 - }  
418 -  
419 - if(obj.fcsj != null && obj.fcsjActual != null ){  
420 - var fcsjActual = (obj.fcsjActual).split(":");  
421 - var fcsj = (obj.fcsj).split(":");  
422 -  
423 - if(fcsjActual[0]*60+Number(fcsjActual[1]) > fcsj[0]*60+Number(fcsj[1])){  
424 - if((fcsjActual[0]*60+Number(fcsjActual[1])) - (fcsj[0]*60+Number(fcsj[1]))>1200){  
425 - obj["fast0"] = 1440-((fcsjActual[0]*60+Number(fcsjActual[1])) - (fcsj[0]*60+Number(fcsj[1])));  
426 - }else{  
427 - obj["slow0"] = (fcsjActual[0]*60+Number(fcsjActual[1])) - (fcsj[0]*60+Number(fcsj[1]));  
428 - }  
429 - }  
430 - else if(fcsjActual[0]*60+Number(fcsjActual[1]) < fcsj[0]*60+Number(fcsj[1])){  
431 - if( (fcsj[0]*60+Number(fcsj[1])) - (fcsjActual[0]*60+Number(fcsjActual[1]))>1200){  
432 - obj["slow0"] = 1440-((fcsj[0]*60+Number(fcsj[1])) - (fcsjActual[0]*60+Number(fcsjActual[1])));;  
433 - }else{  
434 - obj["fast0"] = (fcsj[0]*60+Number(fcsj[1])) - (fcsjActual[0]*60+Number(fcsjActual[1]));  
435 -  
436 - }  
437 - }  
438 - }  
439 - });  
440 - }  
441 - //查询  
442 - $("#query").on('click',function(){  
443 - line = $("#line").val();  
444 - xlName = $("#select2-line-container").html();  
445 - date = $("#date").val();  
446 - $("#rqxs").html(date);  
447 - if(date == null || date.length == 0){  
448 - layer.msg("请选择时间");  
449 - return;  
450 - }  
451 - $("#xlmc").html(xlName+" "+date+" ");  
452 -// $("#ddrbBody").height($(window).height()-300);  
453 - $("c").html("全日");  
454 - $("#export").removeAttr("disabled");  
455 - var i = layer.load(2);  
456 - $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"query"},function(result){  
457 - var scheduleDaily_1 = template('scheduleDaily_1',{list:result});  
458 - $("#jls").html(result[0].jls);  
459 - $("#jsjss").html(result[0].sjgl);  
460 - $("#dbdp").html(result[0].dbdp);  
461 - $('#forms .scheduleDaily_1').html(scheduleDaily_1);  
462 - });  
463 - $.get('/realSchedule/queryUserInfo',{line:line,date:date,state:2,type:"query"},function(result){  
464 - var scheduleDaily_2 = template('scheduleDaily_2',{list:result});  
465 - $('#forms_1 .scheduleDaily_2').html(scheduleDaily_2);  
466 - divFrom1 = window.document.getElementById('forms');  
467 - divFrom2 = window.document.getElementById('forms_1');  
468 - divFrom2.style.width=divFrom1.offsetWidth+"px";  
469 - });  
470 - $.get('/realSchedule/realScheduleList',{line:line,date:date,type:"query"},function(result){  
471 - getTime(result);  
472 - var scheduleDaily_3 = template('scheduleDaily_3',{list:result});  
473 - $('#forms_2 .scheduleDaily_3').html(scheduleDaily_3);  
474 - divFrom1 = window.document.getElementById('forms');  
475 - divFrom3 = window.document.getElementById('forms_2');  
476 - divFrom3.style.width=divFrom1.offsetWidth+"px";  
477 - layer.close(i);  
478 - });  
479 -  
480 - });  
481 -  
482 - //按月查询  
483 - /* $("#month").on('click',function(){  
484 - line = $("#line").val();  
485 - xlName = $("#select2-line-container").html();  
486 - date = $("#date").val();  
487 - if(date == null || date.length == 0){  
488 - layer.msg("请选择时间");  
489 - return;  
490 - }  
491 - date = date.substring(0, 7);  
492 - $("c").html("全月");  
493 - $("#export").removeAttr("disabled");  
494 - $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"query"},function(result){  
495 - var scheduleDaily_1 = template('scheduleDaily_1',{list:result});  
496 - $('#forms .scheduleDaily_1').html(scheduleDaily_1);  
497 - });  
498 - $('#forms .scheduleDaily_2').html("");  
499 - $('#forms .scheduleDaily_3').html("");  
500 -  
501 - }); */  
502 -  
503 - $("#export").on("click",function(){  
504 - var params = {};  
505 - if(date == null || date.length == 0){  
506 - layer.msg("请选择时间");  
507 - return;  
508 - }  
509 - var lineName = $('#line option:selected').text();  
510 - params['line'] = line;  
511 - params['lineName'] = lineName;  
512 - params['date'] = date;  
513 - params['xlName'] = xlName;  
514 - params['type'] = "export";  
515 - params['state'] = '2';  
516 - params['genre'] = '';  
517 - $get('/realSchedule/scheduleDailyExport', params, function(result){  
518 - if(date.length == 10)  
519 - window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMMDD")+"-"+lineName+"-调度日报");  
520 - else  
521 - window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMM")+"-"+lineName+"-调度日报");  
522 - });  
523 - });  
524 -  
525 - });  
526 -</script>  
527 -<script type="text/html" id="scheduleDaily_1">  
528 - {{each list as obj i}}  
529 - <tr >  
530 - <td>{{obj.xlName}}</td>  
531 - <td>{{obj.jhlc}}</td>  
532 - <td>{{obj.sjgl}}</td>  
533 - <td>{{obj.ssgl}}</td>  
534 - <td>{{obj.ssbc}}</td>  
535 - <td>{{obj.ssgl_lz}}</td>  
536 - <td>{{obj.ssgl_dm}}</td>  
537 - <td>{{obj.ssgl_gz}}</td>  
538 - <td>{{obj.ssgl_jf}}</td>  
539 - <td>{{obj.ssgl_zs}}</td>  
540 - <td>{{obj.ssgl_qr}}</td>  
541 - <td>{{obj.ssgl_qc}}</td>  
542 - <td>{{obj.ssgl_kx}}</td>  
543 - <td>{{obj.ssgl_qh}}</td>  
544 - <td>{{obj.ssgl_yw}}</td>  
545 - <td>{{obj.ssgl_other}}</td>  
546 - <td>{{obj.ljgl}}</td>  
547 - <td>{{obj.jhbc}}</td>  
548 - <td>{{obj.jhbc_m}}</td>  
549 - <td>{{obj.jhbc_a}}</td>  
550 - <td>{{obj.sjbc}}</td>  
551 - <td>{{obj.sjbc_m}}</td>  
552 - <td>{{obj.sjbc_a}}</td>  
553 - <td>{{obj.ljbc}}</td>  
554 - <td>{{obj.ljbc_m}}</td>  
555 - <td>{{obj.ljbc_a}}</td>  
556 - <td>{{obj.fzbc}}</td>  
557 - <td>{{obj.fzbc_m}}</td>  
558 - <td>{{obj.fzbc_a}}</td>  
559 - <td>{{obj.dtbc}}</td>  
560 - <td>{{obj.dtbc_m}}</td>  
561 - <td>{{obj.dtbc_a}}</td>  
562 - <td>{{obj.djg}}</td>  
563 - <td>{{obj.djg_m}}</td>  
564 - <td>{{obj.djg_a}}</td>  
565 - <td>{{obj.djg_time}}</td>  
566 - <td colspan="5">&nbsp;</td>  
567 - </tr>  
568 - {{/each}}  
569 - {{if list.length == 0}}  
570 - <tr>  
571 - <td colspan="40"><h6 class="muted">没有找到相关数据</h6></td>  
572 - </tr>  
573 - {{/if}}  
574 -</script>  
575 -<script type="text/html" id="scheduleDaily_2">  
576 - {{each list as obj i}}  
577 - {{if i%5 == 0}}  
578 - <tr>  
579 - {{/if}}  
580 - <td colspan="2">{{obj.lpName}}</td>  
581 - <td colspan="2">{{obj.clZbh}}</td>  
582 - <td>{{obj.jGh}}/{{obj.jName}}</td>  
583 - <td>&nbsp;</td>  
584 - <td>&nbsp;</td>  
585 - <td>&nbsp;</td>  
586 - {{if (i+1)%5 == 0}}  
587 - </tr>  
588 - {{/if}}  
589 - {{/each}}  
590 - {{if list.length == 0}}  
591 - <tr>  
592 - <td colspan="40"><h6 class="muted">没有找到相关数据</h6></td>  
593 - </tr>  
594 - {{/if}}  
595 -</script>  
596 -<script type="text/html" id="scheduleDaily_3">  
597 - {{each list as obj i}}  
598 - {{if i%3 == 0}}  
599 - <tr>  
600 - {{/if}}  
601 - <td>{{obj.lpName}}</td>  
602 - <td colspan="2" style="word-break: keep-all;white-space:nowrap;">{{obj.qdzName}}</td>  
603 - <td>{{obj.zdsj}}</td>  
604 - <td>{{obj.zdsjActual}}</td>  
605 - <td>{{obj.fast}}</td>  
606 - <td>{{obj.slow}}</td>  
607 - <td>{{obj.fcsj}}</td>  
608 - <td>{{obj.fcsjActual}}  
609 - {{if obj.bcType== "in"}}  
610 - (进)  
611 - {{/if}}  
612 - {{if obj.bcType== "out"}}  
613 - (出)  
614 - {{/if}}  
615 - </td>  
616 - <td>{{obj.fast0}}</td>  
617 - <td>{{obj.slow0}}  
618 -  
619 - </td>  
620 - <td colspan="2" title="{{obj.remark}}">{{obj.remarks}}</td>  
621 - {{if (i+1)%3 == 0}}  
622 - <td>&nbsp;</td>  
623 - </tr>  
624 - {{/if}}  
625 - {{/each}}  
626 - {{if list.length == 0}}  
627 - <tr>  
628 - <td colspan="40"><h6 class="muted">没有找到相关数据</h6></td>  
629 - </tr>  
630 - {{/if}} 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 + text-align: center; }
  12 + .table-bordered > thead > tr > th,
  13 + .table-bordered > thead > tr > td {
  14 + border-bottom-width: 2px; }
  15 +
  16 + .table > tbody + tbody {
  17 + border-top: 1px solid; }
  18 +
  19 +
  20 +
  21 + #ddrbBody tr> td >span{
  22 + word-break: keep-all;white-space:nowrap;
  23 + }
  24 +</style>
  25 +
  26 +<div class="page-head" >
  27 + <div class="page-title">
  28 + <h1>调度日报</h1>
  29 + </div>
  30 +</div>
  31 +
  32 +<!-- <div class="row" > -->
  33 + <div class=" row col-md-12 portlet light porttlet-fit bordered" style="height:calc(100% - 56px)">
  34 +<!-- <div class="" > -->
  35 + <div class="portlet-title">
  36 + <form class="form-inline" action="">
  37 + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_ddrb">
  38 + <span class="item-label" style="width: 80px;">公司: </span>
  39 + <select class="form-control" name="company" id="gsdmDdrb" style="width: 180px;"></select>
  40 + </div>
  41 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_ddrb">
  42 + <span class="item-label" style="width: 80px;">分公司: </span>
  43 + <select class="form-control" name="subCompany" id="fgsdmDdrb" style="width: 180px;"></select>
  44 + </div>
  45 + <div style="margin-top: 2px"></div>
  46 + <div style="display: inline-block;">
  47 + <span class="item-label" style="width: 80px;margin-left: 33px;">线路: </span>
  48 + <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  49 + </div>
  50 + <div style="display: inline-block;margin-left: 38px;">
  51 + <span class="item-label" style="width: 80px;">时间: </span>
  52 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
  53 + </div>
  54 + <div class="form-group">
  55 + <input class="btn btn-default" type="button" id="query" value="查询"/>
  56 +<!-- <input class="btn btn-default" type="button" id="month" value="按月查询"/> -->
  57 + <input class="btn btn-default" type="button" id="export" value="导出"/>
  58 + </div>
  59 + </form>
  60 + </div>
  61 + <div class="portlet-body" id="ddrbBody" style="overflow:auto;height: calc(100% - 80px)">
  62 + <div class="table-container" style="margin-top: 10px;min-width: 906px">
  63 + <label>日期:<span id="rqxs"></span>&nbsp;&nbsp;&nbsp;&nbsp;早高峰:6:31~8:30&nbsp;&nbsp;&nbsp;&nbsp;晚高峰:16:01~18:00</label>
  64 + <br/><label>计划+临加-少驶=<span id="jls"></span>&nbsp;&nbsp;计算机实驶:<span id="jsjss"></span></label>
  65 + &nbsp;&nbsp;当班调派:<span id="dbdp"></span></label>
  66 + <table class="table table-bordered table-hover table-checkable" id="forms">
  67 + <thead>
  68 + <tr>
  69 + <th colspan="40"><label id="xlmc"></label>线路调度日报</th>
  70 + </tr>
  71 + <tr>
  72 + <td rowspan="3"><span>路线</span></td>
  73 + <td colspan="16">全日营运里程(公里)</td>
  74 + <td colspan="15">全日营运班次</td>
  75 + <td colspan="9">大间隔情况</td>
  76 + </tr>
  77 + <tr>
  78 + <td rowspan="2"><span >计划</span></td>
  79 + <td rowspan="2"><span >实驶</span></td>
  80 + <td rowspan="2"><span>少驶公里</span></td>
  81 + <td rowspan="2"><span>少驶班次</span></td>
  82 + <td colspan="11">少驶原因(公里)</td>
  83 + <td rowspan="2"><span >临加公里</span></td>
  84 + <td colspan="3">计划班次</td>
  85 + <td colspan="3">实际班次</td>
  86 + <td colspan="3">临加班次</td>
  87 + <td colspan="3">放站班次</td>
  88 + <td colspan="3">调头班次</td>
  89 + <td colspan="3">发生次数</td>
  90 + <td rowspan="2">最大间隔时间(分)</td>
  91 + <td colspan="5" rowspan="2">原因</td>
  92 + </tr>
  93 + <tr>
  94 + <td><span>路阻</span></td>
  95 + <td><span>吊慢</span></td>
  96 + <td><span>故障</span></td>
  97 + <td><span>纠纷</span></td>
  98 + <td><span>肇事</span></td>
  99 + <td><span>缺人</span></td>
  100 + <td><span>缺车</span></td>
  101 + <td><span>客稀</span></td>
  102 + <td><span>气候</span></td>
  103 + <td><span>援外</span></td>
  104 + <td><span>其他</span></td>
  105 + <td><span>全日</span></td>
  106 + <td><span>早高峰</span></td>
  107 + <td><span>晚高峰</span></td>
  108 + <td><span>全日</span></td>
  109 + <td><span>早高峰</span></td>
  110 + <td><span>晚高峰</span></td>
  111 + <td><span>全日</span></td>
  112 + <td><span>早高峰</span></td>
  113 + <td><span>晚高峰</span></td>
  114 + <td><span>全日</span></td>
  115 + <td><span>早高峰</span></td>
  116 + <td><span>晚高峰</span></td>
  117 + <td><span>全日</span></td>
  118 + <td><span>早高峰</span></td>
  119 + <td><span>晚高峰</span></td>
  120 + <td><span>全日</span></td>
  121 + <td><span>早高峰</span></td>
  122 + <td><span>晚高峰</span></td>
  123 + </tr>
  124 + </thead>
  125 +
  126 + <tbody class="scheduleDaily_1">
  127 +
  128 + </tbody>
  129 + <tr>
  130 + <td colspan="40">&nbsp;</td>
  131 + </tr>
  132 + </table>
  133 + <!-- <tr>
  134 + <td colspan="40">合计</td>
  135 + </tr>
  136 + <tr>
  137 + <td>售票</td>
  138 + <td colspan="2">1元</td>
  139 + <td colspan="2">2元</td>
  140 + <td colspan="2">3元</td>
  141 + <td colspan="2">4元</td>
  142 + <td colspan="2">5元</td>
  143 + <td colspan="2">6元</td>
  144 + <td colspan="2">7元</td>
  145 + <td colspan="2">8元</td>
  146 + <td colspan="2">9元</td>
  147 + <td colspan="2">10元</td>
  148 + <td colspan="2">&nbsp;</td>
  149 + <td colspan="2">合计张数</td>
  150 + <td colspan="2">&nbsp;</td>
  151 + <td colspan="2">预售票</td>
  152 + <td colspan="2">1元</td>
  153 + <td colspan="2">1.5元</td>
  154 + <td colspan="2">合计张数</td>
  155 + <td colspan="5">&nbsp;</td>
  156 + </tr>
  157 + <tr>
  158 + <td>张数</td>
  159 + <td colspan="2">&nbsp;</td>
  160 + <td colspan="2">&nbsp;</td>
  161 + <td colspan="2">&nbsp;</td>
  162 + <td colspan="2">&nbsp;</td>
  163 + <td colspan="2">&nbsp;</td>
  164 + <td colspan="2">&nbsp;</td>
  165 + <td colspan="2">&nbsp;</td>
  166 + <td colspan="2">&nbsp;</td>
  167 + <td colspan="2">&nbsp;</td>
  168 + <td colspan="2">&nbsp;</td>
  169 + <td colspan="2">&nbsp;</td>
  170 + <td colspan="2">合计金额</td>
  171 + <td colspan="2">&nbsp;</td>
  172 + <td colspan="2">张数</td>
  173 + <td colspan="2">&nbsp;</td>
  174 + <td colspan="2">&nbsp;</td>
  175 + <td colspan="2">合计金额</td>
  176 + <td colspan="5">&nbsp;</td>
  177 + </tr>
  178 + <tr>
  179 + <td colspan="40">&nbsp;</td>
  180 + </tr> -->
  181 + <table class="table table-bordered table-hover table-checkable" id="forms_1">
  182 + <tr>
  183 + <td colspan="2"><label>路牌</label></td>
  184 + <td colspan="2"><label>车号</label></td>
  185 + <td> <label>司早</label></td>
  186 + <td><label>售早</label></td>
  187 + <td><label>司晚</label></td>
  188 + <td><label>售晚</label></td>
  189 + <td colspan="2"><label>路牌</label></td>
  190 + <td colspan="2"><label>车号</label></td>
  191 + <td><label>司早</label></td>
  192 + <td><label>售早</label></td>
  193 + <td><label>司晚</label></td>
  194 + <td><label>售晚</label></td>
  195 + <td colspan="2"><label>路牌</label></td>
  196 + <td colspan="2"><label>车号</label></td>
  197 + <td><label>司早</label></td>
  198 + <td><label>售早</label></td>
  199 + <td><label>司晚</label></td>
  200 + <td><label>售晚</label></td>
  201 + <td colspan="2"><label>路牌</label></td>
  202 + <td colspan="2"><label>车号</label></td>
  203 + <td><label>司早</label></td>
  204 + <td><label>售早</label></td>
  205 + <td><label>司晚</label></td>
  206 + <td><label>售晚</label></td>
  207 + <td colspan="2"><label>路牌</label></td>
  208 + <td colspan="2"><label>车号</label></td>
  209 + <td><label>司早</label></td>
  210 + <td><label>售早</label></td>
  211 + <td><label>司晚</label></td>
  212 + <td><label>售晚</label></td>
  213 + </tr>
  214 + <tbody class="scheduleDaily_2">
  215 +
  216 + </tbody>
  217 + <tr>
  218 + <td colspan="40">&nbsp;</td>
  219 + </tr>
  220 + </table>
  221 + <table class="table table-bordered table-hover table-checkable" id="forms_2">
  222 + <tr>
  223 + <td rowspan="2">路牌</td>
  224 + <td colspan="2" rowspan="2" style="word-break: keep-all;white-space:nowrap;">起点站</td>
  225 + <td colspan="4">到达时间</td>
  226 + <td colspan="4">发车时间</td>
  227 + <td colspan="2" rowspan="2">备注</td>
  228 + <td rowspan="2">路牌</td>
  229 + <td colspan="2" rowspan="2" style="word-break: keep-all;white-space:nowrap;">起点站</td>
  230 + <td colspan="4">到达时间</td>
  231 + <td colspan="4">发车时间</td>
  232 + <td colspan="2" rowspan="2">备注</td>
  233 + <td rowspan="2">路牌</td>
  234 + <td colspan="2" rowspan="2" style="word-break: keep-all;white-space:nowrap;">起点站</td>
  235 + <td colspan="4">到达时间</td>
  236 + <td colspan="4">发车时间</td>
  237 + <td colspan="2" rowspan="2">备注</td>
  238 + <td>&nbsp;</td>
  239 + </tr>
  240 + <tr>
  241 + <td>应到</td>
  242 + <td>实到</td>
  243 + <td>快</td>
  244 + <td>慢</td>
  245 + <td>应发</td>
  246 + <td>实发</td>
  247 + <td>快</td>
  248 + <td>慢</td>
  249 + <td>应到</td>
  250 + <td>实到</td>
  251 + <td>快</td>
  252 + <td>慢</td>
  253 + <td>应发</td>
  254 + <td>实发</td>
  255 + <td>快</td>
  256 + <td>慢</td>
  257 + <td>应到</td>
  258 + <td>实到</td>
  259 + <td>快</td>
  260 + <td>慢</td>
  261 + <td>应发</td>
  262 + <td>实发</td>
  263 + <td>快</td>
  264 + <td>慢</td>
  265 + <td>&nbsp;</td>
  266 + </tr>
  267 + <tbody class="scheduleDaily_3">
  268 +
  269 + </tbody>
  270 + </table>
  271 + </div>
  272 + </div>
  273 +<!-- </div> -->
  274 +<!-- </div> -->
  275 +</div>
  276 +
  277 +<script>
  278 + $(function(){
  279 + // 关闭左侧栏
  280 + if (!$('body').hasClass('page-sidebar-closed'))
  281 + $('.menu-toggler.sidebar-toggler').click();
  282 +
  283 + $("#date").datetimepicker({
  284 + format : 'YYYY-MM-DD',
  285 + locale : 'zh-cn'
  286 + });
  287 + var d = new Date();
  288 + var year = d.getFullYear();
  289 + var month = d.getMonth() + 1;
  290 + var day = d.getDate();
  291 + if(month < 10)
  292 + month = "0" + month;
  293 + if(day < 10)
  294 + day = "0" + day;
  295 + $("#date").val(year + "-" + month + "-" + day);
  296 +
  297 +// $("#ddrbBody").height($(window).height()-200);
  298 +
  299 + var divFrom1 = window.document.getElementById('forms');
  300 + var divFrom2 = window.document.getElementById('forms_1');
  301 + var divFrom3 = window.document.getElementById('forms_2');
  302 + divFrom2.style.width=divFrom1.offsetWidth+"px";
  303 + divFrom3.style.width=divFrom1.offsetWidth+"px";
  304 + /* $.get('/basic/lineCode2Name',function(result){
  305 + var data=[];
  306 +
  307 + for(var code in result){
  308 + data.push({id: code, text: result[code]});
  309 + }
  310 + initPinYinSelect2('#line',data,'');
  311 +
  312 + }) */
  313 + var fage=false;
  314 + var obj = [];
  315 + var xlList;
  316 + $.get('/report/lineList',function(result){
  317 + xlList=result;
  318 + $.get('/user/companyData', function(result){
  319 + obj = result;
  320 + var options = '';
  321 + for(var i = 0; i < obj.length; i++){
  322 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  323 + }
  324 +
  325 + if(obj.length ==0){
  326 + $("#gsdmDiv_ddrb").css('display','none');
  327 + }else if(obj.length ==1){
  328 + $("#gsdmDiv_ddrb").css('display','none');
  329 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  330 + $('#fgsdmDiv_ddrb').css('display','none');
  331 + }
  332 + $('#gsdmDdrb').html(options);
  333 + updateCompany();
  334 + });
  335 + })
  336 + $("#gsdmDdrb").on("change",updateCompany);
  337 + function updateCompany(){
  338 + var company = $('#gsdmDdrb').val();
  339 + var options = '';
  340 + for(var i = 0; i < obj.length; i++){
  341 + if(obj[i].companyCode == company){
  342 + var children = obj[i].children;
  343 + for(var j = 0; j < children.length; j++){
  344 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  345 + }
  346 + }
  347 + }
  348 + $('#fgsdmDdrb').html(options);
  349 + }
  350 +
  351 +
  352 + var tempData = {};
  353 + $.get('/report/lineList',function(xlList){
  354 + var data = [];
  355 + $.get('/user/companyData', function(result){
  356 + for(var i = 0; i < result.length; i++){
  357 + var companyCode = result[i].companyCode;
  358 + var children = result[i].children;
  359 + for(var j = 0; j < children.length; j++){
  360 + var code = children[j].code;
  361 + for(var k=0;k < xlList.length;k++ ){
  362 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  363 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  364 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  365 + }
  366 + }
  367 + }
  368 + }
  369 + initPinYinSelect2('#line',data,'');
  370 +
  371 + });
  372 + });
  373 +
  374 + $("#line").on("change", function(){
  375 + if($("#line").val() == " "){
  376 + $("#gsdmDdrb").attr("disabled", false);
  377 + $("#fgsdmDdrb").attr("disabled", false);
  378 + } else {
  379 + var temp = (tempData[$("#line").val()] ? tempData[$("#line").val()] : " : ").split(":");
  380 + $("#gsdmDdrb").val(temp[0]);
  381 + updateCompany();
  382 + $("#fgsdmDdrb").val(temp[1]);
  383 + $("#gsdmDdrb").attr("disabled", true);
  384 + $("#fgsdmDdrb").attr("disabled", true);
  385 + }
  386 + });
  387 +
  388 +
  389 + $('#export').attr('disabled', "true");
  390 +
  391 + var line = $("#line").val();
  392 + var xlName = $("#select2-line-container").html();
  393 + var date = $("#date").val();
  394 +
  395 + function getTime(list){
  396 + $.each(list, function(i, obj) {
  397 + if(obj.zdsj != null && obj.zdsjActual != null ){
  398 + var zdsjActual = (obj.zdsjActual).split(":");
  399 + var zdsj = (obj.zdsj).split(":");
  400 + if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){
  401 + if((zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1]))>1200){
  402 + obj["fast"] = 1440-((zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1])));
  403 +
  404 + }else{
  405 + obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1]));
  406 +
  407 + }
  408 + }
  409 + else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){
  410 + if((zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1]))>1200){
  411 + obj["slow"] =1440-((zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1])));
  412 + }else{
  413 + obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1]));
  414 +
  415 + }
  416 + }
  417 + }
  418 +
  419 + if(obj.fcsj != null && obj.fcsjActual != null ){
  420 + var fcsjActual = (obj.fcsjActual).split(":");
  421 + var fcsj = (obj.fcsj).split(":");
  422 +
  423 + if(fcsjActual[0]*60+Number(fcsjActual[1]) > fcsj[0]*60+Number(fcsj[1])){
  424 + if((fcsjActual[0]*60+Number(fcsjActual[1])) - (fcsj[0]*60+Number(fcsj[1]))>1200){
  425 + obj["fast0"] = 1440-((fcsjActual[0]*60+Number(fcsjActual[1])) - (fcsj[0]*60+Number(fcsj[1])));
  426 + }else{
  427 + obj["slow0"] = (fcsjActual[0]*60+Number(fcsjActual[1])) - (fcsj[0]*60+Number(fcsj[1]));
  428 + }
  429 + }
  430 + else if(fcsjActual[0]*60+Number(fcsjActual[1]) < fcsj[0]*60+Number(fcsj[1])){
  431 + if( (fcsj[0]*60+Number(fcsj[1])) - (fcsjActual[0]*60+Number(fcsjActual[1]))>1200){
  432 + obj["slow0"] = 1440-((fcsj[0]*60+Number(fcsj[1])) - (fcsjActual[0]*60+Number(fcsjActual[1])));;
  433 + }else{
  434 + obj["fast0"] = (fcsj[0]*60+Number(fcsj[1])) - (fcsjActual[0]*60+Number(fcsjActual[1]));
  435 +
  436 + }
  437 + }
  438 + }
  439 + });
  440 + }
  441 + //查询
  442 + $("#query").on('click',function(){
  443 + line = $("#line").val();
  444 + xlName = $("#select2-line-container").html();
  445 + date = $("#date").val();
  446 + $("#rqxs").html(date);
  447 + if(date == null || date.length == 0){
  448 + layer.msg("请选择时间");
  449 + return;
  450 + }
  451 + $("#xlmc").html(xlName+" "+date+" ");
  452 +// $("#ddrbBody").height($(window).height()-300);
  453 + $("c").html("全日");
  454 + $("#export").removeAttr("disabled");
  455 + var i = layer.load(2);
  456 + $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"query"},function(result){
  457 + var scheduleDaily_1 = template('scheduleDaily_1',{list:result});
  458 + $("#jls").html(result[0].jls);
  459 + $("#jsjss").html(result[0].sjgl);
  460 + $("#dbdp").html(result[0].dbdp);
  461 + $('#forms .scheduleDaily_1').html(scheduleDaily_1);
  462 + });
  463 + $.get('/realSchedule/queryUserInfo',{line:line,date:date,state:2,type:"query"},function(result){
  464 + var scheduleDaily_2 = template('scheduleDaily_2',{list:result});
  465 + $('#forms_1 .scheduleDaily_2').html(scheduleDaily_2);
  466 + divFrom1 = window.document.getElementById('forms');
  467 + divFrom2 = window.document.getElementById('forms_1');
  468 + divFrom2.style.width=divFrom1.offsetWidth+"px";
  469 + });
  470 + $.get('/realSchedule/realScheduleList',{line:line,date:date,type:"query"},function(result){
  471 + getTime(result);
  472 + var scheduleDaily_3 = template('scheduleDaily_3',{list:result});
  473 + $('#forms_2 .scheduleDaily_3').html(scheduleDaily_3);
  474 + divFrom1 = window.document.getElementById('forms');
  475 + divFrom3 = window.document.getElementById('forms_2');
  476 + divFrom3.style.width=divFrom1.offsetWidth+"px";
  477 + layer.close(i);
  478 + });
  479 +
  480 + });
  481 +
  482 + //按月查询
  483 + /* $("#month").on('click',function(){
  484 + line = $("#line").val();
  485 + xlName = $("#select2-line-container").html();
  486 + date = $("#date").val();
  487 + if(date == null || date.length == 0){
  488 + layer.msg("请选择时间");
  489 + return;
  490 + }
  491 + date = date.substring(0, 7);
  492 + $("c").html("全月");
  493 + $("#export").removeAttr("disabled");
  494 + $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"query"},function(result){
  495 + var scheduleDaily_1 = template('scheduleDaily_1',{list:result});
  496 + $('#forms .scheduleDaily_1').html(scheduleDaily_1);
  497 + });
  498 + $('#forms .scheduleDaily_2').html("");
  499 + $('#forms .scheduleDaily_3').html("");
  500 +
  501 + }); */
  502 +
  503 + $("#export").on("click",function(){
  504 + var params = {};
  505 + if(date == null || date.length == 0){
  506 + layer.msg("请选择时间");
  507 + return;
  508 + }
  509 + var lineName = $('#line option:selected').text();
  510 + params['line'] = line;
  511 + params['lineName'] = lineName;
  512 + params['date'] = date;
  513 + params['xlName'] = xlName;
  514 + params['type'] = "export";
  515 + params['state'] = '2';
  516 + params['genre'] = '';
  517 + $get('/realSchedule/scheduleDailyExport', params, function(result){
  518 + if(date.length == 10)
  519 + window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMMDD")+"-"+lineName+"-调度日报");
  520 + else
  521 + window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMM")+"-"+lineName+"-调度日报");
  522 + });
  523 + });
  524 +
  525 + });
  526 +</script>
  527 +<script type="text/html" id="scheduleDaily_1">
  528 + {{each list as obj i}}
  529 + <tr >
  530 + <td>{{obj.xlName}}</td>
  531 + <td>{{obj.jhlc}}</td>
  532 + <td>{{obj.sjgl}}</td>
  533 + <td>{{obj.ssgl}}</td>
  534 + <td>{{obj.ssbc}}</td>
  535 + <td>{{obj.ssgl_lz}}</td>
  536 + <td>{{obj.ssgl_dm}}</td>
  537 + <td>{{obj.ssgl_gz}}</td>
  538 + <td>{{obj.ssgl_jf}}</td>
  539 + <td>{{obj.ssgl_zs}}</td>
  540 + <td>{{obj.ssgl_qr}}</td>
  541 + <td>{{obj.ssgl_qc}}</td>
  542 + <td>{{obj.ssgl_kx}}</td>
  543 + <td>{{obj.ssgl_qh}}</td>
  544 + <td>{{obj.ssgl_yw}}</td>
  545 + <td>{{obj.ssgl_other}}</td>
  546 + <td>{{obj.ljgl}}</td>
  547 + <td>{{obj.jhbc}}</td>
  548 + <td>{{obj.jhbc_m}}</td>
  549 + <td>{{obj.jhbc_a}}</td>
  550 + <td>{{obj.sjbc}}</td>
  551 + <td>{{obj.sjbc_m}}</td>
  552 + <td>{{obj.sjbc_a}}</td>
  553 + <td>{{obj.ljbc}}</td>
  554 + <td>{{obj.ljbc_m}}</td>
  555 + <td>{{obj.ljbc_a}}</td>
  556 + <td>{{obj.fzbc}}</td>
  557 + <td>{{obj.fzbc_m}}</td>
  558 + <td>{{obj.fzbc_a}}</td>
  559 + <td>{{obj.dtbc}}</td>
  560 + <td>{{obj.dtbc_m}}</td>
  561 + <td>{{obj.dtbc_a}}</td>
  562 + <td>{{obj.djg}}</td>
  563 + <td>{{obj.djg_m}}</td>
  564 + <td>{{obj.djg_a}}</td>
  565 + <td>{{obj.djg_time}}</td>
  566 + <td colspan="5">&nbsp;</td>
  567 + </tr>
  568 + {{/each}}
  569 + {{if list.length == 0}}
  570 + <tr>
  571 + <td colspan="40"><h6 class="muted">没有找到相关数据</h6></td>
  572 + </tr>
  573 + {{/if}}
  574 +</script>
  575 +<script type="text/html" id="scheduleDaily_2">
  576 + {{each list as obj i}}
  577 + {{if i%5 == 0}}
  578 + <tr>
  579 + {{/if}}
  580 + <td colspan="2">{{obj.lpName}}</td>
  581 + <td colspan="2">{{obj.clZbh}}</td>
  582 + <td>{{obj.jGh}}/{{obj.jName}}</td>
  583 + <td>&nbsp;</td>
  584 + <td>&nbsp;</td>
  585 + <td>&nbsp;</td>
  586 + {{if (i+1)%5 == 0}}
  587 + </tr>
  588 + {{/if}}
  589 + {{/each}}
  590 + {{if list.length == 0}}
  591 + <tr>
  592 + <td colspan="40"><h6 class="muted">没有找到相关数据</h6></td>
  593 + </tr>
  594 + {{/if}}
  595 +</script>
  596 +<script type="text/html" id="scheduleDaily_3">
  597 + {{each list as obj i}}
  598 + {{if i%3 == 0}}
  599 + <tr>
  600 + {{/if}}
  601 + <td>{{obj.lpName}}</td>
  602 + <td colspan="2" style="word-break: keep-all;white-space:nowrap;">{{obj.qdzName}}</td>
  603 + <td>{{obj.zdsj}}</td>
  604 + <td>{{obj.zdsjActual}}</td>
  605 + <td>{{obj.fast}}</td>
  606 + <td>{{obj.slow}}</td>
  607 + <td>{{obj.fcsj}}</td>
  608 + <td>{{obj.fcsjActual}}
  609 + {{if obj.bcType== "in"}}
  610 + (进)
  611 + {{/if}}
  612 + {{if obj.bcType== "out"}}
  613 + (出)
  614 + {{/if}}
  615 + </td>
  616 + <td>{{obj.fast0}}</td>
  617 + <td>{{obj.slow0}}
  618 +
  619 + </td>
  620 + <td colspan="2" title="{{obj.remark}}">{{obj.remarks}}</td>
  621 + {{if (i+1)%3 == 0}}
  622 + <td>&nbsp;</td>
  623 + </tr>
  624 + {{/if}}
  625 + {{/each}}
  626 + {{if list.length == 0}}
  627 + <tr>
  628 + <td colspan="40"><h6 class="muted">没有找到相关数据</h6></td>
  629 + </tr>
  630 + {{/if}}
631 </script> 631 </script>
632 \ No newline at end of file 632 \ No newline at end of file
src/main/resources/static/pages/forms/statement/statisticsDaily.html
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 -  
18 - #forms > thead > tr> td >span{  
19 - width: 5px;  
20 - word-wrap: break-word;  
21 - letter-spacing: 20px;  
22 - }  
23 -  
24 - #forms > thead > tr> td >label{  
25 - word-break: keep-all;white-space:nowrap;  
26 - }  
27 -</style>  
28 -  
29 -<div class="page-head">  
30 - <div class="page-title">  
31 - <h1>统计日报(按年、月、季度查询请点击<a href="statisticsDailyCalc2.html" target="_blank">【统计查询】</a>)</h1>  
32 - </div>  
33 -</div>  
34 -  
35 -<!-- <div class="row"> -->  
36 - <div class="col-md-12 portlet light porttlet-fit bordered" style="height:calc(100% - 56px)">  
37 -<!-- <div> -->  
38 - <div class="portlet-title">  
39 - <form class="form-inline" action="">  
40 - <div style="display: inline-block;margin-left: 29px; " id="gsdmDiv">  
41 - <span class="item-label" style="width: 80px;">公司: </span>  
42 - <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select>  
43 - </div>  
44 - <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv">  
45 - <span class="item-label" style="width: 80px;">分公司: </span>  
46 - <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select>  
47 - </div>  
48 - <div style="display: inline-block;margin-left: 42px;">  
49 - <span class="item-label" style="width: 80px;">线路: </span>  
50 - <select class="form-control" name="line" id="line" style="width: 180px;"></select>  
51 - </div>  
52 - <div style="margin-top: 3px"></div>  
53 - <div style="display: inline-block;">  
54 - <span class="item-label" style="width: 80px;">线路性质: </span>  
55 - <select  
56 - class="form-control" name="nature" id="nature"  
57 - style="width: 180px;">  
58 - <option value="0">全部线路</option>  
59 - <option value="1" selected="selected">营运线路</option>  
60 - <option value="2">非营运线路</option>  
61 - </select>  
62 - </div>  
63 - <div style="display: inline-block;margin-left: 15px;">  
64 - <span class="item-label" style="width: 80px;">开始时间: </span>  
65 - <input class="form-control" type="text" id="date" style="width: 180px;"/>  
66 - </div>  
67 - <div style="display: inline-block;margin-left: 15px;">  
68 - <span class="item-label" style="width: 80px;">结束时间: </span>  
69 - <input class="form-control" type="text" id="date2" style="width: 180px;"/>  
70 - </div>  
71 - <div class="form-group">  
72 - <input class="btn btn-default" type="button" id="query" value="查询"/>  
73 - <input class="btn btn-default" type="button" id="export" value="导出"/>  
74 - </div>  
75 - </form>  
76 - </div>  
77 - <div class="portlet-body" id="tjrbBody" style="overflow:auto;height: calc(100% - 80px)">  
78 - <div class="table-container" style="margin-top: 10px;min-width: 906px">  
79 - <label>早高峰:6:31~8:30&nbsp;&nbsp;&nbsp;&nbsp;晚高峰:16:01~18:00</label>  
80 - <table class="table table-bordered table-hover table-checkable" id="forms">  
81 - <thead>  
82 - <tr>  
83 - <th colspan="45"><label id="tjrq"></label> 线路统计日报</th>  
84 - </tr>  
85 - <tr>  
86 - <td rowspan="3"><span >分公司</span></td>  
87 - <td rowspan="3"><span >路线名</span></td>  
88 - <td colspan="21">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td>  
89 - <td colspan="15">全日营运班次</td>  
90 - <td colspan="9">大间隔情况</td>  
91 - </tr>  
92 - <tr>  
93 - <td rowspan="2"><label>计划总</label>  
94 - <label>公里&nbsp;&nbsp;&nbsp;</label></td>  
95 - <td rowspan="2"><label>计划营</label><label>运公里</label></td>  
96 - <td rowspan="2"><label>计划空</label><label>驶公里</label></td>  
97 - <td rowspan="2"><label>实际</label><label>总公里</label></td>  
98 - <td rowspan="2"><label>实际营</label><label>运公里</label></td>  
99 - <td rowspan="2"><label>实际空</label><label>驶公里</label></td>  
100 - <td rowspan="2"><span>少驶公里</span></td>  
101 - <td rowspan="2"><span>少驶班次</span></td>  
102 - <td colspan="11">少驶原因(公里)</td>  
103 - <td colspan="2">临加公里</td>  
104 - <td colspan="3">计划班次</td>  
105 - <td colspan="3">实际班次</td>  
106 - <td colspan="3">临加班次</td>  
107 - <td colspan="3">放站班次</td>  
108 - <td colspan="3">调头班次</td>  
109 - <td colspan="3">发生次数</td>  
110 - <td rowspan="2">最大间隔时间(分)</td>  
111 - <td rowspan="2">原因</td>  
112 - </tr>  
113 - <tr>  
114 - <td><span >路阻</span></td>  
115 - <td><span>吊慢</span></td>  
116 - <td><span >故障</span></td>  
117 - <td><span >纠纷</span></td>  
118 - <td><span >肇事</span></td>  
119 - <td><span>缺人</span></td>  
120 - <td><span>缺车</span></td>  
121 - <td><span >客稀</span></td>  
122 - <td><span>气候</span></td>  
123 - <td><span>援外</span></td>  
124 - <td><span>其他</span></td>  
125 - <td><span>营运</span></td>  
126 - <td><span>空驶</span></td>  
127 - <td><span>全日</span></td>  
128 - <td><span>早高峰</span></td>  
129 - <td><span>晚高峰</span></td>  
130 - <td><span>全日</span></td>  
131 - <td><span>早高峰</span></td>  
132 - <td><span>晚高峰</span></td>  
133 - <td><span>全日</span></td>  
134 - <td><span>早高峰</span></td>  
135 - <td><span>晚高峰</span></td>  
136 - <td><span>全日</span></td>  
137 - <td><span>早高峰</span></td>  
138 - <td><span>晚高峰</span></td>  
139 - <td><span>全日</span></td>  
140 - <td><span>早高峰</span></td>  
141 - <td><span>晚高峰</span></td>  
142 - <td><span>全日</span></td>  
143 - <td><span>早高峰</span></td>  
144 - <td><span>晚高峰</span></td>  
145 - </tr>  
146 - </thead>  
147 - <tbody class="statisticsDaily">  
148 -  
149 - </tbody>  
150 - </table>  
151 - </div>  
152 - </div>  
153 - </div>  
154 -  
155 -<script>  
156 - $(function(){  
157 - $('#export').attr('disabled', "true");  
158 -  
159 - // 关闭左侧栏  
160 - if (!$('body').hasClass('page-sidebar-closed'))  
161 - $('.menu-toggler.sidebar-toggler').click();  
162 - var d = new Date();  
163 - var year = d.getFullYear();  
164 - var month = d.getMonth() + 1;  
165 - var day = d.getDate();  
166 - if(month < 10)  
167 - month = "0" + month;  
168 - if(day < 10)  
169 - day = "0" + day;  
170 -  
171 - var dateTime=year + "-" + month + "-" + day;  
172 - $("#date").val(dateTime);  
173 - $("#date2").val(dateTime);  
174 - $("#date").datetimepicker({  
175 - format : 'YYYY-MM-DD',  
176 - locale : 'zh-cn',  
177 - maxDate : dateTime  
178 - });  
179 -  
180 - $("#date2").datetimepicker({  
181 - format : 'YYYY-MM-DD',  
182 - locale : 'zh-cn',  
183 - maxDate : dateTime  
184 - });  
185 -  
186 -  
187 - var fage=true;  
188 - var obj = [];  
189 - var xlList;  
190 - $.get('/report/lineList',function(result){  
191 - xlList=result;  
192 - $.get('/user/companyData', function(result){  
193 - obj = result;  
194 - var options = '';  
195 - for(var i = 0; i < obj.length; i++){  
196 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
197 - }  
198 -  
199 - if(obj.length ==0){  
200 - $("#gsdmDiv").css('display','none');  
201 - }else if(obj.length ==1){  
202 - $("#gsdmDiv").css('display','none');  
203 - if(obj[0].children.length == 1 || obj[0].children.length ==0){  
204 - fage=false;  
205 - $('#fgsdmDiv').css('display','none');  
206 - }  
207 - }  
208 - $('#gsdm').html(options);  
209 - updateCompany();  
210 - });  
211 - })  
212 - $("#gsdm").on("change",updateCompany);  
213 - function updateCompany(){  
214 - var company = $('#gsdm').val();  
215 - var options = '';  
216 - if(fage){  
217 - options = '<option value="">请选择</option>';  
218 - }  
219 - for(var i = 0; i < obj.length; i++){  
220 - if(obj[i].companyCode == company){  
221 - var children = obj[i].children;  
222 - for(var j = 0; j < children.length; j++){  
223 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';  
224 - }  
225 - }  
226 - }  
227 - $('#fgsdm').html(options);  
228 -// initXl();  
229 - }  
230 -  
231 - var tempData = {};  
232 - $.get('/report/lineList',function(xlList){  
233 - var data = [];  
234 - data.push({id: " ", text: "全部线路"});  
235 - $.get('/user/companyData', function(result){  
236 - for(var i = 0; i < result.length; i++){  
237 - var companyCode = result[i].companyCode;  
238 - var children = result[i].children;  
239 - for(var j = 0; j < children.length; j++){  
240 - var code = children[j].code;  
241 - for(var k=0;k < xlList.length;k++ ){  
242 - if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){  
243 - data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});  
244 - tempData[xlList[k]["xlbm"]] = companyCode+":"+code;  
245 - }  
246 - }  
247 - }  
248 - }  
249 - initPinYinSelect2('#line',data,'');  
250 -  
251 - });  
252 - });  
253 -  
254 - $("#line").on("change", function(){  
255 - if($("#line").val() == " "){  
256 - $("#gsdm").attr("disabled", false);  
257 - $("#fgsdm").attr("disabled", false);  
258 - } else {  
259 - var temp = tempData[$("#line").val()].split(":");  
260 - $("#gsdm").val(temp[0]);  
261 - updateCompany();  
262 - $("#nature").val(0);  
263 - $("#fgsdm").val(temp[1]);  
264 - $("#gsdm").attr("disabled", true);  
265 - $("#fgsdm").attr("disabled", true);  
266 - }  
267 - });  
268 -  
269 -  
270 - var line ="";  
271 - var xlName ="";  
272 - var date = "";  
273 - var date2 ="";  
274 - var gsdm="";  
275 - var fgsdm="";  
276 - var nature="";  
277 - var time1="";  
278 - var time2="";  
279 - $("#query").on("click",function(){  
280 - if($("#date").val() == null || $("#date").val().trim().length == 0){  
281 - layer.msg("请选择时间范围!");  
282 - return;  
283 - }  
284 - if($("#date2").val() == null || $("#date2").val().trim().length == 0){  
285 - layer.msg("请选择时间范围!");  
286 - return;  
287 - }  
288 -// $("#tjrbBody").height($(window).height()-100);  
289 - line = $("#line").val();  
290 - date = $("#date").val();  
291 - date2 =$("#date2").val();  
292 - gsdm =$("#gsdm").val();  
293 - fgsdm=$("#fgsdm").val();  
294 - nature=$("#nature").val();  
295 - xlName = $("#select2-line-container").html();  
296 - if(xlName == "全部线路")  
297 - xlName = $('#fgsdm option:selected').text();  
298 - if(xlName == "请选择")  
299 - xlName = $('#gsdm option:selected').text();  
300 - if(line=="请选择"){  
301 - line="";  
302 - }  
303 - time1 = Date.parse(new Date(date));  
304 - time2 = Date.parse(new Date(date2));  
305 - if(date==null || date =="" ||date2==null || date2 ==""){  
306 - layer.msg('请选择时间段.');  
307 - }else if(time2<time1){  
308 - layer.msg('结束日期不能小于开始日期.');  
309 - }else{  
310 - if((time2-time1)>2678400000){  
311 - layer.msg('查询超过一个月请点击【统计查询】.');  
312 - }else{  
313 - $("#tjrq").html(date+"至"+date2);  
314 - var params = {};  
315 - params['gsdm'] = gsdm;  
316 - params['fgsdm'] =fgsdm ;  
317 - params['line'] = line;  
318 - params['date'] = date;  
319 - params['date2'] = date2;  
320 - params['xlName'] = xlName;  
321 - params['nature'] = nature;  
322 - params['type'] = "query";  
323 - var i = layer.load(2);  
324 - $get('/realSchedule/statisticsDailyTj',params,function(result){  
325 - // 把数据填充到模版中  
326 - var tbodyHtml = template('statisticsDaily',{list:result});  
327 - // 把渲染好的模版html文本追加到表格中  
328 - $('#forms .statisticsDaily').html(tbodyHtml);  
329 - layer.close(i);  
330 -  
331 - if(result.length == 0)  
332 - $("#export").attr('disabled',"true");  
333 - else  
334 - $("#export").removeAttr("disabled");  
335 - });  
336 - }  
337 -  
338 - }  
339 -  
340 - });  
341 -// $("#tjrbBody").height($(window).height()-100);  
342 - $("#export").on("click",function(){  
343 - var params = {};  
344 - params['gsdm'] = gsdm;  
345 - params['fgsdm'] =fgsdm;  
346 - params['line'] = line;  
347 - date = $("#date").val();  
348 - date2 =$("#date2").val();  
349 - params['date'] = date;  
350 - params['date2'] = date2;  
351 - params['xlName'] = xlName;  
352 - params['nature'] = nature;  
353 - params['type'] = "export";  
354 - if((time2-time1)>2678400000){  
355 - layer.msg('查询超过一个月请点击【统计查询】.');  
356 - }else{  
357 - var i = layer.load(2);  
358 - $get('/realSchedule/statisticsDailyTj',params,function(result){  
359 - var dateTime = "";  
360 - if(date == date2){  
361 - dateTime = moment(date).format("YYYYMMDD");  
362 - } else {  
363 - dateTime = moment(date).format("YYYYMMDD")  
364 - +"-"+moment(date2).format("YYYYMMDD");  
365 - }  
366 - window.open("/downloadFile/download?fileName="  
367 - +dateTime+"-"+xlName+"-统计日报");  
368 - layer.close(i);  
369 - });  
370 - }  
371 - });  
372 -  
373 - });  
374 -</script>  
375 -<script type="text/html" id="statisticsDaily">  
376 - {{each list as obj i}}  
377 - <tr {{if obj.zt==1}}style='color: red'{{/if}}>  
378 - <td>{{obj.fgsName}}</td>  
379 - <td>{{obj.xlName}}</td>  
380 - <td>{{obj.jhzlc}}</td>  
381 - <td>{{obj.jhlc}}</td>  
382 - <td>{{obj.jcclc}}</td>  
383 - <td>{{obj.sjzgl}}</td>  
384 - <td>{{obj.sjgl}}</td>  
385 - <td>{{obj.sjksgl}}</td>  
386 - <td>{{obj.ssgl}}</td>  
387 - <td>{{obj.ssbc}}</td>  
388 - <td>{{obj.ssgl_lz}}</td>  
389 - <td>{{obj.ssgl_dm}}</td>  
390 - <td>{{obj.ssgl_gz}}</td>  
391 - <td>{{obj.ssgl_jf}}</td>  
392 - <td>{{obj.ssgl_zs}}</td>  
393 - <td>{{obj.ssgl_qr}}</td>  
394 - <td>{{obj.ssgl_qc}}</td>  
395 - <td>{{obj.ssgl_kx}}</td>  
396 - <td>{{obj.ssgl_qh}}</td>  
397 - <td>{{obj.ssgl_yw}}</td>  
398 - <td>{{obj.ssgl_other}}</td>  
399 - <td>{{obj.ljgl}}</td>  
400 - <td>{{obj.ljks}}</td>  
401 - <td>{{obj.jhbc}}</td>  
402 - <td>{{obj.jhbc_m}}</td>  
403 - <td>{{obj.jhbc_a}}</td>  
404 - <td>{{obj.sjbc}}</td>  
405 - <td>{{obj.sjbc_m}}</td>  
406 - <td>{{obj.sjbc_a}}</td>  
407 - <td>{{obj.ljbc}}</td>  
408 - <td>{{obj.ljbc_m}}</td>  
409 - <td>{{obj.ljbc_a}}</td>  
410 - <td>{{obj.fzbc}}</td>  
411 - <td>{{obj.fzbc_m}}</td>  
412 - <td>{{obj.fzbc_a}}</td>  
413 - <td>{{obj.dtbc}}</td>  
414 - <td>{{obj.dtbc_m}}</td>  
415 - <td>{{obj.dtbc_a}}</td>  
416 - <td>{{obj.djg}}</td>  
417 - <td>{{obj.djg_m}}</td>  
418 - <td>{{obj.djg_a}}</td>  
419 - <td>{{obj.djg_time}}</td>  
420 - <td>&nbsp;</td>  
421 - </tr>  
422 - {{/each}}  
423 - {{if list.length == 0}}  
424 - <tr>  
425 - <td colspan="44"><h6 class="muted">没有找到相关数据</h6></td>  
426 - </tr>  
427 - {{/if}} 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 +
  18 + #forms > thead > tr> td >span{
  19 + width: 5px;
  20 + word-wrap: break-word;
  21 + letter-spacing: 20px;
  22 + }
  23 +
  24 + #forms > thead > tr> td >label{
  25 + word-break: keep-all;white-space:nowrap;
  26 + }
  27 +</style>
  28 +
  29 +<div class="page-head">
  30 + <div class="page-title">
  31 + <h1>统计日报(按年、月、季度查询请点击<a href="statisticsDailyCalc2.html" target="_blank">【统计查询】</a>)</h1>
  32 + </div>
  33 +</div>
  34 +
  35 +<!-- <div class="row"> -->
  36 + <div class="col-md-12 portlet light porttlet-fit bordered" style="height:calc(100% - 56px)">
  37 +<!-- <div> -->
  38 + <div class="portlet-title">
  39 + <form class="form-inline" action="">
  40 + <div style="display: inline-block;margin-left: 29px; " id="gsdmDiv">
  41 + <span class="item-label" style="width: 80px;">公司: </span>
  42 + <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select>
  43 + </div>
  44 + <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv">
  45 + <span class="item-label" style="width: 80px;">分公司: </span>
  46 + <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select>
  47 + </div>
  48 + <div style="display: inline-block;margin-left: 42px;">
  49 + <span class="item-label" style="width: 80px;">线路: </span>
  50 + <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  51 + </div>
  52 + <div style="margin-top: 3px"></div>
  53 + <div style="display: inline-block;">
  54 + <span class="item-label" style="width: 80px;">线路性质: </span>
  55 + <select
  56 + class="form-control" name="nature" id="nature"
  57 + style="width: 180px;">
  58 + <option value="0">全部线路</option>
  59 + <option value="1" selected="selected">营运线路</option>
  60 + <option value="2">非营运线路</option>
  61 + </select>
  62 + </div>
  63 + <div style="display: inline-block;margin-left: 15px;">
  64 + <span class="item-label" style="width: 80px;">开始时间: </span>
  65 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
  66 + </div>
  67 + <div style="display: inline-block;margin-left: 15px;">
  68 + <span class="item-label" style="width: 80px;">结束时间: </span>
  69 + <input class="form-control" type="text" id="date2" style="width: 180px;"/>
  70 + </div>
  71 + <div class="form-group">
  72 + <input class="btn btn-default" type="button" id="query" value="查询"/>
  73 + <input class="btn btn-default" type="button" id="export" value="导出"/>
  74 + </div>
  75 + </form>
  76 + </div>
  77 + <div class="portlet-body" id="tjrbBody" style="overflow:auto;height: calc(100% - 80px)">
  78 + <div class="table-container" style="margin-top: 10px;min-width: 906px">
  79 + <label>早高峰:6:31~8:30&nbsp;&nbsp;&nbsp;&nbsp;晚高峰:16:01~18:00</label>
  80 + <table class="table table-bordered table-hover table-checkable" id="forms">
  81 + <thead>
  82 + <tr>
  83 + <th colspan="45"><label id="tjrq"></label> 线路统计日报</th>
  84 + </tr>
  85 + <tr>
  86 + <td rowspan="3"><span >分公司</span></td>
  87 + <td rowspan="3"><span >路线名</span></td>
  88 + <td colspan="21">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td>
  89 + <td colspan="15">全日营运班次</td>
  90 + <td colspan="9">大间隔情况</td>
  91 + </tr>
  92 + <tr>
  93 + <td rowspan="2"><label>计划总</label>
  94 + <label>公里&nbsp;&nbsp;&nbsp;</label></td>
  95 + <td rowspan="2"><label>计划营</label><label>运公里</label></td>
  96 + <td rowspan="2"><label>计划空</label><label>驶公里</label></td>
  97 + <td rowspan="2"><label>实际</label><label>总公里</label></td>
  98 + <td rowspan="2"><label>实际营</label><label>运公里</label></td>
  99 + <td rowspan="2"><label>实际空</label><label>驶公里</label></td>
  100 + <td rowspan="2"><span>少驶公里</span></td>
  101 + <td rowspan="2"><span>少驶班次</span></td>
  102 + <td colspan="11">少驶原因(公里)</td>
  103 + <td colspan="2">临加公里</td>
  104 + <td colspan="3">计划班次</td>
  105 + <td colspan="3">实际班次</td>
  106 + <td colspan="3">临加班次</td>
  107 + <td colspan="3">放站班次</td>
  108 + <td colspan="3">调头班次</td>
  109 + <td colspan="3">发生次数</td>
  110 + <td rowspan="2">最大间隔时间(分)</td>
  111 + <td rowspan="2">原因</td>
  112 + </tr>
  113 + <tr>
  114 + <td><span >路阻</span></td>
  115 + <td><span>吊慢</span></td>
  116 + <td><span >故障</span></td>
  117 + <td><span >纠纷</span></td>
  118 + <td><span >肇事</span></td>
  119 + <td><span>缺人</span></td>
  120 + <td><span>缺车</span></td>
  121 + <td><span >客稀</span></td>
  122 + <td><span>气候</span></td>
  123 + <td><span>援外</span></td>
  124 + <td><span>其他</span></td>
  125 + <td><span>营运</span></td>
  126 + <td><span>空驶</span></td>
  127 + <td><span>全日</span></td>
  128 + <td><span>早高峰</span></td>
  129 + <td><span>晚高峰</span></td>
  130 + <td><span>全日</span></td>
  131 + <td><span>早高峰</span></td>
  132 + <td><span>晚高峰</span></td>
  133 + <td><span>全日</span></td>
  134 + <td><span>早高峰</span></td>
  135 + <td><span>晚高峰</span></td>
  136 + <td><span>全日</span></td>
  137 + <td><span>早高峰</span></td>
  138 + <td><span>晚高峰</span></td>
  139 + <td><span>全日</span></td>
  140 + <td><span>早高峰</span></td>
  141 + <td><span>晚高峰</span></td>
  142 + <td><span>全日</span></td>
  143 + <td><span>早高峰</span></td>
  144 + <td><span>晚高峰</span></td>
  145 + </tr>
  146 + </thead>
  147 + <tbody class="statisticsDaily">
  148 +
  149 + </tbody>
  150 + </table>
  151 + </div>
  152 + </div>
  153 + </div>
  154 +
  155 +<script>
  156 + $(function(){
  157 + $('#export').attr('disabled', "true");
  158 +
  159 + // 关闭左侧栏
  160 + if (!$('body').hasClass('page-sidebar-closed'))
  161 + $('.menu-toggler.sidebar-toggler').click();
  162 + var d = new Date();
  163 + var year = d.getFullYear();
  164 + var month = d.getMonth() + 1;
  165 + var day = d.getDate();
  166 + if(month < 10)
  167 + month = "0" + month;
  168 + if(day < 10)
  169 + day = "0" + day;
  170 +
  171 + var dateTime=year + "-" + month + "-" + day;
  172 + $("#date").val(dateTime);
  173 + $("#date2").val(dateTime);
  174 + $("#date").datetimepicker({
  175 + format : 'YYYY-MM-DD',
  176 + locale : 'zh-cn',
  177 + maxDate : dateTime
  178 + });
  179 +
  180 + $("#date2").datetimepicker({
  181 + format : 'YYYY-MM-DD',
  182 + locale : 'zh-cn',
  183 + maxDate : dateTime
  184 + });
  185 +
  186 +
  187 + var fage=true;
  188 + var obj = [];
  189 + var xlList;
  190 + $.get('/report/lineList',function(result){
  191 + xlList=result;
  192 + $.get('/user/companyData', function(result){
  193 + obj = result;
  194 + var options = '';
  195 + for(var i = 0; i < obj.length; i++){
  196 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  197 + }
  198 +
  199 + if(obj.length ==0){
  200 + $("#gsdmDiv").css('display','none');
  201 + }else if(obj.length ==1){
  202 + $("#gsdmDiv").css('display','none');
  203 + if(obj[0].children.length == 1 || obj[0].children.length ==0){
  204 + fage=false;
  205 + $('#fgsdmDiv').css('display','none');
  206 + }
  207 + }
  208 + $('#gsdm').html(options);
  209 + updateCompany();
  210 + });
  211 + })
  212 + $("#gsdm").on("change",updateCompany);
  213 + function updateCompany(){
  214 + var company = $('#gsdm').val();
  215 + var options = '';
  216 + if(fage){
  217 + options = '<option value="">请选择</option>';
  218 + }
  219 + for(var i = 0; i < obj.length; i++){
  220 + if(obj[i].companyCode == company){
  221 + var children = obj[i].children;
  222 + for(var j = 0; j < children.length; j++){
  223 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  224 + }
  225 + }
  226 + }
  227 + $('#fgsdm').html(options);
  228 +// initXl();
  229 + }
  230 +
  231 + var tempData = {};
  232 + $.get('/report/lineList',function(xlList){
  233 + var data = [];
  234 + data.push({id: " ", text: "全部线路"});
  235 + $.get('/user/companyData', function(result){
  236 + for(var i = 0; i < result.length; i++){
  237 + var companyCode = result[i].companyCode;
  238 + var children = result[i].children;
  239 + for(var j = 0; j < children.length; j++){
  240 + var code = children[j].code;
  241 + for(var k=0;k < xlList.length;k++ ){
  242 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  243 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  244 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  245 + }
  246 + }
  247 + }
  248 + }
  249 + initPinYinSelect2('#line',data,'');
  250 +
  251 + });
  252 + });
  253 +
  254 + $("#line").on("change", function(){
  255 + if($("#line").val() == " "){
  256 + $("#gsdm").attr("disabled", false);
  257 + $("#fgsdm").attr("disabled", false);
  258 + } else {
  259 + var temp = (tempData[$("#line").val()] ? tempData[$("#line").val()] : " : ").split(":");
  260 + $("#gsdm").val(temp[0]);
  261 + updateCompany();
  262 + $("#nature").val(0);
  263 + $("#fgsdm").val(temp[1]);
  264 + $("#gsdm").attr("disabled", true);
  265 + $("#fgsdm").attr("disabled", true);
  266 + }
  267 + });
  268 +
  269 +
  270 + var line ="";
  271 + var xlName ="";
  272 + var date = "";
  273 + var date2 ="";
  274 + var gsdm="";
  275 + var fgsdm="";
  276 + var nature="";
  277 + var time1="";
  278 + var time2="";
  279 + $("#query").on("click",function(){
  280 + if($("#date").val() == null || $("#date").val().trim().length == 0){
  281 + layer.msg("请选择时间范围!");
  282 + return;
  283 + }
  284 + if($("#date2").val() == null || $("#date2").val().trim().length == 0){
  285 + layer.msg("请选择时间范围!");
  286 + return;
  287 + }
  288 +// $("#tjrbBody").height($(window).height()-100);
  289 + line = $("#line").val();
  290 + date = $("#date").val();
  291 + date2 =$("#date2").val();
  292 + gsdm =$("#gsdm").val();
  293 + fgsdm=$("#fgsdm").val();
  294 + nature=$("#nature").val();
  295 + xlName = $("#select2-line-container").html();
  296 + if(xlName == "全部线路")
  297 + xlName = $('#fgsdm option:selected').text();
  298 + if(xlName == "请选择")
  299 + xlName = $('#gsdm option:selected').text();
  300 + if(line=="请选择"){
  301 + line="";
  302 + }
  303 + time1 = Date.parse(new Date(date));
  304 + time2 = Date.parse(new Date(date2));
  305 + if(date==null || date =="" ||date2==null || date2 ==""){
  306 + layer.msg('请选择时间段.');
  307 + }else if(time2<time1){
  308 + layer.msg('结束日期不能小于开始日期.');
  309 + }else{
  310 + if((time2-time1)>2678400000){
  311 + layer.msg('查询超过一个月请点击【统计查询】.');
  312 + }else{
  313 + $("#tjrq").html(date+"至"+date2);
  314 + var params = {};
  315 + params['gsdm'] = gsdm;
  316 + params['fgsdm'] =fgsdm ;
  317 + params['line'] = line;
  318 + params['date'] = date;
  319 + params['date2'] = date2;
  320 + params['xlName'] = xlName;
  321 + params['nature'] = nature;
  322 + params['type'] = "query";
  323 + var i = layer.load(2);
  324 + $get('/realSchedule/statisticsDailyTj',params,function(result){
  325 + // 把数据填充到模版中
  326 + var tbodyHtml = template('statisticsDaily',{list:result});
  327 + // 把渲染好的模版html文本追加到表格中
  328 + $('#forms .statisticsDaily').html(tbodyHtml);
  329 + layer.close(i);
  330 +
  331 + if(result.length == 0)
  332 + $("#export").attr('disabled',"true");
  333 + else
  334 + $("#export").removeAttr("disabled");
  335 + });
  336 + }
  337 +
  338 + }
  339 +
  340 + });
  341 +// $("#tjrbBody").height($(window).height()-100);
  342 + $("#export").on("click",function(){
  343 + var params = {};
  344 + params['gsdm'] = gsdm;
  345 + params['fgsdm'] =fgsdm;
  346 + params['line'] = line;
  347 + date = $("#date").val();
  348 + date2 =$("#date2").val();
  349 + params['date'] = date;
  350 + params['date2'] = date2;
  351 + params['xlName'] = xlName;
  352 + params['nature'] = nature;
  353 + params['type'] = "export";
  354 + if((time2-time1)>2678400000){
  355 + layer.msg('查询超过一个月请点击【统计查询】.');
  356 + }else{
  357 + var i = layer.load(2);
  358 + $get('/realSchedule/statisticsDailyTj',params,function(result){
  359 + var dateTime = "";
  360 + if(date == date2){
  361 + dateTime = moment(date).format("YYYYMMDD");
  362 + } else {
  363 + dateTime = moment(date).format("YYYYMMDD")
  364 + +"-"+moment(date2).format("YYYYMMDD");
  365 + }
  366 + window.open("/downloadFile/download?fileName="
  367 + +dateTime+"-"+xlName+"-统计日报");
  368 + layer.close(i);
  369 + });
  370 + }
  371 + });
  372 +
  373 + });
  374 +</script>
  375 +<script type="text/html" id="statisticsDaily">
  376 + {{each list as obj i}}
  377 + <tr {{if obj.zt==1}}style='color: red'{{/if}}>
  378 + <td>{{obj.fgsName}}</td>
  379 + <td>{{obj.xlName}}</td>
  380 + <td>{{obj.jhzlc}}</td>
  381 + <td>{{obj.jhlc}}</td>
  382 + <td>{{obj.jcclc}}</td>
  383 + <td>{{obj.sjzgl}}</td>
  384 + <td>{{obj.sjgl}}</td>
  385 + <td>{{obj.sjksgl}}</td>
  386 + <td>{{obj.ssgl}}</td>
  387 + <td>{{obj.ssbc}}</td>
  388 + <td>{{obj.ssgl_lz}}</td>
  389 + <td>{{obj.ssgl_dm}}</td>
  390 + <td>{{obj.ssgl_gz}}</td>
  391 + <td>{{obj.ssgl_jf}}</td>
  392 + <td>{{obj.ssgl_zs}}</td>
  393 + <td>{{obj.ssgl_qr}}</td>
  394 + <td>{{obj.ssgl_qc}}</td>
  395 + <td>{{obj.ssgl_kx}}</td>
  396 + <td>{{obj.ssgl_qh}}</td>
  397 + <td>{{obj.ssgl_yw}}</td>
  398 + <td>{{obj.ssgl_other}}</td>
  399 + <td>{{obj.ljgl}}</td>
  400 + <td>{{obj.ljks}}</td>
  401 + <td>{{obj.jhbc}}</td>
  402 + <td>{{obj.jhbc_m}}</td>
  403 + <td>{{obj.jhbc_a}}</td>
  404 + <td>{{obj.sjbc}}</td>
  405 + <td>{{obj.sjbc_m}}</td>
  406 + <td>{{obj.sjbc_a}}</td>
  407 + <td>{{obj.ljbc}}</td>
  408 + <td>{{obj.ljbc_m}}</td>
  409 + <td>{{obj.ljbc_a}}</td>
  410 + <td>{{obj.fzbc}}</td>
  411 + <td>{{obj.fzbc_m}}</td>
  412 + <td>{{obj.fzbc_a}}</td>
  413 + <td>{{obj.dtbc}}</td>
  414 + <td>{{obj.dtbc_m}}</td>
  415 + <td>{{obj.dtbc_a}}</td>
  416 + <td>{{obj.djg}}</td>
  417 + <td>{{obj.djg_m}}</td>
  418 + <td>{{obj.djg_a}}</td>
  419 + <td>{{obj.djg_time}}</td>
  420 + <td>&nbsp;</td>
  421 + </tr>
  422 + {{/each}}
  423 + {{if list.length == 0}}
  424 + <tr>
  425 + <td colspan="44"><h6 class="muted">没有找到相关数据</h6></td>
  426 + </tr>
  427 + {{/if}}
428 </script> 428 </script>
429 \ No newline at end of file 429 \ No newline at end of file
src/main/resources/static/pages/forms/statement/waybill.html
@@ -217,7 +217,7 @@ @@ -217,7 +217,7 @@
217 $("#gsdmXcld").attr("disabled", false); 217 $("#gsdmXcld").attr("disabled", false);
218 $("#fgsdmXcld").attr("disabled", false); 218 $("#fgsdmXcld").attr("disabled", false);
219 } else { 219 } else {
220 - var temp = tempData[$("#line").val()].split(":"); 220 + var temp = (tempData[$("#line").val()] ? tempData[$("#line").val()] : " : ").split(":");
221 $("#gsdmXcld").val(temp[0]); 221 $("#gsdmXcld").val(temp[0]);
222 updateCompany(); 222 updateCompany();
223 $("#fgsdmXcld").val(temp[1]); 223 $("#fgsdmXcld").val(temp[1]);
src/main/resources/static/pages/mforms/shifdays/shifday.html
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 - text-align: center; }  
15 -  
16 - .table > tbody + tbody {  
17 - border-top: 1px solid; }  
18 -</style>  
19 -  
20 -<div class="page-head">  
21 - <div class="page-title">  
22 - <h1>班次车辆人员日报表</h1>  
23 - </div>  
24 -</div>  
25 -  
26 -<div class="row">  
27 - <div class="col-md-12">  
28 - <div class="portlet light porttlet-fit bordered">  
29 - <div class="portlet-title">  
30 - <form class="form-inline" action="" method="get">  
31 - <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_shif">  
32 - <span class="item-label" style="width: 80px;">公司: </span>  
33 - <select class="form-control" name="company" id="gsdmShif" style="width: 140px;"></select>  
34 - </div>  
35 - <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_shif">  
36 - <span class="item-label" style="width: 80px;">分公司: </span>  
37 - <select class="form-control" name="subCompany" id="fgsdmShif" style="width: 140px;"></select>  
38 - </div>  
39 - <div style="display: inline-block;">  
40 - <span class="item-label" style="width: 80px;">线路: </span>  
41 - <select class="form-control" name="line" id="line" style="width: 180px;"></select>  
42 - </div>  
43 - <div style="display: inline-block;margin-left: 15px;">  
44 - <span class="item-label" style="width: 80px;">时间: </span>  
45 - <input class="form-control" type="text" id="date" style="width: 180px;"/>  
46 - </div>  
47 - <div class="form-group">  
48 - <input class="btn btn-default" type="button" id="query" value="筛选"/>  
49 - <input class="btn btn-default" type="button" id="export" value="导出"/>  
50 - </div>  
51 - </form>  
52 - </div>  
53 - <div style="display: none">  
54 - <h3>数据显示</h3>  
55 - <a>驾驶员 售票员 路牌</a>&nbsp;&nbsp;  
56 - <a>售票员 路牌 车辆</a>&nbsp;&nbsp;  
57 - <a>车辆 人员 车辆</a>&nbsp;&nbsp;  
58 - <a>驾驶员</a>&nbsp;&nbsp;  
59 - <a>售票员</a>&nbsp;&nbsp;  
60 - <a>路牌</a>&nbsp;&nbsp;  
61 - <a>车辆</a>&nbsp;&nbsp;  
62 - </div>  
63 - <div class="portlet-body" style="text-align:center">  
64 - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">  
65 - <table class="table table-bordered table-hover table-checkable" id="forms">  
66 - <thead>  
67 - <tr>  
68 - <th class="jsypx" style="cursor:pointer ">驾驶员</th>  
69 - <th>售票员</th>  
70 - <th>路牌</th>  
71 - <th class="zbhpx" style="cursor:pointer ">车辆</th>  
72 - <th>计划里程</th>  
73 - <th>实际计划里程</th>  
74 - <th>运营里程</th>  
75 - <th>空驶里程</th>  
76 - <th>抽减里程</th>  
77 - <th>增加里程</th>  
78 - <th>总里程</th>  
79 - <th>计划班次</th>  
80 - <th>实际计划班次</th>  
81 - <th>抽减班次</th>  
82 - <th>增加班次</th>  
83 - <th>实际班次</th>  
84 - </tr>  
85 - </thead>  
86 - <tbody>  
87 -  
88 - </tbody>  
89 - </table>  
90 - </div>  
91 - </div>  
92 - </div>  
93 - </div>  
94 -</div>  
95 -  
96 -<script>  
97 -$(function(){  
98 - var reqCodeMap = {"0xA1": '请求恢复运营', "0xA2": '申请调档', "0xA3": '出场请求', "0xA5": '进场请求', "0xA7": '加油请求', "0x50": '车辆故障', "0x70": '路阻报告', "0x60": '事故报告', "0x11": '扣证纠纷', "0x12" : '报警'};  
99 - // 关闭左侧栏  
100 - if (!$('body').hasClass('page-sidebar-closed'))  
101 - $('.menu-toggler.sidebar-toggler').click();  
102 -  
103 - $("#date").datetimepicker({  
104 - format : 'YYYY-MM-DD',  
105 - locale : 'zh-cn'  
106 - });  
107 - var d = new Date();  
108 - var year = d.getFullYear();  
109 - var month = d.getMonth() + 1;  
110 - var day = d.getDate();  
111 - if(month < 10)  
112 - month = "0" + month;  
113 - if(day < 10)  
114 - day = "0" + day;  
115 - $("#date").val(year + "-" + month + "-" + day);  
116 -  
117 - var fage=false;  
118 - var obj = [];  
119 - var xlList;  
120 -  
121 - $.get('/report/lineList',function(result){  
122 - xlList=result;  
123 - $.get('/user/companyData', function(result){  
124 - obj = result;  
125 - var options = '';  
126 - for(var i = 0; i < obj.length; i++){  
127 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
128 - }  
129 -  
130 - if(obj.length ==0){  
131 - $("#gsdmDiv_shif").css('display','none');  
132 - $('#fgsdmDiv_shif').css('display','none');  
133 - }else if(obj.length ==1){  
134 - $("#gsdmDiv_shif").css('display','none');  
135 - if(obj[0].children.length == 1 || obj[0].children.length ==0)  
136 - $('#fgsdmDiv_shif').css('display','none');  
137 - }  
138 - $('#gsdmShif').html(options);  
139 - updateCompany();  
140 - });  
141 - })  
142 - $("#gsdmShif").on("change",updateCompany);  
143 - function updateCompany(){  
144 - var company = $('#gsdmShif').val();  
145 - var options = '';  
146 - for(var i = 0; i < obj.length; i++){  
147 - if(obj[i].companyCode == company){  
148 - var children = obj[i].children;  
149 - for(var j = 0; j < children.length; j++){  
150 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';  
151 - }  
152 - }  
153 - }  
154 - $('#fgsdmShif').html(options);  
155 - }  
156 -  
157 -  
158 -// $.get('/basic/lineCode2Name',function(result){  
159 -// var data=[];  
160 -  
161 -// for(var code in result){  
162 -// data.push({id: code, text: result[code]});  
163 -// }  
164 -// initPinYinSelect2('#line',data,'');  
165 -  
166 -// })  
167 -  
168 - var tempData = {};  
169 - $.get('/report/lineList',function(xlList){  
170 - var data = [];  
171 -// data.push({id: " ", text: "全部线路"});  
172 - $.get('/user/companyData', function(result){  
173 - for(var i = 0; i < result.length; i++){  
174 - var companyCode = result[i].companyCode;  
175 - var children = result[i].children;  
176 - for(var j = 0; j < children.length; j++){  
177 - var code = children[j].code;  
178 - for(var k=0;k < xlList.length;k++ ){  
179 - if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){  
180 - data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});  
181 - tempData[xlList[k]["xlbm"]] = companyCode+":"+code;  
182 - }  
183 - }  
184 - }  
185 - }  
186 - initPinYinSelect2('#line',data,'');  
187 -  
188 - });  
189 - });  
190 -  
191 - $("#line").on("change", function(){  
192 - if($("#line").val() == " "){  
193 - $("#gsdmShif").attr("disabled", false);  
194 - $("#fgsdmShif").attr("disabled", false);  
195 - } else {  
196 - var temp = tempData[$("#line").val()].split(":");  
197 - $("#gsdmShif").val(temp[0]);  
198 - updateCompany();  
199 - $("#fgsdmShif").val(temp[1]);  
200 - $("#gsdmShif").attr("disabled", true);  
201 - $("#fgsdmShif").attr("disabled", true);  
202 - }  
203 - });  
204 -  
205 - var type="desc";  
206 - $(".jsypx").on("click",function(){  
207 - var line = $("#line").val();  
208 - var date = $("#date").val();  
209 - var gsdmShif = $("#gsdmShif").val();  
210 - var fgsdmShif = $("#fgsdmShif").val();  
211 - var params = {};  
212 - params.fgsdmShif =fgsdmShif;  
213 - params.date =date;  
214 - params.gsdmShif =gsdmShif;  
215 - params.line =line;  
216 - params.state="j_name";  
217 - params.type=type;  
218 - if(date=="" || date ==null){  
219 - layer.msg('请选择日期.');  
220 - }else{  
221 - var i = layer.load(2);  
222 - $get('/mcy_forms/shifday',params,function(result){  
223 - if(type=="desc"){  
224 - type ="asc";  
225 - }else{  
226 - type ="desc";  
227 - }  
228 - $.each(result, function(i, obj) {  
229 - obj.requestType = reqCodeMap[obj.requestType];  
230 - });  
231 - // 把数据填充到模版中  
232 - var tbodyHtml = template('shifday',{list:result});  
233 - // 把渲染好的模版html文本追加到表格中  
234 - $('#forms tbody').html(tbodyHtml);  
235 - layer.close(i);  
236 - });  
237 - }  
238 - })  
239 -  
240 - $(".zbhpx").on("click",function(){  
241 - var line = $("#line").val();  
242 - var date = $("#date").val();  
243 - var gsdmShif = $("#gsdmShif").val();  
244 - var fgsdmShif = $("#fgsdmShif").val();  
245 - var params = {};  
246 - params.fgsdmShif =fgsdmShif;  
247 - params.date =date;  
248 - params.gsdmShif =gsdmShif;  
249 - params.line =line;  
250 - params.state="cl_zbh";  
251 - params.type=type;  
252 - if(date=="" || date ==null){  
253 - layer.msg('请选择日期.');  
254 - }else{  
255 - var i = layer.load(2);  
256 - $get('/mcy_forms/shifday',params,function(result){  
257 - if(type=="desc"){  
258 - type ="asc";  
259 - }else{  
260 - type ="desc";  
261 - }  
262 - $.each(result, function(i, obj) {  
263 - obj.requestType = reqCodeMap[obj.requestType];  
264 - });  
265 - // 把数据填充到模版中  
266 - var tbodyHtml = template('shifday',{list:result});  
267 - // 把渲染好的模版html文本追加到表格中  
268 - $('#forms tbody').html(tbodyHtml);  
269 - layer.close(i);  
270 - });  
271 - }  
272 - })  
273 -  
274 - $("#query").on("click",function(){  
275 - var line = $("#line").val();  
276 - var date = $("#date").val();  
277 - var gsdmShif = $("#gsdmShif").val();  
278 - var fgsdmShif = $("#fgsdmShif").val();  
279 - var params = {};  
280 - if(line )  
281 - if(line ==" " || line ==""){  
282 - params.fgsdmShif =fgsdmShif;  
283 - }  
284 - params.date =date;  
285 - params.gsdmShif =gsdmShif;  
286 - params.line =line;  
287 - params.state="j_name";  
288 - params.type=type;  
289 - if(date=="" || date ==null){  
290 - layer.msg('请选择日期.');  
291 - }else{  
292 - var i = layer.load(2);  
293 - $get('/mcy_forms/shifday',params,function(result){  
294 - type ='asc';  
295 - $.each(result, function(i, obj) {  
296 - obj.requestType = reqCodeMap[obj.requestType];  
297 - });  
298 - // 把数据填充到模版中  
299 - var tbodyHtml = template('shifday',{list:result});  
300 - // 把渲染好的模版html文本追加到表格中  
301 - $('#forms tbody').html(tbodyHtml);  
302 - layer.close(i);  
303 - });  
304 - }  
305 - });  
306 -  
307 - $("#export").on("click",function(){  
308 - var line = $("#line").val();  
309 - var date = $("#date").val();  
310 - var gsdmShif = $("#gsdmShif").val();  
311 - var fgsdmShif = $("#fgsdmShif").val();  
312 - var lineName = $('#line option:selected').text();  
313 - var params = {};  
314 - if(line ==" " || line ==""){  
315 - params.fgsdmShif =fgsdmShif;  
316 - }  
317 - params.date =date;  
318 - params.gsdmShif =gsdmShif;  
319 - params.line =line;  
320 - params.type='export';  
321 - params.lineName =lineName;  
322 - $get('/mcy_export/shifdayExport',params,function(result){  
323 - window.open("/downloadFile/download?fileName="  
324 - +moment(date).format("YYYYMMDD")+  
325 - "-"+lineName+"-班次车辆人员日报表");  
326 - });  
327 - });  
328 -});  
329 -</script>  
330 -<script type="text/html" id="shifday">  
331 - {{each list as obj i}}  
332 - <tr>  
333 - {{if obj.jName == '汇总合计'}}  
334 - <td colspan='4'>{{obj.jName}}</td>  
335 - {{else}}  
336 - <td>{{obj.jName}}</td>  
337 - <td>{{obj.sName}}</td>  
338 - <td>{{obj.lpName}}</td>  
339 - <td>{{obj.carPlate}}</td>  
340 - {{/if}}  
341 - <td>{{obj.jhlc}}</td>  
342 - <td>{{obj.sjjhlc}}</td>  
343 - <td>{{obj.yygl}}</td>  
344 - <td>{{obj.emptMileage}}</td>  
345 - <td>{{obj.remMileage}}</td>  
346 - <td>{{obj.addMileage}}</td>  
347 - <td>{{obj.totalm}}</td>  
348 - <td>{{obj.jhbc}}</td>  
349 - <td>{{obj.sjjhbc}}</td>  
350 - <td>{{obj.cjbc}}</td>  
351 - <td>{{obj.ljbc}}</td>  
352 - <td>{{obj.sjbc}}</td>  
353 - </tr>  
354 - {{/each}}  
355 - {{if list.length == 0}}  
356 - <tr>  
357 - <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td>  
358 - </tr>  
359 - {{/if}}  
360 -</script> 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 + text-align: center; }
  15 +
  16 + .table > tbody + tbody {
  17 + border-top: 1px solid; }
  18 +</style>
  19 +
  20 +<div class="page-head">
  21 + <div class="page-title">
  22 + <h1>班次车辆人员日报表</h1>
  23 + </div>
  24 +</div>
  25 +
  26 +<div class="row">
  27 + <div class="col-md-12">
  28 + <div class="portlet light porttlet-fit bordered">
  29 + <div class="portlet-title">
  30 + <form class="form-inline" action="" method="get">
  31 + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_shif">
  32 + <span class="item-label" style="width: 80px;">公司: </span>
  33 + <select class="form-control" name="company" id="gsdmShif" style="width: 140px;"></select>
  34 + </div>
  35 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_shif">
  36 + <span class="item-label" style="width: 80px;">分公司: </span>
  37 + <select class="form-control" name="subCompany" id="fgsdmShif" style="width: 140px;"></select>
  38 + </div>
  39 + <div style="display: inline-block;">
  40 + <span class="item-label" style="width: 80px;">线路: </span>
  41 + <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  42 + </div>
  43 + <div style="display: inline-block;margin-left: 15px;">
  44 + <span class="item-label" style="width: 80px;">时间: </span>
  45 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
  46 + </div>
  47 + <div class="form-group">
  48 + <input class="btn btn-default" type="button" id="query" value="筛选"/>
  49 + <input class="btn btn-default" type="button" id="export" value="导出"/>
  50 + </div>
  51 + </form>
  52 + </div>
  53 + <div style="display: none">
  54 + <h3>数据显示</h3>
  55 + <a>驾驶员 售票员 路牌</a>&nbsp;&nbsp;
  56 + <a>售票员 路牌 车辆</a>&nbsp;&nbsp;
  57 + <a>车辆 人员 车辆</a>&nbsp;&nbsp;
  58 + <a>驾驶员</a>&nbsp;&nbsp;
  59 + <a>售票员</a>&nbsp;&nbsp;
  60 + <a>路牌</a>&nbsp;&nbsp;
  61 + <a>车辆</a>&nbsp;&nbsp;
  62 + </div>
  63 + <div class="portlet-body" style="text-align:center">
  64 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  65 + <table class="table table-bordered table-hover table-checkable" id="forms">
  66 + <thead>
  67 + <tr>
  68 + <th class="jsypx" style="cursor:pointer ">驾驶员</th>
  69 + <th>售票员</th>
  70 + <th>路牌</th>
  71 + <th class="zbhpx" style="cursor:pointer ">车辆</th>
  72 + <th>计划里程</th>
  73 + <th>实际计划里程</th>
  74 + <th>运营里程</th>
  75 + <th>空驶里程</th>
  76 + <th>抽减里程</th>
  77 + <th>增加里程</th>
  78 + <th>总里程</th>
  79 + <th>计划班次</th>
  80 + <th>实际计划班次</th>
  81 + <th>抽减班次</th>
  82 + <th>增加班次</th>
  83 + <th>实际班次</th>
  84 + </tr>
  85 + </thead>
  86 + <tbody>
  87 +
  88 + </tbody>
  89 + </table>
  90 + </div>
  91 + </div>
  92 + </div>
  93 + </div>
  94 +</div>
  95 +
  96 +<script>
  97 +$(function(){
  98 + var reqCodeMap = {"0xA1": '请求恢复运营', "0xA2": '申请调档', "0xA3": '出场请求', "0xA5": '进场请求', "0xA7": '加油请求', "0x50": '车辆故障', "0x70": '路阻报告', "0x60": '事故报告', "0x11": '扣证纠纷', "0x12" : '报警'};
  99 + // 关闭左侧栏
  100 + if (!$('body').hasClass('page-sidebar-closed'))
  101 + $('.menu-toggler.sidebar-toggler').click();
  102 +
  103 + $("#date").datetimepicker({
  104 + format : 'YYYY-MM-DD',
  105 + locale : 'zh-cn'
  106 + });
  107 + var d = new Date();
  108 + var year = d.getFullYear();
  109 + var month = d.getMonth() + 1;
  110 + var day = d.getDate();
  111 + if(month < 10)
  112 + month = "0" + month;
  113 + if(day < 10)
  114 + day = "0" + day;
  115 + $("#date").val(year + "-" + month + "-" + day);
  116 +
  117 + var fage=false;
  118 + var obj = [];
  119 + var xlList;
  120 +
  121 + $.get('/report/lineList',function(result){
  122 + xlList=result;
  123 + $.get('/user/companyData', function(result){
  124 + obj = result;
  125 + var options = '';
  126 + for(var i = 0; i < obj.length; i++){
  127 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  128 + }
  129 +
  130 + if(obj.length ==0){
  131 + $("#gsdmDiv_shif").css('display','none');
  132 + $('#fgsdmDiv_shif').css('display','none');
  133 + }else if(obj.length ==1){
  134 + $("#gsdmDiv_shif").css('display','none');
  135 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  136 + $('#fgsdmDiv_shif').css('display','none');
  137 + }
  138 + $('#gsdmShif').html(options);
  139 + updateCompany();
  140 + });
  141 + })
  142 + $("#gsdmShif").on("change",updateCompany);
  143 + function updateCompany(){
  144 + var company = $('#gsdmShif').val();
  145 + var options = '';
  146 + for(var i = 0; i < obj.length; i++){
  147 + if(obj[i].companyCode == company){
  148 + var children = obj[i].children;
  149 + for(var j = 0; j < children.length; j++){
  150 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  151 + }
  152 + }
  153 + }
  154 + $('#fgsdmShif').html(options);
  155 + }
  156 +
  157 +
  158 +// $.get('/basic/lineCode2Name',function(result){
  159 +// var data=[];
  160 +
  161 +// for(var code in result){
  162 +// data.push({id: code, text: result[code]});
  163 +// }
  164 +// initPinYinSelect2('#line',data,'');
  165 +
  166 +// })
  167 +
  168 + var tempData = {};
  169 + $.get('/report/lineList',function(xlList){
  170 + var data = [];
  171 +// data.push({id: " ", text: "全部线路"});
  172 + $.get('/user/companyData', function(result){
  173 + for(var i = 0; i < result.length; i++){
  174 + var companyCode = result[i].companyCode;
  175 + var children = result[i].children;
  176 + for(var j = 0; j < children.length; j++){
  177 + var code = children[j].code;
  178 + for(var k=0;k < xlList.length;k++ ){
  179 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  180 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  181 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  182 + }
  183 + }
  184 + }
  185 + }
  186 + initPinYinSelect2('#line',data,'');
  187 +
  188 + });
  189 + });
  190 +
  191 + $("#line").on("change", function(){
  192 + if($("#line").val() == " "){
  193 + $("#gsdmShif").attr("disabled", false);
  194 + $("#fgsdmShif").attr("disabled", false);
  195 + } else {
  196 + var temp = (tempData[$("#line").val()] ? tempData[$("#line").val()] : " : ").split(":");
  197 + $("#gsdmShif").val(temp[0]);
  198 + updateCompany();
  199 + $("#fgsdmShif").val(temp[1]);
  200 + $("#gsdmShif").attr("disabled", true);
  201 + $("#fgsdmShif").attr("disabled", true);
  202 + }
  203 + });
  204 +
  205 + var type="desc";
  206 + $(".jsypx").on("click",function(){
  207 + var line = $("#line").val();
  208 + var date = $("#date").val();
  209 + var gsdmShif = $("#gsdmShif").val();
  210 + var fgsdmShif = $("#fgsdmShif").val();
  211 + var params = {};
  212 + params.fgsdmShif =fgsdmShif;
  213 + params.date =date;
  214 + params.gsdmShif =gsdmShif;
  215 + params.line =line;
  216 + params.state="j_name";
  217 + params.type=type;
  218 + if(date=="" || date ==null){
  219 + layer.msg('请选择日期.');
  220 + }else{
  221 + var i = layer.load(2);
  222 + $get('/mcy_forms/shifday',params,function(result){
  223 + if(type=="desc"){
  224 + type ="asc";
  225 + }else{
  226 + type ="desc";
  227 + }
  228 + $.each(result, function(i, obj) {
  229 + obj.requestType = reqCodeMap[obj.requestType];
  230 + });
  231 + // 把数据填充到模版中
  232 + var tbodyHtml = template('shifday',{list:result});
  233 + // 把渲染好的模版html文本追加到表格中
  234 + $('#forms tbody').html(tbodyHtml);
  235 + layer.close(i);
  236 + });
  237 + }
  238 + })
  239 +
  240 + $(".zbhpx").on("click",function(){
  241 + var line = $("#line").val();
  242 + var date = $("#date").val();
  243 + var gsdmShif = $("#gsdmShif").val();
  244 + var fgsdmShif = $("#fgsdmShif").val();
  245 + var params = {};
  246 + params.fgsdmShif =fgsdmShif;
  247 + params.date =date;
  248 + params.gsdmShif =gsdmShif;
  249 + params.line =line;
  250 + params.state="cl_zbh";
  251 + params.type=type;
  252 + if(date=="" || date ==null){
  253 + layer.msg('请选择日期.');
  254 + }else{
  255 + var i = layer.load(2);
  256 + $get('/mcy_forms/shifday',params,function(result){
  257 + if(type=="desc"){
  258 + type ="asc";
  259 + }else{
  260 + type ="desc";
  261 + }
  262 + $.each(result, function(i, obj) {
  263 + obj.requestType = reqCodeMap[obj.requestType];
  264 + });
  265 + // 把数据填充到模版中
  266 + var tbodyHtml = template('shifday',{list:result});
  267 + // 把渲染好的模版html文本追加到表格中
  268 + $('#forms tbody').html(tbodyHtml);
  269 + layer.close(i);
  270 + });
  271 + }
  272 + })
  273 +
  274 + $("#query").on("click",function(){
  275 + var line = $("#line").val();
  276 + var date = $("#date").val();
  277 + var gsdmShif = $("#gsdmShif").val();
  278 + var fgsdmShif = $("#fgsdmShif").val();
  279 + var params = {};
  280 + if(line )
  281 + if(line ==" " || line ==""){
  282 + params.fgsdmShif =fgsdmShif;
  283 + }
  284 + params.date =date;
  285 + params.gsdmShif =gsdmShif;
  286 + params.line =line;
  287 + params.state="j_name";
  288 + params.type=type;
  289 + if(date=="" || date ==null){
  290 + layer.msg('请选择日期.');
  291 + }else{
  292 + var i = layer.load(2);
  293 + $get('/mcy_forms/shifday',params,function(result){
  294 + type ='asc';
  295 + $.each(result, function(i, obj) {
  296 + obj.requestType = reqCodeMap[obj.requestType];
  297 + });
  298 + // 把数据填充到模版中
  299 + var tbodyHtml = template('shifday',{list:result});
  300 + // 把渲染好的模版html文本追加到表格中
  301 + $('#forms tbody').html(tbodyHtml);
  302 + layer.close(i);
  303 + });
  304 + }
  305 + });
  306 +
  307 + $("#export").on("click",function(){
  308 + var line = $("#line").val();
  309 + var date = $("#date").val();
  310 + var gsdmShif = $("#gsdmShif").val();
  311 + var fgsdmShif = $("#fgsdmShif").val();
  312 + var lineName = $('#line option:selected').text();
  313 + var params = {};
  314 + if(line ==" " || line ==""){
  315 + params.fgsdmShif =fgsdmShif;
  316 + }
  317 + params.date =date;
  318 + params.gsdmShif =gsdmShif;
  319 + params.line =line;
  320 + params.type='export';
  321 + params.lineName =lineName;
  322 + $get('/mcy_export/shifdayExport',params,function(result){
  323 + window.open("/downloadFile/download?fileName="
  324 + +moment(date).format("YYYYMMDD")+
  325 + "-"+lineName+"-班次车辆人员日报表");
  326 + });
  327 + });
  328 +});
  329 +</script>
  330 +<script type="text/html" id="shifday">
  331 + {{each list as obj i}}
  332 + <tr>
  333 + {{if obj.jName == '汇总合计'}}
  334 + <td colspan='4'>{{obj.jName}}</td>
  335 + {{else}}
  336 + <td>{{obj.jName}}</td>
  337 + <td>{{obj.sName}}</td>
  338 + <td>{{obj.lpName}}</td>
  339 + <td>{{obj.carPlate}}</td>
  340 + {{/if}}
  341 + <td>{{obj.jhlc}}</td>
  342 + <td>{{obj.sjjhlc}}</td>
  343 + <td>{{obj.yygl}}</td>
  344 + <td>{{obj.emptMileage}}</td>
  345 + <td>{{obj.remMileage}}</td>
  346 + <td>{{obj.addMileage}}</td>
  347 + <td>{{obj.totalm}}</td>
  348 + <td>{{obj.jhbc}}</td>
  349 + <td>{{obj.sjjhbc}}</td>
  350 + <td>{{obj.cjbc}}</td>
  351 + <td>{{obj.ljbc}}</td>
  352 + <td>{{obj.sjbc}}</td>
  353 + </tr>
  354 + {{/each}}
  355 + {{if list.length == 0}}
  356 + <tr>
  357 + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td>
  358 + </tr>
  359 + {{/if}}
  360 +</script>
361 </script> 361 </script>
362 \ No newline at end of file 362 \ No newline at end of file
src/main/resources/static/pages/report/inoutstation.html
@@ -21,11 +21,11 @@ @@ -21,11 +21,11 @@
21 <h1>到离站</h1> 21 <h1>到离站</h1>
22 </div> 22 </div>
23 </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"> 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 class="form-inline" action=""> 29 <form class="form-inline" action="">
30 <div> 30 <div>
31 <div style="display: inline-block;margin-left: 15px;"> 31 <div style="display: inline-block;margin-left: 15px;">
@@ -49,10 +49,10 @@ @@ -49,10 +49,10 @@
49 </div> 49 </div>
50 <br/> 50 <br/>
51 <div> 51 <div>
52 - <div id="bczxDiv" style="display: inline-block;margin-left: 10px;">  
53 - <div style="display: inline-block;margin-left: 5px;">  
54 - <span class="item-label" style="width: 80px;">时间: </span>  
55 - <input class="form-control" type="text" id="date" style="width: 180px;"/> 52 + <div id="bczxDiv" style="display: inline-block;margin-left: 10px;">
  53 + <div style="display: inline-block;margin-left: 5px;">
  54 + <span class="item-label" style="width: 80px;">时间: </span>
  55 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
56 </div> 56 </div>
57 <div style="display: inline-block;margin-left: 5px;"> 57 <div style="display: inline-block;margin-left: 5px;">
58 <span class="item-label" style="width: 80px;">车辆: </span> 58 <span class="item-label" style="width: 80px;">车辆: </span>
@@ -74,20 +74,20 @@ @@ -74,20 +74,20 @@
74 <select class="form-control" name="zd" id="zd" style="width: 180px;"></select> 74 <select class="form-control" name="zd" id="zd" style="width: 180px;"></select>
75 </div> 75 </div>
76 </div> 76 </div>
77 - <div class="form-group" style="display: inline-block;margin-left: 15px;"> 77 + <div class="form-group" style="display: inline-block;margin-left: 15px;">
78 <input class="btn btn-default" type="button" id="query" value="查询"/> 78 <input class="btn btn-default" type="button" id="query" value="查询"/>
79 <input class="btn btn-default" type="button" id="export" value="导出"/> 79 <input class="btn btn-default" type="button" id="export" value="导出"/>
80 - <input class="btn btn-default" type="button" style="display: none;" id="query2" value="查询"/>  
81 - <input class="btn btn-default" type="button" id="export2" style="display: none;" value="导出"/>  
82 -<!-- <input class="btn btn-default" type="button" id="print" value="打印"/> -->  
83 -<!-- <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/> --> 80 + <input class="btn btn-default" type="button" style="display: none;" id="query2" value="查询"/>
  81 + <input class="btn btn-default" type="button" id="export2" style="display: none;" value="导出"/>
  82 +<!-- <input class="btn btn-default" type="button" id="print" value="打印"/> -->
  83 +<!-- <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/> -->
84 </div> 84 </div>
85 </div> 85 </div>
86 - </form>  
87 - </div> 86 + </form>
  87 + </div>
88 <div class="portlet-body"> 88 <div class="portlet-body">
89 - <div class="row">  
90 - <div class="table-container" id="formsDiv" style="margin-top: 10px;overflow:auto;min-width: 906px;height: 300px"> 89 + <div class="row">
  90 + <div class="table-container" id="formsDiv" style="margin-top: 10px;overflow:auto;min-width: 906px;height: 300px">
91 <table class="table table-bordered table-checkable" id="forms"> 91 <table class="table table-bordered table-checkable" id="forms">
92 <thead> 92 <thead>
93 <tr> 93 <tr>
@@ -98,11 +98,11 @@ @@ -98,11 +98,11 @@
98 <td width="15%">行驶里程</td> 98 <td width="15%">行驶里程</td>
99 <td width="15%">路牌</td> 99 <td width="15%">路牌</td>
100 </tr> 100 </tr>
101 - </thead> 101 + </thead>
102 <tbody class="ludan_ll_2"> 102 <tbody class="ludan_ll_2">
103 103
104 </tbody> 104 </tbody>
105 - </table> 105 + </table>
106 </div> 106 </div>
107 <div > 107 <div >
108 <span style="font-size: 20px" class="item-label" id="dlzmx"> 108 <span style="font-size: 20px" class="item-label" id="dlzmx">
@@ -135,14 +135,14 @@ @@ -135,14 +135,14 @@
135 135
136 </tbody> 136 </tbody>
137 </table> 137 </table>
138 - </div> 138 + </div>
139 </div> 139 </div>
140 - </div>  
141 - </div>  
142 - </div>  
143 -</div>  
144 -  
145 -<script> 140 + </div>
  141 + </div>
  142 + </div>
  143 +</div>
  144 +
  145 +<script>
146 $(function(){ 146 $(function(){
147 147
148 $(":radio").click(function(){ 148 $(":radio").click(function(){
@@ -168,14 +168,14 @@ @@ -168,14 +168,14 @@
168 $("#export2").css('display','inline-block'); 168 $("#export2").css('display','inline-block');
169 } 169 }
170 }); 170 });
171 -  
172 - // 关闭左侧栏  
173 - if (!$('body').hasClass('page-sidebar-closed')) 171 +
  172 + // 关闭左侧栏
  173 + if (!$('body').hasClass('page-sidebar-closed'))
174 $('.menu-toggler.sidebar-toggler').click(); 174 $('.menu-toggler.sidebar-toggler').click();
175 -  
176 - $("#date").datetimepicker({  
177 - format : 'YYYY-MM-DD',  
178 - locale : 'zh-cn' 175 +
  176 + $("#date").datetimepicker({
  177 + format : 'YYYY-MM-DD',
  178 + locale : 'zh-cn'
179 }); 179 });
180 180
181 $("#date1").datetimepicker({ 181 $("#date1").datetimepicker({
@@ -271,7 +271,7 @@ @@ -271,7 +271,7 @@
271 $("#gsdm").attr("disabled", false); 271 $("#gsdm").attr("disabled", false);
272 $("#fgsdm").attr("disabled", false); 272 $("#fgsdm").attr("disabled", false);
273 } else { 273 } else {
274 - var temp = tempData[$("#line").val()].split(":"); 274 + var temp = (tempData[$("#line").val()] ? tempData[$("#line").val()] : " : ").split(":");
275 $("#gsdm").val(temp[0]); 275 $("#gsdm").val(temp[0]);
276 updateCompany(); 276 updateCompany();
277 $("#fgsdm").val(temp[1]); 277 $("#fgsdm").val(temp[1]);
@@ -280,8 +280,8 @@ @@ -280,8 +280,8 @@
280 } 280 }
281 }); 281 });
282 282
283 -  
284 - $("#query").on("click",function(){ 283 +
  284 + $("#query").on("click",function(){
285 var line = $("#line").val(); 285 var line = $("#line").val();
286 var date = $("#date").val(); 286 var date = $("#date").val();
287 var clzbh= $("#nbbm").val(); 287 var clzbh= $("#nbbm").val();
@@ -298,11 +298,11 @@ @@ -298,11 +298,11 @@
298 // 把渲染好的模版html文本追加到表格中 298 // 把渲染好的模版html文本追加到表格中
299 $('#forms .ludan_ll_2').html(ludan_ll_2); 299 $('#forms .ludan_ll_2').html(ludan_ll_2);
300 }); 300 });
301 - } 301 + }
302 }); 302 });
303 303
304 var params = new Array(); 304 var params = new Array();
305 - var jName = ''; 305 + var jName = '';
306 // $("#print").click(function(){ 306 // $("#print").click(function(){
307 // $("#printArea").printArea(); 307 // $("#printArea").printArea();
308 // }); 308 // });
@@ -522,10 +522,10 @@ @@ -522,10 +522,10 @@
522 }); 522 });
523 } 523 }
524 }); 524 });
525 - 525 +
526 }); 526 });
527 -  
528 -</script> 527 +
  528 +</script>
529 <script type="text/html" id="ludan_ll_1"> 529 <script type="text/html" id="ludan_ll_1">
530 {{each list as obj i}} 530 {{each list as obj i}}
531 <tr> 531 <tr>
@@ -556,12 +556,12 @@ @@ -556,12 +556,12 @@
556 <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td> 556 <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td>
557 </tr> 557 </tr>
558 {{/if}} 558 {{/if}}
559 -</script> 559 +</script>
560 <script type="text/html" id="ludan_ll_2"> 560 <script type="text/html" id="ludan_ll_2">
561 - {{each list as obj i}}  
562 - <tr>  
563 - <td>{{i+1}}</td>  
564 - <td>{{obj.qdzName}}</td> 561 + {{each list as obj i}}
  562 + <tr>
  563 + <td>{{i+1}}</td>
  564 + <td>{{obj.qdzName}}</td>
565 <td> 565 <td>
566 {{if obj.status==0}} 566 {{if obj.status==0}}
567 (未执行) 567 (未执行)
@@ -582,8 +582,8 @@ @@ -582,8 +582,8 @@
582 <span class="in_carpark_zdsj" data-id="{{i+1}}" style="display:none">{{obj.realExecDate}} {{obj.zdsjActual}}</span> 582 <span class="in_carpark_zdsj" data-id="{{i+1}}" style="display:none">{{obj.realExecDate}} {{obj.zdsjActual}}</span>
583 </a> 583 </a>
584 {{/if}} 584 {{/if}}
585 - </td>  
586 - <td>{{obj.clZbh}}</td> 585 + </td>
  586 + <td>{{obj.clZbh}}</td>
587 <td> 587 <td>
588 {{if obj.status==0}} 588 {{if obj.status==0}}
589 0 589 0
@@ -592,13 +592,13 @@ @@ -592,13 +592,13 @@
592 {{else}} 592 {{else}}
593 {{obj.jhlc}} 593 {{obj.jhlc}}
594 {{/if}} 594 {{/if}}
595 - </td>  
596 - <td>{{obj.lpName}}</td>  
597 - </tr> 595 + </td>
  596 + <td>{{obj.lpName}}</td>
  597 + </tr>
598 {{/each}} 598 {{/each}}
599 {{if list.length == 0}} 599 {{if list.length == 0}}
600 <tr> 600 <tr>
601 <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td> 601 <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td>
602 </tr> 602 </tr>
603 - {{/if}} 603 + {{/if}}
604 </script> 604 </script>
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/fcxxwt.html
1 -<div class="uk-modal ct-form-modal ct_move_modal" id="schedule-fcxxwt-modal">  
2 - <div class="uk-modal-dialog">  
3 - <a href="" class="uk-modal-close uk-close"></a>  
4 - <div class="uk-modal-header">  
5 - <h2>发车信息微调</h2></div>  
6 - <form class="uk-form uk-form-horizontal">  
7 - </form>  
8 - </div>  
9 -  
10 - <script id="schedule-fcxxwt-form-temp" type="text/html">  
11 - <input type="hidden" name="id" value="{{sch.id}}"/>  
12 -  
13 - <div class="uk-grid">  
14 - <div class="uk-width-1-2">  
15 - <div class="uk-form-row">  
16 - <label class="uk-form-label" >发车站点</label>  
17 - <div class="uk-form-controls">  
18 - <input type="text" value="{{sch.qdzName}}" disabled>  
19 - </div>  
20 - </div>  
21 - </div>  
22 - <div class="uk-width-1-2">  
23 - <div class="uk-form-row">  
24 - <label class="uk-form-label" >结束站点</label>  
25 - <div class="uk-form-controls">  
26 - <input type="text" value="{{sch.zdzName}}" disabled>  
27 - </div>  
28 - </div>  
29 - </div>  
30 - </div>  
31 - <div class="uk-grid">  
32 - <div class="uk-width-1-2">  
33 - <div class="uk-form-row">  
34 - <label class="uk-form-label" >车辆编码</label>  
35 - <div class="uk-form-controls">  
36 - <div class="uk-autocomplete uk-form car-autocom">  
37 - <input type="text" value="{{sch.clZbh}}" name="clZbh" required>  
38 - </div>  
39 - </div>  
40 - </div>  
41 - </div>  
42 - <div class="uk-width-1-2">  
43 - <div class="uk-form-row">  
44 - <label class="uk-form-label" >路 牌</label>  
45 - <div class="uk-form-controls">  
46 - <input type="text" value="{{sch.lpName}}" disabled>  
47 - </div>  
48 - </div>  
49 - </div>  
50 - </div>  
51 -  
52 - <div class="uk-grid">  
53 - <div class="uk-width-1-2">  
54 - <div class="uk-form-row">  
55 - <label class="uk-form-label" >驾驶员</label>  
56 - <div class="uk-form-controls">  
57 - <div class="uk-autocomplete uk-form jsy-autocom">  
58 - <input type="text" value="{{sch.jGh}}/{{sch.jName}}" name="jsy" required>  
59 - </div>  
60 - </div>  
61 - </div>  
62 - </div>  
63 - <div class="uk-width-1-2">  
64 - <div class="uk-form-row">  
65 - <label class="uk-form-label" >售票员</label>  
66 - <div class="uk-form-controls">  
67 - <div class="uk-autocomplete uk-form spy-autocom">  
68 - <input type="text" value="{{sch.sGh}}/{{sch.sName}}" name="spy">  
69 - </div>  
70 - </div>  
71 - </div>  
72 - </div>  
73 - </div>  
74 -  
75 - <div class="uk-grid">  
76 - <div class="uk-width-1-2">  
77 - <div class="uk-form-row">  
78 - <label class="uk-form-label" >计发时刻</label>  
79 - <div class="uk-form-controls">  
80 - <input type="text" value="{{sch.fcsj}}" disabled>  
81 - </div>  
82 - </div>  
83 - </div>  
84 - <div class="uk-width-1-2">  
85 - <div class="uk-form-row">  
86 - <label class="uk-form-label" >实际时刻</label>  
87 - <div class="uk-form-controls">  
88 - <input type="time" value="{{sch.fcsjActual}}" name="fcsjActual" {{if sch.status==0}}autofocus{{/if}}>  
89 - </div>  
90 - </div>  
91 - </div>  
92 - </div>  
93 -  
94 - <div class="uk-grid">  
95 - <div class="uk-width-1-2">  
96 - <div class="uk-form-row">  
97 - <label class="uk-form-label" >到达时刻</label>  
98 - <div class="uk-form-controls">  
99 - <input type="time" value="{{sch.zdsjActual}}" name="zdsjActual" {{if sch.status==1}}autofocus{{/if}}>  
100 - </div>  
101 - </div>  
102 - </div>  
103 - <div class="uk-width-1-2">  
104 - <div class="uk-form-row">  
105 - <label class="uk-form-label" >班次类型</label>  
106 - <div class="uk-form-controls">  
107 - <select class="form-control nt-dictionary" data-code="{{sch.bcType}}" name="bcType" data-group=ScheduleType></select>  
108 - </div>  
109 - </div>  
110 - </div>  
111 - </div>  
112 -  
113 - <div class="uk-grid">  
114 - <div class="uk-width-1-1">  
115 - <div class="uk-form-row">  
116 - <label class="uk-form-label" >调整说明</label>  
117 - <div class="uk-form-controls">  
118 - <select name="adjustExps">  
119 - <option value="">请选择..</option>  
120 - {{each adjustExps as exp i}}  
121 - <option value="{{exp}}">{{exp}}</option>  
122 - {{/each}}  
123 - </select>  
124 - </div>  
125 - </div>  
126 - </div>  
127 - </div>  
128 - <div class="uk-grid">  
129 - <div class="uk-width-1-1">  
130 - <div class="uk-form-row">  
131 - <label class="uk-form-label" >上报类型</label>  
132 - <div class="uk-form-controls report-type-checkbox-list">  
133 - {{each reportTypes as report i}}  
134 - <label>  
135 - <input class="i-cbox" name="reportTypes[]" value="{{report.code}}" type="checkbox" title="{{report.name}}">  
136 - {{report.name}}  
137 - </label>  
138 - {{/each}}  
139 - </div>  
140 - </div>  
141 - </div>  
142 - </div>  
143 - <div class="uk-grid">  
144 - <div class="uk-width-1-1">  
145 - <div class="uk-form-row ct-stacked">  
146 - <div class="uk-form-controls" style="margin-top: 5px;">  
147 - <textarea id="form-s-t" cols="30" rows="5" required name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="50" placeholder="备注,不超过50个字符">{{sch.remarks}}</textarea>  
148 - </div>  
149 - </div>  
150 - </div>  
151 - </div>  
152 -  
153 - <hr class="modal-dotted-hr">  
154 - <div class="uk-grid">  
155 - <div class="uk-width-1-2">  
156 - <div class="uk-form-row">  
157 - <label class="uk-form-label" >里程</label>  
158 - <div class="uk-form-controls">  
159 - <input type="text" value="{{if sch.status==-1}}0{{else}}{{sch.jhlc}}{{/if}}" name="jhlc" required>  
160 - </div>  
161 - </div>  
162 - </div>  
163 - <div class="uk-width-1-2">  
164 - <div class="uk-form-row">  
165 - <div class="uk-form-controls" style="margin-left: 0;margin-top: 9px;">  
166 - <label>  
167 - <input class="i-cbox destroy-box" type="checkbox" name="status" value="-1" {{if sch.status==-1}}checked disabled{{/if}}>  
168 - 是否烂班  
169 - </label>  
170 - </div>  
171 - </div>  
172 - </div>  
173 - </div>  
174 -  
175 - <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">  
176 - <button type="button" class="uk-button uk-modal-close">取消</button>  
177 - <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>  
178 - </div>  
179 - </script>  
180 -  
181 - <script>  
182 - (function() {  
183 - var adjustExps = ['配车', '保养', '故障', '肇事', '路阻', '纠纷', '缺人', '客稀', '缺车', '气候', '援外', '吊慢', '抽减', '其他'];  
184 - var reportTypes = [{name:"无到", code:"9101"}, {name:"无出", code:"9109"}, {name:"掉线", code:"9102"}, {name:"指令故障", code:"9103"}, {name:"车辆漂移", code:"9104"}];  
185 - var modal = '#schedule-fcxxwt-modal', sch, isReport = false;  
186 - $(modal).on('init', function(e, data) {  
187 - e.stopPropagation();  
188 - sch=data.sch;  
189 - var formHtml = template('schedule-fcxxwt-form-temp', {sch: sch, adjustExps:adjustExps, reportTypes:reportTypes});  
190 - $('form', modal).html(formHtml);  
191 - $('input:checkbox').click(function(){  
192 - var remark = $('[name=remarks]').val(), title = $(this).prop("title");  
193 - if ($(this).prop('checked')) {  
194 - if (remark.indexOf(title + ";;") > -1) return;  
195 - $('[name=remarks]').val((remark ? remark + "," : "") + title + ";;");  
196 - } else {  
197 - $('[name=remarks]').val(remark.replace("," + title + ";;", "").replace(title + ";;", ""));  
198 - }  
199 - });  
200 - //字典转换  
201 - dictionaryUtils.transformDom($('.nt-dictionary', modal));  
202 -  
203 - //车辆自动补全  
204 - $.get('/basic/cars', function (rs) {  
205 - gb_common.carAutocomplete($('.car-autocom', modal), rs);  
206 - });  
207 - //驾驶员自动补全  
208 - gb_common.personAutocomplete($('.jsy-autocom', modal));  
209 - //售票员  
210 - gb_common.personAutocomplete($('.spy-autocom', modal));  
211 - // 维修类型选中  
212 - var initReport = function() {  
213 - var remark = $('[name=remarks]').val();  
214 - for (var i = 0;i < reportTypes.length;i++) {  
215 - if (remark.indexOf(reportTypes[i] + ";;") > -1) {  
216 - $('input:checkbox[value=' + reportTypes[i].code + ']').prop('checked', true);  
217 - isReport = true;  
218 - }  
219 - }  
220 - }  
221 - initReport();  
222 -  
223 - //submit  
224 - var f = $('form', modal).formValidation(gb_form_validation_opts);  
225 - f.on('success.form.fv', function(e) {  
226 - e.preventDefault();  
227 - var data = $(this).serializeJSON(), reportText = new Array();  
228 -  
229 - //校验实发实达时间  
230 - if(!validation_s_e_Time(data)){  
231 - notify_err("实发时间不能晚于实达时间!");  
232 - return;  
233 - }  
234 -  
235 - //正常班次里程修改为0  
236 - var normalDestory = data.jhlc==0 && sch.bcType != 'in' && sch.bcType != 'out';  
237 - //修改里程  
238 - var editJhlc = data.jhlc != sch.jhlc && data.jhlc != 0;  
239 - // 修改报修类型为字符串  
240 - if(!data.adjustExps && (data.status==-1 || normalDestory || editJhlc)){  
241 - notify_err("当前操作需要选择调整原因!");  
242 - return;  
243 - }  
244 - if (data.reportTypes) {  
245 - for (var i = 0;i < data.reportTypes.length;i++) {  
246 - for (var j = 0;j < reportTypes.length;j++) {  
247 - if (data.reportTypes[i] == reportTypes[j].code) {  
248 - reportText.push(reportTypes[j].name);  
249 - break;  
250 - }  
251 - }  
252 - }  
253 - if (!isReport) {  
254 - layer.confirm('确定上报类型[' + reportText.join(';') + ']?', {  
255 - btn : [ '确定', '取消' ],  
256 - icon : 3,  
257 - skin : 'layui-layer-cfm-add'  
258 - }, function() {  
259 - layer.closeAll();  
260 - // 修改报修类型为字符串  
261 - data.reportTypes = data.reportTypes.join(";");  
262 - postData(data);  
263 - }, function() {  
264 - $('.uk-button-primary').attr('disabled', false);  
265 - });  
266 - return;  
267 - }  
268 -  
269 - data.reportTypes = data.reportTypes.join(";");  
270 - postData(data);  
271 - return;  
272 - }  
273 -  
274 - postData(data);  
275 - });  
276 -  
277 - var postData = function (data) {  
278 - gb_common.$post('/realSchedule/schInfoFineTune', data, function(rs){  
279 - gb_schedule_table.updateSchedule(rs.ts);  
280 - UIkit.modal(modal).hide();  
281 - notify_succ('操作成功!');  
282 - //计算应发未发  
283 - gb_schedule_table.calc_yfwf_num(sch.xlBm);  
284 - //更新路牌公里统计面板  
285 - gb_schedule_table.showLpMileageTipBySch(sch);  
286 - });  
287 - };  
288 -  
289 - //班次类型  
290 - $('select[name=bcType] option', f).each(function(){  
291 - var whiteList=['venting', 'major', 'normal', sch.bcType];  
292 - if(whiteList.indexOf($(this).val()) == -1)  
293 - $(this).remove();  
294 - });  
295 - if(sch.bcType == 'out' || sch.bcType == 'in'){  
296 - $('[name=bcType]', f).attr('disabled', 'disabled');  
297 - }  
298 -  
299 - //是否烂班  
300 - $('.destroy-box', f).on('click', function () {  
301 - if($(this)[0].checked)  
302 - $('input[name=jhlc]', f).val(0);  
303 - else  
304 - $('input[name=jhlc]', f).val(sch.jhlc);  
305 - });  
306 -  
307 - $('[name=adjustExps]', f).on('change', function(){  
308 - var rem=$('[name=remarks]', f);  
309 - rem.val((rem.val() ? rem.val() + ";" : "") + $(this).val()).trigger('input');  
310 - });  
311 -  
312 -  
313 - $('select[name=bcType]', modal).on('change', function(){  
314 - var type = $(this).val();  
315 - if(sch.bcType == 'in' || sch.bcType == 'out')  
316 - return;  
317 -  
318 - var url, detailModal;  
319 - if(type=='venting'){  
320 - url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html';  
321 - detailModal='#bctype-venting-modal';  
322 - }  
323 - else if(type=='major'){  
324 - detailModal='#bctype-major-modal';  
325 - url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_major.html';  
326 - }  
327 - else return;  
328 -  
329 - //重置类型,等待调整界面触发刷新事件  
330 - $(this).val(sch.bcType);  
331 -  
332 - $.get(url, function(htmlStr){  
333 - $(document.body).append(htmlStr);  
334 -  
335 - UIkit.modal(detailModal, {bgclose: true,modal:false}).show();  
336 - $(detailModal).trigger('init', {sch: sch, parentModal: modal});  
337 - })  
338 - });  
339 -  
340 - /**  
341 - * 相同选项 也触发 onchange  
342 - */  
343 - $('select[name=bcType]', modal).mousedown(function () {  
344 - this.sindex = $(this)[0].selectedIndex;  
345 - $(this)[0].selectedIndex = -1;  
346 - }).mouseout(function () {  
347 - if ($(this)[0].selectedIndex === -1) {  
348 - $(this)[0].selectedIndex = this.sindex;  
349 - }  
350 - });  
351 - });  
352 -  
353 - function validation_s_e_Time(data) {  
354 - var config = gb_data_line_config.get(sch.xlBm);  
355 - var st = get_time(sch.scheduleDateStr, data.fcsjActual, config);  
356 - var et = get_time(sch.scheduleDateStr, data.zdsjActual, config);  
357 - if(st && et && st > et)  
358 - return false;  
359 - return true;  
360 - }  
361 -  
362 - var DAY_TIME = 1000 * 60 * 60 * 24;  
363 - function get_time(rq, timeStr, config) {  
364 - var t = null;  
365 - if(timeStr){  
366 - t = moment(rq + timeStr, 'YYYY-MM-DDHH:mm');  
367 - if(timeStr.localeCompare(config.startOpt) < 0)  
368 - return t + DAY_TIME;  
369 - }  
370 -  
371 - return t;  
372 - }  
373 - })();  
374 - </script>  
375 -</div> 1 +<div class="uk-modal ct-form-modal ct_move_modal" id="schedule-fcxxwt-modal">
  2 + <div class="uk-modal-dialog">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 + <div class="uk-modal-header">
  5 + <h2>发车信息微调</h2></div>
  6 + <form class="uk-form uk-form-horizontal">
  7 + </form>
  8 + </div>
  9 +
  10 + <script id="schedule-fcxxwt-form-temp" type="text/html">
  11 + <input type="hidden" name="id" value="{{sch.id}}"/>
  12 +
  13 + <div class="uk-grid">
  14 + <div class="uk-width-1-2">
  15 + <div class="uk-form-row">
  16 + <label class="uk-form-label" >发车站点</label>
  17 + <div class="uk-form-controls">
  18 + <input type="text" value="{{sch.qdzName}}" disabled>
  19 + </div>
  20 + </div>
  21 + </div>
  22 + <div class="uk-width-1-2">
  23 + <div class="uk-form-row">
  24 + <label class="uk-form-label" >结束站点</label>
  25 + <div class="uk-form-controls">
  26 + <input type="text" value="{{sch.zdzName}}" disabled>
  27 + </div>
  28 + </div>
  29 + </div>
  30 + </div>
  31 + <div class="uk-grid">
  32 + <div class="uk-width-1-2">
  33 + <div class="uk-form-row">
  34 + <label class="uk-form-label" >车辆编码</label>
  35 + <div class="uk-form-controls">
  36 + <div class="uk-autocomplete uk-form car-autocom">
  37 + <input type="text" value="{{sch.clZbh}}" name="clZbh" required>
  38 + </div>
  39 + </div>
  40 + </div>
  41 + </div>
  42 + <div class="uk-width-1-2">
  43 + <div class="uk-form-row">
  44 + <label class="uk-form-label" >路 牌</label>
  45 + <div class="uk-form-controls">
  46 + <input type="text" value="{{sch.lpName}}" disabled>
  47 + </div>
  48 + </div>
  49 + </div>
  50 + </div>
  51 +
  52 + <div class="uk-grid">
  53 + <div class="uk-width-1-2">
  54 + <div class="uk-form-row">
  55 + <label class="uk-form-label" >驾驶员</label>
  56 + <div class="uk-form-controls">
  57 + <div class="uk-autocomplete uk-form jsy-autocom">
  58 + <input type="text" value="{{sch.jGh}}/{{sch.jName}}" name="jsy" required>
  59 + </div>
  60 + </div>
  61 + </div>
  62 + </div>
  63 + <div class="uk-width-1-2">
  64 + <div class="uk-form-row">
  65 + <label class="uk-form-label" >售票员</label>
  66 + <div class="uk-form-controls">
  67 + <div class="uk-autocomplete uk-form spy-autocom">
  68 + <input type="text" value="{{sch.sGh}}/{{sch.sName}}" name="spy">
  69 + </div>
  70 + </div>
  71 + </div>
  72 + </div>
  73 + </div>
  74 +
  75 + <div class="uk-grid">
  76 + <div class="uk-width-1-2">
  77 + <div class="uk-form-row">
  78 + <label class="uk-form-label" >计发时刻</label>
  79 + <div class="uk-form-controls">
  80 + <input type="text" value="{{sch.fcsj}}" disabled>
  81 + </div>
  82 + </div>
  83 + </div>
  84 + <div class="uk-width-1-2">
  85 + <div class="uk-form-row">
  86 + <label class="uk-form-label" >实际时刻</label>
  87 + <div class="uk-form-controls">
  88 + <input type="time" value="{{sch.fcsjActual}}" name="fcsjActual" {{if sch.status==0}}autofocus{{/if}}>
  89 + </div>
  90 + </div>
  91 + </div>
  92 + </div>
  93 +
  94 + <div class="uk-grid">
  95 + <div class="uk-width-1-2">
  96 + <div class="uk-form-row">
  97 + <label class="uk-form-label" >到达时刻</label>
  98 + <div class="uk-form-controls">
  99 + <input type="time" value="{{sch.zdsjActual}}" name="zdsjActual" {{if sch.status==1}}autofocus{{/if}}>
  100 + </div>
  101 + </div>
  102 + </div>
  103 + <div class="uk-width-1-2">
  104 + <div class="uk-form-row">
  105 + <label class="uk-form-label" >班次类型</label>
  106 + <div class="uk-form-controls">
  107 + <select class="form-control nt-dictionary" data-code="{{sch.bcType}}" name="bcType" data-group=ScheduleType></select>
  108 + </div>
  109 + </div>
  110 + </div>
  111 + </div>
  112 +
  113 + <div class="uk-grid">
  114 + <div class="uk-width-1-1">
  115 + <div class="uk-form-row">
  116 + <label class="uk-form-label" >调整说明</label>
  117 + <div class="uk-form-controls">
  118 + <select name="adjustExps">
  119 + <option value="">请选择..</option>
  120 + {{each adjustExps as exp i}}
  121 + <option value="{{exp}}">{{exp}}</option>
  122 + {{/each}}
  123 + </select>
  124 + </div>
  125 + </div>
  126 + </div>
  127 + </div>
  128 + <div class="uk-grid">
  129 + <div class="uk-width-1-1">
  130 + <div class="uk-form-row">
  131 + <label class="uk-form-label" >上报类型</label>
  132 + <div class="uk-form-controls report-type-checkbox-list">
  133 + {{each reportTypes as report i}}
  134 + <label>
  135 + <input class="i-cbox" name="reportTypes[]" value="{{report.code}}" type="checkbox" title="{{report.name}}">
  136 + {{report.name}}
  137 + </label>
  138 + {{/each}}
  139 + </div>
  140 + </div>
  141 + </div>
  142 + </div>
  143 + <div class="uk-grid">
  144 + <div class="uk-width-1-1">
  145 + <div class="uk-form-row ct-stacked">
  146 + <div class="uk-form-controls" style="margin-top: 5px;">
  147 + <textarea id="form-s-t" cols="30" rows="5" required name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="50" placeholder="备注,不超过50个字符">{{sch.remarks}}</textarea>
  148 + </div>
  149 + </div>
  150 + </div>
  151 + </div>
  152 +
  153 + <hr class="modal-dotted-hr">
  154 + <div class="uk-grid">
  155 + <div class="uk-width-1-2">
  156 + <div class="uk-form-row">
  157 + <label class="uk-form-label" >里程</label>
  158 + <div class="uk-form-controls">
  159 + <input type="text" value="{{if sch.status==-1}}0{{else}}{{sch.jhlc}}{{/if}}" name="jhlc" required>
  160 + </div>
  161 + </div>
  162 + </div>
  163 + <div class="uk-width-1-2">
  164 + <div class="uk-form-row">
  165 + <div class="uk-form-controls" style="margin-left: 0;margin-top: 9px;">
  166 + <label>
  167 + <input class="i-cbox destroy-box" type="checkbox" name="status" value="-1" {{if sch.status==-1}}checked disabled{{/if}}>
  168 + 是否烂班
  169 + </label>
  170 + </div>
  171 + </div>
  172 + </div>
  173 + </div>
  174 +
  175 + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
  176 + <button type="button" class="uk-button uk-modal-close">取消</button>
  177 + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>
  178 + </div>
  179 + </script>
  180 +
  181 + <script>
  182 + (function() {
  183 + var adjustExps = ['配车', '保养', '故障', '肇事', '路阻', '纠纷', '缺人', '客稀', '缺车', '气候', '援外', '吊慢', '抽减', '其他'];
  184 + var reportTypes = [{name:"无到", code:"9101"}, {name:"无出", code:"9109"}, {name:"掉线", code:"9102"}, {name:"指令故障", code:"9103"}, {name:"车辆漂移", code:"9104"}];
  185 + var modal = '#schedule-fcxxwt-modal', sch, isReport = false;
  186 + $(modal).on('init', function(e, data) {
  187 + e.stopPropagation();
  188 + sch=data.sch;
  189 + var formHtml = template('schedule-fcxxwt-form-temp', {sch: sch, adjustExps:adjustExps, reportTypes:reportTypes});
  190 + $('form', modal).html(formHtml);
  191 + $('input:checkbox').click(function(){
  192 + var remark = $('[name=remarks]').val(), title = $(this).prop("title");
  193 + if ($(this).prop('checked')) {
  194 + if (remark.indexOf(title + ";;") > -1) return;
  195 + $('[name=remarks]').val((remark ? remark + "," : "") + title + ";;");
  196 + } else {
  197 + $('[name=remarks]').val(remark.replace("," + title + ";;", "").replace(title + ";;", ""));
  198 + }
  199 + });
  200 + //字典转换
  201 + dictionaryUtils.transformDom($('.nt-dictionary', modal));
  202 +
  203 + //车辆自动补全
  204 + $.get('/basic/cars', function (rs) {
  205 + gb_common.carAutocomplete($('.car-autocom', modal), rs);
  206 + });
  207 + //驾驶员自动补全
  208 + gb_common.personAutocomplete($('.jsy-autocom', modal));
  209 + //售票员
  210 + gb_common.personAutocomplete($('.spy-autocom', modal));
  211 + // 维修类型选中
  212 + var initReport = function() {
  213 + var remark = $('[name=remarks]').val();
  214 + for (var i = 0;i < reportTypes.length;i++) {
  215 + if (remark.indexOf(reportTypes[i].name + ";;") > -1) {
  216 + $('input:checkbox[value=' + reportTypes[i].code + ']').prop('checked', true);
  217 + isReport = true;
  218 + }
  219 + }
  220 + }
  221 + initReport();
  222 +
  223 + //submit
  224 + var f = $('form', modal).formValidation(gb_form_validation_opts);
  225 + f.on('success.form.fv', function(e) {
  226 + e.preventDefault();
  227 + var data = $(this).serializeJSON(), reportText = new Array();
  228 +
  229 + //校验实发实达时间
  230 + if(!validation_s_e_Time(data)){
  231 + notify_err("实发时间不能晚于实达时间!");
  232 + return;
  233 + }
  234 +
  235 + //正常班次里程修改为0
  236 + var normalDestory = data.jhlc==0 && sch.bcType != 'in' && sch.bcType != 'out';
  237 + //修改里程
  238 + var editJhlc = data.jhlc != sch.jhlc && data.jhlc != 0;
  239 + // 修改报修类型为字符串
  240 + if(!data.adjustExps && (data.status==-1 || normalDestory || editJhlc)){
  241 + notify_err("当前操作需要选择调整原因!");
  242 + return;
  243 + }
  244 + if (data.reportTypes) {
  245 + for (var i = 0;i < data.reportTypes.length;i++) {
  246 + for (var j = 0;j < reportTypes.length;j++) {
  247 + if (data.reportTypes[i] == reportTypes[j].code) {
  248 + reportText.push(reportTypes[j].name);
  249 + break;
  250 + }
  251 + }
  252 + }
  253 + if (!isReport) {
  254 + layer.confirm('确定上报类型[' + reportText.join(';') + ']?', {
  255 + btn : [ '确定', '取消' ],
  256 + icon : 3,
  257 + skin : 'layui-layer-cfm-add'
  258 + }, function() {
  259 + layer.closeAll();
  260 + // 修改报修类型为字符串
  261 + data.reportTypes = data.reportTypes.join(";");
  262 + postData(data);
  263 + }, function() {
  264 + $('.uk-button-primary').attr('disabled', false);
  265 + });
  266 + return;
  267 + }
  268 +
  269 + data.reportTypes = data.reportTypes.join(";");
  270 + postData(data);
  271 + return;
  272 + }
  273 +
  274 + postData(data);
  275 + });
  276 +
  277 + var postData = function (data) {
  278 + gb_common.$post('/realSchedule/schInfoFineTune', data, function(rs){
  279 + gb_schedule_table.updateSchedule(rs.ts);
  280 + UIkit.modal(modal).hide();
  281 + notify_succ('操作成功!');
  282 + //计算应发未发
  283 + gb_schedule_table.calc_yfwf_num(sch.xlBm);
  284 + //更新路牌公里统计面板
  285 + gb_schedule_table.showLpMileageTipBySch(sch);
  286 + });
  287 + };
  288 +
  289 + //班次类型
  290 + $('select[name=bcType] option', f).each(function(){
  291 + var whiteList=['venting', 'major', 'normal', sch.bcType];
  292 + if(whiteList.indexOf($(this).val()) == -1)
  293 + $(this).remove();
  294 + });
  295 + if(sch.bcType == 'out' || sch.bcType == 'in'){
  296 + $('[name=bcType]', f).attr('disabled', 'disabled');
  297 + }
  298 +
  299 + //是否烂班
  300 + $('.destroy-box', f).on('click', function () {
  301 + if($(this)[0].checked)
  302 + $('input[name=jhlc]', f).val(0);
  303 + else
  304 + $('input[name=jhlc]', f).val(sch.jhlc);
  305 + });
  306 +
  307 + $('[name=adjustExps]', f).on('change', function(){
  308 + var rem=$('[name=remarks]', f);
  309 + rem.val((rem.val() ? rem.val() + ";" : "") + $(this).val()).trigger('input');
  310 + });
  311 +
  312 +
  313 + $('select[name=bcType]', modal).on('change', function(){
  314 + var type = $(this).val();
  315 + if(sch.bcType == 'in' || sch.bcType == 'out')
  316 + return;
  317 +
  318 + var url, detailModal;
  319 + if(type=='venting'){
  320 + url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html';
  321 + detailModal='#bctype-venting-modal';
  322 + }
  323 + else if(type=='major'){
  324 + detailModal='#bctype-major-modal';
  325 + url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_major.html';
  326 + }
  327 + else return;
  328 +
  329 + //重置类型,等待调整界面触发刷新事件
  330 + $(this).val(sch.bcType);
  331 +
  332 + $.get(url, function(htmlStr){
  333 + $(document.body).append(htmlStr);
  334 +
  335 + UIkit.modal(detailModal, {bgclose: true,modal:false}).show();
  336 + $(detailModal).trigger('init', {sch: sch, parentModal: modal});
  337 + })
  338 + });
  339 +
  340 + /**
  341 + * 相同选项 也触发 onchange
  342 + */
  343 + $('select[name=bcType]', modal).mousedown(function () {
  344 + this.sindex = $(this)[0].selectedIndex;
  345 + $(this)[0].selectedIndex = -1;
  346 + }).mouseout(function () {
  347 + if ($(this)[0].selectedIndex === -1) {
  348 + $(this)[0].selectedIndex = this.sindex;
  349 + }
  350 + });
  351 + });
  352 +
  353 + function validation_s_e_Time(data) {
  354 + var config = gb_data_line_config.get(sch.xlBm);
  355 + var st = get_time(sch.scheduleDateStr, data.fcsjActual, config);
  356 + var et = get_time(sch.scheduleDateStr, data.zdsjActual, config);
  357 + if(st && et && st > et)
  358 + return false;
  359 + return true;
  360 + }
  361 +
  362 + var DAY_TIME = 1000 * 60 * 60 * 24;
  363 + function get_time(rq, timeStr, config) {
  364 + var t = null;
  365 + if(timeStr){
  366 + t = moment(rq + timeStr, 'YYYY-MM-DDHH:mm');
  367 + if(timeStr.localeCompare(config.startOpt) < 0)
  368 + return t + DAY_TIME;
  369 + }
  370 +
  371 + return t;
  372 + }
  373 + })();
  374 + </script>
  375 +</div>
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sftz.html
1 -<div class="uk-modal ct-form-modal ct_move_modal" id="schedule-sftz-modal">  
2 - <div class="uk-modal-dialog" style="width: 350px;">  
3 - <a href="" class="uk-modal-close uk-close"></a>  
4 - <div class="uk-modal-header">  
5 - <h2>实发调整</h2></div>  
6 - <form class="uk-form uk-form-horizontal">  
7 - </form>  
8 - </div>  
9 -  
10 - <script id="schedule-sftz-form-temp" type="text/html">  
11 - <input type="hidden" name="id" value="{{sch.id}}" />  
12 - <div class="uk-grid">  
13 - <div class="uk-width-1-1">  
14 - <div class="uk-form-row">  
15 - <label class="uk-form-label" >车辆</label>  
16 - <div class="uk-form-controls">  
17 - <input type="text" name="clZbh" value="{{sch.clZbh}}" readonly>  
18 - </div>  
19 - </div>  
20 - </div>  
21 - </div>  
22 - <div class="uk-grid">  
23 - <div class="uk-width-1-1">  
24 - <div class="uk-form-row">  
25 - <label class="uk-form-label" >路牌</label>  
26 - <div class="uk-form-controls">  
27 - <input type="text" value="{{sch.lpName}}" disabled>  
28 - </div>  
29 - </div>  
30 - </div>  
31 - </div>  
32 - <div class="uk-grid">  
33 - <div class="uk-width-1-1">  
34 - <div class="uk-form-row">  
35 - <label class="uk-form-label" >计发时刻</label>  
36 - <div class="uk-form-controls">  
37 - <input type="text" value="{{sch.fcsj}}" disabled>  
38 - </div>  
39 - </div>  
40 - </div>  
41 - </div>  
42 - <div class="uk-grid">  
43 - <div class="uk-width-1-1">  
44 - <div class="uk-form-row">  
45 - <label class="uk-form-label" >实发时刻</label>  
46 - <div class="uk-form-controls">  
47 - <input type="time" name="fcsjActual" value="{{sch.fcsjActual}}" required autofocus>  
48 - </div>  
49 - </div>  
50 - </div>  
51 - </div>  
52 - <div class="uk-grid">  
53 - <div class="uk-width-1-1">  
54 - <div class="uk-form-row">  
55 - <label class="uk-form-label" >上报类型</label>  
56 - <div class="uk-form-controls report-type-checkbox-list">  
57 - {{each reportTypes as report i}}  
58 - <label>  
59 - <input class="i-cbox" name="reportTypes[]" value="{{report.code}}" type="checkbox" title="{{report.name}}">  
60 - {{report.name}}  
61 - </label>  
62 - {{/each}}  
63 - </div>  
64 - </div>  
65 - </div>  
66 - </div>  
67 - <div class="uk-grid">  
68 - <div class="uk-width-1-1">  
69 - <div class="uk-form-row ct-stacked">  
70 - <label class="uk-form-label" for="form-s-t">调整说明<small class="font-danger">(不超过20个字符)</small></label>  
71 - <div class="uk-form-controls">  
72 - <textarea id="form-s-t" cols="30" rows="5" name="remarks" required data-fv-stringlength="true" data-fv-stringlength-max="20" placeholder="不超过20个字符。必填">{{sch.remarks}}</textarea>  
73 - </div>  
74 - </div>  
75 - </div>  
76 - </div>  
77 -  
78 - <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">  
79 - <button type="button" class="uk-button uk-modal-close">取消</button>  
80 - <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>  
81 - </div>  
82 - </script>  
83 -  
84 - <script>  
85 - (function() {  
86 - var modal = '#schedule-sftz-modal', sch, isReport = false;  
87 - var reportTypes = [{name:"无到", code:"9101"}, {name:"无出", code:"9109"}, {name:"掉线", code:"9102"}, {name:"指令故障", code:"9103"}, {name:"车辆漂移", code:"9104"}];  
88 - $(modal).on('init', function(e, data) {  
89 - e.stopPropagation();  
90 - sch = data.sch;  
91 - debugger;  
92 - var formHtml = template('schedule-sftz-form-temp', {sch: sch, reportTypes:reportTypes});  
93 - $('form', modal).html(formHtml);  
94 - $('input:checkbox').click(function(){  
95 - var remark = $('[name=remarks]').val(), title = $(this).prop("title");  
96 - if ($(this).prop('checked')) {  
97 - if (remark.indexOf(title + ";;") > -1) return;  
98 - $('[name=remarks]').val((remark ? remark + "," : "") + title + ";;");  
99 - } else {  
100 - $('[name=remarks]').val(remark.replace("," + title + ";;", "").replace(title + ";;", ""));  
101 - }  
102 - });  
103 -  
104 - //submit  
105 - var f = $('form', modal).formValidation(gb_form_validation_opts);  
106 - f.on('success.form.fv', function(e) {  
107 - e.preventDefault();  
108 - var data = $(this).serializeJSON(), reportText = new Array();  
109 -  
110 - if (data.reportTypes) {  
111 - for (var i = 0;i < data.reportTypes.length;i++) {  
112 - for (var j = 0;j < reportTypes.length;j++) {  
113 - if (data.reportTypes[i] == reportTypes[j].code) {  
114 - reportText.push(reportTypes[j].name);  
115 - break;  
116 - }  
117 - }  
118 - }  
119 - if (!isReport) {  
120 - layer.confirm('确定上报类型[' + reportText.join(';') + ']?', {  
121 - btn : [ '确定', '取消' ],  
122 - icon : 3,  
123 - skin : 'layui-layer-cfm-add'  
124 - }, function() {  
125 - layer.closeAll();  
126 - // 修改报修类型为字符串  
127 - data.reportTypes = data.reportTypes.join(";");  
128 - postData(data);  
129 - }, function() {  
130 - $('.uk-button-primary').attr('disabled', false);  
131 - });  
132 - return;  
133 - }  
134 -  
135 - data.reportTypes = data.reportTypes.join(";");  
136 - postData(data);  
137 - return;  
138 - }  
139 -  
140 - postData(data);  
141 - });  
142 -  
143 - var postData = function (data) {  
144 - gb_common.$post('/realSchedule/realOutAdjust', data, function(rs) {  
145 - if (rs.ts) {  
146 - //更新前端数据  
147 - gb_schedule_table.updateSchedule(rs.ts);  
148 - UIkit.modal(modal).hide();  
149 - notify_succ('实发调整成功!');  
150 -  
151 - if(data.fcsjActual)  
152 - gb_schedule_table.calc_yfwf_num(sch.xlBm);  
153 - }  
154 - });  
155 - }  
156 -  
157 - // 维修类型选中  
158 - var initReport = function() {  
159 - var remark = $('[name=remarks]').val();  
160 - for (var i = 0;i < reportTypes.length;i++) {  
161 - if (remark.indexOf(reportTypes[i] + ";;") > -1) {  
162 - $('input:checkbox[value=' + reportTypes[i].code + ']').prop('checked', true);  
163 - isReport = true;  
164 - }  
165 - }  
166 - }  
167 - initReport();  
168 - });  
169 - })();  
170 - </script>  
171 -</div> 1 +<div class="uk-modal ct-form-modal ct_move_modal" id="schedule-sftz-modal">
  2 + <div class="uk-modal-dialog" style="width: 350px;">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 + <div class="uk-modal-header">
  5 + <h2>实发调整</h2></div>
  6 + <form class="uk-form uk-form-horizontal">
  7 + </form>
  8 + </div>
  9 +
  10 + <script id="schedule-sftz-form-temp" type="text/html">
  11 + <input type="hidden" name="id" value="{{sch.id}}" />
  12 + <div class="uk-grid">
  13 + <div class="uk-width-1-1">
  14 + <div class="uk-form-row">
  15 + <label class="uk-form-label" >车辆</label>
  16 + <div class="uk-form-controls">
  17 + <input type="text" name="clZbh" value="{{sch.clZbh}}" readonly>
  18 + </div>
  19 + </div>
  20 + </div>
  21 + </div>
  22 + <div class="uk-grid">
  23 + <div class="uk-width-1-1">
  24 + <div class="uk-form-row">
  25 + <label class="uk-form-label" >路牌</label>
  26 + <div class="uk-form-controls">
  27 + <input type="text" value="{{sch.lpName}}" disabled>
  28 + </div>
  29 + </div>
  30 + </div>
  31 + </div>
  32 + <div class="uk-grid">
  33 + <div class="uk-width-1-1">
  34 + <div class="uk-form-row">
  35 + <label class="uk-form-label" >计发时刻</label>
  36 + <div class="uk-form-controls">
  37 + <input type="text" value="{{sch.fcsj}}" disabled>
  38 + </div>
  39 + </div>
  40 + </div>
  41 + </div>
  42 + <div class="uk-grid">
  43 + <div class="uk-width-1-1">
  44 + <div class="uk-form-row">
  45 + <label class="uk-form-label" >实发时刻</label>
  46 + <div class="uk-form-controls">
  47 + <input type="time" name="fcsjActual" value="{{sch.fcsjActual}}" required autofocus>
  48 + </div>
  49 + </div>
  50 + </div>
  51 + </div>
  52 + <div class="uk-grid">
  53 + <div class="uk-width-1-1">
  54 + <div class="uk-form-row">
  55 + <label class="uk-form-label" >调整说明</label>
  56 + <div class="uk-form-controls">
  57 + <select name="adjustExps">
  58 + <option value="">请选择..</option>
  59 + {{each adjustExps as exp i}}
  60 + <option value="{{exp}}">{{exp}}</option>
  61 + {{/each}}
  62 + </select>
  63 + </div>
  64 + </div>
  65 + </div>
  66 + </div>
  67 + <div class="uk-grid">
  68 + <div class="uk-width-1-1">
  69 + <div class="uk-form-row">
  70 + <label class="uk-form-label" >上报类型</label>
  71 + <div class="uk-form-controls report-type-checkbox-list">
  72 + {{each reportTypes as report i}}
  73 + <label>
  74 + <input class="i-cbox" name="reportTypes[]" value="{{report.code}}" type="checkbox" title="{{report.name}}">
  75 + {{report.name}}
  76 + </label>
  77 + {{/each}}
  78 + </div>
  79 + </div>
  80 + </div>
  81 + </div>
  82 + <div class="uk-grid">
  83 + <div class="uk-width-1-1">
  84 + <div class="uk-form-row ct-stacked">
  85 + <label class="uk-form-label" for="form-s-t">调整说明<small class="font-danger">(不超过20个字符)</small></label>
  86 + <div class="uk-form-controls">
  87 + <textarea id="form-s-t" cols="30" rows="5" name="remarks" required data-fv-stringlength="true" data-fv-stringlength-max="20" placeholder="不超过20个字符。必填">{{sch.remarks}}</textarea>
  88 + </div>
  89 + </div>
  90 + </div>
  91 + </div>
  92 +
  93 + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
  94 + <button type="button" class="uk-button uk-modal-close">取消</button>
  95 + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>
  96 + </div>
  97 + </script>
  98 +
  99 + <script>
  100 + (function() {
  101 + var modal = '#schedule-sftz-modal', sch, isReport = false;
  102 + var adjustExps = ['配车', '保养', '故障', '肇事', '路阻', '纠纷', '缺人', '客稀', '缺车', '气候', '援外', '吊慢', '抽减', '其他'];
  103 + var reportTypes = [{name:"无到", code:"9101"}, {name:"无出", code:"9109"}, {name:"掉线", code:"9102"}, {name:"指令故障", code:"9103"}, {name:"车辆漂移", code:"9104"}];
  104 + $(modal).on('init', function(e, data) {
  105 + e.stopPropagation();
  106 + sch = data.sch;
  107 + debugger;
  108 + var formHtml = template('schedule-sftz-form-temp', {sch: sch, adjustExps:adjustExps, reportTypes:reportTypes});
  109 + $('form', modal).html(formHtml);
  110 + $('input:checkbox').click(function(){
  111 + var remark = $('[name=remarks]').val(), title = $(this).prop("title");
  112 + if ($(this).prop('checked')) {
  113 + if (remark.indexOf(title + ";;") > -1) return;
  114 + $('[name=remarks]').val((remark ? remark + "," : "") + title + ";;");
  115 + } else {
  116 + $('[name=remarks]').val(remark.replace("," + title + ";;", "").replace(title + ";;", ""));
  117 + }
  118 + });
  119 +
  120 + //submit
  121 + var f = $('form', modal).formValidation(gb_form_validation_opts);
  122 + f.on('success.form.fv', function(e) {
  123 + e.preventDefault();
  124 + var data = $(this).serializeJSON(), reportText = new Array();
  125 +
  126 + if (data.reportTypes) {
  127 + for (var i = 0;i < data.reportTypes.length;i++) {
  128 + for (var j = 0;j < reportTypes.length;j++) {
  129 + if (data.reportTypes[i] == reportTypes[j].code) {
  130 + reportText.push(reportTypes[j].name);
  131 + break;
  132 + }
  133 + }
  134 + }
  135 + if (!isReport) {
  136 + layer.confirm('确定上报类型[' + reportText.join(';') + ']?', {
  137 + btn : [ '确定', '取消' ],
  138 + icon : 3,
  139 + skin : 'layui-layer-cfm-add'
  140 + }, function() {
  141 + layer.closeAll();
  142 + // 修改报修类型为字符串
  143 + data.reportTypes = data.reportTypes.join(";");
  144 + postData(data);
  145 + }, function() {
  146 + $('.uk-button-primary').attr('disabled', false);
  147 + });
  148 + return;
  149 + }
  150 +
  151 + data.reportTypes = data.reportTypes.join(";");
  152 + postData(data);
  153 + return;
  154 + }
  155 +
  156 + postData(data);
  157 + });
  158 +
  159 + var postData = function (data) {
  160 + gb_common.$post('/realSchedule/realOutAdjust', data, function(rs) {
  161 + if (rs.ts) {
  162 + //更新前端数据
  163 + gb_schedule_table.updateSchedule(rs.ts);
  164 + UIkit.modal(modal).hide();
  165 + notify_succ('实发调整成功!');
  166 +
  167 + if(data.fcsjActual)
  168 + gb_schedule_table.calc_yfwf_num(sch.xlBm);
  169 + }
  170 + });
  171 + }
  172 +
  173 + $('[name=adjustExps]', f).on('change', function(){
  174 + var rem=$('[name=remarks]', f);
  175 + rem.val((rem.val() ? rem.val() + ";" : "") + $(this).val()).trigger('input');
  176 + });
  177 +
  178 + // 维修类型选中
  179 + var initReport = function() {
  180 + var remark = $('[name=remarks]').val();
  181 + for (var i = 0;i < reportTypes.length;i++) {
  182 + if (remark.indexOf(reportTypes[i].name + ";;") > -1) {
  183 + $('input:checkbox[value=' + reportTypes[i].code + ']').prop('checked', true);
  184 + isReport = true;
  185 + }
  186 + }
  187 + }
  188 + initReport();
  189 + });
  190 + })();
  191 + </script>
  192 +</div>