Commit 5f7a25ae410a741827fd6e5ed512588516d51ee5

Authored by 廖磊
1 parent 23f73f00

新增

src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
... ... @@ -351,7 +351,15 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo,
351 351 @RequestMapping(value="/queryListWaybill")
352 352 public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName
353 353 ,@RequestParam String date){
354   - return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date);
  354 + String type="fqp";
  355 + return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date,type);
  356 + }
  357 +
  358 + @RequestMapping(value="/queryListWaybillQp")
  359 + public List<ScheduleRealInfo> queryListWaybillQp(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName
  360 + ,@RequestParam String date){
  361 + String type="qp";
  362 + return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date,type);
355 363 }
356 364  
357 365 @RequestMapping(value="/statisticsDaily")
... ...
src/main/java/com/bsth/entity/oil/Ylxxb.java
... ... @@ -10,6 +10,8 @@ import javax.persistence.Transient;
10 10  
11 11 import org.springframework.format.annotation.DateTimeFormat;
12 12  
  13 +import com.bsth.data.BasicData;
  14 +
13 15 @Entity
14 16 @Table(name = "bsth_c_ylxxb")
15 17 public class Ylxxb {
... ... @@ -38,6 +40,10 @@ public class Ylxxb {
38 40 private String ldgh;
39 41 //0为接口数据,1为手工输入
40 42 private int jylx=0;
  43 + @Transient
  44 + private String gsname;
  45 + @Transient
  46 + private String fgsname;
41 47  
42 48  
43 49 public Integer getId() {
... ... @@ -163,6 +169,20 @@ public class Ylxxb {
163 169 this.jylx = jylx;
164 170 }
165 171  
  172 + public String getGsname() {
  173 + return BasicData.businessCodeNameMap.get(this.gsdm);
  174 + }
  175 +
  176 + public void setGsname(String gsname) {
  177 + this.gsname = gsname;
  178 + }
166 179  
  180 + public String getFgsname() {
  181 + return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm);
  182 + }
  183 +
  184 + public void setFgsname(String fgsname) {
  185 + this.fgsname = fgsname;
  186 + }
167 187  
168 188 }
... ...
src/main/java/com/bsth/service/oil/impl/CwjyServiceImpl.java
1 1 package com.bsth.service.oil.impl;
2 2  
  3 +import java.sql.ResultSet;
  4 +import java.sql.SQLException;
3 5 import java.text.ParseException;
4 6 import java.text.SimpleDateFormat;
5 7 import java.util.ArrayList;
  8 +import java.util.Arrays;
6 9 import java.util.HashMap;
7 10 import java.util.List;
8 11 import java.util.Map;
9 12  
10 13 import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.jdbc.core.JdbcTemplate;
  15 +import org.springframework.jdbc.core.RowMapper;
11 16 import org.springframework.stereotype.Service;
12 17  
13 18 import com.bsth.common.ResponseCode;
... ... @@ -28,17 +33,103 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
28 33 @Autowired
29 34 YlxxbRepository ylxxbRepository;
30 35  
  36 + @Autowired
  37 + JdbcTemplate jdbcTemplate;
  38 +
31 39 @SuppressWarnings("unchecked")
32 40 public PageObject<Ylxxb> Pagequery(Map<String, Object> map) {
33   - // TODO Auto-generated method stub
  41 + int page=Integer.parseInt(map.get("page").toString());
34 42 SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
35   - List<Ylxxb> yList=new ArrayList<Ylxxb>();
  43 +
36 44 String rq=map.get("rq").toString();
37 45 String nbbm="";
38   - if(map.get("nbbm")!=null){
39   - nbbm=map.get("nbbm").toString();
  46 + if(map.get("nbbh")!=null){
  47 + nbbm=map.get("nbbh").toString();
  48 + }
  49 +
  50 + Object gsdmIn=map.get("gsdm_in");
  51 + Object fgsdmIn=map.get("fgsdm_in");
  52 + String addSql="";
  53 + String gsdmLike="";
  54 + String fgsdmLike="";
  55 +
  56 + //选择了公司
  57 + if(gsdmIn==null){
  58 + gsdmLike=map.get("gsdm_like").toString();
  59 + addSql += " and a.gsdm = '"+gsdmLike+ "' ";
  60 +
  61 + //选择了分公司
  62 + if(fgsdmIn==null){
  63 + fgsdmLike=map.get("fgsdm_like").toString();;
  64 + addSql += " and a.fgsdm = '"+fgsdmLike+ "' ";
  65 + }else{
  66 + String fgsdmIns[]= fgsdmIn.toString().split(",");
  67 + addSql +=" and a.fgsdm in (";
  68 + for(int i=0;i<fgsdmIns.length;i++){
  69 + addSql +="'"+fgsdmIns[i]+"'";
  70 + if(i<fgsdmIns.length-1){
  71 + addSql +=",";
  72 + }
  73 + }
  74 + addSql +=")";
  75 + }
  76 + }else{
  77 + //没有选择公司 (分公司也没有选择)
  78 + String gsdmIns[]=gsdmIn.toString().split(",");
  79 + addSql += " and a.gsdm in (";
  80 + for(int i=0;i<gsdmIns.length;i++){
  81 + addSql +="'" +gsdmIns[i]+"'";
  82 + if(i<gsdmIns.length-1){
  83 + addSql+=",";
  84 + }
  85 + }
  86 + addSql +=")";
  87 + String fgsdmIns[]= fgsdmIn.toString().split(",");
  88 + addSql +=" and a.fgsdm in (";
  89 + for(int i=0;i<fgsdmIns.length;i++){
  90 + addSql +="'"+fgsdmIns[i]+"'";
  91 + if(i<fgsdmIns.length-1){
  92 + addSql +=",";
  93 + }
  94 + }
  95 + addSql +=")";
  96 +
  97 +
40 98 }
41   - List<Object[]> list=repository.obtainCwjycl(rq,nbbm);
  99 + String countSql="SELECT ifnull(count(*),0) as countTs FROM bsth_c_cwjy a "+
  100 + " left join ( select * from bsth_c_ylxxb b where to_days(b.yyrq)=to_days('"+rq+"') and jylx=1) b " +
  101 + " on a.nbbm=b.nbbm left join (select nbbm,group_concat(jsy) as jsy "
  102 + + "from bsth_c_ylb where to_days(rq)= to_days('"+rq+"' ) group by nbbm "+
  103 + " ) c on a.nbbm=c.nbbm where a.nbbm like '%"+nbbm+"%' " +addSql ;
  104 + int listsize=jdbcTemplate.queryForObject(countSql, Integer.class);
  105 + // TODO Auto-generated method stub
  106 + String sql="SELECT a.gsdm as gsdm,a.fgsdm as fgsdm,a.nbbm as nbbm,b.jsy as jsy,b.jzl as jzl ,b.stationid as stationid,"
  107 + + "b.nylx as nylx,b.yj as yj,b.bz as bz,c.jsy as ldgh FROM bsth_c_cwjy a "+
  108 + " left join ( select * from bsth_c_ylxxb b where to_days(b.yyrq)=to_days('"+rq+"') and jylx=1) b " +
  109 + " on a.nbbm=b.nbbm left join (select nbbm,group_concat(jsy) as jsy "
  110 + + "from bsth_c_ylb where to_days(rq)= to_days('"+rq+"' ) group by nbbm "+
  111 + " ) c on a.nbbm=c.nbbm where a.nbbm like '%"+nbbm+"%' " +addSql+ " limit "+page*10+","+10;
  112 +
  113 +
  114 + List<Ylxxb> yList= jdbcTemplate.query(sql,
  115 + new RowMapper<Ylxxb>(){
  116 + @Override
  117 + public Ylxxb mapRow(ResultSet rs, int rowNum) throws SQLException {
  118 + Ylxxb t=new Ylxxb();
  119 + t.setGsdm(rs.getString("gsdm"));
  120 + t.setFgsdm(rs.getString("fgsdm"));
  121 + t.setNbbm(rs.getString("nbbm"));
  122 + t.setJsy(rs.getString("jsy"));
  123 + t.setJzl(rs.getDouble("jzl"));
  124 + t.setStationid(rs.getString("stationid"));
  125 + t.setNylx(rs.getInt("nylx"));
  126 + t.setYj(rs.getDouble("yj"));
  127 + t.setBz(rs.getString("bz"));
  128 + t.setLdgh(rs.getString("ldgh"));
  129 + return t;
  130 + }
  131 + });
  132 + /*List<Object[]> list=repository.obtainCwjycl(rq,nbbm);
42 133 for (int i = 0; i < list.size(); i++) {
43 134 Ylxxb y=new Ylxxb();
44 135 y.setGsdm(list.get(i)[0]==null?"":list.get(i)[0].toString());
... ... @@ -57,8 +148,8 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
57 148 e.printStackTrace();
58 149 }
59 150 yList.add(y);
60   - }
61   - PageHelper pageHelper = new PageHelper(yList.size(), map);
  151 + }*/
  152 + PageHelper pageHelper = new PageHelper(listsize, map);
62 153 pageHelper.getMap();
63 154 PageObject<Ylxxb> pageObject=pageHelper.getPageObject();
64 155 pageObject.setDataList(yList);
... ...
src/main/java/com/bsth/service/oil/impl/YlxxbServiceImpl.java
... ... @@ -34,6 +34,7 @@ public class YlxxbServiceImpl extends BaseServiceImpl&lt;Ylxxb,Integer&gt; implements
34 34  
35 35 @Override
36 36 public PageObject<Ylxxb> Pagequery(Map<String, Object> map) {
  37 +
37 38 String rq=map.get("yyrq").toString();
38 39 SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
39 40 try {
... ... @@ -51,6 +52,15 @@ public class YlxxbServiceImpl extends BaseServiceImpl&lt;Ylxxb,Integer&gt; implements
51 52 // TODO Auto-generated catch block
52 53 e.printStackTrace();
53 54 }
  55 + /*if(map.get("gsdm_in")!=null){
  56 + map.put("ssgsdm_in", map.get("gsdm_in"));
  57 + map.remove("gsdm_in");
  58 +
  59 + }else{
  60 + map.put("ssgsdm_like", map.get("gsdm_like"));
  61 + map.remove("gsdm_like");
  62 + }*/
  63 +
54 64 //根具条件查询指定日期Ylb的数据
55 65 List<Ylb> ylbIterator=(List<Ylb>) ylbRepository.findAll(new CustomerSpecs<Ylb>(map));
56 66 List<Ylxxb> list=new ArrayList<Ylxxb>();
... ...
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
... ... @@ -98,7 +98,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
98 98  
99 99 List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName,String code);
100 100  
101   - List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date);
  101 + List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date,String type);
102 102  
103 103 Map<String, Object> removeChildTask(Long taskId);
104 104  
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -1209,8 +1209,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1209 1209  
1210 1210 @Override
1211 1211 public List<ScheduleRealInfo> queryListWaybill(String jName, String clZbh,
1212   - String lpName,String date) {
1213   - return scheduleRealInfoRepository.queryListWaybill2(jName,clZbh,lpName,date);
  1212 + String lpName,String date,String type) {
  1213 + if(type.equals("qp")){
  1214 + return scheduleRealInfoRepository.queryListWaybill2(jName,clZbh,lpName,date);
  1215 + }else{
  1216 + return scheduleRealInfoRepository.queryListWaybill(jName,clZbh,lpName,date);
  1217 + }
1214 1218 }
1215 1219  
1216 1220 @Override
... ...
src/main/resources/static/pages/excep/offlineList.html
... ... @@ -223,6 +223,7 @@ $(function(){
223 223 }
224 224  
225 225 function showPagination(data){
  226 + console.log(data);
226 227 //分页
227 228 $('#pagination').jqPaginator({
228 229 totalPages: data.totalPage,
... ... @@ -299,11 +300,4 @@ $(function(){
299 300 }
300 301 });
301 302 });
302   -//改变状态
303   -function changeEnabled(id,enabled){
304   - debugger
305   - $get('/user/changeEnabled',{id:id,enabled:enabled},function(result){
306   - jsDoQuery(null, true);
307   - })
308   -}
309 303 </script>
310 304 \ No newline at end of file
... ...
src/main/resources/static/pages/forms/statement/waybillBf.html
1   -<style type="text/css">
2   - .table-bordered {
3   - border: 1px solid; }
4   - .table-bordered > thead > tr > th,
5   - .table-bordered > thead > tr > td,
6   - .table-bordered > tbody > tr > th,
7   - .table-bordered > tbody > tr > td,
8   - .table-bordered > tfoot > tr > th,
9   - .table-bordered > tfoot > tr > td {
10   - border: 1px solid; }
11   - .table-bordered > thead > tr > th,
12   - .table-bordered > thead > tr > td {
13   - border-bottom-width: 2px; }
14   -
15   - .table > tbody + tbody {
16   - border-top: 1px solid; }
17   -</style>
18   -
19   -<div class="page-head">
20   - <div class="page-title">
21   - <h1>行车路单</h1>
22   - </div>
23   -</div>
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px; }
  14 +
  15 + .table > tbody + tbody {
  16 + border-top: 1px solid; }
  17 +</style>
  18 +
  19 +<div class="page-head">
  20 + <div class="page-title">
  21 + <h1>行车路单</h1>
  22 + </div>
  23 +</div>
  24 +
24 25  
25 26 <div class="row">
  27 +
26 28 <div class="col-md-12">
  29 +
27 30 <div class="portlet light porttlet-fit bordered">
  31 +
28 32 <div class="portlet-title">
  33 +
29 34 <form class="form-inline" action="">
  35 +
30 36 <div style="display: inline-block;">
31   - <span class="item-label" style="width: 80px;">线路: </span>
  37 +
  38 + <span class="item-label" style="width: 80px;">线路: </span>
32 39 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  40 +
33 41 </div>
  42 +
34 43 <div style="display: inline-block;margin-left: 15px;">
  44 +
35 45 <span class="item-label" style="width: 80px;">时间: </span>
  46 +
36 47 <input class="form-control" type="text" id="date" style="width: 180px;"/>
  48 +
37 49 </div>
  50 +
38 51 <div class="form-group" style="display: inline-block;margin-left: 15px;">
  52 +
39 53 <input class="btn btn-default" type="button" id="query" value="查询"/>
  54 +
40 55 <input class="btn btn-default" type="button" id="export" value="导出"/>
  56 +
41 57 <input class="btn btn-default" type="button" id="print" value="打印"/>
  58 +
42 59 <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/>
  60 +
43 61 </div>
  62 +
44 63 </form>
  64 +
45 65 </div>
  66 +
46 67 <div class="portlet-body">
  68 +
47 69 <div class="row">
  70 +
48 71 <div class="col-md-3">
  72 +
49 73 <div class="" style="margin-top: 10px;overflow:auto;height: 860px">
  74 +
50 75 <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info">
  76 +
51 77 <thead>
  78 +
52 79 <tr class="hidden">
  80 +
53 81 <th>人员</th>
  82 +
54 83 <th>自编号</th>
  84 +
55 85 <th>路牌</th>
  86 +
56 87 </tr>
  88 +
57 89 </thead>
  90 +
58 91 <tbody>
  92 +
59 93  
  94 +
60 95 </tbody>
  96 +
61 97 </table>
  98 +
62 99 </div>
  100 +
63 101 </div>
  102 +
64 103 <div class="col-md-9" id="printArea">
  104 +
65 105 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  106 +
66 107 <table class="table table-bordered table-checkable" id="forms">
67   - <tbody class="ludan_1">
68   -
69   - </tbody>
70   - <tbody class="ludan_2">
71   -
72   - </tbody>
73   - <tbody class="ludan_3">
74   -
75   - </tbody>
76   - <tbody class="ludan_4">
77   -
  108 +
  109 + <tbody class="ludan_1">
  110 +
  111 + </tbody>
  112 + <tbody class="ludan_2">
  113 +
  114 + </tbody>
  115 + <tbody class="ludan_3">
  116 +
  117 + </tbody>
  118 + <tbody class="ludan_4">
  119 +
78 120 </tbody>
  121 +
79 122 </table>
  123 +
80 124 </div>
  125 +
81 126 </div>
  127 +
82 128 </div>
  129 +
83 130 </div>
  131 +
84 132 </div>
  133 +
85 134 </div>
  135 +
86 136 </div>
87 137  
  138 +
  139 +
88 140 <script>
  141 +
89 142 $(function(){
  143 +
90 144 // 关闭左侧栏
  145 +
91 146 if (!$('body').hasClass('page-sidebar-closed'))
92   - $('.menu-toggler.sidebar-toggler').click();
  147 +
  148 + $('.menu-toggler.sidebar-toggler').click();
93 149  
  150 +
94 151 $("#date").datetimepicker({
  152 +
95 153 format : 'YYYY-MM-DD',
  154 +
96 155 locale : 'zh-cn'
97   - });
98   -
99   - $('#line').select2({
100   - ajax: {
101   - url: '/realSchedule/findLine',
102   - type: 'post',
103   - dataType: 'json',
104   - delay: 150,
105   - data: function(params){
106   - return{line: params.term};
107   - },
108   - processResults: function (data) {
109   - return {
110   - results: data
111   - };
112   - },
113   - cache: true
114   - },
115   - templateResult: function(repo){
116   - if (repo.loading) return repo.text;
117   - var h = '<span>'+repo.text+'</span>';
118   - return h;
119   - },
120   - escapeMarkup: function (markup) { return markup; },
121   - minimumInputLength: 1,
122   - templateSelection: function(repo){
123   - return repo.text;
124   - },
125   - language: {
126   - noResults: function(){
127   - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
128   - },
129   - inputTooShort : function(e) {
130   - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
131   - },
132   - searching : function() {
133   - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
134   - }
135   - }
136   - });
137   -
  156 +
  157 + });
  158 +
  159 + $('#line').select2({
  160 + ajax: {
  161 + url: '/realSchedule/findLine',
  162 + type: 'post',
  163 + dataType: 'json',
  164 + delay: 150,
  165 + data: function(params){
  166 + return{line: params.term};
  167 + },
  168 + processResults: function (data) {
  169 + return {
  170 + results: data
  171 + };
  172 + },
  173 + cache: true
  174 + },
  175 + templateResult: function(repo){
  176 + if (repo.loading) return repo.text;
  177 + var h = '<span>'+repo.text+'</span>';
  178 + return h;
  179 + },
  180 + escapeMarkup: function (markup) { return markup; },
  181 + minimumInputLength: 1,
  182 + templateSelection: function(repo){
  183 + return repo.text;
  184 + },
  185 + language: {
  186 + noResults: function(){
  187 + return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
  188 + },
  189 + inputTooShort : function(e) {
  190 + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
  191 + },
  192 + searching : function() {
  193 + return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
  194 + }
  195 + }
  196 + });
  197 +
138 198 var date = '';
  199 +
139 200 $("#query").on("click",function(){
  201 +
140 202 var line = $("#line").val();
141   - date = $("#date").val();
  203 +
  204 + date = $("#date").val();
142 205 $(".hidden").removeClass("hidden");
  206 +
143 207 $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){
  208 +
144 209 // 把数据填充到模版中
  210 +
145 211 var tbodyHtml = template('list_info',{list:result});
  212 +
146 213 // 把渲染好的模版html文本追加到表格中
  214 +
147 215 $('#info tbody').html(tbodyHtml);
  216 +
148 217 });
149   - });
150   -
151   - var params = new Array();
  218 +
  219 + });
  220 +
  221 + var params = new Array();
152 222 var jName = '';
153   - $("#info tbody").on("click","tr",function(){
154   - if($(this).children().size() < 2){
155   - return;
  223 +
  224 + $("#info tbody").on("click","tr",function(){
  225 + if($(this).children().size() < 2){
  226 + return;
156 227 }
  228 +
157 229  
  230 +
158 231 $(this).children().each(function(index){
  232 +
159 233 params[index] = $(this).text();
160   - });
161   - console.log(params);
162   - jName = params[0].split("\\")[0];
163   - var id = $("#"+params[1]).val();
164   - $get('/realSchedule/'+id,null,function(result){
165   - console.log(result);
166   - result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD");
167   - var ludan_1 = template('ludan_1',result);
168   - //var ludan_4 = template('ludan_4',result);
169   - // 把渲染好的模版html文本追加到表格中
170   - $('#forms .ludan_1').html(ludan_1);
171   - //$('#forms .ludan_4').html(ludan_4);
  234 +
  235 + });
  236 + console.log(params);
  237 + jName = params[0].split("\\")[0];
  238 + var id = $("#"+params[1]).val();
  239 + $get('/realSchedule/'+id,null,function(result){
  240 + console.log(result);
  241 + result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD");
  242 + var ludan_1 = template('ludan_1',result);
  243 + //var ludan_4 = template('ludan_4',result);
  244 + // 把渲染好的模版html文本追加到表格中
  245 + $('#forms .ludan_1').html(ludan_1);
  246 + //$('#forms .ludan_4').html(ludan_4);
172 247 });
173   - $post('/realSchedule/queryListWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  248 +
  249 + $post('/realSchedule/queryListWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
174 250 getTime(result);
  251 +
175 252 var ludan_2 = template('ludan_2',{list:result});
  253 +
176 254 // 把渲染好的模版html文本追加到表格中
  255 +
177 256 $('#forms .ludan_2').html(ludan_2);
178   - });
179   - $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
180   - var ludan_3 = template('ludan_3',result);
181   - $('#forms .ludan_3').html(ludan_3);
182   - });
  257 +
  258 + });
  259 + $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  260 + var ludan_3 = template('ludan_3',result);
  261 + $('#forms .ludan_3').html(ludan_3);
  262 + });
