- แก้คำผิดเครื่องราช
- เพิ่ม freez ข้อมูลคำขอส่งไปบันทึกผลเครื่องราช
This commit is contained in:
parent
38c4999a92
commit
1182b3f542
6 changed files with 131 additions and 381 deletions
|
|
@ -1,20 +1,11 @@
|
|||
<template>
|
||||
<div class="col-xs-12 col-sm-12 col-md-11">
|
||||
<div class="toptitle col-12 row items-center">
|
||||
<q-btn
|
||||
icon="mdi-arrow-left"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
flat
|
||||
color="primary"
|
||||
class="q-mr-sm"
|
||||
@click="clickBack"
|
||||
/>
|
||||
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm" @click="clickBack" />
|
||||
{{
|
||||
edit
|
||||
? "รอบการเสนอขอพระราชทานเครื่องราชอิสริยาภรณ์"
|
||||
: "เพิ่มรอบการเสนอขอพระราชทานเครื่องราชอิสริยาภรณ์"
|
||||
? "รอบการเสนอขอพระราชทานเครื่องราชอิสริยาภรณ์"
|
||||
: "เพิ่มรอบการเสนอขอพระราชทานเครื่องราชอิสริยาภรณ์"
|
||||
}}
|
||||
</div>
|
||||
<q-form ref="myForm">
|
||||
|
|
@ -24,62 +15,27 @@
|
|||
<div class="col-xs-12 col-sm-12 row">
|
||||
<q-separator />
|
||||
<div class="col-12 row q-pa-sm q-col-gutter-sm">
|
||||
<q-select
|
||||
class="col-10"
|
||||
dense
|
||||
outlined
|
||||
v-model="roundInsig"
|
||||
:options="options"
|
||||
option-value="value"
|
||||
option-label="label"
|
||||
label="รอบการเสนอขอพระราชทานเครื่องราชฯ"
|
||||
@update:model-value="updateDateRange"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกรอบที่'}`]"
|
||||
/>
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="yearly"
|
||||
class="col-2"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
@update:modelValue="updateYear"
|
||||
>
|
||||
<q-select class="col-10" dense outlined v-model="roundInsig" :options="options" option-value="value"
|
||||
option-label="label" label="รอบการเสนอขอพระราชทานเครื่องราชฯ" @update:model-value="updateDateRange"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกรอบที่'}`]" />
|
||||
<datepicker menu-class-name="modalfix" v-model="yearly" class="col-2" :locale="'th'" autoApply year-picker
|
||||
:enableTimePicker="false" @update:modelValue="updateYear">
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
:model-value="yearly + 543"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกปีที่เสนอ'}`]"
|
||||
:label="`${'ปีที่เสนอ'}`"
|
||||
>
|
||||
<q-input dense lazy-rules outlined :model-value="yearly + 543"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกปีที่เสนอ'}`]" :label="`${'ปีที่เสนอ'}`">
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="dateStart"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
class="col-xs-12 col-sm-5"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<datepicker menu-class-name="modalfix" v-model="dateStart" :locale="'th'" autoApply
|
||||
class="col-xs-12 col-sm-5" borderless :enableTimePicker="false" week-start="0">
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
|
|
@ -87,37 +43,17 @@
|
|||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
dateStart != null ? date2Thai(dateStart) : null
|
||||
"
|
||||
:label="`${'วันเริ่มต้น'}`"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกวันเริ่มต้น'}`]"
|
||||
>
|
||||
<q-input outlined dense class="full-width datepicker" :model-value="dateStart != null ? date2Thai(dateStart) : null
|
||||
" :label="`${'วันเริ่มต้น'}`" :rules="[(val) => !!val || `${'กรุณาเลือกวันเริ่มต้น'}`]">
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="dateEnd"
|
||||
class="col-xs-12 col-sm-5"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<datepicker menu-class-name="modalfix" v-model="dateEnd" class="col-xs-12 col-sm-5" :locale="'th'"
|
||||
autoApply borderless :enableTimePicker="false" week-start="0">
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
|
|
@ -125,45 +61,22 @@
|
|||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
class="col-xs-12 col-sm-4"
|
||||
:model-value="dateEnd != null ? date2Thai(dateEnd) : null"
|
||||
:label="`${'วันสิ้นสุด'}`"
|
||||
:rules="[
|
||||
<q-input outlined dense class="col-xs-12 col-sm-4"
|
||||
:model-value="dateEnd != null ? date2Thai(dateEnd) : null" :label="`${'วันสิ้นสุด'}`" :rules="[
|
||||
(val) => !!val || `${'กรุณาเลือกวันที่วันสิ้นสุด'}`,
|
||||
]"
|
||||
>
|
||||
]">
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-2"
|
||||
dense
|
||||
outlined
|
||||
v-model="datelast"
|
||||
label="จำนวนวันแจ้งเตือนก่อนวันสิ้นสุด"
|
||||
/>
|
||||
<q-file
|
||||
class="col-xs-12 col-sm-10"
|
||||
outlined
|
||||
dense
|
||||
v-model="files"
|
||||
@added="fileUploadDoc"
|
||||
label="อัปโหลดเอกสารประกอบ"
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
>
|
||||
<q-input class="col-xs-12 col-sm-2" dense outlined v-model="datelast"
|
||||
label="จำนวนวันแจ้งเตือนก่อนวันสิ้นสุด" />
|
||||
<q-file class="col-xs-12 col-sm-10" outlined dense v-model="files" @added="fileUploadDoc"
|
||||
label="อัปโหลดเอกสารประกอบ" hide-bottom-space lazy-rules>
|
||||
<!-- :rules="[
|
||||
(val) => val || 'กรุณาเลือกไฟล์หนังสือถึงหน่วยงานที่รับโอน',
|
||||
]" -->
|
||||
|
|
@ -178,14 +91,8 @@
|
|||
<q-separator />
|
||||
<div class="row col-12 q-pa-sm">
|
||||
<q-space />
|
||||
<q-btn
|
||||
unelevated
|
||||
dense
|
||||
class="q-px-md items-center"
|
||||
color="light-blue-10"
|
||||
label="บันทึก"
|
||||
@click="checkSave"
|
||||
/>
|
||||
<q-btn unelevated dense class="q-px-md items-center" color="light-blue-10" label="บันทึก"
|
||||
@click="checkSave" />
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
|
|
@ -278,9 +185,7 @@ const updateYear = async (e: number) => {
|
|||
|
||||
const editData = async (id: string) => {
|
||||
const formData = new FormData();
|
||||
const name = `รอบการเสนอขอพระราชทานเครื่องราชรอบที่ ${
|
||||
roundInsig.value.value
|
||||
} ปี ${yearly.value + 543} `;
|
||||
const name = `รอบการเสนอขอพระราชทานเครื่องราชรอบที่ ${roundInsig.value.value} ปี ${yearly.value + 543}`;
|
||||
formData.append("name", name);
|
||||
formData.append("year", yearly.value.toString());
|
||||
formData.append("amount", datelast.value.toString());
|
||||
|
|
@ -299,7 +204,7 @@ const editData = async (id: string) => {
|
|||
showLoader();
|
||||
await http
|
||||
.put(config.API.editRoundInsignia(id), formData)
|
||||
.then(async () => {})
|
||||
.then(async () => { })
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
|
|
@ -352,9 +257,8 @@ const updateDateRange = () => {
|
|||
|
||||
const addData = async () => {
|
||||
const formData = new FormData();
|
||||
const name = `รอบการเสนอขอพระราชทานเครื่องราชรอบที่ ${
|
||||
roundInsig.value.value
|
||||
} ปี ${yearly.value + 543} `;
|
||||
const name = `รอบการเสนอขอพระราชทานเครื่องราชรอบที่ ${roundInsig.value.value
|
||||
} ปี ${yearly.value + 543} `;
|
||||
console.log(name);
|
||||
formData.append("name", name);
|
||||
formData.append("year", yearly.value.toString());
|
||||
|
|
@ -376,7 +280,7 @@ const addData = async () => {
|
|||
showLoader();
|
||||
await http
|
||||
.post(config.API.listRoundInsignia(), formData)
|
||||
.then(async (res) => {})
|
||||
.then(async (res) => { })
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
|
|
|
|||
|
|
@ -194,6 +194,9 @@ const props = defineProps({
|
|||
roleUser: {
|
||||
type: String,
|
||||
},
|
||||
requestStatus: {
|
||||
type: String,
|
||||
}
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
|
|
@ -522,113 +525,40 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
|||
<div class="row col-12">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<!-- {{ DataStore.typeinsigniaOptions }} -->
|
||||
<q-select
|
||||
v-if="props.roleUser == 'admin'"
|
||||
v-model="organization"
|
||||
label="หน่วยงาน"
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
:options="organizationOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
:readonly="false"
|
||||
:borderless="false"
|
||||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
style="min-width: 150px"
|
||||
@update:model-value="changtypeOc"
|
||||
/>
|
||||
<q-select
|
||||
v-model="DataStore.typeinsignia"
|
||||
label="ปรเภทเครื่องราชฯ"
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
:options="DataStore.typeinsigniaOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
:readonly="false"
|
||||
:borderless="false"
|
||||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
style="min-width: 150px"
|
||||
@update:model-value="DataStore.searchFilterTable"
|
||||
/>
|
||||
<q-select v-if="props.roleUser == 'admin'" v-model="organization" label="หน่วยงาน" dense emit-value map-options
|
||||
:options="organizationOptions" option-value="id" option-label="name" lazy-rules hide-bottom-space
|
||||
:readonly="false" :borderless="false" :outlined="true" :hide-dropdown-icon="false" style="min-width: 150px"
|
||||
@update:model-value="changtypeOc" />
|
||||
<q-select v-model="DataStore.typeinsignia" label="ปรเภทเครื่องราชฯ" dense emit-value map-options
|
||||
:options="DataStore.typeinsigniaOptions" option-value="id" option-label="name" lazy-rules hide-bottom-space
|
||||
:readonly="false" :borderless="false" :outlined="true" :hide-dropdown-icon="false" style="min-width: 150px"
|
||||
@update:model-value="DataStore.searchFilterTable" />
|
||||
<div>
|
||||
<q-btn size="md" icon="mdi-download" flat round color="primary">
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="add"
|
||||
icon="mdi-plus"
|
||||
@click="clickmodalAdd"
|
||||
>
|
||||
<q-btn size="12px" flat round color="add" icon="mdi-plus" @click="clickmodalAdd">
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<q-space />
|
||||
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
>
|
||||
<q-input class="col-xs-12 col-sm-3 col-md-2" standout dense v-model="filterKeyword" ref="filterRef" outlined
|
||||
debounce="300" placeholder="ค้นหา">
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filterKeyword !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/>
|
||||
<q-icon v-if="filterKeyword !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-select
|
||||
v-model="visibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
/>
|
||||
<q-select v-model="visibleColumns" multiple outlined dense options-dense :display-value="$q.lang.table.columns"
|
||||
emit-value map-options :options="columns" option-value="name" options-cover style="min-width: 150px"
|
||||
class="col-xs-12 col-sm-3 col-md-2" />
|
||||
</div>
|
||||
<div class="col-12 q-pt-sm">
|
||||
<q-table
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:rows="DataStore.rows"
|
||||
:filter="filterKeyword"
|
||||
row-key="name"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
:pagination-label="paginationLabel"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<q-table ref="table" :columns="columns" :rows="DataStore.rows" :filter="filterKeyword" row-key="name" flat
|
||||
bordered :paging="true" dense class="custom-header-table" :visible-columns="visibleColumns"
|
||||
:pagination-label="paginationLabel" v-model:pagination="pagination">
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
|
|
@ -638,11 +568,7 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr
|
||||
:props="props"
|
||||
class="cursor-pointer"
|
||||
@click.stop="nextPage(props.row.profileId)"
|
||||
>
|
||||
<q-tr :props="props" class="cursor-pointer" @click.stop="nextPage(props.row.profileId)">
|
||||
<q-td key="no" :props="props">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</q-td>
|
||||
|
|
@ -674,63 +600,26 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
|||
{{ props.row.dateSend }}
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
icon="mdi-dots-vertical"
|
||||
size="12px"
|
||||
color="grey-7"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
@click.stop
|
||||
>
|
||||
<q-btn v-if="(roleUser == 'admin') || (roleUser == 'insignia1' && (requestStatus == 'st1' || requestStatus == 'st4'))" icon="mdi-dots-vertical" size="12px"
|
||||
color="grey-7" flat round dense @click.stop>
|
||||
<q-menu transition-show="jump-down" transition-hide="jump-up">
|
||||
<q-list dense style="min-width: 250px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click.stop="clickmodalEdit(props.row)"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-item clickable v-close-popup @click.stop="clickmodalEdit(props.row)">
|
||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||
<q-tooltip>แก้ไขเครื่องราชฯ ที่ยื่นขอ</q-tooltip>
|
||||
<q-icon color="primary" size="xs" name="mdi-pencil" />
|
||||
</q-item-section>
|
||||
<q-item-section
|
||||
>แก้ไขเครื่องราชฯ ที่ยื่นขอ</q-item-section
|
||||
>
|
||||
<q-item-section>แก้ไขเครื่องราชฯ ที่ยื่นขอ</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click.stop="clickReject(props.row.id)"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-item clickable v-close-popup @click.stop="clickReject(props.row.id)">
|
||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||
<q-tooltip>ไม่ยื่นขอ</q-tooltip>
|
||||
<q-icon
|
||||
color="blue"
|
||||
size="xs"
|
||||
name="mdi-alert-circle-outline"
|
||||
/>
|
||||
<q-icon color="blue" size="xs" name="mdi-alert-circle-outline" />
|
||||
</q-item-section>
|
||||
<q-item-section>ไม่ยื่นขอ</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click.stop="clickDelete(props.row.id)"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-item clickable v-close-popup @click.stop="clickDelete(props.row.id)">
|
||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||
<q-tooltip>ลบออก</q-tooltip>
|
||||
<q-icon color="red" size="xs" name="mdi-delete" />
|
||||
</q-item-section>
|
||||
|
|
@ -743,16 +632,8 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
<q-pagination
|
||||
v-model="pagination.page"
|
||||
active-color="primary"
|
||||
color="primary"
|
||||
:max="scope.pagesNumber"
|
||||
:max-pages="5"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
<q-pagination v-model="pagination.page" active-color="primary" color="primary" :max="scope.pagesNumber"
|
||||
:max-pages="5" size="sm" boundary-links direction-links></q-pagination>
|
||||
</template>
|
||||
</q-table>
|
||||
</div>
|
||||
|
|
@ -764,44 +645,21 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
|||
<q-card style="width: 850px; max-width: 80vw" class="q-pb-md">
|
||||
<q-toolbar class="q-py-md">
|
||||
<q-toolbar-title class="text-h6">เพิ่มรายชื่อ </q-toolbar-title>
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
@click="modalAdd = false"
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
/>
|
||||
<q-btn icon="close" unelevated round dense @click="modalAdd = false"
|
||||
style="color: #ff8080; background-color: #ffdede" />
|
||||
</q-toolbar>
|
||||
<q-separator />
|
||||
<div class="q-pa-md">
|
||||
<q-toolbar style="padding: 0">
|
||||
<q-input
|
||||
borderless
|
||||
outlined
|
||||
dense
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
style="width: 850px; max-width: auto"
|
||||
v-model="filterKeyword2"
|
||||
>
|
||||
<q-input borderless outlined dense debounce="300" placeholder="ค้นหา" style="width: 850px; max-width: auto"
|
||||
v-model="filterKeyword2">
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
</q-toolbar>
|
||||
<q-table
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
:rows="rows2"
|
||||
:columns="columns2"
|
||||
:filter="filterKeyword2"
|
||||
row-key="name"
|
||||
class="custom-header-table"
|
||||
:pagination-label="paginationLabel2"
|
||||
v-model:pagination="pagination2"
|
||||
>
|
||||
<q-table flat bordered dense :rows="rows2" :columns="columns2" :filter="filterKeyword2" row-key="name"
|
||||
class="custom-header-table" :pagination-label="paginationLabel2" v-model:pagination="pagination2">
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
|
|
@ -827,27 +685,14 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
|||
{{ props.row.organizationOrganization }}
|
||||
</q-td>
|
||||
<q-td>
|
||||
<q-btn
|
||||
outline
|
||||
:props="props"
|
||||
label="เพิ่ม"
|
||||
class="text-teal-5"
|
||||
@click="clickAdd(props.row.id)"
|
||||
/>
|
||||
<q-btn outline :props="props" label="เพิ่ม" class="text-teal-5" @click="clickAdd(props.row.id)" />
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
<q-pagination
|
||||
v-model="pagination2.page"
|
||||
color="primary"
|
||||
:max="scope.pagesNumber"
|
||||
:max-pages="5"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
<q-pagination v-model="pagination2.page" color="primary" :max="scope.pagesNumber" :max-pages="5" size="sm"
|
||||
boundary-links direction-links></q-pagination>
|
||||
</template>
|
||||
</q-table>
|
||||
</div>
|
||||
|
|
@ -858,39 +703,18 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
|||
<q-dialog v-model="modalEdit" persistent>
|
||||
<q-card style="width: 450px; max-width: 80vw" class="q-pb-md">
|
||||
<q-toolbar class="q-py-md">
|
||||
<q-toolbar-title class="text-h6"
|
||||
>แก้ไขเครื่องราชฯ ที่ยื่นขอ
|
||||
<q-toolbar-title class="text-h6">แก้ไขเครื่องราชฯ ที่ยื่นขอ
|
||||
</q-toolbar-title>
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
@click="modalEdit = false"
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
/>
|
||||
<q-btn icon="close" unelevated round dense @click="modalEdit = false"
|
||||
style="color: #ff8080; background-color: #ffdede" />
|
||||
</q-toolbar>
|
||||
<q-separator />
|
||||
<div class="q-pa-md">
|
||||
<div class="row q-col-gutter-sm">
|
||||
<div class="col">
|
||||
<q-select
|
||||
v-model="insignia"
|
||||
label="ชื่อเครื่องราชฯ"
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
:options="insigniaOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
:readonly="false"
|
||||
:borderless="false"
|
||||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
style="min-width: 150px"
|
||||
/>
|
||||
<q-select v-model="insignia" label="ชื่อเครื่องราชฯ" dense emit-value map-options :options="insigniaOptions"
|
||||
option-value="id" option-label="name" lazy-rules hide-bottom-space :readonly="false" :borderless="false"
|
||||
:outlined="true" :hide-dropdown-icon="false" style="min-width: 150px" />
|
||||
</div>
|
||||
<!-- <div class="col">
|
||||
<q-select
|
||||
|
|
@ -922,20 +746,10 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
|||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<DialogPopupReason
|
||||
:modal="modelPopupReject"
|
||||
title="เหตุผลไม่ยื่นของ"
|
||||
label="หมายเหตุ"
|
||||
:click-close="closemodelPopupReject"
|
||||
:savaForm="savaReasonReject"
|
||||
/>
|
||||
<DialogPopupReason
|
||||
:modal="modelPopupDelete"
|
||||
title="เหตุผลที่ลบออก"
|
||||
label="หมายเหตุ"
|
||||
:click-close="closemodelPopupDelete"
|
||||
:savaForm="savaReasonDelete"
|
||||
/>
|
||||
<DialogPopupReason :modal="modelPopupReject" title="เหตุผลไม่ยื่นของ" label="หมายเหตุ"
|
||||
:click-close="closemodelPopupReject" :savaForm="savaReasonReject" />
|
||||
<DialogPopupReason :modal="modelPopupDelete" title="เหตุผลที่ลบออก" label="หมายเหตุ"
|
||||
:click-close="closemodelPopupDelete" :savaForm="savaReasonDelete" />
|
||||
|
||||
<!-- note -->
|
||||
<!-- <q-dialog v-model="modalNote" persistent>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ const $q = useQuasar(); //ใช้ noti quasar
|
|||
|
||||
const loading = ref<boolean>(false);
|
||||
const round = ref<string>("");
|
||||
const roundName = ref<string>("");
|
||||
const optionRound = ref<any>([]);
|
||||
// const typeOc = ref<string>("kljkljk");
|
||||
const optiontypeOc = ref<any>([]);
|
||||
|
|
@ -141,6 +142,8 @@ const changround = async () => {
|
|||
? DataStore.agency
|
||||
: DataStore.typeOc);
|
||||
fecthInsigniaByOc(round.value, organization, "officer", tab.value);
|
||||
// get round name
|
||||
roundName.value = optionRound.value.find((x: any) => round.value === x.id).name
|
||||
};
|
||||
// const fecthInsigniaAll = async (periodId: string, tab: string) => {
|
||||
// // let data: any = [];
|
||||
|
|
@ -263,11 +266,32 @@ const directorApproved = async () => {
|
|||
'ยืนยันการอนุมัติ',
|
||||
'ต้องการยืนยันการอนุมัติใช่หรือไม่?');
|
||||
};
|
||||
|
||||
const requestSendNote = async () => {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.insigniaRequestSendNote(round.value), { name: roundName.value })
|
||||
.then(async () => {
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
await fecthInsigniaByOc(round.value, DataStore.agency, "officer", tab.value);
|
||||
})
|
||||
.catch((err) => {
|
||||
// console.log(err);
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
รายชื่อข้าราชการสามัญฯ ที่มีสิทธิ์ยื่นขอพระราชทานเครื่องราชย์อิสริยาภรณ์
|
||||
รายชื่อข้าราชการสามัญฯ ที่มีสิทธิ์ยื่นขอพระราชทานเครื่องราชอิสริยาภรณ์
|
||||
</div>
|
||||
<q-card bordered class="row col-12 q-mt-sm">
|
||||
<div class="bg-grey-1 col-12 row items-center">
|
||||
|
|
@ -306,7 +330,8 @@ const directorApproved = async () => {
|
|||
<q-separator />
|
||||
<q-tab-panels v-model="tab" animated>
|
||||
<q-tab-panel name="pending" class="q-pa-none">
|
||||
<tab1 :tab="tab" :roundId="round" :fecthInsigniaByOc="fecthInsigniaByOc" :role-user="roleUser" />
|
||||
<tab1 :tab="tab" :roundId="round" :fecthInsigniaByOc="fecthInsigniaByOc" :role-user="roleUser"
|
||||
:request-status="requestStatus" />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="reject" class="q-pa-none">
|
||||
<tab2 :tab="tab" :roundId="round" :fecthInsigniaByOc="fecthInsigniaByOc" :role-user="roleUser" />
|
||||
|
|
@ -321,15 +346,20 @@ const directorApproved = async () => {
|
|||
|
||||
<q-toolbar class="q-py-md text-right">
|
||||
<q-space />
|
||||
<q-btn v-if="roleUser == 'insignia1' && (requestStatus == 'st1' || requestStatus == 'st4')" dense unelevated label="บันทึกข้อมูล" color="public"
|
||||
class="q-px-md" @click="sendToDirector" />
|
||||
<q-btn v-if="roleUser == 'insignia1' && (requestStatus == 'st1' || requestStatus == 'st4')" dense unelevated
|
||||
label="บันทึกข้อมูล" color="public" class="q-px-md" @click="sendToDirector" />
|
||||
<q-btn v-if="roleUser == 'insignia2' && requestStatus == 'st3'" dense unelevated label="ตีกลับ" color="orange"
|
||||
class="q-px-md" @click="popupBackToEdit" />
|
||||
<q-btn v-if="roleUser == 'insignia2' && requestStatus == 'st3'" dense unelevated label="อนุมัติ" color="positive"
|
||||
class="q-px-md q-ml-md" @click="directorApproved" />
|
||||
|
||||
<!-- สกจ. Freez ข้อมูล -->
|
||||
<q-btn v-if="roleUser == 'admin'" dense unelevated label="บันทึกข้อมูล" color="public" class="q-px-md q-ml-md"
|
||||
@click="requestSendNote" />
|
||||
</q-toolbar>
|
||||
|
||||
<DialogPopupReason :modal="modalPopupBackToEdit" title="หมายเหตุการตีกลับ" label="หมายเหตุ" :click-close="closeModalPopupBackToEdit" :savaForm="backToEdit" />
|
||||
<DialogPopupReason :modal="modalPopupBackToEdit" title="หมายเหตุการตีกลับ" label="หมายเหตุ"
|
||||
:click-close="closeModalPopupBackToEdit" :savaForm="backToEdit" />
|
||||
</q-card>
|
||||
</template>
|
||||
|
||||
|
|
@ -338,6 +368,7 @@ const directorApproved = async () => {
|
|||
border: 1px solid #FFA800;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.filter-card {
|
||||
background-color: #f1f1f1b0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -349,7 +349,7 @@ const resetFilter = () => {
|
|||
><q-icon color="green-7" name="mdi-file-excel"
|
||||
/></q-item-section>
|
||||
<q-item-section
|
||||
>บันทึกผลการได้รับพระราชทานเครื่องราชย์อิสริยสภรณ์</q-item-section
|
||||
>บันทึกผลการได้รับพระราชทานเครื่องราชอิสริยาภรณ์</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup>
|
||||
|
|
@ -530,7 +530,7 @@ const resetFilter = () => {
|
|||
><q-icon color="green-7" name="mdi-file-excel"
|
||||
/></q-item-section>
|
||||
<q-item-section
|
||||
>บันทึกผลการได้รับพระราชทานเครื่องราชย์อิสริยสภรณ์</q-item-section
|
||||
>บันทึกผลการได้รับพระราชทานเครื่องราชอิสริยาภรณ์</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup>
|
||||
|
|
@ -662,7 +662,7 @@ const resetFilter = () => {
|
|||
><q-icon color="green-7" name="mdi-file-excel"
|
||||
/></q-item-section>
|
||||
<q-item-section
|
||||
>บันทึกผลการได้รับพระราชทานเครื่องราชย์อิสริยสภรณ์</q-item-section
|
||||
>บันทึกผลการได้รับพระราชทานเครื่องราชอิสริยาภรณ์</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup>
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ const resetFilter = () => {
|
|||
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
บันทึกผลการได้รับพระราชทานเครื่องราชย์อิสริยสภรณ์/การจ่ายใบกำกับ
|
||||
บันทึกผลการได้รับพระราชทานเครื่องราชอิสริยาภรณ์/การจ่ายใบกำกับ
|
||||
</div>
|
||||
<q-card flat bordered class="col-12 q-my-md q-mt-sm rounded-borders">
|
||||
<div class="bg-grey-1 col-12 row items-center">
|
||||
|
|
@ -388,7 +388,7 @@ const resetFilter = () => {
|
|||
clearable
|
||||
outlined
|
||||
v-model="fileResult"
|
||||
label="บันทึกผลการได้รับพระราชทานเครื่องราชย์อิสริยสภรณ์"
|
||||
label="บันทึกผลการได้รับพระราชทานเครื่องราชอิสริยาภรณ์"
|
||||
style="min-width: auto"
|
||||
accept=".xlsx"
|
||||
>
|
||||
|
|
@ -396,7 +396,7 @@ const resetFilter = () => {
|
|||
<q-icon name="attach_file" />
|
||||
</template>
|
||||
<q-tooltip
|
||||
>อัพโหลดไฟล์บันทึกผลการได้รับพระราชทานเครื่องราชย์อิสริยสภรณ์</q-tooltip
|
||||
>อัพโหลดไฟล์บันทึกผลการได้รับพระราชทานเครื่องราชอิสริยาภรณ์</q-tooltip
|
||||
>
|
||||
</q-file>
|
||||
</div>
|
||||
|
|
@ -410,7 +410,7 @@ const resetFilter = () => {
|
|||
@click="uploadFile(fileResult, 'result')"
|
||||
>
|
||||
<q-tooltip
|
||||
>อัพโหลดไฟล์บันทึกผลการได้รับพระราชทานเครื่องราชย์อิสริยสภรณ์</q-tooltip
|
||||
>อัพโหลดไฟล์บันทึกผลการได้รับพระราชทานเครื่องราชอิสริยาภรณ์</q-tooltip
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue