ทะเบียนประวัติ ==> ข้อมูลส่วนตัว, รายการคำร้องขอแก้ไขทะเบียนประวัติ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-12-02 18:09:51 +07:00
parent b9cd90d70a
commit b21a4f53ac
13 changed files with 64 additions and 85 deletions

View file

@ -592,6 +592,8 @@ onMounted(() => {
dense
outlined
use-input
hide-selected
fill-input
lazy-rules
emit-value
map-options
@ -615,6 +617,8 @@ onMounted(() => {
outlined
clearable
use-input
hide-selected
fill-input
lazy-rules
emit-value
map-options
@ -716,6 +720,8 @@ onMounted(() => {
dense
outlined
use-input
hide-selected
fill-input
clearable
lazy-rules
emit-value
@ -738,6 +744,8 @@ onMounted(() => {
dense
outlined
use-input
hide-selected
fill-input
clearable
lazy-rules
emit-value
@ -782,6 +790,8 @@ onMounted(() => {
dense
outlined
use-input
hide-selected
fill-input
clearable
lazy-rules
emit-value
@ -804,6 +814,8 @@ onMounted(() => {
dense
outlined
use-input
hide-selected
fill-input
clearable
lazy-rules
emit-value
@ -909,7 +921,7 @@ onMounted(() => {
v-model:pagination="pagination"
:rows-per-page-options="[10, 25, 50, 100]"
:visible-columns="visibleColumnsHistory"
:filter="filterHistory"
:filter="filterHistory.trim()"
>
>
<template v-slot:header="props">

View file

@ -507,7 +507,7 @@ onMounted(async () => {
v-model:pagination="pagination"
:rows="rows"
:columns="columns"
:filter="filterSearch"
:filter="filterSearch.trim()"
:rows-per-page-options="[10, 25, 50, 100]"
:visible-columns="visibleColumns"
:virtual-scroll-sticky-size-start="48"
@ -586,6 +586,8 @@ onMounted(async () => {
:class="!selection.includes('prefix') ? '' : 'inputgreen'"
outlined
use-input
hide-selected
fill-input
lazy-rules
emit-value
map-options

View file

@ -686,6 +686,8 @@ onMounted(async () => {
dense
outlined
use-input
hide-selected
fill-input
lazy-rules
emit-value
map-options
@ -709,6 +711,8 @@ onMounted(async () => {
dense
outlined
use-input
hide-selected
fill-input
lazy-rules
emit-value
map-options
@ -732,6 +736,8 @@ onMounted(async () => {
dense
outlined
use-input
hide-selected
fill-input
lazy-rules
emit-value
map-options
@ -954,7 +960,7 @@ onMounted(async () => {
:paging="true"
:rows-per-page-options="[10, 25, 50, 100]"
:visible-columns="visibleColumnsHistory"
:filter="filterHistory"
:filter="filterHistory.trim()"
>
>
<template v-slot:header="props">

View file

@ -902,6 +902,8 @@ onMounted(async () => {
label="สถานภาพการสมรส"
v-model="fromData.statusMarital"
use-input
hide-selected
fill-input
input-debounce="0"
emit-value
map-options
@ -953,6 +955,8 @@ onMounted(async () => {
label="คำนำหน้าชื่อ"
v-model="fromData.prefix"
use-input
hide-selected
fill-input
input-debounce="0"
emit-value
map-options
@ -1137,7 +1141,7 @@ onMounted(async () => {
:paging="true"
:rows-per-page-options="[10, 25, 50, 100]"
:visible-columns="visibleColumns"
:filter="filterHistory"
:filter="filterHistory.trim()"
>
>
<template v-slot:header="props">

View file

@ -787,7 +787,6 @@ onMounted(async () => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
/>
@ -832,7 +831,7 @@ onMounted(async () => {
flat
bordered
:paging="true"
:filter="keyword"
:filter="keyword.trim()"
dense
v-model:pagination="pagination"
:rows-per-page-options="[20, 50, 100]"
@ -863,9 +862,7 @@ onMounted(async () => {
<q-tooltip>ประวแกไขประวการศกษา</q-tooltip>
</q-btn>
<q-btn
v-if="
isLeave == false && checkPermission($route)?.attrIsUpdate
"
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
flat
dense
round
@ -1027,6 +1024,8 @@ onMounted(async () => {
:options="educationLevelOption"
input-debounce="0"
use-input
hide-selected
fill-input
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn,'educationLevelOption'
) "
@ -1304,6 +1303,8 @@ onMounted(async () => {
option-label="label"
input-debounce="0"
use-input
hide-selected
fill-input
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn,'educationOption'
) "
@ -1467,7 +1468,6 @@ onMounted(async () => {
map-options
:options="historyColumns"
option-value="name"
style="min-width: 140px"
/>
</q-toolbar>
@ -1480,7 +1480,7 @@ onMounted(async () => {
bordered
:paging="true"
dense
:filter="historyKeyword"
:filter="historyKeyword.trim()"
v-model:pagination="historyPagination"
:rows-per-page-options="[20, 50, 100]"
class="custom-header-table"

View file

@ -426,7 +426,7 @@ onMounted(() => {
:columns="columns"
:rows="rows"
:paging="true"
:filter="keyword"
:filter="keyword.trim()"
v-model:pagination="pagination"
:rows-per-page-options="[20, 50, 100]"
:visible-columns="visibleColumns"
@ -650,7 +650,7 @@ onMounted(() => {
bordered
:paging="true"
dense
:filter="historyKeyword"
:filter="historyKeyword.trim()"
v-model:pagination="historyPagination"
:rows-per-page-options="[20, 50, 100]"
class="custom-header-table"

View file

@ -129,7 +129,7 @@ function fetchListRequset() {
page: page.value,
pageSize: pageSize.value,
status: status.value,
keyword: keyword.value,
keyword: keyword.value.trim(),
},
}
)
@ -197,59 +197,6 @@ function updatePageSizePagination(newPagination: Pagination) {
pageSize.value = newPagination.rowsPerPage;
}
/**
* function หาชอไฟล
* @param id รายการยนคำรองขอแกไขขอม
*/
function onDownloadFile(id: string) {
showLoader();
http
.get(
config.API.file(
"ระบบทะเบียนประวัติ",
"เอกสารหลักฐานคำร้องขอแก้ไขข้อมูล",
id
)
)
.then(async (res) => {
if (res.data.length !== 0) {
await downloadUrl(id, res.data[0].fileName);
} else {
hideLoader();
}
})
.catch((e) => {
messageError($q, e);
hideLoader();
});
}
/**
* function โหลดไฟล
* @param id รายการยนคำรองขอแกไขขอม
* @param fileName อไฟล
*/
async function downloadUrl(id: string, fileName: string) {
await http
.get(
config.API.fileByFile(
"ระบบทะเบียนประวัติ",
"เอกสารหลักฐานคำร้องขอแก้ไขข้อมูล",
id,
fileName
)
)
.then((res) => {
window.open(res.data.downloadUrl, "_blank");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
/**
* การเปลยนแปลงของ pageSize
* เมอมการเปลยนแปลงจำทำการ งชอมลรายการคำรองขอแกไขทะเบยนประวตามจำนวน pageSize
@ -281,6 +228,8 @@ onMounted(() => {
map-options
option-label="name"
option-value="id"
hide-selected
fill-input
:options="statusOption"
@update:model-value="updateStatusValue"
:clearable="status !== ''"
@ -301,13 +250,14 @@ onMounted(() => {
<q-input
v-model="keyword"
outlined
clearable
dense
label="ค้นหา"
style="min-width: 250px"
@keydown.enter="updateStatusValue()"
class="col-xs-12 col-sm-3 col-md-2"
>
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input>
<q-select
@ -321,7 +271,6 @@ onMounted(() => {
map-options
:options="columns"
option-value="name"
class="col-xs-12 col-sm-3 col-md-2"
style="min-width: 140px"
/>
</div>

View file

@ -300,6 +300,8 @@ onMounted(() => {
dense
outlined
emit-value
hide-selected
fill-input
map-options
option-label="name"
option-value="id"
@ -323,13 +325,13 @@ onMounted(() => {
<q-input
v-model="keyword"
outlined
clearable
dense
label="ค้นหา"
style="min-width: 250px"
@keydown.enter="updateStatusValue()"
class="col-xs-12 col-sm-3 col-md-2"
>
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input>
<q-select
@ -344,7 +346,6 @@ onMounted(() => {
:options="columns"
option-value="name"
style="min-width: 140px"
class="col-xs-12 col-sm-3 col-md-2"
/>
</div>

View file

@ -459,6 +459,8 @@ onMounted(async () => {
use-input
option-label="name"
option-value="id"
hide-selected
fill-input
@filter="(inputValue:string,
doneFn:Function) => filterOption(inputValue, doneFn
) "

View file

@ -125,7 +125,6 @@ async function fetchDataByid(id: string) {
*/
function filterOption(val: string, update: Function) {
update(() => {
formData.status = val ? "" : formData.status;
statusOption.value = statusOptionMain.value.filter(
(v: DataOption) => v.name.indexOf(val) > -1
);
@ -229,6 +228,8 @@ onMounted(() => {
outlined
emit-value
map-options
hide-selected
fill-input
:options="statusOption"
:rules="[(val:string) => !!val || `${'กรุณาเลือกสถานะ'}`]"
lazy-rules

View file

@ -1,5 +1,5 @@
interface RequestObject {
birthDate: Date | null | string;
birthDate: Date | null;
bloodGroup: string | null;
citizenId: string;
// email: string | null;

View file

@ -38,6 +38,7 @@ export const useProfileDataStore = defineStore("profile", () => {
firstName: "",
prefix: "",
rank: null,
prefixMain: "",
};
//ข้อมูลตัวเลือก
@ -187,60 +188,61 @@ export const useProfileDataStore = defineStore("profile", () => {
* @param refData
*/
const filterSelector = (val: string, update: Function, refData: string) => {
const newVal = val.toLowerCase();
switch (refData) {
case "prefixOps":
update(() => {
Ops.value.prefixOps = OpsFilter.value.prefixOps.filter(
(v: DataOption) => v.name.indexOf(val) > -1
(v: DataOption) => v.name.toLowerCase().indexOf(newVal) > -1
);
});
break;
case "rankOps":
update(() => {
Ops.value.rankOps = OpsFilter.value.rankOps.filter(
(v: DataOption) => v.name.indexOf(val) > -1
(v: DataOption) => v.name.toLowerCase().indexOf(newVal) > -1
);
});
break;
case "genderOps":
update(() => {
Ops.value.genderOps = OpsFilter.value.genderOps.filter(
(v: DataOption) => v.name.indexOf(val) > -1
(v: DataOption) => v.name.toLowerCase().indexOf(newVal) > -1
);
});
break;
case "bloodOps":
update(() => {
Ops.value.bloodOps = OpsFilter.value.bloodOps.filter(
(v: DataOption) => v.name.indexOf(val) > -1
(v: DataOption) => v.name.toLowerCase().indexOf(newVal) > -1
);
});
break;
case "statusOps":
update(() => {
Ops.value.statusOps = OpsFilter.value.statusOps.filter(
(v: DataOption) => v.name.indexOf(val) > -1
(v: DataOption) => v.name.toLowerCase().indexOf(newVal) > -1
);
});
break;
case "religionOps":
update(() => {
Ops.value.religionOps = OpsFilter.value.religionOps.filter(
(v: DataOption) => v.name.indexOf(val) > -1
(v: DataOption) => v.name.toLowerCase().indexOf(newVal) > -1
);
});
break;
case "employeeClassOps":
update(() => {
Ops.value.employeeClassOps = OpsFilter.value.employeeClassOps.filter(
(v: DataOption) => v.name.indexOf(val) > -1
(v: DataOption) => v.name.toLowerCase().indexOf(newVal) > -1
);
});
break;
case "employeeTypeOps":
update(() => {
Ops.value.employeeTypeOps = OpsFilter.value.employeeTypeOps.filter(
(v: DataOption) => v.name.indexOf(val) > -1
(v: DataOption) => v.name.toLowerCase().indexOf(newVal) > -1
);
});
break;

View file

@ -92,7 +92,7 @@ function fetchDataPerson() {
if (store.formFilter.keyword) {
queryParams = Object.assign({}, queryParams, {
searchField: store.formFilter.searchType,
searchKeyword: store.formFilter.keyword,
searchKeyword: store.formFilter.keyword.trim(),
});
}