|
@@ -94,6 +94,8 @@ |
|
@@ -94,6 +94,8 @@ |
94
|
|
94
|
|
95
|
<script>
|
95
|
<script>
|
96
|
import { selectAirport } from '../../api/mt1201'
|
96
|
import { selectAirport } from '../../api/mt1201'
|
|
|
97
|
+ import jsutil from "@/common/js/util";
|
|
|
98
|
+
|
97
|
export default {
|
99
|
export default {
|
98
|
data() {
|
100
|
data() {
|
99
|
return {
|
101
|
return {
|
|
@@ -174,7 +176,12 @@ |
|
@@ -174,7 +176,12 @@ |
174
|
submitForm(formName) {
|
176
|
submitForm(formName) {
|
175
|
this.$refs[formName].validate((valid) => {
|
177
|
this.$refs[formName].validate((valid) => {
|
176
|
if (valid) {
|
178
|
if (valid) {
|
177
|
- this.$router.push({path:'/tallymaster',query:{flightno:JSON.stringify(this.ruleForm.flightno),flightdate:JSON.stringify(this.dateConversion(this.ruleForm.flightdate)),originstation:JSON.stringify(this.ruleForm.originstation),destinationstation:JSON.stringify(this.ruleForm.destinationstation),awba:JSON.stringify("")}})
|
179
|
+ this.$router.push({path:'/tallymaster',query:
|
|
|
180
|
+ {flightno:JSON.stringify(this.ruleForm.flightno),
|
|
|
181
|
+ flightdate:JSON.stringify(this.dateConversion(this.ruleForm.flightdate)),
|
|
|
182
|
+ originstation:JSON.stringify(this.ruleForm.originstation),
|
|
|
183
|
+ destinationstation:JSON.stringify(this.ruleForm.destinationstation),
|
|
|
184
|
+ awba:JSON.stringify("")}});
|
178
|
} else {
|
185
|
} else {
|
179
|
//console.log('error submit!!');
|
186
|
//console.log('error submit!!');
|
180
|
return false;
|
187
|
return false;
|
|
@@ -189,11 +196,18 @@ |
|
@@ -189,11 +196,18 @@ |
189
|
},
|
196
|
},
|
190
|
/*获取默认值方法*/
|
197
|
/*获取默认值方法*/
|
191
|
getDefaultData(){
|
198
|
getDefaultData(){
|
192
|
- if(this.$route.query!=null){
|
|
|
193
|
- this.ruleForm.flightno=JSON.parse(this.$route.query.flightno);
|
|
|
194
|
- this.ruleForm.flightdate=JSON.parse(this.$route.query.flightdate);
|
|
|
195
|
- this.ruleForm.originstation=JSON.parse(this.$route.query.originstation);
|
|
|
196
|
- this.ruleForm.destinationstation=JSON.parse(this.$route.query.destinationstation);
|
199
|
+ if(
|
|
|
200
|
+ jsutil.checkNull(this.$route.query)
|
|
|
201
|
+ && jsutil.checkNull(this.$route.query.flightno)
|
|
|
202
|
+ && jsutil.checkNull(this.$route.query.flightdate)
|
|
|
203
|
+ && jsutil.checkNull(this.$route.query.originstation)
|
|
|
204
|
+ && jsutil.checkNull(this.$route.query.destinationstation)
|
|
|
205
|
+ )
|
|
|
206
|
+ {
|
|
|
207
|
+ this.ruleForm.flightno=(this.$route.query.flightno);
|
|
|
208
|
+ this.ruleForm.flightdate=(this.$route.query.flightdate);
|
|
|
209
|
+ this.ruleForm.originstation=(this.$route.query.originstation);
|
|
|
210
|
+ this.ruleForm.destinationstation=(this.$route.query.destinationstation);
|
197
|
}
|
211
|
}
|
198
|
}
|
212
|
}
|
199
|
},
|
213
|
},
|