Commit 86232b0b1c919ef81a2a5de13adf32b6c3cd5593

Authored by 潘钊
2 parents 6a16ab43 60ac9bcf

Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang

src/main/resources/static/pages/oil/list_ph.html
@@ -5,9 +5,6 @@ @@ -5,9 +5,6 @@
5 text-overflow: ellipsis; 5 text-overflow: ellipsis;
6 } 6 }
7 7
8 - #ylbtable .ps-scrollbar-y{  
9 - min-height:100px;  
10 - }  
11 </style> 8 </style>
12 <div class="page-head"> 9 <div class="page-head">
13 <div class="page-title"> 10 <div class="page-title">
@@ -168,7 +165,7 @@ @@ -168,7 +165,7 @@
168 </div> 165 </div>
169 </div> 166 </div>
170 167
171 - <div id="ylbtable" class="portlet-body table-container " style="height: calc(100% - 200px);overflow: hidden;position: absolute;background: #fff;"> 168 + <div id="ylbtable" class="portlet-body table-container " style="height: calc(100% + 100px);overflow: hidden;position: absolute;background: #fff;">
172 169
173 <table 170 <table
174 class="table table-striped table-bordered table-hover table-checkable" 171 class="table table-striped table-bordered table-hover table-checkable"
src/main/resources/static/pages/report/inoutstation/inoutstation.html
@@ -70,7 +70,7 @@ @@ -70,7 +70,7 @@
70 </div> 70 </div>
71 <div style="display: inline-block; margin-left: 5px;"> 71 <div style="display: inline-block; margin-left: 5px;">
72 <input class="btn btn-default" type="button" id="query" value="查询" /> 72 <input class="btn btn-default" type="button" id="query" value="查询" />
73 -<!-- <input class="btn btn-default" type="button" id="export" value="导出" /> --> 73 + <input class="btn btn-default" type="button" id="export" value="导出" />
74 </div> 74 </div>
75 </div> 75 </div>
76 76
@@ -127,9 +127,7 @@ @@ -127,9 +127,7 @@
127 layer.msg("请选择方向"); 127 layer.msg("请选择方向");
128 }else{ 128 }else{
129 $get('/report/queryStrinon',{line:line,zd:zdlx},function(result){ 129 $get('/report/queryStrinon',{line:line,zd:zdlx},function(result){
130 - console.log(result);  
131 $get('/report/queryInOutStrtions',{line:line,date:date,zd:zdlx,lzsj:lzsj},function(result2){ 130 $get('/report/queryInOutStrtions',{line:line,date:date,zd:zdlx,lzsj:lzsj},function(result2){
132 - console.log(result2);  
133 // /* getTime(result); */ 131 // /* getTime(result); */
134 var ludan_ll_1 = template('ludan_ll_1',{lists:result,list:result2}); 132 var ludan_ll_1 = template('ludan_ll_1',{lists:result,list:result2});
135 // // 把渲染好的模版html文本追加到表格中 133 // // 把渲染好的模版html文本追加到表格中
@@ -172,19 +170,16 @@ @@ -172,19 +170,16 @@
172 170
173 171
174 $("#export").on("click",function(){ 172 $("#export").on("click",function(){
175 - var rq=$("#date").val();  
176 - var line=$("#line").val();  
177 - var nbbm=$("#nbbm").val();  
178 - var fcsj=$("#fcsj_xx").val();  
179 - var ddsj=$("#ddsj_xx").val();  
180 - if(fcsj==""){  
181 - layer.msg("没数据");  
182 - }else{  
183 - $get('/report/exportQueryListZdxx',{clzbh:nbbm,date:rq,line:line,fcsj:fcsj,ddsj:ddsj},function(result){  
184 - window.open("/downloadFile/download?fileName=班次到离站");  
185 - });  
186 - }  
187 - 173 + var curTbl = document.getElementById("forms");
  174 + var oXL = new ActiveXObject("Excel.Application");
  175 + var oWB = oXL.Workbooks.Add();
  176 + var oSheet = oWB.ActiveSheet;
  177 + var sel = document.body.createTextRange();
  178 + sel.moveToElementText(curTbl);
  179 + sel.select();
  180 + sel.execCommand("Copy");
  181 + oSheet.Paste();
  182 + oXL.Visible = true;
188 }); 183 });
189 184
190 }); 185 });
@@ -193,8 +188,13 @@ @@ -193,8 +188,13 @@
193 <script type="text/html" id="ludan_ll_1"> 188 <script type="text/html" id="ludan_ll_1">
194 {{each list as obj i}} 189 {{each list as obj i}}
195 <tr> 190 <tr>
196 - <td>{{obj.bc}}</td>  
197 - <td><label>{{obj.nbbm}}</label></td> 191 + {{if i==0}}
  192 + <td>序号</td>
  193 + <td>内部编码</label></td>
  194 + {{else}}
  195 + <td>{{i}}</td>
  196 + <td><label>{{obj.nbbm}}</label></td>
  197 + {{/if}}
198 {{each lists as o j}} 198 {{each lists as o j}}
199 {{if i==0}} 199 {{if i==0}}
200 <td> 200 <td>
@@ -206,8 +206,7 @@ @@ -206,8 +206,7 @@
206 <td {{if obj[o.stationCode] =='y'}}style="color: red"{{/if}}> 206 <td {{if obj[o.stationCode] =='y'}}style="color: red"{{/if}}>
207 {{if obj[(o.stationCode)+'in']!=''}} 207 {{if obj[(o.stationCode)+'in']!=''}}
208 <label> I {{obj[(o.stationCode)+'in']}}</label> 208 <label> I {{obj[(o.stationCode)+'in']}}</label>
209 - {{/if}}  
210 - <br/> 209 + {{/if}}<br/>
211 {{if obj[(o.stationCode)+'out']!=''}} 210 {{if obj[(o.stationCode)+'out']!=''}}
212 <label> O{{obj[(o.stationCode)+'out']}}</label> 211 <label> O{{obj[(o.stationCode)+'out']}}</label>
213 {{/if}} 212 {{/if}}
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/add_range_normal.html
1 -<!-- 区间变全程 -->  
2 -<div class="add_range_2_normal">  
3 - <div class="forms"></div>  
4 -  
5 - <div class="uk-modal-footer uk-text-right" style="margin-top: 5px;">  
6 - <button type="button" class="uk-button uk-modal-close">取消</button>  
7 - <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>  
8 - </div>  
9 - <script>  
10 - (function () {  
11 - var wrap = '#add-sub-task-main-modal .add_range_2_normal',  
12 - sch,nextSch,f1,tf1,f2,tf2;  
13 -  
14 - $(wrap).on('init', function (e, data) {  
15 - e.stopPropagation();  
16 - sch = data.sch;  
17 - nextSch = gb_schedule_table.getNextSch(sch);  
18 -  
19 - if(sch.bcType!='region'){  
20 - $(wrap).html('<div class="err_panel">该模板只能应用区间班次!</div>');  
21 - return;  
22 - }  
23 - f1 = addTaskForm();  
24 - tf1 = addTaskForm().addClass('temp_service');  
25 - changeField(f1, tf1);  
26 -  
27 - //返程也是区间  
28 - if(nextSch.bcType=='region'){  
29 - var u_d_input = '<input name="upDown" type="hidden" value="'+nextSch.xlDir+'">';  
30 - tf1.after('<div class="range_2_normal_tt">返程</div>');  
31 - tf2 = addTaskForm(u_d_input).addClass('temp_service');  
32 - f2 = addTaskForm(u_d_input);  
33 -  
34 - changeField(f2, tf2);  
35 - }  
36 -  
37 - //设置默认值  
38 - setDefaultVal();  
39 - });  
40 -  
41 - function addTaskForm(upDownInput) {  
42 - var htmlStr = template('sub-task-v2-form-temp', {sch: sch});  
43 - var f = $(htmlStr);  
44 - $('.forms', wrap).append(f);  
45 -  
46 - if(upDownInput)  
47 - f.append(upDownInput);  
48 - //字典转换  
49 - dictionaryUtils.transformDom($('.nt-dictionary', f));  
50 -  
51 - //班次类型切换  
52 - $('select[name=type2]', f).trigger('change');  
53 -  
54 - f.formValidation({  
55 - framework: 'uikit',  
56 - locale: 'zh_CN'  
57 - }).on('add_reason_field', function () {  
58 - $(this).formValidation('addField', 'reason');  
59 - });  
60 -  
61 - $f('type2', f).attr('disabled', 'disabled');  
62 - return f;  
63 - }  
64 -  
65 - function $f(name, f) {  
66 - return $('[name=' + name + ']', f);  
67 - }  
68 -  
69 - function changeField(f, tf) {  
70 - $f('type1', tf).val('临加');  
71 - $f('mileageType', tf).html('<option value="service">临加</option>');  
72 - $f('destroy', f).parents('.uk-form-controls').hide();  
73 - $f('destroy', tf).parents('.uk-form-controls').hide();  
74 - }  
75 -  
76 - /**  
77 - * 设置默认值  
78 - */  
79 - function setDefaultVal() {  
80 - $f('startStation', f1).attr('disabled', 'disabled');  
81 - $f('endStation', f1).val(sch.zdzCode).trigger('change').attr('disabled', 'disabled');  
82 - $f('startStation', tf1).val(sch.zdzCode).trigger('change');  
83 -  
84 - //tf1 startDate  
85 - $f('startDate', tf1).val($f('endDate', f1).val()).trigger('input');  
86 - if(tf2){  
87 - $('[sch_id_inp]', tf2).val(nextSch.id);  
88 - $f('endStation', tf2).val(nextSch.qdzCode).trigger('change');  
89 - }  
90 - if(f2){  
91 - $('[sch_id_inp]', f2).val(nextSch.id);  
92 - $f('endStation', f2).val(nextSch.zdzCode).attr('disabled', 'disabled');  
93 - $f('startStation', f2).val(nextSch.qdzCode).trigger('change').attr('disabled', 'disabled');  
94 - $f('mileage', f2).val(nextSch.jhlc);  
95 - $f('startDate', f2).val($f('endDate', tf2).val()).trigger('change');  
96 - }  
97 - }  
98 -  
99 - /**  
100 - * 备注级联  
101 - */  
102 - $(wrap).on('input', '[name=remarks]', function () {  
103 - var nfs = $(this).parents('.sub_task_form_v2').nextAll('.sub_task_form_v2');  
104 - $('[name=remarks]', nfs).val($(this).val());  
105 - });  
106 -  
107 -  
108 - //提交  
109 - $('button[type=submit]', wrap).on('click', function () {  
110 - $(this).addClass('disabled').attr('disabled','disabled');  
111 - dataArray = [];  
112 - $('form.sub_task_form_v2', wrap).data('valid', false)  
113 - .formValidation('validate');  
114 - });  
115 -  
116 - var dataArray = [];  
117 - $(wrap).on('success.form.fv', 'form.sub_task_form_v2', function (e) {  
118 - e.preventDefault();  
119 -  
120 - dataArray.push($.extend($(this).serializeJSON(), gb_common.getDisabledVal(this)));  
121 - $(this).data('valid', true);  
122 -  
123 - if (allValidSuccess()) {  
124 - var i = 0;  
125 - (function () {  
126 - var f = arguments.callee;  
127 - if (i >= dataArray.length) {  
128 - UIkit.modal('#add-sub-task-main-modal').hide();  
129 - $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: sch});  
130 - return;  
131 - }  
132 - var data = dataArray[i];  
133 - gb_common.$post('/childTask', data, function (rs) {  
134 - notify_succ('子任务添加成功');  
135 - gb_schedule_table.updateSchedule(rs.t);  
136 - i++;  
137 - f();  
138 - });  
139 - })();  
140 - }  
141 - });  
142 - //校验不过  
143 - $(wrap).on('err.field.fv','form.sub_task_form_v2', function () {  
144 - $('button[type=submit]', wrap).removeClass('disabled').removeAttr('disabled');  
145 - });  
146 -  
147 - function allValidSuccess() {  
148 - var flag = true;  
149 - $('form.sub_task_form_v2', wrap).each(function (i, f) {  
150 - if(!$(f).data('valid')){  
151 - flag = false;  
152 - return false;  
153 - }  
154 - });  
155 - return flag;  
156 - }  
157 -  
158 - })();  
159 - </script> 1 +<!-- 区间变全程 -->
  2 +<div class="add_range_2_normal">
  3 + <div class="forms"></div>
  4 +
  5 + <div class="uk-modal-footer uk-text-right" style="margin-top: 5px;">
  6 + <button type="button" class="uk-button uk-modal-close">取消</button>
  7 + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>
  8 + </div>
  9 + <script>
  10 + (function () {
  11 + var wrap = '#add-sub-task-main-modal .add_range_2_normal',
  12 + sch,nextSch,f1,tf1,f2,tf2;
  13 +
  14 + $(wrap).on('init', function (e, data) {
  15 + e.stopPropagation();
  16 + sch = data.sch;
  17 + nextSch = gb_schedule_table.getNextSch(sch);
  18 +
  19 + if(sch.bcType!='region'){
  20 + $(wrap).html('<div class="err_panel">该模板只能应用区间班次!</div>');
  21 + return;
  22 + }
  23 + f1 = addTaskForm();
  24 + tf1 = addTaskForm().addClass('temp_service');
  25 + changeField(f1, tf1);
  26 +
  27 + //返程也是区间
  28 + if(nextSch.bcType=='region'){
  29 + var u_d_input = '<input name="upDown" type="hidden" value="'+nextSch.xlDir+'">';
  30 + tf1.after('<div class="range_2_normal_tt">返程</div>');
  31 + tf2 = addTaskForm(u_d_input).addClass('temp_service');
  32 + f2 = addTaskForm(u_d_input);
  33 +
  34 + changeField(f2, tf2);
  35 + }
  36 +
  37 + //设置默认值
  38 + setDefaultVal();
  39 + });
  40 +
  41 + function addTaskForm(upDownInput) {
  42 + var htmlStr = template('sub-task-v2-form-temp', {sch: sch});
  43 + var f = $(htmlStr);
  44 + $('.forms', wrap).append(f);
  45 +
  46 + if(upDownInput)
  47 + f.append(upDownInput);
  48 + //字典转换
  49 + dictionaryUtils.transformDom($('.nt-dictionary', f));
  50 +
  51 + //班次类型切换
  52 + $('select[name=type2]', f).trigger('change');
  53 +
  54 + f.formValidation({
  55 + framework: 'uikit',
  56 + locale: 'zh_CN'
  57 + }).on('add_reason_field', function () {
  58 + $(this).formValidation('addField', 'reason');
  59 + });
  60 +
  61 + $f('type2', f).attr('disabled', 'disabled');
  62 + return f;
  63 + }
  64 +
  65 + function $f(name, f) {
  66 + return $('[name=' + name + ']', f);
  67 + }
  68 +
  69 + function changeField(f, tf) {
  70 + $f('type1', tf).val('临加');
  71 + $f('mileageType', tf).html('<option value="service">临加</option>');
  72 + $f('destroy', f).parents('.uk-form-controls').hide();
  73 + $f('destroy', tf).parents('.uk-form-controls').hide();
  74 + }
  75 +
  76 + /**
  77 + * 设置默认值
  78 + */
  79 + function setDefaultVal() {
  80 + $f('startStation', f1).attr('disabled', 'disabled');
  81 + $f('endStation', f1).val(sch.zdzCode).trigger('change').attr('disabled', 'disabled');
  82 + $f('startStation', tf1).val(sch.zdzCode).trigger('change');
  83 +
  84 + //tf1 startDate
  85 + $f('startDate', tf1).val($f('endDate', f1).val()).trigger('input');
  86 + if(tf2){
  87 + $('[sch_id_inp]', tf2).val(nextSch.id);
  88 + $f('endStation', tf2).val(nextSch.qdzCode).trigger('change');
  89 + }
  90 + if(f2){
  91 + $('[sch_id_inp]', f2).val(nextSch.id);
  92 + $f('endStation', f2).val(nextSch.zdzCode).attr('disabled', 'disabled');
  93 + $f('startStation', f2).val(nextSch.qdzCode).trigger('change').attr('disabled', 'disabled');
  94 + $f('mileage', f2).val(nextSch.jhlc);
  95 + $f('startDate', f2).val($f('endDate', tf2).val()).trigger('change');
  96 + }
  97 + }
  98 +
  99 + /**
  100 + * 备注级联
  101 + */
  102 + $(wrap).on('input', '[name=remarks]', function () {
  103 + var nfs = $(this).parents('.sub_task_form_v2').nextAll('.sub_task_form_v2');
  104 + $('[name=remarks]', nfs).val($(this).val());
  105 + });
  106 +
  107 +
  108 + //提交
  109 + $('button[type=submit]', wrap).on('click', function () {
  110 + $(this).addClass('disabled').attr('disabled','disabled');
  111 + dataArray = [];
  112 + $('form.sub_task_form_v2', wrap).data('valid', false)
  113 + .formValidation('validate');
  114 + });
  115 +
  116 + var dataArray = [];
  117 + $(wrap).on('success.form.fv', 'form.sub_task_form_v2', function (e) {
  118 + e.preventDefault();
  119 +
  120 + dataArray.push($.extend($(this).serializeJSON(), gb_common.getDisabledVal(this)));
  121 + $(this).data('valid', true);
  122 +
  123 + if (allValidSuccess()) {
  124 + var i = 0;
  125 + (function () {
  126 + var f = arguments.callee;
  127 + if (i >= dataArray.length) {
  128 + UIkit.modal('#add-sub-task-main-modal').hide();
  129 + $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: sch});
  130 + return;
  131 + }
  132 + var data = dataArray[i];
  133 + gb_common.$post('/childTask', data, function (rs) {
  134 + notify_succ('子任务添加成功');
  135 + gb_schedule_table.updateSchedule(rs.t);
  136 + i++;
  137 + f();
  138 + });
  139 + })();
  140 + }
  141 + });
  142 + //校验不过
  143 + $(wrap).on('err.field.fv','form.sub_task_form_v2', function () {
  144 + $('button[type=submit]', wrap).removeClass('disabled').removeAttr('disabled');
  145 + });
  146 +
  147 + function allValidSuccess() {
  148 + var flag = true;
  149 + $('form.sub_task_form_v2', wrap).each(function (i, f) {
  150 + if(!$(f).data('valid')){
  151 + flag = false;
  152 + return false;
  153 + }
  154 + });
  155 + return flag;
  156 + }
  157 +
  158 + })();
  159 + </script>
160 </div> 160 </div>
161 \ No newline at end of file 161 \ No newline at end of file