diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 7fa494349..7fce714fc 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -247,6 +247,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { } function updateStateParams() { + if (!route?.path) return; const newUrl = { path: route.path, query: { ...(route.query ?? {}) } }; newUrl.query[store.searchUrl] = JSON.stringify(store.currentFilter); diff --git a/src/pages/Customer/CustomerFilter.vue b/src/pages/Customer/CustomerFilter.vue index 479d3e7ab..898185b08 100644 --- a/src/pages/Customer/CustomerFilter.vue +++ b/src/pages/Customer/CustomerFilter.vue @@ -11,6 +11,20 @@ defineProps({ required: true, }, }); +const handleSalesModelValue = (val) => ({ + or: [ + { id: val }, + { name: val }, + { nickname: { like: '%' + val + '%' } }, + { code: { like: `${val}%` } }, + ], +}); + +const exprBuilder = (param, value) => { + return { + and: [{ active: { neq: false } }, handleSalesModelValue(value)], + }; +};