Commit a062e7cf03a32f7900edb587ce3f9514b6447c95

Authored by 潘钊
2 parents 7d2f98d6 8f6ab784

update...

Showing 26 changed files with 1178 additions and 1068 deletions
src/main/java/com/bsth/controller/realcontrol/summary/TempSchSituationController.java
1 -package com.bsth.controller.realcontrol.summary;  
2 -  
3 -import com.bsth.controller.BaseController;  
4 -import com.bsth.data.summary.entity.TempSchSituation;  
5 -import com.bsth.data.summary.service.TempSchSituationService;  
6 -import org.springframework.beans.factory.annotation.Autowired;  
7 -import org.springframework.web.bind.annotation.RequestMapping;  
8 -import org.springframework.web.bind.annotation.RequestParam;  
9 -import org.springframework.web.bind.annotation.RestController;  
10 -  
11 -import javax.servlet.http.HttpServletRequest;  
12 -import javax.servlet.http.HttpServletResponse;  
13 -import java.util.Map;  
14 -  
15 -/**  
16 - * Created by panzhao on 2017/11/1.  
17 - */  
18 -@RestController  
19 -@RequestMapping("/summary/temp_sch")  
20 -public class TempSchSituationController extends BaseController<TempSchSituation, Long> {  
21 -  
22 - @Autowired  
23 - TempSchSituationService tempSchSituationService;  
24 -  
25 - @RequestMapping("excel")  
26 - public void excel(@RequestParam Map<String, Object> map, HttpServletRequest request, HttpServletResponse response) {  
27 - tempSchSituationService.excel(map, request, response);  
28 - }  
29 -} 1 +package com.bsth.controller.realcontrol.summary;
  2 +
  3 +import com.bsth.controller.BaseController;
  4 +import com.bsth.data.summary.entity.TempSchSituation;
  5 +import com.bsth.data.summary.service.TempSchSituationService;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.web.bind.annotation.RequestMapping;
  8 +import org.springframework.web.bind.annotation.RequestParam;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.servlet.http.HttpServletRequest;
  12 +import javax.servlet.http.HttpServletResponse;
  13 +import java.util.Map;
  14 +
  15 +/**
  16 + * Created by panzhao on 2017/11/1.
  17 + */
  18 +@RestController
  19 +@RequestMapping("/summary/temp_sch")
  20 +public class TempSchSituationController extends BaseController<TempSchSituation, Long> {
  21 +
  22 + @Autowired
  23 + TempSchSituationService tempSchSituationService;
  24 +
  25 + @RequestMapping("excel")
  26 + public void excel(@RequestParam Map<String, Object> map, HttpServletRequest request, HttpServletResponse response) {
  27 + tempSchSituationService.excel(map, request, response);
  28 + }
  29 +}
src/main/java/com/bsth/data/summary/entity/TempSchSituation.java
@@ -152,4 +152,4 @@ public class TempSchSituation { @@ -152,4 +152,4 @@ public class TempSchSituation {
152 public void setFgsBm(String fgsBm) { 152 public void setFgsBm(String fgsBm) {
153 this.fgsBm = fgsBm; 153 this.fgsBm = fgsBm;
154 } 154 }
155 -} 155 -}
  156 +}
156 \ No newline at end of file 157 \ No newline at end of file
src/main/java/com/bsth/data/summary/repository/TempSchSituationRepository.java
1 -package com.bsth.data.summary.repository;  
2 -  
3 -import com.bsth.data.summary.entity.TempSchSituation;  
4 -import com.bsth.repository.BaseRepository;  
5 -import org.springframework.stereotype.Repository;  
6 -  
7 -/**  
8 - * Created by panzhao on 2017/11/1.  
9 - */  
10 -@Repository  
11 -public interface TempSchSituationRepository extends BaseRepository<TempSchSituation, Long> {  
12 -} 1 +package com.bsth.data.summary.repository;
  2 +
  3 +import com.bsth.data.summary.entity.TempSchSituation;
  4 +import com.bsth.repository.BaseRepository;
  5 +import org.springframework.stereotype.Repository;
  6 +
  7 +/**
  8 + * Created by panzhao on 2017/11/1.
  9 + */
  10 +@Repository
  11 +public interface TempSchSituationRepository extends BaseRepository<TempSchSituation, Long> {
  12 +}
src/main/java/com/bsth/data/summary/service/TempSchSituationService.java
1 -package com.bsth.data.summary.service;  
2 -  
3 -import com.bsth.data.summary.entity.TempSchSituation;  
4 -import com.bsth.service.BaseService;  
5 -  
6 -import javax.servlet.http.HttpServletRequest;  
7 -import javax.servlet.http.HttpServletResponse;  
8 -import java.util.Map;  
9 -  
10 -/**  
11 - * Created by panzhao on 2017/11/1.  
12 - */  
13 -public interface TempSchSituationService extends BaseService<TempSchSituation, Long> {  
14 - void excel(Map<String, Object> map, HttpServletRequest request, HttpServletResponse response); 1 +package com.bsth.data.summary.service;
  2 +
  3 +import com.bsth.data.summary.entity.TempSchSituation;
  4 +import com.bsth.service.BaseService;
  5 +
  6 +import javax.servlet.http.HttpServletRequest;
  7 +import javax.servlet.http.HttpServletResponse;
  8 +import java.util.Map;
  9 +
  10 +/**
  11 + * Created by panzhao on 2017/11/1.
  12 + */
  13 +public interface TempSchSituationService extends BaseService<TempSchSituation, Long> {
  14 + void excel(Map<String, Object> map, HttpServletRequest request, HttpServletResponse response);
15 } 15 }
16 \ No newline at end of file 16 \ No newline at end of file
src/main/java/com/bsth/data/summary/service/impl/TempSchSituationServiceImpl.java
@@ -37,11 +37,11 @@ public class TempSchSituationServiceImpl extends BaseServiceImpl&lt;TempSchSituatio @@ -37,11 +37,11 @@ public class TempSchSituationServiceImpl extends BaseServiceImpl&lt;TempSchSituatio
37 @Override 37 @Override
38 public int compare(TempSchSituation o1, TempSchSituation o2) { 38 public int compare(TempSchSituation o1, TempSchSituation o2) {
39 int i = o1.getRq().compareTo(o2.getRq()); 39 int i = o1.getRq().compareTo(o2.getRq());
40 - if(i != 0) 40 + if (i != 0)
41 return i; 41 return i;
42 42
43 i = o1.getLineName().compareTo(o2.getLineName()); 43 i = o1.getLineName().compareTo(o2.getLineName());
44 - if(i != 0) 44 + if (i != 0)
45 return i; 45 return i;
46 46
47 i = (int) (o1.getT() - o2.getT()); 47 i = (int) (o1.getT() - o2.getT());
@@ -59,10 +59,10 @@ public class TempSchSituationServiceImpl extends BaseServiceImpl&lt;TempSchSituatio @@ -59,10 +59,10 @@ public class TempSchSituationServiceImpl extends BaseServiceImpl&lt;TempSchSituatio
59 59
60 List<TempSchSituation> list = (List<TempSchSituation>) super.list(map); 60 List<TempSchSituation> list = (List<TempSchSituation>) super.list(map);
61 61
62 - if(list.size() == 0){ 62 + if (list.size() == 0) {
63 response.setHeader("Content-type", "text/html;charset=UTF-8"); 63 response.setHeader("Content-type", "text/html;charset=UTF-8");
64 response.getWriter().print("<span style='color:red;font-size:24px;'>根据查询条件没有搜索到数据,别导了!</span>"); 64 response.getWriter().print("<span style='color:red;font-size:24px;'>根据查询条件没有搜索到数据,别导了!</span>");
65 - return ; 65 + return;
66 } 66 }
67 67
68 //排序 68 //排序
@@ -70,11 +70,11 @@ public class TempSchSituationServiceImpl extends BaseServiceImpl&lt;TempSchSituatio @@ -70,11 +70,11 @@ public class TempSchSituationServiceImpl extends BaseServiceImpl&lt;TempSchSituatio
70 @Override 70 @Override
71 public int compare(TempSchSituation o1, TempSchSituation o2) { 71 public int compare(TempSchSituation o1, TempSchSituation o2) {
72 int i = o1.getRq().compareTo(o2.getRq()); 72 int i = o1.getRq().compareTo(o2.getRq());
73 - if(i != 0) 73 + if (i != 0)
74 return i; 74 return i;
75 75
76 i = o1.getLineName().compareTo(o2.getLineName()); 76 i = o1.getLineName().compareTo(o2.getLineName());
77 - if(i != 0) 77 + if (i != 0)
78 return i; 78 return i;
79 79
80 i = (int) (o1.getT() - o2.getT()); 80 i = (int) (o1.getT() - o2.getT());
@@ -93,7 +93,7 @@ public class TempSchSituationServiceImpl extends BaseServiceImpl&lt;TempSchSituatio @@ -93,7 +93,7 @@ public class TempSchSituationServiceImpl extends BaseServiceImpl&lt;TempSchSituatio
93 Row row; 93 Row row;
94 TempSchSituation tss; 94 TempSchSituation tss;
95 SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); 95 SimpleDateFormat sdf = new SimpleDateFormat("HH:mm");
96 - for(int i = 0; i < list.size(); i++){ 96 + for (int i = 0; i < list.size(); i++) {
97 tss = list.get(i); 97 tss = list.get(i);
98 row = sheet.createRow(i + 1); 98 row = sheet.createRow(i + 1);
99 row.createCell(0).setCellValue(tss.getRq()); 99 row.createCell(0).setCellValue(tss.getRq());
@@ -122,5 +122,4 @@ public class TempSchSituationServiceImpl extends BaseServiceImpl&lt;TempSchSituatio @@ -122,5 +122,4 @@ public class TempSchSituationServiceImpl extends BaseServiceImpl&lt;TempSchSituatio
122 logger.error("", e); 122 logger.error("", e);
123 } 123 }
124 } 124 }
125 -  
126 } 125 }
127 \ No newline at end of file 126 \ No newline at end of file
src/main/java/com/bsth/service/gps/entity/DeviceChange.java
1 -package com.bsth.service.gps.entity;  
2 -  
3 -/**  
4 - * 车辆设备变更记录  
5 - * Created by panzhao on 2018/1/16.  
6 - */  
7 -public class DeviceChange {  
8 -  
9 - private String nbbm;  
10 - private String device;  
11 - private long st;  
12 - private long et;  
13 -  
14 - public String getNbbm() {  
15 - return nbbm;  
16 - }  
17 -  
18 - public void setNbbm(String nbbm) {  
19 - this.nbbm = nbbm;  
20 - }  
21 -  
22 - public String getDevice() {  
23 - return device;  
24 - }  
25 -  
26 - public void setDevice(String device) {  
27 - this.device = device;  
28 - }  
29 -  
30 - public long getSt() {  
31 - return st;  
32 - }  
33 -  
34 - public void setSt(long st) {  
35 - this.st = st;  
36 - }  
37 -  
38 - public long getEt() {  
39 - return et;  
40 - }  
41 -  
42 - public void setEt(long et) {  
43 - this.et = et;  
44 - }  
45 -} 1 +package com.bsth.service.gps.entity;
  2 +
  3 +/**
  4 + * 车辆设备变更记录
  5 + * Created by panzhao on 2018/1/16.
  6 + */
  7 +public class DeviceChange {
  8 +
  9 + private String nbbm;
  10 + private String device;
  11 + private long st;
  12 + private long et;
  13 +
  14 + public String getNbbm() {
  15 + return nbbm;
  16 + }
  17 +
  18 + public void setNbbm(String nbbm) {
  19 + this.nbbm = nbbm;
  20 + }
  21 +
  22 + public String getDevice() {
  23 + return device;
  24 + }
  25 +
  26 + public void setDevice(String device) {
  27 + this.device = device;
  28 + }
  29 +
  30 + public long getSt() {
  31 + return st;
  32 + }
  33 +
  34 + public void setSt(long st) {
  35 + this.st = st;
  36 + }
  37 +
  38 + public long getEt() {
  39 + return et;
  40 + }
  41 +
  42 + public void setEt(long et) {
  43 + this.et = et;
  44 + }
  45 +}
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
@@ -1843,7 +1843,16 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1843,7 +1843,16 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1843 } 1843 }
1844 } 1844 }
1845 1845
1846 - sjlc = new BigDecimal(culateService.culateSjgl(keyMap.get(key)) + culateService.culateLjgl(keyMap.get(key))); 1846 + List<ScheduleRealInfo> tempList = new ArrayList<ScheduleRealInfo>();
  1847 + for(ScheduleRealInfo s : keyMap.get(key)){
  1848 + if(s.getcTasks() != null && s.getcTasks().size() > 0){
  1849 + tempList.add(s);
  1850 + } else if(s.getZdsjActual() != null && s.getFcsjActual() != null){
  1851 + tempList.add(s);
  1852 + }
  1853 + }
  1854 +
  1855 + sjlc = new BigDecimal(culateService.culateSjgl(tempList) + culateService.culateLjgl(tempList));
