|
|
@@ -11,11 +11,15 @@ import { useThemeStore } from '@/stores/modules/theme'
|
|
|
import { useVisitedRowState } from '@/stores/modules/visitedRow'
|
|
|
import { formatTimezone, formatNumber } from '@/utils/tools'
|
|
|
import { useTrackingDownloadData } from '@/stores/modules/trackingDownloadData'
|
|
|
+import { useUserStore } from '@/stores/modules/user'
|
|
|
|
|
|
const visitedRowState = useVisitedRowState()
|
|
|
const themeStore = useThemeStore()
|
|
|
const trackingDownloadData = useTrackingDownloadData()
|
|
|
|
|
|
+const userStore = useUserStore()
|
|
|
+const formatDate = userStore.dateFormat
|
|
|
+const valueFormatDate = 'MM/DD/YYYY'
|
|
|
const router = useRouter()
|
|
|
const props = defineProps({
|
|
|
height: {
|
|
|
@@ -177,13 +181,29 @@ const getTableData = async (isPageChange?: boolean) => {
|
|
|
sessionStorage.setItem('trackingTablePageInfo', JSON.stringify(pageInfo.value))
|
|
|
tableLoadingTable.value = true
|
|
|
const rc = isPageChange ? pageInfo.value.total : -1
|
|
|
+ const dateRangeKeys = [
|
|
|
+ 'etd_start',
|
|
|
+ 'etd_end',
|
|
|
+ 'eta_start',
|
|
|
+ 'eta_end',
|
|
|
+ 'created_time_start',
|
|
|
+ 'created_time_end'
|
|
|
+ ]
|
|
|
+ const curRangeData = {}
|
|
|
+ for (const key of dateRangeKeys) {
|
|
|
+ if (filterdataobj.value[key]) {
|
|
|
+ curRangeData[key] = dayjs(filterdataobj.value[key], formatDate).format(valueFormatDate)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
await $api
|
|
|
.getTrackingTableData({
|
|
|
cp: pageInfo.value.pageNo,
|
|
|
ps: pageInfo.value.pageSize,
|
|
|
rc,
|
|
|
other_filed: '',
|
|
|
- ...filterdataobj.value
|
|
|
+ ...filterdataobj.value,
|
|
|
+ ...curRangeData
|
|
|
})
|
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|