183 263  
184   - });
185   -
186   - $("#export").on("click",function(){
187   - if(params.length < 1){
188   - return;
189   - }
190   - $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
191   - window.open("/downloadFile/download?fileName="+jName);
192   - });
193   - });
194   -
195   - $("#print").click(function(){
196   - $("#printArea").printArea();
197   - });
198   -
199   - $("#exportMore").on("click",function(){
200   - return;
201   - $post('/realSchedule/exportWaybillMore',{date:date},function(result){
202   - window.open("/downloadFile/download?fileName="+jName);
203   - });
204   - });
205   -
206   - function getTime(list){
207   - $.each(list, function(i, obj) {
208   - if(obj.zdsj != null && obj.zdsjActual != null ){
209   - var zdsjActual = (obj.zdsjActual).split(":");
210   - var zdsj = (obj.zdsj).split(":");
211   - if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){
212   - obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1]));
213   - }
214   - else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){
215   - obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1]));
216   - }
217   - }
218   - });
  264 +
  265 + });
  266 +
  267 + $("#export").on("click",function(){
  268 + if(params.length < 1){
  269 + return;
  270 + }
  271 + $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  272 + window.open("/downloadFile/download?fileName="+jName);
  273 + });
  274 + });
  275 +
  276 + $("#print").click(function(){
  277 + $("#printArea").printArea();
  278 + });
  279 +
  280 + $("#exportMore").on("click",function(){
  281 + return;
  282 + $post('/realSchedule/exportWaybillMore',{date:date},function(result){
  283 + window.open("/downloadFile/download?fileName="+jName);
  284 + });
  285 + });
  286 +
  287 + function getTime(list){
  288 + $.each(list, function(i, obj) {
  289 + if(obj.zdsj != null && obj.zdsjActual != null ){
  290 + var zdsjActual = (obj.zdsjActual).split(":");
  291 + var zdsj = (obj.zdsj).split(":");
  292 + if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){
  293 + obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1]));
  294 + }
  295 + else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){
  296 + obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1]));
  297 + }
  298 + }
  299 + });
219 300 }
  301 +
220 302 });
  303 +
221 304 </script>
  305 +
222 306 <script type="text/html" id="list_info">
  307 +
223 308 {{each list as obj i}}
  309 +
224 310 <tr>
  311 +
225 312 <td width="45%">{{obj[4]}}\{{obj[1]}}</td>
  313 +
226 314 <td width="32%">{{obj[2]}}</td>
  315 +
227 316 <td width="23%">{{obj[3]}}<input type="hidden" id="{{obj[2]}}" value="{{obj[0]}}"></td>
  317 +
228 318 </tr>
  319 +
229 320 {{/each}}
  321 +
230 322 {{if list.length == 0}}
  323 +
231 324 <tr>
  325 +
232 326 <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td>
  327 +
233 328 </tr>
  329 +
234 330 {{/if}}
235   -</script>
236   -<script type="text/html" id="ludan_1">
237   - <tr>
238   - <td colspan="14">行车路单</td>
239   - </tr>
240   - <tr>
241   - <td colspan="14">路别:{{xlName}} 路牌:{{lpName}} 车号:{{clZbh}} 出场时间:{{fcsjActual}} 到达站名:{{zdzName}} 当班调派:&nbsp; 日期:{{scheduleDate}}</td>
242   - </tr>
243   - <tr>
244   - <td colspan="2">出场存油 &nbsp;升</td>
245   - <td colspan="2">加注油量 &nbsp;升</td>
246   - <td colspan="2">进场存油 &nbsp;升</td>
247   - <td colspan="4">加注机油 &nbsp;升</td>
248   - <td colspan="4">本日耗油 &nbsp;升</td>
249   - </tr>
250   - <tr>
251   - <td rowspan="2">调度章</td>
252   - <td colspan="1">&nbsp;</td>
253   - <td rowspan="2">早班</td>
254   - <td colspan="1">&nbsp;</td>
255   - <td rowspan="2">夜班</td>
256   - <td colspan="1">&nbsp;</td>
257   - <td rowspan="2" colspan="2">交叉</td>
258   - <td colspan="2">&nbsp;</td>
259   - <td rowspan="2">其他</td>
260   - <td colspan="1">&nbsp;</td>
261   - <td colspan="1">&nbsp;</td>
262   - <td colspan="1">&nbsp;</td>
263   - </tr>
264   - <tr>
265   - <td colspan="1">&nbsp;</td>
266   - <td colspan="1">&nbsp;</td>
267   - <td colspan="1">&nbsp;</td>
268   - <td colspan="2">&nbsp;</td>
269   - <td colspan="1">&nbsp;</td>
270   - <td colspan="1">&nbsp;</td>
271   - <td colspan="1">&nbsp;</td>
272   - </tr>
273   - <tr>
274   - <td rowspan="2">车次</td>
275   - <td colspan="2">工号</td>
276   - <td rowspan="2">公里耗油</td>
277   - <td colspan="2">起讫站</td>
278   - <td colspan="4">时间</td>
279   - <td colspan="2">误点</td>
280   - <td rowspan="2" width="66px">里程(公里)计划</td>
281   - <td rowspan="2">备注</td>
282   - </tr>
283   - <tr>
284   - <td colspan="1" width="60px">司&nbsp;机</td>
285   - <td colspan="1" width="60px">售&nbsp;票</td>
286   - <td colspan="1">起点</td>
287   - <td colspan="1">终点</td>
288   - <td colspan="1">计发</td>
289   - <td colspan="1">实发</td>
290   - <td colspan="1">应到</td>
291   - <td colspan="1">实到</td>
292   - <td colspan="1">快</td>
293   - <td colspan="1">慢</td>
294   - </tr>
  331 +