1847 lzlc = new BigDecimal(culateService.culateCJLC(keyMap.get(key), "路阻")); 1856 lzlc = new BigDecimal(culateService.culateCJLC(keyMap.get(key), "路阻"));
1848 dmlc = new BigDecimal(culateService.culateCJLC(keyMap.get(key), "吊慢")); 1857 dmlc = new BigDecimal(culateService.culateCJLC(keyMap.get(key), "吊慢"));
1849 gzlc = new BigDecimal(culateService.culateCJLC(keyMap.get(key), "故障")); 1858 gzlc = new BigDecimal(culateService.culateCJLC(keyMap.get(key), "故障"));
@@ -2421,13 +2430,13 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2421,13 +2430,13 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2421 } 2430 }
2422 2431
2423 for(Ylb ylb : queryYlbByRqXlbm){ 2432 for(Ylb ylb : queryYlbByRqXlbm){
2424 - String key = sdfMonth.format(ylb.getRq()) + ylb.getXlbm(); 2433 + String key = ylb.getJsy() + ylb.getNbbm();
2425 if(!ylbMap.containsKey(key)) 2434 if(!ylbMap.containsKey(key))
2426 ylbMap.put(key, new ArrayList<Ylb>()); 2435 ylbMap.put(key, new ArrayList<Ylb>());
2427 ylbMap.get(key).add(ylb); 2436 ylbMap.get(key).add(ylb);
2428 } 2437 }
2429 for(Dlb dlb : queryDlbByRqXlbm){ 2438 for(Dlb dlb : queryDlbByRqXlbm){
2430 - String key = sdfMonth.format(dlb.getRq()) + dlb.getXlbm(); 2439 + String key = dlb.getJsy() + dlb.getNbbm();
2431 if(!dlbMap.containsKey(key)) 2440 if(!dlbMap.containsKey(key))
2432 dlbMap.put(key, new ArrayList<Dlb>()); 2441 dlbMap.put(key, new ArrayList<Dlb>());
2433 dlbMap.get(key).add(dlb); 2442 dlbMap.get(key).add(dlb);
@@ -2480,8 +2489,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2480,8 +2489,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2480 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); 2489 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
2481 // ScheduleRealInfo s = scheduleRealInfoRepository.scheduleById(scheduleRealInfos.get(0).getId()); 2490 // ScheduleRealInfo s = scheduleRealInfoRepository.scheduleById(scheduleRealInfos.get(0).getId());
2482 ScheduleRealInfo s = scheduleRealInfos.get(0); 2491 ScheduleRealInfo s = scheduleRealInfos.get(0);
2483 - String xlbm = s.getXlBm();  
2484 String fcrq = s.getScheduleDateStr(); 2492 String fcrq = s.getScheduleDateStr();
  2493 + String jsy = s.getjGh();
  2494 + String nbbm = s.getClZbh();
2485 2495
2486 int type = 0; 2496 int type = 0;
2487 Double ccyl = 0.0; 2497 Double ccyl = 0.0;
@@ -2491,8 +2501,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2491,8 +2501,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2491 Double zlc = 0.0; 2501 Double zlc = 0.0;
2492 // List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh(),xlbm); 2502 // List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh(),xlbm);
2493 // List<Dlb> listDlb = dlbRepository.queryListDlb(fcrq, s.getClZbh(), s.getjGh(),xlbm); 2503 // List<Dlb> listDlb = dlbRepository.queryListDlb(fcrq, s.getClZbh(), s.getjGh(),xlbm);
2494 - List<Ylb> listYlb = ylbMap.get(fcrq + xlbm);  
2495 - List<Dlb> listDlb = dlbMap.get(fcrq + xlbm); 2504 + List<Ylb> listYlb = ylbMap.get(jsy + nbbm);
  2505 + List<Dlb> listDlb = dlbMap.get(jsy + nbbm);
2496 2506
2497 // List<Cars> listCars = carsRepository.findCarsByCode(s.getClZbh()); 2507 // List<Cars> listCars = carsRepository.findCarsByCode(s.getClZbh());
2498 List<Cars> listCars = carMap.get(s.getClZbh()); 2508 List<Cars> listCars = carMap.get(s.getClZbh());
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
@@ -2888,7 +2888,7 @@ public class ReportServiceImpl implements ReportService{ @@ -2888,7 +2888,7 @@ public class ReportServiceImpl implements ReportService{
2888 } 2888 }
2889 }); 2889 });
2890 }else{ 2890 }else{
2891 - sql+="select r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh" 2891 + sql+="select r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh,r.j_name,r.s_name"
2892 + " from bsth_c_s_sp_info_real r where" 2892 + " from bsth_c_s_sp_info_real r where"
2893 + " r.schedule_date_str BETWEEN '"+date+"' and '"+date2+"'"; 2893 + " r.schedule_date_str BETWEEN '"+date+"' and '"+date2+"'";
2894 if(line.equals("")){ 2894 if(line.equals("")){
@@ -2897,7 +2897,7 @@ public class ReportServiceImpl implements ReportService{ @@ -2897,7 +2897,7 @@ public class ReportServiceImpl implements ReportService{
2897 }else{ 2897 }else{
2898 sql += " and r.xl_bm = '"+line+"'"; 2898 sql += " and r.xl_bm = '"+line+"'";
2899 } 2899 }
2900 - sql += " group by r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh"; 2900 + sql += " group by r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh,r.j_name,r.s_name";
2901 listGroupBy=jdbcTemplate.query(sql, new RowMapper<Map<String, Object>>() { 2901 listGroupBy=jdbcTemplate.query(sql, new RowMapper<Map<String, Object>>() {
2902 @Override 2902 @Override
2903 public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException { 2903 public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException {
@@ -2906,6 +2906,8 @@ public class ReportServiceImpl implements ReportService{ @@ -2906,6 +2906,8 @@ public class ReportServiceImpl implements ReportService{
2906 map.put("nbbm", arg0.getString("cl_zbh")); 2906 map.put("nbbm", arg0.getString("cl_zbh"));
2907 map.put("jGh", arg0.getString("j_gh")); 2907 map.put("jGh", arg0.getString("j_gh"));
2908 map.put("sGh", arg0.getString("s_gh")); 2908 map.put("sGh", arg0.getString("s_gh"));
  2909 + map.put("jName", arg0.getString("j_name"));
  2910 + map.put("sName", arg0.getString("s_name"));
2909 return map; 2911 return map;
2910 } 2912 }
2911 }); 2913 });
@@ -3014,7 +3016,7 @@ public class ReportServiceImpl implements ReportService{ @@ -3014,7 +3016,7 @@ public class ReportServiceImpl implements ReportService{
3014 3016
3015 } 3017 }
3016 if(!zt.equals("zbh")){ 3018 if(!zt.equals("zbh")){
3017 - String sqls="select r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh" 3019 + String sqls="select r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh,r.s_name,r.j_name"
3018 + " from bsth_c_s_sp_info_real r where" 3020 + " from bsth_c_s_sp_info_real r where"
3019 + " r.schedule_date_str BETWEEN '"+date+"' and '"+date2+"'"; 3021 + " r.schedule_date_str BETWEEN '"+date+"' and '"+date2+"'";
3020 if(line.equals("")){ 3022 if(line.equals("")){
@@ -3023,7 +3025,7 @@ public class ReportServiceImpl implements ReportService{ @@ -3023,7 +3025,7 @@ public class ReportServiceImpl implements ReportService{
3023 }else{ 3025 }else{
3024 sqls += " and r.xl_bm = '"+line+"'"; 3026 sqls += " and r.xl_bm = '"+line+"'";
3025 } 3027 }
3026 - sqls += " group by r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh"; 3028 + sqls += " group by r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh,r.s_name,r.j_name";
3027 3029
3028 List<Map<String, Object>> listGroupBys=jdbcTemplate.query(sqls, new RowMapper<Map<String, Object>>() { 3030 List<Map<String, Object>> listGroupBys=jdbcTemplate.query(sqls, new RowMapper<Map<String, Object>>() {
3029 @Override 3031 @Override
@@ -3033,6 +3035,8 @@ public class ReportServiceImpl implements ReportService{ @@ -3033,6 +3035,8 @@ public class ReportServiceImpl implements ReportService{
3033 map.put("nbbm", arg0.getString("cl_zbh")); 3035 map.put("nbbm", arg0.getString("cl_zbh"));
3034 map.put("jGh", arg0.getString("j_gh")); 3036 map.put("jGh", arg0.getString("j_gh"));
3035 map.put("sGh", arg0.getString("s_gh")); 3037 map.put("sGh", arg0.getString("s_gh"));
  3038 + map.put("jName", arg0.getString("j_name"));
  3039 + map.put("sName", arg0.getString("s_name"));
3036 return map; 3040 return map;
3037 } 3041 }
3038 }); 3042 });
@@ -3125,7 +3129,9 @@ public class ReportServiceImpl implements ReportService{ @@ -3125,7 +3129,9 @@ public class ReportServiceImpl implements ReportService{
3125 String xl_bm=m.get("line")==null?"":m.get("line").toString(); 3129 String xl_bm=m.get("line")==null?"":m.get("line").toString();
3126 String nbbm =m.get("nbbm")==null?"":m.get("nbbm").toString(); 3130 String nbbm =m.get("nbbm")==null?"":m.get("nbbm").toString();
3127 String jGh= m.get("jGh")==null?"":m.get("jGh").toString(); 3131 String jGh= m.get("jGh")==null?"":m.get("jGh").toString();
  3132 + String jName=m.get("jName")==null?"":m.get("jName").toString();
3128 String sGh= m.get("sGh")==null?"":m.get("sGh").toString(); 3133 String sGh= m.get("sGh")==null?"":m.get("sGh").toString();
  3134 + String sName=m.get("sName")==null?"":m.get("sName").toString();
3129 double jhzlc = 0.0,jhlc= 0.0,jcclc= 0.0,zlc= 0.0,jhnlc= 0.0,jhwlc= 0.0, 3135 double jhzlc = 0.0,jhlc= 0.0,jcclc= 0.0,zlc= 0.0,jhnlc= 0.0,jhwlc= 0.0,
3130 jhnjcclc= 0.0,jhwjcclc= 0.0,jhwjcclc_z=0.0,zrwjcclc= 0.0,zrwjcclc1= 0.0,zrwjcclc2= 0.0, 3136 jhnjcclc= 0.0,jhwjcclc= 0.0,jhwjcclc_z=0.0,zrwjcclc= 0.0,zrwjcclc1= 0.0,zrwjcclc2= 0.0,
3131 zrwjcclcqt=0.0,lbss= 0.0,ssgl_lz= 0.0, 3137 zrwjcclcqt=0.0,lbss= 0.0,ssgl_lz= 0.0,
@@ -3186,9 +3192,9 @@ public class ReportServiceImpl implements ReportService{ @@ -3186,9 +3192,9 @@ public class ReportServiceImpl implements ReportService{
3186 newMap.put("fgs", BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm)); 3192 newMap.put("fgs", BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm));
3187 newMap.put("xlName", BasicData.lineCode2NameMap.get(xl_bm)); 3193 newMap.put("xlName", BasicData.lineCode2NameMap.get(xl_bm));
3188 newMap.put("jGh", jGh); 3194 newMap.put("jGh", jGh);
3189 - newMap.put("jName", jGh); 3195 + newMap.put("jName", jName);
3190 newMap.put("sGh",sGh); 3196 newMap.put("sGh",sGh);
3191 - newMap.put("sName", sGh); 3197 + newMap.put("sName", sName);
3192 newMap.put("nbbm", nbbm); 3198 newMap.put("nbbm", nbbm);
3193 newMap.put("jhzlc", jhzlc); 3199 newMap.put("jhzlc", jhzlc);
3194 newMap.put("jhlc", jhlc); 3200 newMap.put("jhlc", jhlc);
src/main/resources/static/pages/forms/mould/countByBus1.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/countByBus1s.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/countByBus2.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/vehicleloading.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/waybill_minhang.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/waybill_minhang_dl.xls
No preview for this file type
src/main/resources/static/pages/mforms/singledatas/jquery.table2excel.min.js
@@ -6,4 +6,4 @@ @@ -6,4 +6,4 @@
6 * Made by rainabba 6 * Made by rainabba
7 * Under MIT License 7 * Under MIT License
8 */ 8 */
9 -!function(a,b,c,d){function e(b,c){this.element=b,this.settings=a.extend({},k,c),this._defaults=k,this._name=j,this.init()}function f(a){return a.filename?a.filename:"table2excel"}function g(a){var b=/(\s+alt\s*=\s*"([^"]*)"|\s+alt\s*=\s*'([^']*)')/i;return a.replace(/<img[^>]*>/gi,function(a){var c=b.exec(a);return null!==c&&c.length>=2?c[2]:""})}function h(a){return a.replace(/<a[^>]*>|<\/a>/gi,"")}function i(a){var b=/(\s+value\s*=\s*"([^"]*)"|\s+value\s*=\s*'([^']*)')/i;return a.replace(/<input[^>]*>|<\/input>/gi,function(a){var c=b.exec(a);return null!==c&&c.length>=2?c[2]:""})}var j="table2excel",k={exclude:".noExl",name:"Table2Excel",filename:"table2excel",fileext:".xls",exclude_img:!0,exclude_links:!0,exclude_inputs:!0};e.prototype={init:function(){var b=this;b.template={head:'<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8"><head>\x3c!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets>',sheet:{head:"<x:ExcelWorksheet><x:Name>",tail:"</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>"},mid:"</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--\x3e</head><body>",table:{head:"<table>",tail:"</table>"},foot:"</body></html>"},b.tableRows=[],a(b.element).each(function(c,d){var e="";a(d).find("tr").not(b.settings.exclude).each(function(c,d){e+="<tr>",a(d).find("td,th").not(b.settings.exclude).each(function(c,d){var f={rows:a(this).attr("rowspan"),cols:a(this).attr("colspan"),flag:a(d).find(b.settings.exclude)};f.flag.length>0?e+="<td> </td>":f.rows&f.cols?e+="<td>"+a(d).html()+"</td>":(e+="<td",f.rows>0&&(e+=" rowspan='"+f.rows+"' "),f.cols>0&&(e+=" colspan='"+f.cols+"' "),e+="/>"+a(d).html()+"</td>")}),e+="</tr>",console.log(e)}),b.settings.exclude_img&&(e=g(e)),b.settings.exclude_links&&(e=h(e)),b.settings.exclude_inputs&&(e=i(e)),b.tableRows.push(e)}),b.tableToExcel(b.tableRows,b.settings.name,b.settings.sheetName)},tableToExcel:function(d,e,g){var h,i,j,k=this,l="";if(k.format=function(a,b){return a.replace(/{(\w+)}/g,function(a,c){return b[c]})},g=void 0===g?"Sheet":g,k.ctx={worksheet:e||"Worksheet",table:d,sheetName:g},l=k.template.head,a.isArray(d))for(h in d)l+=k.template.sheet.head+g+h+k.template.sheet.tail;if(l+=k.template.mid,a.isArray(d))for(h in d)l+=k.template.table.head+"{table"+h+"}"+k.template.table.tail;l+=k.template.foot;for(h in d)k.ctx["table"+h]=d[h];if(delete k.ctx.table,!c.documentMode){var m=new Blob([k.format(l,k.ctx)],{type:"application/vnd.ms-excel"});b.URL=b.URL||b.webkitURL,i=b.URL.createObjectURL(m),j=c.createElement("a"),j.download=f(k.settings),j.href=i,c.body.appendChild(j),j.click(),c.body.removeChild(j)}else if("undefined"!=typeof Blob){l=k.format(l,k.ctx),l=[l];var n=new Blob(l,{type:"text/html"});b.navigator.msSaveBlob(n,f(k.settings))}else txtArea1.document.open("text/html","replace"),txtArea1.document.write(k.format(l,k.ctx)),txtArea1.document.close(),txtArea1.focus(),sa=txtArea1.document.execCommand("SaveAs",!0,f(k.settings));return!0}},a.fn[j]=function(b){var c=this;return c.each(function(){a.data(c,"plugin_"+j)||a.data(c,"plugin_"+j,new e(this,b))}),c}}(jQuery,window,document);  
10 \ No newline at end of file 9 \ No newline at end of file
  10 +!function(a,b,c,d){function e(b,c){this.element=b,this.settings=a.extend({},k,c),this._defaults=k,this._name=j,this.init()}function f(a){return a.filename?a.filename:"table2excel"}function g(a){var b=/(\s+alt\s*=\s*"([^"]*)"|\s+alt\s*=\s*'([^']*)')/i;return a.replace(/<img[^>]*>/gi,function(a){var c=b.exec(a);return null!==c&&c.length>=2?c[2]:""})}function h(a){return a.replace(/<a[^>]*>|<\/a>/gi,"")}function i(a){var b=/(\s+value\s*=\s*"([^"]*)"|\s+value\s*=\s*'([^']*)')/i;return a.replace(/<input[^>]*>|<\/input>/gi,function(a){var c=b.exec(a);return null!==c&&c.length>=2?c[2]:""})}var j="table2excel",k={exclude:".noExl",name:"Table2Excel",filename:"table2excel",fileext:".xls",exclude_img:!0,exclude_links:!0,exclude_inputs:!0};e.prototype={init:function(){var b=this;b.template={head:'<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8"><head>\x3c!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets>',sheet:{head:"<x:ExcelWorksheet><x:Name>",tail:"</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>"},mid:"</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--\x3e</head><body>",table:{head:"<table>",tail:"</table>"},foot:"</body></html>"},b.tableRows=[],a(b.element).each(function(c,d){var e="";a(d).find("tr").not(b.settings.exclude).each(function(c,d){e+="<tr>",a(d).find("td,th").not(b.settings.exclude).each(function(c,d){var f={rows:a(this).attr("rowspan"),cols:a(this).attr("colspan"),flag:a(d).find(b.settings.exclude)};f.flag.length>0?e+="<td> </td>":f.rows&f.cols?e+="<td>"+a(d).html()+"</td>":(e+="<td",f.rows>0&&(e+=" rowspan='"+f.rows+"' "),f.cols>0&&(e+=" colspan='"+f.cols+"' "),e+="/>"+a(d).html()+"</td>")}),e+="</tr>"}),b.settings.exclude_img&&(e=g(e)),b.settings.exclude_links&&(e=h(e)),b.settings.exclude_inputs&&(e=i(e)),b.tableRows.push(e)}),b.tableToExcel(b.tableRows,b.settings.name,b.settings.sheetName)},tableToExcel:function(d,e,g){var h,i,j,k=this,l="";if(k.format=function(a,b){return a.replace(/{(\w+)}/g,function(a,c){return b[c]})},g=void 0===g?"Sheet":g,k.ctx={worksheet:e||"Worksheet",table:d,sheetName:g},l=k.template.head,a.isArray(d))for(h in d)l+=k.template.sheet.head+g+h+k.template.sheet.tail;if(l+=k.template.mid,a.isArray(d))for(h in d)l+=k.template.table.head+"{table"+h+"}"+k.template.table.tail;l+=k.template.foot;for(h in d)k.ctx["table"+h]=d[h];if(delete k.ctx.table,!c.documentMode){var m=new Blob([k.format(l,k.ctx)],{type:"application/vnd.ms-excel"});b.URL=b.URL||b.webkitURL,i=b.URL.createObjectURL(m),j=c.createElement("a"),j.download=f(k.settings),j.href=i,c.body.appendChild(j),j.click(),c.body.removeChild(j)}else if("undefined"!=typeof Blob){l=k.format(l,k.ctx),l=[l];var n=new Blob(l,{type:"text/html"});b.navigator.msSaveBlob(n,f(k.settings))}else txtArea1.document.open("text/html","replace"),txtArea1.document.write(k.format(l,k.ctx)),txtArea1.document.close(),txtArea1.focus(),sa=txtArea1.document.execCommand("SaveAs",!0,f(k.settings));return!0}},a.fn[j]=function(b){var c=this;return c.each(function(){a.data(c,"plugin_"+j)||a.data(c,"plugin_"+j,new e(this,b))}),c}}(jQuery,window,document);
11 \ No newline at end of file 11 \ No newline at end of file
src/main/resources/static/pages/oil/list_ph.html
@@ -756,6 +756,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep @@ -756,6 +756,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
756 $('.in_carpark_yh[data-id='+id+']', '#ll_oil_list').val(subValue); 756 $('.in_carpark_yh[data-id='+id+']', '#ll_oil_list').val(subValue);
757 757
758 }); 758 });
  759 + $('#datatable_ylb_body_div').animate({scrollTop: '0px'}, 800);
759 }); 760 });
760 } 761 }
761 762
src/main/resources/static/pages/report/countMileage/countBus/company/countBusMileage.html
@@ -229,12 +229,12 @@ @@ -229,12 +229,12 @@
229 params['xlName'] = xlName; 229 params['xlName'] = xlName;
230 params['zt']=zt; 230 params['zt']=zt;
231 params['type'] = "query"; 231 params['type'] = "query";
232 - var tbodyHtml = template('countBusDaily',{list:""}); 232 + var tbodyHtml = template('countBusDailyGs',{list:""});
233 var i = layer.load(2); 233 var i = layer.load(2);
234 $get('/report/countBusMileage',params,function(result){ 234 $get('/report/countBusMileage',params,function(result){
235 layer.close(i); 235 layer.close(i);
236 // 把数据填充到模版中 236 // 把数据填充到模版中
237 - var tbodyHtml = template('countBusDaily',{list:result,zt:zt}); 237 + var tbodyHtml = template('countBusDailyGs',{list:result,zt:zt});
238 // 把渲染好的模版html文本追加到表格中 238 // 把渲染好的模版html文本追加到表格中
239 $('#forms').html(tbodyHtml); 239 $('#forms').html(tbodyHtml);
240 240
@@ -265,7 +265,7 @@ @@ -265,7 +265,7 @@
265 265
266 }); 266 });
267 </script> 267 </script>
268 -<script type="text/html" id="countBusDaily"> 268 +<script type="text/html" id="countBusDailyGs">
269 <thead> 269 <thead>
270 <tr> 270 <tr>
271 <th colspan="31">路单数据统计表</th> 271 <th colspan="31">路单数据统计表</th>
src/main/resources/static/pages/report/countMileage/countBus/countBusMileage.html
@@ -229,12 +229,12 @@ @@ -229,12 +229,12 @@
229 params['xlName'] = xlName; 229 params['xlName'] = xlName;
230 params['zt']=zt; 230 params['zt']=zt;
231 params['type'] = "query"; 231 params['type'] = "query";
232 - var tbodyHtml = template('countBusDaily',{list:""}); 232 + var tbodyHtml = template('countBusDailySj',{list:""});
233 var i = layer.load(2); 233 var i = layer.load(2);
234 $get('/report/countBusMileage',params,function(result){ 234 $get('/report/countBusMileage',params,function(result){
235 layer.close(i); 235 layer.close(i);
236 // 把数据填充到模版中 236 // 把数据填充到模版中
237 - var tbodyHtml = template('countBusDaily',{list:result,zt:zt}); 237 + var tbodyHtml = template('countBusDailySj',{list:result,zt:zt});
238 // 把渲染好的模版html文本追加到表格中 238 // 把渲染好的模版html文本追加到表格中
239 $('#forms').html(tbodyHtml); 239 $('#forms').html(tbodyHtml);
240 240
@@ -265,7 +265,7 @@ @@ -265,7 +265,7 @@
265 265
266 }); 266 });
267 </script> 267 </script>
268 -<script type="text/html" id="countBusDaily"> 268 +<script type="text/html" id="countBusDailySj">
269 <thead> 269 <thead>
270 <tr> 270 <tr>
271 <th colspan="31">路单数据统计表</th> 271 <th colspan="31">路单数据统计表</th>
src/main/resources/static/pages/report/countMileage/countLine/company/countLineMileage.html
@@ -268,7 +268,7 @@ @@ -268,7 +268,7 @@
268 layer.close(i); 268 layer.close(i);
269 $("#datetodate").html(date+"至"+date2); 269 $("#datetodate").html(date+"至"+date2);
270 // 把数据填充到模版中 270 // 把数据填充到模版中
271 - var tbodyHtml = template('countLineList',{list:result}); 271 + var tbodyHtml = template('countLineListGs',{list:result});
272 // 把渲染好的模版html文本追加到表格中 272 // 把渲染好的模版html文本追加到表格中
273 $('#forms .countLineNb').html(tbodyHtml); 273 $('#forms .countLineNb').html(tbodyHtml);
274 274
@@ -297,7 +297,7 @@ @@ -297,7 +297,7 @@
297 }); 297 });
298 }); 298 });
299 </script> 299 </script>
300 -<script type="text/html" id="countLineList"> 300 +<script type="text/html" id="countLineListGs">
301 {{each list as obj i}} 301 {{each list as obj i}}
302 <tr> 302 <tr>
303 <td>{{obj.gs}}</td> 303 <td>{{obj.gs}}</td>
src/main/resources/static/pages/report/countMileage/countLine/countLineMileage.html
@@ -267,7 +267,7 @@ @@ -267,7 +267,7 @@
267 $("#datetodate").html(date+"至"+date2); 267 $("#datetodate").html(date+"至"+date2);
268 layer.close(i); 268 layer.close(i);
269 // 把数据填充到模版中 269 // 把数据填充到模版中
270 - var tbodyHtml = template('countLineList',{list:result}); 270 + var tbodyHtml = template('countLineListSj',{list:result});
271 // 把渲染好的模版html文本追加到表格中 271 // 把渲染好的模版html文本追加到表格中
272 $('#forms .countLineSj').html(tbodyHtml); 272 $('#forms .countLineSj').html(tbodyHtml);
273 273
@@ -296,7 +296,7 @@ @@ -296,7 +296,7 @@
296 }); 296 });
297 }); 297 });
298 </script> 298 </script>
299 -<script type="text/html" id="countLineList"> 299 +<script type="text/html" id="countLineListSj">
300 {{each list as obj i}} 300 {{each list as obj i}}
301 <tr> 301 <tr>
302 <td>{{obj.gs}}</td> 302 <td>{{obj.gs}}</td>
src/main/resources/static/pages/report/sheet/sheetList.html
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
52 52
53 <div class="form-group"> 53 <div class="form-group">
54 <input class="btn btn-default" type="button" id="query" value="查询"/> 54 <input class="btn btn-default" type="button" id="query" value="查询"/>
55 -<!-- <input class="btn btn-default" type="button" id="export" value="导出"/> --> 55 + <input class="btn btn-default" type="button" id="export" value="导出"/>
56 </div> 56 </div>
57 </form> 57 </form>
58 </div> 58 </div>
@@ -75,9 +75,27 @@ @@ -75,9 +75,27 @@
75 75
76 </tbody> 76 </tbody>
77 </table> 77 </table>
  78 +
  79 + <table class="hidden" id="forms_h">
  80 + <thead>
  81 + <tr>
  82 + <td>公司</td>
  83 + <td>分公司</td>
  84 + <td>线路</td>
  85 + <td>班次数</td>
  86 + <td>准点班次数</td>
  87 + <td>准点率</td>
  88 + </tr>
  89 + </thead>
  90 +
  91 + <tbody>
  92 +
  93 + </tbody>
  94 + </table>
78 </div> 95 </div>
79 96
80 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> 97 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  98 + <input class="btn btn-default hidden" type="button" id="export_1" value="导出"/>
81 <table class="table table-bordered table-hover table-checkable" id="forms_1"> 99 <table class="table table-bordered table-hover table-checkable" id="forms_1">
82 <thead> 100 <thead>
83 <tr class="hidden"> 101 <tr class="hidden">
@@ -96,6 +114,23 @@ @@ -96,6 +114,23 @@
96 114
97 </tbody> 115 </tbody>
98 </table> 116 </table>
  117 + <table class="hidden" id="forms_1_h">
  118 + <thead>
  119 + <tr >
  120 + <td>公司</td>
  121 + <td>分公司</td>
  122 + <td>日期</td>
  123 + <td>线路</td>
  124 + <td>班次数</td>
  125 + <td>准点班次数</td>
  126 + <td>准点率</td>
  127 + </tr>
  128 + </thead>
  129 +
  130 + <tbody>
  131 +
  132 + </tbody>
  133 + </table>
99 </div> 134 </div>
100 </div> 135 </div>
101 </div> 136 </div>
@@ -218,10 +253,15 @@ @@ -218,10 +253,15 @@
218 var endDate = $("#endDate").val(); 253 var endDate = $("#endDate").val();
219 var fgs=$('#fgsdm').val(); 254 var fgs=$('#fgsdm').val();
220 var gs=$('#gsdm').val(); 255 var gs=$('#gsdm').val();
  256 + var i = layer.load(2);
