Commit d3c9435a1479cb152cdd3b7bdc9e9e6be9ae530d

Authored by 娄高锋
1 parent 945e95b0

LGF 报表

src/main/resources/static/pages/forms/statement/busInterval.html
... ... @@ -29,16 +29,16 @@
29 29 <div class="portlet light porttlet-fit bordered">
30 30 <div class="portlet-title">
31 31 <form id="history" class="form-inline" action="">
32   - <div style="display: inline-block;">
33   - <span class="item-label" style="width: 80px; margin-left: 33px">公司: </span>
  32 + <div style="display: inline-block; margin-left: 33px;" id="company1">
  33 + <span class="item-label" style="width: 80px;">公司: </span>
34 34 <select class="form-control" name="company" id="company" style="width: 180px;"></select>
35 35 </div>
36   - <div style="display: inline-block;">
37   - <span class="item-label" style="width: 80px; margin-left: 24px">分公司: </span>
  36 + <div style="display: inline-block; margin-left: 24px;" id="subCompany1">
  37 + <span class="item-label" style="width: 80px;">分公司: </span>
38 38 <select class="form-control" name="subCompany" id="subCompany" style="width: 180px;"></select>
39 39 </div>
40   - <div style="display: inline-block;">
41   - <span class="item-label" style="width: 80px; margin-left: 24px">线路: </span>
  40 + <div style="display: inline-block; margin-left: 24px;">
  41 + <span class="item-label" style="width: 80px;">线路: </span>
42 42 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
43 43 </div>
44 44 <div style="display: inline-block; margin-left: 10px">
... ... @@ -145,6 +145,11 @@
145 145 for(var i = 0; i < obj.length; i++){
146 146 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
147 147 }
  148 + if(obj.length == 1){
  149 + $('#company1').hide();
  150 + if(obj[0].children.length == 1)
  151 + $('#subCompany1').hide();
  152 + }
148 153 $('#company').html(options);
149 154 updateCompany();
150 155 });
... ...
src/main/resources/static/pages/forms/statement/commandState.html
... ... @@ -27,19 +27,28 @@
27 27 <div class="portlet light porttlet-fit bordered">
28 28 <div class="portlet-title">
29 29 <form id="history" class="form-inline" action="">
30   - <div style="display: inline-block;">
  30 + <div style="display: inline-block; margin-left: 15px;" id="company1">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="company" style="width: 180px;"></select>
  33 + </div>
  34 + <div style="display: inline-block; margin-left: 22px;" id="subCompany1">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="subCompany" style="width: 180px;"></select>
  37 + </div>
  38 + <div style="display: inline-block; margin-left: 15px;">
31 39 <span class="item-label" style="width: 80px;">线路: </span>
32 40 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
33 41 </div>
  42 + <div style="margin-top: 10px" />
34 43 <div style="display: inline-block;margin-left: 15px;">
35 44 <span class="item-label" style="width: 80px;">时间: </span>
36 45 <input class="form-control" type="text" id="date" style="width: 180px;"/>
37 46 </div>
38   - <div style="display: inline-block;margin-left: 15px">
39   - <span class="item-label" style="width: 140px;">内部编码: </span>
  47 + <div style="display: inline-block;margin-left: 8px">
  48 + <span class="item-label" style="width: 140px;">内部编码: </span>
40 49 <select class="form-control" name="code" id="code" style="width: 180px;"></select>
41 50 </div>
42   - <div class="form-group">
  51 + <div class="form-group" style="margin-left: 9px">
43 52 <input class="btn btn-default" type="button" id="query" value="筛选"/>
44 53 <!-- <input class="btn btn-default" type="button" id="export" value="导出"/> -->
45 54 </div>
... ... @@ -64,7 +73,7 @@
64 73 </tbody>
65 74 </table>
66 75 <div id="works_hidden" class="hidden">
67   - <span class="item-label" style="width: 80px;">明细: </span>
  76 + <span class="item-label" style="width: 80px;margin-left: 20px;">明细: </span>
68 77 <span class="item-label" style="width: 80px;margin-left: 60px;">日期 </span>
69 78 <span class="item-label" style="width: 80px;" id="date1"></span>
70 79 <span class="item-label" style="width: 80px;margin-left: 60px;">线路 </span>
... ... @@ -132,6 +141,36 @@
132 141 initPinYinSelect2('#line',data,'');
133 142 })
134 143  
  144 + var obj = [];
  145 + $.get('/user/companyData', function(result){
  146 + obj = result;
  147 + var options = '';
  148 + for(var i = 0; i < obj.length; i++){
  149 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  150 + }
  151 + if(obj.length == 1){
  152 + $('#company1').hide();
  153 + if(obj[0].children.length == 1)
  154 + $('#subCompany1').hide();
  155 + }
  156 + $('#company').html(options);
  157 + updateCompany();
  158 + });
  159 + $("#company").on("change",updateCompany);
  160 + function updateCompany(){
  161 + var company = $('#company').val();
  162 + var options = '';
  163 + for(var i = 0; i < obj.length; i++){
  164 + if(obj[i].companyCode == company){
  165 + var children = obj[i].children;
  166 + for(var j = 0; j < children.length; j++){
  167 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  168 + }
  169 + }
  170 + }
  171 + $('#subCompany').html(options);
  172 + }
  173 +
