Commit 0f8ff1f7582f0907b22aea785945be8e4e7a66d1

Authored by 娄高锋
1 parent f315d0e7

搜索项“路救”改为“路救故障”

src/main/resources/static/pages/summary/destory_sch_detail/list.html
1   -<!DOCTYPE html>
2   -<html lang="zh-cn">
3   -
4   -<head>
5   - <meta charset="UTF-8">
6   - <link rel="stylesheet" href="/assets/plugins/uk3.0/uikit.min.css"/>
7   - <link rel="stylesheet" href="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" />
8   - <!-- flatpickr -->
9   - <link rel="stylesheet" href="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.css">
10   - <style>
11   - html,body{
12   - height: 100%;
13   - }
14   - .ct_page{
15   - padding: 25px 15px;
16   - height: 100%;
17   - height: calc(100% - 50px);
18   - }
19   -
20   - .ct_cont{
21   - height: calc(100% - 35px);
22   - }
23   -
24   - .ct_cont>div>div.uk-card{
25   - height: 99%;
26   - }
27   -
28   - .loading{
29   - height: 100%;
30   - text-align: center;
31   - }
32   - .loading .uk-spinner{
33   - margin-top: 200px;
34   - }
35   - .loading circle{
36   - stroke: red;
37   - }
38   -
39   - .ps-container > .ps-scrollbar-x-rail, .ps-container > .ps-scrollbar-y-rail{
40   - opacity: 0.6 !important;
41   - padding: 0 !important;
42   - }
43   -
44   - .ct_destroy_sch_table_width th:nth-of-type(1),.ct_destroy_sch_table_width td:nth-of-type(1){
45   - width: 9%;
46   - }
47   - .ct_destroy_sch_table_width th:nth-of-type(2),.ct_destroy_sch_table_width td:nth-of-type(2){
48   - width: 9%;
49   - }
50   - .ct_destroy_sch_table_width th:nth-of-type(3),.ct_destroy_sch_table_width td:nth-of-type(3){
51   - width: 9%;
52   - }
53   - .ct_destroy_sch_table_width th:nth-of-type(4),.ct_destroy_sch_table_width td:nth-of-type(4){
54   - width: 9%;
55   - }
56   - .ct_destroy_sch_table_width th:nth-of-type(5),.ct_destroy_sch_table_width td:nth-of-type(5){
57   - width: 9%;
58   - }
59   - .ct_destroy_sch_table_width th:nth-of-type(6),.ct_destroy_sch_table_width td:nth-of-type(6){
60   - width: 9%;
61   - }
62   - .ct_destroy_sch_table_width th:nth-of-type(7),.ct_destroy_sch_table_width td:nth-of-type(7){
63   - width: 8%;
64   - }
65   - .ct_destroy_sch_table_width th:nth-of-type(8),.ct_destroy_sch_table_width td:nth-of-type(8){
66   - width: 8%;
67   - }
68   - .ct_destroy_sch_table_width th:nth-of-type(9),.ct_destroy_sch_table_width td:nth-of-type(9){
69   - width: 8%;
70   - }
71   - .ct_destroy_sch_table_width th:nth-of-type(10),.ct_destroy_sch_table_width td:nth-of-type(10){
72   - }
73   -
74   - .ct_search_form_wrap{
75   - border-bottom: 1px solid #e5e5e5;
76   - padding: 10px 0 25px 10px;
77   - }
78   - .ct_search_form_wrap .ct_field{
79   - display: inline-block;
80   - margin: 0 5px;
81   - }
82   -
83   - .ct_search_form_wrap .ct_field label{
84   - font-size: 14px;
85   - }
86   -
87   - .ct_search_form_wrap .ct_field input{
88   - width: 110px;
89   - }
90   -
91   - .ct_search_form_wrap .ct_field select{
92   - width: auto;
93   - min-width: 100px;
94   - }
95   -
96   - .ct_search_form_wrap .uk-button{
97   - padding: 0 14px;
98   - }
99   -
100   - .ct_search_form_wrap .uk-button i{
101   - vertical-align: middle;
102   - margin-top: -2px;
103   - margin-right: 7px;
104   - }
105   -
106   - .ct_table_wrap{
107   - font-size: 14px;
108   - height: calc(100% - 77px);
109   - }
110   -
111   - .t_body_wrap{
112   - height: calc(100% - 41px);
113   - overflow: auto;
114   - position: relative;
115   - }
116   -
117   - .ct_field.ct_field_bottom{
118   - vertical-align: bottom;
119   - font-size: 12px;
120   - margin-left: 0;
121   - }
122   - </style>
123   -</head>
124   -
125   -<body>
126   -<div class="loading">
127   - <div uk-spinner></div>
128   -</div>
129   -<div class="ct_page" style="display: none;">
130   - <h3 class="uk-heading-line uk-heading-bullet"><span style="color: #ff5353;">烂班明细统计</span></h3>
131   - <div class="ct_cont" >
132   - <div class="ct_search_form_wrap">
133   - <form>
134   - <div class="ct_field">
135   - <label>公司:
136   - <select class="uk-select" name="gsBm_eq">
137   - </select>
138   - </label>
139   - </div>
140   - <div class="ct_field">
141   - <label>分公司:
142   - <select class="uk-select" name="fgsBm_eq">
143   - </select>
144   - </label>
145   - </div>
146   - <div class="ct_field">
147   - <label>线路:
148   - <select class="uk-select" name="lineCode_eq">
149   - </select>
150   - </label>
151   - </div>
152   - <div class="ct_field">
153   - <label>原因:
154   - <select class="uk-select" name="reason_eq">
155   - <option value="">全部</option>
156   - <option value="配车">配车</option>
157   - <option value="保养">保养</option>
158   - <option value="故障">故障</option>
159   - <option value="肇事">肇事</option>
160   - <option value="路阻">路阻</option>
161   - <option value="纠纷">纠纷</option>
162   - <option value="缺人">缺人</option>
163   - <option value="客稀">客稀</option>
164   - <option value="缺车">缺车</option>
165   - <option value="气候">气候</option>
166   - <option value="援外">援外</option>
167   - <option value="吊慢">吊慢</option>
168   - <option value="抽减">抽减</option>
169   - <option value="路救">路救</option>
170   - <option value="其他">其他</option>
171   - </select>
172   - </label>
173   - </div>
174   - <div class="ct_field">
175   - <label>日期:
176   - <input class="uk-input" name="rq" style="width: 220px;">
177   - </label>
178   - </div>
179   - <div class="ct_field">
180   - <button class="uk-button uk-button-primary search"><i uk-icon="icon: search"></i>搜索</button>
181   - </div>
182   - <div class="ct_field ct_field_bottom">
183   - <button class="uk-button uk-button-text export_excel" style="padding: 0 5px;">导出数据</button>
184   - </div>
185   - <div class="ct_field ct_field_bottom">
186   - <span uk-icon="icon: question" title="不统计进出场和2点间空驶" uk-tooltip="pos: bottom"></span>
187   - </div>
188   - </form>
189   - </div>
190   - <div class="ct_table_wrap day">
191   - <table class="uk-table uk-table-small ct_destroy_sch_table_width" style="margin-bottom: 0;">
192   - <thead>
193   - <tr>
194   - <th>日期</th>
195   - <th>线路</th>
196   - <th>车号</th>
197   - <th>司机</th>
198   - <th>售票员</th>
199   - <th>原因</th>
200   - <th>班次</th>
201   - <th>烂班公里</th>
202   - <th>烂班时间</th>
203   - <th>备注</th>
204   - </tr>
205   - </thead>
206   - </table>
207   - <div class="t_body_wrap">
208   - <table class="uk-table uk-table-divider uk-table-hover uk-table-small ct_destroy_sch_table ct_destroy_sch_table_width">
209   - <tbody>
210   - </tbody>
211   - </table>
212   - </div>
213   - </div>
214   - </div>
215   -</div>
216   -
217   -<script id="destroy_sch_list_temp" type="text/html">
218   - {{each list as obj i}}
219   - <tr>
220   - <td>{{obj.rq}}</td>
221   - <td>{{obj.lineName}}</td>
222   - <td>{{obj.nbbm}}</td>
223   - <td>{{obj.jGh}}</td>
224   - <td>{{obj.sGh}}</td>
225   - <td>{{obj.reason}}</td>
226   - <td><a style="text-decoration: underline;">{{obj.size}}</a></td>
227   - <td>{{obj.mileage}}</td>
228   - <td>{{obj.timeStr}}</td>
229   - <td>{{obj.remark}}</td>
230   - </tr>
231   - {{/each}}
232   -</script>
233   -
234   -<script src="/metronic_v4.5.4/plugins/jquery.min.js"></script>
235   -<script src="/assets/plugins/uk3.0/uikit.min.js"></script>
236   -<script src="/assets/plugins/uk3.0/uikit-icons.min.js"></script>
237   -<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" ></script>
238   -<!-- EventProxy -->
239   -<script src="/assets/js/eventproxy.js"></script>
240   -<!-- art-template 模版引擎 -->
241   -<script src="/assets/plugins/template.js"></script>
242   -<script src="/real_control_v2/assets/plugins/moment/moment.min.js"></script>
243   -<!-- jquery.serializejson JSON序列化插件 -->
244   -<script src="/assets/plugins/jquery.serializejson.js" merge="plugins"></script>
245   -<!-- flatpickr -->
246   -<script src="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.js" ></script>
247   -<script src="/real_control_v2/assets/plugins/flatpickr/l10n/zh.js" ></script>
248   -<script>
249   -
250   - var f = $('form', '');
251   - //var page=0, pageSize=120;
252   -
253   - var ep = EventProxy.create('query_comps', 'query_lines', function () {
254   - $('[name=gsBm_eq]', f).trigger('change');//公司change
255   - query();
256   -
257   - $('.loading').remove();
258   - $('.ct_page').show();
259   - });
260   -
261   - //点击搜索
262   - $('button.search', f).on('click', query);
263   -
264   - function query() {
265   - $('button.search', f).attr('disabled', 'disabled');
266   - var data = f.serializeJSON();
267   - $('.ct_destroy_sch_table tbody').html('');
268   - //开始结束时间
269   - data.rq_ge = data.rq.substr(0, 10);
270   - data.rq_le = data.rq.substr(13);
271   - //data.order='t';
272   - delete data.rq;
273   -
274   - $.get('/summary/destroy_detail/all', data, function (rs) {
275   - $('button.search', f).removeAttr('disabled');
276   - if(!rs || rs.length==0)
277   - return UIkit.notification('没有搜索到相关数据!!', 'danger');
278   - $.each(rs, function () {
279   - this.timeStr=moment(this.t).format('HH:mm')
280   - });
281   -
282   - var htmlStr = template('destroy_sch_list_temp', {list: rs});
283   - $('.ct_destroy_sch_table tbody').html(htmlStr);
284   - $('.t_body_wrap').perfectScrollbar('update');
285   - });
286   - }
287   -
288   -
289   - //日期选择框
290   - var fs='YYYY-MM-DD'
291   - , ets=moment().subtract(1, 'days').format(fs)
292   - , sts=moment().subtract(3, 'days').format(fs);
293   - flatpickr('.ct_search_form_wrap [name=rq]', {
294   - mode: "range", dateFormat: "Y-m-d","locale": "zh", defaultDate: [sts, ets]
295   - });
296   - var comps;
297   - //构建公司级联下拉框
298   - $.get('/user/companyData', function (rs) {
299   - comps = rs;
300   - var opts = '';
301   - for(var i=0,obj;obj=comps[i++];){
302   - opts += '<option value="'+obj.companyCode+'">'+obj.companyName+'</option>';
303   - }
304   - $('[name=gsBm_eq]', f).html(opts);
305   - ep.emit('query_comps');
306   - });
307   -
308   - var lineMapps;
309   - //加载线路信息
310   - $.get('/line/all', {'destroy_eq': 0}, function (rs) {
311   - rs.sort(function (a, b) {
312   - return a.name.localeCompare(b.name);
313   - });
314   - lineMapps={};
315   - var k;
316   - $.each(rs, function () {
317   - k = this.company+'_'+this.brancheCompany;
318   - if(!lineMapps[k])
319   - lineMapps[k]=[];
320   - lineMapps[k].push(this);
321   - });
322   -
323   - ep.emit('query_lines');
324   - });
325   -
326   - $('[name=gsBm_eq]', f).on('change', function () {
327   - var code = $(this).val(), subs=[];
328   - $.each(comps, function () {
329   - if(this.companyCode==code)
330   - subs=this.children;
331   - });
332   -
333   - var opts='<option value="">全部</option>';
334   - $.each(subs, function () {
335   - opts += '<option value="'+this.code+'">'+this.name+'</option>';
336   - });
337   - $('[name=fgsBm_eq]', f).html(opts).trigger('change');
338   - });
339   -
340   - $('[name=fgsBm_eq]', f).on('change', function () {
341   - var k = $('[name=gsBm_eq]', f).val() + '_' + $(this).val();
342   - var array = lineMapps[k];
343   - var opts = '<option value="">全部</option>';
344   - if(array){
345   - $.each(array, function () {
346   - opts += '<option value="'+this.lineCode+'">'+this.name+'</option>';
347   - });
348   - }
349   - $('[name=lineCode_eq]', f).html(opts);
350   - });
351   -
352   - //
353   - //滚动条
354   - $('.t_body_wrap').perfectScrollbar({suppressScrollX: true});
355   -
356   - $(document).on('submit', 'form', function () {
357   - return false;
358   - });
359   -
360   - /**
361   - * 导出
362   - */
363   - $('.export_excel').on('click', function () {
364   - var data = f.serializeJSON();
365   - data.rq_ge = data.rq.substr(0, 10);
366   - data.rq_le = data.rq.substr(13);
367   - data.order='t';
368   - delete data.rq;
369   -
370   - window.open('/summary/destroy_detail/excel?' + $.param(data));
371   - });
372   -
373   -</script>
374   -</body>
  1 +<!DOCTYPE html>
  2 +<html lang="zh-cn">
  3 +
  4 +<head>
  5 + <meta charset="UTF-8">
  6 + <link rel="stylesheet" href="/assets/plugins/uk3.0/uikit.min.css"/>
  7 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" />
  8 + <!-- flatpickr -->
  9 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.css">
  10 + <style>
  11 + html,body{
  12 + height: 100%;
  13 + }
  14 + .ct_page{
  15 + padding: 25px 15px;
  16 + height: 100%;
  17 + height: calc(100% - 50px);
  18 + }
  19 +
  20 + .ct_cont{
  21 + height: calc(100% - 35px);
  22 + }
  23 +
  24 + .ct_cont>div>div.uk-card{
  25 + height: 99%;
  26 + }
  27 +
  28 + .loading{
  29 + height: 100%;
  30 + text-align: center;
  31 + }
  32 + .loading .uk-spinner{
  33 + margin-top: 200px;
  34 + }
  35 + .loading circle{
  36 + stroke: red;
  37 + }
  38 +
  39 + .ps-container > .ps-scrollbar-x-rail, .ps-container > .ps-scrollbar-y-rail{
  40 + opacity: 0.6 !important;
  41 + padding: 0 !important;
  42 + }
  43 +
  44 + .ct_destroy_sch_table_width th:nth-of-type(1),.ct_destroy_sch_table_width td:nth-of-type(1){
  45 + width: 9%;
  46 + }
  47 + .ct_destroy_sch_table_width th:nth-of-type(2),.ct_destroy_sch_table_width td:nth-of-type(2){
  48 + width: 9%;
  49 + }
  50 + .ct_destroy_sch_table_width th:nth-of-type(3),.ct_destroy_sch_table_width td:nth-of-type(3){
  51 + width: 9%;
  52 + }
  53 + .ct_destroy_sch_table_width th:nth-of-type(4),.ct_destroy_sch_table_width td:nth-of-type(4){
  54 + width: 9%;
  55 + }
  56 + .ct_destroy_sch_table_width th:nth-of-type(5),.ct_destroy_sch_table_width td:nth-of-type(5){
  57 + width: 9%;
  58 + }
  59 + .ct_destroy_sch_table_width th:nth-of-type(6),.ct_destroy_sch_table_width td:nth-of-type(6){
  60 + width: 9%;
  61 + }
  62 + .ct_destroy_sch_table_width th:nth-of-type(7),.ct_destroy_sch_table_width td:nth-of-type(7){
  63 + width: 8%;
  64 + }
  65 + .ct_destroy_sch_table_width th:nth-of-type(8),.ct_destroy_sch_table_width td:nth-of-type(8){
  66 + width: 8%;
  67 + }
  68 + .ct_destroy_sch_table_width th:nth-of-type(9),.ct_destroy_sch_table_width td:nth-of-type(9){
  69 + width: 8%;
  70 + }
  71 + .ct_destroy_sch_table_width th:nth-of-type(10),.ct_destroy_sch_table_width td:nth-of-type(10){
  72 + }
  73 +
  74 + .ct_search_form_wrap{
  75 + border-bottom: 1px solid #e5e5e5;
  76 + padding: 10px 0 25px 10px;
  77 + }
  78 + .ct_search_form_wrap .ct_field{
  79 + display: inline-block;
  80 + margin: 0 5px;
  81 + }
  82 +
  83 + .ct_search_form_wrap .ct_field label{
  84 + font-size: 14px;
  85 + }
  86 +
  87 + .ct_search_form_wrap .ct_field input{
  88 + width: 110px;
  89 + }
  90 +
  91 + .ct_search_form_wrap .ct_field select{
  92 + width: auto;
  93 + min-width: 100px;
  94 + }
  95 +
  96 + .ct_search_form_wrap .uk-button{
  97 + padding: 0 14px;
  98 + }
  99 +
  100 + .ct_search_form_wrap .uk-button i{
  101 + vertical-align: middle;
  102 + margin-top: -2px;
  103 + margin-right: 7px;
  104 + }
  105 +
  106 + .ct_table_wrap{
  107 + font-size: 14px;
  108 + height: calc(100% - 77px);
  109 + }
  110 +
  111 + .t_body_wrap{
  112 + height: calc(100% - 41px);
  113 + overflow: auto;
  114 + position: relative;
  115 + }
  116 +
  117 + .ct_field.ct_field_bottom{
  118 + vertical-align: bottom;
  119 + font-size: 12px;
  120 + margin-left: 0;
  121 + }
  122 + </style>
  123 +</head>
  124 +
  125 +<body>
  126 +<div class="loading">
  127 + <div uk-spinner></div>
  128 +</div>
  129 +<div class="ct_page" style="display: none;">
  130 + <h3 class="uk-heading-line uk-heading-bullet"><span style="color: #ff5353;">烂班明细统计</span></h3>
  131 + <div class="ct_cont" >
  132 + <div class="ct_search_form_wrap">
  133 + <form>
  134 + <div class="ct_field">
  135 + <label>公司:
  136 + <select class="uk-select" name="gsBm_eq">
  137 + </select>
  138 + </label>
  139 + </div>
  140 + <div class="ct_field">
  141 + <label>分公司:
  142 + <select class="uk-select" name="fgsBm_eq">
  143 + </select>
  144 + </label>
  145 + </div>
  146 + <div class="ct_field">
  147 + <label>线路:
  148 + <select class="uk-select" name="lineCode_eq">
  149 + </select>
  150 + </label>
  151 + </div>
  152 + <div class="ct_field">
  153 + <label>原因:
  154 + <select class="uk-select" name="reason_eq">
  155 + <option value="">全部</option>
  156 + <option value="配车">配车</option>
  157 + <option value="保养">保养</option>
  158 + <option value="故障">故障</option>
  159 + <option value="肇事">肇事</option>
  160 + <option value="路阻">路阻</option>
  161 + <option value="纠纷">纠纷</option>
  162 + <option value="缺人">缺人</option>
  163 + <option value="客稀">客稀</option>
  164 + <option value="缺车">缺车</option>
  165 + <option value="气候">气候</option>
  166 + <option value="援外">援外</option>
  167 + <option value="吊慢">吊慢</option>
  168 + <option value="抽减">抽减</option>
  169 + <option value="路救故障">路救故障</option>
  170 + <option value="其他">其他</option>
  171 + </select>
  172 + </label>
  173 + </div>
  174 + <div class="ct_field">
  175 + <label>日期:
  176 + <input class="uk-input" name="rq" style="width: 220px;">
  177 + </label>
  178 + </div>
  179 + <div class="ct_field">
  180 + <button class="uk-button uk-button-primary search"><i uk-icon="icon: search"></i>搜索</button>
  181 + </div>
  182 + <div class="ct_field ct_field_bottom">
  183 + <button class="uk-button uk-button-text export_excel" style="padding: 0 5px;">导出数据</button>
  184 + </div>
  185 + <div class="ct_field ct_field_bottom">
  186 + <span uk-icon="icon: question" title="不统计进出场和2点间空驶" uk-tooltip="pos: bottom"></span>
  187 + </div>
  188 + </form>
  189 + </div>
  190 + <div class="ct_table_wrap day">
  191 + <table class="uk-table uk-table-small ct_destroy_sch_table_width" style="margin-bottom: 0;">
  192 + <thead>
  193 + <tr>
  194 + <th>日期</th>
  195 + <th>线路</th>
  196 + <th>车号</th>
  197 + <th>司机</th>
  198 + <th>售票员</th>
  199 + <th>原因</th>
  200 + <th>班次</th>
  201 + <th>烂班公里</th>
  202 + <th>烂班时间</th>
  203 + <th>备注</th>
  204 + </tr>
  205 + </thead>
  206 + </table>
  207 + <div class="t_body_wrap">
  208 + <table class="uk-table uk-table-divider uk-table-hover uk-table-small ct_destroy_sch_table ct_destroy_sch_table_width">
  209 + <tbody>
  210 + </tbody>
  211 + </table>
  212 + </div>
  213 + </div>
  214 + </div>
  215 +</div>
  216 +
  217 +<script id="destroy_sch_list_temp" type="text/html">
  218 + {{each list as obj i}}
  219 + <tr>
  220 + <td>{{obj.rq}}</td>
  221 + <td>{{obj.lineName}}</td>
  222 + <td>{{obj.nbbm}}</td>
  223 + <td>{{obj.jGh}}</td>
  224 + <td>{{obj.sGh}}</td>
  225 + <td>{{obj.reason}}</td>
  226 + <td><a style="text-decoration: underline;">{{obj.size}}</a></td>
  227 + <td>{{obj.mileage}}</td>
  228 + <td>{{obj.timeStr}}</td>
  229 + <td>{{obj.remark}}</td>
  230 + </tr>
  231 + {{/each}}
  232 +</script>
  233 +
  234 +<script src="/metronic_v4.5.4/plugins/jquery.min.js"></script>
  235 +<script src="/assets/plugins/uk3.0/uikit.min.js"></script>
  236 +<script src="/assets/plugins/uk3.0/uikit-icons.min.js"></script>
  237 +<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" ></script>
  238 +<!-- EventProxy -->
  239 +<script src="/assets/js/eventproxy.js"></script>
  240 +<!-- art-template 模版引擎 -->
  241 +<script src="/assets/plugins/template.js"></script>
  242 +<script src="/real_control_v2/assets/plugins/moment/moment.min.js"></script>
  243 +<!-- jquery.serializejson JSON序列化插件 -->
  244 +<script src="/assets/plugins/jquery.serializejson.js" merge="plugins"></script>
  245 +<!-- flatpickr -->
  246 +<script src="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.js" ></script>
  247 +<script src="/real_control_v2/assets/plugins/flatpickr/l10n/zh.js" ></script>
  248 +<script>
  249 +
  250 + var f = $('form', '');
  251 + //var page=0, pageSize=120;
  252 +
  253 + var ep = EventProxy.create('query_comps', 'query_lines', function () {
  254 + $('[name=gsBm_eq]', f).trigger('change');//公司change
  255 + query();
  256 +
  257 + $('.loading').remove();
  258 + $('.ct_page').show();
  259 + });
  260 +
  261 + //点击搜索
  262 + $('button.search', f).on('click', query);
  263 +
  264 + function query() {
  265 + $('button.search', f).attr('disabled', 'disabled');
  266 + var data = f.serializeJSON();
  267 + $('.ct_destroy_sch_table tbody').html('');
  268 + //开始结束时间
  269 + data.rq_ge = data.rq.substr(0, 10);
  270 + data.rq_le = data.rq.substr(13);
  271 + //data.order='t';
  272 + delete data.rq;
  273 +
  274 + $.get('/summary/destroy_detail/all', data, function (rs) {
  275 + $('button.search', f).removeAttr('disabled');
  276 + if(!rs || rs.length==0)
  277 + return UIkit.notification('没有搜索到相关数据!!', 'danger');
  278 + $.each(rs, function () {
  279 + this.timeStr=moment(this.t).format('HH:mm')
  280 + });
  281 +
  282 + var htmlStr = template('destroy_sch_list_temp', {list: rs});
  283 + $('.ct_destroy_sch_table tbody').html(htmlStr);
  284 + $('.t_body_wrap').perfectScrollbar('update');
  285 + });
  286 + }
  287 +
  288 +
  289 + //日期选择框
  290 + var fs='YYYY-MM-DD'
  291 + , ets=moment().subtract(1, 'days').format(fs)
  292 + , sts=moment().subtract(3, 'days').format(fs);
  293 + flatpickr('.ct_search_form_wrap [name=rq]', {
  294 + mode: "range", dateFormat: "Y-m-d","locale": "zh", defaultDate: [sts, ets]
  295 + });
  296 + var comps;
  297 + //构建公司级联下拉框
  298 + $.get('/user/companyData', function (rs) {
  299 + comps = rs;
  300 + var opts = '';
  301 + for(var i=0,obj;obj=comps[i++];){
  302 + opts += '<option value="'+obj.companyCode+'">'+obj.companyName+'</option>';
  303 + }
  304 + $('[name=gsBm_eq]', f).html(opts);
  305 + ep.emit('query_comps');
  306 + });
  307 +
  308 + var lineMapps;
  309 + //加载线路信息
  310 + $.get('/line/all', {'destroy_eq': 0}, function (rs) {
  311 + rs.sort(function (a, b) {
  312 + return a.name.localeCompare(b.name);
  313 + });
  314 + lineMapps={};
  315 + var k;
  316 + $.each(rs, function () {
  317 + k = this.company+'_'+this.brancheCompany;
  318 + if(!lineMapps[k])
  319 + lineMapps[k]=[];
  320 + lineMapps[k].push(this);
  321 + });
  322 +
  323 + ep.emit('query_lines');
  324 + });
  325 +
  326 + $('[name=gsBm_eq]', f).on('change', function () {
  327 + var code = $(this).val(), subs=[];
  328 + $.each(comps, function () {
  329 + if(this.companyCode==code)
  330 + subs=this.children;
  331 + });
  332 +
  333 + var opts='<option value="">全部</option>';
  334 + $.each(subs, function () {
  335 + opts += '<option value="'+this.code+'">'+this.name+'</option>';
  336 + });
  337 + $('[name=fgsBm_eq]', f).html(opts).trigger('change');
  338 + });
  339 +
  340 + $('[name=fgsBm_eq]', f).on('change', function () {
  341 + var k = $('[name=gsBm_eq]', f).val() + '_' + $(this).val();
  342 + var array = lineMapps[k];
  343 + var opts = '<option value="">全部</option>';
  344 + if(array){
  345 + $.each(array, function () {
  346 + opts += '<option value="'+this.lineCode+'">'+this.name+'</option>';
  347 + });
  348 + }
  349 + $('[name=lineCode_eq]', f).html(opts);
  350 + });
  351 +
  352 + //
  353 + //滚动条
  354 + $('.t_body_wrap').perfectScrollbar({suppressScrollX: true});
  355 +
  356 + $(document).on('submit', 'form', function () {
  357 + return false;
  358 + });
  359 +
  360 + /**
  361 + * 导出
  362 + */
  363 + $('.export_excel').on('click', function () {
  364 + var data = f.serializeJSON();
  365 + data.rq_ge = data.rq.substr(0, 10);
  366 + data.rq_le = data.rq.substr(13);
  367 + data.order='t';
  368 + delete data.rq;
  369 +
  370 + window.open('/summary/destroy_detail/excel?' + $.param(data));
  371 + });
  372 +
  373 +</script>
  374 +</body>
375 375 </html>
376 376 \ No newline at end of file
... ...