diff --git a/src/components/FetchData.vue b/src/components/FetchData.vue index f0d908972..b8e7c2ac3 100644 --- a/src/components/FetchData.vue +++ b/src/components/FetchData.vue @@ -27,6 +27,10 @@ const $props = defineProps({ type: String, default: '', }, + params: { + type: Object, + default: null, + } }); const emit = defineEmits(['onFetch']); @@ -46,7 +50,7 @@ async function fetch() { if ($props.limit) filter.limit = $props.limit; const { data } = await axios.get($props.url, { - params: { filter: JSON.stringify(filter) }, + params: { filter: JSON.stringify(filter), ...$props.params }, }); emit('onFetch', data); diff --git a/src/pages/Order/Card/OrderFilter.vue b/src/pages/Order/Card/OrderFilter.vue index 60f087b98..0d12f31da 100644 --- a/src/pages/Order/Card/OrderFilter.vue +++ b/src/pages/Order/Card/OrderFilter.vue @@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n'; import FetchData from 'components/FetchData.vue'; import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue'; import VnSelectFilter from 'components/common/VnSelectFilter.vue'; +import VnInputDate from "components/common/VnInputDate.vue"; const { t } = useI18n(); const props = defineProps({ @@ -13,10 +14,6 @@ const props = defineProps({ }, }); -const workers = ref(); -const states = ref(); - -// New const agencyFilter = { fields: ['id', 'name'] }; const agencyList = ref(null); const salesPersonFilter = { @@ -24,12 +21,12 @@ const salesPersonFilter = { }; const salesPersonList = ref(null); const sourceFilter = { fields: ['value'] }; -const sourceList = ref(null) +const sourceList = ref(null); -