135 174 $('#code').select2({
136 175 ajax: {
137 176 url: '/realSchedule/sreachVehic',
... ...
src/main/resources/static/pages/forms/statement/correctStatis.html
... ... @@ -166,7 +166,6 @@
166 166 $('#company').html(options);
167 167 updateCompany();
168 168 });
169   -
170 169 $("#company").on("change",updateCompany);
171 170 function updateCompany(){
172 171 var company = $('#company').val();
... ...
src/main/resources/static/pages/forms/statement/firstAndLastBus.html
... ... @@ -27,19 +27,19 @@
27 27 <div class="portlet light porttlet-fit bordered">
28 28 <div class="portlet-title">
29 29 <form id="history" class="form-inline" action="">
30   - <div style="display: inline-block;margin-left: 10px;">
  30 + <div style="display: inline-block;margin-left: 10px;" id="company1">
31 31 <span class="item-label" style="width: 80px;">公司: </span>
32 32 <select class="form-control" name="company" id="company" style="width: 160px;"></select>
33 33 </div>
34   - <div style="display: inline-block;margin-left: 15px;">
  34 + <div style="display: inline-block;margin-left: 10px;" id="subCompany1">
35 35 <span class="item-label" style="width: 80px;">分公司: </span>
36 36 <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>
37 37 </div>
38   - <div style="display: inline-block;margin-left: 15px;">
  38 + <div style="display: inline-block;margin-left: 10px;">
39 39 <span class="item-label" style="width: 80px;">线路: </span>
40 40 <select class="form-control" name="line" id="line" style="width: 160px;"></select>
41 41 </div>
42   - <div style="display: inline-block;margin-left: 15px;">
  42 + <div style="display: inline-block;margin-left: 10px;">
43 43 <span class="item-label" style="width: 80px;">时间: </span>
44 44 <input class="form-control" type="text" id="date" style="width: 160px;"/>
45 45 </div>
... ... @@ -134,6 +134,11 @@
134 134 for(var i = 0; i < obj.length; i++){
135 135 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
136 136 }
  137 + if(obj.length == 1){
  138 + $('#company1').hide();
  139 + if(obj[0].children.length == 1)
  140 + $('#subCompany1').hide();
  141 + }
137 142 $('#company').html(options);
138 143 updateCompany();
139 144 });
... ...
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
... ... @@ -45,16 +45,16 @@
45 45 <input class="form-control" type="checkbox" name="reason" style="width: 20px;" value="10" checked="true"/>其他
46 46 </div>
47 47 <div style="margin-top: 5px"></div>
48   - <div style="display: inline-block;">
49   - <span class="item-label" style="width: 80px; margin-left: 33px">公司: </span>
  48 + <div style="display: inline-block; margin-left: 33px;" id="company1">
  49 + <span class="item-label" style="width: 80px;">公司: </span>
50 50 <select class="form-control" name="company" id="company" style="width: 140px;"></select>
51 51 </div>
52   - <div style="display: inline-block;">
53   - <span class="item-label" style="width: 80px; margin-left: 24px">分公司: </span>
  52 + <div style="display: inline-block; margin-left: 24px;" id="subCompany1">
  53 + <span class="item-label" style="width: 80px;">分公司: </span>
54 54 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select>
55 55 </div>
56   - <div style="display: inline-block;">
57   - <span class="item-label" style="width: 80px; margin-left: 24px">线路: </span>
  56 + <div style="display: inline-block; margin-left: 24px;">
  57 + <span class="item-label" style="width: 80px;">线路: </span>
58 58 <select class="form-control" name="line" id="line" style="width: 140px;"></select>
59 59 </div>
60 60 <div style="display: inline-block; margin-left: 10px">
... ... @@ -165,6 +165,11 @@
165 165 for(var i = 0; i < obj.length; i++){
166 166 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
167 167 }
  168 + if(obj.length == 1){
  169 + $('#company1').hide();
  170 + if(obj[0].children.length == 1)
  171 + $('#subCompany1').hide();
  172 + }