221 $get('/sheet/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs},function(result){ 257 $get('/sheet/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs},function(result){
222 var sheetList = template('sheetList',{list:result}); 258 var sheetList = template('sheetList',{list:result});
  259 + var sheetList_h = template('sheetList_h',{list:result});
  260 +
223 $('#forms tbody').html(sheetList); 261 $('#forms tbody').html(sheetList);
  262 + $('#forms_h tbody').html(sheetList_h);
224 $('.btn-sheetList').on('click', showSheetList); 263 $('.btn-sheetList').on('click', showSheetList);
  264 + layer.close(i);
225 }); 265 });
226 // $post('/sheet/saveListSheet',function(result){ 266 // $post('/sheet/saveListSheet',function(result){
227 // }); 267 // });
@@ -232,12 +272,14 @@ @@ -232,12 +272,14 @@
232 var endDate = $("#endDate").val(); 272 var endDate = $("#endDate").val();
233 $get('/sheet/listSheet',{id:id,date:date,endDate:endDate},function(result){ 273 $get('/sheet/listSheet',{id:id,date:date,endDate:endDate},function(result){
234 var sheetList = template('sheetList_1',{list:result}); 274 var sheetList = template('sheetList_1',{list:result});
235 - 275 + var sheetList_h = template('sheetList_1_h',{list:result});
236 $('#forms_1 tbody').html(sheetList); 276 $('#forms_1 tbody').html(sheetList);
  277 + $('#forms_1_h tbody').html(sheetList_h);
  278 +
237 $('.btn-sheetList_1').on('click', openSheetList); 279 $('.btn-sheetList_1').on('click', openSheetList);
238 $("#forms_1 .hidden").removeClass("hidden"); 280 $("#forms_1 .hidden").removeClass("hidden");
239 $("html,body").animate({scrollTop:$("#forms_1").offset().top},1000); 281 $("html,body").animate({scrollTop:$("#forms_1").offset().top},1000);
240 - 282 + $("#export_1").removeClass("hidden");
241 }); 283 });
242 } 284 }
243 function openSheetList(){ 285 function openSheetList(){
@@ -259,7 +301,20 @@ @@ -259,7 +301,20 @@
259 $("#export").on("click",function(){ 301 $("#export").on("click",function(){
260 var date = $("#date").val(); 302 var date = $("#date").val();
261 var endDate = $("#endDate").val(); 303 var endDate = $("#endDate").val();
262 - $("#forms").table2excel({ 304 + $("#forms_h").table2excel({
  305 + // 不被导出的表格行的CSS class类
  306 + exclude: ".noExl",
  307 + // 导出的Excel文档的名称,(没看到作用)
  308 + name: "Excel Document Name.xlsx",
  309 + // Excel文件的名称
  310 + filename: date+"-"+endDate+"班次准点率"
  311 + });
  312 + })
  313 +
  314 + $("#export_1").on("click",function(){
  315 + var date = $("#date").val();
  316 + var endDate = $("#endDate").val();
  317 + $("#forms_1_h").table2excel({
263 // 不被导出的表格行的CSS class类 318 // 不被导出的表格行的CSS class类
264 exclude: ".noExl", 319 exclude: ".noExl",
265 // 导出的Excel文档的名称,(没看到作用) 320 // 导出的Excel文档的名称,(没看到作用)
@@ -293,6 +348,24 @@ @@ -293,6 +348,24 @@
293 {{/if}} 348 {{/if}}
294 </script> 349 </script>
295 350
  351 +<script type="text/html" id="sheetList_h">
  352 + {{each list as obj i}}
  353 + <tr>
  354 + <td>{{obj.gs}}</td>
  355 + <td>{{obj.fgs}}</td>
  356 + <td>{{obj.line}}</td>
  357 + <td>{{obj.bcs}}</td>
  358 + <td>{{obj.zdbcs}}</td>
  359 + <td>{{obj.zdlv}}</td>
  360 + </tr>
  361 + {{/each}}
  362 + {{if list.length == 0}}
  363 + <tr>
  364 + <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td>
  365 + </tr>
  366 + {{/if}}
  367 +</script>
  368 +
296 <script type="text/html" id="sheetList_1"> 369 <script type="text/html" id="sheetList_1">
297 {{each list as obj i}} 370 {{each list as obj i}}
298 <tr> 371 <tr>
@@ -314,4 +387,24 @@ @@ -314,4 +387,24 @@
314 <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> 387 <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td>
315 </tr> 388 </tr>
316 {{/if}} 389 {{/if}}
  390 +</script>
  391 +
  392 +
  393 +<script type="text/html" id="sheetList_1_h">
  394 + {{each list as obj i}}
  395 + <tr>
  396 + <td>{{obj.gs}}</td>
  397 + <td>{{obj.fgs}}</td>
  398 + <td>{{obj.date}}</td>
  399 + <td>{{obj.line}}</td>
  400 + <td>{{obj.bcs}}</td>
  401 + <td>{{obj.zdbcs}}</td>
  402 + <td>{{obj.zdlv}}</td>
  403 + </tr>
  404 + {{/each}}
  405 + {{if list.length == 0}}
  406 + <tr>
  407 + <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td>
  408 + </tr>
  409 + {{/if}}
317 </script> 410 </script>
318 \ No newline at end of file 411 \ No newline at end of file
src/main/resources/static/pages/summary/temp_sch_detail/d_s_d_wrap.html
1 -<!-- 临加明细统计 --> 1 +<!-- 临加明细统计 -->
2 <iframe src="/pages/summary/temp_sch_detail/list.html?origin=real_control_iframe" frameborder="0" style="height: 100%;width: 100%;"></iframe> 2 <iframe src="/pages/summary/temp_sch_detail/list.html?origin=real_control_iframe" frameborder="0" style="height: 100%;width: 100%;"></iframe>
3 \ No newline at end of file 3 \ No newline at end of file
src/main/resources/static/pages/summary/temp_sch_detail/list.html
1 -<!DOCTYPE html>  
2 -<html lang="zh-cn">  
3 -  
4 -<head>  
5 - <meta charset="UTF-8">  
6 - <link rel="stylesheet" href="/assets/plugins/uk3.0/uikit.min.css"/>  
7 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" />  
8 - <!-- flatpickr -->  
9 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.css">  
10 - <style>  
11 - html,body{  
12 - height: 100%;  
13 - }  
14 - .ct_page{  
15 - padding: 25px 15px;  
16 - height: 100%;  
17 - height: calc(100% - 50px);  
18 - }  
19 -  
20 - .ct_cont{  
21 - height: calc(100% - 35px);  
22 - }  
23 -  
24 - .ct_cont>div>div.uk-card{  
25 - height: 99%;  
26 - }  
27 -  
28 - .loading{  
29 - height: 100%;  
30 - text-align: center;  
31 - }  
32 - .loading .uk-spinner{  
33 - margin-top: 200px;  
34 - }  
35 - .loading circle{  
36 - stroke: red;  
37 - }  
38 -  
39 - .ps-container > .ps-scrollbar-x-rail, .ps-container > .ps-scrollbar-y-rail{  
40 - opacity: 0.6 !important;  
41 - padding: 0 !important;  
42 - }  
43 -  
44 - .ct_destroy_sch_table_width th:nth-of-type(1),.ct_destroy_sch_table_width td:nth-of-type(1){  
45 - width: 9%;  
46 - }  
47 - .ct_destroy_sch_table_width th:nth-of-type(2),.ct_destroy_sch_table_width td:nth-of-type(2){  
48 - width: 10%;  
49 - }  
50 - .ct_destroy_sch_table_width th:nth-of-type(3),.ct_destroy_sch_table_width td:nth-of-type(3){  
51 - width: 9%;  
52 - }  
53 - .ct_destroy_sch_table_width th:nth-of-type(4),.ct_destroy_sch_table_width td:nth-of-type(4){  
54 - width: 9%;  
55 - }  
56 - .ct_destroy_sch_table_width th:nth-of-type(5),.ct_destroy_sch_table_width td:nth-of-type(5){  
57 - width: 9%;  
58 - }  
59 - .ct_destroy_sch_table_width th:nth-of-type(6),.ct_destroy_sch_table_width td:nth-of-type(6){  
60 - width: 8%;  
61 - }  
62 - .ct_destroy_sch_table_width th:nth-of-type(7),.ct_destroy_sch_table_width td:nth-of-type(7){  
63 - width: 8%;  
64 - }  
65 - .ct_destroy_sch_table_width th:nth-of-type(8),.ct_destroy_sch_table_width td:nth-of-type(8){  
66 - width: 8%;  
67 - }  
68 - .ct_destroy_sch_table_width th:nth-of-type(9),.ct_destroy_sch_table_width td:nth-of-type(9){  
69 - }  
70 -  
71 - .ct_search_form_wrap{  
72 - border-bottom: 1px solid #e5e5e5;  
73 - padding: 10px 0 25px 10px;  
74 - }  
75 - .ct_search_form_wrap .ct_field{  
76 - display: inline-block;  
77 - margin: 0 5px;  
78 - }  
79 -  
80 - .ct_search_form_wrap .ct_field label{  
81 - font-size: 14px;  
82 - }  
83 -  
84 - .ct_search_form_wrap .ct_field input{  
85 - width: 110px;  
86 - }  
87 -  
88 - .ct_search_form_wrap .ct_field select{  
89 - width: auto;  
90 - min-width: 100px;  
91 - }  
92 -  
93 - .ct_search_form_wrap .uk-button{  
94 - padding: 0 14px;  
95 - }  
96 -  
97 - .ct_search_form_wrap .uk-button i{  
98 - vertical-align: middle;  
99 - margin-top: -2px;  
100 - margin-right: 7px;  
101 - }  
102 -  
103 - .ct_table_wrap{  
104 - font-size: 14px;  
105 - height: calc(100% - 77px);  
106 - }  
107 -  
108 - .t_body_wrap{  
109 - height: calc(100% - 41px);  
110 - overflow: auto;  
111 - position: relative;  
112 - }  
113 -  
114 - .ct_field.ct_field_bottom{  
115 - vertical-align: bottom;  
116 - font-size: 12px;  
117 - margin-left: 0;  
118 - }  
119 - </style>  
120 -</head>  
121 -  
122 -<body>  
123 -<div class="loading">  
124 - <div uk-spinner></div>  
125 -</div>  
126 -<div class="ct_page" style="display: none;">  
127 - <h3 class="uk-heading-line uk-heading-bullet"><span>临加明细统计</span></h3>  
128 - <div class="ct_cont" >  
129 - <div class="ct_search_form_wrap">  
130 - <form>  
131 - <div class="ct_field">  
132 - <label>公司:  
133 - <select class="uk-select" name="gsBm_eq">  
134 - </select>  
135 - </label>  
136 - </div>  
137 - <div class="ct_field">  
138 - <label>分公司:  
139 - <select class="uk-select" name="fgsBm_eq">  
140 - </select>  
141 - </label>  
142 - </div>  
143 - <div class="ct_field">  
144 - <label>线路:  
145 - <select class="uk-select" name="lineCode_eq">  
146 - </select>  
147 - </label>  
148 - </div>  
149 - <div class="ct_field">  
150 - <label>日期:  
151 - <input class="uk-input" name="rq" style="width: 220px;">  
152 - </label>  
153 - </div>  
154 - <div class="ct_field">  
155 - <button class="uk-button uk-button-primary search"><i uk-icon="icon: search"></i>搜索</button>  
156 - </div>  
157 - <div class="ct_field ct_field_bottom">  
158 - <button class="uk-button uk-button-text export_excel" style="padding: 0 5px;">导出数据</button>  
159 - </div>  
160 - <div class="ct_field ct_field_bottom">  
161 - <span uk-icon="icon: question" title="不统计进出场和2点间空驶" uk-tooltip="pos: bottom"></span>  
162 - </div>  
163 - </form>  
164 - </div>  
165 - <div class="ct_table_wrap day">  
166 - <table class="uk-table uk-table-small ct_destroy_sch_table_width" style="margin-bottom: 0;">  
167 - <thead>  
168 - <tr>  
169 - <th>日期</th>  
170 - <th>线路</th>  
171 - <th>车号</th>  
172 - <th>司机</th>  
173 - <th>售票员</th>  
174 - <th>班次</th>  
175 - <th>烂班公里</th>  
176 - <th>烂班时间</th>  
177 - <th>备注</th>  
178 - </tr>  
179 - </thead>  
180 - </table>  
181 - <div class="t_body_wrap">  
182 - <table class="uk-table uk-table-divider uk-table-hover uk-table-small ct_destroy_sch_table ct_destroy_sch_table_width">  
183 - <tbody>  
184 - </tbody>  
185 - </table>  
186 - </div>  
187 - </div>  
188 - </div>  
189 -</div>  
190 -  
191 -<script id="destroy_sch_list_temp" type="text/html">  
192 - {{each list as obj i}}  
193 - <tr>  
194 - <td>{{obj.rq}}</td>  
195 - <td>{{obj.lineName}}</td>  
196 - <td>{{obj.nbbm}}</td>  
197 - <td>{{obj.jGh}}</td>  
198 - <td>{{obj.sGh}}</td>  
199 - <td><a style="text-decoration: underline;">{{obj.size}}</a></td>  
200 - <td>{{obj.mileage}}</td>  
201 - <td>{{obj.timeStr}}</td>  
202 - <td>{{obj.remark}}</td>  
203 - </tr>  
204 - {{/each}}  
205 -</script>  
206 -  
207 -<script src="/metronic_v4.5.4/plugins/jquery.min.js"></script>  
208 -<script src="/assets/plugins/uk3.0/uikit.min.js"></script>  
209 -<script src="/assets/plugins/uk3.0/uikit-icons.min.js"></script>  
210 -<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" ></script>  
211 -<!-- EventProxy -->  
212 -<script src="/assets/js/eventproxy.js"></script>  
213 -<!-- art-template 模版引擎 -->  
214 -<script src="/assets/plugins/template.js"></script>  
215 -<script src="/real_control_v2/assets/plugins/moment/moment.min.js"></script>  
216 -<!-- jquery.serializejson JSON序列化插件 -->  
217 -<script src="/assets/plugins/jquery.serializejson.js" merge="plugins"></script>  
218 -<!-- flatpickr -->  
219 -<script src="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.js" ></script>  
220 -<script src="/real_control_v2/assets/plugins/flatpickr/l10n/zh.js" ></script>  
221 -<script>  
222 -  
223 - var f = $('form', '');  
224 - //var page=0, pageSize=120;  
225 -  
226 - var ep = EventProxy.create('query_comps', 'query_lines', function () {  
227 - $('[name=gsBm_eq]', f).trigger('change');//公司change  
228 - query();  
229 -  
230 - $('.loading').remove();  
231 - $('.ct_page').show();  
232 - });  
233 -  
234 - //点击搜索  
235 - $('button.search', f).on('click', query);  
236 -  
237 - function query() {  
238 - $('button.search', f).attr('disabled', 'disabled');  
239 - var data = f.serializeJSON();  
240 - $('.ct_destroy_sch_table tbody').html('');  
241 - //开始结束时间  
242 - data.rq_ge = data.rq.substr(0, 10);  
243 - data.rq_le = data.rq.substr(13);  
244 - //data.order='t';  
245 - delete data.rq;  
246 -  
247 - $.get('/summary/temp_sch/all', data, function (rs) {  
248 - $('button.search', f).removeAttr('disabled');  
249 - if(!rs || rs.length==0)  
250 - return UIkit.notification('没有搜索到相关数据!!', 'danger');  
251 - $.each(rs, function () {  
252 - this.timeStr=moment(this.t).format('HH:mm')  
253 - });  
254 -  
255 - var htmlStr = template('destroy_sch_list_temp', {list: rs});  
256 - $('.ct_destroy_sch_table tbody').html(htmlStr);  
257 - $('.t_body_wrap').perfectScrollbar('update');  
258 - });  
259 - }  
260 -  
261 -  
262 - //日期选择框  
263 - var fs='YYYY-MM-DD'  
264 - , ets=moment().subtract(1, 'days').format(fs)  
265 - , sts=moment().subtract(3, 'days').format(fs);  
266 - flatpickr('.ct_search_form_wrap [name=rq]', {  
267 - mode: "range", dateFormat: "Y-m-d","locale": "zh", defaultDate: [sts, ets]  
268 - });  
269 - var comps;  
270 - //构建公司级联下拉框  
271 - $.get('/user/companyData', function (rs) {  
272 - comps = rs;  
273 - var opts = '';  
274 - for(var i=0,obj;obj=comps[i++];){  
275 - opts += '<option value="'+obj.companyCode+'">'+obj.companyName+'</option>';  
276 - }  
277 - $('[name=gsBm_eq]', f).html(opts);  
278 - ep.emit('query_comps');  
279 - });  
280 -  
281 - var lineMapps;  
282 - //加载线路信息  
283 - $.get('/line/all', {'destroy_eq': 0}, function (rs) {  
284 - rs.sort(function (a, b) {  
285 - return a.name.localeCompare(b.name);  
286 - });  
287 - lineMapps={};  
288 - var k;  
289 - $.each(rs, function () {  
290 - k = this.company+'_'+this.brancheCompany;  
291 - if(!lineMapps[k])  
292 - lineMapps[k]=[];  
293 - lineMapps[k].push(this);  
294 - });  
295 -  
296 - ep.emit('query_lines');  
297 - });  
298 -  
299 - $('[name=gsBm_eq]', f).on('change', function () {  
300 - var code = $(this).val(), subs=[];  
301 - $.each(comps, function () {  
302 - if(this.companyCode==code)  
303 - subs=this.children;  
304 - });  
305 -  
306 - var opts='';  
307 - $.each(subs, function () {  
308 - opts += '<option value="'+this.code+'">'+this.name+'</option>';  
309 - });  
310 - $('[name=fgsBm_eq]', f).html(opts).trigger('change');  
311 - });  
312 -  
313 - $('[name=fgsBm_eq]', f).on('change', function () {  
314 - var k = $('[name=gsBm_eq]', f).val() + '_' + $(this).val();  
315 - var array = lineMapps[k];  
316 - var opts = '<option value="">全部</option>';  
317 - if(array){  
318 - $.each(array, function () {  
319 - opts += '<option value="'+this.lineCode+'">'+this.name+'</option>';  
320 - });  
321 - }  
322 - $('[name=lineCode_eq]', f).html(opts);  
323 - });  
324 -  
325 - //  
326 - //滚动条  
327 - $('.t_body_wrap').perfectScrollbar({suppressScrollX: true});  
328 -  
329 - $(document).on('submit', 'form', function () {  
330 - return false;  
331 - });  
332 -  
333 - /**  
334 - * 导出  
335 - */  
336 - $('.export_excel').on('click', function () {  
337 - var data = f.serializeJSON();  
338 - data.rq_ge = data.rq.substr(0, 10);  
339 - data.rq_le = data.rq.substr(13);  
340 - data.order='t';  
341 - delete data.rq;  
342 -  
343 - window.open('/summary/temp_sch/excel?' + $.param(data));  
344 - });  
345 -  
346 -</script>  
347 -</body> 1 +<!DOCTYPE html>
  2 +<html lang="zh-cn">
  3 +
  4 +<head>
  5 + <meta charset="UTF-8">
  6 + <link rel="stylesheet" href="/assets/plugins/uk3.0/uikit.min.css"/>
  7 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" />
  8 + <!-- flatpickr -->
  9 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.css">
  10 + <style>
  11 + html,body{
  12 + height: 100%;
  13 + }
  14 + .ct_page{
  15 + padding: 25px 15px;
  16 + height: 100%;
  17 + height: calc(100% - 50px);
  18 + }
  19 +
  20 + .ct_cont{
  21 + height: calc(100% - 35px);
  22 + }
  23 +
  24 + .ct_cont>div>div.uk-card{
  25 + height: 99%;
  26 + }
  27 +
  28 + .loading{
  29 + height: 100%;
  30 + text-align: center;
  31 + }
  32 + .loading .uk-spinner{
  33 + margin-top: 200px;
  34 + }
  35 + .loading circle{
  36 + stroke: red;
  37 + }
  38 +
  39 + .ps-container > .ps-scrollbar-x-rail, .ps-container > .ps-scrollbar-y-rail{
  40 + opacity: 0.6 !important;
  41 + padding: 0 !important;
  42 + }
  43 +
  44 + .ct_destroy_sch_table_width th:nth-of-type(1),.ct_destroy_sch_table_width td:nth-of-type(1){
  45 + width: 9%;
  46 + }
  47 + .ct_destroy_sch_table_width th:nth-of-type(2),.ct_destroy_sch_table_width td:nth-of-type(2){
  48 + width: 10%;
  49 + }
  50 + .ct_destroy_sch_table_width th:nth-of-type(3),.ct_destroy_sch_table_width td:nth-of-type(3){
  51 + width: 9%;
  52 + }
  53 + .ct_destroy_sch_table_width th:nth-of-type(4),.ct_destroy_sch_table_width td:nth-of-type(4){
  54 + width: 9%;
  55 + }
  56 + .ct_destroy_sch_table_width th:nth-of-type(5),.ct_destroy_sch_table_width td:nth-of-type(5){
  57 + width: 9%;
  58 + }
  59 + .ct_destroy_sch_table_width th:nth-of-type(6),.ct_destroy_sch_table_width td:nth-of-type(6){
  60 + width: 8%;
  61 + }
  62 + .ct_destroy_sch_table_width th:nth-of-type(7),.ct_destroy_sch_table_width td:nth-of-type(7){
  63 + width: 8%;
  64 + }
  65 + .ct_destroy_sch_table_width th:nth-of-type(8),.ct_destroy_sch_table_width td:nth-of-type(8){
  66 + width: 8%;
  67 + }
  68 + .ct_destroy_sch_table_width th:nth-of-type(9),.ct_destroy_sch_table_width td:nth-of-type(9){
  69 + }
  70 +
  71 + .ct_search_form_wrap{
  72 + border-bottom: 1px solid #e5e5e5;
  73 + padding: 10px 0 25px 10px;
  74 + }
  75 + .ct_search_form_wrap .ct_field{
  76 + display: inline-block;
  77 + margin: 0 5px;
  78 + }
  79 +
  80 + .ct_search_form_wrap .ct_field label{
  81 + font-size: 14px;
  82 + }
  83 +
  84 + .ct_search_form_wrap .ct_field input{
  85 + width: 110px;
  86 + }
  87 +
  88 + .ct_search_form_wrap .ct_field select{
  89 + width: auto;
  90 + min-width: 100px;
  91 + }
  92 +
  93 + .ct_search_form_wrap .uk-button{
  94 + padding: 0 14px;
  95 + }
  96 +
  97 + .ct_search_form_wrap .uk-button i{
  98 + vertical-align: middle;
  99 + margin-top: -2px;
  100 + margin-right: 7px;
  101 + }
  102 +
  103 + .ct_table_wrap{
  104 + font-size: 14px;
  105 + height: calc(100% - 77px);
  106 + }
  107 +
  108 + .t_body_wrap{
  109 + height: calc(100% - 41px);
  110 + overflow: auto;
  111 + position: relative;
  112 + }
  113 +
  114 + .ct_field.ct_field_bottom{
  115 + vertical-align: bottom;
  116 + font-size: 12px;
  117 + margin-left: 0;
  118 + }
  119 + </style>
  120 +</head>
  121 +
  122 +<body>
  123 +<div class="loading">
  124 + <div uk-spinner></div>
  125 +</div>
  126 +<div class="ct_page" style="display: none;">
  127 + <h3 class="uk-heading-line uk-heading-bullet"><span>临加明细统计</span></h3>
  128 + <div class="ct_cont" >
  129 + <div class="ct_search_form_wrap">
  130 + <form>
  131 + <div class="ct_field">
  132 + <label>公司:
  133 + <select class="uk-select" name="gsBm_eq">
  134 + </select>
  135 + </label>
  136 + </div>
  137 + <div class="ct_field">
  138 + <label>分公司:
  139 + <select class="uk-select" name="fgsBm_eq">
  140 + </select>
  141 + </label>
  142 + </div>
  143 + <div class="ct_field">
  144 + <label>线路:
  145 + <select class="uk-select" name="lineCode_eq">
  146 + </select>
  147 + </label>
  148 + </div>
  149 + <div class="ct_field">
  150 + <label>日期:
  151 + <input class="uk-input" name="rq" style="width: 220px;">
  152 + </label>
  153 + </div>
  154 + <div class="ct_field">
  155 + <button class="uk-button uk-button-primary search"><i uk-icon="icon: search"></i>搜索</button>
  156 + </div>
  157 + <div class="ct_field ct_field_bottom">
  158 + <button class="uk-button uk-button-text export_excel" style="padding: 0 5px;">导出数据</button>
  159 + </div>
  160 + <div class="ct_field ct_field_bottom">
  161 + <span uk-icon="icon: question" title="不统计进出场和2点间空驶" uk-tooltip="pos: bottom"></span>
  162 + </div>
  163 + </form>
  164 + </div>
  165 + <div class="ct_table_wrap day">
  166 + <table class="uk-table uk-table-small ct_destroy_sch_table_width" style="margin-bottom: 0;">
  167 + <thead>
  168 + <tr>
  169 + <th>日期</th>
  170 + <th>线路</th>
  171 + <th>车号</th>
  172 + <th>司机</th>
  173 + <th>售票员</th>
  174 + <th>班次</th>
  175 + <th>烂班公里</th>
  176 + <th>烂班时间</th>
  177 + <th>备注</th>
  178 + </tr>
  179 + </thead>
  180 + </table>
  181 + <div class="t_body_wrap">
  182 + <table class="uk-table uk-table-divider uk-table-hover uk-table-small ct_destroy_sch_table ct_destroy_sch_table_width">
  183 + <tbody>
  184 + </tbody>
  185 + </table>
  186 + </div>
  187 + </div>
  188 + </div>
  189 +</div>
  190 +
  191 +<script id="destroy_sch_list_temp" type="text/html">
  192 + {{each list as obj i}}
  193 + <tr>
  194 + <td>{{obj.rq}}</td>
  195 + <td>{{obj.lineName}}</td>
  196 + <td>{{obj.nbbm}}</td>
  197 + <td>{{obj.jGh}}</td>
  198 + <td>{{obj.sGh}}</td>
  199 + <td><a style="text-decoration: underline;">{{obj.size}}</a></td>
  200 + <td>{{obj.mileage}}</td>
  201 + <td>{{obj.timeStr}}</td>
  202 + <td>{{obj.remark}}</td>
  203 + </tr>
  204 + {{/each}}
  205 +</script>
  206 +
  207 +<script src="/metronic_v4.5.4/plugins/jquery.min.js"></script>
  208 +<script src="/assets/plugins/uk3.0/uikit.min.js"></script>
  209 +<script src="/assets/plugins/uk3.0/uikit-icons.min.js"></script>
  210 +<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" ></script>
  211 +<!-- EventProxy -->
  212 +<script src="/assets/js/eventproxy.js"></script>
  213 +<!-- art-template 模版引擎 -->
  214 +<script src="/assets/plugins/template.js"></script>
  215 +<script src="/real_control_v2/assets/plugins/moment/moment.min.js"></script>
  216 +<!-- jquery.serializejson JSON序列化插件 -->
  217 +<script src="/assets/plugins/jquery.serializejson.js" merge="plugins"></script>
  218 +<!-- flatpickr -->
  219 +<script src="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.js" ></script>
  220 +<script src="/real_control_v2/assets/plugins/flatpickr/l10n/zh.js" ></script>
  221 +<script>
  222 +
  223 + var f = $('form', '');
  224 + //var page=0, pageSize=120;
  225 +
  226 + var ep = EventProxy.create('query_comps', 'query_lines', function () {
  227 + $('[name=gsBm_eq]', f).trigger('change');//公司change
  228 + query();
  229 +
  230 + $('.loading').remove();
  231 + $('.ct_page').show();
  232 + });
  233 +
  234 + //点击搜索
  235 + $('button.search', f).on('click', query);
  236 +
  237 + function query() {
  238 + $('button.search', f).attr('disabled', 'disabled');
  239 + var data = f.serializeJSON();
  240 + $('.ct_destroy_sch_table tbody').html('');
  241 + //开始结束时间
  242 + data.rq_ge = data.rq.substr(0, 10);
  243 + data.rq_le = data.rq.substr(13);
  244 + //data.order='t';
  245 + delete data.rq;
  246 +
  247 + $.get('/summary/temp_sch/all', data, function (rs) {
  248 + $('button.search', f).removeAttr('disabled');
  249 + if(!rs || rs.length==0)
  250 + return UIkit.notification('没有搜索到相关数据!!', 'danger');
  251 + $.each(rs, function () {
  252 + this.timeStr=moment(this.t).format('HH:mm')
  253 + });
  254 +
  255 + var htmlStr = template('destroy_sch_list_temp', {list: rs});
  256 + $('.ct_destroy_sch_table tbody').html(htmlStr);
  257 + $('.t_body_wrap').perfectScrollbar('update');
  258 + });
  259 + }
  260 +
  261 +
  262 + //日期选择框
  263 + var fs='YYYY-MM-DD'
  264 + , ets=moment().subtract(1, 'days').format(fs)
  265 + , sts=moment().subtract(3, 'days').format(fs);
  266 + flatpickr('.ct_search_form_wrap [name=rq]', {
  267 + mode: "range", dateFormat: "Y-m-d","locale": "zh", defaultDate: [sts, ets]
  268 + });
  269 + var comps;
  270 + //构建公司级联下拉框
  271 + $.get('/user/companyData', function (rs) {
  272 + comps = rs;
  273 + var opts = '';
  274 + for(var i=0,obj;obj=comps[i++];){
  275 + opts += '<option value="'+obj.companyCode+'">'+obj.companyName+'</option>';
  276 + }
  277 + $('[name=gsBm_eq]', f).html(opts);
  278 + ep.emit('query_comps');
  279 + });
  280 +
  281 + var lineMapps;
  282 + //加载线路信息
  283 + $.get('/line/all', {'destroy_eq': 0}, function (rs) {
  284 + rs.sort(function (a, b) {
  285 + return a.name.localeCompare(b.name);
  286 + });
  287 + lineMapps={};
  288 + var k;
  289 + $.each(rs, function () {
  290 + k = this.company+'_'+this.brancheCompany;
  291 + if(!lineMapps[k])
  292 + lineMapps[k]=[];
  293 + lineMapps[k].push(this);
  294 + });
  295 +
  296 + ep.emit('query_lines');
  297 + });
  298 +
  299 + $('[name=gsBm_eq]', f).on('change', function () {
  300 + var code = $(this).val(), subs=[];
  301 + $.each(comps, function () {
  302 + if(this.companyCode==code)
  303 + subs=this.children;
  304 + });
  305 +
  306 + var opts='';
  307 + $.each(subs, function () {
  308 + opts += '<option value="'+this.code+'">'+this.name+'</option>';
  309 + });
  310 + $('[name=fgsBm_eq]', f).html(opts).trigger('change');
  311 + });
  312 +
  313 + $('[name=fgsBm_eq]', f).on('change', function () {
  314 + var k = $('[name=gsBm_eq]', f).val() + '_' + $(this).val();
  315 + var array = lineMapps[k];
  316 + var opts = '<option value="">全部</option>';
  317 + if(array){
  318 + $.each(array, function () {
  319 + opts += '<option value="'+this.lineCode+'">'+this.name+'</option>';
  320 + });
  321 + }
  322 + $('[name=lineCode_eq]', f).html(opts);
  323 + });
  324 +
  325 + //
  326 + //滚动条
  327 + $('.t_body_wrap').perfectScrollbar({suppressScrollX: true});
  328 +
  329 + $(document).on('submit', 'form', function () {
  330 + return false;
  331 + });
  332 +
  333 + /**
  334 + * 导出
  335 + */
  336 + $('.export_excel').on('click', function () {
  337 + var data = f.serializeJSON();
  338 + data.rq_ge = data.rq.substr(0, 10);
  339 + data.rq_le = data.rq.substr(13);
  340 + data.order='t';
  341 + delete data.rq;
  342 +
  343 + window.open('/summary/temp_sch/excel?' + $.param(data));
  344 + });
  345 +
  346 +</script>
  347 +</body>
348 </html> 348 </html>
349 \ No newline at end of file 349 \ No newline at end of file
src/main/resources/static/real_control_v2/fragments/line_schedule/car_info_all.html
1 -<div class="uk-modal ct_move_modal" id="sch_car_info_all-modal">  
2 - <div class="uk-modal-dialog" style="width: 1080px;">  
3 - <a href="" class="uk-modal-close uk-close"></a>  
4 -  
5 - <div class="uk-modal-header">  
6 - <h2>1006路 -全部车辆</h2></div>  
7 -  
8 - <table class="uk-table uk-table-hover" style="table-layout: fixed;">  
9 - <thead>  
10 - <tr>  
11 - <th style="width: 10%;">车辆</th>  
12 - <th style="width: 10%;">设备号</th>  
13 - <th style="width: 16%;">位置</th>  
14 - <th style="width: 14%;">车载线路编码</th>  
15 - <th style="width: 13%;">当前执行任务</th>  
16 - <th style="width: 7%;">状态</th>  
17 - <th style="width: 19%">最后gps时间</th>  
18 - <th>请求出场</th>  
19 - </tr>  
20 - </thead>  
21 - <tbody>  
22 - </tbody>  
23 - </table>  
24 - </div>  
25 -  
26 - <script id="sch_car_info_all-temp" type="text/html">  
27 - {{each list as obj i}}  
28 - <tr data-nbbm="{{obj.nbbm}}">  
29 - <td>{{obj.nbbm}}</td>  
30 - <td>{{obj.device}}</td>  
31 - <td>{{obj.loc}}</td>  
32 - <td>{{obj.lineCodeRealStr}}</td>  
33 - <td><a class="exec_sch_link" data-id="{{obj.schId}}">{{obj.exec}}</a></td>  
34 - <td><a class="{{if obj.status!='在线'}}grey_link{{/if}}">{{obj.status}}</a></td>  
35 - <td class="{{if obj.status!='在线'}}grey_link{{/if}}">  
36 - {{obj.timeStr}}  
37 -  
38 - {{if obj.formNow!=null}}  
39 - <small>({{obj.formNow}})</small>  
40 - {{/if}}  
41 - </td>  
42 - <td>{{obj.qqccTimeStr}}</td>  
43 - </tr>  
44 - {{/each}}  
45 - </script>  
46 - <script>  
47 - (function () {  
48 - var modal = '#sch_car_info_all-modal', lineCode, nbbm;  
49 -  
50 - $(modal).on('init', function(e, data) {  
51 - e.stopPropagation();  
52 - lineCode = data.lineCode;  
53 - nbbm = data.nbbm;  
54 -  
55 - jsDoQuery(function () {  
56 - var $cell = $('tr[data-nbbm='+nbbm+']', modal);  
57 - //定位到行  
58 - $(modal).animate({  
59 - scrollTop: $cell.offset().top - $(modal).offset().top + $(modal).scrollTop()  
60 - }, 500, function () {  
61 - $cell.addClass('ct_active');  
62 - });  
63 - timer = setTimeout(fixedRefreshData, t + 500);  
64 - });  
65 - });  
66 -  
67 - var timer, t = 12*1000;  
68 - var fixedRefreshData = function () {  
69 - (function () {  
70 - var f = arguments.callee;  
71 - jsDoQuery(function () {  
72 - timer = setTimeout(f, t);  
73 - });  
74 - })();  
75 - };  
76 -  
77 - $(modal).on('hide.uk.modal', function () {  
78 - clearTimeout(timer);  
79 - timer = null;  
80 - });  
81 -  
82 - var jsDoQuery = function (cb) {  
83 - gb_common.$get('/gps/allCarsByLine', {lineCode: lineCode}, function (rs) {  
84 - $.each(rs.list, function () {  
85 - if(this['lineCodeReal'])  
86 - this['lineCodeRealStr'] = this['lineCodeReal'] + '/' + gb_data_basic.lineCode2NameAll()[this['lineCodeReal']];  
87 - else  
88 - this['lineCodeRealStr'] = '';  
89 - if(this['gpsTs']){  
90 - this['timeStr'] = moment(this['gpsTs']).format('MM/DD HH:mm:ss');  
91 - this['formNow'] = moment(this['gpsTs']).fromNow();  
92 - }  
93 - if(this['qqcc'])  
94 - this['qqccTimeStr'] = moment(this['qqcc']).format('HH:mm');  
95 - });  
96 -  
97 - rs.list.sort(function (a, b) {  
98 - if(!a.nbbm)  
99 - return -1;  
100 - if(!b.nbbm)  
101 - return 1;  
102 - return a.nbbm.localeCompare(b.nbbm);  
103 - });  
104 - var htmlStr = template('sch_car_info_all-temp', {list: rs.list});  
105 -  
106 - $('table>tbody', modal).html(htmlStr);  
107 -  
108 - cb && cb();  
109 - });  
110 - };  
111 -  
112 - $(modal).on('click', 'a.exec_sch_link', function () {  
113 - var id = $(this).data('id');  
114 - if(!id)  
115 - return;  
116 - gb_schedule_table.scroToDl({id: id, xlBm:lineCode});  
117 - });  
118 - })();  
119 - </script> 1 +<div class="uk-modal ct_move_modal" id="sch_car_info_all-modal">
  2 + <div class="uk-modal-dialog" style="width: 1080px;">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 +
  5 + <div class="uk-modal-header">
  6 + <h2>1006路 -全部车辆</h2></div>
  7 +
  8 + <table class="uk-table uk-table-hover" style="table-layout: fixed;">
  9 + <thead>
  10 + <tr>
  11 + <th style="width: 10%;">车辆</th>
  12 + <th style="width: 10%;">设备号</th>
  13 + <th style="width: 16%;">位置</th>
  14 + <th style="width: 14%;">车载线路编码</th>
  15 + <th style="width: 13%;">当前执行任务</th>
  16 + <th style="width: 7%;">状态</th>
  17 + <th style="width: 19%">最后gps时间</th>
  18 + <th>请求出场</th>
  19 + </tr>
  20 + </thead>
  21 + <tbody>
  22 + </tbody>
  23 + </table>
  24 + </div>
  25 +
  26 + <script id="sch_car_info_all-temp" type="text/html">
  27 + {{each list as obj i}}
  28 + <tr data-nbbm="{{obj.nbbm}}">
  29 + <td>{{obj.nbbm}}</td>
  30 + <td>{{obj.device}}</td>
  31 + <td>{{obj.loc}}</td>
  32 + <td>{{obj.lineCodeRealStr}}</td>
  33 + <td><a class="exec_sch_link" data-id="{{obj.schId}}">{{obj.exec}}</a></td>
  34 + <td><a class="{{if obj.status!='在线'}}grey_link{{/if}}">{{obj.status}}</a></td>
  35 + <td class="{{if obj.status!='在线'}}grey_link{{/if}}">
  36 + {{obj.timeStr}}
  37 +
  38 + {{if obj.formNow!=null}}
  39 + <small>({{obj.formNow}})</small>
  40 + {{/if}}
  41 + </td>
  42 + <td>{{obj.qqccTimeStr}}</td>
  43 + </tr>
  44 + {{/each}}
  45 + </script>
  46 + <script>
  47 + (function () {
  48 + var modal = '#sch_car_info_all-modal', lineCode, nbbm;
  49 +
  50 + $(modal).on('init', function(e, data) {
  51 + e.stopPropagation();
  52 + lineCode = data.lineCode;
  53 + nbbm = data.nbbm;
  54 +
  55 + jsDoQuery(function () {
  56 + var $cell = $('tr[data-nbbm='+nbbm+']', modal);
  57 + //定位到行
  58 + $(modal).animate({
  59 + scrollTop: $cell.offset().top - $(modal).offset().top + $(modal).scrollTop()
  60 + }, 500, function () {
  61 + $cell.addClass('ct_active');
  62 + });
  63 + timer = setTimeout(fixedRefreshData, t + 500);
  64 + });
  65 + });
  66 +
  67 + var timer, t = 12*1000;
  68 + var fixedRefreshData = function () {
  69 + (function () {
  70 + var f = arguments.callee;
  71 + jsDoQuery(function () {
  72 + timer = setTimeout(f, t);
  73 + });
  74 + })();
  75 + };
  76 +
  77 + $(modal).on('hide.uk.modal', function () {
  78 + clearTimeout(timer);
  79 + timer = null;
  80 + });
  81 +
  82 + var jsDoQuery = function (cb) {
  83 + gb_common.$get('/gps/allCarsByLine', {lineCode: lineCode}, function (rs) {
  84 + $.each(rs.list, function () {
  85 + if(this['lineCodeReal'])
  86 + this['lineCodeRealStr'] = this['lineCodeReal'] + '/' + gb_data_basic.lineCode2NameAll()[this['lineCodeReal']];
  87 + else
  88 + this['lineCodeRealStr'] = '';
  89 + if(this['gpsTs']){
  90 + this['timeStr'] = moment(this['gpsTs']).format('MM/DD HH:mm:ss');
  91 + this['formNow'] = moment(this['gpsTs']).fromNow();
  92 + }
  93 + if(this['qqcc'])
  94 + this['qqccTimeStr'] = moment(this['qqcc']).format('HH:mm');
  95 + });
  96 +
  97 + rs.list.sort(function (a, b) {
  98 + if(!a.nbbm)
  99 + return -1;
  100 + if(!b.nbbm)
  101 + return 1;
  102 + return a.nbbm.localeCompare(b.nbbm);
  103 + });
  104 + var htmlStr = template('sch_car_info_all-temp', {list: rs.list});
  105 +
  106 + $('table>tbody', modal).html(htmlStr);
  107 +
  108 + cb && cb();
  109 + });
  110 + };
  111 +
  112 + $(modal).on('click', 'a.exec_sch_link', function () {
  113 + var id = $(this).data('id');
  114 + if(!id)
  115 + return;
  116 + gb_schedule_table.scroToDl({id: id, xlBm:lineCode});
  117 + });
  118 + })();
  119 + </script>
120 </div> 120 </div>
121 \ No newline at end of file 121 \ No newline at end of file
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/edit.html
1 -<div class="uk-modal ct_move_modal" id="edit-sub-task-main-modal">  
2 - <div class="uk-modal-dialog" style="width: 800px;">  
3 - <a href="" class="uk-modal-close uk-close"></a>  
4 - <div class="uk-modal-header">  
5 - <h2>编辑子任务</h2></div>  
6 -  
7 - <div class="forms">  
8 -  
9 - </div>  
10 -  
11 - <div class="uk-modal-footer uk-text-right" style="margin-top: 5px;">  
12 - <a class="delete_link" style="vertical-align: bottom;display: inline-block;color: red;font-size: 13px;margin-right: 10px;">删除子任务</a>  
13 - <button type="button" class="uk-button uk-modal-close">取消</button>  
14 - <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>  
15 - </div>  
16 - </div>  
17 -  
18 - <script id="sub-task-v2-edit-form-temp" type="text/html">  
19 - <form class="uk-form uk-form-horizontal sub_task_form_v2" style="background:#fff;">  
20 - <input type="hidden" value="{{sch.id}}" name="schedule.id" sch_id_inp>  
21 - <input type="hidden" value="正常" name="type1">  
22 - <input type="hidden" value="{{cTask.id}}" name="id">  
23 - <div class="uk-grid">  
24 - <div class="uk-width-1-3">  
25 - <div class="uk-form-row">  
26 - <label class="uk-form-label">班次类型</label>  
27 - <div class="uk-form-controls">  
28 - <select class="form-control nt-dictionary" data-code="-100" name="type2"  
29 - data-group=ChildTaskType></select>  
30 - </div>  
31 - </div>  
32 - </div>  
33 - <div class="uk-width-1-3">  
34 - <div class="uk-form-row">  
35 - <label class="uk-form-label">起点 </label>  
36 - <div class="uk-form-controls">  
37 - <select name="startStation" required></select>  
38 - </div>  
39 - </div>  
40 - </div>  
41 - <div class="uk-width-1-3">  
42 - <div class="uk-form-row">  
43 - <label class="uk-form-label">终点</label>  
44 - <div class="uk-form-controls">  
45 - <select name="endStation" required></select>  
46 - </div>  
47 - </div>  
48 - </div>  
49 - </div>  
50 -  
51 - <div class="uk-grid">  
52 - <div class="uk-width-1-3">  
53 - <div class="uk-form-row">  
54 - <label class="uk-form-label">开始时间</label>  
55 - <div class="uk-form-controls">  
56 - <input name="startDate" value="{{cTask.startDate}}" type="time"  
57 - required>  
58 - </div>  
59 - </div>  
60 - </div>  
61 - <div class="uk-width-1-3">  
62 - <div class="uk-form-row">  
63 - <label class="uk-form-label">结束时间</label>  
64 - <div class="uk-form-controls">  
65 - <input name="endDate" value="{{cTask.endDate}}" type="time" required>  
66 - </div>  
67 - </div>  
68 - </div>  
69 - <div class="uk-width-1-3">  
70 - <div class="uk-form-row">  
71 - <label class="uk-form-label">公里</label>  
72 - <div class="uk-form-controls">  
73 - <input class="form-control" name="mileage" max=222 data-fv-lessthan-inclusive="false"  
74 - required style="width: 42%;" value="{{cTask.mileage}}">  
75 - <select class="form-control nt-dictionary" required name="mileageType"  
76 - data-group="MileageType" style="width: 52%;"></select>  
77 - </div>  
78 - </div>  
79 - </div>  
80 - </div>  
81 -  
82 - <div class="uk-grid">  
83 - <div class="uk-width-2-3 domains"></div>  
84 - <div class="uk-width-1-3">  
85 - <div class="uk-form-row">  
86 - <label class="uk-form-label">备注</label>  
87 - <div class="uk-form-controls">  
88 - <!--<select class="form-control nt-dictionary" required name="remarks"></select>-->  
89 - <input class="form-control" value="{{cTask.remarks}}" name="remarks" data-fv-stringlength-max="50" data-fv-stringlength="true">  
90 - </div>  
91 - </div>  
92 - </div>  
93 - </div>  
94 - </form>  
95 - </script>  
96 -  
97 - <script id="st-edit-domains-inout-form-temp" type="text/html">  
98 - <div class="uk-grid">  
99 - <div class="uk-width-1-2">  
100 - <div class="uk-form-row" style="padding-top: 5px;">  
101 - <label class="uk-form-label"></label>  
102 - <div class="uk-form-controls">  
103 - <label data-uk-tooltip title="无人售票线路,请忽略这个选项">  
104 - <input type="checkbox" value=1 name="noClerk" class="i-cbox"> 无售票员  
105 - </label>  
106 - </div>  
107 - </div>  
108 - </div>  
109 - <div class="uk-width-1-2 destroy_reason_wrap">  
110 - <div class="uk-form-row">  
111 - <label class="uk-form-label">进出场原因</label>  
112 - <div class="uk-form-controls">  
113 - <select class="form-control" name="reason" required>  
114 - <option value="">请选择...</option>  
115 - {{each inOutExps as exp i}}  
116 - <option value="{{exp}}">{{exp}}</option>  
117 - {{/each}}  
118 - </select>  
119 - </div>  
120 - </div>  
121 - </div>  
122 - </div>  
123 - </script>  
124 -  
125 - <script id="st-edit-domains-service-form-temp" type="text/html">  
126 - <div class="uk-grid">  
127 - <div class="uk-width-1-2">  
128 - <div class="uk-form-row" style="padding-top: 5px;">  
129 - <label class="uk-form-label"></label>  
130 - <div class="uk-form-controls">  
131 - <label>  
132 - <input type="checkbox" value=1 name="destroy" class="i-cbox"> 是否烂班  
133 - </label>  
134 - </div>  
135 - </div>  
136 - </div>  
137 - <div class="uk-width-1-2 destroy_reason_wrap" style="display: none;">  
138 - <div class="uk-form-row">  
139 - <label class="uk-form-label">烂班原因</label>  
140 - <div class="uk-form-controls">  
141 - <select class="form-control" name="reason" required>  
142 - <option value="">请选择...</option>  
143 - {{each adjustExps as exp i}}  
144 - <option value="{{exp}}">{{exp}}</option>  
145 - {{/each}}  
146 - </select>  
147 - </div>  
148 - </div>  
149 - </div>  
150 - </div>  
151 - </script>  
152 - <script>  
153 - (function () {  
154 - var modal = '#edit-sub-task-main-modal', sch, cTask,  
155 - stationRoutes,  
156 - parks,  
157 - information,  
158 - st_park_data;  
159 -  
160 - $(modal).on('init', function (e, data) {  
161 - e.stopPropagation();  
162 - sch = data.sch;  
163 - cTask = data.cTask;  
164 -  
165 - //站到场数据  
166 - st_park_data = gb_data_basic.get_stat_park_data()[sch.xlBm];  
167 - //站点路由  
168 - stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function (a, b) {  
169 - return a.stationRouteCode - b.stationRouteCode;  
170 - }), 'directions');  
171 - //停车场  
172 - parks = gb_data_basic.simpleParksArray();  
173 - //线路标准  
174 - information = gb_data_basic.getLineInformation(sch.xlBm);  
175 - //停车场排序,常用的放前面  
176 - parks = sort_parks(parks, information, st_park_data);  
177 -  
178 - var htmlStr = template('sub-task-v2-edit-form-temp', {sch: sch, cTask: cTask});  
179 - var f = $(htmlStr);  
180 - $('.forms', modal).append(f);  
181 - //字典转换  
182 - dictionaryUtils.transformDom($('.nt-dictionary', f));  
183 -  
184 - //设置下拉框默认值  
185 - $f('type2', f).val(cTask.type2).trigger('change');//班次类型  
186 - $f('startStation', f).val(cTask.startStation);//起点站  
187 - $f('endStation', f).val(cTask.endStation);//终点站  
188 - $f('mileageType', f).val(cTask.mileageType);//里程类型  
189 - if(cTask.destroy)  
190 - $f('destroy', f).trigger('click');//烂班  
191 - if(cTask.reason)  
192 - $f('reason', f).val(cTask.reason);//原因  
193 - if(cTask.noClerk)  
194 - $f('noClerk', f).trigger('click');//无售票员  
195 -  
196 - f.formValidation({  
197 - framework: 'uikit',  
198 - locale: 'zh_CN'  
199 - });  
200 - $('button[type=submit]', modal).on('click', function () {  
201 - f.formValidation('validate');  
202 - });  
203 -  
204 - //提交  
205 - f.on('success.form.fv', function (e) {  
206 - e.preventDefault();  
207 - $('button[type=submit]', modal).attr('disabled', 'disabled');  
208 -  
209 - var data=$.extend(f.serializeJSON(), gb_common.getDisabledVal(f));  
210 -  
211 - gb_common.$post('/childTask/update', data, function (rs) {  
212 - notify_succ('修改成功!');  
213 - gb_schedule_table.updateSchedule(rs.t);  
214 -  
215 - UIkit.modal(modal).hide();  
216 - $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: sch});  
217 -  
218 - //更新路牌公里统计面板  
219 - gb_schedule_table.showLpMileageTipBySch(rs.t);  
220 - });  
221 - });  
222 -  
223 - f.on('err.field.fv', function () {  
224 - $('button[type=submit]', modal).removeClass('disabled').removeAttr('disabled');  
225 - });  
226 - });  
227 -  
228 - //班次类型切换事件  
229 - $(modal).on('change', 'select[name=type2]', reCalcInputs_type);  
230 - //烂班选项点击事件  
231 - $(modal).on('change', 'input[name=destroy]', destroyClick);  
232 - //进出场原因切换  
233 - $(modal).on('change', 'select[name=reason]', reSynchroReason);  
234 -  
235 - /**  
236 - * 根据班次类型切换起终点下拉框  
237 - */  
238 - function reCalcInputs_type() {  
239 - var f = $(this).parents('.sub_task_form_v2');  
240 - var upDown = sch.xlDir;  
241 - if($('[name=upDown]', f).length>0)  
242 - upDown = $('[name=upDown]', f).val();  
243 - var routes = stationRoutes[upDown]  
244 - , lastCode = routes[routes.length - 1].stationCode  
245 - , opts = '', park_opts = '';  
246 - //station options  
247 - $.each(routes, function () {  
248 - opts += '<option value="' + this.stationCode + '">' + this.stationName + '</option>'  
249 - });  
250 - //park options  
251 - for(var i=0,p;p=parks[i++];)  
252 - park_opts += '<option value="' + p.code + '">' + p.name + '</option>';  
253 - /*for (var code in parks)  
254 - park_opts += '<option value="' + code + '">' + parks[code] + '</option>';*/  
255 -  
256 - var qdz = $f('startStation', f), zdz = $f('endStation', f), mType = $f('mileageType', f);  
257 - var domainsTemp;  
258 - switch ($(this).val()) {  
259 - case '3'://出场  
260 - qdz.html(park_opts).val(information.carPark);  
261 - zdz.html(opts).trigger('change');  
262 - mType.val('empty').attr('disabled', 'disabled').trigger('change');  
263 - domainsTemp = 'st-edit-domains-inout-form-temp';  
264 - break;  
265 - case '2'://进场  
266 - qdz.html(opts);  
267 - zdz.html(park_opts).val(information.carPark).trigger('change');  
268 - mType.val('empty').attr('disabled', 'disabled').trigger('change');  
269 - domainsTemp = 'st-edit-domains-inout-form-temp';  
270 - break;  
271 - default:  
272 - qdz.html(opts);  
273 - zdz.html(opts).val(lastCode).trigger('change');  
274 - mType.val('service').removeAttr('disabled').trigger('change');  
275 - domainsTemp = 'st-edit-domains-service-form-temp';  
276 - }  
277 -  
278 - //可变选项区域  
279 - $('.domains', f).html(template(domainsTemp, {  
280 - adjustExps: gb_common.adjustExps,  
281 - inOutExps: gb_common.inOutExps  
282 - }));  
283 -  
284 - //校验reason  
285 - f.trigger('add_reason_field');  
286 - }  
287 -  
288 -  
289 - function $f(name, f) {  
290 - return $('[name=' + name + ']', f);  
291 - }  
292 -  
293 - /**  
294 - * 停车场排序  
295 - * @param parks 停车场 code 2 name  
296 - * @param information 线路标准  
297 - * @param st_park_data 站到场  
298 - */  
299 - function sort_parks(parks, information, st_park_data) {  
300 - var array = [], names=[];  
301 - for(var code in parks){  
302 - array.push({code: code, name: parks[code]});  
303 - }  
304 -  
305 - if(st_park_data && st_park_data.length > 0){  
306 - $.each(st_park_data, function () {  
307 - names.push(this.parkName);  
308 - });  
309 - }  
310 -  
311 - //debugger  
312 - array.sort(function (a, b) {  
313 - if(a.code==information.carPark)  
314 - return -1;  
315 - if(b.code==information.carPark)  
316 - return 1;  
317 -  
318 - var ai = names.indexOf(a.name),  
319 - bi = names.indexOf(b.name);  
320 -  
321 - if(ai!=-1 && bi==-1)  
322 - return -1;  
323 - else if(ai==-1 && bi!=-1)  
324 - return 1;  
325 - else  
326 - return a.name.localeCompare(b.name);  
327 - });  
328 - return array;  
329 - }  
330 -  
331 - function destroyClick() {  
332 - var f = $(this).parents('.sub_task_form_v2');  
333 - if (this.checked) {  
334 - $('.destroy_reason_wrap', f).show();  
335 - f.attr('destroy', true);//.addClass('destroy_form');  
336 - }  
337 - else {  
338 - $('.destroy_reason_wrap', f).hide();  
339 - f.removeAttr('destroy');//.removeClass('destroy_form');  
340 - }  
341 - //reCalcMileageCount();  
342 - }  
343 -  
344 - /**  
345 - * 切换原因  
346 - */  
347 - function reSynchroReason() {  
348 - var f = $(this).parents('.sub_task_form_v2'),  
349 - reason = $(this).val(),  
350 - remInput = $('[name=remarks]', f);  
351 -  
352 - if(remInput.val()==reason + ',')  
353 - return;  
354 - remInput.val(remInput.val() + reason + ',');  
355 - }  
356 -  
357 -  
358 - $('.delete_link', modal).on('click', function () {  
359 - var id = cTask.id;  
360 - if(!id){  
361 - notify_err('无法获取标识键!');  
362 - return;  
363 - }  
364 -  
365 - var str = '<h3>确定要删除这条子任务?</h3>';  
366 - alt_confirm(str, function () {  
367 - gb_common.$del('/childTask/' + id, function (rs) {  
368 - gb_schedule_table.updateSchedule(rs.t);  
369 -  
370 - UIkit.modal(modal).hide();  
371 - $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: sch});  
372 -  
373 - //更新路牌公里统计面板  
374 - gb_schedule_table.showLpMileageTipBySch(rs.t);  
375 - });  
376 - }, '确定删除');  
377 - });  
378 - })();  
379 - </script> 1 +<div class="uk-modal ct_move_modal" id="edit-sub-task-main-modal">
  2 + <div class="uk-modal-dialog" style="width: 800px;">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 + <div class="uk-modal-header">
  5 + <h2>编辑子任务</h2></div>
  6 +
  7 + <div class="forms">
  8 +
  9 + </div>
  10 +
  11 + <div class="uk-modal-footer uk-text-right" style="margin-top: 5px;">
  12 + <a class="delete_link" style="vertical-align: bottom;display: inline-block;color: red;font-size: 13px;margin-right: 10px;">删除子任务</a>
  13 + <button type="button" class="uk-button uk-modal-close">取消</button>
  14 + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>
  15 + </div>
  16 + </div>
  17 +
  18 + <script id="sub-task-v2-edit-form-temp" type="text/html">
  19 + <form class="uk-form uk-form-horizontal sub_task_form_v2" style="background:#fff;">
  20 + <input type="hidden" value="{{sch.id}}" name="schedule.id" sch_id_inp>
  21 + <input type="hidden" value="正常" name="type1">
  22 + <input type="hidden" value="{{cTask.id}}" name="id">
  23 + <div class="uk-grid">
  24 + <div class="uk-width-1-3">
  25 + <div class="uk-form-row">
  26 + <label class="uk-form-label">班次类型</label>
  27 + <div class="uk-form-controls">
  28 + <select class="form-control nt-dictionary" data-code="-100" name="type2"
  29 + data-group=ChildTaskType></select>
  30 + </div>
  31 + </div>
  32 + </div>
  33 + <div class="uk-width-1-3">
  34 + <div class="uk-form-row">
  35 + <label class="uk-form-label">起点 </label>
  36 + <div class="uk-form-controls">
  37 + <select name="startStation" required></select>
  38 + </div>
  39 + </div>
  40 + </div>
  41 + <div class="uk-width-1-3">
  42 + <div class="uk-form-row">
  43 + <label class="uk-form-label">终点</label>
  44 + <div class="uk-form-controls">
  45 + <select name="endStation" required></select>
  46 + </div>
  47 + </div>
  48 + </div>
  49 + </div>
  50 +
  51 + <div class="uk-grid">
  52 + <div class="uk-width-1-3">
  53 + <div class="uk-form-row">
  54 + <label class="uk-form-label">开始时间</label>
  55 + <div class="uk-form-controls">
  56 + <input name="startDate" value="{{cTask.startDate}}" type="time"
  57 + required>
  58 + </div>
  59 + </div>
  60 + </div>
  61 + <div class="uk-width-1-3">
  62 + <div class="uk-form-row">
  63 + <label class="uk-form-label">结束时间</label>
  64 + <div class="uk-form-controls">
  65 + <input name="endDate" value="{{cTask.endDate}}" type="time" required>
  66 + </div>
  67 + </div>
  68 + </div>
  69 + <div class="uk-width-1-3">
  70 + <div class="uk-form-row">
  71 + <label class="uk-form-label">公里</label>
  72 + <div class="uk-form-controls">
  73 + <input class="form-control" name="mileage" max=222 data-fv-lessthan-inclusive="false"
  74 + required style="width: 42%;" value="{{cTask.mileage}}">
  75 + <select class="form-control nt-dictionary" required name="mileageType"
  76 + data-group="MileageType" style="width: 52%;"></select>
  77 + </div>
  78 + </div>
  79 + </div>
  80 + </div>
  81 +
  82 + <div class="uk-grid">
  83 + <div class="uk-width-2-3 domains"></div>
  84 + <div class="uk-width-1-3">
  85 + <div class="uk-form-row">
  86 + <label class="uk-form-label">备注</label>
  87 + <div class="uk-form-controls">
  88 + <!--<select class="form-control nt-dictionary" required name="remarks"></select>-->
  89 + <input class="form-control" value="{{cTask.remarks}}" name="remarks" data-fv-stringlength-max="50" data-fv-stringlength="true">
  90 + </div>
  91 + </div>
  92 + </div>
  93 + </div>
  94 + </form>
  95 + </script>
  96 +
  97 + <script id="st-edit-domains-inout-form-temp" type="text/html">
  98 + <div class="uk-grid">
  99 + <div class="uk-width-1-2">
  100 + <div class="uk-form-row" style="padding-top: 5px;">
  101 + <label class="uk-form-label"></label>
  102 + <div class="uk-form-controls">
  103 + <label data-uk-tooltip title="无人售票线路,请忽略这个选项">
  104 + <input type="checkbox" value=1 name="noClerk" class="i-cbox"> 无售票员
  105 + </label>
  106 + </div>
  107 + </div>
  108 + </div>
  109 + <div class="uk-width-1-2 destroy_reason_wrap">
  110 + <div class="uk-form-row">
  111 + <label class="uk-form-label">进出场原因</label>
  112 + <div class="uk-form-controls">
  113 + <select class="form-control" name="reason" required>
  114 + <option value="">请选择...</option>
  115 + {{each inOutExps as exp i}}
  116 + <option value="{{exp}}">{{exp}}</option>
  117 + {{/each}}
  118 + </select>
  119 + </div>
  120 + </div>
  121 + </div>
  122 + </div>
  123 + </script>
  124 +
  125 + <script id="st-edit-domains-service-form-temp" type="text/html">
  126 + <div class="uk-grid">
  127 + <div class="uk-width-1-2">
  128 + <div class="uk-form-row" style="padding-top: 5px;">
  129 + <label class="uk-form-label"></label>
  130 + <div class="uk-form-controls">
  131 + <label>
  132 + <input type="checkbox" value=1 name="destroy" class="i-cbox"> 是否烂班
  133 + </label>
  134 + </div>
  135 + </div>
  136 + </div>
  137 + <div class="uk-width-1-2 destroy_reason_wrap" style="display: none;">
  138 + <div class="uk-form-row">
  139 + <label class="uk-form-label">烂班原因</label>
  140 + <div class="uk-form-controls">
  141 + <select class="form-control" name="reason" required>
  142 + <option value="">请选择...</option>
  143 + {{each adjustExps as exp i}}
  144 + <option value="{{exp}}">{{exp}}</option>
  145 + {{/each}}
  146 + </select>
  147 + </div>
  148 + </div>
  149 + </div>
  150 + </div>
  151 + </script>
  152 + <script>
  153 + (function () {
  154 + var modal = '#edit-sub-task-main-modal', sch, cTask,
  155 + stationRoutes,
  156 + parks,
  157 + information,
  158 + st_park_data;
  159 +
  160 + $(modal).on('init', function (e, data) {
  161 + e.stopPropagation();
  162 + sch = data.sch;
  163 + cTask = data.cTask;
  164 +
  165 + //站到场数据
  166 + st_park_data = gb_data_basic.get_stat_park_data()[sch.xlBm];
  167 + //站点路由
  168 + stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function (a, b) {
  169 + return a.stationRouteCode - b.stationRouteCode;
  170 + }), 'directions');
  171 + //停车场
  172 + parks = gb_data_basic.simpleParksArray();
  173 + //线路标准
  174 + information = gb_data_basic.getLineInformation(sch.xlBm);
  175 + //停车场排序,常用的放前面
  176 + parks = sort_parks(parks, information, st_park_data);
  177 +
  178 + var htmlStr = template('sub-task-v2-edit-form-temp', {sch: sch, cTask: cTask});
  179 + var f = $(htmlStr);
  180 + $('.forms', modal).append(f);
  181 + //字典转换
  182 + dictionaryUtils.transformDom($('.nt-dictionary', f));
  183 +
  184 + //设置下拉框默认值
  185 + $f('type2', f).val(cTask.type2).trigger('change');//班次类型
  186 + $f('startStation', f).val(cTask.startStation);//起点站
  187 + $f('endStation', f).val(cTask.endStation);//终点站
  188 + $f('mileageType', f).val(cTask.mileageType);//里程类型
  189 + if(cTask.destroy)
  190 + $f('destroy', f).trigger('click');//烂班
  191 + if(cTask.reason)
  192 + $f('reason', f).val(cTask.reason);//原因
  193 + if(cTask.noClerk)
  194 + $f('noClerk', f).trigger('click');//无售票员
  195 +
  196 + f.formValidation({
  197 + framework: 'uikit',
  198 + locale: 'zh_CN'
  199 + });
  200 + $('button[type=submit]', modal).on('click', function () {
  201 + f.formValidation('validate');
  202 + });
  203 +
  204 + //提交
  205 + f.on('success.form.fv', function (e) {
  206 + e.preventDefault();
  207 + $('button[type=submit]', modal).attr('disabled', 'disabled');
  208 +
  209 + var data=$.extend(f.serializeJSON(), gb_common.getDisabledVal(f));
  210 +
  211 + gb_common.$post('/childTask/update', data, function (rs) {
  212 + notify_succ('修改成功!');
  213 + gb_schedule_table.updateSchedule(rs.t);
  214 +
  215 + UIkit.modal(modal).hide();
  216 + $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: sch});
  217 +
  218 + //更新路牌公里统计面板
  219 + gb_schedule_table.showLpMileageTipBySch(rs.t);
  220 + });
  221 + });
  222 +
  223 + f.on('err.field.fv', function () {
  224 + $('button[type=submit]', modal).removeClass('disabled').removeAttr('disabled');
  225 + });
  226 + });
  227 +
  228 + //班次类型切换事件
  229 + $(modal).on('change', 'select[name=type2]', reCalcInputs_type);
  230 + //烂班选项点击事件
  231 + $(modal).on('change', 'input[name=destroy]', destroyClick);
  232 + //进出场原因切换
  233 + $(modal).on('change', 'select[name=reason]', reSynchroReason);
  234 +
  235 + /**
  236 + * 根据班次类型切换起终点下拉框
  237 + */
  238 + function reCalcInputs_type() {
  239 + var f = $(this).parents('.sub_task_form_v2');
  240 + var upDown = sch.xlDir;
  241 + if($('[name=upDown]', f).length>0)
  242 + upDown = $('[name=upDown]', f).val();
  243 + var routes = stationRoutes[upDown]
  244 + , lastCode = routes[routes.length - 1].stationCode
  245 + , opts = '', park_opts = '';
  246 + //station options
  247 + $.each(routes, function () {
  248 + opts += '<option value="' + this.stationCode + '">' + this.stationName + '</option>'
  249 + });
  250 + //park options
  251 + for(var i=0,p;p=parks[i++];)
  252 + park_opts += '<option value="' + p.code + '">' + p.name + '</option>';
  253 + /*for (var code in parks)
  254 + park_opts += '<option value="' + code + '">' + parks[code] + '</option>';*/
  255 +
  256 + var qdz = $f('startStation', f), zdz = $f('endStation', f), mType = $f('mileageType', f);
  257 + var domainsTemp;
  258 + switch ($(this).val()) {
  259 + case '3'://出场
  260 + qdz.html(park_opts).val(information.carPark);
  261 + zdz.html(opts).trigger('change');
  262 + mType.val('empty').attr('disabled', 'disabled').trigger('change');
  263 + domainsTemp = 'st-edit-domains-inout-form-temp';
  264 + break;
  265 + case '2'://进场
  266 + qdz.html(opts);
  267 + zdz.html(park_opts).val(information.carPark).trigger('change');
  268 + mType.val('empty').attr('disabled', 'disabled').trigger('change');
  269 + domainsTemp = 'st-edit-domains-inout-form-temp';
  270 + break;
  271 + default:
  272 + qdz.html(opts);
  273 + zdz.html(opts).val(lastCode).trigger('change');
  274 + mType.val('service').removeAttr('disabled').trigger('change');
  275 + domainsTemp = 'st-edit-domains-service-form-temp';
  276 + }
  277 +
  278 + //可变选项区域
  279 + $('.domains', f).html(template(domainsTemp, {
  280 + adjustExps: gb_common.adjustExps,
  281 + inOutExps: gb_common.inOutExps
  282 + }));
  283 +
  284 + //校验reason
  285 + f.trigger('add_reason_field');
  286 + }
  287 +
  288 +
  289 + function $f(name, f) {
  290 + return $('[name=' + name + ']', f);
  291 + }
  292 +
  293 + /**
  294 + * 停车场排序
  295 + * @param parks 停车场 code 2 name
  296 + * @param information 线路标准
  297 + * @param st_park_data 站到场
  298 + */
  299 + function sort_parks(parks, information, st_park_data) {
  300 + var array = [], names=[];
  301 + for(var code in parks){
  302 + array.push({code: code, name: parks[code]});
  303 + }
  304 +
  305 + if(st_park_data && st_park_data.length > 0){
  306 + $.each(st_park_data, function () {
  307 + names.push(this.parkName);
  308 + });
  309 + }
  310 +
  311 + //debugger
  312 + array.sort(function (a, b) {
  313 + if(a.code==information.carPark)
  314 + return -1;
  315 + if(b.code==information.carPark)
  316 + return 1;
  317 +
  318 + var ai = names.indexOf(a.name),
  319 + bi = names.indexOf(b.name);
  320 +
  321 + if(ai!=-1 && bi==-1)
  322 + return -1;
  323 + else if(ai==-1 && bi!=-1)
  324 + return 1;
  325 + else
  326 + return a.name.localeCompare(b.name);
  327 + });
  328 + return array;
  329 + }
  330 +
  331 + function destroyClick() {
  332 + var f = $(this).parents('.sub_task_form_v2');
  333 + if (this.checked) {
  334 + $('.destroy_reason_wrap', f).show();
  335 + f.attr('destroy', true);//.addClass('destroy_form');
  336 + }
  337 + else {
  338 + $('.destroy_reason_wrap', f).hide();
  339 + f.removeAttr('destroy');//.removeClass('destroy_form');
  340 + }
  341 + //reCalcMileageCount();
  342 + }
  343 +
  344 + /**
  345 + * 切换原因
  346 + */
  347 + function reSynchroReason() {
  348 + var f = $(this).parents('.sub_task_form_v2'),
  349 + reason = $(this).val(),
  350 + remInput = $('[name=remarks]', f);
  351 +
  352 + if(remInput.val()==reason + ',')
  353 + return;
  354 + remInput.val(remInput.val() + reason + ',');
  355 + }
  356 +
  357 +
  358 + $('.delete_link', modal).on('click', function () {
  359 + var id = cTask.id;
  360 + if(!id){
  361 + notify_err('无法获取标识键!');
  362 + return;
  363 + }
  364 +
  365 + var str = '<h3>确定要删除这条子任务?</h3>';
  366 + alt_confirm(str, function () {
  367 + gb_common.$del('/childTask/' + id, function (rs) {
  368 + gb_schedule_table.updateSchedule(rs.t);
  369 +
  370 + UIkit.modal(modal).hide();
  371 + $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: sch});
  372 +
  373 + //更新路牌公里统计面板
  374 + gb_schedule_table.showLpMileageTipBySch(rs.t);
  375 + });
  376 + }, '确定删除');
  377 + });
  378 + })();
  379 + </script>
