...
|
...
|
@@ -205,6 +205,7 @@ |
|
|
|
|
|
const fecha = require('fecha');
|
|
|
import {addRoute} from '../../api/transport'
|
|
|
import loginUserInfo from '../../api/base'
|
|
|
export default {
|
|
|
data(){
|
|
|
return{
|
...
|
...
|
@@ -225,9 +226,9 @@ |
|
|
plan:undefined,
|
|
|
remark:undefined,
|
|
|
createTime:undefined,
|
|
|
createBy:undefined,
|
|
|
createBy:loginUserInfo.username,
|
|
|
updateTime:undefined,
|
|
|
updateBy:undefined,
|
|
|
updateBy:loginUserInfo.username,
|
|
|
isDelete:undefined,
|
|
|
},
|
|
|
rules: {
|
...
|
...
|
@@ -274,20 +275,22 @@ |
|
|
//系统提示框
|
|
|
centerDialogVisible:false,
|
|
|
currentPage4:4,
|
|
|
msg:undefined
|
|
|
msg:undefined,
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
//新增航线方法(保存按钮)
|
|
|
submitForm(formName) {
|
|
|
//重新定义范围域
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
|
//重新定义airline
|
|
|
addRoute(this.airline).then(res=>{
|
|
|
let response=res.data;
|
|
|
if(response.code=='200'){
|
|
|
this.centerDialogVisible=true;
|
|
|
this.msg=response.msg;
|
|
|
this.$router.push({path:'/queryRoute',query:{serialNo:JSON.stringify(this.airline.serialNo)}});
|
|
|
this.$router.push({path:'/queryRoute',query:{serialNo:this.airline.serialNo}});
|
|
|
this.centerDialogVisible=false;
|
|
|
}else{
|
|
|
this.centerDialogVisible=true;
|
...
|
...
|
@@ -313,32 +316,18 @@ |
|
|
this.airline.sta=fecha.parse(row.sta,'HHmmss');
|
|
|
this.airline.effStartdate=row.effStartdate;
|
|
|
this.airline.effEnddate=row.effEnddate;
|
|
|
|
|
|
this.dialogTableVisible=false;
|
|
|
},
|
|
|
//加载默认值
|
|
|
defaultData(){
|
|
|
if(this.$route.query!=null){
|
|
|
this.airline.uuid=JSON.parse(this.$route.query.uuid);
|
|
|
this.airline.serialNo=JSON.parse(this.$route.query.serialNo);
|
|
|
this.airline.departurePort=JSON.parse(this.$route.query.departurePort);
|
|
|
this.airline.arrivalPort=JSON.parse(this.$route.query.arrivalPort);
|
|
|
this.airline.departureCustomNo=JSON.parse(this.$route.query.departureCustomNo);
|
|
|
this.airline.arrivalCustomNo=JSON.parse(this.$route.query.arrivalCustomNo);
|
|
|
this.airline.cancelFlag=JSON.parse(this.$route.query.cancelFlag);
|
|
|
this.airline.meno=JSON.parse(this.$route.query.meno);
|
|
|
this.airline.planno=JSON.parse(this.$route.query.planno);
|
|
|
this.airline.std=fecha.parse(JSON.parse(this.$route.query.std),'HHmmss');
|
|
|
this.airline.sta=fecha.parse(JSON.parse(this.$route.query.sta),'HHmmss');
|
|
|
this.airline.effStartdate=JSON.parse(this.$route.query.effStartdate);
|
|
|
this.airline.effEnddate=JSON.parse(this.$route.query.effEnddate);
|
|
|
this.airline.plan=JSON.parse(this.$route.query.plan);
|
|
|
this.airline.remark=JSON.parse(this.$route.query.remark);
|
|
|
this.airline.createTime=JSON.parse(this.$route.query.createTime);
|
|
|
this.airline.createBy=JSON.parse(this.$route.query.createBy);
|
|
|
this.airline.updateTime=JSON.parse(this.$route.query.updateTime);
|
|
|
this.airline.updateBy=JSON.parse(this.$route.query.updateBy);
|
|
|
this.airline.isDelete=JSON.parse(this.$route.query.isDelete);
|
|
|
if(this.$route.query.uuid!=null){
|
|
|
Object.assign(this.airline, this.$route.query);
|
|
|
if(ob.sta!=null && ob.sta!=undefined && ob.sta!=""){
|
|
|
this.airline.sta=fecha.parse(ob.sta,'HHmmss');
|
|
|
}
|
|
|
if(ob.std!=null && ob.std!=undefined && ob.std!=""){
|
|
|
this.airline.std=fecha.parse(ob.std,'HHmmss');
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
|
...
|
...
|
|