168 173 $('#company').html(options);
169 174 updateCompany();
170 175 });
... ...
src/main/resources/static/pages/forms/statement/lineTimeAnaly.html
... ... @@ -33,16 +33,20 @@
33 33 <div class="portlet light porttlet-fit bordered">
34 34 <div class="portlet-title">
35 35 <form id="history" class="form-inline" action="">
36   - <div style="display: inline-block;">
37   - <span class="item-label" style="width: 80px; margin-left: 33px">公司: </span>
  36 + <div style="display: inline-block; margin-left: 33px;" id="company1">
  37 + <span class="item-label" style="width: 80px;">公司: </span>
38 38 <select class="form-control" name="company" id="company" style="width: 140px;"></select>
39 39 </div>
40   - <div style="display: inline-block;">
41   - <span class="item-label" style="width: 80px; margin-left: 38px">线路: </span>
  40 + <div style="display: inline-block; margin-left: 24px;" id="subCompany1">
  41 + <span class="item-label" style="width: 80px;">分公司: </span>
  42 + <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select>
  43 + </div>
  44 + <div style="display: inline-block; margin-left: 24px;">
  45 + <span class="item-label" style="width: 80px;">线路: </span>
42 46 <select class="form-control" name="line" id="line" style="width: 140px;"></select>
43 47 </div>
44   - <div style="display: inline-block;">
45   - <span class="item-label" style="width: 80px; margin-left: 24px">方向: </span>
  48 + <div style="display: inline-block; margin-left: 15px;">
  49 + <span class="item-label" style="width: 80px;">方向: </span>
46 50 <select class="form-control" name="upDown" id="upDown" style="width: 140px;">
47 51 <option value="">请先选择线路</option>
48 52 </select>
... ... @@ -205,9 +209,28 @@
205 209 for(var i = 0; i < obj.length; i++){
206 210 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
207 211 }
  212 + if(obj.length == 1){
  213 + $('#company1').hide();
  214 + if(obj[0].children.length == 1)
  215 + $('#subCompany1').hide();
  216 + }
208 217 $('#company').html(options);
209 218 updateCompany();
210 219 });
  220 + $("#company").on("change",updateCompany);
  221 + function updateCompany(){
  222 + var company = $('#company').val();
  223 + var options = '';
  224 + for(var i = 0; i < obj.length; i++){
  225 + if(obj[i].companyCode == company){
  226 + var children = obj[i].children;
  227 + for(var j = 0; j < children.length; j++){
  228 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  229 + }
  230 + }
  231 + }
  232 + $('#subCompany').html(options);
  233 + }
211 234  
212 235 $.get('/basic/lineCode2Name',function(result){
213 236 var data=[];
... ...
src/main/resources/static/pages/forms/statement/peopleCarPlan.html
... ... @@ -27,19 +27,19 @@
27 27 <div class="portlet light porttlet-fit bordered">
28 28 <div class="portlet-title">
29 29 <form id="history" class="form-inline" action="">
30   - <div style="display: inline-block;">
  30 + <div style="display: inline-block; margin-left: 10px;" id="company1">
31 31 <span class="item-label" style="width: 80px;">公司: </span>
32 32 <select class="form-control" name="company" id="company" style="width: 160px;"></select>
33 33 </div>
34   - <div style="display: inline-block;">
  34 + <div style="display: inline-block; margin-left: 10px;" id="subCompany1">
35 35 <span class="item-label" style="width: 80px;">分公司: </span>
36 36 <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>
37 37 </div>
38   - <div style="display: inline-block;">
  38 + <div style="display: inline-block; margin-left: 10px;">
39 39 <span class="item-label" style="width: 80px;">线路: </span>
40 40 <select class="form-control" name="line" id="line" style="width: 160px;"></select>
41 41 </div>
42   - <div style="display: inline-block;margin-left: 15px;">
  42 + <div style="display: inline-block; margin-left: 10px;">
43 43 <span class="item-label" style="width: 80px;">时间: </span>
44 44 <input class="form-control" type="text" id="date" style="width: 160px;"/>
45 45 </div>
... ... @@ -116,6 +116,11 @@
116 116 for(var i = 0; i < obj.length; i++){
117 117 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
118 118 }
  119 + if(obj.length == 1){
  120 + $('#company1').hide();
  121 + if(obj[0].children.length == 1)
  122 + $('#subCompany1').hide();
  123 + }
119 124 $('#company').html(options);
120 125 updateCompany();
121 126 });
... ...
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
... ... @@ -27,28 +27,28 @@
27 27 <div class="portlet light porttlet-fit bordered">
28 28 <div class="portlet-title">
29 29 <form id="history" class="form-inline" action="">
30   -<!-- <div style="display: inline-block;margin-left: 38px;"> -->
31   -<!-- <span class="item-label" style="width: 80px;">公司: </span> -->
32   -<!-- <select class="form-control" name="company" id="company" style="width: 160px;"></select> -->
33   -<!-- </div> -->
34   -<!-- <div style="display: inline-block;margin-left: 29px;"> -->
35   -<!-- <span class="item-label" style="width: 80px;">分公司: </span> -->
36   -<!-- <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> -->
37   -<!-- </div> -->
38   - <div style="display: inline-block;margin-left: 43px;">
  30 + <div style="display: inline-block;margin-left: 38px;" id="company1">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="company" style="width: 160px;"></select>
  33 + </div>
  34 + <div style="display: inline-block;margin-left: 24px;" id="subCompany1">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>
  37 + </div>
  38 + <div style="display: inline-block;margin-left: 38px;">