295 332 </script>
  333 +<script type="text/html" id="ludan_1">
  334 + <tr>
  335 + <td colspan="14">行车路单</td>
  336 + </tr>
  337 + <tr>
  338 + <td colspan="14">路别:{{xlName}} 路牌:{{lpName}} 车号:{{clZbh}} 出场时间:{{fcsjActual}} 到达站名:{{zdzName}} 当班调派:&nbsp; 日期:{{scheduleDate}}</td>
  339 + </tr>
  340 + <tr>
  341 + <td colspan="2">出场存油 &nbsp;升</td>
  342 + <td colspan="2">加注油量 &nbsp;升</td>
  343 + <td colspan="2">进场存油 &nbsp;升</td>
  344 + <td colspan="4">加注机油 &nbsp;升</td>
  345 + <td colspan="4">本日耗油 &nbsp;升</td>
  346 + </tr>
  347 + <tr>
  348 + <td rowspan="2">调度章</td>
  349 + <td colspan="1">&nbsp;</td>
  350 + <td rowspan="2">早班</td>
  351 + <td colspan="1">&nbsp;</td>
  352 + <td rowspan="2">夜班</td>
  353 + <td colspan="1">&nbsp;</td>
  354 + <td rowspan="2" colspan="2">交叉</td>
  355 + <td colspan="2">&nbsp;</td>
  356 + <td rowspan="2">其他</td>
  357 + <td colspan="1">&nbsp;</td>
  358 + <td colspan="1">&nbsp;</td>
  359 + <td colspan="1">&nbsp;</td>
  360 + </tr>
  361 + <tr>
  362 + <td colspan="1">&nbsp;</td>
  363 + <td colspan="1">&nbsp;</td>
  364 + <td colspan="1">&nbsp;</td>
  365 + <td colspan="2">&nbsp;</td>
  366 + <td colspan="1">&nbsp;</td>
  367 + <td colspan="1">&nbsp;</td>
  368 + <td colspan="1">&nbsp;</td>
  369 + </tr>
  370 + <tr>
  371 + <td rowspan="2">车次</td>
  372 + <td colspan="2">工号</td>
  373 + <td rowspan="2">公里耗油</td>
  374 + <td colspan="2">起讫站</td>
  375 + <td colspan="4">时间</td>
  376 + <td colspan="2">误点</td>
  377 + <td rowspan="2" width="66px">里程(公里)计划</td>
  378 + <td rowspan="2">备注</td>
  379 + </tr>
  380 + <tr>
  381 + <td colspan="1" width="60px">司&nbsp;机</td>
  382 + <td colspan="1" width="60px">售&nbsp;票</td>
  383 + <td colspan="1">起点</td>
  384 + <td colspan="1">终点</td>
  385 + <td colspan="1">计发</td>
  386 + <td colspan="1">实发</td>
  387 + <td colspan="1">应到</td>
  388 + <td colspan="1">实到</td>
  389 + <td colspan="1">快</td>
  390 + <td colspan="1">慢</td>
  391 + </tr>
  392 +</script>
  393 +
296 394 <script type="text/html" id="ludan_2">
  395 +
297 396 {{each list as obj i}}
  397 +
298 398 <tr>
  399 +
299 400 <td>{{i+1}}</td>
  401 +
300 402 <td>{{obj.jName}}</td>
  403 +
301 404 <td>{{obj.sName}}</td>
  405 +
302 406 <td>&nbsp;</td>
  407 +
303 408 <td>{{obj.qdzName}}</td>
  409 +
304 410 <td>{{obj.zdzName}}</td>
  411 +
305 412 <td>{{obj.fcsj}}</td>
  413 +
306 414 <td>{{obj.fcsjActual}}</td>
  415 +
307 416 <td>{{obj.zdsj}}</td>
  417 +
308 418 <td>{{obj.zdsjActual}}</td>
  419 +
309 420 <td>{{obj.fast}}</td>
  421 +
310 422 <td>{{obj.slow}}</td>
311   - <td>{{obj.jhlc}}</td>
  423 +
  424 + <td>{{obj.jhlc}}</td>
312 425 <td>{{obj.remarks}}</td>
  426 +
  427 + </tr>
  428 +
  429 + {{/each}}
  430 + {{if list.length == 0}}
  431 + <tr>
  432 + <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td>
313 433 </tr>
314   - {{/each}}
315   - {{if list.length == 0}}
316   - <tr>
317   - <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td>
318   - </tr>
319 434 {{/if}}
320   -</script>
321   -<script type="text/html" id="ludan_3">
322   - <tr>
323   - <td colspan="2">计划公里</td>
324   - <td>{{jhlc}}</td>
325   - <td colspan="2">烂班公里</td>
326   - <td>{{remMileage}}</td>
327   - <td colspan="2">临加公里</td>
328   - <td>{{addMileage}}</td>
329   - <td colspan="2">营运公里</td>
330   - <td colspan="3">{{yygl}}</td>
331   - </tr>
332   - <tr>
333   - <td colspan="2">空驶公里</td>
334   - <td>{{ksgl}}</td>
335   - <td colspan="2">总公里</td>
336   - <td>{{realMileage}}</td>
337   - <td colspan="2">计划班次</td>
338   - <td>{{jhbc}}</td>
339   - <td colspan="2">烂班班次</td>
340   - <td colspan="3">{{cjbc}}</td>
341   - </tr>
342   - <tr>
343   - <td colspan="2">增加班次</td>
344   - <td>{{ljbc}}</td>
345   - <td colspan="2">实际班次</td>
346   - <td>{{sjbc}}</td>
347   - <td colspan="2"></td>
348   - <td></td>
349   - <td colspan="2"></td>
350   - <td colspan="3"></td>
351   - </tr>
352   -</script>
353   -<script type="text/html" id="ludan_4">
354   - <tr>
355   - <td colspan="12">认真做好终点项目的例保保修工作,杜绝机械火警事故!</td>
356   - <td>轮胎</td>
357   - <td>&nbsp;</td>
358   - </tr>
359   - <tr>
360   - <td colspan="3">重点例保项目</td>
361   - <td>1</td>
362   - <td>2</td>
363   - <td>3</td>
364   - <td colspan="3">重点例保项目</td>
365   - <td>1</td>
366   - <td>2</td>
367   - <td>3</td>
368   - <td>灭火机</td>
369   - <td>&nbsp;</td>
370   - </tr>
371   - <tr>
372   - <td colspan="3">各类制动</td>
373   - <td>&nbsp;</td>
374   - <td>&nbsp;</td>
375   - <td>&nbsp;</td>
376   - <td colspan="3">各类灯光</td>
377   - <td>&nbsp;</td>
378   - <td>&nbsp;</td>
379   - <td>&nbsp;</td>
380   - <td colspan="2">出场路码表里程</td>
381   - </tr>
382   - <tr>
383   - <td colspan="3">方向机</td>
384   - <td>&nbsp;</td>
385   - <td>&nbsp;</td>
386   - <td>&nbsp;</td>
387   - <td colspan="3">各类仪表</td>
388   - <td>&nbsp;</td>
389   - <td>&nbsp;</td>
390   - <td>&nbsp;</td>
391   - <td colspan="2" rowspan="2">&nbsp;</td>
392   - </tr>
393   - <tr>
394   - <td colspan="3">欠压报警器</td>
395   - <td>&nbsp;</td>
396   - <td>&nbsp;</td>
397   - <td>&nbsp;</td>
398   - <td colspan="3">各类皮带</td>
399   - <td>&nbsp;</td>
400   - <td>&nbsp;</td>
401   - <td>&nbsp;</td>
402   - </tr>
403   - <tr>
404   - <td colspan="3">发动机清洁及响声</td>
405   - <td>&nbsp;</td>
406   - <td>&nbsp;</td>
407   - <td>&nbsp;</td>
408   - <td colspan="3">油箱及托架</td>
409   - <td>&nbsp;</td>
410   - <td>&nbsp;</td>
411   - <td>&nbsp;</td>
412   - <td colspan="2">出场路码表里程</td>
413   - </tr>
414   - <tr>
415   - <td colspan="3">地盘响声</td>
416   - <td>&nbsp;</td>
417   - <td>&nbsp;</td>
418   - <td>&nbsp;</td>
419   - <td colspan="3">轮胎、半轴螺栓螺母</td>
420   - <td>&nbsp;</td>
421   - <td>&nbsp;</td>
422   - <td>&nbsp;</td>
423   - <td colspan="2" rowspan="3">&nbsp;</td>
424   - </tr>
425   - <tr>
426   - <td colspan="3">化油器及油路</td>
427   - <td>&nbsp;</td>
428   - <td>&nbsp;</td>
429   - <td>&nbsp;</td>
430   - <td colspan="3">油、电、水、气</td>
431   - <td>&nbsp;</td>
432   - <td>&nbsp;</td>
433   - <td>&nbsp;</td>
434   - </tr>
435   - <tr>
436   - <td colspan="3">进排歧管及排气管</td>
437   - <td>&nbsp;</td>
438   - <td>&nbsp;</td>
439   - <td>&nbsp;</td>
440   - <td colspan="3">内外车身及附件</td>
441   - <td>&nbsp;</td>
442   - <td>&nbsp;</td>
443   - <td>&nbsp;</td>
444   - </tr>
445   - <tr>
446   - <td colspan="14">1 首次出场,2 复使中途,3 某次进场。√正常,ⓧ报修,×尚未报修</td>
447   - </tr>
  435 +
  436 +</script>
  437 +<script type="text/html" id="ludan_3">
  438 + <tr>
  439 + <td colspan="2">计划公里</td>
  440 + <td>{{jhlc}}</td>
  441 + <td colspan="2">烂班公里</td>
  442 + <td>{{remMileage}}</td>
  443 + <td colspan="2">临加公里</td>
  444 + <td>{{addMileage}}</td>
  445 + <td colspan="2">营运公里</td>
  446 + <td colspan="3">{{yygl}}</td>
  447 + </tr>
  448 + <tr>
  449 + <td colspan="2">空驶公里</td>
  450 + <td>{{ksgl}}</td>
  451 + <td colspan="2">总公里</td>
  452 + <td>{{realMileage}}</td>
  453 + <td colspan="2">计划班次</td>
  454 + <td>{{jhbc}}</td>
  455 + <td colspan="2">烂班班次</td>
  456 + <td colspan="3">{{cjbc}}</td>
  457 + </tr>
  458 + <tr>
  459 + <td colspan="2">增加班次</td>
  460 + <td>{{ljbc}}</td>
  461 + <td colspan="2">实际班次</td>
  462 + <td>{{sjbc}}</td>
  463 + <td colspan="2"></td>
  464 + <td></td>
  465 + <td colspan="2"></td>
  466 + <td colspan="3"></td>
  467 + </tr>
  468 +</script>
  469 +<script type="text/html" id="ludan_4">
  470 + <tr>
  471 + <td colspan="12">认真做好终点项目的例保保修工作,杜绝机械火警事故!</td>
  472 + <td>轮胎</td>
  473 + <td>&nbsp;</td>
  474 + </tr>
  475 + <tr>
  476 + <td colspan="3">重点例保项目</td>
  477 + <td>1</td>
  478 + <td>2</td>
  479 + <td>3</td>
  480 + <td colspan="3">重点例保项目</td>
  481 + <td>1</td>
  482 + <td>2</td>
  483 + <td>3</td>
  484 + <td>灭火机</td>
  485 + <td>&nbsp;</td>
  486 + </tr>
  487 + <tr>
  488 + <td colspan="3">各类制动</td>
  489 + <td>&nbsp;</td>
  490 + <td>&nbsp;</td>
  491 + <td>&nbsp;</td>
  492 + <td colspan="3">各类灯光</td>
  493 + <td>&nbsp;</td>
  494 + <td>&nbsp;</td>
  495 + <td>&nbsp;</td>
  496 + <td colspan="2">出场路码表里程</td>
  497 + </tr>
  498 + <tr>
  499 + <td colspan="3">方向机</td>
  500 + <td>&nbsp;</td>
  501 + <td>&nbsp;</td>
  502 + <td>&nbsp;</td>
  503 + <td colspan="3">各类仪表</td>
  504 + <td>&nbsp;</td>
  505 + <td>&nbsp;</td>
  506 + <td>&nbsp;</td>
  507 + <td colspan="2" rowspan="2">&nbsp;</td>
  508 + </tr>
  509 + <tr>
  510 + <td colspan="3">欠压报警器</td>
  511 + <td>&nbsp;</td>
  512 + <td>&nbsp;</td>
  513 + <td>&nbsp;</td>
  514 + <td colspan="3">各类皮带</td>
  515 + <td>&nbsp;</td>
  516 + <td>&nbsp;</td>
  517 + <td>&nbsp;</td>
  518 + </tr>
  519 + <tr>
  520 + <td colspan="3">发动机清洁及响声</td>
  521 + <td>&nbsp;</td>
  522 + <td>&nbsp;</td>
  523 + <td>&nbsp;</td>
  524 + <td colspan="3">油箱及托架</td>
  525 + <td>&nbsp;</td>
  526 + <td>&nbsp;</td>
  527 + <td>&nbsp;</td>
  528 + <td colspan="2">出场路码表里程</td>
  529 + </tr>
  530 + <tr>
  531 + <td colspan="3">地盘响声</td>
  532 + <td>&nbsp;</td>
  533 + <td>&nbsp;</td>
  534 + <td>&nbsp;</td>
  535 + <td colspan="3">轮胎、半轴螺栓螺母</td>
  536 + <td>&nbsp;</td>
  537 + <td>&nbsp;</td>
  538 + <td>&nbsp;</td>
  539 + <td colspan="2" rowspan="3">&nbsp;</td>
  540 + </tr>
  541 + <tr>
  542 + <td colspan="3">化油器及油路</td>
  543 + <td>&nbsp;</td>
  544 + <td>&nbsp;</td>
  545 + <td>&nbsp;</td>
  546 + <td colspan="3">油、电、水、气</td>
  547 + <td>&nbsp;</td>
  548 + <td>&nbsp;</td>
  549 + <td>&nbsp;</td>
  550 + </tr>
  551 + <tr>
  552 + <td colspan="3">进排歧管及排气管</td>
  553 + <td>&nbsp;</td>
  554 + <td>&nbsp;</td>
  555 + <td>&nbsp;</td>
  556 + <td colspan="3">内外车身及附件</td>
  557 + <td>&nbsp;</td>
  558 + <td>&nbsp;</td>
  559 + <td>&nbsp;</td>
  560 + </tr>
  561 + <tr>
  562 + <td colspan="14">1 首次出场,2 复使中途,3 某次进场。√正常,ⓧ报修,×尚未报修</td>
  563 + </tr>
