Commit 41e5778dd1b7a434a559956cccf3c4d8b3d42407

Authored by 廖磊
1 parent aeceea9a

场外加油添加线路条件

调度日报修改
加油人员不符修改后盖板JYLX
src/main/java/com/bsth/controller/oil/CwjyController.java
@@ -13,6 +13,8 @@ import org.springframework.web.bind.annotation.RequestParam; @@ -13,6 +13,8 @@ import org.springframework.web.bind.annotation.RequestParam;
13 import org.springframework.web.bind.annotation.RestController; 13 import org.springframework.web.bind.annotation.RestController;
14 14
15 import com.bsth.controller.BaseController; 15 import com.bsth.controller.BaseController;
  16 +import com.bsth.data.BasicData;
  17 +import com.bsth.entity.Line;
16 import com.bsth.entity.oil.Cwjy; 18 import com.bsth.entity.oil.Cwjy;
17 import com.bsth.entity.oil.Ylxxb; 19 import com.bsth.entity.oil.Ylxxb;
18 import com.bsth.entity.sys.SysUser; 20 import com.bsth.entity.sys.SysUser;
@@ -30,12 +32,15 @@ public class CwjyController extends BaseController<Cwjy, Integer>{ @@ -30,12 +32,15 @@ public class CwjyController extends BaseController<Cwjy, Integer>{
30 SysUser sysUser = SecurityUtils.getCurrentUser(); 32 SysUser sysUser = SecurityUtils.getCurrentUser();
31 t.setCreateDate(new Date()); 33 t.setCreateDate(new Date());
32 t.setXgr(sysUser.getUserName()); 34 t.setXgr(sysUser.getUserName());
  35 + t.setNbbm(t.getNbbm().trim().toUpperCase());
  36 + Line line=BasicData.nbbm2LineMap.get(t.getNbbm());
  37 + t.setLine(line == null?"" : line.getLineCode());
33 return service.save(t); 38 return service.save(t);
34 } 39 }
35 40
36 @RequestMapping(value = "/checkNbbm",method = RequestMethod.GET) 41 @RequestMapping(value = "/checkNbbm",method = RequestMethod.GET)
37 public int checkNbbm(Cwjy t){ 42 public int checkNbbm(Cwjy t){
38 - return service.checkNbbm(t.getNbbm().trim()); 43 + return service.checkNbbm(t);
39 } 44 }
40 45
41 @RequestMapping(value = "/queryList",method = RequestMethod.GET) 46 @RequestMapping(value = "/queryList",method = RequestMethod.GET)
src/main/java/com/bsth/entity/oil/Cwjy.java
@@ -26,6 +26,11 @@ public class Cwjy { @@ -26,6 +26,11 @@ public class Cwjy {
26 private String xgr; 26 private String xgr;
27 27
28 private Date createDate; 28 private Date createDate;
  29 +
  30 + private String line;
  31 +
  32 + @Transient
  33 + private String linename;
29 34
30 @Transient 35 @Transient
31 private String gsname; 36 private String gsname;
@@ -95,6 +100,24 @@ public class Cwjy { @@ -95,6 +100,24 @@ public class Cwjy {
95 public void setFgsname(String fgsname) { 100 public void setFgsname(String fgsname) {
96 this.fgsname = fgsname; 101 this.fgsname = fgsname;
97 } 102 }
  103 +
  104 + public String getLine() {
  105 + return line;
  106 + }
  107 +
  108 + public void setLine(String line) {
  109 + this.line = line;
  110 + }
  111 +
  112 + public String getLinename() {
  113 + return BasicData.lineCode2NameMap.get(this.line);
  114 + }
  115 +
  116 + public void setLinename(String linename) {
  117 + this.linename = linename;
  118 + }
  119 +
  120 +
98 121
99 122
100 } 123 }
src/main/java/com/bsth/entity/oil/Ylxxb.java
@@ -44,7 +44,8 @@ public class Ylxxb { @@ -44,7 +44,8 @@ public class Ylxxb {
44 private String gsname; 44 private String gsname;
45 @Transient 45 @Transient
46 private String fgsname; 46 private String fgsname;
47 - 47 + @Transient
  48 + private String linename;
48 @Transient 49 @Transient
49 private Double zjzl; 50 private Double zjzl;
50 51
@@ -193,6 +194,12 @@ public class Ylxxb { @@ -193,6 +194,12 @@ public class Ylxxb {
193 public void setZjzl(Double zjzl) { 194 public void setZjzl(Double zjzl) {
194 this.zjzl = zjzl; 195 this.zjzl = zjzl;
195 } 196 }
  197 + public String getLinename() {
  198 + return linename;
  199 + }
  200 + public void setLinename(String linename) {
  201 + this.linename = linename;
  202 + }
196 203
197 204
198 205
src/main/java/com/bsth/repository/oil/CwjyRepository.java
@@ -30,5 +30,8 @@ public interface CwjyRepository extends BaseRepository<Cwjy, Integer>{ @@ -30,5 +30,8 @@ public interface CwjyRepository extends BaseRepository<Cwjy, Integer>{
30 @Query(value="select * from bsth_c_cwjy where nbbm like %?1% and gsdm like %?2% and fgsdm like %?3%",nativeQuery=true) 30 @Query(value="select * from bsth_c_cwjy where nbbm like %?1% and gsdm like %?2% and fgsdm like %?3%",nativeQuery=true)
31 List<Cwjy> selectAll(String nbbm,String gsdm,String fgsdm); 31 List<Cwjy> selectAll(String nbbm,String gsdm,String fgsdm);
32 32
  33 + @Query(value="select * from bsth_c_cwjy where nbbm like %?1% and gsdm like %?2% and fgsdm like %?3% and line =?4",nativeQuery=true)
  34 + List<Cwjy> selectAll_s(String nbbm,String gsdm,String fgsdm,String line);
  35 +
33 36
34 } 37 }
src/main/java/com/bsth/service/oil/CwjyService.java
@@ -15,5 +15,5 @@ public interface CwjyService extends BaseService&lt;Cwjy, Integer&gt;{ @@ -15,5 +15,5 @@ public interface CwjyService extends BaseService&lt;Cwjy, Integer&gt;{
15 15
16 Map<String, Object> savejzl(Map<String, Object> map) throws Exception ; 16 Map<String, Object> savejzl(Map<String, Object> map) throws Exception ;
17 17
18 - int checkNbbm(String nbbm); 18 + int checkNbbm(Cwjy t);
19 } 19 }
src/main/java/com/bsth/service/oil/impl/CwjyServiceImpl.java
@@ -24,6 +24,7 @@ import org.springframework.stereotype.Service; @@ -24,6 +24,7 @@ import org.springframework.stereotype.Service;
24 import com.alibaba.fastjson.JSONArray; 24 import com.alibaba.fastjson.JSONArray;
25 import com.alibaba.fastjson.JSONObject; 25 import com.alibaba.fastjson.JSONObject;
26 import com.bsth.common.ResponseCode; 26 import com.bsth.common.ResponseCode;
  27 +import com.bsth.data.BasicData;
27 import com.bsth.entity.oil.Cwjy; 28 import com.bsth.entity.oil.Cwjy;
28 import com.bsth.entity.oil.Cyl; 29 import com.bsth.entity.oil.Cyl;
29 import com.bsth.entity.oil.Ylb; 30 import com.bsth.entity.oil.Ylb;
@@ -281,6 +282,7 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -281,6 +282,7 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
281 String gsdm=map.get("gsdm_like").toString(); 282 String gsdm=map.get("gsdm_like").toString();
282 283
283 String fgsdm=map.get("fgsdm_like").toString(); 284 String fgsdm=map.get("fgsdm_like").toString();
  285 + String line =map.get("line_like").toString().trim();
284 /*String sql="SELECT a.gsdm as gsdm,a.fgsdm as fgsdm,a.nbbm as nbbm," 286 /*String sql="SELECT a.gsdm as gsdm,a.fgsdm as fgsdm,a.nbbm as nbbm,"
285 + "b.jyggh as jyggh,b.jzl as jzl ,b.stationid as stationid,b.jsy as jsy," 287 + "b.jyggh as jyggh,b.jzl as jzl ,b.stationid as stationid,b.jsy as jsy,"
286 + "b.nylx as nylx,b.yj as yj,b.bz as bz,b.id as id ,c.jsy as ldgh FROM bsth_c_cwjy a "+ 288 + "b.nylx as nylx,b.yj as yj,b.bz as bz,b.id as id ,c.jsy as ldgh FROM bsth_c_cwjy a "+
@@ -318,7 +320,13 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -318,7 +320,13 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
318 return t; 320 return t;
319 } 321 }
320 }); 322 });
321 - List<Cwjy> cwList=repository.selectAll(nbbm, gsdm, fgsdm); 323 + List<Cwjy> cwList=null;
  324 + if(line.equals("")){
  325 + cwList = repository.selectAll(nbbm, gsdm, fgsdm);
  326 + }else{
  327 + cwList = repository.selectAll_s(nbbm, gsdm, fgsdm, line);
  328 + }
  329 +
322 String sql_ylb="SELECT nbbm,group_concat(jsy) AS jsy FROM bsth_c_ylb WHERE " 330 String sql_ylb="SELECT nbbm,group_concat(jsy) AS jsy FROM bsth_c_ylb WHERE "
323 + " to_days(rq) = to_days('"+rq+"') AND ssgsdm = '"+gsdm+"' AND " 331 + " to_days(rq) = to_days('"+rq+"') AND ssgsdm = '"+gsdm+"' AND "
324 + " fgsdm = '"+fgsdm+"' GROUP BY nbbm"; 332 + " fgsdm = '"+fgsdm+"' GROUP BY nbbm";
@@ -338,9 +346,6 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -338,9 +346,6 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
338 Ylxxb y=null; 346 Ylxxb y=null;
339 for (int i = 0; i < cwList.size(); i++) { 347 for (int i = 0; i < cwList.size(); i++) {
340 Cwjy cwjy=cwList.get(i); 348 Cwjy cwjy=cwList.get(i);
341 - if(cwjy.getNbbm().equals("W7B-092")){  
342 - System.out.println();  
343 - }  
344 y=new Ylxxb(); 349 y=new Ylxxb();
345 y.setNylx(0); 350 y.setNylx(0);
346 y.setId(0); 351 y.setId(0);
@@ -348,6 +353,7 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -348,6 +353,7 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
348 y.setGsdm(cwjy.getGsdm()); 353 y.setGsdm(cwjy.getGsdm());
349 y.setFgsdm(cwjy.getFgsdm()); 354 y.setFgsdm(cwjy.getFgsdm());
350 y.setNbbm(cwjy.getNbbm()); 355 y.setNbbm(cwjy.getNbbm());
  356 + y.setLinename(cwjy.getLinename());
351 for (int j = 0; j < yList.size(); j++) { 357 for (int j = 0; j < yList.size(); j++) {
352 Ylxxb ylxxb=yList.get(j); 358 Ylxxb ylxxb=yList.get(j);
353 if(y.getNbbm().equals(ylxxb.getNbbm())){ 359 if(y.getNbbm().equals(ylxxb.getNbbm())){
@@ -379,9 +385,10 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -379,9 +385,10 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
379 } 385 }
380 386
381 @Override 387 @Override
382 - public int checkNbbm(String nbbm) { 388 + public int checkNbbm(Cwjy t) {
383 // TODO Auto-generated method stub 389 // TODO Auto-generated method stub
384 - String sql="select count(*) from bsth_c_cwjy where nbbm ='"+nbbm+"'"; 390 + String sql="select count(*) from bsth_c_cwjy where nbbm ='"+t.getNbbm()+"'"
  391 + + " and gsdm ='"+t.getFgsdm()+"' and fgsdm ='"+t.getFgsdm()+"'";
385 int cs=jdbcTemplate.queryForObject(sql, Integer.class); 392 int cs=jdbcTemplate.queryForObject(sql, Integer.class);
386 393
387 return cs; 394 return cs;
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
@@ -384,6 +384,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -384,6 +384,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
384 for (int i = 0; i < ylxxList.size(); i++) { 384 for (int i = 0; i < ylxxList.size(); i++) {
385 Ylxxb ylxxb = ylxxList.get(i); 385 Ylxxb ylxxb = ylxxList.get(i);
386 if (map.get("clZbh").toString().equals(ylxxb.getNbbm()) 386 if (map.get("clZbh").toString().equals(ylxxb.getNbbm())
  387 + && map.get("jGh").toString().equals(ylxxb.getJsy())
387 && ylxxb.getJylx()==1) { 388 && ylxxb.getJylx()==1) {
388 if(ylxxb.getJzl()>0){ 389 if(ylxxb.getJzl()>0){
389 fage2=true; 390 fage2=true;
src/main/java/com/bsth/service/oil/impl/YlxxbServiceImpl.java
@@ -176,6 +176,7 @@ public class YlxxbServiceImpl extends BaseServiceImpl&lt;Ylxxb,Integer&gt; implements @@ -176,6 +176,7 @@ public class YlxxbServiceImpl extends BaseServiceImpl&lt;Ylxxb,Integer&gt; implements
176 String jsy =jsonObject.getString("jsy"); 176 String jsy =jsonObject.getString("jsy");
177 Ylxxb ylxxb=repository.findOne(id); 177 Ylxxb ylxxb=repository.findOne(id);
178 ylxxb.setJsy(jsy); 178 ylxxb.setJsy(jsy);
  179 + ylxxb.setJylx(1);
179 repository.save(ylxxb); 180 repository.save(ylxxb);
180 } 181 }
181 newMap.put("status", ResponseCode.SUCCESS); 182 newMap.put("status", ResponseCode.SUCCESS);
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -2737,7 +2737,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2737,7 +2737,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2737 if (a == 2) { 2737 if (a == 2) {
2738 x = b + 1; 2738 x = b + 1;
2739 y = x * 2; 2739 y = x * 2;
2740 - } else if (b == 1) { 2740 + } else if (a == 1) {
2741 x = b + 1; 2741 x = b + 1;
2742 y = x * 2 - 1; 2742 y = x * 2 - 1;
2743 } else { 2743 } else {
@@ -4068,7 +4068,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4068,7 +4068,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4068 if((zdsj_-zdsjActual_)>0){ 4068 if((zdsj_-zdsjActual_)>0){
4069 zdsjk =String.valueOf(zdsj_-zdsjActual_); 4069 zdsjk =String.valueOf(zdsj_-zdsjActual_);
4070 }else{ 4070 }else{
4071 - zdsjm =String.valueOf(zdsj_-zdsjActual_); 4071 + zdsjm =String.valueOf(zdsjActual_-zdsj_);
4072 } 4072 }
4073 } 4073 }
4074 tempMap.put("zdsjk" + x, zdsjk); 4074 tempMap.put("zdsjk" + x, zdsjk);
@@ -4095,7 +4095,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4095,7 +4095,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4095 if((zdsj_-fcsjActural_)>0){ 4095 if((zdsj_-fcsjActural_)>0){
4096 fcsjk =String.valueOf(zdsj_-fcsjActural_); 4096 fcsjk =String.valueOf(zdsj_-fcsjActural_);
4097 }else{ 4097 }else{
4098 - fcsjm =String.valueOf(zdsj_-fcsjActural_); 4098 + fcsjm =String.valueOf(fcsjActural_-zdsj_);
4099 } 4099 }
4100 } 4100 }
4101 tempMap.put("fcsjk" + x, fcsjk); 4101 tempMap.put("fcsjk" + x, fcsjk);
src/main/resources/static/pages/oil/jyglList.html
@@ -58,15 +58,15 @@ @@ -58,15 +58,15 @@
58 <tr role="row" class="heading"> 58 <tr role="row" class="heading">
59 <th width="2%">#</th> 59 <th width="2%">#</th>
60 <th width="10%">日期</th> 60 <th width="10%">日期</th>
61 - <th width="10%">公司</th>  
62 - <th width="10%">分公司</th> 61 + <th width="8%">公司</th>
  62 + <th width="8%">分公司</th>
  63 + <th width="8%">线路</th>
63 <th width="8%">车辆</th> 64 <th width="8%">车辆</th>
64 <th width="14%">驾驶员</th> 65 <th width="14%">驾驶员</th>
65 <th width="5%">加注量</th> 66 <th width="5%">加注量</th>
66 <th width="4%">加油站</th> 67 <th width="4%">加油站</th>
67 <th width="3%">加油类型</th> 68 <th width="3%">加油类型</th>
68 <th width="5%">加油工工号</th> 69 <th width="5%">加油工工号</th>
69 - <th width="3%">油价</th>  
70 <th width="4%">路单工号</th> 70 <th width="4%">路单工号</th>
71 <th width="4%">备注</th> 71 <th width="4%">备注</th>
72 <th width="10%">操作</th> 72 <th width="10%">操作</th>
@@ -83,6 +83,9 @@ @@ -83,6 +83,9 @@
83 <select class="form-control" name="fgsdm_like" id="jyglListFgsdmId" ></select> 83 <select class="form-control" name="fgsdm_like" id="jyglListFgsdmId" ></select>
84 </td> 84 </td>
85 <td> 85 <td>
  86 + <select class="form-control" name="line_like" id="line" style="width: 120px;"></select>
  87 + </td>
  88 + <td>
86 <input type="text" class="form-control form-filter input-sm" name="nbbh" id="nbbh"> 89 <input type="text" class="form-control form-filter input-sm" name="nbbh" id="nbbh">
87 </td> 90 </td>
88 <td></td> 91 <td></td>
@@ -92,7 +95,6 @@ @@ -92,7 +95,6 @@
92 <td></td> 95 <td></td>
93 <td></td> 96 <td></td>
94 <td></td> 97 <td></td>
95 - <td></td>  
96 <td> 98 <td>
97 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" > 99 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" >
98 <i class="fa fa-search"></i> 搜索</button> 100 <i class="fa fa-search"></i> 搜索</button>
@@ -124,6 +126,7 @@ @@ -124,6 +126,7 @@
124 <td> 126 <td>
125 {{obj.fgsname}} 127 {{obj.fgsname}}
126 </td> 128 </td>
  129 + <td>{{obj.linename}}</td>
127 <td> 130 <td>
128 {{obj.nbbm}} 131 {{obj.nbbm}}
129 </td> 132 </td>
@@ -153,7 +156,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep @@ -153,7 +156,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
153 <input data-id="{{obj.nbbm}}" href="javascript:;" class="in_carpark_jyggh" 156 <input data-id="{{obj.nbbm}}" href="javascript:;" class="in_carpark_jyggh"
154 type="text" value="{{obj.jyggh}}" style=" width:45px" /> 157 type="text" value="{{obj.jyggh}}" style=" width:45px" />
155 </td> 158 </td>
156 - <td></td> 159 +
157 <td>{{obj.ldgh}}</td> 160 <td>{{obj.ldgh}}</td>
158 <td> 161 <td>
159 <input data-id="{{obj.nbbm}}" href="javascript:;" class="in_carpark_bz" 162 <input data-id="{{obj.nbbm}}" href="javascript:;" class="in_carpark_bz"
@@ -234,6 +237,27 @@ $(function(){ @@ -234,6 +237,27 @@ $(function(){
234 }); 237 });
235 238
236 239
  240 +
  241 + $.get('/report/lineList',function(xlList){
  242 + var data = [];
  243 + data.push({id: " ", text: "全部线路"});
  244 + $.get('/user/companyData', function(result){
  245 + for(var i = 0; i < result.length; i++){
  246 + var companyCode = result[i].companyCode;
  247 + var children = result[i].children;
  248 + for(var j = 0; j < children.length; j++){
  249 + var code = children[j].code;
  250 + for(var k=0;k < xlList.length;k++ ){
  251 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  252 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  253 + }
  254 + }
  255 + }
  256 + }
  257 + initPinYinSelect2('#line',data,'');
  258 +
  259 + });
  260 + });
237 // var gsqx=""; 261 // var gsqx="";
238 // var fgsqx=""; 262 // var fgsqx="";
239 263
src/main/resources/static/pages/oil/jyszAdd.html
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 <label class="col-md-3 control-label">内部编码</label> 33 <label class="col-md-3 control-label">内部编码</label>
34 <div class="col-md-9"> 34 <div class="col-md-9">
35 <!-- <select class="form-control input-medium " name="nbbm" id="nbbm" ></select> --> 35 <!-- <select class="form-control input-medium " name="nbbm" id="nbbm" ></select> -->
36 - <input type="text" class="form-control input-medium" name="nbbm" > 36 + <input type="text" class="form-control" name="nbbm" style="width: 180px">
37 </div> 37 </div>
38 </div> 38 </div>
39 </div> 39 </div>
@@ -87,6 +87,8 @@ $(function(){ @@ -87,6 +87,8 @@ $(function(){
87 $('#fgsdm').html(options); 87 $('#fgsdm').html(options);
88 } 88 }
89 89
  90 +
  91 +
90 //提交 92 //提交
91 $('#addJyszModuleButton').on('click', function() { 93 $('#addJyszModuleButton').on('click', function() {
92 form.submit(); 94 form.submit();
@@ -98,7 +100,7 @@ $(function(){ @@ -98,7 +100,7 @@ $(function(){
98 focusInvalid : false, 100 focusInvalid : false,
99 rules : { 101 rules : {
100 nbbm : { 102 nbbm : {
101 - minlength : 2, 103 + minlength : 4,
102 required : true, 104 required : true,
103 maxlength : 10 105 maxlength : 10
104 } 106 }
@@ -125,7 +127,7 @@ $(function(){ @@ -125,7 +127,7 @@ $(function(){
125 error.hide(); 127 error.hide();
126 $get('/cwjy/checkNbbm',params,function(result){ 128 $get('/cwjy/checkNbbm',params,function(result){
127 if(result>0){ 129 if(result>0){
128 - layer.msg('该车辆已经添加.'); 130 + layer.msg('分公司该车辆已经添加.');
129 }else{ 131 }else{
130 $post('/cwjy', params, function(result){ 132 $post('/cwjy', params, function(result){
131 layer.msg('新增加油设置成功.'); 133 layer.msg('新增加油设置成功.');
src/main/resources/static/pages/oil/jyszList.html
@@ -21,8 +21,9 @@ @@ -21,8 +21,9 @@
21 </div> 21 </div>
22 <div class="actions"> 22 <div class="actions">
23 <!-- <a class="btn btn-circle blue" href="jyszAdd.html" data-pjax><i class="fa fa-plus"></i> 添加</a> --> 23 <!-- <a class="btn btn-circle blue" href="jyszAdd.html" data-pjax><i class="fa fa-plus"></i> 添加</a> -->
24 - <button type="button" class="btn btn-circle blue" id="addJysz"><i class="fa fa-trash"></i> 添加</button>  
25 -<!-- <button type="button" class="btn btn-circle blue" onclick="refreshJsTree()"><i class="fa fa-trash"></i>刷新</button> --> 24 + <button type="button" class="btn btn-circle blue" id="addJysz"><i class="fa fa-plus"></i> 添加</button>
  25 +<!--
  26 + <button type="button" class="btn btn-circle blue" onclick="refreshJsTree()"><i class="fa fa-trash"></i>刷新</button> -->
26 27
27 <!-- <div class="btn-group"> 28 <!-- <div class="btn-group">
28 <a class="btn red btn-outline btn-circle" href="javascript:;" 29 <a class="btn red btn-outline btn-circle" href="javascript:;"
@@ -60,8 +61,9 @@ @@ -60,8 +61,9 @@
60 <th width="15%">公司</th> 61 <th width="15%">公司</th>
61 <th width="13%">分公司</th> 62 <th width="13%">分公司</th>
62 <th width="10%">车辆</th> 63 <th width="10%">车辆</th>
  64 + <th width="10%">线路</th>
63 <th width="10%">修改人</th> 65 <th width="10%">修改人</th>
64 - <th width="20%">日期</th> 66 + <th width="10%">日期</th>
65 <th width="19%">操作</th> 67 <th width="19%">操作</th>
66 </tr> 68 </tr>
67 <tr role="row" class="filter"> 69 <tr role="row" class="filter">
@@ -77,6 +79,8 @@ @@ -77,6 +79,8 @@
77 </td> 79 </td>
78 <td> 80 <td>
79 </td> 81 </td>
  82 + <td>
  83 + </td>
80 <td></td> 84 <td></td>
81 <td> 85 <td>
82 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" > 86 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" >
@@ -107,6 +111,7 @@ @@ -107,6 +111,7 @@
107 <td>{{obj.gsname}}</td> 111 <td>{{obj.gsname}}</td>
108 <td>{{obj.fgsname}}</td> 112 <td>{{obj.fgsname}}</td>
109 <td>{{obj.nbbm}}</td> 113 <td>{{obj.nbbm}}</td>
  114 + <td>{{obj.linename}}</td>
110 <td>{{obj.xgr}}</td> 115 <td>{{obj.xgr}}</td>
111 <td>{{obj.createDate}}</td> 116 <td>{{obj.createDate}}</td>
112 <td> 117 <td>
@@ -236,6 +241,7 @@ $(function(){ @@ -236,6 +241,7 @@ $(function(){
236 $.each(data.content, function(i, obj) { 241 $.each(data.content, function(i, obj) {
237 obj.createDate = moment(obj.createDate).format("YYYY-MM-DD"); 242 obj.createDate = moment(obj.createDate).format("YYYY-MM-DD");
238 }); 243 });
  244 + console.log(data.content);
239 var bodyHtm = template('jysz_list_temp', {list: data.content}); 245 var bodyHtm = template('jysz_list_temp', {list: data.content});
240 246
241 $('#datatable_jysz tbody').html(bodyHtm) 247 $('#datatable_jysz tbody').html(bodyHtm)
@@ -288,7 +294,7 @@ $(function(){ @@ -288,7 +294,7 @@ $(function(){
288 for(var j = 0, item; item = items[j++];){ 294 for(var j = 0, item; item = items[j++];){
289 name = $(item).attr('name'); 295 name = $(item).attr('name');
290 if(name){ 296 if(name){
291 - params[name] = $(item).val(); 297 + params[name] = $(item).val().replace(/(^\s*)|(\s*$)/g, "");
292 } 298 }
293 } 299 }
294 }); 300 });
@@ -315,7 +321,6 @@ $(function(){ @@ -315,7 +321,6 @@ $(function(){
315 $.get('jyszAdd.html', function(m){$(pjaxContainer).append(m);}); 321 $.get('jyszAdd.html', function(m){$(pjaxContainer).append(m);});
316 }); 322 });
317 323
318 -  
319 }); 324 });
320 325
321 326