浏览代码

行李详情修改

zhaoke 10 月之前
父节点
当前提交
fa0e8888e4

+ 1 - 0
public/config.js

@@ -30,6 +30,7 @@ window.SERVICE_ID = {
   advancedQueryId: 30, //高级查询-数据查询-id
   advancedQueryNew: 93, //高级查询-数据查询-id
   advancedRemakesId: 2006023,//高级查询-数据说明-id
+  advancedStoryId: 2006027, //高级查询-新数据说明-id
 
   /***-----进港管理------***/
   arrivalAirId: 67, //进港管理-机场选择

+ 97 - 0
src/views/newBagDetails/components/baggageStory.vue

@@ -0,0 +1,97 @@
+<template>
+  <div class="baggageStory">
+    <div class="table">
+      <el-table height="400" :data="storyTable" border style="width: 100%">
+        <el-table-column prop="luggageDescribe" label="行李服务记录">
+        </el-table-column>
+        <el-table-column prop="createtime" label="行李服务时间">
+        </el-table-column>
+      </el-table>
+    </div>
+    <div class="content t30">
+      <el-form ref="form" :model="form" label-width="70px">
+        <el-form-item label="输入备注">
+          <el-input type="textarea" clearable v-model="form.desc"></el-input>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="right t30">
+      <el-button size="medium" class="r24" type="primary" @click="onStoryCheck">确定</el-button>
+      <el-button size="medium" @click="storyFlag = false">取消</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import { parseTime } from '@/utils'
+import { getToken } from '@/utils/auth'
+import { Query, newData } from '@/api/webApi'
+export default {
+  name: 'BaggageStory',
+  data () {
+    return {
+      storyFlag: false,
+      storyTable: [],
+      form: {
+        desc: ''
+      },
+      storyId: ''
+    }
+  },
+  mounted () {
+    const { query } = this.$route
+    const { ID } = query
+    this.storyId = ID || ''
+    if (this.storyId) {
+      this.queryStoryCheck()
+    }
+  },
+  methods: {
+    async onStoryCheck () {
+      if (!this.storyId) return
+      const params = {
+        serviceId: SERVICE_ID.advancedStoryId,
+        dataContent: {
+          luggageID: this.storyId,
+          luggageDescribe: this.form.desc,
+          user_id: getToken('userid')
+        },
+        event: '1'
+      }
+      const { code } = await newData(params)
+      if (code == 0) {
+        const item = {
+          luggageDescribe: this.form.desc,
+          createtime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}')
+        }
+        this.storyTable.push(item)
+        this.$message.success('操作成功')
+        this.form.desc = ''
+      }
+      else this.$message.success('操作失败')
+    },
+    async queryStoryCheck () {
+      this.storyTable = []
+      const params = {
+        serviceId: SERVICE_ID.advancedStoryId,
+        dataContent: {
+          luggageID: this.storyId,
+        },
+        event: '0'
+      }
+      const { code, returnData } = await Query(params)
+      if (code == 0 && returnData?.length) {
+        const ndatas = [...returnData]
+        ndatas.forEach(item => item.createtime = parseTime(item.createtime.replace('T', ' '), '{y}-{m}-{d} {h}:{i}:{s}'))
+        this.storyTable = ndatas
+      }
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.baggageStory {
+  padding: 20px;
+}
+</style>

+ 39 - 4
src/views/newBagDetails/components/baggageView.vue

@@ -16,13 +16,14 @@
                   <div v-for="(line, index) in 6" :key="index" :class="['step-line-segment', { 'step-line-active': activeStepLine(index,item.bagStatus) }]"></div>
                 </div>
                 <div v-for="(p, index) in item.bagStatus" :key="index" :class="{ 'step-item': true, 'active-item': p.timeValue }">
-                  <div class="step-circle">
+                  <div :class="activeStepLineDanger(index,item)" class="step-circle">
                     <span class="step-name">{{ p.nodeName }}</span>
                   </div>
                   <div v-if="p.timeValue || p.stateValue || p.loclValue" class="step-info">
                     <div :class="statusClasses(p.stateValue)">{{ p.stateValue }}</div>
                     <span class="step-time">{{ p.timeValue }}</span>
                     <div class="step-location">{{ p.loclValue }}</div>
+                    <div :class="statusClasses(p.fourSecurity)">{{ p.fourSecurity }}</div>
                   </div>
                   <div v-else class="step-info">无</div>
                 </div>
@@ -139,6 +140,35 @@ export default {
         return (arrs[index].stateValue || arrs[index].loclValue || arrs[index].timeValue) && (arrs[index + 1].stateValue || arrs[index + 1].loclValue || arrs[index + 1].timeValue)
       }
     },
+    activeStepLineDanger () {
+      return function (index, item) {
+        function diffMinutes () {
+          const { takeTime } = item
+          const [hour, minutes] = takeTime?.split(':')
+          if (minutes - 15 >= 0) {
+            return `${hour}: ${minutes - 15 >= 10 ? minutes - 15 : '0' + (minutes - 15)}`
+          } else {
+            if (hour - 1 > 0) {
+              return `${hour - 1}:${minutes - 15 + 60 >= 10 ? minutes - 15 + 60 : '0' + (minutes - 15 + 60)}`
+            } else {
+              return `23:${minutes - 15 + 60 >= 10 ? minutes - 15 + 60 : '0' + (minutes - 15 + 60)}`
+            }
+          }
+        }
+        const arrs = item.bagStatus
+        const { stateProp, stateValue } = arrs[index]
+        if (stateProp == 'securityInspectionResults' && stateValue == 'UCL') {
+          return 'step-circle-danger'
+        }
+        if (stateProp == 'securityInspectionResults' && !stateValue) {
+          const nowdate = new Date().getHours() + ':' + new Date().getMinutes()
+          const takedate = diffMinutes()
+          if ((nowdate == takedate.replace(' ', '')) && (!arrs[index + 1].stateValue && !arrs[index + 1].loclValue && !arrs[index + 1].timeValue)) {
+            return 'step-circle-danger'
+          }
+        }
+      }
+    },
     statusClasses () {
       return function (status) {
         const classes = ['step-status']
@@ -219,9 +249,10 @@ export default {
     statusSecurity (item) {
       const { securityInspectionResults, security_location } = item
       const securityNums = ['XSA001', 'XSA003', 'XSB001', 'XSB004']
-      if (securityInspectionResults == 'CLR') return securityInspectionResults
-      else if (securityNums.includes(security_location)) return 'ULR'
-      else return ''
+      // if (securityInspectionResults == 'CLR') return securityInspectionResults
+      // if (securityInspectionResults == 'UCLR') return securityInspectionResults
+      if (securityNums.includes(security_location)) return 'ULR'
+      else return securityInspectionResults
     },
     restTable () {
       this.loading = false
@@ -245,6 +276,7 @@ export default {
         const index = bagStatus.findIndex(citem => citem.stateProp == 'securityInspectionResults')
         if (index > -1) {
           bagStatus[index]['stateValue'] = this.statusSecurity(item)
+          bagStatus[index]['fourSecurity'] = item.fourSecurity
         }
         const reqItem = this.getQueryList(SERVICE_ID.baggageTime, {
           carrierFlights,
@@ -412,6 +444,9 @@ export default {
           &.active-item .step-circle {
             background: #2d67e3;
           }
+          &.active-item .step-circle-danger {
+            background: #ff3303;
+          }
         }
       }
       .btns {

+ 67 - 5
src/views/newBagDetails/index.vue

@@ -11,20 +11,23 @@
               <el-button type="text">查看</el-button>
             </div>
           </el-col>
-          <el-col :span="20">
+          <el-col :span="18">
             <el-scrollbar>
               <div class="tags-view-wrapper">
                 <div v-for="(item,index) in detailsArr" class="tags-view-item" @click="tagClick(item,index)" :class="activeIndex == index ? 'active' : ''" :key="index">{{ item.luggageNum }}</div>
               </div>
             </el-scrollbar>
           </el-col>
+          <el-col :span="2">
+            <el-button @click="dialogFlag = true" type="text">行李信息设置</el-button>
+          </el-col>
         </el-row>
       </div>
       <div class="newBagDetails-info-details">
         <div class="newBagDetails-info-details-msgs">
           <el-scrollbar style="height: 100%;">
             <el-row class="newBagDetails-info-details-msgs-l1" :gutter="20">
-              <el-col :span="3" class="msgs-list" v-for="(item,index) in msgs1" :key="index">{{ item.columnLabel }}:
+              <el-col :span="6" class="msgs-list" v-for="(item,index) in tableColsCopy" :key="index">{{ item.columnLabel }}:
                 <el-tooltip class="item" effect="dark" :content="item.value" placement="top">
                   <span>{{ item.value }}</span>
                 </el-tooltip>
@@ -45,6 +48,23 @@
         <component ref="dataChild" :query="query" :queryObj="queryObj" :tableDatas="tableDatas" :tagObj="tagObj" :is="componentName"></component>
       </div>
     </div>
+    <Dialog :flag="dialogFlag" width="600px" class="dialog-check-group">
+      <div class="dialog-wrapper">
+        <div class="title">列设置</div>
+        <div style="height: 600px" class="content">
+          <el-scrollbar style="height: 100%">
+            <el-tree ref="columnSetTree" :data="tableCols" :class="colsCheckClass" show-checkbox node-key="index" :default-expand-all="true" :props="{
+                  label: 'columnLabel',
+                  children: 'children',
+                }" :default-checked-keys="checkedKeysTemp" @check="handleCheck" />
+          </el-scrollbar>
+        </div>
+        <div class="foot right t30">
+          <el-button size="medium" class="r24" type="primary" @click="onCheck('baggageTableData')">确定</el-button>
+          <el-button size="medium" @click="hide">取消</el-button>
+        </div>
+      </div>
+    </Dialog>
   </div>
 </template>
 
@@ -54,20 +74,26 @@ import baggageView from './components/baggageView.vue'
 import baggageList from './components/baggageList.vue'
 import baggageMessage from './components/baggageMessage.vue'
 import baggageAbnormal from './components/baggageAbnormal.vue'
+import baggageStory from './components/baggageStory.vue'
+import Dialog from '@/layout/components/Dialog/index.vue'
 import pf from '@/layout/mixin/publicFunc'
+import tableColsMixin from './mix/tableCols'
 import { getAuthData, formatOrder } from '@/utils/validate'
 import { getToken } from '@/utils/auth'
+import { showCols } from './mix/showCols'
 export default {
   name: 'NewBagDetails',
-  mixins: [pf],
-  components: { ScrollPane, baggageView, baggageList, baggageMessage, baggageAbnormal },
+  mixins: [pf, tableColsMixin],
+  components: { ScrollPane, baggageView, baggageList, baggageMessage, baggageAbnormal, baggageStory, Dialog },
   data () {
     return {
       infoArrs: [],
       passenger_name: '',
       detailsArr: [],
+      tableCols: [],
       activeIndex: null,
       msgs1: [],
+      dialogFlag: false,
       tabMenu: [
         {
           key: 'baggageView',
@@ -85,6 +111,10 @@ export default {
           key: 'baggageAbnormal',
           name: '异常行李'
         },
+        {
+          key: 'baggageStory',
+          name: '服务记录'
+        },
       ],
       tabIndex: 0,
       componentName: 'baggageView',
@@ -132,7 +162,7 @@ export default {
         if (code == 0) {
           if (returnData && returnData.length) {
             const nodeDatas = returnData.filter(item => item.needShow)
-            this.msgs1 = formatOrder(nodeDatas)
+            this.msgs1 = [...nodeDatas]
             this.getLuggageInfo(auth_id)
           }
         } else {
@@ -159,6 +189,9 @@ export default {
               }
             })
           }
+          this.tableCols = [...this.orderColData([...this.msgs1]), ...this.hideData([...this.msgs1])]
+          this.tableColsCopy = this.orderColData([...this.msgs1])
+          this.checkedKeysTemp = this.orderColData([...this.msgs1]).map(item => item.index)
           if (!checkParams) {
             this.getLuggageNums()
           }
@@ -176,6 +209,35 @@ export default {
         console.log(error)
       }
     },
+    orderColData (datas) {
+      const ndata = [...datas]
+      const needShowData = showCols.filter(item => item.index)
+      if (!ndata.length) return []
+      ndata.forEach(item => {
+        needShowData.map(citem => {
+          if (item.columnName == citem.columnName) {
+            item.index = citem.index
+          }
+        })
+      })
+      const dialogShowList = ndata.filter(item => item.index)
+      const dialogShowCols = _.orderBy(dialogShowList, ['index'], ['asc']) || []
+      return dialogShowCols
+    },
+    hideData (datas) {
+      const hdata = []
+      const ndata = [...datas]
+      const needHideData = [...showCols].filter(item => !item.index)
+      if (!ndata.length) return hdata
+      ndata.forEach(item => {
+        needHideData.map(citem => {
+          if (item.columnName == citem.columnName) {
+            hdata.push(item)
+          }
+        })
+      })
+      return hdata
+    },
     //获取行李号
     async getLuggageNums () {
       try {

+ 391 - 0
src/views/newBagDetails/mix/showCols.js

@@ -0,0 +1,391 @@
+export const showCols = [
+  {
+    "queryTemplateColumnSetID": 1669,
+    "serviceOutPutId": 216,
+    "columnName": "specialType",
+    "columnLabel": "特殊行李类型",
+    "columnDescribe": null,
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": null,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": null,
+    index: 10
+  },
+  {
+    "queryTemplateColumnSetID": 1670,
+    "serviceOutPutId": 216,
+    "columnName": "PNRNO",
+    "columnLabel": "PNR编号",
+    "columnDescribe": null,
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": null,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": "NX7GZT"
+  },
+  {
+    "queryTemplateColumnSetID": 1671,
+    "serviceOutPutId": 216,
+    "columnName": "passengerName",
+    "columnLabel": "旅客姓名",
+    "columnDescribe": null,
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": null,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": "LIJIAN"
+  },
+  {
+    "queryTemplateColumnSetID": 1672,
+    "serviceOutPutId": 216,
+    "columnName": "loadNumber",
+    "columnLabel": "装载序列号",
+    "columnDescribe": null,
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": null,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": "001",
+    index: 5
+  },
+  {
+    "queryTemplateColumnSetID": 1673,
+    "serviceOutPutId": 216,
+    "columnName": "luggageCount",
+    "columnLabel": "总件数",
+    "columnDescribe": null,
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": null,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": "1"
+  },
+  {
+    "queryTemplateColumnSetID": 1674,
+    "serviceOutPutId": 216,
+    "columnName": "luggageWeight",
+    "columnLabel": "总重量",
+    "columnDescribe": null,
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": null,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": "8"
+  },
+  {
+    "queryTemplateColumnSetID": 1676,
+    "serviceOutPutId": 216,
+    "columnName": "frequentflyerNO",
+    "columnLabel": "常旅客号",
+    "columnDescribe": null,
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": null,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": "CA313001031337",
+    index: 6
+  },
+  {
+    "queryTemplateColumnSetID": 1677,
+    "serviceOutPutId": 216,
+    "columnName": "frequentflyerGrade",
+    "columnLabel": "常旅客级别",
+    "columnDescribe": null,
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": null,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": null,
+    index: 7
+  },
+  {
+    "queryTemplateColumnSetID": 1678,
+    "serviceOutPutId": 216,
+    "columnName": "dataState",
+    "columnLabel": "取消值机",
+    "columnDescribe": null,
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": null,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": null
+  },
+  {
+    "queryTemplateColumnSetID": 1681,
+    "serviceOutPutId": 216,
+    "columnName": "activeState",
+    "columnLabel": "行李激活状态",
+    "columnDescribe": null,
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": null,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": "0",
+    index: 4
+  },
+  {
+    "queryTemplateColumnSetID": 1682,
+    "serviceOutPutId": 216,
+    "columnName": "No_BSM",
+    "columnLabel": "无BSM状态",
+    "columnDescribe": null,
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": null,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": "0",
+    index: 9
+  },
+  {
+    "queryTemplateColumnSetID": 1683,
+    "serviceOutPutId": 216,
+    "columnName": "inflightNo",
+    "columnLabel": "中转进航班",
+    "columnDescribe": null,
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": 15,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": null,
+    index: 1
+  },
+  {
+    "queryTemplateColumnSetID": 1685,
+    "serviceOutPutId": 216,
+    "columnName": "transferFlightNO",
+    "columnLabel": "中转出航班",
+    "columnDescribe": null,
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": 16,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": null,
+    index: 2
+  },
+  {
+    "queryTemplateColumnSetID": 1711,
+    "serviceOutPutId": 216,
+    "columnName": "passenger_cabin",
+    "columnLabel": "旅客舱位",
+    "columnDescribe": null,
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": null,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": "Y",
+    index: 8
+  },
+  {
+    "queryTemplateColumnSetID": 1712,
+    "serviceOutPutId": 216,
+    "columnName": "loadAddress",
+    "columnLabel": "腹舱位置",
+    "columnDescribe": null,
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": null,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": null
+  },
+  {
+    "queryTemplateColumnSetID": 1716,
+    "serviceOutPutId": 216,
+    "columnName": "weightUnit",
+    "columnLabel": "重量单位",
+    "columnDescribe": null,
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": null,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": "K"
+  },
+  {
+    "queryTemplateColumnSetID": 2674,
+    "serviceOutPutId": 216,
+    "columnName": "outflightDate",
+    "columnLabel": "中转出航班日期",
+    "columnDescribe": "中转出航班日期",
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": null,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": null,
+    index: 3
+  },
+  {
+    "queryTemplateColumnSetID": 2878,
+    "serviceOutPutId": 216,
+    "columnName": "createAt",
+    "columnLabel": "创建时间",
+    "columnDescribe": "创建时间",
+    "needSort": null,
+    "needFilters": null,
+    "needShow": 1,
+    "needGroup": null,
+    "dataType": null,
+    "listqueryTemplateID": null,
+    "needCount": null,
+    "orderNumber": null,
+    "columnKey": null,
+    "is_search": null,
+    "default_query_parameters": null,
+    "groupName": null,
+    "nameLength": null,
+    "value": "2024-06-10T06:51:17",
+    index: 11
+  }
+]

+ 100 - 0
src/views/newBagDetails/mix/tableCols.js

@@ -0,0 +1,100 @@
+/*
+ * @Author: Badguy
+ * @Date: 2022-03-04 11:50:22
+ * @LastEditTime: 2022-03-15 17:56:34
+ * @LastEditors: your name
+ * @Description: 航站视图表格通用部分
+ * have a nice day!
+ */
+
+export default {
+  data () {
+    return {
+      // 筛选后表头
+      tableColsCopy: [],
+      // 列设置弹框选中
+      checkedKeys: [],
+      checkedKeysTemp: [],
+      halfCheckedKeys: [],
+      // 列设置弹框开关
+      dialogFlag: false
+    }
+  },
+  // created () {
+  //   this.initTableCols()
+  // },
+  updated () {
+    // table数据更新
+    this.$nextTick(() => {
+      this.$refs.table?.doLayout()
+    })
+  },
+  computed: {
+    colsCheckClass () {
+      return this.tableCols.some(col => col.children?.length) ? 'has-children' : 'no-children'
+    }
+  },
+  methods: {
+    // 列设置-初始化
+    initTableCols () {
+      const that = this
+      function setTableCols (cols) {
+        for (const col of cols) {
+          col.index = that.checkedKeys.length
+          that.checkedKeys.push(that.checkedKeys.length)
+          if (col.children?.length) {
+            setTableCols(col.children)
+          }
+        }
+      }
+      setTableCols(this.tableCols)
+      // this.tableColsCopy = this._.cloneDeep(this.tableCols)
+      this.checkedKeysTemp = [...this.checkedKeys]
+    },
+    // 列设置-确定
+    handleCheck (data, checked) {
+      this.checkedKeysTemp = [...checked.checkedKeys]
+      this.halfCheckedKeys = [...checked.halfCheckedKeys]
+    },
+    onCheck (tableDataName = 'tableData') {
+      if (this.dialogFlag === false) {
+        return
+      }
+      this.loading = true
+      const tableDataTemp = this._.cloneDeep(this[tableDataName])
+      this[tableDataName] = []
+      this.dialogFlag = false
+      this.checkedKeys = [...this.checkedKeysTemp]
+      const datas = this.colsFilter(this._.cloneDeep(this.tableCols))
+      const newTableColsCopy = datas.filter((item) => item.needShow)
+      this.tableColsCopy = _.cloneDeep(newTableColsCopy)
+      setTimeout(() => {
+        if (!this[tableDataName].length) {
+          this[tableDataName] = tableDataTemp
+        }
+        this.loading = false
+      }, 50)
+    },
+    colsFilter (cols) {
+      const temp = cols.filter(col => {
+        if (this.halfCheckedKeys.includes(col.index)) {
+          col.children = this.colsFilter(col.children)
+          return true
+        } else if (this.checkedKeys.includes(col.index)) {
+          return true
+        }
+        return false
+      })
+      return temp
+    },
+    // 弹框展开
+    show () {
+      this.dialogFlag = true
+    },
+    // 弹框关闭
+    hide () {
+      this.dialogFlag = false
+      this.checkedKeysTemp = [...this.checkedKeys]
+    }
+  }
+}

+ 10 - 2
src/views/newFlightView/index.vue

@@ -325,8 +325,9 @@ export default {
     const sts = await this.getViewInfo({ carrierFlights, carrierFlightsDate })
     if (sts && sts.length) {
       for (const p of sts) {
-        const { outAirport, landAirport } = p
+        const { outAirport, landAirport, abnormalState } = p
         this.deArrs.push({
+          abnormalState,
           outAirport,
           landAirport
         })
@@ -335,6 +336,7 @@ export default {
     const newDatas = _.cloneDeep(this.deArrs)
     if (newDatas && newDatas.length) {
       const m = combine(newDatas, 'outAirport', 'landAirport')
+      const newMd = []
       m.forEach((item, index) => {
         checkDatas.push(`${m[index]}-${m[index + 1]}`)
         const obj = {
@@ -342,8 +344,14 @@ export default {
           index
         }
         this.deArrsNum.push(obj)
+        newMd.push({
+          name: item,
+          value: this.deArrs[index].abnormalState
+        })
       })
-      this.checkStates = m
+      newMd[0].value = null
+      newMd[newMd.length - 1].value = null
+      this.checkStates = newMd
       const [a1, a2] = [m[0], m[m.length - 1]]
       const { outAirport, landAirport } = this.infoObj
       if (a1 == outAirport && a2 == landAirport) {

+ 8 - 4
src/views/newFlightView/item.vue

@@ -1,8 +1,9 @@
 <template>
   <div class="item">
-    {{item}}
+    {{item.name}}
+    <span class="bglb" v-if="item.value == 'ALT'">(备)</span>
     <template v-if="total.length != index">
-      -<el-checkbox :label="item+'-'+total[index]" />-
+      -<el-checkbox :label="item.name+'-'+total[index].name" />-
     </template>
   </div>
 </template>
@@ -11,8 +12,8 @@
 export default {
   props: {
     item: {
-      type: String,
-      default: ''
+      type: Object,
+      default: () => { }
     },
     total: {
       type: Array,
@@ -32,5 +33,8 @@ export default {
   .el-checkbox {
     margin-right: 0;
   }
+  .bglb {
+    color: red;
+  }
 }
 </style>

+ 87 - 2
src/views/newQuery/components/table.vue

@@ -67,6 +67,30 @@
         </div>
       </div>
     </Dialog>
+    <Dialog :flag="storyFlag" width="600px" class="dialog-check-group">
+      <div class="dialog-wrapper">
+        <div class="title">备注</div>
+        <div style="padding:0 20px 20px 20px;" class="table">
+          <el-table height="250" :data="storyTable" border style="width: 100%">
+            <el-table-column prop="luggageDescribe" label="行李服务记录">
+            </el-table-column>
+            <el-table-column prop="createtime" label="行李服务时间">
+            </el-table-column>
+          </el-table>
+        </div>
+        <div class="content">
+          <el-form ref="form" :model="form" label-width="70px">
+            <el-form-item label="输入备注">
+              <el-input type="textarea" clearable v-model="form.desc"></el-input>
+            </el-form-item>
+          </el-form>
+        </div>
+        <div class="foot right t30">
+          <el-button size="medium" class="r24" type="primary" @click="onStoryCheck">确定</el-button>
+          <el-button size="medium" @click="storyFlag = false">取消</el-button>
+        </div>
+      </div>
+    </Dialog>
   </div>
 </template>
 
@@ -74,8 +98,9 @@
 import pf from '@/layout/mixin/publicFunc'
 import { getToken } from '@/utils/auth'
 import { getAuthData, formatOrder } from '@/utils/validate'
+import { parseTime } from '@/utils'
 import { exportToExcel } from '@/utils/table'
-import { modifyData } from '@/api/webApi'
+import { Query, newData, modifyData } from '@/api/webApi'
 import tableColsMixin from '../mix/tableCols'
 import Dialog from '@/layout/components/Dialog/index.vue'
 import TableHeaderCell from '@/components/TableHeaderCell/index.vue'
@@ -164,6 +189,8 @@ export default {
       checkPath: ['/newDeparture', '/newTransfer/in', '/newTransfer/out', '/newArrival'],
       hasSetTableScroll: false,
       reamkeFlag: false,
+      storyFlag: false,
+      storyTable: [],
       reamkeMap: {},
       form: {
         desc: ''
@@ -873,7 +900,12 @@ export default {
       const { property } = column
       const path = this.$route.path
       const newPath = (path.endsWith('/in') || path.endsWith('/out') || path.endsWith('/newQueryAdvance') || path.endsWith('/newBagDetails')) ? true : false
-      if (newPath && (property == 'remarks' || property == 'luggage_describe')) {
+      if (newPath && property == 'luggage_describe') {
+        this.storyFlag = true
+        this.reamkeMap = row
+        this.queryStoryCheck(row)
+      }
+      if (newPath && property == 'remarks') {
         if (property == 'remarks') {
           this.form.desc = row.remarks || ''
         } else if (property == 'luggage_describe') {
@@ -883,6 +915,59 @@ export default {
         this.reamkeMap = row
       }
     },
+    async queryStoryCheck (row) {
+      this.storyTable = []
+      const { ID, luggage_describe } = row
+      const params = {
+        serviceId: SERVICE_ID.advancedStoryId,
+        dataContent: {
+          luggageID: ID,
+        },
+        event: '0'
+      }
+      const { code, returnData } = await Query(params)
+      if (code == 0 && returnData?.length) {
+        const ndatas = [...returnData]
+        ndatas.forEach(item => item.createtime = parseTime(item.createtime.replace('T', ' '), '{y}-{m}-{d} {h}:{i}:{s}'))
+        this.storyTable = ndatas
+      }
+    },
+    async onStoryCheck () {
+      const { ID, luggage_describe } = this.reamkeMap
+      const params = {
+        serviceId: SERVICE_ID.advancedStoryId,
+        dataContent: {
+          luggageID: ID,
+          luggageDescribe: this.form.desc,
+          user_id: getToken('userid')
+        },
+        event: '1'
+      }
+      const parmasts = {
+        "serviceId": SERVICE_ID.advancedRemakesId,
+        "page": 1,
+        "pageSize": 10,
+        "dataContent": {
+          "ID": ID,
+          "luggage_describe": "..."
+        },
+        "event": "2"
+      }
+      await modifyData(parmasts)
+      const { code } = await newData(params)
+      if (code == 0) {
+        const item = {
+          luggageDescribe: this.form.desc,
+          createtime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}')
+        }
+        this.storyTable.push(item)
+        this.$message.success('操作成功')
+        this.form.desc = ''
+        this.restTable()
+        this.load()
+      }
+      else this.$message.success('操作失败')
+    },
     // 表格-备注-单元格点击-弹框确定
     onReamkeCheck () {
       const path = this.$route.path