448 564 </script>
449 565 \ No newline at end of file
... ...
src/main/resources/static/pages/forms/statement/waybillQp.html 0 → 100644
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px; }
  14 +
  15 + .table > tbody + tbody {
  16 + border-top: 1px solid; }
  17 +</style>
  18 +
  19 +<div class="page-head">
  20 + <div class="page-title">
  21 + <h1>行车路单</h1>
  22 + </div>
  23 +</div>
  24 +
  25 +<div class="row">
  26 + <div class="col-md-12">
  27 + <div class="portlet light porttlet-fit bordered">
  28 + <div class="portlet-title">
  29 + <form class="form-inline" action="">
  30 + <div style="display: inline-block;">
  31 + <span class="item-label" style="width: 80px;">线路: </span>
  32 + <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  33 + </div>
  34 + <div style="display: inline-block;margin-left: 15px;">
  35 + <span class="item-label" style="width: 80px;">时间: </span>
  36 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
  37 + </div>
  38 + <div class="form-group" style="display: inline-block;margin-left: 15px;">
  39 + <input class="btn btn-default" type="button" id="query" value="查询"/>
  40 + <input class="btn btn-default" type="button" id="export" value="导出"/>
  41 + <input class="btn btn-default" type="button" id="print" value="打印"/>
  42 + <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/>
  43 + </div>
  44 + </form>
  45 + </div>
  46 + <div class="portlet-body">
  47 + <div class="row">
  48 + <div class="col-md-3">
  49 + <div class="" style="margin-top: 10px;overflow:auto;height: 860px">
  50 + <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info">
  51 + <thead>
  52 + <tr class="hidden">
  53 + <th>人员</th>
  54 + <th>自编号</th>
  55 + <th>路牌</th>
  56 + </tr>
  57 + </thead>
  58 + <tbody>
  59 +
  60 + </tbody>
  61 + </table>
  62 + </div>
  63 + </div>
  64 + <div class="col-md-9" id="printArea">
  65 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  66 + <table class="table table-bordered table-checkable" id="forms">
  67 + <tbody class="ludan_1">
  68 +
  69 + </tbody>
  70 + <tbody class="ludan_2">
  71 +
  72 + </tbody>
  73 + <tbody class="ludan_3">
  74 +
  75 + </tbody>
  76 + <tbody class="ludan_4">
  77 +
  78 + </tbody>
  79 + </table>
  80 + </div>
  81 + </div>
  82 + </div>
  83 + </div>
  84 + </div>
  85 + </div>
  86 +</div>
  87 +
  88 +<script>
  89 + $(function(){
  90 + // 关闭左侧栏
  91 + if (!$('body').hasClass('page-sidebar-closed'))
  92 + $('.menu-toggler.sidebar-toggler').click();
  93 +
  94 + $("#date").datetimepicker({
  95 + format : 'YYYY-MM-DD',
  96 + locale : 'zh-cn'
  97 + });
  98 +
  99 + $.get('/basic/lineCode2Name',function(result){
  100 + var data=[];
  101 +
  102 + for(var code in result){
  103 + data.push({id: code, text: result[code]});
  104 + }
  105 + console.log(data);
  106 + initPinYinSelect2('#line',data,'');
  107 +
  108 + })
  109 +
  110 + /* $('#line').select2({
  111 + ajax: {
  112 + url: '/realSchedule/findLine',
  113 + type: 'post',
  114 + dataType: 'json',
  115 + delay: 150,
  116 + data: function(params){
  117 + return{line: params.term};
  118 + },
  119 + processResults: function (data) {
  120 + return {
  121 + results: data
  122 + };
  123 + },
  124 + cache: true
  125 + },
  126 + templateResult: function(repo){
  127 + if (repo.loading) return repo.text;
  128 + var h = '<span>'+repo.text+'</span>';
  129 + return h;
  130 + },
  131 + escapeMarkup: function (markup) { return markup; },
  132 + minimumInputLength: 1,
  133 + templateSelection: function(repo){
  134 + return repo.text;
  135 + },
  136 + language: {
  137 + noResults: function(){
  138 + return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
  139 + },
  140 + inputTooShort : function(e) {
  141 + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
  142 + },
  143 + searching : function() {
  144 + return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
  145 + }
  146 + }
  147 + });
  148 + */
  149 +
  150 + var date = '';
  151 + $("#query").on("click",function(){
  152 + var line = $("#line").val();
  153 + date = $("#date").val();
  154 + $(".hidden").removeClass("hidden");
  155 + $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){
  156 + // 把数据填充到模版中
  157 + var tbodyHtml = template('list_info',{list:result});
  158 + // 把渲染好的模版html文本追加到表格中
  159 + $('#info tbody').html(tbodyHtml);
  160 + });
  161 + });
  162 +
  163 + var params = new Array();
  164 + var jName = '';
  165 + $("#info tbody").on("click","tr",function(){
  166 + if($(this).children().size() < 2){
  167 + return;
  168 + }
  169 +
  170 + $(this).children().each(function(index){
  171 + params[index] = $(this).text();
  172 + });
  173 + console.log(params);
  174 + jName = params[0].split("\\")[0];
  175 + var id = $("#"+params[1]).val();
  176 + $get('/realSchedule/'+id,null,function(result){
  177 + console.log(result);
  178 + result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD");
  179 + var ludan_1 = template('ludan_1',result);
  180 + //var ludan_4 = template('ludan_4',result);
  181 + // 把渲染好的模版html文本追加到表格中
  182 + $('#forms .ludan_1').html(ludan_1);
  183 + //$('#forms .ludan_4').html(ludan_4);
  184 + });
  185 + $post('/realSchedule/queryListWaybillQp',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  186 + getTime(result);
  187 + var ludan_2 = template('ludan_2',{list:result});
  188 + // 把渲染好的模版html文本追加到表格中
  189 + $('#forms .ludan_2').html(ludan_2);
  190 + });
  191 + $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  192 + var ludan_3 = template('ludan_3',result);
  193 + $('#forms .ludan_3').html(ludan_3);
  194 + });
  195 +
  196 + });
  197 +
  198 + $("#export").on("click",function(){
  199 + if(params.length < 1){
  200 + return;
  201 + }
  202 + $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  203 + window.open("/downloadFile/download?fileName="+jName);
  204 + });
  205 + });
  206 +
  207 + $("#print").click(function(){
  208 + $("#printArea").printArea();
  209 + });
  210 +
  211 + $("#exportMore").on("click",function(){
  212 + return;
  213 + $post('/realSchedule/exportWaybillMore',{date:date},function(result){
  214 + window.open("/downloadFile/download?fileName="+jName);
  215 + });
  216 + });
  217 +
  218 + function getTime(list){
  219 + $.each(list, function(i, obj) {
  220 + if(obj.zdsj != null && obj.zdsjActual != null ){
  221 + var zdsjActual = (obj.zdsjActual).split(":");
  222 + var zdsj = (obj.zdsj).split(":");
  223 + if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){
  224 + obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1]));
  225 + }
  226 + else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){
  227 + obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1]));
  228 + }
  229 + }
  230 + });
  231 + }
  232 + });
  233 +</script>
  234 +<script type="text/html" id="list_info">
  235 + {{each list as obj i}}
  236 + <tr>
  237 + <td width="45%">{{obj[4]}}\{{obj[1]}}</td>
  238 + <td width="32%">{{obj[2]}}</td>
  239 + <td width="23%">{{obj[3]}}<input type="hidden" id="{{obj[2]}}" value="{{obj[0]}}"></td>
  240 + </tr>
  241 + {{/each}}
  242 + {{if list.length == 0}}
  243 + <tr>
  244 + <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td>
  245 + </tr>
  246 + {{/if}}
  247 +</script>
  248 +<script type="text/html" id="ludan_1">
  249 + <tr>
  250 + <td colspan="14">行车路单</td>
  251 + </tr>
  252 + <tr>
  253 + <td colspan="14">路别:{{xlName}} 路牌:{{lpName}} 车号:{{clZbh}} 出场时间:{{fcsjActual}} 到达站名:{{zdzName}} 当班调派:&nbsp; 日期:{{scheduleDate}}</td>
  254 + </tr>
  255 + <tr>
  256 + <td colspan="2">出场存油 &nbsp;升</td>
  257 + <td colspan="2">加注油量 &nbsp;升</td>
  258 + <td colspan="2">进场存油 &nbsp;升</td>
  259 + <td colspan="4">加注机油 &nbsp;升</td>
  260 + <td colspan="4">本日耗油 &nbsp;升</td>
  261 + </tr>
  262 + <tr>
  263 + <td rowspan="2">调度章</td>
  264 + <td colspan="1">&nbsp;</td>
  265 + <td rowspan="2">早班</td>
  266 + <td colspan="1">&nbsp;</td>
  267 + <td rowspan="2">夜班</td>
  268 + <td colspan="1">&nbsp;</td>
  269 + <td rowspan="2" colspan="2">交叉</td>
  270 + <td colspan="2">&nbsp;</td>
  271 + <td rowspan="2">其他</td>
  272 + <td colspan="1">&nbsp;</td>
  273 + <td colspan="1">&nbsp;</td>
  274 + <td colspan="1">&nbsp;</td>
  275 + </tr>
  276 + <tr>
  277 + <td colspan="1">&nbsp;</td>
  278 + <td colspan="1">&nbsp;</td>
  279 + <td colspan="1">&nbsp;</td>
  280 + <td colspan="2">&nbsp;</td>
  281 + <td colspan="1">&nbsp;</td>
  282 + <td colspan="1">&nbsp;</td>
  283 + <td colspan="1">&nbsp;</td>
  284 + </tr>
  285 + <tr>
  286 + <td rowspan="2">车次</td>
  287 + <td colspan="2">工号</td>
  288 + <td rowspan="2">公里耗油</td>
  289 + <td colspan="2">起讫站</td>
  290 + <td colspan="4">时间</td>
  291 + <td colspan="2">误点</td>
  292 + <td rowspan="2" width="66px">里程(公里)计划</td>
  293 + <td rowspan="2">备注</td>
  294 + </tr>
  295 + <tr>
  296 + <td colspan="1" width="60px">司&nbsp;机</td>
  297 + <td colspan="1" width="60px">售&nbsp;票</td>
  298 + <td colspan="1">起点</td>
  299 + <td colspan="1">终点</td>
  300 + <td colspan="1">计发</td>
  301 + <td colspan="1">实发</td>
  302 + <td colspan="1">应到</td>
  303 + <td colspan="1">实到</td>
  304 + <td colspan="1">快</td>
  305 + <td colspan="1">慢</td>
  306 + </tr>
  307 +</script>
  308 +<script type="text/html" id="ludan_2">
  309 + {{each list as obj i}}
  310 + <tr>
  311 + <td>{{i+1}}</td>
  312 + <td>{{obj.jName}}</td>
  313 + <td>{{obj.sName}}</td>
  314 + <td>&nbsp;</td>
  315 + <td>{{obj.qdzName}}</td>
  316 + <td>{{obj.zdzName}}</td>
  317 + <td>{{obj.fcsj}}</td>
  318 + <td>{{obj.fcsjActual}}</td>
  319 + <td>{{obj.zdsj}}</td>
  320 + <td>{{obj.zdsjActual}}</td>
  321 + <td>{{obj.fast}}</td>
  322 + <td>{{obj.slow}}</td>
  323 + <td>{{obj.jhlc}}</td>
  324 + <td>{{obj.remarks}}</td>
  325 + </tr>
  326 + {{/each}}
  327 + {{if list.length == 0}}
  328 + <tr>
  329 + <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td>
  330 + </tr>
  331 + {{/if}}
  332 +</script>
  333 +<script type="text/html" id="ludan_3">
  334 + <tr>
  335 + <td colspan="2">计划公里</td>
  336 + <td>{{jhlc}}</td>
  337 + <td colspan="2">烂班公里</td>
  338 + <td>{{remMileage}}</td>
  339 + <td colspan="2">临加公里</td>
  340 + <td>{{addMileage}}</td>
  341 + <td colspan="2">营运公里</td>
  342 + <td colspan="3">{{yygl}}</td>
  343 + </tr>
  344 + <tr>
  345 + <td colspan="2">空驶公里</td>
  346 + <td>{{ksgl}}</td>
  347 + <td colspan="2">总公里</td>
  348 + <td>{{realMileage}}</td>
  349 + <td colspan="2">计划班次</td>
  350 + <td>{{jhbc}}</td>
  351 + <td colspan="2">烂班班次</td>
  352 + <td colspan="3">{{cjbc}}</td>
  353 + </tr>
  354 + <tr>
  355 + <td colspan="2">增加班次</td>
  356 + <td>{{ljbc}}</td>
  357 + <td colspan="2">实际班次</td>
  358 + <td>{{sjbc}}</td>
  359 + <td colspan="2"></td>
  360 + <td></td>
  361 + <td colspan="2"></td>
  362 + <td colspan="3"></td>
  363 + </tr>
  364 +</script>
  365 +<script type="text/html" id="ludan_4">
  366 + <tr>
  367 + <td colspan="12">认真做好终点项目的例保保修工作,杜绝机械火警事故!</td>
  368 + <td>轮胎</td>
  369 + <td>&nbsp;</td>
  370 + </tr>
  371 + <tr>
  372 + <td colspan="3">重点例保项目</td>
  373 + <td>1</td>
  374 + <td>2</td>
  375 + <td>3</td>
  376 + <td colspan="3">重点例保项目</td>
  377 + <td>1</td>
  378 + <td>2</td>
  379 + <td>3</td>
  380 + <td>灭火机</td>
  381 + <td>&nbsp;</td>
  382 + </tr>
  383 + <tr>
  384 + <td colspan="3">各类制动</td>
  385 + <td>&nbsp;</td>
  386 + <td>&nbsp;</td>
  387 + <td>&nbsp;</td>
  388 + <td colspan="3">各类灯光</td>
  389 + <td>&nbsp;</td>
  390 + <td>&nbsp;</td>
  391 + <td>&nbsp;</td>
  392 + <td colspan="2">出场路码表里程</td>
  393 + </tr>
  394 + <tr>
  395 + <td colspan="3">方向机</td>
  396 + <td>&nbsp;</td>
  397 + <td>&nbsp;</td>
  398 + <td>&nbsp;</td>
  399 + <td colspan="3">各类仪表</td>
  400 + <td>&nbsp;</td>
  401 + <td>&nbsp;</td>
  402 + <td>&nbsp;</td>
  403 + <td colspan="2" rowspan="2">&nbsp;</td>
  404 + </tr>
  405 + <tr>
  406 + <td colspan="3">欠压报警器</td>
  407 + <td>&nbsp;</td>
  408 + <td>&nbsp;</td>
  409 + <td>&nbsp;</td>
  410 + <td colspan="3">各类皮带</td>
  411 + <td>&nbsp;</td>
  412 + <td>&nbsp;</td>
  413 + <td>&nbsp;</td>
  414 + </tr>
  415 + <tr>
  416 + <td colspan="3">发动机清洁及响声</td>
  417 + <td>&nbsp;</td>
  418 + <td>&nbsp;</td>
  419 + <td>&nbsp;</td>
  420 + <td colspan="3">油箱及托架</td>
  421 + <td>&nbsp;</td>
  422 + <td>&nbsp;</td>
  423 + <td>&nbsp;</td>
  424 + <td colspan="2">出场路码表里程</td>
  425 + </tr>
  426 + <tr>
  427 + <td colspan="3">地盘响声</td>
  428 + <td>&nbsp;</td>
  429 + <td>&nbsp;</td>
  430 + <td>&nbsp;</td>
  431 + <td colspan="3">轮胎、半轴螺栓螺母</td>
  432 + <td>&nbsp;</td>
  433 + <td>&nbsp;</td>
  434 + <td>&nbsp;</td>
  435 + <td colspan="2" rowspan="3">&nbsp;</td>
  436 + </tr>
  437 + <tr>
  438 + <td colspan="3">化油器及油路</td>
  439 + <td>&nbsp;</td>
  440 + <td>&nbsp;</td>
  441 + <td>&nbsp;</td>
  442 + <td colspan="3">油、电、水、气</td>
  443 + <td>&nbsp;</td>
  444 + <td>&nbsp;</td>
  445 + <td>&nbsp;</td>
  446 + </tr>
  447 + <tr>
  448 + <td colspan="3">进排歧管及排气管</td>
  449 + <td>&nbsp;</td>
  450 + <td>&nbsp;</td>
  451 + <td>&nbsp;</td>
  452 + <td colspan="3">内外车身及附件</td>
  453 + <td>&nbsp;</td>
  454 + <td>&nbsp;</td>
  455 + <td>&nbsp;</td>
  456 + </tr>
  457 + <tr>
  458 + <td colspan="14">1 首次出场,2 复使中途,3 某次进场。√正常,ⓧ报修,×尚未报修</td>
  459 + </tr>
  460 +</script>
