เพิ่ม select สถานภาพ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-01 09:14:38 +07:00
parent 287ef3c598
commit cf8bdb7ce0
6 changed files with 90 additions and 16 deletions

View file

@ -283,6 +283,19 @@ const selectorInsignia = async () => {
? dataCopy.filter((x: any) => x.requestInsigniaId == DataStore.insignia)
: dataCopy;
};
const selectEmployeeClass = async (employeeClass: string) => {
if (employeeClass == "officer") {
let list = DataStore.listInsignia.filter(
(e: any) => e.employeeType === "ข้าราชการ กทม.สามัญ"
);
rows.value = list;
} else if (employeeClass === "perm") {
let list = DataStore.listInsignia.filter(
(e: any) => e.employeeType === "ลูกจ้างประจำ"
);
rows.value = list;
} else rows.value = DataStore.listInsignia;
};
const yearRound = ref<number>();
const selectorRound = async (round: number) => {
@ -403,6 +416,27 @@ const resetFilter = () => {
@update:model-value="selectorInsignia"
/>
</div>
<div>
<q-select
v-model="DataStore.employeeClass"
dense
outlined
lazy-rules
hide-bottom-space
:label="`${'สถานภาพ'}`"
emit-value
map-options
option-label="name"
:options="DataStore.employeeClassOps"
option-value="id"
:readonly="false"
:borderless="false"
style="min-width: 150px"
@update:model-value="
selectEmployeeClass(DataStore.employeeClass)
"
/>
</div>
<div>
<q-btn

View file

@ -27,16 +27,26 @@ const nextPage = (type: string, title: string) => {
</q-item-section>
</q-item>
<!-- <q-item to="/insignia/report/report-01" dense class="hover-green">
<q-item
clickable
@click="
nextPage(
'45',
'บัญชีรายชื่อข้าราชการผู้ขอพระราชทานเครื่องราชอิสริยาภรณ์'
)
"
dense
class="hover-green"
>
<q-item-section avatar>
<q-icon color="primary" name="mdi-file" size="xs" />
</q-item-section>
<q-item-section class="text-dark">
รายงานผลการจายใบกำก
ญชรายชอขาราชการผขอพระราชทานเครองราชอสรยาภรณ
</q-item-section>
</q-item>
<q-item to="/insignia/report/report-01" dense class="hover-green">
<!-- <q-item to="/insignia/report/report-01" dense class="hover-green">
<q-item-section avatar>
<q-icon color="primary" name="mdi-file" size="xs" />
</q-item-section>

View file

@ -240,17 +240,16 @@ const downloadReport = async (
</q-btn>
<q-btn
unelevated
icon="mdi-eye"
icon="mdi-refresh"
color="primary"
label="แสดงรายงาน"
@click="conditionDocument('show')"
outline
/>
<q-btn
unelevated
color="blue"
icon="mdi-fullscreen"
@click="dialog = true"
dense
/>
</div>
</q-toolbar>