diff --git a/src/modules/10_order/components/step/step01.vue b/src/modules/10_order/components/step/step01.vue index 4221ac87d..10c2675e6 100644 --- a/src/modules/10_order/components/step/step01.vue +++ b/src/modules/10_order/components/step/step01.vue @@ -53,7 +53,9 @@ const myForm = ref(); //option const typeOrderOption = ref([]); const byOrderOption = ref([]); +const byOrderOptionUse = ref([]); const CommandOption = ref([]); +const CommandOptionUse = ref([]); //Main const typeOrder = ref(); @@ -739,6 +741,7 @@ const columnsModal = ref([ const rowsModal = ref([]); const clickAction = ref(""); const filterModal = ref(""); +const optionCPM = ref([]); // โหลด tree const nodeTree = async () => { showLoader(); @@ -812,11 +815,31 @@ const clickSavelist = () => { }; const filterSelector = (val: any, update: Function, fullname: any) => { - update(() => { - typeOrderOption.value = typeOrderFilter.value.filter( - (v: any) => v.fullname.toLowerCase().indexOf(val.toLowerCase()) > -1 - ); - }); + if (fullname == "typeOrderOption") { + update(() => { + typeOrderOption.value = typeOrderFilter.value.filter( + (v: any) => v.fullname.toLowerCase().indexOf(val.toLowerCase()) > -1 + ); + }); + } else if (fullname == "byOrder") { + update(() => { + byOrderOptionUse.value = byOrderOption.value.filter( + (v: any) => v.name.toLowerCase().indexOf(val.toLowerCase()) > -1 + ); + }); + } else if (fullname == "nameCommand") { + update(() => { + CommandOptionUse.value = CommandOption.value.filter( + (v: any) => v.name.toLowerCase().indexOf(val.toLowerCase()) > -1 + ); + }); + } else if (fullname == "C-PM") { + update(() => { + optionCPM.value = DataStore.complaintOption.filter( + (v: any) => v.name.toLowerCase().indexOf(val.toLowerCase()) > -1 + ); + }); + } }; /** @@ -855,7 +878,14 @@ const getClass = (val: boolean) => { @filter="(inputValue:any, doneFn:Function) => filterSelector(inputValue, doneFn,'typeOrderOption' ) " - /> + >
{
- { :label="`${'คำสั่งโดย'}`" map-options option-label="name" - :options="byOrderOption" + :options="byOrderOptionUse" option-value="id" use-input input-debounce="0" @update:model-value="(nameCommand = ''), (positionCommand = '')" - /> + @filter="(inputValue:any, + doneFn:Function) => filterSelector(inputValue, doneFn,'byOrder' + ) " + > + +
{ :label="`${'ผู้มีอำนาจลงนาม'}`" map-options option-label="name" - :options="CommandOption" + :options="CommandOptionUse" option-value="id" use-input input-debounce="0" + @filter="(inputValue:any, + doneFn:Function) => filterSelector(inputValue, doneFn,'nameCommand' + ) " > +