Browse Source

高级查询-行李牌号查询修改

zhongxiaoyu 1 year ago
parent
commit
7bd0ee116e
3 changed files with 638 additions and 12 deletions
  1. 2 1
      .eslintrc.js
  2. 617 1
      public/config.js
  3. 19 10
      src/views/advancedQuery/views/advancedHome.vue

+ 2 - 1
.eslintrc.js

@@ -13,7 +13,8 @@ module.exports = {
   globals: {
     'DATACONTENT_ID': 'readonly',
     'SERVICE_ID': 'readonly',
-    'LOOP_INTERVAL': 'readonly'
+    'LOOP_INTERVAL': 'readonly',
+    'AIRPORT_ID': 'readonly',
   },
 
   // add your custom rules here

+ 617 - 1
public/config.js

@@ -201,5 +201,621 @@ window.SERVICE_ID = {
   expressTransportationUpload: 20034, // 速运行李数据上传
   expressTransportation: 1803435, // 速运行李数据查询
   expressTransportationNum: 1803436, // 速运行李数量查询
-  expressTransportationFail: 1803437, // 速运行李数据查询-失败
+  expressTransportationFail: 1803437 // 速运行李数据查询-失败
+}
+
+window.AIRPORT_ID = {
+  EN: '101',
+  EW: '104',
+  AY: '105',
+  BW: '106',
+  FI: '108',
+  '7Q': '110',
+  U1: '111',
+  CK: '112',
+  GW: '113',
+  LY: '114',
+  JU: '115',
+  SK: '117',
+  DT: '118',
+  '8K': '119',
+  JS: '120',
+  ON: '123',
+  AH: '124',
+  BA: '125',
+  GA: '126',
+  G3: '127',
+  UO: '128',
+  MP: '129',
+  JL: '131',
+  MX: '132',
+  LR: '133',
+  AV: '134',
+  VT: '135',
+  CU: '136',
+  AM: '139',
+  LI: '140',
+  FZ: '141',
+  KF: '142',
+  AU: '143',
+  '7T': '144',
+  UC: '145',
+  XK: '146',
+  AT: '147',
+  LN: '148',
+  LG: '149',
+  UG: '150',
+  R5: '151',
+  VH: '152',
+  BU: '154',
+  ES: '155',
+  '2I': '156',
+  QR: '157',
+  CX: '160',
+  MN: '161',
+  '7L': '164',
+  JP: '165',
+  IK: '166',
+  QM: '167',
+  UM: '168',
+  HR: '169',
+  GE: '170',
+  GT: '171',
+  CV: '172',
+  HA: '173',
+  II: '175',
+  EK: '176',
+  OR: '178',
+  '7A': '179',
+  KE: '180',
+  Z6: '181',
+  MA: '182',
+  SW: '186',
+  DW: '187',
+  K6: '188',
+  JI: '189',
+  IG: '191',
+  PY: '192',
+  IE: '193',
+  FV: '195',
+  TC: '197',
+  TU: '199',
+  SD: '200',
+  JM: '201',
+  TA: '202',
+  '5J': '203',
+  NH: '205',
+  B3: '208',
+  UB: '209',
+  '4B': '210',
+  '2P': '211',
+  '5W': '212',
+  PK: '214',
+  TG: '217',
+  NF: '218',
+  YN: '219',
+  LH: '220',
+  AL: '221',
+  HN: '225',
+  KU: '229',
+  CM: '230',
+  NG: '231',
+  MH: '232',
+  TK: '235',
+  BD: '236',
+  IZ: '238',
+  MK: '239',
+  GU: '240',
+  K8: '241',
+  TN: '244',
+  '7F': '245',
+  O6: '247',
+  HY: '250',
+  FG: '255',
+  RD: '256',
+  OS: '257',
+  MD: '258',
+  FN: '259',
+  FJ: '260',
+  I5: '261',
+  U6: '262',
+  EF: '265',
+  LT: '266',
+  BE: '267',
+  EQ: '269',
+  W7: '271',
+  K4: '272',
+  GK: '274',
+  '5L': '275',
+  XF: '277',
+  B6: '279',
+  RO: '281',
+  EC: '284',
+  RA: '285',
+  PU: '286',
+  '4N': '287',
+  LD: '288',
+  OM: '289',
+  BF: '290',
+  WG: '292',
+  WM: '295',
+  CD: '296',
+  CI: '297',
+  UT: '298',
+  '5S': '301',
+  OO: '302',
+  ZW: '303',
+  C2: '304',
+  WE: '307',
+  V0: '308',
+  WZ: '309',
+  '2T': '311',
+  IP: '312',
+  '2S': '315',
+  '5N': '316',
+  '3A': '317',
+  CC: '318',
+  '8D': '319',
+  SC: '324',
+  AQ: '327',
+  DY: '328',
+  RF: '330',
+  S4: '331',
+  FL: '332',
+  MM: '334',
+  SY: '337',
+  ZD: '338',
+  KS: '339',
+  KO: '341',
+  YQ: '342',
+  L2: '344',
+  NC: '345',
+  WP: '347',
+  EE: '350',
+  A7: '352',
+  NU: '353',
+  E7: '355',
+  '3T': '359',
+  Y7: '362',
+  RP: '363',
+  TZ: '366',
+  IN: '367',
+  '0V': '368',
+  '5Y': '369',
+  RZ: '372',
+  NB: '373',
+  '3K': '375',
+  HC: '377',
+  KX: '378',
+  LZ: '379',
+  Q6: '381',
+  T9: '382',
+  RQ: '384',
+  MY: '386',
+  Z4: '389',
+  A3: '390',
+  Q3: '391',
+  '8G': '395',
+  G6: '397',
+  YR: '398',
+  HP: '401',
+  J0: '402',
+  PO: '403',
+  JW: '404',
+  '5X': '406',
+  V7: '407',
+  '4V': '408',
+  YM: '409',
+  ZR: '410',
+  '3G': '411',
+  VI: '412',
+  AX: '414',
+  N8: '416',
+  E6: '417',
+  R9: '418',
+  CF: '419',
+  GI: '420',
+  S7: '421',
+  F9: '422',
+  ER: '423',
+  YD: '425',
+  '9L': '426',
+  TX: '427',
+  '9E': '430',
+  ZA: '433',
+  L6: '434',
+  '3X': '435',
+  KJ: '436',
+  '5A': '437',
+  ZI: '439',
+  OF: '442',
+  GO: '444',
+  F5: '447',
+  '3M': '449',
+  YX: '453',
+  NA: '455',
+  I7: '456',
+  WB: '459',
+  EB: '460',
+  '7W': '461',
+  XL: '462',
+  ZP: '463',
+  KC: '465',
+  '3H': '466',
+  '4M': '469',
+  ZV: '471',
+  SE: '473',
+  UI: '475',
+  XE: '477',
+  R6: '478',
+  ZH: '479',
+  QX: '481',
+  '3W': '482',
+  '8V': '485',
+  NK: '487',
+  W8: '489',
+  WI: '490',
+  B9: '491',
+  '9H': '493',
+  EZ: '494',
+  E3: '497',
+  '7B': '499',
+  Q8: '505',
+  WC: '506',
+  QJ: '508',
+  JF: '510',
+  RJ: '512',
+  '7G': '513',
+  G9: '514',
+  '2F': '517',
+  '5T': '518',
+  FE: '519',
+  '3R': '520',
+  '1P': '523',
+  XM: '524',
+  B7: '525',
+  WN: '526',
+  A2: '529',
+  T0: '530',
+  YV: '533',
+  WQ: '534',
+  S9: '535',
+  GV: '536',
+  W5: '537',
+  TH: '539',
+  '5H': '540',
+  '5Z': '541',
+  '9Q': '543',
+  LP: '544',
+  X8: '545',
+  '8U': '546',
+  '2K': '547',
+  M3: '549',
+  BL: '550',
+  FC: '553',
+  SU: '555',
+  O8: '558',
+  H8: '560',
+  XQ: '564',
+  PS: '566',
+  CE: '567',
+  LW: '568',
+  FO: '569',
+  '9U': '572',
+  G7: '573',
+  '4W': '574',
+  '7C': '575',
+  OX: '578',
+  '4G': '579',
+  RU: '580',
+  XJ: '582',
+  '9W': '589',
+  HW: '590',
+  GX: '591',
+  ZN: '595',
+  CS: '596',
+  '4I': '597',
+  HZ: '598',
+  '8M': '599',
+  BB: '600',
+  UL: '603',
+  UY: '604',
+  H2: '605',
+  A9: '606',
+  EY: '607',
+  XR: '608',
+  KK: '610',
+  JB: '613',
+  IQ: '614',
+  QY: '615',
+  HF: '617',
+  SQ: '618',
+  BZ: '620',
+  MZ: '621',
+  MO: '622',
+  FB: '623',
+  H9: '624',
+  D6: '625',
+  CG: '626',
+  QV: '627',
+  B2: '628',
+  MI: '629',
+  DK: '630',
+  GL: '631',
+  JV: '632',
+  IY: '635',
+  BP: '636',
+  B8: '637',
+  PJ: '638',
+  LV: '639',
+  FA: '640',
+  '5D': '642',
+  KM: '643',
+  '4S': '644',
+  '6P': '645',
+  E0: '646',
+  QI: '647',
+  TS: '649',
+  '6T': '654',
+  DV: '655',
+  PX: '656',
+  BT: '657',
+  M8: '658',
+  J4: '660',
+  '6G': '661',
+  EO: '663',
+  HQ: '668',
+  U8: '669',
+  UN: '670',
+  BI: '672',
+  NX: '675',
+  PC: '677',
+  G0: '678',
+  JK: '680',
+  CL: '683',
+  NI: '685',
+  WX: '689',
+  '8A': '691',
+  PZ: '692',
+  JX: '693',
+  YW: '694',
+  BR: '695',
+  VR: '696',
+  '5C': '700',
+  WF: '701',
+  NO: '703',
+  OL: '704',
+  S2: '705',
+  KQ: '706',
+  JO: '708',
+  K5: '710',
+  S6: '712',
+  RH: '713',
+  MB: '716',
+  F2: '720',
+  YL: '722',
+  QA: '723',
+  LX: '724',
+  W3: '725',
+  VZ: '727',
+  QT: '729',
+  MF: '731',
+  C7: '732',
+  D9: '733',
+  VO: '734',
+  SP: '737',
+  VN: '738',
+  NL: '740',
+  XN: '743',
+  '8T': '744',
+  AB: '745',
+  '3N': '746',
+  YO: '747',
+  DU: '748',
+  '4Z': '749',
+  DB: '750',
+  D4: '751',
+  JZ: '752',
+  LC: '753',
+  BY: '754',
+  '3V': '756',
+  Z3: '757',
+  UU: '760',
+  '7U': '765',
+  RC: '767',
+  EL: '768',
+  UE: '770',
+  J2: '771',
+  V6: '772',
+  FM: '774',
+  CW: '778',
+  Y9: '780',
+  MU: '781',
+  QL: '782',
+  CZ: '784',
+  RT: '785',
+  VK: '786',
+  KB: '787',
+  MG: '791',
+  VA: '795',
+  KR: '798',
+  GD: '800',
+  '8S': '802',
+  AE: '803',
+  '8Y': '804',
+  '4X': '805',
+  '7H': '808',
+  M6: '810',
+  EU: '811',
+  JN: '812',
+  EP: '815',
+  '9P': '816',
+  MJ: '817',
+  '5R': '820',
+  '6K': '821',
+  NN: '823',
+  '9M': '824',
+  F4: '825',
+  GS: '826',
+  PG: '829',
+  OU: '831',
+  GB: '832',
+  RK: '833',
+  NS: '836',
+  E2: '837',
+  WS: '838',
+  RM: '839',
+  '0P': '840',
+  C5: '841',
+  '5M': '842',
+  P5: '845',
+  ZK: '846',
+  PN: '847',
+  R3: '849',
+  HX: '851',
+  KG: '854',
+  DJ: '856',
+  LM: '857',
+  FK: '858',
+  '2M': '860',
+  HK: '861',
+  EV: '862',
+  M7: '865',
+  V8: '868',
+  VV: '870',
+  Y8: '871',
+  CH: '872',
+  '6R': '873',
+  TE: '874',
+  '3U': '876',
+  OQ: '878',
+  RV: '879',
+  HU: '880',
+  DE: '881',
+  NY: '882',
+  '8C': '883',
+  '5G': '884',
+  OH: '886',
+  ZG: '887',
+  QQ: '888',
+  GJ: '891',
+  DZ: '893',
+  BQ: '894',
+  CN: '895',
+  VF: '896',
+  '7D': '897',
+  JD: '898',
+  ZL: '899',
+  FD: '900',
+  '4D': '903',
+  E5: '906',
+  QN: '907',
+  OG: '908',
+  WY: '910',
+  QW: '912',
+  AJ: '914',
+  SS: '923',
+  GR: '924',
+  U7: '926',
+  UZ: '928',
+  VS: '932',
+  KZ: '933',
+  TL: '935',
+  '9N': '938',
+  VW: '942',
+  DI: '944',
+  WK: '945',
+  V4: '946',
+  L3: '947',
+  LS: '949',
+  '6B': '951',
+  JJ: '957',
+  '7I': '958',
+  LE: '959',
+  OV: '960',
+  U9: '966',
+  PB: '967',
+  LU: '972',
+  ZB: '974',
+  HV: '979',
+  VD: '981',
+  QK: '983',
+  VX: '984',
+  G5: '987',
+  OZ: '988',
+  IJ: '989',
+  D3: '991',
+  JA: '995',
+  UX: '996',
+  BG: '997',
+  CA: '999',
+  XH: '000',
+  AA: '001',
+  '2G': '002',
+  CP: '003',
+  BV: '004',
+  CO: '005',
+  DL: '006',
+  '1C': '007',
+  Z5: '009',
+  M9: '011',
+  NW: '012',
+  AC: '014',
+  UA: '016',
+  HO: '018',
+  FX: '023',
+  AS: '027',
+  '3Z': '029',
+  F7: '033',
+  GC: '034',
+  US: '037',
+  TQ: '038',
+  K9: '040',
+  RG: '042',
+  KA: '043',
+  AR: '044',
+  LA: '045',
+  TP: '047',
+  CY: '048',
+  OA: '050',
+  '4U': '051',
+  EI: '053',
+  WL: '054',
+  AP: '055',
+  YK: '056',
+  AF: '057',
+  IC: '058',
+  DF: '059',
+  HM: '061',
+  '5V': '062',
+  SB: '063',
+  OK: '064',
+  SV: '065',
+  '8Q': '066',
+  I9: '067',
+  TM: '068',
+  RB: '070',
+  ET: '071',
+  GF: '072',
+  IA: '073',
+  KL: '074',
+  IB: '075',
+  ME: '076',
+  MS: '077',
+  PR: '079',
+  LO: '080',
+  QF: '081',
+  SN: '082',
+  SA: '083',
+  FT: '084',
+  NZ: '086',
+  IT: '090',
+  DP: '091',
+  MT: '092',
+  KD: '093',
+  C4: '094',
+  '6A': '095',
+  IR: '096',
+  AI: '098',
+  '9S': '099'
 }

+ 19 - 10
src/views/advancedQuery/views/advancedHome.vue

@@ -533,7 +533,7 @@ export default {
         {
           prop: 'flightNO',
           label: '航班号',
-          hintText: '示例:CA1111',
+          hintText: '示例:CA1234',
           hintVisible: false
         },
         {
@@ -551,7 +551,7 @@ export default {
         {
           prop: 'baggageNO',
           label: '行李牌号',
-          hintText: '示例:1234567890',
+          hintText: '示例:1234567890 或 CA123456',
           hintVisible: false
         },
         {
@@ -565,7 +565,7 @@ export default {
         {
           prop: 'U_Device_ID',
           label: '容器编号',
-          hintText: '示例:AKE25810CA',
+          hintText: '示例:AKE12345CA',
           hintVisible: false
         },
         {
@@ -589,13 +589,13 @@ export default {
         {
           prop: 'transferArrival',
           label: '中转进航班',
-          hintText: '示例:CA1111',
+          hintText: '示例:CA1234',
           hintVisible: false
         },
         {
           prop: 'transferDeparture',
           label: '中转出航班',
-          hintText: '示例:CA1111',
+          hintText: '示例:CA1234',
           hintVisible: false
         },
         {
@@ -1040,7 +1040,8 @@ export default {
       const top2 = /^([a-zA-Z][0-9])|([0-9][a-zA-Z])|([a-zA-Z]{2})/
       const bagNum = /^[0-9]{10}$/
       const bagNo = /^[a-zA-Z]{2}[0-9]{6}$/
-      const bagNumCA = /^CA[0-9]{6}$/
+      // const bagNumCA = /^CA[0-9]{6}$/
+      const bagNumShort = /^[0-9a-zA-Z][a-zA-Z][0-9]{6}$/
       // 纯字母则为旅客姓名
       if (az.test(val)) {
         this.form['passengerName'] = val
@@ -1049,7 +1050,11 @@ export default {
         // 字母加数字且前两位为字母则为航班号
         this.form['flightNO'] = val
         this.advancedSubmitHandler(true)
-      } else if (bagNum.test(val) || bagNo.test(val) || bagNumCA.test(val)) {
+      } else if (
+        bagNum.test(val) ||
+        bagNo.test(val) ||
+        (bagNumShort.test(val) && Object.keys(AIRPORT_ID).includes(val.slice(0, 2).toUpperCase()))
+      ) {
         // 纯数字且位数等于10则为行李牌号
         this.form['baggageNO'] = val
         this.advancedSubmitHandler(true)
@@ -1079,9 +1084,13 @@ export default {
         }
       }
       function baggageFormat(baggageNO) {
-        const bagNumCA = /^CA[0-9]{6}$/
-        if (bagNumCA.test(baggageNO)) {
-          return Array.from({ length: 10 }, (_, i) => baggageNO.replace('CA', `${i}999`)).join()
+        // const bagNumCA = /^CA[0-9]{6}$/
+        const bagNumShort = /^[0-9a-zA-Z][a-zA-Z][0-9]{6}$/
+        if (bagNumShort.test(baggageNO) && Object.keys(AIRPORT_ID).includes(baggageNO.slice(0, 2).toUpperCase())) {
+          return Array.from(
+            { length: 10 },
+            (_, i) => `${i}${AIRPORT_ID[baggageNO.slice(0, 2).toUpperCase()]}${baggageNO.slice(2)}`
+          ).join()
         }
         return baggageNO || null
       }