Commit 91cf2ec55593e1bb741d471129341313d8203a3a

Authored by 娄高锋
1 parent 1b7e8a4b

LGF 报表

src/main/resources/static/pages/forms/statement/commandState.html
... ... @@ -122,44 +122,16 @@
122 122 $("#date").val(year + "-0" + month + "-" + day);
123 123 }
124 124  
125   - $('#line').select2({
126   - ajax: {
127   - url: '/realSchedule/findLine',
128   - type: 'post',
129   - dataType: 'json',
130   - delay: 150,
131   - data: function(params){
132   - return{line: params.term};
133   - },
134   - processResults: function (data) {
135   - return {
136   - results: data
137   - };
138   - },
139   - cache: true
140   - },
141   - templateResult: function(repo){
142   - if (repo.loading) return repo.text;
143   - var h = '<span>'+repo.text+'</span>';
144   - return h;
145   - },
146   - escapeMarkup: function (markup) { return markup; },
147   - minimumInputLength: 1,
148   - templateSelection: function(repo){
149   - return repo.text;
150   - },
151   - language: {
152   - noResults: function(){
153   - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
154   - },
155   - inputTooShort : function(e) {
156   - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
157   - },
158   - searching : function() {
159   - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
160   - }
  125 + $.get('/basic/lineCode2Name',function(result){
  126 + var data=[];
  127 +
  128 + for(var code in result){
  129 + data.push({id: code, text: result[code]});
161 130 }
162   - });
  131 + console.log(data);
  132 + initPinYinSelect2('#line',data,'');
  133 + })
  134 +
163 135 $('#code').select2({
164 136 ajax: {
165 137 url: '/realSchedule/sreachVehic',
... ...
src/main/resources/static/pages/forms/statement/peopleCarPlan.html
... ... @@ -90,45 +90,15 @@
90 90 $("#date").val(year + "-0" + month + "-" + day);
91 91 }
92 92  
93   - $('#line').select2({
94   - ajax: {
95   - url: '/realSchedule/findLine',
96   - type: 'post',
97   - dataType: 'json',
98   - delay: 150,
99   - data: function(params){
100   - return{line: params.term};
101   - },
102   - processResults: function (data) {
103   - return {
104   - results: data
105   - };
106   - },
107   - cache: true
108   - },
109   - templateResult: function(repo){
110   - if (repo.loading) return repo.text;
111   - var h = '<span>'+repo.text+'</span>';
112   - return h;
113   - },
114   - escapeMarkup: function (markup) { return markup; },
115   - minimumInputLength: 1,
116   - templateSelection: function(repo){
117   - return repo.text;
118   - },
119   - language: {
120   - noResults: function(){
121   - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
122   - },
123   - inputTooShort : function(e) {
124   - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
125   - },
126   - searching : function() {
127   - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
128   - }
  93 + $.get('/basic/lineCode2Name',function(result){
  94 + var data=[];
  95 +
  96 + for(var code in result){
  97 + data.push({id: code, text: result[code]});
129 98 }
130   - });
131   -
  99 + console.log(data);
  100 + initPinYinSelect2('#line',data,'');
  101 + })
132 102  
133 103 $("#query").on("click",jsDoQuery);
134 104  
... ...
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
... ... @@ -113,44 +113,15 @@
113 113 $("#endDate").val(year + "-0" + month + "-" + day);
114 114 }
115 115  
116   - $('#line').select2({
117   - ajax: {
118   - url: '/realSchedule/findLine',
119   - type: 'post',
120   - dataType: 'json',
121   - delay: 150,
122   - data: function(params){
123   - return{line: params.term};
124   - },
125   - processResults: function (data) {
126   - return {
127   - results: data
128   - };
129   - },
130   - cache: true
131   - },
132   - templateResult: function(repo){
133   - if (repo.loading) return repo.text;
134   - var h = '<span>'+repo.text+'</span>';
135   - return h;
136   - },
137   - escapeMarkup: function (markup) { return markup; },
138   - minimumInputLength: 1,
139   - templateSelection: function(repo){
140   - return repo.text;
141   - },
142   - language: {
143   - noResults: function(){
144   - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
145   - },
146   - inputTooShort : function(e) {
147   - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
148   - },
149   - searching : function() {
150   - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
151   - }
  116 + $.get('/basic/lineCode2Name',function(result){
  117 + var data=[];
  118 +
  119 + for(var code in result){
  120 + data.push({id: code, text: result[code]});
152 121 }
153   - });
  122 + console.log(data);
  123 + initPinYinSelect2('#line',data,'');
  124 + })
154 125  
155 126 $("#query").on("click", function(){
156 127 page = 0;
... ...
src/main/resources/static/pages/forms/statement/workDaily.html
... ... @@ -100,44 +100,15 @@
100 100 $("#date").val(year + "-0" + month + "-" + day);
101 101 }
102 102  
103   - $('#line').select2({
104   - ajax: {
105   - url: '/realSchedule/findLine',
106   - type: 'post',
107   - dataType: 'json',
108   - delay: 150,
109   - data: function(params){
110   - return{line: params.term};
111   - },
112   - processResults: function (data) {
113   - return {
114   - results: data
115   - };
116   - },
117   - cache: true
118   - },
119   - templateResult: function(repo){
120   - if (repo.loading) return repo.text;
121   - var h = '<span>'+repo.text+'</span>';
122   - return h;
123   - },
124   - escapeMarkup: function (markup) { return markup; },
125   - minimumInputLength: 1,
126   - templateSelection: function(repo){
127   - return repo.text;
128   - },
129   - language: {
130   - noResults: function(){
131   - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
132   - },
133   - inputTooShort : function(e) {
134   - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
135   - },
136   - searching : function() {
137   - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
138   - }
  103 + $.get('/basic/lineCode2Name',function(result){
  104 + var data=[];
  105 +
  106 + for(var code in result){
  107 + data.push({id: code, text: result[code]});
139 108 }
140   - });
  109 + console.log(data);
  110 + initPinYinSelect2('#line',data,'');
  111 + })
141 112  
142 113 $("#query").on("click",jsDoQuery);
143 114  
... ...