|
|
@@ -24,6 +24,55 @@ const tagsData: any = ref([])
|
|
|
const handleClose = (tag: any) => {
|
|
|
emitter.emit('clearTag', tag)
|
|
|
tagsData.value.splice(tagsData.value.indexOf(tag), 1)
|
|
|
+ if (tag.includes('Transport')) {
|
|
|
+ delete searchTableQeury.transport_mode
|
|
|
+ } else if (tag.includes('ETD')) {
|
|
|
+ delete searchTableQeury.etd_start
|
|
|
+ delete searchTableQeury.etd_end
|
|
|
+ } else if (tag.includes('ETA')) {
|
|
|
+ delete searchTableQeury.f_eta_start
|
|
|
+ delete searchTableQeury.f_eta_end
|
|
|
+ } else if (tag.includes('Creation')) {
|
|
|
+ delete searchTableQeury.created_time_start
|
|
|
+ delete searchTableQeury.created_time_end
|
|
|
+ } else if (tag.includes('shippername')) {
|
|
|
+ delete searchTableQeury.shipper
|
|
|
+ } else if (tag.includes('consigneename')) {
|
|
|
+ delete searchTableQeury.consignee
|
|
|
+ } else if (tag.includes('Service')) {
|
|
|
+ delete searchTableQeury.service
|
|
|
+ } else if (tag.includes('Incoterms')) {
|
|
|
+ delete searchTableQeury.incoterms
|
|
|
+ } else if (tag.includes('Notify Party')) {
|
|
|
+ delete searchTableQeury.notify_party
|
|
|
+ } else if (tag.includes('Bill to')) {
|
|
|
+ delete searchTableQeury.billto
|
|
|
+ } else if (tag.includes('Origin Agent')) {
|
|
|
+ delete searchTableQeury.origin
|
|
|
+ } else if (tag.includes('Destination Agent')) {
|
|
|
+ delete searchTableQeury.agent
|
|
|
+ } else if (tag.includes('Destination Operator')) {
|
|
|
+ delete searchTableQeury.dest_op
|
|
|
+ } else if (tag.includes('Sales')) {
|
|
|
+ delete searchTableQeury.sales_rep
|
|
|
+ } else if (tag.includes('origin')) {
|
|
|
+ delete searchTableQeury.from_station
|
|
|
+ } else if (tag.includes('destination')) {
|
|
|
+ delete searchTableQeury.final_desination
|
|
|
+ } 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
|
|
|
+ } else if (tag.includes('Place of delivery')) {
|
|
|
+ delete searchTableQeury.place_of_delivery_exp
|
|
|
+ } else if (tag.includes('Place of Discharge')) {
|
|
|
+ delete searchTableQeury.port_of_discharge
|
|
|
+ } else if (tag.includes('vessel')) {
|
|
|
+ delete searchTableQeury['f_vessel/vessel']
|
|
|
+ } else if (tag.includes('voyage')) {
|
|
|
+ delete searchTableQeury['f_voyage/voyage']
|
|
|
+ }
|
|
|
+ TrackingTable_ref.value.searchTableData(searchTableQeury)
|
|
|
}
|
|
|
// 筛选框查询
|
|
|
const FiltersSeach = (val: any, value: any) => {
|
|
|
@@ -49,8 +98,8 @@ const DateRangeSearch = (val: any, value: any) => {
|
|
|
}
|
|
|
for (const key in value) {
|
|
|
if (key == 'ETD') {
|
|
|
- searchTableQeury.m_etd_start = value[key].data[0]
|
|
|
- searchTableQeury.m_etd_end = value[key].data[1]
|
|
|
+ searchTableQeury.etd_start = value[key].data[0]
|
|
|
+ searchTableQeury.etd_end = value[key].data[1]
|
|
|
} else if (key == 'ETA') {
|
|
|
searchTableQeury.f_eta_start = value[key].data[0]
|
|
|
searchTableQeury.f_eta_end = value[key].data[1]
|
|
|
@@ -63,33 +112,48 @@ const DateRangeSearch = (val: any, value: any) => {
|
|
|
renderTagsData()
|
|
|
}
|
|
|
//MoreFiltersSearch
|
|
|
-const MoreFiltersSearch = (val: any) => {
|
|
|
+const MoreFiltersSearch = (val: any, value: any) => {
|
|
|
+ console.log(value)
|
|
|
filterData.morefiltersData = []
|
|
|
for (const key in val) {
|
|
|
let str = `${key}:${val[key]}`
|
|
|
filterData.morefiltersData.push(str)
|
|
|
if (key == 'shippername') {
|
|
|
- searchTableQeury.shipper = val[key]
|
|
|
+ searchTableQeury.shipper = value[key]
|
|
|
} else if (key == 'consigneename') {
|
|
|
- searchTableQeury.consignee = val[key]
|
|
|
+ searchTableQeury.consignee = value[key]
|
|
|
+ } else if (key == 'Service') {
|
|
|
+ searchTableQeury.service = value[key]
|
|
|
+ } else if (key == 'Incoterms') {
|
|
|
+ searchTableQeury.incoterms = value[key]
|
|
|
+ } else if (key == 'Notify Party') {
|
|
|
+ searchTableQeury.notify_party = value[key]
|
|
|
+ } else if (key == 'Bill to') {
|
|
|
+ searchTableQeury.billto = value[key]
|
|
|
} else if (key == 'Origin Agent') {
|
|
|
- searchTableQeury.origin = val[key]
|
|
|
+ searchTableQeury.origin = value[key]
|
|
|
} else if (key == 'Destination Agent') {
|
|
|
- searchTableQeury.agent = val[key]
|
|
|
+ searchTableQeury.agent = value[key]
|
|
|
+ } else if (key == 'Destination Operator') {
|
|
|
+ searchTableQeury.dest_op = value[key]
|
|
|
} else if (key == 'Sales') {
|
|
|
- searchTableQeury.sales_rep = val[key]
|
|
|
+ searchTableQeury.sales_rep = value[key]
|
|
|
} else if (key == 'destination') {
|
|
|
- searchTableQeury['final_desination/final_desination_exp'] = val[key]
|
|
|
+ searchTableQeury.final_desination = val[key]
|
|
|
} else if (key == 'Place of Receipt') {
|
|
|
- searchTableQeury.place_of_receipt = val[key]
|
|
|
+ searchTableQeury.place_of_receipt_exp = val[key]
|
|
|
+ } else if (key == 'origin') {
|
|
|
+ searchTableQeury.from_station = val[key]
|
|
|
} else if (key == 'Port of Loading') {
|
|
|
- searchTableQeury['fport_of_loading/fport_of_loading_exp'] = val[key]
|
|
|
+ searchTableQeury.port_of_loading = val[key]
|
|
|
} else if (key == 'Port of delivery') {
|
|
|
- searchTableQeury['place_of_delivery/place_of_delivery_exp'] = val[key]
|
|
|
+ searchTableQeury.place_of_delivery_exp = val[key]
|
|
|
+ } else if (key == 'Port of Discharge') {
|
|
|
+ searchTableQeury.port_of_discharge = val[key]
|
|
|
} else if (key == 'vessel') {
|
|
|
- searchTableQeury.vessel = val[key]
|
|
|
+ searchTableQeury['f_vessel/vessel'] = value[key]
|
|
|
} else if (key == 'voyage') {
|
|
|
- searchTableQeury['f_voyage/m_voyage'] = val[key]
|
|
|
+ searchTableQeury['f_voyage/voyage'] = value[key]
|
|
|
}
|
|
|
}
|
|
|
TrackingTable_ref.value.searchTableData(searchTableQeury)
|
|
|
@@ -99,12 +163,31 @@ const clearfilters = () => {
|
|
|
tagsData.value = []
|
|
|
filterData.transportData = []
|
|
|
filterData.daterangeData = []
|
|
|
+ filterData.morefiltersData = []
|
|
|
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', 'Port of delivery')
|
|
|
+ emitter.emit('clearTag', 'Port of Discharge')
|
|
|
+ emitter.emit('clearTag', 'vessel')
|
|
|
+ emitter.emit('clearTag', 'voyage')
|
|
|
+ searchTableQeury = {}
|
|
|
+ TrackingTable_ref.value.searchTableData(searchTableQeury)
|
|
|
}
|
|
|
const renderTagsData = () => {
|
|
|
tagsData.value = []
|
|
|
@@ -149,7 +232,7 @@ onMounted(() => {
|
|
|
setTimeout(() => {
|
|
|
TransportListItem.value = TrackingTable_ref.value.TransportListItem
|
|
|
TagsList.value = TrackingTable_ref.value.TagsList
|
|
|
- }, 1000)
|
|
|
+ }, 2000)
|
|
|
})
|
|
|
const changeTag = (val: any) => {
|
|
|
searchTableQeury.filterTag = val
|