380 </div> 380 </div>
381 \ No newline at end of file 381 \ No newline at end of file
src/main/resources/static/real_control_v2/js/line_schedule/mileage_count.js
1 -  
2 -/**  
3 - * 统计班次公里  
4 - * @type {{}}  
5 - */  
6 -var gb_sch_mileage_count = (function () {  
7 -  
8 -  
9 - var isInOut = function (sch) {  
10 - return sch.bcType=='out' || sch.bcType=='in';  
11 - };  
12 -  
13 - return {  
14 - serviceMileage: function (array) {  
15 - var sum = 0;  
16 - var cts;  
17 -  
18 - for(var i=0,sch;sch=array[i++];){  
19 - if (sch.status == -1)  
20 - continue;  
21 -  
22 - if (isInOut(sch) || sch.bcType=='ldks')  
23 - continue;  
24 -  
25 - cts = sch['cTasks'];  
26 -  
27 - //有子任务  
28 - if (cts && cts.length > 0) {  
29 - for(var j=0,ct;ct=cts[j++];){  
30 - if (ct.mileageType=="service" && !ct.destroy)  
31 - sum = gb_common.accAdd(sum, ct.mileage);  
32 - }  
33 - }  
34 - else if(!sch.fcsjActual || !sch.zdsjActual)  
35 - continue;  
36 - else  
37 - sum = gb_common.accAdd(sum, sch.jhlc);  
38 - }  
39 -  
40 - return sum;  
41 - },  
42 - destroyMileage: function (array) {  
43 - var sum = 0;  
44 - var cts;  
45 -  
46 - for(var i=0,sch;sch=array[i++];){  
47 - if (isInOut(sch) || sch.bcType=='ldks' || sch.sflj)  
48 - continue;  
49 -  
50 - cts = sch['cTasks'];  
51 -  
52 - //有子任务  
53 - if (cts && cts.length > 0) {  
54 - for(var j=0,ct;ct=cts[j++];){  
55 - if (ct.destroy && ct.mileageType=="service")  
56 - sum = gb_common.accAdd(sum, ct.mileage);  
57 - }  
58 - }else if (sch.status == -1)  
59 - sum = gb_common.accAdd(sum, sch.jhlcOrig);  
60 - }  
61 -  
62 - return sum;  
63 - },  
64 - emptyMileage: function (array) {  
65 - var sum = 0;  
66 - var cts;  
67 -  
68 - for(var i=0,sch;sch=array[i++];){  
69 -  
70 - cts = sch['cTasks'];  
71 -  
72 - //有子任务  
73 - if (cts && cts.length > 0) {  
74 - for(var j=0,ct;ct=cts[j++];){  
75 - if (!ct.destroy && ct.mileageType=="empty")  
76 - sum = gb_common.accAdd(sum, ct.mileage);  
77 - }  
78 - }  
79 - else if(!sch.fcsjActual || !sch.zdsjActual)  
80 - continue;  
81 - else if ((isInOut(sch) || sch.bcType=="ldks") && sch.status != -1)  
82 - sum = gb_common.accAdd(sum, sch.jhlc);  
83 - }  
84 -  
85 - return sum;  
86 - }  
87 - } 1 +
  2 +/**
  3 + * 统计班次公里
  4 + * @type {{}}
  5 + */
  6 +var gb_sch_mileage_count = (function () {
  7 +
  8 +
  9 + var isInOut = function (sch) {
  10 + return sch.bcType=='out' || sch.bcType=='in';
  11 + };
  12 +
  13 + return {
  14 + serviceMileage: function (array) {
  15 + var sum = 0;
  16 + var cts;
  17 +
  18 + for(var i=0,sch;sch=array[i++];){
  19 + if (sch.status == -1)
  20 + continue;
  21 +
  22 + if (isInOut(sch) || sch.bcType=='ldks')
  23 + continue;
  24 +
  25 + cts = sch['cTasks'];
  26 +
  27 + //有子任务
  28 + if (cts && cts.length > 0) {
  29 + for(var j=0,ct;ct=cts[j++];){
  30 + if (ct.mileageType=="service" && !ct.destroy)
  31 + sum = gb_common.accAdd(sum, ct.mileage);
  32 + }
  33 + }
  34 + else if(!sch.fcsjActual || !sch.zdsjActual)
  35 + continue;
  36 + else
  37 + sum = gb_common.accAdd(sum, sch.jhlc);
  38 + }
  39 +
  40 + return sum;
  41 + },
  42 + destroyMileage: function (array) {
  43 + var sum = 0;
  44 + var cts;
  45 +
  46 + for(var i=0,sch;sch=array[i++];){
  47 + if (isInOut(sch) || sch.bcType=='ldks' || sch.sflj)
  48 + continue;
  49 +
  50 + cts = sch['cTasks'];
  51 +
  52 + //有子任务
  53 + if (cts && cts.length > 0) {
  54 + for(var j=0,ct;ct=cts[j++];){
  55 + if (ct.destroy && ct.mileageType=="service")
  56 + sum = gb_common.accAdd(sum, ct.mileage);
  57 + }
  58 + }else if (sch.status == -1)
  59 + sum = gb_common.accAdd(sum, sch.jhlcOrig);
  60 + }
  61 +
  62 + return sum;
  63 + },
  64 + emptyMileage: function (array) {
  65 + var sum = 0;
  66 + var cts;
  67 +
  68 + for(var i=0,sch;sch=array[i++];){
  69 +
  70 + cts = sch['cTasks'];
  71 +
  72 + //有子任务
  73 + if (cts && cts.length > 0) {
  74 + for(var j=0,ct;ct=cts[j++];){
  75 + if (!ct.destroy && ct.mileageType=="empty")
  76 + sum = gb_common.accAdd(sum, ct.mileage);
  77 + }
  78 + }
  79 + else if(!sch.fcsjActual || !sch.zdsjActual)
  80 + continue;
  81 + else if ((isInOut(sch) || sch.bcType=="ldks") && sch.status != -1)
  82 + sum = gb_common.accAdd(sum, sch.jhlc);
  83 + }
  84 +
  85 + return sum;
  86 + }
  87 + }
88 })(); 88 })();
89 \ No newline at end of file 89 \ No newline at end of file