ui เครื่องราชฯ เมนูบันทึกผลการเสนอขอ
This commit is contained in:
parent
bfaf2bfccc
commit
b7ec4ea336
2 changed files with 585 additions and 137 deletions
|
|
@ -25,7 +25,18 @@ const selectRound = ref<string>("1");
|
|||
const selectRoundOption = ref<OptionData[]>([
|
||||
{ id: "1", name: "รอบการเสนอขอพระราชทานเครื่องราชฯ ปี 2566" },
|
||||
]);
|
||||
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterDoc = ref<any>(null);
|
||||
const resetFilterRef = () => {
|
||||
filterKeyword.value = "";
|
||||
filterDoc.value.focus();
|
||||
};
|
||||
const pagination = ref({
|
||||
sortBy: "filename",
|
||||
descending: true,
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
const visibleColumns = ref<String[]>([
|
||||
"no",
|
||||
"status",
|
||||
|
|
@ -39,6 +50,12 @@ const visibleColumns = ref<String[]>([
|
|||
"address",
|
||||
"action"
|
||||
]);
|
||||
const visibleColumnsReference = ref<String[]>([
|
||||
"no",
|
||||
"fileName",
|
||||
"annotation",
|
||||
"file",
|
||||
]);
|
||||
const filterRef = ref<QInput>();
|
||||
const filter = ref<string>("");
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -139,6 +156,53 @@ const columns = ref<QTableProps["columns"]>([
|
|||
field: "",
|
||||
},
|
||||
]);
|
||||
const colums2 = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
align: "left",
|
||||
label: "ลำดับ",
|
||||
field: "no",
|
||||
sortable: true,
|
||||
|
||||
},
|
||||
{
|
||||
name: "fileName",
|
||||
align: "left",
|
||||
label: "ชื่อเอกสาร",
|
||||
field: "fileName",
|
||||
sortable: true,
|
||||
|
||||
},
|
||||
{
|
||||
name: "annotation",
|
||||
align: "left",
|
||||
label: "หมายเหตุ",
|
||||
field: "annotation",
|
||||
sortable: true,
|
||||
|
||||
},
|
||||
{
|
||||
name: "file",
|
||||
align: "left",
|
||||
label: "ไฟล์เอกสาร",
|
||||
field: "file",
|
||||
sortable: true,
|
||||
},
|
||||
]);
|
||||
const rows2 = ref<any>([
|
||||
{
|
||||
no:"1",
|
||||
fileName:"test1",
|
||||
annotation:"ทดสอบ",
|
||||
file:""
|
||||
},
|
||||
{
|
||||
no:"2",
|
||||
fileName:"test2",
|
||||
annotation:"ทดสอบ",
|
||||
file:""
|
||||
}
|
||||
])
|
||||
const rows = ref<any>([
|
||||
{
|
||||
no: "1",
|
||||
|
|
@ -459,50 +523,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
|
|||
<Transition>
|
||||
<div class="bg-base rounded-borders q-pa-md q-mb-md">
|
||||
<div class="row col-12 q-col-gutter-x-lg q-col-gutter-y-md">
|
||||
<!-- <div class="col-xs-6 col-md-2">
|
||||
<q-input
|
||||
class="bg-white"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="issue"
|
||||
:label="`${'ฉบับ'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-2">
|
||||
<q-input
|
||||
class="bg-white"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="book"
|
||||
:label="`${'เล่มที่'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-2">
|
||||
<q-input
|
||||
class="bg-white"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="volume"
|
||||
:label="`${'เล่ม'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-2">
|
||||
<q-input
|
||||
class="bg-white"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="section"
|
||||
:label="`${'ตอนที่'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div> -->
|
||||
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<q-file
|
||||
class="bg-white"
|
||||
|
|
@ -540,92 +561,95 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
|
|||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<!-- <div class="col-xs-6 col-md-2">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="dateGoverment"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
class="full-width datepicker bg-white"
|
||||
:model-value="
|
||||
dateGoverment != null ? date2Thai(dateGoverment) : null
|
||||
"
|
||||
: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-xs-6 col-md-2">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="dateReceiver"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
class="full-width datepicker bg-white"
|
||||
:model-value="
|
||||
dateReceiver != null ? date2Thai(dateReceiver) : null
|
||||
"
|
||||
: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="row col-12">
|
||||
<q-space />
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
ref="filterDoc"
|
||||
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="resetFilterRef"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-select
|
||||
v-model="visibleColumnsReference"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="colums2"
|
||||
option-value="name"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 q-pt-sm">
|
||||
|
||||
<d-table
|
||||
:columns="colums2"
|
||||
:rows="rows2"
|
||||
:filter="filterKeyword"
|
||||
row-key="fileName"
|
||||
:visible-columns="visibleColumnsReference"
|
||||
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">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td key="no" :props="props" >
|
||||
{{ props.rowIndex + 1 }}
|
||||
</q-td>
|
||||
<q-td key="fileName" :props="props">
|
||||
{{ props.row.fileName }}
|
||||
</q-td>
|
||||
<q-td key="annotation" :props="props">
|
||||
{{ props.row.annotation }}
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
dense
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
color="deep-orange-6"
|
||||
@click="editData(props.row.no)"
|
||||
icon="picture_as_pdf"
|
||||
>
|
||||
<q-tooltip>ดาว์โหลด PDF</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-9">
|
||||
<!-- <p>
|
||||
วันที่ประกาศราชกิจจานุเบกษา <b>{{ date2Thai(new Date()) }}</b>
|
||||
</p> -->
|
||||
</div>
|
||||
<!-- <div class="col-xs-6 col-md-3">
|
||||
<p>
|
||||
วันที่ได้รับ <b>{{ date2Thai(new Date()) }}</b>
|
||||
</p>
|
||||
</div> -->
|
||||
|
||||
<div class="col-xs-12 col-md-3 flexsave">
|
||||
<q-btn label="บันทึก" @click="save" color="public" />
|
||||
</div>
|
||||
|
|
@ -650,7 +674,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
|
|||
}
|
||||
|
||||
.bg-base {
|
||||
background-color: #efefef;
|
||||
background-color: #f3f3f398;
|
||||
}
|
||||
|
||||
.v-enter-active,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue