Browse Source

航班视图修改

zhongxiaoyu 2 years ago
parent
commit
9f668b9094

+ 6 - 2
src/layout/components/Search/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: your name
  * @Date: 2021-10-18 17:44:42
- * @LastEditTime: 2022-02-22 14:30:38
- * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-05-06 18:03:23
+ * @LastEditors: your name
  * @Description: In User Settings Edit
  * @FilePath: \Foshan4A\src\views\account\components\search.vue
 -->
@@ -105,6 +105,10 @@ export default {
     clearSearch () {
       this.$emit("clearSearchData", this.input);
     },
+    setSearch(val) {
+      this.input = val
+      this.$emit('getSearchData', this.input)
+    }
   },
 };
 </script>

+ 9 - 1
src/views/advancedQuery/views/advancedHome.vue

@@ -21,6 +21,7 @@
         </div>
       </div>
       <Search
+        ref="search"
         :isTitle="false"
         :isSlot="true"
         @getSearchData="getSearchData"
@@ -408,7 +409,7 @@ export default {
   },
   created() {
     // 参数顺序   【航班开始日期,航班结束日期,航班号,航班号,行李牌号,行李牌号,起飞站,起飞站,目的站,目的站,特殊行李类型,特殊 行李类型,旅客姓名大写拼音,旅客姓名大写拼音,pnr,pnr,值机号,值机号】
-    const dataContent = [this.timeStart, this.timeEnd]
+    // const dataContent = [this.timeStart, this.timeEnd]
     // for (let i = 0; i < 18; i++) {
     //   dataContent.push(null)
     // }
@@ -420,6 +421,13 @@ export default {
     document.querySelector('.interfaceLog_head_time_start .el-input__prefix').innerHTML = '开始:'
     document.querySelector('.interfaceLog_head_time_end .el-input__prefix i').remove()
     document.querySelector('.interfaceLog_head_time_end .el-input__prefix').innerHTML = '结束:'
+    const { FlightNO, FlightDate } = this.$route.query
+    if (FlightNO && FlightDate) {
+      this.$router.replace(this.$route.path)
+      const parsedTime = parseTime(new Date(FlightDate), '{y}-{m}-{d}')
+      this.timeStart = this.timeEnd = parsedTime
+      this.$refs['search'].setSearch(FlightNO)
+    }
   },
   updated() {
     // table数据更新

+ 45 - 16
src/views/baggageManagement/components/flight/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-05-06 16:02:54
+ * @LastEditTime: 2022-05-06 18:20:55
  * @LastEditors: your name
  * @Description: 航班视图
 -->
@@ -20,7 +20,7 @@
                 <span>起飞机场简称:</span>
               </el-col>
               <el-col :span="12">
-                <span>{{ flightInfo.Name }}</span>
+                <span>{{ flightInfo.departureName }}</span>
               </el-col>
             </el-row>
 
@@ -59,7 +59,7 @@
 
             <el-row>
               <el-col :span="12">
-                <span>登机口:{{ flightInfo.Carousel }}</span>
+                <span>登机口:{{ flightInfo.BordingGate }}</span>
               </el-col>
               <el-col :span="12">
                 <span>停机位:{{ flightInfo.StandForDepartrue }}</span>
@@ -81,7 +81,7 @@
                 <span>航班状态:</span>
               </el-col>
               <el-col :span="12">
-                <span>{{ flightInfo.FlightStatus }}</span>
+                <span>{{ flightInfo.FlightStatus || '正常' }}</span>
               </el-col>
             </el-row>
 
@@ -118,7 +118,7 @@
                 <span>降落机场简称:</span>
               </el-col>
               <el-col :span="12">
-                <span>{{ flightInfo.PlanLandingaptName }}</span>
+                <span>{{ flightInfo.landingName }}</span>
               </el-col>
             </el-row>
 
@@ -205,6 +205,7 @@
           show-summary
           :summary-method="summaryMethod"
           :header-cell-style="{ color: '#101116' }"
+          @row-click="transferBaggageInTableClickHandler"
         >
           <el-table-column
             v-for="item in transferInTableColumn"
@@ -232,6 +233,7 @@
           show-summary
           :summary-method="summaryMethod"
           :header-cell-style="{ color: '#101116' }"
+          @row-click="transferBaggageOutTableClickHandler"
         >
           <el-table-column
             v-for="item in transferOutTableColumn"
@@ -285,7 +287,7 @@
           />
         </div>
         <el-table
-          ref="baggageTable"
+          ref="flightBaggageTable"
           :data="flightBaggageTableData"
           border
           style="width: 100%"
@@ -293,9 +295,9 @@
           stripe
           size="mini"
           show-summary
-          :summary-method="summaryMethod"
+          :summary-method="summaryRow(flightBaggageTableData.length)"
           :header-cell-style="{ color: '#101116' }"
-          @row-click="rowClick"
+          @row-click="flightBaggageTableClickHandler"
         >
           <el-table-column
             v-for="item in tableColsCopy"
@@ -354,6 +356,7 @@ import { queryMap, myQuery } from '@/api/dataIntegration'
 import tableColsMixin from '../../mixins/tableCols'
 
 // const arrivalBaggageTableColumn = [
+//   { name: '序号', prop: 'index', align: 'center' },
 //   { name: '旅客姓名', prop: 'name', align: 'center', sortable: 'custom' },
 //   { name: '行李牌号', prop: 'bagNo', align: 'center' },
 //   {
@@ -377,6 +380,7 @@ import tableColsMixin from '../../mixins/tableCols'
 //   { name: '卷宗号', prop: 'fileNumber', align: 'center' }
 // ]
 const departureBaggageTableColumn = [
+  // { name: '序号', prop: 'index', align: 'center' },
   { name: '旅客姓名', prop: 'PassengerNameUpcase', align: 'center', sortable: 'custom' },
   { name: '行李牌号', prop: 'BagSN', align: 'center' },
   {
@@ -391,13 +395,13 @@ const departureBaggageTableColumn = [
     align: 'center',
     sortable: 'custom'
   },
-  { name: '装载序号', prop: 'loadSequenceIndex', align: 'center' },
+  { name: '装载序号', prop: 'LoadSN', align: 'center' },
   { name: '值机', prop: 'checkIn', align: 'center' },
   { name: '安检', prop: 'security', align: 'center' },
   { name: '分拣', prop: 'sorting', align: 'center' },
   { name: '装车', prop: 'loading', align: 'center' },
   { name: '装机', prop: 'installed', align: 'center' },
-  { name: '中转标志', prop: 'transitStatus', align: 'center' },
+  { name: '中转标志', prop: 'transitFlag', align: 'center' },
   { name: '卷宗号', prop: 'fileNumber', align: 'center' }
 ]
 export default {
@@ -457,7 +461,7 @@ export default {
   },
   created() {
     this.queryData = this._.cloneDeep(this.$route.query)
-    console.log(this.queryData)
+    // console.log(this.queryData)
     const queryData = [this.queryData.FlightNO, this.queryData.FlightDate]
     this.queryAll(queryData)
   },
@@ -466,7 +470,7 @@ export default {
       this.$refs['containerTable'].doLayout()
       this.$refs['transferInBaggageTable'].doLayout()
       this.$refs['transferOutBaggageTable'].doLayout()
-      this.$refs['baggageTable'].doLayout()
+      this.$refs['flightBaggageTable'].doLayout()
     })
   },
   methods: {
@@ -502,6 +506,12 @@ export default {
       }
       return sums
     },
+    // 统计行数
+    summaryRow(num) {
+      return function () {
+        return ['合计', `共${num}件`]
+      }
+    },
     // 表格添加过滤条件
     setTableFilters() {
       this.flightBaggageTableData.forEach(item => {
@@ -570,11 +580,29 @@ export default {
     //     console.log(error)
     //   }
     // },
-    rowClick(row) {
+    transferBaggageInTableClickHandler(row) {
+      this.$router.push({
+        path: '/advance',
+        query: {
+          FlightNO: row.PreFlightNO,
+          FlightDate: row.PreFlightDate
+        }
+      })
+    },
+    transferBaggageOutTableClickHandler(row) {
+      this.$router.push({
+        path: '/advance',
+        query: {
+          FlightNO: row.TransferFlightNO,
+          FlightDate: row.TransferFlightDate
+        }
+      })
+    },
+    flightBaggageTableClickHandler(row) {
       this.$router.push({
         path: `/${this.$route.path.split('/').slice(1, -1).join('/')}/baggageView`,
         query: {
-          BagSN: this.queryData.BagSN,
+          BagSN: row.BagSN,
           FlightNO: this.queryData.FlightNO,
           FlightDate: this.queryData.FlightDate
         }
@@ -610,14 +638,14 @@ export default {
           this.queryTrasferInBaggage(dataContent),
           this.queryBaggageByFlightNO(dataContent)
         ])
-        this.flightInfo = flightInfo[0]
+        flightInfo.length && (this.flightInfo = flightInfo[0])
         this.containerTableData = containerTableDataData
         this.transferOutBaggageTableData = transferOutBaggageTableData.map(item => {
           item['flightTime'] = item['flightDate'].split('T')[1]
           return item
         })
         this.transferInBaggageTableData = transferInBaggageTableData
-        this.flightBaggageTableData = flightBaggageTableData.map(item => {
+        this.flightBaggageTableData = flightBaggageTableData.map((item, index) => {
           item['checkIn'] = `${item['checkIn'] ?? ''}\n${item['checkInTime'] ? item['checkInTime'].split('T')[1] : ''}`
           item['security'] = `${item['DealInfo'] ?? ''}\n${item['DealTime'] ? item['DealTime'].split('T')[1] : ''}`
           item['sorting'] = `${item['sortLocationMark'] ?? ''}\n${
@@ -629,6 +657,7 @@ export default {
           item['installed'] = `${item['inflLocationMark'] ?? ''}\n${
             item['inflLoadDealTime'] ? item['inflLoadDealTime'].split('T')[1] : ''
           }`
+          item['transitFlag'] = item['preFlightNO'] === 1 ? '是' : '否'
           return item
         })