|
@@ -16,7 +16,7 @@ const filterRef: Ref<HTMLElement | null> = ref(null)
|
|
|
const containerHeight = useCalculatingHeight(document.documentElement, 246, [filterRef])
|
|
const containerHeight = useCalculatingHeight(document.documentElement, 246, [filterRef])
|
|
|
|
|
|
|
|
const TrackingSearch = ref()
|
|
const TrackingSearch = ref()
|
|
|
-let searchTableQeury: any = {}
|
|
|
|
|
|
|
+let searchTableQeuryTracking: any = {}
|
|
|
const filterData = reactive({
|
|
const filterData = reactive({
|
|
|
transportData: [] as Array<string>,
|
|
transportData: [] as Array<string>,
|
|
|
daterangeData: [] as Array<string>,
|
|
daterangeData: [] as Array<string>,
|
|
@@ -28,67 +28,79 @@ const handleClose = (tag: any) => {
|
|
|
emitter.emit('clearTag', tag)
|
|
emitter.emit('clearTag', tag)
|
|
|
tagsData.value.splice(tagsData.value.indexOf(tag), 1)
|
|
tagsData.value.splice(tagsData.value.indexOf(tag), 1)
|
|
|
if (tag.includes('Transport')) {
|
|
if (tag.includes('Transport')) {
|
|
|
- delete searchTableQeury.transport_mode
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.transport_mode
|
|
|
} else if (tag.includes('ETD')) {
|
|
} else if (tag.includes('ETD')) {
|
|
|
- delete searchTableQeury.etd_start
|
|
|
|
|
- delete searchTableQeury.etd_end
|
|
|
|
|
|
|
+ filterData.daterangeData.forEach((item: any, index: any) => {
|
|
|
|
|
+ if (item.includes('ETD')) {
|
|
|
|
|
+ filterData.daterangeData.splice(index, 1)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ delete searchTableQeuryTracking.etd_start
|
|
|
|
|
+ delete searchTableQeuryTracking.etd_end
|
|
|
} else if (tag.includes('ETA')) {
|
|
} else if (tag.includes('ETA')) {
|
|
|
- delete searchTableQeury.eta_start
|
|
|
|
|
- delete searchTableQeury.eta_end
|
|
|
|
|
|
|
+ filterData.daterangeData.forEach((item: any, index: any) => {
|
|
|
|
|
+ if (item.includes('ETA')) {
|
|
|
|
|
+ filterData.daterangeData.splice(index, 1)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ delete searchTableQeuryTracking.eta_start
|
|
|
|
|
+ delete searchTableQeuryTracking.eta_end
|
|
|
} else if (tag.includes('Creation')) {
|
|
} else if (tag.includes('Creation')) {
|
|
|
- delete searchTableQeury.created_time_start
|
|
|
|
|
- delete searchTableQeury.created_time_end
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.created_time_start
|
|
|
|
|
+ delete searchTableQeuryTracking.created_time_end
|
|
|
} else if (tag.includes('Shippername')) {
|
|
} else if (tag.includes('Shippername')) {
|
|
|
- delete searchTableQeury.shipper
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.shipper
|
|
|
} else if (tag.includes('Consigneename')) {
|
|
} else if (tag.includes('Consigneename')) {
|
|
|
- delete searchTableQeury.consignee
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.consignee
|
|
|
} else if (tag.includes('Service')) {
|
|
} else if (tag.includes('Service')) {
|
|
|
- delete searchTableQeury.service
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.service
|
|
|
} else if (tag.includes('Incoterms')) {
|
|
} else if (tag.includes('Incoterms')) {
|
|
|
- delete searchTableQeury.incoterms
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.incoterms
|
|
|
} else if (tag.includes('Notify Party')) {
|
|
} else if (tag.includes('Notify Party')) {
|
|
|
- delete searchTableQeury.notify_party
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.notify_party
|
|
|
} else if (tag.includes('Bill to')) {
|
|
} else if (tag.includes('Bill to')) {
|
|
|
- delete searchTableQeury.billto
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.billto
|
|
|
} else if (tag.includes('Origin Agent')) {
|
|
} else if (tag.includes('Origin Agent')) {
|
|
|
- delete searchTableQeury.origin
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.origin
|
|
|
} else if (tag.includes('Destination Agent')) {
|
|
} else if (tag.includes('Destination Agent')) {
|
|
|
- delete searchTableQeury.agent
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.agent
|
|
|
} else if (tag.includes('Destination Operator')) {
|
|
} else if (tag.includes('Destination Operator')) {
|
|
|
- delete searchTableQeury.dest_op
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.dest_op
|
|
|
} else if (tag.includes('Sales')) {
|
|
} else if (tag.includes('Sales')) {
|
|
|
- delete searchTableQeury.sales_rep
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.sales_rep
|
|
|
} else if (tag.includes('Origin')) {
|
|
} else if (tag.includes('Origin')) {
|
|
|
- delete searchTableQeury['shipper_city/consignee_city']
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking['shipper_city/consignee_city']
|
|
|
} else if (tag.includes('Destination')) {
|
|
} else if (tag.includes('Destination')) {
|
|
|
- delete searchTableQeury.final_desination
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.final_desination
|
|
|
} else if (tag.includes('Place of Receipt')) {
|
|
} else if (tag.includes('Place of Receipt')) {
|
|
|
- delete searchTableQeury.place_of_receipt_exp
|
|
|
|
|
- } else if (tag.includes('Place of Loading')) {
|
|
|
|
|
- delete searchTableQeury.port_of_loading
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.place_of_receipt_exp
|
|
|
|
|
+ } else if (tag.includes('Port of Loading')) {
|
|
|
|
|
+ delete searchTableQeuryTracking.port_of_loading
|
|
|
} else if (tag.includes('Place of delivery')) {
|
|
} else if (tag.includes('Place of delivery')) {
|
|
|
- delete searchTableQeury.place_of_delivery_exp
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.place_of_delivery_exp
|
|
|
} else if (tag.includes('Place of Discharge')) {
|
|
} else if (tag.includes('Place of Discharge')) {
|
|
|
- delete searchTableQeury.port_of_discharge
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.port_of_discharge
|
|
|
} else if (tag.includes('Vessel')) {
|
|
} else if (tag.includes('Vessel')) {
|
|
|
- delete searchTableQeury['f_vessel/vessel']
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking['f_vessel/vessel']
|
|
|
} else if (tag.includes('Voyage')) {
|
|
} else if (tag.includes('Voyage')) {
|
|
|
- delete searchTableQeury['f_voyage/voyage']
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking['f_voyage/voyage']
|
|
|
} else {
|
|
} else {
|
|
|
- delete searchTableQeury._reportRef
|
|
|
|
|
- delete searchTableQeury._reportRefe_date
|
|
|
|
|
- delete searchTableQeury._reportRefb_date
|
|
|
|
|
- delete searchTableQeury._reportStationType
|
|
|
|
|
- delete searchTableQeury._reportDataType
|
|
|
|
|
- delete searchTableQeury._reportStationType
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking._reportRef
|
|
|
|
|
+ delete searchTableQeuryTracking._reportRefe_date
|
|
|
|
|
+ delete searchTableQeuryTracking._reportRefb_date
|
|
|
|
|
+ delete searchTableQeuryTracking._reportStationType
|
|
|
|
|
+ delete searchTableQeuryTracking._reportDataType
|
|
|
|
|
+ delete searchTableQeuryTracking._reportStationType
|
|
|
}
|
|
}
|
|
|
- TrackingTable_ref.value.searchTableData(searchTableQeury)
|
|
|
|
|
|
|
+ TrackingTable_ref.value.searchTableData(searchTableQeuryTracking)
|
|
|
|
|
+ sessionStorage.setItem('searchTableQeuryTracking', JSON.stringify(searchTableQeuryTracking))
|
|
|
Gettrackingdata()
|
|
Gettrackingdata()
|
|
|
}
|
|
}
|
|
|
// 筛选框查询
|
|
// 筛选框查询
|
|
|
const FiltersSeach = (val: any, value: any) => {
|
|
const FiltersSeach = (val: any, value: any) => {
|
|
|
- searchTableQeury[val] = value
|
|
|
|
|
- TrackingTable_ref.value.searchTableData(searchTableQeury)
|
|
|
|
|
|
|
+ searchTableQeuryTracking[val] = value
|
|
|
|
|
+ TrackingTable_ref.value.searchTableData(searchTableQeuryTracking)
|
|
|
|
|
+ sessionStorage.setItem('searchTableQeuryTracking', JSON.stringify(searchTableQeuryTracking))
|
|
|
Gettrackingdata()
|
|
Gettrackingdata()
|
|
|
}
|
|
}
|
|
|
//TransportSearch
|
|
//TransportSearch
|
|
@@ -102,99 +114,207 @@ const TransportSearch = (val: any) => {
|
|
|
renderTagsData()
|
|
renderTagsData()
|
|
|
}
|
|
}
|
|
|
// defaultTransport
|
|
// defaultTransport
|
|
|
-const defaultTransport = (val: any) => {
|
|
|
|
|
- if (
|
|
|
|
|
- sessionStorage.getItem('clickParams') === null ||
|
|
|
|
|
- sessionStorage.getItem('clickParams') === ''
|
|
|
|
|
- ) {
|
|
|
|
|
- filterData.transportData = []
|
|
|
|
|
- if (val.data) {
|
|
|
|
|
- let str = `${val.title}:${val.data}`
|
|
|
|
|
- filterData.transportData.push(str)
|
|
|
|
|
|
|
+const defaultTransport = (val: any, value: any) => {
|
|
|
|
|
+ filterData.transportData = []
|
|
|
|
|
+ if (val.data) {
|
|
|
|
|
+ let str = `${val.title}:${val.data}`
|
|
|
|
|
+ filterData.transportData.push(str)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (sessionStorage.getItem('searchTableQeuryTracking') == null) {
|
|
|
|
|
+ if (
|
|
|
|
|
+ sessionStorage.getItem('clickParams') === null ||
|
|
|
|
|
+ sessionStorage.getItem('clickParams') === '{}'
|
|
|
|
|
+ ) {
|
|
|
|
|
+ searchTableQeuryTracking.transport_mode = val.data
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ searchTableQeuryTracking = value
|
|
|
|
|
+ }
|
|
|
|
|
+ renderTagsData()
|
|
|
|
|
+}
|
|
|
|
|
+//defaultDate
|
|
|
|
|
+const defaultDate = (val: any, value: any, data: any) => {
|
|
|
|
|
+ filterData.daterangeData = []
|
|
|
|
|
+ if (Object.keys(val).length) {
|
|
|
|
|
+ for (const key in val) {
|
|
|
|
|
+ let str = `${key}:${val[key]}`
|
|
|
|
|
+ filterData.daterangeData.push(str)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (sessionStorage.getItem('searchTableQeuryTracking') == null) {
|
|
|
|
|
+ if (
|
|
|
|
|
+ sessionStorage.getItem('clickParams') === null ||
|
|
|
|
|
+ sessionStorage.getItem('clickParams') === '{}'
|
|
|
|
|
+ ) {
|
|
|
|
|
+ if (Object.keys(value).length == 0) {
|
|
|
|
|
+ delete searchTableQeuryTracking.etd_start
|
|
|
|
|
+ delete searchTableQeuryTracking.etd_end
|
|
|
|
|
+ }
|
|
|
|
|
+ for (const key in value) {
|
|
|
|
|
+ searchTableQeuryTracking.etd_start = value[key].data[0]
|
|
|
|
|
+ searchTableQeuryTracking.etd_end = value[key].data[1]
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- searchTableQeury.transport_mode = val.data
|
|
|
|
|
- renderTagsData()
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ searchTableQeuryTracking = data
|
|
|
}
|
|
}
|
|
|
|
|
+ TrackingTable_ref.value.searchTableData(searchTableQeuryTracking)
|
|
|
|
|
+ Gettrackingdata()
|
|
|
|
|
+ renderTagsData()
|
|
|
}
|
|
}
|
|
|
//DateRangeSearch
|
|
//DateRangeSearch
|
|
|
const DateRangeSearch = (val: any, value: any) => {
|
|
const DateRangeSearch = (val: any, value: any) => {
|
|
|
filterData.daterangeData = []
|
|
filterData.daterangeData = []
|
|
|
- for (const key in val) {
|
|
|
|
|
- let str = `${key}:${val[key]}`
|
|
|
|
|
- filterData.daterangeData.push(str)
|
|
|
|
|
|
|
+ if (Object.keys(val).length) {
|
|
|
|
|
+ for (const key in val) {
|
|
|
|
|
+ let str = `${key}:${val[key]}`
|
|
|
|
|
+ filterData.daterangeData.push(str)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if (Object.keys(value).length == 0) {
|
|
if (Object.keys(value).length == 0) {
|
|
|
- delete searchTableQeury.etd_start
|
|
|
|
|
- delete searchTableQeury.etd_end
|
|
|
|
|
- delete searchTableQeury.eta_start
|
|
|
|
|
- delete searchTableQeury.eta_end
|
|
|
|
|
- delete searchTableQeury.created_time_start
|
|
|
|
|
- delete searchTableQeury.created_time_end
|
|
|
|
|
|
|
+ delete searchTableQeuryTracking.etd_start
|
|
|
|
|
+ delete searchTableQeuryTracking.etd_end
|
|
|
|
|
+ delete searchTableQeuryTracking.eta_start
|
|
|
|
|
+ delete searchTableQeuryTracking.eta_end
|
|
|
|
|
+ delete searchTableQeuryTracking.created_time_start
|
|
|
|
|
+ delete searchTableQeuryTracking.created_time_end
|
|
|
}
|
|
}
|
|
|
for (const key in value) {
|
|
for (const key in value) {
|
|
|
if (key == 'ETD') {
|
|
if (key == 'ETD') {
|
|
|
- searchTableQeury.etd_start = value[key][0]
|
|
|
|
|
- searchTableQeury.etd_end = value[key][1]
|
|
|
|
|
|
|
+ searchTableQeuryTracking.etd_start = value[key].data[0]
|
|
|
|
|
+ searchTableQeuryTracking.etd_end = value[key].data[1]
|
|
|
} else if (key == 'ETA') {
|
|
} else if (key == 'ETA') {
|
|
|
- searchTableQeury.eta_start = value[key][0]
|
|
|
|
|
- searchTableQeury.eta_end = value[key][1]
|
|
|
|
|
|
|
+ searchTableQeuryTracking.eta_start = value[key].data[0]
|
|
|
|
|
+ searchTableQeuryTracking.eta_end = value[key].data[1]
|
|
|
} else {
|
|
} else {
|
|
|
- searchTableQeury.created_time_start = value[key][0]
|
|
|
|
|
- searchTableQeury.created_time_end = value[key][1]
|
|
|
|
|
|
|
+ searchTableQeuryTracking.created_time_start = value[key].data[0]
|
|
|
|
|
+ searchTableQeuryTracking.created_time_end = value[key].data[1]
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- TrackingTable_ref.value.searchTableData(searchTableQeury)
|
|
|
|
|
|
|
+ TrackingTable_ref.value.searchTableData(searchTableQeuryTracking)
|
|
|
|
|
+ sessionStorage.setItem('searchTableQeuryTracking', JSON.stringify(searchTableQeuryTracking))
|
|
|
Gettrackingdata()
|
|
Gettrackingdata()
|
|
|
renderTagsData()
|
|
renderTagsData()
|
|
|
}
|
|
}
|
|
|
//MoreFiltersSearch
|
|
//MoreFiltersSearch
|
|
|
const MoreFiltersSearch = (val: any, value: any) => {
|
|
const MoreFiltersSearch = (val: any, value: any) => {
|
|
|
filterData.morefiltersData = []
|
|
filterData.morefiltersData = []
|
|
|
|
|
+ if (Object.keys(value).length == 0) {
|
|
|
|
|
+ delete searchTableQeuryTracking.shipper
|
|
|
|
|
+ delete searchTableQeuryTracking.consignee
|
|
|
|
|
+ delete searchTableQeuryTracking.service
|
|
|
|
|
+ delete searchTableQeuryTracking.incoterms
|
|
|
|
|
+ delete searchTableQeuryTracking.notify_party
|
|
|
|
|
+ delete searchTableQeuryTracking.billto
|
|
|
|
|
+ delete searchTableQeuryTracking.origin
|
|
|
|
|
+ delete searchTableQeuryTracking.agent
|
|
|
|
|
+ delete searchTableQeuryTracking.sales_rep
|
|
|
|
|
+ delete searchTableQeuryTracking.dest_op
|
|
|
|
|
+ delete searchTableQeuryTracking.final_desination
|
|
|
|
|
+ delete searchTableQeuryTracking.place_of_receipt_exp
|
|
|
|
|
+ delete searchTableQeuryTracking.place_of_delivery_exp
|
|
|
|
|
+ delete searchTableQeuryTracking.port_of_discharge
|
|
|
|
|
+ delete searchTableQeuryTracking['shipper_city/consignee_city']
|
|
|
|
|
+ delete searchTableQeuryTracking['port_of_loading/fport_of_loading_un']
|
|
|
|
|
+ delete searchTableQeuryTracking['f_vessel/vessel']
|
|
|
|
|
+ delete searchTableQeuryTracking['f_voyage/voyage']
|
|
|
|
|
+ }
|
|
|
for (const key in val) {
|
|
for (const key in val) {
|
|
|
let str = `${key}:${val[key]}`
|
|
let str = `${key}:${val[key]}`
|
|
|
filterData.morefiltersData.push(str)
|
|
filterData.morefiltersData.push(str)
|
|
|
if (key == 'Shippername') {
|
|
if (key == 'Shippername') {
|
|
|
- searchTableQeury.shipper = value[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking.shipper = value[key]
|
|
|
} else if (key == 'Consigneename') {
|
|
} else if (key == 'Consigneename') {
|
|
|
- searchTableQeury.consignee = value[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking.consignee = value[key]
|
|
|
} else if (key == 'Service') {
|
|
} else if (key == 'Service') {
|
|
|
- searchTableQeury.service = value[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking.service = value[key]
|
|
|
} else if (key == 'Incoterms') {
|
|
} else if (key == 'Incoterms') {
|
|
|
- searchTableQeury.incoterms = value[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking.incoterms = value[key]
|
|
|
} else if (key == 'Notify Party') {
|
|
} else if (key == 'Notify Party') {
|
|
|
- searchTableQeury.notify_party = value[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking.notify_party = value[key]
|
|
|
} else if (key == 'Bill to') {
|
|
} else if (key == 'Bill to') {
|
|
|
- searchTableQeury.billto = value[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking.billto = value[key]
|
|
|
} else if (key == 'Origin Agent') {
|
|
} else if (key == 'Origin Agent') {
|
|
|
- searchTableQeury.origin = value[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking.origin = value[key]
|
|
|
} else if (key == 'Destination Agent') {
|
|
} else if (key == 'Destination Agent') {
|
|
|
- searchTableQeury.agent = value[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking.agent = value[key]
|
|
|
} else if (key == 'Destination Operator') {
|
|
} else if (key == 'Destination Operator') {
|
|
|
- searchTableQeury.dest_op = value[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking.dest_op = value[key]
|
|
|
} else if (key == 'Sales') {
|
|
} else if (key == 'Sales') {
|
|
|
- searchTableQeury.sales_rep = value[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking.sales_rep = value[key]
|
|
|
} else if (key == 'Destination') {
|
|
} else if (key == 'Destination') {
|
|
|
- searchTableQeury.final_desination = val[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking.final_desination = value[key]
|
|
|
} else if (key == 'Place of Receipt') {
|
|
} else if (key == 'Place of Receipt') {
|
|
|
- searchTableQeury.place_of_receipt_exp = val[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking.place_of_receipt_exp = value[key]
|
|
|
} else if (key == 'Origin') {
|
|
} else if (key == 'Origin') {
|
|
|
- searchTableQeury['shipper_city/consignee_city'] = val[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking['shipper_city/consignee_city'] = value[key]
|
|
|
} else if (key == 'Port of Loading') {
|
|
} else if (key == 'Port of Loading') {
|
|
|
- searchTableQeury.port_of_loading = val[key]
|
|
|
|
|
- } else if (key == 'Port of delivery') {
|
|
|
|
|
- searchTableQeury.place_of_delivery_exp = val[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking['port_of_loading/fport_of_loading_un'] = value[key]
|
|
|
|
|
+ } else if (key == 'Place of delivery') {
|
|
|
|
|
+ searchTableQeuryTracking.place_of_delivery_exp = value[key]
|
|
|
} else if (key == 'Port of Discharge') {
|
|
} else if (key == 'Port of Discharge') {
|
|
|
- searchTableQeury.port_of_discharge = val[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking.port_of_discharge = value[key]
|
|
|
} else if (key == 'Vessel') {
|
|
} else if (key == 'Vessel') {
|
|
|
- searchTableQeury['f_vessel/vessel'] = value[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking['f_vessel/vessel'] = value[key]
|
|
|
} else if (key == 'Voyage') {
|
|
} else if (key == 'Voyage') {
|
|
|
- searchTableQeury['f_voyage/voyage'] = value[key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking['f_voyage/voyage'] = value[key]
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- TrackingTable_ref.value.searchTableData(searchTableQeury)
|
|
|
|
|
|
|
+ TrackingTable_ref.value.searchTableData(searchTableQeuryTracking)
|
|
|
|
|
+ sessionStorage.setItem('searchTableQeuryTracking', JSON.stringify(searchTableQeuryTracking))
|
|
|
Gettrackingdata()
|
|
Gettrackingdata()
|
|
|
renderTagsData()
|
|
renderTagsData()
|
|
|
}
|
|
}
|
|
|
|
|
+const defaultMorefilters = (val: any, value: any, data: any) => {
|
|
|
|
|
+ filterData.morefiltersData = []
|
|
|
|
|
+ for (const key in val) {
|
|
|
|
|
+ let str = `${key}:${val[key]}`
|
|
|
|
|
+ filterData.morefiltersData.push(str)
|
|
|
|
|
+ for (const key in val) {
|
|
|
|
|
+ if (key == 'Shippername') {
|
|
|
|
|
+ searchTableQeuryTracking.shipper = value[key]
|
|
|
|
|
+ } else if (key == 'Consigneename') {
|
|
|
|
|
+ searchTableQeuryTracking.consignee = value[key]
|
|
|
|
|
+ } else if (key == 'Service') {
|
|
|
|
|
+ searchTableQeuryTracking.service = value[key]
|
|
|
|
|
+ } else if (key == 'Incoterms') {
|
|
|
|
|
+ searchTableQeuryTracking.incoterms = value[key]
|
|
|
|
|
+ } else if (key == 'Notify Party') {
|
|
|
|
|
+ searchTableQeuryTracking.notify_party = value[key]
|
|
|
|
|
+ } else if (key == 'Bill to') {
|
|
|
|
|
+ searchTableQeuryTracking.billto = value[key]
|
|
|
|
|
+ } else if (key == 'Destination Operator') {
|
|
|
|
|
+ searchTableQeuryTracking.dest_op = value[key]
|
|
|
|
|
+ } else if (key == 'Origin Agent') {
|
|
|
|
|
+ searchTableQeuryTracking.origin = value[key]
|
|
|
|
|
+ } else if (key == 'Destination Agent') {
|
|
|
|
|
+ searchTableQeuryTracking.agent = value[key]
|
|
|
|
|
+ } else if (key == 'Sales') {
|
|
|
|
|
+ searchTableQeuryTracking.sales_rep = value[key]
|
|
|
|
|
+ } else if (key == 'Origin') {
|
|
|
|
|
+ searchTableQeuryTracking['shipper_city/consignee_city'] = value[key]
|
|
|
|
|
+ } else if (key == 'Destination') {
|
|
|
|
|
+ searchTableQeuryTracking.final_desination = value[key]
|
|
|
|
|
+ } else if (key == 'Place of Receipt') {
|
|
|
|
|
+ searchTableQeuryTracking.place_of_receipt_exp = value[key]
|
|
|
|
|
+ } else if (key == 'Port of Loading') {
|
|
|
|
|
+ searchTableQeuryTracking.port_of_loading = value[key]
|
|
|
|
|
+ } else if (key == 'Place of delivery') {
|
|
|
|
|
+ searchTableQeuryTracking.place_of_delivery_exp = value[key]
|
|
|
|
|
+ } else if (key == 'Place of Discharge') {
|
|
|
|
|
+ searchTableQeuryTracking.port_of_discharge = value[key]
|
|
|
|
|
+ } else if (key == 'Vessel') {
|
|
|
|
|
+ searchTableQeuryTracking['f_vessel/vessel'] = value[key]
|
|
|
|
|
+ } else if (key == 'Voyage') {
|
|
|
|
|
+ searchTableQeuryTracking['f_voyage/voyage'] = value[key]
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (sessionStorage.getItem('searchTableQeuryTracking') != null) {
|
|
|
|
|
+ searchTableQeuryTracking = data
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ renderTagsData()
|
|
|
|
|
+}
|
|
|
const clearfilters = () => {
|
|
const clearfilters = () => {
|
|
|
tagsData.value = []
|
|
tagsData.value = []
|
|
|
filterData.transportData = []
|
|
filterData.transportData = []
|
|
@@ -219,12 +339,13 @@ const clearfilters = () => {
|
|
|
emitter.emit('clearTag', 'Destination')
|
|
emitter.emit('clearTag', 'Destination')
|
|
|
emitter.emit('clearTag', 'Place of Receipt')
|
|
emitter.emit('clearTag', 'Place of Receipt')
|
|
|
emitter.emit('clearTag', 'Port of Loading')
|
|
emitter.emit('clearTag', 'Port of Loading')
|
|
|
- emitter.emit('clearTag', 'Port of delivery')
|
|
|
|
|
|
|
+ emitter.emit('clearTag', 'Place of delivery')
|
|
|
emitter.emit('clearTag', 'Port of Discharge')
|
|
emitter.emit('clearTag', 'Port of Discharge')
|
|
|
emitter.emit('clearTag', 'Vessel')
|
|
emitter.emit('clearTag', 'Vessel')
|
|
|
emitter.emit('clearTag', 'Voyage')
|
|
emitter.emit('clearTag', 'Voyage')
|
|
|
- searchTableQeury = {}
|
|
|
|
|
- TrackingTable_ref.value.searchTableData(searchTableQeury)
|
|
|
|
|
|
|
+ searchTableQeuryTracking = {}
|
|
|
|
|
+ TrackingTable_ref.value.searchTableData(searchTableQeuryTracking)
|
|
|
|
|
+ sessionStorage.setItem('searchTableQeuryTracking', JSON.stringify(searchTableQeuryTracking))
|
|
|
Gettrackingdata()
|
|
Gettrackingdata()
|
|
|
}
|
|
}
|
|
|
const renderTagsData = () => {
|
|
const renderTagsData = () => {
|
|
@@ -303,7 +424,7 @@ const Gettrackingdata = () => {
|
|
|
ps: TrackingTable_ref.value.pageInfo.pageSize,
|
|
ps: TrackingTable_ref.value.pageInfo.pageSize,
|
|
|
rc: -1,
|
|
rc: -1,
|
|
|
other_filed: '',
|
|
other_filed: '',
|
|
|
- ...searchTableQeury
|
|
|
|
|
|
|
+ ...searchTableQeuryTracking
|
|
|
})
|
|
})
|
|
|
.then((res: any) => {
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -313,38 +434,18 @@ const Gettrackingdata = () => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-const defaultDate = (val: any, value: any) => {
|
|
|
|
|
- if (
|
|
|
|
|
- sessionStorage.getItem('clickParams') === null ||
|
|
|
|
|
- sessionStorage.getItem('clickParams') === ''
|
|
|
|
|
- ) {
|
|
|
|
|
- filterData.daterangeData = []
|
|
|
|
|
- for (const key in val) {
|
|
|
|
|
- let str = `${key}:${val[key]}`
|
|
|
|
|
- filterData.daterangeData.push(str)
|
|
|
|
|
- }
|
|
|
|
|
- if (Object.keys(value).length == 0) {
|
|
|
|
|
- delete searchTableQeury.etd_start
|
|
|
|
|
- delete searchTableQeury.etd_end
|
|
|
|
|
- }
|
|
|
|
|
- for (const key in value) {
|
|
|
|
|
- searchTableQeury.etd_start = value[key][0]
|
|
|
|
|
- searchTableQeury.etd_end = value[key][1]
|
|
|
|
|
- }
|
|
|
|
|
- TrackingTable_ref.value.searchTableData(searchTableQeury)
|
|
|
|
|
- Gettrackingdata()
|
|
|
|
|
- renderTagsData()
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
if (
|
|
if (
|
|
|
sessionStorage.getItem('clickParams') != null &&
|
|
sessionStorage.getItem('clickParams') != null &&
|
|
|
- sessionStorage.getItem('clickParams') != ''
|
|
|
|
|
|
|
+ sessionStorage.getItem('clickParams') != '{}'
|
|
|
) {
|
|
) {
|
|
|
|
|
+ if (sessionStorage.getItem('searchTableQeuryTracking') != null) {
|
|
|
|
|
+ sessionStorage.removeItem('searchTableQeuryTracking')
|
|
|
|
|
+ }
|
|
|
const data = JSON.parse(sessionStorage.getItem('tagsList') as string) || {}
|
|
const data = JSON.parse(sessionStorage.getItem('tagsList') as string) || {}
|
|
|
const reportlist = JSON.parse(sessionStorage.getItem('reportList') as string) || {}
|
|
const reportlist = JSON.parse(sessionStorage.getItem('reportList') as string) || {}
|
|
|
for (const key in reportlist) {
|
|
for (const key in reportlist) {
|
|
|
- searchTableQeury[key] = [key]
|
|
|
|
|
|
|
+ searchTableQeuryTracking[key] = reportlist[key]
|
|
|
}
|
|
}
|
|
|
if (reportlist._city_name == '') {
|
|
if (reportlist._city_name == '') {
|
|
|
let str = `${data.title}:${data.name}`
|
|
let str = `${data.title}:${data.name}`
|
|
@@ -364,21 +465,52 @@ onMounted(() => {
|
|
|
filterData.dashboardData.push(str)
|
|
filterData.dashboardData.push(str)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- renderTagsData()
|
|
|
|
|
|
|
+ sessionStorage.setItem('searchTableQeuryTracking', JSON.stringify(searchTableQeuryTracking))
|
|
|
} else {
|
|
} else {
|
|
|
- Gettrackingdata()
|
|
|
|
|
|
|
+ if (sessionStorage.getItem('searchTableQeuryTracking') != null) {
|
|
|
|
|
+ const testTracking =
|
|
|
|
|
+ JSON.parse(sessionStorage.getItem('searchTableQeuryTracking') as string) || {}
|
|
|
|
|
+ if (testTracking._reportRef) {
|
|
|
|
|
+ const data = JSON.parse(sessionStorage.getItem('tagsList') as string) || {}
|
|
|
|
|
+ const reportlist = JSON.parse(sessionStorage.getItem('reportList') as string) || {}
|
|
|
|
|
+ for (const key in reportlist) {
|
|
|
|
|
+ searchTableQeuryTracking[key] = [key]
|
|
|
|
|
+ }
|
|
|
|
|
+ if (reportlist._city_name == '') {
|
|
|
|
|
+ let str = `${data.title}:${data.name}`
|
|
|
|
|
+ filterData.dashboardData.push(str)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (reportlist._reportStationType == 'shippr_uncode' && data.title.includes('Origin')) {
|
|
|
|
|
+ let str = `Origin: ${data.data}`
|
|
|
|
|
+ filterData.morefiltersData.push(str)
|
|
|
|
|
+ } else if (
|
|
|
|
|
+ reportlist._reportStationType == 'consignee_uncode' &&
|
|
|
|
|
+ data.title.includes('Destination')
|
|
|
|
|
+ ) {
|
|
|
|
|
+ let str = `Destination: ${data.data}`
|
|
|
|
|
+ filterData.morefiltersData.push(str)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ let str = `${data.title}:${data.name}`
|
|
|
|
|
+ filterData.dashboardData.push(str)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ renderTagsData()
|
|
|
})
|
|
})
|
|
|
const changeTag = (val: any) => {
|
|
const changeTag = (val: any) => {
|
|
|
- searchTableQeury.filterTag = val
|
|
|
|
|
- TrackingTable_ref.value.searchTableData(searchTableQeury)
|
|
|
|
|
|
|
+ searchTableQeuryTracking.filterTag = val
|
|
|
|
|
+ TrackingTable_ref.value.searchTableData(searchTableQeuryTracking)
|
|
|
filterTag.value = val
|
|
filterTag.value = val
|
|
|
|
|
+ sessionStorage.setItem('searchTableQeuryTracking', JSON.stringify(searchTableQeuryTracking))
|
|
|
Gettrackingdata()
|
|
Gettrackingdata()
|
|
|
}
|
|
}
|
|
|
// 点击search按钮
|
|
// 点击search按钮
|
|
|
const SearchInput = () => {
|
|
const SearchInput = () => {
|
|
|
- searchTableQeury._textSearch = TrackingSearch.value
|
|
|
|
|
- TrackingTable_ref.value.searchTableData(searchTableQeury)
|
|
|
|
|
|
|
+ searchTableQeuryTracking._textSearch = TrackingSearch.value
|
|
|
|
|
+ TrackingTable_ref.value.searchTableData(searchTableQeuryTracking)
|
|
|
|
|
+ sessionStorage.setItem('searchTableQeuryTracking', JSON.stringify(searchTableQeuryTracking))
|
|
|
Gettrackingdata()
|
|
Gettrackingdata()
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
@@ -403,21 +535,24 @@ const SearchInput = () => {
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</div>
|
|
</div>
|
|
|
<TransportMode
|
|
<TransportMode
|
|
|
|
|
+ :isShipment="true"
|
|
|
:TransportListItem="TransportListItem"
|
|
:TransportListItem="TransportListItem"
|
|
|
@TransportSearch="TransportSearch"
|
|
@TransportSearch="TransportSearch"
|
|
|
@defaultTransport="defaultTransport"
|
|
@defaultTransport="defaultTransport"
|
|
|
@clearTransportTags="clearTransportTags"
|
|
@clearTransportTags="clearTransportTags"
|
|
|
></TransportMode>
|
|
></TransportMode>
|
|
|
<DateRange
|
|
<DateRange
|
|
|
|
|
+ :isShipment="true"
|
|
|
@DateRangeSearch="DateRangeSearch"
|
|
@DateRangeSearch="DateRangeSearch"
|
|
|
@clearDaterangeTags="clearDaterangeTags"
|
|
@clearDaterangeTags="clearDaterangeTags"
|
|
|
@defaultDate="defaultDate"
|
|
@defaultDate="defaultDate"
|
|
|
></DateRange>
|
|
></DateRange>
|
|
|
<MoreFilters
|
|
<MoreFilters
|
|
|
:isShipment="true"
|
|
:isShipment="true"
|
|
|
- :searchTableQeury="searchTableQeury"
|
|
|
|
|
|
|
+ :searchTableQeury="searchTableQeuryTracking"
|
|
|
@MoreFiltersSearch="MoreFiltersSearch"
|
|
@MoreFiltersSearch="MoreFiltersSearch"
|
|
|
@clearMoreFiltersTags="clearMoreFiltersTags"
|
|
@clearMoreFiltersTags="clearMoreFiltersTags"
|
|
|
|
|
+ @defaultMorefilters="defaultMorefilters"
|
|
|
></MoreFilters>
|
|
></MoreFilters>
|
|
|
<el-button class="el-button--dark" style="margin-left: 8px" @click="SearchInput"
|
|
<el-button class="el-button--dark" style="margin-left: 8px" @click="SearchInput"
|
|
|
>Search</el-button
|
|
>Search</el-button
|