39 39 <span class="item-label" style="width: 80px;">线路: </span>
40 40 <select class="form-control" name="line" id="line" style="width: 160px;"></select>
41 41 </div>
42   -<!-- <div style="margin-top: 10px"></div> -->
  42 + <div style="margin-top: 10px"></div>
43 43 <div style="display: inline-block;margin-left: 10px;">
44 44 <span class="item-label" style="width: 80px;">开始时间: </span>
45 45 <input class="form-control" type="text" id="startDate" style="width: 160px;"/>
46 46 </div>
47   - <div style="display: inline-block;margin-left: 15px;">
  47 + <div style="display: inline-block;margin-left: 10px;">
48 48 <span class="item-label" style="width: 80px;">结束时间: </span>
49 49 <input class="form-control" type="text" id="endDate" style="width: 160px;"/>
50 50 </div>
51   - <div style="display: inline-block;margin-left: 15px;">
  51 + <div style="display: inline-block;margin-left: 10px;">
52 52 <span class="item-label" style="width: 80px;">模板类型: </span>
53 53 <select class="form-control" name="model" id="model" style="width: 160px;">
54 54 <option value="">请选择...</option>
... ... @@ -143,6 +143,11 @@
143 143 for(var i = 0; i < obj.length; i++){
144 144 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
145 145 }
  146 + if(obj.length == 1){
  147 + $('#company1').hide();
  148 + if(obj[0].children.length == 1)
  149 + $('#subCompany1').hide();
  150 + }
146 151 $('#company').html(options);
147 152 updateCompany();
148 153 });
... ...
src/main/resources/static/pages/forms/statement/workDaily.html
... ... @@ -27,11 +27,19 @@
27 27 <div class="portlet light porttlet-fit bordered">
28 28 <div class="portlet-title">
29 29 <form id="history" class="form-inline" action="">
30   - <div style="display: inline-block;">
  30 + <div style="display: inline-block; margin-left: 10px;" id="company1">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="company" style="width: 160px;"></select>
  33 + </div>
  34 + <div style="display: inline-block; margin-left: 10px;" id="subCompany1">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>
  37 + </div>
  38 + <div style="display: inline-block; margin-left: 10px;">
31 39 <span class="item-label" style="width: 80px;">线路: </span>
32 40 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
33 41 </div>
34   - <div style="display: inline-block;margin-left: 15px;">
  42 + <div style="display: inline-block;margin-left: 10px;">
35 43 <span class="item-label" style="width: 80px;">时间: </span>
36 44 <input class="form-control" type="text" id="date" style="width: 180px;"/>
37 45 </div>
... ... @@ -110,6 +118,37 @@
110 118 initPinYinSelect2('#line',data,'');
111 119 })
112 120  
  121 + var obj = [];
  122 + $.get('/user/companyData', function(result){
  123 + obj = result;
  124 + var options = '';
  125 + for(var i = 0; i < obj.length; i++){
  126 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  127 + }
  128 + if(obj.length == 1){
  129 + $('#company1').hide();
  130 + if(obj[0].children.length == 1)
  131 + $('#subCompany1').hide();
  132 + }
  133 + $('#company').html(options);
  134 + updateCompany();
  135 + });
  136 + $("#company").on("change",updateCompany);
  137 + function updateCompany(){
  138 + var company = $('#company').val();
  139 + var options = '';
  140 + for(var i = 0; i < obj.length; i++){
  141 + if(obj[i].companyCode == company){
  142 + var children = obj[i].children;
  143 + for(var j = 0; j < children.length; j++){
  144 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  145 + }
  146 + }
  147 + }
  148 + $('#subCompany').html(options);
  149 + }
  150 +
  151 +
113 152 $("#query").on("click",jsDoQuery);
114 153  
115 154 var line = $("#line").val();
... ...