line.html
23.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('线路档案信息')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="gray-bg">
<div class="container-div" id="context">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li><label>公司:</label>
<select id='company' >
</select>
</li>
<li><label>分公司:</label>
<select id='fCompany' >
</select>
</li>
<li><label>线路名称:</label> <input type="text" name="lineName" />
</li>
<li><label>主线路id:</label> <input type="text" name="pLineId" />
</li>
<li><label>营运方式:</label> <select name="serviceType"
th:with="type=${@dict.getType('serviceType')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select></li>
<li><label>线路属性:</label>
<select name="lineLevel"
th:with="type=${@dict.getType('lineLevel')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</li>
<li><label>线路类型:</label> <select name="lineType"
th:with="type=${@dict.getType('lineType')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select></li>
<li><label>区属:</label> <select name="district"
th:with="type=${@dict.getType('district')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select></li>
<li><label>是否区内:</label> <select name="inoutDistrict"
th:with="type=${@dict.getType('trueFalse')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select></li>
<li><label>营运状态:</label> <select name="serviceState"
th:with="type=${@dict.getType('serviceState')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select></li>
<li><label>车辆类型:</label> <select name="busType"
th:with="type=${@dict.getType('busType')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select></li>
<li><label>是否空调:</label> <select name="airConditionerType"
th:with="type=${@dict.getType('airConditionerType')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select></li>
<li><label>售票类型:</label> <select name="sellTicketType"
th:with="type=${@dict.getType('sellTicketType')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select></li>
<li><label>运营时间:</label> <select name="serviceTime"
th:with="type=${@dict.getType('serviceTime')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select></li>
<li><label>线路长度:</label> <input type="text"
name="lineDistance" /></li>
<li><label>线路编码:</label> <input type="text" name="lineCode" />
</li>
<li><label>授权年限:</label> <input type="text"
name="warrantYear" /></li>
<li><label>授权起始:</label> <input type="text"
class="time-input" placeholder="请选择授权起始日期"
name="warrantStartTime" /></li>
<li><label>授权结束:</label> <input type="text"
class="time-input" placeholder="请选择授权结束日期" name="warrantEndTime" />
</li>
<li><label>撤销日期:</label> <input type="text"
class="time-input" placeholder="请选择撤销日期" name="planCancelTime" />
</li>
<li><label>实际撤销:</label> <input type="text"
class="time-input" placeholder="请选择实际撤销日期" name="cancelTime" />
</li>
<li><label>更新人:</label> <input type="text" name="updateBy" />
</li>
<li><label>更新时间:</label> <input type="text"
class="time-input" placeholder="请选择更新时间" name="updateTime" /></li>
<li><label>行车作业计划表报备时间:</label> <input type="text"
class="time-input" placeholder="请选择行车作业计划表报备时间"
name="timeSchedule" /></li>
<li><label>停车场:</label> <input type="text" name="park" /></li>
<li><label>是否权证:</label> <select name="isWarrant"
th:with="type=${@dict.getType('trueFalse')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select></li>
<li><label>道路类型:</label> <select name="roadType"
th:with="type=${@dict.getType('roadType')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select></li>
<li><label>票价:</label> <input type="text" name="ticketPrice" /></li>
<li><label>首站:</label> <input type="text"
name="firstStation" /></li>
<li><label>起讫站:</label> <input type="text" name="startEnd" />
</li>
<li><label>首站时间:</label> <input type="text" name="firstTime" />
</li>
<li><label>末站:</label> <input type="text" name="lastStation" />
</li>
<li><label>末站首站:</label> <input type="text"
name="lastTime" /></li>
<li><label>上行里程:</label> <input type="text"
name="mileageUp" /></li>
<li><label>下行里程:</label> <input type="text"
name="mileageDown" /></li>
<li><label>平均里程:</label> <input type="text"
name="averageMileage" /></li>
<li><label>上行站级:</label> <input type="text"
name="stationUp" /></li>
<li><label>下行站级数():</label> <input type="text"
name="stationDown" /></li>
<li><label>行驶时间(上行):</label> <input type="text"
name="travelTimeUp" /></li>
<li><label>行驶时间(下行):</label> <input type="text"
name="travelTimeDown" /></li>
<li><label>行驶间隔(高峰):</label> <input type="text"
name="travelIntervalUp" /></li>
<li><label>行驶间隔(低谷):</label> <input type="text"
name="travelIntervalDown" /></li>
<li><label>经营权证:</label> <input type="text"
name="warrantVehiclesLarge" /></li>
<li><label>经营权证:</label> <input type="text"
name="warrantVehiclesMiddle" /></li>
<li><label>实际配车数:</label> <input type="text"
name="vehiclesNumber" /></li>
<li><label>实际车辆数(大巴):</label> <input type="text"
name="numberVehiclesLarge" /></li>
<li><label>实际车辆数(中巴):</label> <input type="text"
name="numberVehiclesMiddle" /></li>
<li><label>车辆自编号:</label> <input type="text" name="carPlate" />
</li>
<li><label>线路总配人数:</label> <input type="text"
name="numberPerson" /></li>
<li><label>人数司机:</label> <input type="text"
name="numberPersonDriver" /></li>
<li><label>售票员数:</label> <input type="text"
name="numberPersonSales" /></li>
<li><label>新能源车数:</label> <input type="text"
name="busEvNumber" /></li>
<li><label>经营权证数:</label> <input type="text"
name="numberOfManage" /></li>
<li><label>高峰系数:</label> <input type="text"
name="fullCustomerPercent" /></li>
<li><label>低谷系数:</label> <input type="text"
name="lowCustomerPercent" /></li>
<li><label>间隔等级:</label> <input type="text"
name="divideLevel" /></li>
<li><label>是否挂牌:</label> <input type="text"
name="hasTimelists" /></li>
<li><label>是否轨交末班车衔接:</label> <select name="isMetro"
th:with="type=${@dict.getType('trueFalse')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select></li>
<li><label>轨交时间:</label> <input type="text"
class="time-input" placeholder="请选择轨交时间" name="metroTime" /></li>
<li><label>冷僻补贴:</label> <input type="text"
name="coldBonusType" /></li>
<li><label>日期截点:</label> <input type="text"
class="time-input" placeholder="日期截点" name="createTimeEnd" id="createTimeEnd"/>
</li>
<li><label>性质:</label> <select name="lineUpdateType"
th:with="type=${@dict.getType('lineUpdateType')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select></li>
<li><label>营收类型:</label> <select name="revenueType"
th:with="type=${@dict.getType('revenueType')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select></li>
<li>
<el-button size="mini" type="primary" icon="el-icon-search" onClick="$.table.search();">搜索</el-button>
<el-button size="mini" icon="el-icon-refresh" onClick="$.form.reset();">重置</el-button>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<el-button plain size="mini" type="success" icon="el-icon-search" onClick="$.table.search();" data-toggle="modal" data-target="#myModal">选择显示的列</el-button>
<el-button plain size="mini" type="warning" icon="el-icon-download" id="export" onClick="$.table.exportExcel();" shiro:hasPermission="system:line:export"> 导出</el-button>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">选择显示的列</h4>
</div>
<div class="modal-body" id="cols" style="float: left;">
<input type="checkbox" onClick="checkAll(this);" id="checkboxForAll"/><label>全选</label><br />
<br />
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" onClick="initTable();">提交更改</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var companyList=[[${companyList}]];
var companies=new Array();
var fCompanies=new Array();
var type=[[${type}]];
$(function() {
for(let i in companyList){
companies[i]=companyList[i].company;
fCompanies[i]=companyList[i].fCompany;
}
companies=Array.from(new Set(companies));
companySelect();
fCompanySelect();
$('#company').on('change.select2', function (e) {
fCompanySelect()
});
console.log(type);
if(type==2){
console.log("show");
$('#export').css("display", "show");
}else {
console.log("none");
$('#export').css("display", "none");
}
});
function companySelect(){
var arr = new Array();
var company=new Object();
company.id='';
company.text='';
company.value='';
arr.push(company)
for (var i = 0; i < companies.length; i++) {
company=new Object();
company.id=companies[i];
company.text=companies[i];
company.value=companies[i];
arr.push(company);
}
$("#company").select2({
data: arr,
placeholder:'请选择',
allowClear:true
})
}
function fCompanySelect(){
$('#fCompany').empty();
var company=$('#company').select2('val');
var arr = new Array();
var fCompany=new Object();
fCompany.id='';
fCompany.text='';
fCompany.value='';
arr.push(fCompany)
if(company==''){
for(let i in companyList){
var companyName=companyList[i].company;
var fCompanyName=companyList[i].fCompany;
fCompany=new Object();
fCompany.id=fCompanyName;
fCompany.text=fCompanyName;
fCompany.value=fCompanyName;
arr.push(fCompany);
}
}else {
for(let i in companyList){
var companyName=companyList[i].company;
var fCompanyName=companyList[i].fCompany;
if(companyName==company){
fCompany=new Object();
fCompany.id=fCompanyName;
fCompany.text=fCompanyName;
fCompany.value=fCompanyName;
arr.push(fCompany);
}
}
}
$("#fCompany").select2({
data: arr,
placeholder:'请选择',
allowClear:true
});
}
new Vue({
el: '#context',
data: function() {
return { visible: false }
}
})
var dicts = [[${@dict.getType('')}]];
var mytable = null;
function initTable(){
var objs = $("#cols div");
var data = [];
for(var i = 0;i< objs.length;i++){
var name = $(objs[i]).find("input")[0].name;
var text = $(objs[i]).find("label")[0].innerText;
var checked = $(objs[i]).find("input")[0].checked;
data.push({
name:name,
text:text,
checked:checked});
}
createTable(data);
$.post("/system/line/updateUserLineInfo",{lineInfo:JSON.stringify(data)},function(data){
$.modal.msg(data.msg);
});
}
function createTable(objs){
var options = {
url: prefix + "/list",
detailUrl: prefix + "/detail/{id}",
exportUrl: prefix + "/export",
modalName: "线路档案信息",
columns: [],
queryParams: queryParams,
rowStyle:function(row,index) {
var flag=DateMinus(row.isWarrantEndTime);
if(row.isWarrant==='1'&&!flag){
var strClass='danger';
return {classes:strClass};
}
return "";
},
onDblClickRow:function (row,index){
/*$.operate.full=true;*/
$.operate.detail(row.id);
}
};
if(objs.length > 0){
options.columns[0] = {checkbox:true};
options.columns[1] = {visible:false,field:"id"};
}
for(var i = 0;i< objs.length;i++){
var col = {
field: objs[i].name,
title: objs[i].text,
visible:objs[i].checked,
align: 'center',
formatter: function(value, row, index) {
if(this.field == "roadType" || this.field == "busType"){
if(value != null){
var arr = value.split(",");
value = "";
for(var i in arr){
for(var j in dicts[this.field]){
if(dicts[this.field][j].dictValue == arr[i]){
value += dicts[this.field][j].dictLabel + ","
break;
}
}
}
return $.table.tooltip(value.substring(0,value.length -1), 5);
}
}
if(this.field == "isLogicDelete" || this.field == "inoutDistrict"|| this.field == "isMetro" || this.field == "hasTimelists" || this.field == "isWarrant"){
for(var j in dicts["trueFalse"]){
if(dicts["trueFalse"][j].dictValue == value){
value = dicts["trueFalse"][j].dictLabel;
break;
}
}
}
if(dicts[this.field]){
for(var j in dicts[this.field]){
if(dicts[this.field][j].dictValue == value){
value = dicts[this.field][j].dictLabel;
break;
}
}
}
return $.table.tooltip(value, 5);
}
}
if($($("#formId input[name="+objs[i].name+"]"))){
if(objs[i].checked){
$($("#formId input[name="+objs[i].name+"]")).parent().show();
}else{
$($("#formId input[name="+objs[i].name+"]")).parent().hide();
}
}
if($($("#formId select[name="+objs[i].name+"]"))){
if(objs[i].checked){
$($("#formId select[name="+objs[i].name+"]")).parent().show();
}else{
$($("#formId select[name="+objs[i].name+"]")).parent().hide();
}
}
options.columns.push(col);
}
$.table.destroy();
$.table.init(options);
mytable = $.table;
}
function checkAll(obj){
var objs = $("#cols input");
if(obj.checked == false){
for(var i in objs){
objs[i].checked = false;
}
}else{
for(var i in objs){
objs[i].checked = true;
}
}
}
function queryParams(params) {
var search = $.table.queryParams(params);
search.company=$('#company').select2('val');
search.fCompany=$('#fCompany').select2('val');
search.createTimeEnd=$('#createTimeEnd').val()!=''?$('#createTimeEnd').val()+' 23:59:59':'';
return search;
}
var editFlag = [[${@permission.hasPermi('system:line:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:line:remove')}]];
var prefix = ctx + "system/line";
$(function() {
var allDicts = {};
for(var i in dicts){
if(!allDicts[dicts[i].dictType]){
allDicts[dicts[i].dictType] = [];
}
allDicts[dicts[i].dictType].push(dicts[i]);
}
dicts = allDicts;
var cols = [
{
field: 'company',
title: '公司'
},
{
field: 'fCompany',
title: '分公司'
},
{
field: 'lineName',
title: '线路名称'
},
{
field: 'pLineId',
title: '主线路id'
},
{
field: 'serviceType',
title: '营运方式'
},
{
field: 'lineLevel',
title: '线路属性'
},
{
field: 'lineType',
title: '线路属性'
},
{
field: 'district',
title: '区属'
},
{
field: 'inoutDistrict',
title: '是否区内'
},
{
field: 'serviceState',
title: '营运状态'
},
{
field: 'busType',
title: '车辆类型'
},
{
field: 'airConditionerType',
title: '是否空调'
},
{
field: 'sellTicketType',
title: '售票类型'
},
{
field: 'serviceTime',
title: '运营时间'
},
{
field: 'lineDistance',
title: '线路长度'
},
{
field: 'lineCode',
title: '线路编码'
},
{
field: 'warrantYear',
title: '授权年限'
},
{
field: 'warrantStartTime',
title: '授权起始日期'
},
{
field: 'warrantEndTime',
title: '授权结束日期'
},
{
field: 'planCancelTime',
title: '撤销日期'
},
{
field: 'cancelTime',
title: '实际撤销日期'
},
{
field: 'cancelReason',
title: '撤销原因'
},
{
field: 'remark',
title: '备注'
},
{
field: 'isLogicDelete',
title: '是否逻辑删除'
},
{
field: 'updateBy',
title: '更新人'
},
{
field: 'updateTime',
title: '更新时间'
},
{
field: 'timeSchedule',
title: '行车作业计划表报备时间'
},
{
field: 'park',
title: '停车场'
},
{
field: 'isWarrant',
title: '是否权证'
},
{
field: 'isWarrantStartTime',
title: '权证开通日期'
},
{
field: 'isWarrantEndTime',
title: '权证到期日期'
},
{
field: 'roadType',
title: '道路类型'
},
{
field: 'ticketPrice',
title: '票价'
},
{
field: 'firstStation',
title: '首站'
},
{
field: 'startEnd',
title: '起讫站'
},
{
field: 'firstTime',
title: '首站时间'
},
{
field: 'lastStation',
title: '末站'
},
{
field: 'lastTime',
title: '末站首站时间'
},
{
field: 'mileageUp',
title: '上行里程数'
},
{
field: 'mileageDown',
title: '下行里程数'
},
{
field: 'averageMileage',
title: '平均里程数'
},
{
field: 'stationUp',
title: '站级数(上行)'
},
{
field: 'stationDown',
title: '站级数(下行)'
},{
field: 'travelTimeUp',
title: '行驶时间(上行)'
},{
field: 'travelTimeDown',
title: '行驶时间(下行)'
},{
field: 'travelIntervalUp',
title: '行驶间隔(高峰)'
},{
field: 'travelIntervalDown',
title: '行驶间隔(低谷)'
},{
field: 'warrantVehiclesLarge',
title: '经营权证(大巴)'
}, {
field: 'warrantVehiclesMiddle',
title: '经营权证(中巴)'
},{
field: 'vehiclesNumber',
title: '实际配车数'
}, {
field: 'numberVehiclesLarge',
title: '实际车辆数(大巴)'
}, {
field: 'numberVehiclesMiddle',
title: '实际车辆数(中巴)'
},{
field: 'carPlate',
title: '车辆自编号'
},{
field: 'numberPerson',
title: '线路总配人数'
},{
field: 'numberPersonDriver',
title: '人数司机'
}, {
field: 'numberPersonSales',
title: '售票员数'
},{
field: 'busEvNumber',
title: '新能源车数'
},{
field: 'directions',
title: '线路走向'
},{
field: 'numberOfManage',
title: '经营权证数'
},{
field: 'halfwayStation',
title: '站点名称'
},{
field: 'fullCustomerPercent',
title: '高峰系数'
},{
field: 'lowCustomerPercent',
title: '低谷系数'
}, {
field: 'divideLevel',
title: '间隔等级'
},{
field: 'hasTimelists',
title: '是否挂牌'
},{
field: 'isMetro',
title: '是否轨交末班车衔接'
},{
field: 'metroTime',
title: '轨交时间'
},{
field: 'coldBonusType',
title: '冷僻线路补贴类型'
},{
field: 'revenueType',
title: '营收类型'
},{
field: 'lineUpdateType',
title: '性质'
},{
field: 'startDate',
title: '启用时间'
},{
field: 'files',
title: '附件'
}];
for(var i =0 ; i < cols.length ;i++){
if(i > 0 && i %3 > 0)continue;
var tag = "<div class='col_checkbox'><input type='checkbox' name="+cols[i].field+"><label>"+cols[i].title + "</label></div>";
if(cols[i+1]){
tag+= "<div class='col_checkbox'><input type='checkbox' name="+cols[i+1].field+"><label>"+cols[i+1].title + "</label></div>";
}
if(cols[i+2]){
tag+= "<div class='col_checkbox'><input type='checkbox' name="+cols[i+2].field+"><label>"+cols[i+2].title + "</label></div>";
}
$("#cols").append(tag);
}
$.get("/system/line/getUserLineInfo",function(data){
if(data.msg != null){
var data = JSON.parse(data.msg);
createTable(data);
var allCheck = true;
for(var i = 0;i<data.length;i++){
if(!data[i].checked){
allCheck = false;
}
$("#cols input[name="+data[i].name+"]")[0].checked = data[i].checked;
}
$("#checkboxForAll")[0].checked = allCheck;
}
});
});
function DateMinus(date1){
if(date1==null){
return true;
}
var sdate = new Date(date1);
var now = new Date();
var days = sdate.getTime()-now.getTime();
var day = parseInt(days / (1000 * 60 * 60 * 24));
console.log(day);
if(day<120){
return false;
}
return true;
}
$("input[name='createTimeEnd']").datetimepicker({
format : "yyyy-mm-dd",
minView : "month",
autoclose : true
});
</script>
<style>
.col_checkbox {
width: 33%;
float: left;
}
</style>
</body>
</html>