Showing
1 changed file
with
8 additions
and
4 deletions
| ... | @@ -483,6 +483,7 @@ export default { | ... | @@ -483,6 +483,7 @@ export default { |
| 483 | maxCNYCustomVal: "", // | 483 | maxCNYCustomVal: "", // |
| 484 | minSUDCustomVal: "", // 美元最小申报值 | 484 | minSUDCustomVal: "", // 美元最小申报值 |
| 485 | maxSUDCustomVal: "", // | 485 | maxSUDCustomVal: "", // |
| 486 | + currentFlightNo: "", // 当前航班号 | ||
| 486 | }; | 487 | }; |
| 487 | }, | 488 | }, |
| 488 | computed: { | 489 | computed: { |
| ... | @@ -655,7 +656,8 @@ export default { | ... | @@ -655,7 +656,8 @@ export default { |
| 655 | .catch(() => {}); | 656 | .catch(() => {}); |
| 656 | }, | 657 | }, |
| 657 | // 航班号input 聚焦事件 | 658 | // 航班号input 聚焦事件 |
| 658 | - inputFlightNoFocus({ $index }) { | 659 | + inputFlightNoFocus({ $index, row }) { |
| 660 | + this.currentFlightNo = row.flightNo.trim(); | ||
| 659 | this.currentIndex = $index; | 661 | this.currentIndex = $index; |
| 660 | }, | 662 | }, |
| 661 | // 失焦查询 | 663 | // 失焦查询 |
| ... | @@ -685,10 +687,12 @@ export default { | ... | @@ -685,10 +687,12 @@ export default { |
| 685 | let params = { | 687 | let params = { |
| 686 | fltNo: this.tableData[this.currentIndex].flightNo, | 688 | fltNo: this.tableData[this.currentIndex].flightNo, |
| 687 | }; | 689 | }; |
| 688 | - // 航班号输入框失焦时判断有没有航班号,有航班号调用航线查询 | 690 | + // 航班号输入框失焦时判断有没有航班号,并且航班号是不是发生了变化调用航线查询 |
| 689 | - if (params.fltNo) { | 691 | + if (params.fltNo && params.fltNo !== this.currentFlightNo) { |
| 690 | this.getQueryRouteByFltNo(params); // 航线查询 | 692 | this.getQueryRouteByFltNo(params); // 航线查询 |
| 691 | - } else { | 693 | + } |
| 694 | + // 航班号为空时 | ||
| 695 | + if(params.fltNo.length == 0) { | ||
| 692 | this.tableData[this.currentIndex].flightRoute = ""; | 696 | this.tableData[this.currentIndex].flightRoute = ""; |
| 693 | this.tableData[this.currentIndex].routeList = []; | 697 | this.tableData[this.currentIndex].routeList = []; |
| 694 | this.msgError("请输入航班号"); | 698 | this.msgError("请输入航班号"); | ... | ... |
-
Please register or login to post a comment