0 461 \ No newline at end of file
... ...
src/main/resources/static/pages/oil/checkJyryList.html
... ... @@ -56,14 +56,15 @@
56 56 <tr role="row" class="heading">
57 57 <th width="3%">#</th>
58 58 <th width="10%">日期</th>
59   - <th width="8%">公司</th>
60   - <th width="8%">车辆</th>
  59 + <th width="10%">公司</th>
  60 + <th width="10%">分公司</th>
  61 + <th width="6%">车辆</th>
61 62 <th width="10%">驾驶员</th>
62   - <th width="5%">加注量</th>
63   - <th width="5%">加油站</th>
64   - <th width="5%">加油类型</th>
  63 + <th width="2%">加注量</th>
  64 + <th width="4%">加油站</th>
  65 + <th width="4%">加油类型</th>
65 66 <th width="5%">加油工工号</th>
66   - <th width="5%">油价</th>
  67 + <th width="2%">油价</th>
67 68 <th width="5%">路单工号</th>
68 69 <th width="4%">备注</th>
69 70 <th width="19%">操作</th>
... ... @@ -74,7 +75,10 @@
74 75 <input type="text" id="yyrq" class="form-control form-filter input-sm" name="yyrq">
75 76 </td>
76 77 <td>
77   - <input type="text" class="form-control form-filter input-sm" name="nbbm_like">
  78 +<!-- <select class="form-control" name="gsdm_like" id="jyryListGsdmId" ></select> -->
  79 + </td>
  80 + <td>
  81 +<!-- <select class="form-control" name="fgsdm_like" id="jyryListFgsdmId" ></select> -->
78 82 </td>
79 83 <td>
80 84 </td>
... ... @@ -114,7 +118,10 @@
114 118 </td>
115 119 <td>{{obj.yyrq}}</td>
116 120 <td>
117   - {{obj.gsdm}}
  121 + {{obj.gsname}}
  122 + </td>
  123 + <td>
  124 + {{obj.fgsname}}
