insignia
This commit is contained in:
parent
4b74271f0e
commit
896ac775c1
5 changed files with 446 additions and 210 deletions
|
|
@ -1,12 +1,19 @@
|
|||
divdivdivdiv
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from "vue";
|
||||
import { computed, reactive, ref, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import type { OptionPeriod } from "@/modules/07_insignia/interface/index/Main";
|
||||
import type { QTableProps } from "quasar";
|
||||
import type {
|
||||
OptionPeriod,
|
||||
OptionData,
|
||||
} from "@/modules/07_insignia/interface/index/Main";
|
||||
import type { FormQuery } from "@/modules/07_insignia/interface/request/Main";
|
||||
import type { ResponsePosition } from "@/modules/07_insignia/interface/response/Main";
|
||||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
|
|
@ -59,12 +66,10 @@ const options = ref<OptionPeriod[]>([
|
|||
{ label: "รอบการเสนอขอพระราชทานเครื่องราชฯ รอบที่ 2", value: 2 },
|
||||
]);
|
||||
|
||||
/**
|
||||
* Function เรียกข้อมูลของรอบการเสนอขอ
|
||||
*/
|
||||
function fetchData() {
|
||||
/** Function เรียกข้อมูลของรอบการเสนอขอ*/
|
||||
async function fetchData() {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.get(config.API.getRoundInsignia(roundId.value))
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
|
|
@ -88,9 +93,7 @@ function fetchData() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Function อัพเดทวันที่เริ่มต้น และ สิ้นสุด
|
||||
*/
|
||||
/** Function อัพเดทวันที่เริ่มต้น และ สิ้นสุด*/
|
||||
function updateDateRange() {
|
||||
if (roundInsig.value.value == 1) {
|
||||
dateStart.value = new Date(yearly.value, 9, 1);
|
||||
|
|
@ -120,12 +123,11 @@ function fileUploadDoc(files: any) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Function บันทึกข้อมูล
|
||||
*/
|
||||
/** Function บันทึกข้อมูล*/
|
||||
function onSubmit() {
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
const newEmpPosId = selected.value.map((e) => e.id);
|
||||
const formData = new FormData();
|
||||
const name = `รอบการเสนอขอพระราชทานเครื่องราชฯ รอบที่ ${
|
||||
roundInsig.value.value
|
||||
|
|
@ -134,6 +136,7 @@ function onSubmit() {
|
|||
formData.append("year", yearly.value.toString());
|
||||
formData.append("amount", datelast.value ? datelast.value.toString() : "");
|
||||
formData.append("round", roundInsig.value.value);
|
||||
|
||||
if (dateStart.value !== null) {
|
||||
formData.append("startDate", dateToISO(dateStart.value));
|
||||
}
|
||||
|
|
@ -141,6 +144,7 @@ function onSubmit() {
|
|||
formData.append("endDate", dateToISO(dateEnd.value));
|
||||
}
|
||||
formData.append("file", files.value);
|
||||
formData.append("empPosId", JSON.stringify(newEmpPosId));
|
||||
const url =
|
||||
actionType.value !== "edit"
|
||||
? config.API.listRoundInsignia()
|
||||
|
|
@ -165,7 +169,6 @@ function onSubmit() {
|
|||
|
||||
/**
|
||||
* function ปิด popup รอบการเสนอขอพระราชทานเครื่องราชอิสริยาภรณ์
|
||||
*
|
||||
* และกำหนดตัวแปรเป็นค่า Defult
|
||||
*/
|
||||
function onCloseDialog() {
|
||||
|
|
@ -191,17 +194,95 @@ function classInput(val: boolean) {
|
|||
};
|
||||
}
|
||||
|
||||
// ตัวเลือกค้นหา
|
||||
const optionFilter = ref<OptionData[]>([
|
||||
{ id: "positionName", name: "ชื่อตำแหน่ง" },
|
||||
{ id: "positionType", name: "กลุ่มงาน" },
|
||||
{ id: "positionLevel", name: "ระดับชั้นงาน" },
|
||||
]);
|
||||
|
||||
const formQuery = reactive<FormQuery>({
|
||||
keyword: "",
|
||||
type: "positionName",
|
||||
});
|
||||
const rows = ref<ResponsePosition[]>([]);
|
||||
const selected = ref<ResponsePosition[]>([]); //ราชชื่อที่เลือกส่งไปออกคำสั่ง
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "posDictName",
|
||||
align: "left",
|
||||
label: "ชื่อตำแหน่ง",
|
||||
sortable: true,
|
||||
field: "posDictName",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "posTypeName",
|
||||
align: "left",
|
||||
label: "กลุ่มงาน",
|
||||
sortable: true,
|
||||
field: "posTypeName",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "posLevelName",
|
||||
align: "left",
|
||||
label: "ระดับชั้นงาน",
|
||||
sortable: true,
|
||||
field: "posLevelName",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"posDictName",
|
||||
"posTypeName",
|
||||
"posLevelName",
|
||||
]);
|
||||
const pagination = ref({
|
||||
sortBy: "desc",
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
/**
|
||||
* ทำงานเมื่อ modal เป็น true actionType เป็น view
|
||||
*
|
||||
*
|
||||
* ฟังก์ชันดึงข้อมูลรายการตำแหน่งจาก API
|
||||
* @param statusType สถานะการส่งประเภทค้นหา (true = ไม่ส่งประเภทค้นหา)
|
||||
* เก็บข้อมูลรายการตำแหน่งจากไว้ใน rows.value
|
||||
*/
|
||||
async function fetchDataPos(statusType: boolean = false) {
|
||||
rows.value = [];
|
||||
showLoader();
|
||||
await http
|
||||
.get(
|
||||
config.API.orgEmployeePos +
|
||||
`?keyword=${formQuery.keyword}&type=${statusType ? "" : formQuery.type}`
|
||||
)
|
||||
.then(async (res) => {
|
||||
rows.value = await res.data.result;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/** ทำงานเมื่อ modal เป็น true actionType เป็น view*/
|
||||
watch(
|
||||
() => modal.value,
|
||||
() => {
|
||||
async () => {
|
||||
if (modal.value) {
|
||||
await fetchDataPos(true);
|
||||
selected.value = [];
|
||||
formQuery.keyword = "";
|
||||
formQuery.type = "positionName";
|
||||
if (actionType.value !== "") {
|
||||
fetchData();
|
||||
await fetchData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -210,192 +291,334 @@ watch(
|
|||
|
||||
<template>
|
||||
<q-dialog v-model="modal" persistent>
|
||||
<q-card style="width: 1200px; max-width: 80vw">
|
||||
<q-card style="min-width: 80vw">
|
||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||
<DialogHeader :tittle="title" :close="onCloseDialog" />
|
||||
<q-separator />
|
||||
|
||||
<q-card-section>
|
||||
<div class="col-12 row q-col-gutter-md">
|
||||
<div class="col-md-10 col-xs-12">
|
||||
<q-select
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
dense
|
||||
outlined
|
||||
v-model="roundInsig"
|
||||
:options="options"
|
||||
option-value="value"
|
||||
option-label="label"
|
||||
label="รอบการเสนอขอพระราชทานเครื่องราชฯ"
|
||||
@update:model-value="updateDateRange"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกรอบที่'}`]"
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
/>
|
||||
<q-card-section style="padding: 0px">
|
||||
<div class="col-12 row">
|
||||
<div class="col-xs-12 col-md-5 row no-wrap">
|
||||
<div class="col-12">
|
||||
<div class="col-12 row q-col-gutter-md q-pa-md">
|
||||
<div class="col-md-9 col-xs-12">
|
||||
<q-select
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
dense
|
||||
outlined
|
||||
v-model="roundInsig"
|
||||
:options="options"
|
||||
option-value="value"
|
||||
option-label="label"
|
||||
label="รอบการเสนอขอพระราชทานเครื่องราชฯ"
|
||||
@update:model-value="updateDateRange"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกรอบที่'}`]"
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
/>
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-12">
|
||||
<datepicker
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
menu-class-name="modalfix"
|
||||
v-model="yearly"
|
||||
: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
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
dense
|
||||
outlined
|
||||
hide-bottom-space
|
||||
:model-value="yearly + 543"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกปีที่เสนอ'}`]"
|
||||
:label="`${'ปีที่เสนอ'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="dateStart"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
:max-date="dateEnd"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
outlined
|
||||
dense
|
||||
:model-value="
|
||||
dateStart != null ? date2Thai(dateStart) : null
|
||||
"
|
||||
:label="`${'วันเริ่มต้น'}`"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันเริ่มต้น'}`]"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="dateEnd"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
:min-date="dateStart"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ 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="[
|
||||
(val:string) => !!val || `${'กรุณาเลือกวันที่วันสิ้นสุด'}`,
|
||||
]"
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<q-input
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
dense
|
||||
outlined
|
||||
v-model="datelast"
|
||||
label="จำนวนวันแจ้งเตือนก่อนวันสิ้นสุด"
|
||||
mask="###"
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
!!val || `${'กรุณากรอกจำนวนวันแจ้งเตือนก่อนวันสิ้นสุด'}`,
|
||||
]"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<div class="col-md-12 col-xs-12">
|
||||
<q-file
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
outlined
|
||||
dense
|
||||
v-model="files"
|
||||
@added="fileUploadDoc"
|
||||
label="อัปโหลดเอกสารประกอบ"
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
accept=".pdf,.xlsx,.doc"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
</template>
|
||||
</q-file>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 row">
|
||||
<q-separator :vertical="!$q.screen.lt.md" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-12">
|
||||
<datepicker
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
menu-class-name="modalfix"
|
||||
v-model="yearly"
|
||||
: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
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
dense
|
||||
outlined
|
||||
hide-bottom-space
|
||||
:model-value="yearly + 543"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกปีที่เสนอ'}`]"
|
||||
:label="`${'ปีที่เสนอ'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
|
||||
<div class="col-xs-12 col-md-7 row">
|
||||
<div class="col-12">
|
||||
<div class="row col-12 q-col-gutter-sm q-pa-md">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="row q-col-gutter-sm align-items-center">
|
||||
<div class="col-auto">
|
||||
<q-select
|
||||
label="ค้นหาจาก"
|
||||
v-model="formQuery.type"
|
||||
:options="optionFilter"
|
||||
emit-value
|
||||
dense
|
||||
map-options
|
||||
outlined
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<q-input
|
||||
ref="searchRef"
|
||||
v-model="formQuery.keyword"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
label="คำค้น"
|
||||
hide-bottom-space
|
||||
@keydown.enter="fetchDataPos()"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon
|
||||
v-if="formQuery.keyword"
|
||||
name="cancel"
|
||||
@click="formQuery.keyword = ''"
|
||||
class="cursor-pointer"
|
||||
></q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<div class="col-auto">
|
||||
<q-btn
|
||||
outline
|
||||
color="primary"
|
||||
icon="search"
|
||||
label="ค้นหา"
|
||||
class="full-width full-height"
|
||||
@click="fetchDataPos()"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-space />
|
||||
<div class="row q-col-gutter-sm align-items-center">
|
||||
<div class="col-auto">
|
||||
<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"
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-card
|
||||
bordered
|
||||
:class="
|
||||
pagination.rowsPerPage > 10 ? 'col-12 scroll' : 'col-12'
|
||||
"
|
||||
:style="pagination.rowsPerPage > 10 ? 'height: 75vh' : ''"
|
||||
>
|
||||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
row-key="id"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
:visible-columns="visibleColumns"
|
||||
selection="multiple"
|
||||
v-model:selected="selected"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="col-md-5 col-xs-12">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="dateStart"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
:max-date="dateEnd"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
outlined
|
||||
dense
|
||||
:model-value="
|
||||
dateStart != null ? date2Thai(dateStart) : null
|
||||
"
|
||||
:label="`${'วันเริ่มต้น'}`"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันเริ่มต้น'}`]"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="col-md-5 col-xs-12">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="dateEnd"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
:min-date="dateStart"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ 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="[
|
||||
(val:string) => !!val || `${'กรุณาเลือกวันที่วันสิ้นสุด'}`,
|
||||
]"
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-12">
|
||||
<q-input
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
dense
|
||||
outlined
|
||||
v-model="datelast"
|
||||
label="จำนวนวันแจ้งเตือนก่อนวันสิ้นสุด"
|
||||
mask="###"
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
!!val || `${'กรุณากรอกจำนวนวันแจ้งเตือนก่อนวันสิ้นสุด'}`,
|
||||
]"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<div class="col-md-12 col-xs-12">
|
||||
<q-file
|
||||
:class="classInput(!readonly)"
|
||||
:readonly="readonly"
|
||||
outlined
|
||||
dense
|
||||
v-model="files"
|
||||
@added="fileUploadDoc"
|
||||
label="อัปโหลดเอกสารประกอบ"
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
accept=".pdf,.xlsx,.doc"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
</template>
|
||||
</q-file>
|
||||
<template v-slot:header-selection="scope">
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="scope.selected"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="props.selected"
|
||||
/>
|
||||
</q-td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
>
|
||||
<div>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</q-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
|
|
|||
|
|
@ -45,9 +45,7 @@ const {
|
|||
onSearchDataTable,
|
||||
} = mixin;
|
||||
|
||||
/**
|
||||
* props
|
||||
*/
|
||||
/** props*/
|
||||
const props = defineProps({
|
||||
tab: {
|
||||
type: String,
|
||||
|
|
@ -426,9 +424,9 @@ async function addlistperson(id: string) {
|
|||
};
|
||||
await http
|
||||
.post(config.API.insigniaCreate(), data)
|
||||
.then(() => {
|
||||
.then(async () => {
|
||||
if (props.fecthInsigniaByOc) {
|
||||
props.fecthInsigniaByOc(
|
||||
await props.fecthInsigniaByOc(
|
||||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
|
|
@ -440,6 +438,8 @@ async function addlistperson(id: string) {
|
|||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
|
@ -577,7 +577,7 @@ async function listreject(profileId: string, reason: string) {
|
|||
props.tab
|
||||
);
|
||||
|
||||
success($q, "ย้ายข้อมูลสำเร็จ");
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
modelPopupReject.value = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -633,7 +633,7 @@ async function listdelete(id: string, reason: string) {
|
|||
"officer",
|
||||
props.tab
|
||||
);
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
closemodelPopupDelete();
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
|
|||
|
|
@ -187,10 +187,6 @@ function updatemodalPersonal(modal: boolean) {
|
|||
/** filter table*/
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterRef = ref<any>(null);
|
||||
const resetFilter = () => {
|
||||
filterKeyword.value = "";
|
||||
filterRef.value.focus();
|
||||
};
|
||||
const pagination = ref({
|
||||
sortBy: "name",
|
||||
descending: false,
|
||||
|
|
|
|||
|
|
@ -31,10 +31,16 @@ interface CheckboxData {
|
|||
name: string;
|
||||
val: boolean;
|
||||
}
|
||||
|
||||
interface FormQuery {
|
||||
type: string;
|
||||
keyword: string;
|
||||
}
|
||||
export type {
|
||||
FormProprsalsRound,
|
||||
FormProprsalsRound2,
|
||||
ItemType,
|
||||
ColId,
|
||||
CheckboxData,
|
||||
FormQuery,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -155,6 +155,16 @@ interface ResponseDataInsignia {
|
|||
items: ResponseManageList[];
|
||||
}
|
||||
|
||||
interface ResponsePosition {
|
||||
id: string;
|
||||
posDictName: string;
|
||||
posLevelId: string;
|
||||
posLevelName: number;
|
||||
posTypeId: string;
|
||||
posTypeName: string;
|
||||
posTypeShortName: string;
|
||||
}
|
||||
|
||||
export type {
|
||||
ResponseObject,
|
||||
ResponsePeriod,
|
||||
|
|
@ -166,4 +176,5 @@ export type {
|
|||
ResponseProfile,
|
||||
ResponseManageList,
|
||||
ResponseDataInsignia,
|
||||
ResponsePosition,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue