瀏覽代碼

高级查询

zhaoke 3 年之前
父節點
當前提交
a8dcfe6f42
共有 2 個文件被更改,包括 231 次插入42 次删除
  1. 41 22
      src/api/flight.js
  2. 190 20
      src/views/advancedQuery/views/advancedHome.vue

+ 41 - 22
src/api/flight.js

@@ -1,7 +1,7 @@
 import request from '@/utils/request'
 
 // 全部机场查询
-export function CurrentAirportQuery(params) {
+export function CurrentAirportQuery (params) {
   return request({
     url: '/baggageDC/openApi/currentAirportQuery',
     method: 'post',
@@ -10,7 +10,7 @@ export function CurrentAirportQuery(params) {
 }
 
 // 起飞站/目的站查询
-export function RelatedAirportQuery(params) {
+export function RelatedAirportQuery (params) {
   return request({
     url: '/baggageDC/openApi/relatedAirportQuery',
     method: 'post',
@@ -19,7 +19,7 @@ export function RelatedAirportQuery(params) {
 }
 
 // 综合查询
-export function IntegratedQuery(params) {
+export function IntegratedQuery (params) {
   return request({
     url: '/baggageDC/openApi/integratedQuery',
     method: 'post',
@@ -28,7 +28,7 @@ export function IntegratedQuery(params) {
 }
 
 // 中转综合查询
-export function IntegratedQueryTransfer(params) {
+export function IntegratedQueryTransfer (params) {
   return request({
     url: '/baggageDC/openApi/integratedQueryTransfer',
     method: 'post',
@@ -37,7 +37,7 @@ export function IntegratedQueryTransfer(params) {
 }
 
 // 航线查询
-export function FlightAttrQuery(params) {
+export function FlightAttrQuery (params) {
   return request({
     url: '/baggageDC/openApi/flightAttrQuery',
     method: 'post',
@@ -46,7 +46,7 @@ export function FlightAttrQuery(params) {
 }
 
 // 机型查询
-export function CraftTypeQuery(params) {
+export function CraftTypeQuery (params) {
   return request({
     url: '/baggageDC/openApi/craftTypeQuery',
     method: 'post',
@@ -55,7 +55,7 @@ export function CraftTypeQuery(params) {
 }
 
 // 航司查询
-export function AirCompanyQuery(params) {
+export function AirCompanyQuery (params) {
   return request({
     url: '/baggageDC/openApi/airCompanyQuery',
     method: 'post',
@@ -64,7 +64,7 @@ export function AirCompanyQuery(params) {
 }
 
 // 表头查询
-export function StatItemsQueryByStatMain(params) {
+export function StatItemsQueryByStatMain (params) {
   return request({
     url: '/baggageDC/openApi/statItemsQueryByStatMain',
     method: 'post',
@@ -73,7 +73,7 @@ export function StatItemsQueryByStatMain(params) {
 }
 
 // 查询转入行李 和 查询转出行李
-export function baggageSearchIO(params) {
+export function baggageSearchIO (params) {
   return request({
     url: '/baggageDC/openApi/baggageSearchIO',
     method: 'post',
@@ -82,7 +82,7 @@ export function baggageSearchIO(params) {
 }
 
 // 航班容器统计查询
-export function baggageSearchIOContainer(params) {
+export function baggageSearchIOContainer (params) {
   return request({
     url: '/baggageDC/openApi/baggageSearchIOContainer',
     method: 'post',
@@ -91,7 +91,7 @@ export function baggageSearchIOContainer(params) {
 }
 
 // 航班行李明细查询
-export function baggageSearchIOAll(params) {
+export function baggageSearchIOAll (params) {
   return request({
     url: '/baggageDC/openApi/baggageSearchIOAll',
     method: 'post',
@@ -100,7 +100,7 @@ export function baggageSearchIOAll(params) {
 }
 
 // 行李节点信息查询
-export function nodeinfoes(params) {
+export function nodeinfoes (params) {
   return request({
     url: '/baggageDC/openApi/fulltrackinfo/nodeinfoes',
     method: 'post',
@@ -109,7 +109,7 @@ export function nodeinfoes(params) {
 }
 
 // 行李信息查询
-export function fulltrackinfoAndNodeInfoList(params) {
+export function fulltrackinfoAndNodeInfoList (params) {
   return request({
     url: '/baggageDC/openApi/fulltrackinfoAndNodeInfoList',
     method: 'post',
@@ -118,7 +118,7 @@ export function fulltrackinfoAndNodeInfoList(params) {
 }
 
 // 行李信息原始报文查询
-export function BaggageMessageQuery(params) {
+export function BaggageMessageQuery (params) {
   return request({
     url: '/baggageDC/openApi/es/list',
     method: 'post',
@@ -127,7 +127,7 @@ export function BaggageMessageQuery(params) {
 }
 
 // ftp新增
-export function ftpadd(params) {
+export function ftpadd (params) {
   return request({
     url: '/baggageDC/openApi/ftpParams/save',
     method: 'post',
@@ -136,7 +136,7 @@ export function ftpadd(params) {
 }
 
 // webapi新增/保存
-export function webapichange(params) {
+export function webapichange (params) {
   return request({
     url: '/baggageDC/openApi/webApis/save',
     method: 'post',
@@ -145,7 +145,7 @@ export function webapichange(params) {
 }
 
 // httpList列表
-export function httpList(params) {
+export function httpList (params) {
   return request({
     url: '/baggageDC/openApi/httpParams/list',
     method: 'post',
@@ -154,7 +154,7 @@ export function httpList(params) {
 }
 
 // httpList删除
-export function httpListdele(params) {
+export function httpListdele (params) {
   return request({
     url: '/baggageDC/openApi/httpParams/delete',
     method: 'post',
@@ -162,7 +162,7 @@ export function httpListdele(params) {
   })
 }
 // httpList列表新增/编辑
-export function httpListchange(params) {
+export function httpListchange (params) {
   return request({
     url: '/baggageDC/openApi/httpParams/save',
     method: 'post',
@@ -171,7 +171,7 @@ export function httpListchange(params) {
 }
 
 // httpList
-export function httpListall(params) {
+export function httpListall (params) {
   return request({
     url: '/baggageDC/openApi/webApis/list',
     method: 'post',
@@ -180,7 +180,7 @@ export function httpListall(params) {
 }
 
 // ibList
-export function ibListall(params) {
+export function ibListall (params) {
   return request({
     url: '/baggageDC/openApi/IbmmqQuery',
     method: 'post',
@@ -189,10 +189,29 @@ export function ibListall(params) {
 }
 
 // ftpList
-export function ftpListall(params) {
+export function ftpListall (params) {
   return request({
     url: '/baggageDC/openApi/ftpParams/list',
     method: 'post',
     data: params
   })
 }
+
+//高级查询
+export function advancedInquiry (params) {
+  return request({
+    url: '/baggageDC/openApi/baggage/search/advancedInquiry',
+    method: 'post',
+    data: params
+  })
+}
+
+//查询
+export function getQuery (params) {
+  return request({
+    url: '/openApi/query',
+    method: 'post',
+    data: params
+  })
+}
+

+ 190 - 20
src/views/advancedQuery/views/advancedHome.vue

@@ -4,26 +4,50 @@
       <div class="flex-wrap interfaceLog_head_time">
         <div class="manageTitle">高级查询</div>
         <div class="interfaceLog_head_time_start mr10">
-          <el-date-picker v-model="timeStart" size="small" type="datetime" placeholder="选择开始日期时间" default-time="00:00:00">
+          <el-date-picker v-model="timeStart" size="small" type="date" placeholder="选择开始日期时间">
           </el-date-picker>
         </div>
         <div class="interfaceLog_head_time_end">
-          <el-date-picker v-model="timeEnd" size="small" type="datetime" placeholder="选择结束日期时间" default-time="00:00:00">
+          <el-date-picker v-model="timeEnd" size="small" type="date" placeholder="选择结束日期时间">
           </el-date-picker>
         </div>
       </div>
       <Search @getSearchData="getSearchData" @clearSearchData="clearSearchData" :isTitle="false" :isSlot="true">
         <div class="flex-wrap">
-          <button class="btnAn">高级查询</button>
+          <button @click="gjFlag = true" class="btnAn">高级查询</button>
           <div @click="show" class="setting"></div>
         </div>
       </Search>
     </div>
     <!--表格-->
     <div v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" class="advance__table">
-      <el-table ref="table" max-height="100%" show-summary class="table" :data="tableData" border stripe height="calc(100vh - 155px)" style="width: 100%">
+      <!-- <el-table ref="table" max-height="100%" show-summary class="table" :data="tableData" border stripe height="calc(100vh - 155px)" style="width: 100%">
         <el-table-column v-for="(item, index) in tableColsCopy" :prop="item.statCode" :label="item.statName" :key="index">
         </el-table-column>
+      </el-table> -->
+      <el-table ref="table" max-height="100%" show-summary class="table" :data="tableData" border stripe height="calc(100vh - 155px)" style="width: 100%">
+        <el-table-column prop="FlightNO" label="航班号"></el-table-column>
+        <el-table-column prop="FlightDate" label="航班日期"></el-table-column>
+        <el-table-column prop="SourceAirport" label="起飞站"></el-table-column>
+        <el-table-column prop="TargetAirport" label="目的地"></el-table-column>
+        <el-table-column prop="PassengerNameUpcase" label="旅客姓名"></el-table-column>
+        <el-table-column prop="BagSN" label="行李牌号"></el-table-column>
+        <el-table-column prop="SpecialType" label="特殊行李类型"></el-table-column>
+        <el-table-column prop="checkIn" label="值机"></el-table-column>
+        <el-table-column label="删除">
+          <template slot-scope="scope">
+            <div>{{scope.row.deleted == 'DEL' ? 1: 0}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column label="激活">
+          <template slot-scope="scope">
+            <div>{{scope.row.activated == 'I' ? 0 : 1}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="BagWeight" label="重量"></el-table-column>
+        <el-table-column prop="latestStatus" label="最新状态"></el-table-column>
+        <el-table-column prop="bagLocation" label="最新位置"></el-table-column>
+        <el-table-column prop="TransferFlightNO" label="中转进航班"></el-table-column>
       </el-table>
     </div>
     <!--列设置-->
@@ -45,13 +69,92 @@
         </div>
       </div>
     </Dialog>
+    <!--高级查询-->
+    <Dialog width="852px" :flag="gjFlag">
+      <div class="rowDialog">
+        <div class="title">高级查询</div>
+        <div class="content">
+          <el-form ref="form" :model="form" label-width="100px">
+            <el-row :gutter="20">
+              <el-col :span="16">
+                <el-form-item label="航班日期">
+                  <el-date-picker v-model="form.time" size="small" type="daterange" value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
+                  </el-date-picker>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="当前状态">
+                  <el-input size="small" v-model="form.status"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="20">
+              <el-col :span="8">
+                <el-form-item label="航班号">
+                  <el-input size="small" v-model="form.flightNumber"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="起飞站">
+                  <el-input size="small" v-model="form.station"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="目的地">
+                  <el-input size="small" v-model="form.destination"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="20">
+              <el-col :span="8">
+                <el-form-item label="行李牌号">
+                  <el-input size="small" v-model="form.grade"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="特殊行李类型">
+                  <el-input size="small" v-model="form.type"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="容器编号">
+                  <el-input disabled size="small" v-model="form.container"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="20">
+              <el-col :span="8">
+                <el-form-item label="旅客姓名">
+                  <el-input size="small" v-model="form.name"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="PNR">
+                  <el-input size="small" v-model="form.pnr"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="值机序号">
+                  <el-input size="small" v-model="form.check"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </div>
+        <div class="foot right t30">
+          <el-button size="medium" class="r24" @click="onCheckGj" type="primary">确定</el-button>
+          <el-button size="medium" @click="gjFlag = false">取消</el-button>
+        </div>
+      </div>
+    </Dialog>
   </div>
 </template>
 
 <script>
 import Search from '@/layout/components/Search';
 import Dialog from "@/layout/components/Dialog";
-import { IntegratedQuery, StatItemsQueryByStatMain } from '@/api/flight';
+import { advancedInquiry, getQuery } from '@/api/flight';
+import { parseTime } from '@/utils/index';
 export default {
   name: 'Advance',
   components: { Search, Dialog },
@@ -59,17 +162,54 @@ export default {
     return {
       loading: false,
       rowFlag: false,
-      tableData: [],
+      gjFlag: false,
+      tableData: [
+        {
+          FlightNO: 'CA1200',
+          FlightDate: '2022-04-24',
+          SourceAirport: 'PEK',
+          TargetAirport: 'CTU',
+          PassengerNameUpcase: 'ZHANGSAN',
+          BagSN: '39923234',
+          SpecialType: 'VIP行李',
+          checkIn: '是',
+          deleted: '否',
+          activated: '否',
+          BagWeight: '120KG',
+          latestStatus: '分拣',
+          bagLocation: '四层直接导入',
+          TransferFlightNO: ''
+        }
+      ],
       tableColsCopy: [],
       checkList: [],
       tableCols: [],
-      timeStart: '',
-      timeEnd: ''
+      timeStart: parseTime(new Date(), '{y}-{m}-{d}'),
+      timeEnd: parseTime(new Date(), '{y}-{m}-{d}'),
+      form: {
+        time: '',
+        status: '',
+        flightNumber: '',
+        destination: '',
+        station: '',
+        grade: '',
+        type: '',
+        container: '',
+        name: '',
+        pnr: '',
+        check: ''
+      },
+      dataContent: []
     }
   },
   created () {
+    //参数顺序   【航班开始日期,航班结束日期,航班号,航班号,行李牌号,行李牌号,起飞站,起飞站,目的站,目的站,特殊行李类型,特殊 行李类型,旅客姓名大写拼音,旅客姓名大写拼音,pnr,pnr,值机号,值机号】
+    const dataContent = [this.timeStart, this.timeEnd];
+    for (let i = 0; i < 18; i++) {
+      dataContent.push(null)
+    }
     // this.integratedQuery();
-    // this.statItemsQueryByStatMain();
+    this.statItemsQueryByStatMain(dataContent);
   },
   mounted () {
     document.querySelector('.interfaceLog_head_time_start .el-input__prefix i').remove()
@@ -111,14 +251,46 @@ export default {
       this.checkList = this.tableCopy;
       this.tableColsCopy = _.cloneDeep(this.checkList);
     },
+    //高级查询-确定
+    onCheckGj () {
+      //参数顺序   【航班开始日期,航班结束日期,航班号,航班号,行李牌号,行李牌号,起飞站,起飞站,目的站,目的站,特殊行李类型,特殊 行李类型,旅客姓名大写拼音,旅客姓名大写拼音,pnr,pnr,值机号,值机号】
+      this.dataContent = [];
+      const { time, status, flightNumber, destination, station, grade, type, container, name, pnr, check } = this.form
+      if (time && time.length) {
+        this.dataContent.push(time[0]);
+        this.dataContent.push(time[1]);
+      } else {
+        this.dataContent.push(null);
+        this.dataContent.push(null);
+      }
+      this.setDataContent(status);
+      this.setDataContent(flightNumber);
+      this.setDataContent(grade);
+      this.setDataContent(station);
+      this.setDataContent(destination);
+      this.setDataContent(type);
+      this.setDataContent(name);
+      this.setDataContent(pnr);
+      this.setDataContent(check);
+      this.statItemsQueryByStatMain(this.dataContent);
+      this.gjFlag = false;
+    },
+    setDataContent (target) {
+      if (target) {
+        this.dataContent.push(target);
+        this.dataContent.push(target);
+      } else {
+        this.dataContent.push(null);
+        this.dataContent.push(null);
+      }
+    },
     //综合查询
     async integratedQuery (obj = {}) {
       try {
         this.loading = true
-        const res = await IntegratedQuery(obj)
+        const res = await advancedInquiry(obj)
         if (res.code === 0) {
-          this.tableData = res.returnData
-          this.loading = false
+          console.log(res)
         } else {
           this.$message.error(res.message)
           this.loading = false
@@ -129,16 +301,14 @@ export default {
       }
     },
     //表头数据查询
-    async statItemsQueryByStatMain (obj = {}) {
+    async statItemsQueryByStatMain (dataContent) {
       try {
-        const res = await StatItemsQueryByStatMain({
-          mainId: 1
+        const res = await getQuery({
+          id: 30,
+          dataContent
         })
-        if (res.code === 0) {
-          const datas = _.sortBy(res.returnData, (o) => o.showOrder);
-          this.tableCols = datas
-          this.tableColsCopy = _.cloneDeep(this.tableCols)
-          this.checkList = this.tableCols
+        if (res.code == 0) {
+          this.tableData = res.returnData
         } else {
           this.$message.error(res.message)
         }