118 125 </td>
119 126 <td>
120 127 {{obj.nbbm}}
... ... @@ -173,15 +180,54 @@ $(function(){
173 180 radioClass: 'iradio_square-blue icheck',
174 181 increaseArea: '20%'
175 182 }
176   - if($("#yyrq").val()!=""){
177   - jsDoQuery(null,true);
178   - }
179 183 //重置
180 184 $('tr.filter .filter-cancel').on('click', function(){
181 185 $('tr.filter input, select').val('').change();
182   - jsDoQuery(null, true);
  186 +// jsDoQuery(null, true);
183 187 });
184 188  
  189 + var gsqx="";
  190 + var fgsqx="";
  191 +
  192 + $.get('/user/companyData', function(result){
  193 + obj = result;
  194 + var options = '<option value="">请选择</option>';
  195 + for(var i = 0; i < obj.length; i++){
  196 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  197 + setFgsqx(obj[i].companyCode);
  198 + gsqx +=obj[i].companyCode+",";
  199 + }
  200 + $('#jyryListGsdmId').html(options);
  201 + updateCompany();
  202 + });
  203 + function setFgsqx(gs){
  204 + var company =gs
  205 + var options = '';
  206 + for(var i = 0; i < obj.length; i++){
  207 + if(obj[i].companyCode == company){
  208 + var children = obj[i].children;
  209 + for(var j = 0; j < children.length; j++){
  210 + fgsqx +=children[j].code+",";
  211 + }
  212 + }
  213 + }
  214 + }
  215 + $("#jyryListGsdmId").on("change",updateCompany);
  216 + function updateCompany(){
  217 + var company = $('#jyryListGsdmId').val();
  218 + var options = '<option value="">请选择</option>';
  219 + for(var i = 0; i < obj.length; i++){
  220 + if(obj[i].companyCode == company){
  221 + var children = obj[i].children;
  222 + for(var j = 0; j < children.length; j++){
  223 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  224 + }
  225 + }
  226 + }
  227 + $('#jyryListFgsdmId').html(options);
  228 + }
  229 +
  230 +
185 231 //提交
186 232 $('tr.filter .filter-submit').on('click', function(){
187 233 if($("#yyrq").val()!=""){
... ... @@ -216,7 +262,29 @@ $(function(){
216 262 params['order'] = 'nbbm';
217 263 params['page'] = page;
218 264 params['yyrq']=$("#yyrq").val();
219   - var i = layer.load(2);
  265 +// var i = layer.load(2);
  266 +
  267 + var i = 2;
  268 + /* var jyryGsdm=$("#jyryListGsdmId").val();
  269 + var jyryFgsdm=$("#jyryListFgsdmId").val();
  270 + if(jyryGsdm=="" || jyryGsdm==null){
  271 + params['gsdm_in']=gsqx;
  272 + params['fgsdm_in']=fgsqx;
  273 + }else{
  274 + if(jyryFgsdm==''||jyryFgsdm==null){
  275 + var fgsqx1='';
  276 + for(var i = 0; i < obj.length; i++){
  277 + if(obj[i].companyCode == jyryGsdm){
  278 + var children = obj[i].children;
  279 + for(var j = 0; j < children.length; j++){
  280 + fgsqx1 +=children[j].code+",";
  281 + }
  282 + }
  283 + }
  284 + params['fgsdm_in']=fgsqx1;
  285 + }
  286 + } */
  287 +
220 288 $get('/ylxxb/pagequery' ,params, function(data){
221 289 $.each(data.dataList, function(i, obj) {
222 290 obj.yyrq = moment(obj.yyrq).format("YYYY-MM-DD");
... ...
src/main/resources/static/pages/oil/cylList.html
... ... @@ -140,11 +140,10 @@ $(function(){
140 140 checkboxClass: 'icheckbox_flat-blue',
141 141 increaseArea: '20%'
142 142 }
  143 +
143 144 var gsqx="";
144 145 var fgsqx="";
145 146  
146   -
147   -
148 147 $.get('/user/companyData', function(result){
149 148 obj = result;
150 149 var options = '<option value="">请选择</option>';
... ... @@ -223,7 +222,6 @@ $(function(){
223 222 params['order'] = 'nbbm';
224 223 params['page'] = page;
225 224 var i = 2;
226   - console.log(i);
227 225 var cylGsdm=$("#cylListGsdmId").val();
228 226 var cylFgsdm=$("#cylListFgsdmId").val();
229 227 if(cylGsdm==''|| cylGsdm==null){
... ...
src/main/resources/static/pages/oil/jyglList.html
... ... @@ -56,18 +56,19 @@
56 56 id="datatable_cwjy">
57 57 <thead>
58 58 <tr role="row" class="heading">
59   - <th width="3%">#</th>
  59 + <th width="2%">#</th>
60 60 <th width="10%">日期</th>
61   - <th width="6%">公司</th>
62   - <th width="6%">车辆</th>
63   - <th width="12%">驾驶员</th>
64   - <th width="5%">加注量</th>
65   - <th width="5%">加油站</th>
66   - <th width="5%">加油类型</th>
  61 + <th width="10%">公司</th>
  62 + <th width="10%">分公司</th>
  63 + <th width="8%">车辆</th>
  64 + <th width="8%">驾驶员</th>
  65 + <th width="3%">加注量</th>
  66 + <th width="3%">加油站</th>
  67 + <th width="3%">加油类型</th>
67 68 <th width="5%">加油工工号</th>
68   - <th width="5%">油价</th>
69   - <th width="6%">路单工号</th>
70   - <th width="5%">备注</th>
  69 + <th width="3%">油价</th>
  70 + <th width="4%">路单工号</th>
  71 + <th width="4%">备注</th>
71 72 <th width="19%">操作</th>
72 73 </tr>
73 74 <tr role="row" class="filter">
... ... @@ -76,10 +77,13 @@
76 77 <input type="text" id="rq" class="form-control form-filter input-sm" name="rq">
77 78 </td>
78 79 <td>
79   - <input type="text" class="form-control form-filter input-sm" name="nbbm_like">
  80 + <select class="form-control" name="gsdm_like" id="jyglListGsdmId" ></select>
80 81 </td>
81 82 <td>
82   - <input type="hidden" class="form-control form-filter input-sm" name="nbbh" id="nbbh">
  83 + <select class="form-control" name="fgsdm_like" id="jyglListFgsdmId" ></select>
  84 + </td>
  85 + <td>
  86 + <input type="text" class="form-control form-filter input-sm" name="nbbh" id="nbbh">
83 87 </td>
84 88 <td></td>
85 89 <td></td>
... ... @@ -117,7 +121,10 @@
117 121 </td>
118 122 <td>{{obj.yyrq}}</td>
119 123 <td>
120   - {{obj.gsdm}}
  124 + {{obj.gsname}}
  125 + </td>
  126 + <td>
  127 + {{obj.fgsname}}
121 128 </td>
122 129 <td>
123 130 {{obj.nbbm}}
... ... @@ -162,7 +169,22 @@ $(function(){
162 169 params['jsy']=jsy;
163 170 params['id']=id;
164 171 $get('/ylxxb/check', params, function(){
165   - jsDoQuery(null,true);
  172 + if($("#rq").val()!=""){
  173 + var cells = $('tr.filter')[0].cells
  174 + ,params = {}
  175 + ,name;
  176 + $.each(cells, function(i, cell){
  177 + var items = $('input,select', cell);
  178 + for(var j = 0, item; item = items[j++];){
  179 + name = $(item).attr('name');
  180 + if(name){
  181 + params[name] = $(item).val();
  182 + }
  183 + }
  184 + });
  185 + jsDoQuery(params,true);
  186 + }
  187 +
166 188 });
167 189 }
168 190 })
... ... @@ -180,9 +202,64 @@ $(function(){
180 202 //重置
181 203 $('tr.filter .filter-cancel').on('click', function(){
182 204 $('tr.filter input, select').val('').change();
183   - jsDoQuery(null, true);
  205 + if($("#rq").val()!=""){
  206 + var cells = $('tr.filter')[0].cells
  207 + ,params = {}
  208 + ,name;
  209 + $.each(cells, function(i, cell){
  210 + var items = $('input,select', cell);
  211 + for(var j = 0, item; item = items[j++];){
  212 + name = $(item).attr('name');
  213 + if(name){
  214 + params[name] = $(item).val();
  215 + }
  216 + }
  217 + });
  218 + jsDoQuery(params, true);
  219 + }
184 220 });
185 221  
  222 +
  223 + var gsqx="";
  224 + var fgsqx="";
  225 +
  226 + $.get('/user/companyData', function(result){
  227 + obj = result;
  228 + var options = '<option value="">请选择</option>';
  229 + for(var i = 0; i < obj.length; i++){
  230 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  231 + setFgsqx(obj[i].companyCode);
  232 + gsqx +=obj[i].companyCode+",";
  233 + }
  234 + $('#jyglListGsdmId').html(options);
  235 + updateCompany();
  236 + });
  237 + function setFgsqx(gs){
  238 + var company =gs
  239 + var options = '';
  240 + for(var i = 0; i < obj.length; i++){
  241 + if(obj[i].companyCode == company){
  242 + var children = obj[i].children;
  243 + for(var j = 0; j < children.length; j++){
  244 + fgsqx +=children[j].code+",";
  245 + }
  246 + }
  247 + }
  248 + }
  249 + $("#jyglListGsdmId").on("change",updateCompany);
  250 + function updateCompany(){
  251 + var company = $('#jyglListGsdmId').val();
  252 + var options = '<option value="">请选择</option>';
  253 + for(var i = 0; i < obj.length; i++){
  254 + if(obj[i].companyCode == company){
  255 + var children = obj[i].children;
  256 + for(var j = 0; j < children.length; j++){
  257 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  258 + }
  259 + }
  260 + }
  261 + $('#jyglListFgsdmId').html(options);
  262 + }
186 263 //提交
187 264 $('tr.filter .filter-submit').on('click', function(){
188 265 if($("#rq").val()!=""){
... ... @@ -217,10 +294,30 @@ $(function(){
217 294 params['order'] = 'nbbm';
218 295 params['page'] = page;
219 296 params['rq']=$("#rq").val();
220   - var i = layer.load(2);
  297 +
  298 + var i = 2;
  299 + var jyglGsdm=$("#jyglListGsdmId").val();
  300 + var jyglFgsdm=$("#jyglListFgsdmId").val();
  301 + if(jyglGsdm=="" || jyglGsdm==null){
  302 + params['gsdm_in']=gsqx;
  303 + params['fgsdm_in']=fgsqx;
  304 + }else{
  305 + if(jyglFgsdm==''||jyglFgsdm==null){
  306 + var fgsqx1='';
  307 + for(var i = 0; i < obj.length; i++){
  308 + if(obj[i].companyCode == jyglGsdm){
  309 + var children = obj[i].children;
  310 + for(var j = 0; j < children.length; j++){
  311 + fgsqx1 +=children[j].code+",";
  312 + }
  313 + }
  314 + }
  315 + params['fgsdm_in']=fgsqx1;
  316 + }
  317 + }
221 318 $get('/cwjy/pagequery' ,params, function(data){
222 319 $.each(data.dataList, function(i, obj) {
223   - obj.yyrq = moment(obj.yyrq).format("YYYY-MM-DD");
  320 + obj.yyrq = $("#rq").val();
224 321 });
225 322 var bodyHtm = template('jygl_list_temp', {list: data.dataList});
226 323 $('#datatable_cwjy tbody').html(bodyHtm)
... ... @@ -271,22 +368,11 @@ $(function(){
271 368 return;
272 369 }
273 370 page = num - 1;
274   - var cells = $('tr.filter')[0].cells
275   - ,params = {}
276   - ,name;
277   - $.each(cells, function(i, cell){
278   - var items = $('input,select', cell);
279   - for(var j = 0, item; item = items[j++];){
280   - name = $(item).attr('name');
281   - if(name){
282   - params[name] = $(item).val();
283   - }
284   - }
285   - });
286   - page = 0;
287   - jsDoQuery(params, true);
  371 +
  372 + jsDoQuery(null, false);
288 373 }
289 374 });
  375 +
290 376 }
291 377  
292 378  
... ...