Эх сурвалжийг харах

Merge branch 'dev' into dev_zyh

zhouyuhao 1 жил өмнө
parent
commit
1424d16431

+ 0 - 4
src/components/MoreFilters/src/MoreFilters.vue

@@ -542,24 +542,20 @@ const ServiceCheckAll = ref(false)
 const IncotermsList = ref([
   {
     name: 'FOB',
-    number: 2229,
     checked: false
   },
   {
     name: 'CIF',
-    number: 1000,
     checked: false
   }
 ])
 const SeiviceList = ref([
   {
     name: 'FOB',
-    number: 2229,
     checked: false
   },
   {
     name: 'CIF',
-    number: 1000,
     checked: false
   }
 ])

+ 0 - 12
src/components/MoreFilters/src/components/SelectValue.vue

@@ -4,7 +4,6 @@ import type { DropdownInstance } from 'element-plus'
 
 interface ListItem {
   name: string
-  number: number
   checked: boolean
 }
 interface Props {
@@ -41,15 +40,6 @@ watch(
 
 const dropdown1 = ref<DropdownInstance>()
 let checkedCount: any[] = []
-const TotalAll = computed(() => {
-  var total_sum = 0
-  if (TransportList.value != undefined) {
-    TransportList.value.map((item) => {
-      total_sum += item.number
-    })
-  }
-  return total_sum
-})
 
 const handleCheckAllChange = (val: any) => {
   checkedCount = []
@@ -135,7 +125,6 @@ const TransportSearch = (visible: any) => {
             <el-dropdown-item>
               <el-checkbox v-model="checkAll" class="checkbox" @change="handleCheckAllChange">
                 <div class="checkbox_title">Select All</div>
-                <div class="checkbox_number">({{ TotalAll }})</div>
               </el-checkbox>
             </el-dropdown-item>
             <el-divider></el-divider>
@@ -149,7 +138,6 @@ const TransportSearch = (visible: any) => {
                 <div class="checkbox_title">
                   {{ item.name }}
                 </div>
-                <div class="checkbox_number">({{ item.number }})</div>
               </el-checkbox>
             </el-dropdown-item>
             <div class="transport_bottom">

+ 11 - 3
src/views/Booking/src/components/BookingTable/src/BookingTable.vue

@@ -134,9 +134,17 @@ const searchTableData = (data: any) => {
     })
     .then((res: any) => {
       if (res.code === 200) {
-        bookingTable.value.data = res.data.searchData
-        pageInfo.value.total = Number(res.data.rc)
-        tableLoading.value = false
+        // 跳转detail页面
+        if (res.data.searchData.length == 1) {
+          router.push({
+            path: '/booking/detail',
+            query: { a: res.data.searchData.__serial_no, _schemas: res.data.searchData.__schemas }
+          })
+        } else {
+          bookingTable.value.data = res.data.searchData
+          pageInfo.value.total = Number(res.data.rc)
+          tableLoading.value = false
+        }
       }
     })
 }

+ 13 - 7
src/views/Dashboard/src/DashboardView.vue

@@ -61,13 +61,13 @@ const handleTabClick = (tab: any) => {
 }
 // 获取首页数据
 let dashboardObj: any = {}
-const GetDashboardData = (value: any, is_customer: any) => {
+const GetDashboardData = (value: any, is_default: any) => {
   $api
     .GetDashboardData({
       cp: pageInfo.value.pageNo,
       ps: pageInfo.value.pageSize,
       rc: -1,
-      is_customer: is_customer,
+      is_default: is_default,
       ...value
     })
     .then((res: any) => {
@@ -80,18 +80,18 @@ const GetDashboardData = (value: any, is_customer: any) => {
 }
 // 获取表单数据
 const getTableData = () => {
-  let is_customer: any = ''
+  let is_default: any = ''
   if (Object.keys(dashboardObj).length === 0) {
-    is_customer = 'yes'
+    is_default = 'yes'
   } else {
-    is_customer = 'no'
+    is_default = 'no'
   }
   $api
     .GetDashboardData({
       cp: pageInfo.value.pageNo,
       ps: pageInfo.value.pageSize,
       rc: pageInfo.value.total,
-      is_customer: is_customer,
+      is_default: is_default,
       ...dashboardObj
     })
     .then((res: any) => {
@@ -303,6 +303,7 @@ let container_type: any = {
 const changeType = (val: any) => {
   container_type.container_type = val
   GetContainerCountEcharts(container_type)
+  GetDashboardData(dashboardObj, 'no')
 }
 
 // Save Layout
@@ -327,6 +328,11 @@ const SaveLayout = () => {
 const SaveFilters = () => {
   SaveVisible.value = false
 }
+//输入框失焦时查询数据
+const SearchCustomer = () => {
+  dashboardObj.customer = BookingSearch.value
+  GetDashboardData(dashboardObj, 'no')
+}
 </script>
 <template>
   <div class="dashboard">
@@ -426,7 +432,7 @@ const SaveFilters = () => {
         </div>
       </div>
       <div class="filters_right">
-        <el-input placeholder="Customer" v-model="BookingSearch">
+        <el-input placeholder="Customer" v-model="BookingSearch" @blur="SearchCustomer">
           <template #prefix>
             <span class="iconfont_icon">
               <svg class="iconfont" aria-hidden="true">

+ 3 - 0
src/views/Tracking/src/TrackingView.vue

@@ -7,6 +7,9 @@ import DateRange from '@/components/DateRange'
 import MoreFilters from '@/components/MoreFilters'
 import { ref, reactive, onMounted } from 'vue'
 import { useCalculatingHeight } from '@/hooks/calculatingHeight'
+import { useRouter } from 'vue-router'
+
+const router = useRouter()
 
 const filterRef: Ref<HTMLElement | null> = ref(null)
 // const containerHeight: any = ref(0)

+ 11 - 3
src/views/Tracking/src/components/TrackingTable/src/TrackingTable.vue

@@ -135,9 +135,17 @@ const searchTableData = (data: any) => {
     })
     .then((res: any) => {
       if (res.code === 200) {
-        trackingTable.value.data = res.data.searchData
-        pageInfo.value.total = Number(res.data.rc)
-        tableLoading.value = false
+        // 跳转detail页面
+        if (res.data.searchData.length == 1) {
+          router.push({
+            path: '/tracking/detail',
+            query: { a: res.data.searchData.__serial_no, _schemas: res.data.searchData.__schemas }
+          })
+        } else {
+          trackingTable.value.data = res.data.searchData
+          pageInfo.value.total = Number(res.data.rc)
+          tableLoading.value = false
+        }
       }
     })
 }