作者 小范

进港原始和理货传值优化

... ... @@ -145,7 +145,12 @@
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.$router.push({path:'/origmaster',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("")}});
this.$router.push({path:'/origmaster',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("")}});
} else {
console.log('error submit!!');
return false;
... ...
... ... @@ -94,6 +94,8 @@
<script>
import { selectAirport } from '../../api/mt1201'
import jsutil from "@/common/js/util";
export default {
data() {
return {
... ... @@ -174,7 +176,12 @@
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
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("")}})
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("")}});
} else {
//console.log('error submit!!');
return false;
... ... @@ -189,11 +196,18 @@
},
/*获取默认值方法*/
getDefaultData(){
if(this.$route.query!=null){
this.ruleForm.flightno=JSON.parse(this.$route.query.flightno);
this.ruleForm.flightdate=JSON.parse(this.$route.query.flightdate);
this.ruleForm.originstation=JSON.parse(this.$route.query.originstation);
this.ruleForm.destinationstation=JSON.parse(this.$route.query.destinationstation);
if(
jsutil.checkNull(this.$route.query)
&& jsutil.checkNull(this.$route.query.flightno)
&& jsutil.checkNull(this.$route.query.flightdate)
&& jsutil.checkNull(this.$route.query.originstation)
&& jsutil.checkNull(this.$route.query.destinationstation)
)
{
this.ruleForm.flightno=(this.$route.query.flightno);
this.ruleForm.flightdate=(this.$route.query.flightdate);
this.ruleForm.originstation=(this.$route.query.originstation);
this.ruleForm.destinationstation=(this.$route.query.destinationstation);
}
}
},
... ...
{
"nmmsVer": "1.06"
"nmmsVer": "1.07"
}
... ...