Kaynağa Gözat

Merge branch 'dev' into dev_zyh

zhouyuhao 1 yıl önce
ebeveyn
işleme
260fecba84

+ 1 - 2
src/auto-imports.d.ts

@@ -3,7 +3,6 @@
 // @ts-nocheck
 // noinspection JSUnusedGlobalSymbols
 // Generated by unplugin-auto-import
-// biome-ignore lint: disable
 export {}
 declare global {
   const $api: typeof import('@/api/index')['default']
@@ -69,6 +68,6 @@ declare global {
 // for type re-export
 declare global {
   // @ts-ignore
-  export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
+  export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
   import('vue')
 }

+ 25 - 23
src/components/MoreFilters/src/MoreFilters.vue

@@ -675,8 +675,20 @@ countG.value = []
 
 const changeAll = (value: any, countTotal: any, BadegTotal: any) => {
   for (let key in value) {
-    if (value[key] != '') {
-      countTotal.push(value[key])
+    if (key == 'Incoterms') {
+      if (value[key] != 'Please Select Date Range' && value[key] != '') {
+        countTotal.push(value[key])
+      }
+    }
+    if (key == 'Service') {
+      if (value[key] != 'Please Select Date Range' && value[key] != '') {
+        countTotal.push(value[key])
+      }
+    }
+    if (key != 'Service' && key != 'Incoterms') {
+      if (value[key] != '') {
+        countTotal.push(value[key])
+      }
     }
   }
   if (countTotal.length == 0) {
@@ -967,26 +979,8 @@ const clearMoreFiltersObj = () => {
 }
 const IncotermsCheckAll = ref(false)
 const ServiceCheckAll = ref(false)
-const IncotermsList = ref([
-  {
-    name: 'FOB',
-    checked: false
-  },
-  {
-    name: 'CIF',
-    checked: false
-  }
-])
-const SeiviceList = ref([
-  {
-    name: 'FOB',
-    checked: false
-  },
-  {
-    name: 'CIF',
-    checked: false
-  }
-])
+const IncotermsList = ref()
+const SeiviceList = ref()
 const IncotermsSearch = (val: any, value: any) => {
   InputForm.value.General.Incoterms = val.data
   MoreFiltersObj[val.title] = val.data
@@ -997,10 +991,18 @@ const ServiceSearch = (val: any, value: any) => {
   MoreFiltersObj[val.title] = val.data
   MoreFiltersObj2[val.title] = value
 }
+const clickmorefilters = () => {
+  drawer.value = true
+  const incotermsList = JSON.parse(sessionStorage.getItem('incotermsList') as string) || {}
+  if (incotermsList) {
+    IncotermsList.value = incotermsList.IncotermsList
+    SeiviceList.value = incotermsList.ServiceList
+  }
+}
 </script>
 <template>
   <div>
-    <el-button class="More_Filters el-button--grey" @click="drawer = true">
+    <el-button class="More_Filters el-button--grey" @click="clickmorefilters">
       <span class="iconfont_icon icon_more">
         <svg class="iconfont" aria-hidden="true">
           <use xlink:href="#icon-icon_filter_b"></use>

+ 60 - 13
src/components/MoreFilters/src/components/SelectValue.vue

@@ -102,11 +102,21 @@ const TransportSearch = (visible: any) => {
   } else {
     dropdown1.value.handleOpen()
   }
+  checkedCount = []
+}
+const seeall = ref(false)
+const clickSeeAll = () => {
+  seeall.value = !seeall.value
 }
 </script>
 <template>
   <div class="select">
-    <el-dropdown ref="dropdown1" trigger="click" :hide-on-click="false">
+    <el-dropdown
+      ref="dropdown1"
+      trigger="click"
+      :hide-on-click="false"
+      :disabled="TransportList.length == 0"
+    >
       <div class="el-dropdown-link">
         <div v-if="Serval == 'Please Select Date Range' || Serval == ''" class="select_title">
           Please Select Date Range
@@ -128,18 +138,28 @@ const TransportSearch = (visible: any) => {
               </el-checkbox>
             </el-dropdown-item>
             <el-divider></el-divider>
-            <el-dropdown-item v-for="(item, index) in TransportList" :key="index">
-              <el-checkbox
-                :value="item.name"
-                v-model="item.checked"
-                class="checkbox"
-                @change="handleCheckedTransportChange(item.name, item.checked, index)"
-              >
-                <div class="checkbox_title">
-                  {{ item.name }}
-                </div>
-              </el-checkbox>
-            </el-dropdown-item>
+            <div class="inval" :class="{ seeall: seeall }">
+              <el-dropdown-item v-for="(item, index) in TransportList" :key="index">
+                <el-checkbox
+                  :value="item.name"
+                  v-model="item.checked"
+                  class="checkbox"
+                  @change="handleCheckedTransportChange(item.name, item.checked, index)"
+                >
+                  <div class="checkbox_title">
+                    {{ item.name }}
+                  </div>
+                </el-checkbox>
+              </el-dropdown-item>
+            </div>
+            <div class="See_all" @click="clickSeeAll">
+              <span class="iconfont_icon iconfont_icon_text" :class="{ transformTotal: seeall }">
+                <svg class="iconfont" aria-hidden="true">
+                  <use xlink:href="#icon-icon_dropdown__line_b"></use>
+                </svg>
+              </span>
+              See All
+            </div>
             <div class="transport_bottom">
               <div>
                 <el-button class="clear" type="default" @click="clearList">Reset</el-button>
@@ -271,4 +291,31 @@ const TransportSearch = (visible: any) => {
   margin: 8px 0;
   border-top-color: var(--color-border);
 }
+.See_all {
+  width: 60px;
+  height: 24px;
+  border-radius: 3px;
+  color: var(--color-theme);
+  margin: 0 16px;
+  cursor: pointer;
+  display: flex;
+  align-items: center;
+}
+.See_all:hover {
+  background-color: var(--color-btn-default-bg-hover);
+}
+.iconfont_icon_text {
+  margin-right: 2px;
+  fill: var(--color-theme);
+}
+.transformTotal {
+  transform: rotate(-180deg);
+}
+.inval {
+  max-height: 100px;
+  overflow-y: clip;
+}
+.seeall {
+  max-height: fit-content;
+}
 </style>

+ 0 - 1
src/components/SelectTableSelect/src/SelectTableSelect.vue

@@ -6,7 +6,6 @@ import SelectTable from '@/components/SelectTable'
 interface TypeItem {
   placesType: ''
   placesname: []
-  isshowVerfication: boolean
 }
 interface dateoptions {
   value: string

+ 1 - 0
src/components/TransportMode/src/TransportMode.vue

@@ -79,6 +79,7 @@ const handleCheckedTransportChange = (value: any, checked: any, index: any) => {
 // 清除选中
 const clearList = () => {
   checkAll.value = false
+  console.log(TransportList.value)
   TransportList.value.forEach((item: any) => {
     item.checked = false
   })

+ 11 - 3
src/components/selectAutoSelect/src/selectAutoSelect.vue

@@ -1,11 +1,9 @@
 <script setup lang="ts">
-import { ref, watch, computed } from 'vue'
+import { ref, watch } from 'vue'
 import IconDropDown from '@/components/IconDropDown'
-import { isLength } from 'lodash'
 interface TypeItem {
   partyType: ''
   partyname: []
-  isshowVerfication: boolean
 }
 interface ListItem {
   value: string
@@ -33,6 +31,16 @@ const options = ref<ListItem[]>([])
 const loading = ref(false)
 const props = withDefaults(defineProps<Props>(), {})
 const AddType = ref(props.AddDateType)
+watch(
+  () => props.AddDateType,
+  (val) => {
+    AddType.value = val
+  },
+  {
+    immediate: true,
+    deep: true
+  }
+)
 // const ErrorNumber = ref(0)
 const dataTypeoptions = ref<optionsItem[]>([])
 const typeSelectIndex = ref(-1)

+ 43 - 4
src/views/Tracking/src/TrackingView.vue

@@ -157,6 +157,9 @@ const defaultDate = (val: any, value: any, data: any) => {
     }
   } else {
     searchTableQeuryTracking = data
+    if (searchTableQeuryTracking._textSearch) {
+      TrackingSearch.value = searchTableQeuryTracking._textSearch
+    }
   }
   const trackingData = JSON.parse(localStorage.getItem('searchData'))
   if (trackingData) {
@@ -397,9 +400,43 @@ const initDataByHeaderSearch = () => {
     TrackingTable_ref.value.getSharedTableData()
     // 更新tagsList和TransportList
     TransportListItem.value = data.trackingData.TransportList
+    IncotermsList.value = data.trackingData.IncotermsList
+    ServiceList.value = data.trackingData.ServiceList
     TagsList.value = data.trackingData.tagsList
-
     headerSearch.clearSearchData()
+    tagsData.value = []
+    filterData.transportData = []
+    filterData.daterangeData = []
+    filterData.morefiltersData = []
+    filterData.dashboardData = []
+    searchTableQeuryTracking = {}
+    sessionStorage.removeItem('searchTableQeuryTracking')
+    searchTableQeuryTracking._textSearch = TrackingSearch.value
+    sessionStorage.setItem('searchTableQeuryTracking', JSON.stringify(searchTableQeuryTracking))
+    setTimeout(() => {
+      emitter.emit('clearTag', 'Transport Mode')
+      emitter.emit('clearTag', 'ETD')
+      emitter.emit('clearTag', 'ETA')
+      emitter.emit('clearTag', 'Creation Time')
+      emitter.emit('clearTag', 'Shippername')
+      emitter.emit('clearTag', 'Consigneename')
+      emitter.emit('clearTag', 'Service')
+      emitter.emit('clearTag', 'Incoterms')
+      emitter.emit('clearTag', 'Notify Party')
+      emitter.emit('clearTag', 'Bill to')
+      emitter.emit('clearTag', 'Origin Agent')
+      emitter.emit('clearTag', 'Destination Agent')
+      emitter.emit('clearTag', 'Destination Operator')
+      emitter.emit('clearTag', 'Sales')
+      emitter.emit('clearTag', 'Origin')
+      emitter.emit('clearTag', 'Destination')
+      emitter.emit('clearTag', 'Place of Receipt')
+      emitter.emit('clearTag', 'Port of Loading')
+      emitter.emit('clearTag', 'Place of delivery')
+      emitter.emit('clearTag', 'Port of Discharge')
+      emitter.emit('clearTag', 'Vessel')
+      emitter.emit('clearTag', 'Voyage')
+    }, 2000)
   }
 }
 
@@ -438,6 +475,11 @@ const Gettrackingdata = () => {
       if (res.code === 200) {
         TransportListItem.value = res.data.TransportList
         TagsList.value = res.data.tagsList
+        let obj = {
+          IncotermsList: res.data.IncotermsList,
+          ServiceList: res.data.ServiceList
+        }
+        sessionStorage.setItem('incotermsList', JSON.stringify(obj))
       }
     })
 }
@@ -451,9 +493,6 @@ onMounted(() => {
     }
     const data = JSON.parse(sessionStorage.getItem('tagsList') as string) || {}
     const reportlist = JSON.parse(sessionStorage.getItem('reportList') as string) || {}
-    // const trasnport = JSON.parse(sessionStorage.getItem('clickParams') as string) || {}
-    // TransportListItem.value = trasnport.TransportList
-    // TagsList.value = trasnport.tagsList
     for (const key in reportlist) {
       searchTableQeuryTracking[key] = reportlist[key]
     }