From 5528e68bc1debddf48604d18c257d79888fee13e Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Wed, 10 Jul 2024 17:39:16 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9F=E0=B8=B4=E0=B8=A5=E0=B9=80=E0=B8=95?= =?UTF-8?q?=E0=B8=AD=E0=B8=A3=E0=B9=8C=E0=B8=A7=E0=B8=B4=E0=B8=99=E0=B8=B1?= =?UTF-8?q?=E0=B8=A2=20=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84=E0=B8=B3?= =?UTF-8?q?=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../10_order/components/step/step01.vue | 101 +++++++++++++++--- .../components/2_InvestigateFacts/Form.vue | 67 ++++++++++-- .../3_InvestigateDisciplinary/Form.vue | 79 ++++++++++++-- .../components/8_AppealComplain/Form.vue | 55 +++++++++- .../components/9_Order/MainPage.vue | 6 +- .../store/InvestigateFactStore.ts | 2 +- 6 files changed, 272 insertions(+), 38 deletions(-) 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' + ) " > +