|
|
|
@ -92,6 +92,7 @@ import { DeviceStatus, enumToKeyValueArray } from '../utils'
@@ -92,6 +92,7 @@ import { DeviceStatus, enumToKeyValueArray } from '../utils'
|
|
|
|
|
import { useMessage } from '@/hooks/useMessage' |
|
|
|
|
|
|
|
|
|
import type { CustomerVO } from '@/api/module/eam/customer' |
|
|
|
|
import { isEmpty } from '@/utils/is' |
|
|
|
|
|
|
|
|
|
const msg = useMessage() |
|
|
|
|
|
|
|
|
@ -111,12 +112,12 @@ const emit = defineEmits(['search'])
@@ -111,12 +112,12 @@ const emit = defineEmits(['search'])
|
|
|
|
|
type FilterKeys = keyof typeof filterData.value |
|
|
|
|
|
|
|
|
|
const filterData = ref({ |
|
|
|
|
startDay: '', |
|
|
|
|
endDay: '', |
|
|
|
|
sn: '', |
|
|
|
|
status: '', |
|
|
|
|
// serialNo: '', |
|
|
|
|
categoryId: '', |
|
|
|
|
startDay: undefined, |
|
|
|
|
endDay: undefined, |
|
|
|
|
sn: undefined, |
|
|
|
|
status: undefined, |
|
|
|
|
// serialNo: undefined, |
|
|
|
|
categoryId: undefined, |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const checkbox = ref<Record<FilterKeys, boolean>>({ |
|
|
|
@ -160,7 +161,7 @@ function validate() {
@@ -160,7 +161,7 @@ function validate() {
|
|
|
|
|
.map(([key]) => key as FilterKeys) |
|
|
|
|
|
|
|
|
|
for (const element of keys) { |
|
|
|
|
if (!filterData.value[element]) { |
|
|
|
|
if (filterData.value[element] === undefined) { |
|
|
|
|
msg.error('请输入' + placeholderMap[element]) |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
@ -184,19 +185,17 @@ function formatParams() {
@@ -184,19 +185,17 @@ function formatParams() {
|
|
|
|
|
|
|
|
|
|
function onReset() { |
|
|
|
|
filterData.value = { |
|
|
|
|
startDay: '', |
|
|
|
|
endDay: '', |
|
|
|
|
sn: '', |
|
|
|
|
status: '', |
|
|
|
|
serialNo: '', |
|
|
|
|
categoryId: [], |
|
|
|
|
startDay: undefined, |
|
|
|
|
endDay: undefined, |
|
|
|
|
sn: undefined, |
|
|
|
|
status: undefined, |
|
|
|
|
categoryId: undefined, |
|
|
|
|
} |
|
|
|
|
checkbox.value = { |
|
|
|
|
startDay: false, |
|
|
|
|
endDay: false, |
|
|
|
|
sn: false, |
|
|
|
|
status: false, |
|
|
|
|
serialNo: false, |
|
|
|
|
categoryId: false, |
|
|
|
|
} |
|
|
|
|
onSearch() |
|
|
|
|