作者 xudada

运输工具通用查询

@@ -7,10 +7,7 @@ @@ -7,10 +7,7 @@
7 </el-col> 7 </el-col>
8 </el-row> 8 </el-row>
9 <el-row> 9 <el-row>
10 -  
11 -  
12 -  
13 - <el-form :model="queryRoute" :rules="rules" ref="serialNo" label-width="130px" > 10 + <el-form :model="queryRoute" ref="serialNo" label-width="130px" >
14 <el-col :span="6"> 11 <el-col :span="6">
15 <el-form-item label="航线序号" prop="serialNo" label-width="130px"> 12 <el-form-item label="航线序号" prop="serialNo" label-width="130px">
16 <el-input v-model="queryRoute.serialNo" placeholder="请输入"></el-input> 13 <el-input v-model="queryRoute.serialNo" placeholder="请输入"></el-input>
@@ -167,11 +164,6 @@ @@ -167,11 +164,6 @@
167 total:0, 164 total:0,
168 tableData:[], 165 tableData:[],
169 tableloading:false, 166 tableloading:false,
170 - rules:{  
171 - serialNo: [  
172 - {required: true, message: '请输入', trigger: 'blur'}  
173 - ],  
174 - }  
175 } 167 }
176 }, 168 },
177 methods: { 169 methods: {
@@ -184,7 +176,7 @@ @@ -184,7 +176,7 @@
184 }, 176 },
185 //获取航线列表 177 //获取航线列表
186 submitForm(){ 178 submitForm(){
187 - let params={currentPage:this.currentPage,pageSize:this.pageSize,serialNo:this.serialNo}; 179 + let params={currentPage:this.currentPage,pageSize:this.pageSize,serialNo:this.queryRoute.serialNo};
188 this.tableloading=true; 180 this.tableloading=true;
189 selectRoute(params).then(res=>{ 181 selectRoute(params).then(res=>{
190 let response=res.data.data; 182 let response=res.data.data;
@@ -195,16 +187,12 @@ @@ -195,16 +187,12 @@
195 }, 187 },
196 //编辑航线功能 188 //编辑航线功能
197 handleEdit(index,row){ 189 handleEdit(index,row){
198 - this.$router.push({path:'/route',query:{uuid:JSON.stringify(row.uuid),serialNo:JSON.stringify(row.serialNo),departurePort:JSON.stringify(row.departurePort),  
199 - arrivalPort:JSON.stringify(row.arrivalPort),departureCustomNo:JSON.stringify(row.departureCustomNo),arrivalCustomNo:JSON.stringify(row.arrivalCustomNo),  
200 - cancelFlag:JSON.stringify(row.cancelFlag),meno:JSON.stringify(row.meno),planno:JSON.stringify(row.planno),std:JSON.stringify(row.std),  
201 - sta:JSON.stringify(row.sta),effStartdate:JSON.stringify(row.effStartdate),effEnddate:JSON.stringify(row.effEnddate),plan:JSON.stringify(row.plan),  
202 - remark:JSON.stringify(row.remark),createTime:JSON.stringify(row.createTime),createBy:JSON.stringify(row.createBy),updateTime:JSON.stringify(row.updateTime),  
203 - updateBy:JSON.stringify(row.updateBy),isDelete:JSON.stringify(row.isDelete)}}) 190 + this.$router.push({path:'/route',query:row})
204 }, 191 },
205 //获取默认值 192 //获取默认值
206 defaultData(){ 193 defaultData(){
207 - this.serialNo=JSON.parse(this.$route.query.serialNo); 194 + let ob=Object.assign(this.queryRoute, this.$route.query);
  195 +
208 }, 196 },
209 //列表删除功能 197 //列表删除功能
210 handleDelete(index,row){ 198 handleDelete(index,row){
@@ -205,6 +205,7 @@ @@ -205,6 +205,7 @@
205 205
206 const fecha = require('fecha'); 206 const fecha = require('fecha');
207 import {addRoute} from '../../api/transport' 207 import {addRoute} from '../../api/transport'
  208 + import loginUserInfo from '../../api/base'
208 export default { 209 export default {
209 data(){ 210 data(){
210 return{ 211 return{
@@ -225,9 +226,9 @@ @@ -225,9 +226,9 @@
225 plan:undefined, 226 plan:undefined,
226 remark:undefined, 227 remark:undefined,
227 createTime:undefined, 228 createTime:undefined,
228 - createBy:undefined, 229 + createBy:loginUserInfo.username,
229 updateTime:undefined, 230 updateTime:undefined,
230 - updateBy:undefined, 231 + updateBy:loginUserInfo.username,
231 isDelete:undefined, 232 isDelete:undefined,
232 }, 233 },
233 rules: { 234 rules: {
@@ -274,20 +275,22 @@ @@ -274,20 +275,22 @@
274 //系统提示框 275 //系统提示框
275 centerDialogVisible:false, 276 centerDialogVisible:false,
276 currentPage4:4, 277 currentPage4:4,
277 - msg:undefined 278 + msg:undefined,
278 } 279 }
279 }, 280 },
280 methods:{ 281 methods:{
281 //新增航线方法(保存按钮) 282 //新增航线方法(保存按钮)
282 submitForm(formName) { 283 submitForm(formName) {
  284 + //重新定义范围域
283 this.$refs[formName].validate((valid) => { 285 this.$refs[formName].validate((valid) => {
284 if (valid) { 286 if (valid) {
  287 + //重新定义airline
285 addRoute(this.airline).then(res=>{ 288 addRoute(this.airline).then(res=>{
286 let response=res.data; 289 let response=res.data;
287 if(response.code=='200'){ 290 if(response.code=='200'){
288 this.centerDialogVisible=true; 291 this.centerDialogVisible=true;
289 this.msg=response.msg; 292 this.msg=response.msg;
290 - this.$router.push({path:'/queryRoute',query:{serialNo:JSON.stringify(this.airline.serialNo)}}); 293 + this.$router.push({path:'/queryRoute',query:{serialNo:this.airline.serialNo}});
291 this.centerDialogVisible=false; 294 this.centerDialogVisible=false;
292 }else{ 295 }else{
293 this.centerDialogVisible=true; 296 this.centerDialogVisible=true;
@@ -313,32 +316,18 @@ @@ -313,32 +316,18 @@
313 this.airline.sta=fecha.parse(row.sta,'HHmmss'); 316 this.airline.sta=fecha.parse(row.sta,'HHmmss');
314 this.airline.effStartdate=row.effStartdate; 317 this.airline.effStartdate=row.effStartdate;
315 this.airline.effEnddate=row.effEnddate; 318 this.airline.effEnddate=row.effEnddate;
316 -  
317 this.dialogTableVisible=false; 319 this.dialogTableVisible=false;
318 }, 320 },
319 //加载默认值 321 //加载默认值
320 defaultData(){ 322 defaultData(){
321 - if(this.$route.query!=null){  
322 - this.airline.uuid=JSON.parse(this.$route.query.uuid);  
323 - this.airline.serialNo=JSON.parse(this.$route.query.serialNo);  
324 - this.airline.departurePort=JSON.parse(this.$route.query.departurePort);  
325 - this.airline.arrivalPort=JSON.parse(this.$route.query.arrivalPort);  
326 - this.airline.departureCustomNo=JSON.parse(this.$route.query.departureCustomNo);  
327 - this.airline.arrivalCustomNo=JSON.parse(this.$route.query.arrivalCustomNo);  
328 - this.airline.cancelFlag=JSON.parse(this.$route.query.cancelFlag);  
329 - this.airline.meno=JSON.parse(this.$route.query.meno);  
330 - this.airline.planno=JSON.parse(this.$route.query.planno);  
331 - this.airline.std=fecha.parse(JSON.parse(this.$route.query.std),'HHmmss');  
332 - this.airline.sta=fecha.parse(JSON.parse(this.$route.query.sta),'HHmmss');  
333 - this.airline.effStartdate=JSON.parse(this.$route.query.effStartdate);  
334 - this.airline.effEnddate=JSON.parse(this.$route.query.effEnddate);  
335 - this.airline.plan=JSON.parse(this.$route.query.plan);  
336 - this.airline.remark=JSON.parse(this.$route.query.remark);  
337 - this.airline.createTime=JSON.parse(this.$route.query.createTime);  
338 - this.airline.createBy=JSON.parse(this.$route.query.createBy);  
339 - this.airline.updateTime=JSON.parse(this.$route.query.updateTime);  
340 - this.airline.updateBy=JSON.parse(this.$route.query.updateBy);  
341 - this.airline.isDelete=JSON.parse(this.$route.query.isDelete); 323 + if(this.$route.query.uuid!=null){
  324 + Object.assign(this.airline, this.$route.query);
  325 + if(ob.sta!=null && ob.sta!=undefined && ob.sta!=""){
  326 + this.airline.sta=fecha.parse(ob.sta,'HHmmss');
  327 + }
  328 + if(ob.std!=null && ob.std!=undefined && ob.std!=""){
  329 + this.airline.std=fecha.parse(ob.std,'HHmmss');
  330 + }
342 } 331 }
343 }, 332 },
344 333
@@ -264,7 +264,7 @@ @@ -264,7 +264,7 @@
264 getPermList() { 264 getPermList() {
265 let para = { 265 let para = {
266 pageNum: 1, 266 pageNum: 1,
267 - pageSize: 200 267 + pageSize: 500
268 }; 268 };
269 NProgress.start(); 269 NProgress.start();
270 permList(para).then((res) => { 270 permList(para).then((res) => {