|
@@ -95,7 +95,10 @@ export default {
|
|
|
tableDatas: [],
|
|
|
tableDatas5Id: '',
|
|
|
loading: false,
|
|
|
- queryObj: {}
|
|
|
+ queryObj: {},
|
|
|
+ checkObj: {},
|
|
|
+ tabClickObj: {},
|
|
|
+ tabClickKey: ''
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
@@ -116,6 +119,7 @@ export default {
|
|
|
// this.tabMenu = this.tabMenu.filter(tab => tab.key !== 'baggageMessage')
|
|
|
// }
|
|
|
this.query = query
|
|
|
+ this.tabClickObj = query
|
|
|
},
|
|
|
methods: {
|
|
|
//获取表头数据
|
|
@@ -139,36 +143,31 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//获取行李信息
|
|
|
- async getLuggageInfo (auth_id) {
|
|
|
+ async getLuggageInfo (auth_id, checkParams) {
|
|
|
try {
|
|
|
this.loading = true
|
|
|
- const { code, returnData } = await this.getQueryListAuth(SERVICE_ID.bagTableId, this.query, 1, 20, auth_id)
|
|
|
+ const { code, returnData } = await this.getQueryListAuth(SERVICE_ID.bagTableId, checkParams ? this.checkObj : this.query, 1, 20, auth_id)
|
|
|
if (code == 0 && returnData && returnData.length) {
|
|
|
const datasObj = [...returnData][0]
|
|
|
this.passengerName = datasObj['passengerName']
|
|
|
this.PNRNO = datasObj['PNRNO']
|
|
|
- const { luggageNum, PNRNO } = datasObj
|
|
|
- if (PNRNO) {
|
|
|
- this.queryObj = {
|
|
|
- luggageNum,
|
|
|
- PNRNO
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.queryObj = this.query
|
|
|
- }
|
|
|
+ const { luggageNum, PNRNO, carrierFlightsDate } = datasObj
|
|
|
for (const key in datasObj) {
|
|
|
- this.infoArrs.map(item => {
|
|
|
- if (item.columnName == key) {
|
|
|
- item.value = datasObj[key]
|
|
|
- }
|
|
|
- })
|
|
|
this.msgs1.map(item => {
|
|
|
if (item.columnName == key) {
|
|
|
item.value = datasObj[key]
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- this.getLuggageNums()
|
|
|
+ if (!checkParams) {
|
|
|
+ this.getLuggageNums()
|
|
|
+ }
|
|
|
+ this.queryObj = this.PNRNO ? {
|
|
|
+ luggageNum,
|
|
|
+ carrierFlightsDate,
|
|
|
+ passengerName: this.passengerName,
|
|
|
+ PNRNO
|
|
|
+ } : this.query
|
|
|
this.loading = false
|
|
|
} else {
|
|
|
this.loading = false
|
|
@@ -182,17 +181,12 @@ export default {
|
|
|
async getLuggageNums () {
|
|
|
try {
|
|
|
const { carrierFlights, carrierFlightsDate } = this.query
|
|
|
- let parmObj = null
|
|
|
- if (this.PNRNO) {
|
|
|
- parmObj = {
|
|
|
- PNRNO: this.PNRNO,
|
|
|
- passengerName: this.passengerName,
|
|
|
- carrierFlights,
|
|
|
- carrierFlightsDate
|
|
|
- }
|
|
|
- } else {
|
|
|
- parmObj = this.query
|
|
|
- }
|
|
|
+ const parmObj = this.PNRNO ? {
|
|
|
+ PNRNO: this.PNRNO,
|
|
|
+ passengerName: this.passengerName,
|
|
|
+ carrierFlights,
|
|
|
+ carrierFlightsDate
|
|
|
+ } : this.query
|
|
|
const { code, returnData } = await this.getQueryList(SERVICE_ID.bagTableId, parmObj)
|
|
|
if (code == 0 && returnData && returnData.length) {
|
|
|
this.detailsArr = _.uniqBy([...returnData], 'luggageNum')
|
|
@@ -203,41 +197,35 @@ export default {
|
|
|
},
|
|
|
tagClick (item, index) {
|
|
|
const { luggageNum, carrierFlights, carrierFlightsDate, PNRNO, passengerName } = item
|
|
|
- if (PNRNO) {
|
|
|
- this.tagObj = {
|
|
|
- PNRNO,
|
|
|
- passengerName,
|
|
|
- luggageNum
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.tagObj = {
|
|
|
- luggageNum,
|
|
|
- carrierFlights,
|
|
|
- carrierFlightsDate
|
|
|
- }
|
|
|
+ this.checkObj = PNRNO ? {
|
|
|
+ PNRNO,
|
|
|
+ passengerName,
|
|
|
+ luggageNum,
|
|
|
+ carrierFlightsDate
|
|
|
+ } : {
|
|
|
+ luggageNum,
|
|
|
+ carrierFlights,
|
|
|
+ carrierFlightsDate
|
|
|
+ }
|
|
|
+ this.tabClickObj = PNRNO ? {
|
|
|
+ luggageNum,
|
|
|
+ PNRNO,
|
|
|
+ carrierFlightsDate
|
|
|
+ } : {
|
|
|
+ luggageNum,
|
|
|
+ carrierFlights,
|
|
|
+ carrierFlightsDate
|
|
|
}
|
|
|
- this.query = this.tagObj
|
|
|
this.activeIndex = index
|
|
|
- this.getLuggageInfo(this.tableDatas5Id)
|
|
|
+ this.getLuggageInfo(this.tableDatas5Id, true)
|
|
|
+ if (this.tabClickKey && this.tabClickKey != 'baggageView') {
|
|
|
+ this.tagObj = this.tabClickObj
|
|
|
+ }
|
|
|
},
|
|
|
tabClick (item, index) {
|
|
|
+ this.tabClickKey = item.key
|
|
|
if (item.key == 'baggageList' || item.key == 'baggageMessage') {
|
|
|
- let parmObj = null
|
|
|
- const { carrierFlights, carrierFlightsDate, luggageNum } = this.query
|
|
|
- if (this.PNRNO) {
|
|
|
- parmObj = {
|
|
|
- PNRNO: this.PNRNO,
|
|
|
- passengerName: this.passengerName,
|
|
|
- luggageNum
|
|
|
- }
|
|
|
- } else {
|
|
|
- parmObj = {
|
|
|
- carrierFlightsDate,
|
|
|
- carrierFlights,
|
|
|
- luggageNum
|
|
|
- }
|
|
|
- }
|
|
|
- this.tagObj = parmObj
|
|
|
+ this.tagObj = this.tabClickObj
|
|
|
}
|
|
|
setTimeout(() => {
|
|
|
this.tabIndex = index
|