ทะเบียนประวัติ ==> ข้อมูลส่วนตัว, รายการคำร้องขอแก้ไขทะเบียนประวัติ
This commit is contained in:
parent
b9cd90d70a
commit
b21a4f53ac
13 changed files with 64 additions and 85 deletions
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
) "
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
interface RequestObject {
|
||||
birthDate: Date | null | string;
|
||||
birthDate: Date | null;
|
||||
bloodGroup: string | null;
|
||||
citizenId: string;
|
||||
// email: string | null;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue