Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into me
This commit is contained in:
commit
0c443cb6e3
13 changed files with 934 additions and 805 deletions
|
|
@ -60,7 +60,7 @@ export default {
|
|||
|
||||
|
||||
|
||||
|
||||
summarySurveyDetail:(id:string) => `${evaluate}/survey?assign_id=${id}`
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@ export default {
|
|||
insigniaSendToDirector: (roundId: string, ocId: string) => `${insignia}/request/officer/approve/${roundId}/${ocId}`,
|
||||
insigniaDirectorBackToEdit: (roundId: string, ocId: string) => `${insignia}/request/director/reject/${roundId}/${ocId}`,
|
||||
insigniaDirectorApproved: (roundId: string, ocId: string) => `${insignia}/request/director/approve/${roundId}/${ocId}`,
|
||||
|
||||
insigniaRequestSendNote: (insigniaPeriodId: string) => `${insignia}/insignia/request/send/note/${insigniaPeriodId}`,
|
||||
|
||||
// uploadfile
|
||||
uploadfilereceice: (noteId: string) => `${insignia}/request/import/receice/${noteId}`,
|
||||
uploadfileinvoice: (noteId: string) => `${insignia}/request/import/invoice/${noteId}`,
|
||||
|
|
|
|||
|
|
@ -32,8 +32,9 @@ const score2 = ref<number>(0);
|
|||
const score3 = ref<number>(0);
|
||||
const Allscore = ref<number>(0);
|
||||
|
||||
const comment_1 = ref<string>("");
|
||||
const comment_2 = ref<string>("");
|
||||
const answer1 = ref<string>("");
|
||||
const answer2 = ref<string>("");
|
||||
const answer3 = ref<number>(0);
|
||||
|
||||
const result = ref<any>();
|
||||
const result_option = ref<any>([
|
||||
|
|
@ -55,68 +56,47 @@ const cancel = () => {
|
|||
status.value = false;
|
||||
};
|
||||
|
||||
const getSurveyData = async () => {
|
||||
await http
|
||||
.get(config.API.summarySurveyDetail(assignId.value))
|
||||
.then((res: any) => {
|
||||
const data = res.data.data;
|
||||
answer1.value = data.answer1,
|
||||
answer2.value = data.answer2,
|
||||
answer3.value = data.answer3
|
||||
status.value = false
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
};
|
||||
const save = () => {
|
||||
const data = {
|
||||
answer1: answer1.value,
|
||||
answer2: answer2.value,
|
||||
answer3: answer3.value,
|
||||
};
|
||||
dialogConfirm($q, async () => {
|
||||
await http
|
||||
.post(config.API.summarySurveyDetail(assignId.value), data)
|
||||
.then((res: any) => {
|
||||
// console.log(res);
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
});
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
// fecthResult(assignId.value);
|
||||
getSurveyData();
|
||||
});
|
||||
|
||||
// const fecthResult = async (id: string) => {
|
||||
// await http
|
||||
// .get(config.API.createformReport(id))
|
||||
// .then((res: any) => {
|
||||
// let data = res.data.data.evaluate;
|
||||
// console.log(data);
|
||||
// date_start.value = data.date_start;
|
||||
// date_finish.value = data.date_finish;
|
||||
// develop.value = Number(data.develop_complete);
|
||||
// result.value = Number(data.pass_result);
|
||||
// reson.value = data.reson;
|
||||
// chairman_dated.value = data.chairman_dated;
|
||||
// director1_dated.value = data.director1_dated;
|
||||
// director2_dated.value = data.director2_dated;
|
||||
// status.value = false;
|
||||
// action.value = 'edit';
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// console.log(e);
|
||||
// });
|
||||
// };
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="row col-12 q-ma-xs">
|
||||
<div class="toptitle text-dark col-12 row items-center q-gutter-md">
|
||||
<div>แบบสํารวจความคิดเห็นการทดลองปฏิบัติหน้าที่ราชการ</div>
|
||||
<!-- <q-space /> -->
|
||||
<!-- <div v-if="action == 'edit'">
|
||||
<div v-if="status == false">
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
@click="edit()"
|
||||
icon="mdi-pencil-outline"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-btn dense flat @click="cancel()" round color="red" icon="mdi-undo">
|
||||
<q-tooltip>ยกเลิก</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
round
|
||||
class="q-ml-sm"
|
||||
color="public"
|
||||
@click="saveEdit(assignId)"
|
||||
icon="mdi-content-save-outline"
|
||||
>
|
||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="col-12 row">
|
||||
<div class="col-12 text-top0 items-center">
|
||||
|
|
@ -125,12 +105,13 @@ onMounted(() => {
|
|||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:disable="!status"
|
||||
label="ความคิดเห็น"
|
||||
class="bg-white"
|
||||
dense
|
||||
borderless
|
||||
outlined
|
||||
v-model="comment_1"
|
||||
v-model="answer1"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -142,12 +123,13 @@ onMounted(() => {
|
|||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:disable="!status"
|
||||
label="ความคิดเห็น"
|
||||
class="bg-white"
|
||||
dense
|
||||
borderless
|
||||
outlined
|
||||
v-model="comment_2"
|
||||
v-model="answer2"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -161,7 +143,7 @@ onMounted(() => {
|
|||
<q-space />
|
||||
<q-rating
|
||||
:disable="!status"
|
||||
v-model="knowledge_level"
|
||||
v-model="answer3"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
|
|
@ -185,6 +167,14 @@ onMounted(() => {
|
|||
</template>
|
||||
</q-rating>
|
||||
</div>
|
||||
<div class="col-12 q-my-md">
|
||||
<q-separator size="3px" color="grey-2" />
|
||||
</div>
|
||||
<!-- <Footer /> -->
|
||||
<div class="row col-12">
|
||||
<q-space />
|
||||
<q-btn label="บันทึก" color="secondary" @click="save" v-if="status" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -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,9 @@ const changround = async () => {
|
|||
? DataStore.agency
|
||||
: DataStore.typeOc);
|
||||
fecthInsigniaByOc(round.value, organization, "officer", tab.value);
|
||||
// get round name
|
||||
const roundFilter = await optionRound.value.find((x: any) => round.value === x.id)
|
||||
roundName.value = `รอบการเสนอขอพระราชทานเครื่องราชปี ${roundFilter.year + 543}`
|
||||
};
|
||||
// const fecthInsigniaAll = async (periodId: string, tab: string) => {
|
||||
// // let data: any = [];
|
||||
|
|
@ -263,11 +267,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 +331,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 +347,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 +369,7 @@ const directorApproved = async () => {
|
|||
border: 1px solid #FFA800;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.filter-card {
|
||||
background-color: #f1f1f1b0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ const dataSave = async () => {
|
|||
<q-dialog v-model="props.modal" persistent>
|
||||
<q-card style="width: 800px">
|
||||
<q-toolbar class="q-py-sm">
|
||||
<q-toolbar-title class="text-h6">บันทึกผล </q-toolbar-title>
|
||||
<q-toolbar-title class="text-h6">จัดสรรเครื่องราชฯ </q-toolbar-title>
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
|
|
@ -140,7 +140,7 @@ const dataSave = async () => {
|
|||
map-options
|
||||
outlined
|
||||
v-model="Org"
|
||||
:label="`เครื่องราชฯ`"
|
||||
:label="`เลือกหน่วยงาน`"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
|
|
|
|||
|
|
@ -56,7 +56,10 @@ const fecthRound = async () => {
|
|||
.get(config.API.noteround())
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
selectRoundOption.value = data;
|
||||
selectRoundOption.value = data.map((e: any) => ({
|
||||
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
id: e.id,
|
||||
}));
|
||||
selectRound.value = data[0].id;
|
||||
// console.log(selectRound.value);
|
||||
})
|
||||
|
|
@ -259,7 +262,6 @@ const resetFilter = () => {
|
|||
<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">
|
||||
<div class="q-pl-md q-pr-sm text-weight-medium text-grey-7">รอบ</div>
|
||||
<div>
|
||||
<selector
|
||||
hide-bottom-space
|
||||
borderless
|
||||
|
|
@ -278,7 +280,6 @@ const resetFilter = () => {
|
|||
@update:emit-value="selectorRound"
|
||||
>
|
||||
</selector>
|
||||
</div>
|
||||
</div>
|
||||
<q-separator />
|
||||
<q-tabs
|
||||
|
|
@ -348,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>
|
||||
|
|
@ -529,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>
|
||||
|
|
@ -661,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>
|
||||
|
|
|
|||
458
src/modules/07_insignia/components/5_Borrow/DialogForm.vue
Normal file
458
src/modules/07_insignia/components/5_Borrow/DialogForm.vue
Normal file
|
|
@ -0,0 +1,458 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, computed } from "vue";
|
||||
import { QForm, useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useResultDataStore } from "@/modules/07_insignia/storeResult";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import type { DataOption } from "@/modules/04_registry/components/profileType";
|
||||
|
||||
const DataStore = useResultDataStore();
|
||||
const $q = useQuasar();
|
||||
const myForm = ref<QForm>();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
date2Thai,
|
||||
dialogConfirm,
|
||||
success,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
notifyError,
|
||||
} = mixin;
|
||||
const status = ref<status>("");
|
||||
|
||||
const Advertise = ref<string>("");
|
||||
const issue = ref<string>("");
|
||||
const brand = ref<string>("");
|
||||
const roundNo = ref<string>("");
|
||||
const cardid = ref<string>("");
|
||||
const OrganazationId = ref<string>("");
|
||||
const fullName = ref<string>("");
|
||||
const volume = ref<string>("");
|
||||
const episode = ref<string>("");
|
||||
const duty = ref<string>("");
|
||||
const announced = ref<string>("");
|
||||
const firstname = ref<string>("");
|
||||
const lastname = ref<string>("");
|
||||
const position = ref<string>("");
|
||||
const invoice = ref<string | null>(null);
|
||||
const payment = ref<string>("");
|
||||
const addressPayment = ref<string | null>(null);
|
||||
const affiliationRequest = ref<string>("");
|
||||
const affiliationReceived = ref<string>("");
|
||||
const receivedate = ref<Date | null>();
|
||||
const announceDate = ref<Date | null>();
|
||||
const invoiceDate = ref<Date | null>(null);
|
||||
|
||||
const employeeClass = ref<string>("");
|
||||
const employeeClassOps = ref<DataOption[]>([
|
||||
{ id: "officer", name: "ข้าราชการ กทม.สามัญ" },
|
||||
{ id: "employee", name: "ลูกจ้างประจำ" },
|
||||
]);
|
||||
|
||||
const listPerson = ref<any>([]);
|
||||
|
||||
const paymentOp = [
|
||||
{ label: "จัดส่งทางไปรษณี", value: "จัดส่งทางไปรษณี" },
|
||||
{ label: "มารับด้วยตัวเอง", value: "มารับด้วยตัวเอง" },
|
||||
];
|
||||
const volumeOp = [
|
||||
{ label: "เล่มที่", value: "xx1" },
|
||||
{ label: "เล่มที่2", value: "xx2" },
|
||||
{ label: "เล่มที่3", value: "xx3" },
|
||||
];
|
||||
const episodeOp = [
|
||||
{ label: "ตอนที่1", value: "xx1" },
|
||||
{ label: "ตอนที่2", value: "xx2" },
|
||||
{ label: "ตอนที่3", value: "xx3" },
|
||||
];
|
||||
const dutyOp = [
|
||||
{ label: "หน้าที่1", value: "xx1" },
|
||||
{ label: "หน้าที่2", value: "xx2" },
|
||||
{ label: "หน้าที่3", value: "xx3" },
|
||||
];
|
||||
const announcedOp = [
|
||||
{ label: "ลำดับที่1", value: "xx1" },
|
||||
{ label: "ลำดับที่2", value: "xx2" },
|
||||
{ label: "ลำดับที่3", value: "xx3" },
|
||||
];
|
||||
const affiliationRequestOp = [
|
||||
{ label: "สังกัด1", value: "xx1" },
|
||||
{ label: "สังกัด2", value: "xx2" },
|
||||
{ label: "สังกัด3", value: "xx3" },
|
||||
];
|
||||
const affiliationReceivedOp = [
|
||||
{ label: "สังกัด4", value: "xx4" },
|
||||
{ label: "สังกัด5", value: "xx5" },
|
||||
{ label: "สังกัด6", value: "xx6" },
|
||||
];
|
||||
const prefixOp = [
|
||||
{ label: "นาย", value: "mr" },
|
||||
{ label: "นางสาว", value: "miss" },
|
||||
{ label: "นาง", value: "mrs" },
|
||||
];
|
||||
const positionOp = [
|
||||
{ label: "ตำแหน่ง1", value: "xxx1" },
|
||||
{ label: "ตำแหน่ง2", value: "xxx2" },
|
||||
{ label: "ตำแหน่ง3", value: "xxx3" },
|
||||
];
|
||||
|
||||
const OrgOp = ref<DataOption[]>([
|
||||
{ id: "xxx1", name: "หน่วยงาน กทม" },
|
||||
{ id: "xxx2", name: "หน่วยงาน กทมฯ" },
|
||||
]);
|
||||
|
||||
const clearDateExam = () => {
|
||||
receivedate.value = null;
|
||||
announceDate.value = null;
|
||||
invoiceDate.value = null;
|
||||
};
|
||||
const props = defineProps({
|
||||
modal: Boolean,
|
||||
save: {
|
||||
type: Function,
|
||||
default: () => console.log("not function"),
|
||||
},
|
||||
close: {
|
||||
type: Function,
|
||||
default: () => console.log("not function"),
|
||||
},
|
||||
roundId: {
|
||||
type: String,
|
||||
},
|
||||
action: {
|
||||
type: String,
|
||||
},
|
||||
personId: {
|
||||
type: String,
|
||||
},
|
||||
profileType: {
|
||||
type: String,
|
||||
},
|
||||
selectRoundOption: {
|
||||
type: Array
|
||||
}
|
||||
});
|
||||
watch(props, () => {
|
||||
if (props.modal === true) {
|
||||
employeeClass.value = "";
|
||||
cardid.value = "";
|
||||
fullName.value = "";
|
||||
position.value = "";
|
||||
Advertise.value = "";
|
||||
brand.value = "";
|
||||
receivedate.value = null;
|
||||
issue.value = "";
|
||||
affiliationRequest.value = "";
|
||||
affiliationReceived.value = "";
|
||||
announceDate.value = null;
|
||||
volume.value = "";
|
||||
episode.value = "";
|
||||
duty.value = "";
|
||||
announced.value = "";
|
||||
// invoice.value = "";
|
||||
invoiceDate.value = null;
|
||||
payment.value = "";
|
||||
|
||||
if (props.action === "editData") {
|
||||
fectDataByid(props.personId);
|
||||
}
|
||||
}
|
||||
});
|
||||
const disbleStatus = computed(() => {
|
||||
if (employeeClass.value !== "") {
|
||||
return false;
|
||||
} else return true;
|
||||
});
|
||||
|
||||
const selectType = async () => {
|
||||
showLoader();
|
||||
cardid.value = "";
|
||||
fullName.value = "";
|
||||
position.value = "";
|
||||
Advertise.value = "";
|
||||
brand.value = "";
|
||||
receivedate.value = null;
|
||||
issue.value = "";
|
||||
affiliationRequest.value = "";
|
||||
affiliationReceived.value = "";
|
||||
announceDate.value = null;
|
||||
volume.value = "";
|
||||
episode.value = "";
|
||||
duty.value = "";
|
||||
announced.value = "";
|
||||
invoiceDate.value = null;
|
||||
payment.value = "";
|
||||
await fecthlistPerson();
|
||||
};
|
||||
|
||||
const fecthlistPerson = async () => {
|
||||
await http
|
||||
.get(config.API.profileOrganizRoot)
|
||||
.then((res) => {
|
||||
const id = res.data.result[0].id;
|
||||
if (id !== "") {
|
||||
findlist(id);
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
});
|
||||
};
|
||||
const findlist = async (id: string) => {
|
||||
let data = [{}];
|
||||
if (employeeClass.value === "officer") {
|
||||
data = [{ criteriaType: "is_retire", criteriaValue: "false" }];
|
||||
} else if (employeeClass.value === "employee") {
|
||||
data = [
|
||||
{ criteriaType: "is_retire", criteriaValue: "false" },
|
||||
{ criteriaType: "employee_class", criteriaValue: "perm" },
|
||||
];
|
||||
}
|
||||
await http
|
||||
.post(config.API.profileSearchNewOcIdType(id, employeeClass.value), {
|
||||
criterias: data,
|
||||
})
|
||||
.then((res) => {
|
||||
// console.log(res.data.result);
|
||||
listPerson.value = res.data.result;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
const fectDataByid = async (id: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.noteByid(id))
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
employeeClass.value = "";
|
||||
cardid.value = data.citizenId;
|
||||
fullName.value = data.fullName;
|
||||
position.value = data.position;
|
||||
Advertise.value = data.number;
|
||||
brand.value = data.requestInsigniaId;
|
||||
receivedate.value = data.dateReceive;
|
||||
issue.value = data.issue;
|
||||
affiliationRequest.value = data.organizationOrganizationSend;
|
||||
affiliationReceived.value = data.organizationOrganizationReceive;
|
||||
announceDate.value = data.date;
|
||||
volume.value = data.volumeNo;
|
||||
episode.value = data.section;
|
||||
duty.value = data.page;
|
||||
announced.value = data.no;
|
||||
invoiceDate.value = data.datePayment;
|
||||
payment.value = data.typePayment;
|
||||
addressPayment.value = data.address;
|
||||
status.value = data.status;
|
||||
employeeClass.value = props.profileType;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
const clickSave = async () => {
|
||||
let body = {
|
||||
citizanId: cardid.value, // เลขบัตร
|
||||
insigniaId: brand.value, // insigniaID
|
||||
number: Advertise.value,
|
||||
issue: issue.value,
|
||||
dateReceive: receivedate.value, // วันที่ได้รับเครื่องราชฯ
|
||||
organizationOrganizationSend: affiliationRequest.value,
|
||||
organizationOrganizationReceive: affiliationReceived.value,
|
||||
date: announceDate.value, // วันที่กิจนุเบก
|
||||
volumeNo: volume.value, // เล่ม
|
||||
section: episode.value, //ตอนที่
|
||||
page: duty.value, //หน้าที่
|
||||
no: announced.value,
|
||||
// รอฟิล: invoice.value,
|
||||
datePayment: invoiceDate.value, //วันที่จ่าย
|
||||
typePayment: payment.value, // รูปแบบการจ่าย
|
||||
address: addressPayment.value, //ที่อยู่
|
||||
};
|
||||
await myForm.value!.validate().then((result: boolean) => {
|
||||
if (result) {
|
||||
dialogConfirm($q, async () => {
|
||||
await addNote(body);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const addNote = async (body: any) => {
|
||||
await http
|
||||
.put(config.API.noteAdd(props.roundId), body)
|
||||
.then(() => {
|
||||
success($q, "เพิ่มราชชื่อสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
props.close();
|
||||
});
|
||||
};
|
||||
const searchcardid = () => {
|
||||
// console.log(cardid.value);
|
||||
if (cardid.value.length === 13) {
|
||||
let data = listPerson.value.find((e: any) => e.citizenId === cardid.value);
|
||||
if (data) {
|
||||
fullName.value = data.fullname;
|
||||
position.value = data.positionEmployeePosition;
|
||||
} else notifyError($q, "ไม่พบข้อมูลเลขบัตรประชาชนนี้");
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-dialog v-model="props.modal" persistent>
|
||||
<q-card style="min-width: 900px" 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="props.close"
|
||||
style="color: #ff8080; background-color: #ffdede" />
|
||||
</q-toolbar>
|
||||
<q-separator />
|
||||
|
||||
<q-form ref="myForm">
|
||||
<div class="q-pa-md">
|
||||
<div class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs">
|
||||
<div class="col-4">
|
||||
<q-select :rules="[
|
||||
(val) => !!val || 'กรุณาเลือก ขรก.สามัญ/ลูกจ้างประจำ',
|
||||
]" hide-bottom-space :options="employeeClassOps" dense borderless option-label="name" option-value="id"
|
||||
emit-value map-options outlined v-model="employeeClass" :label="`ขรก.สามัญ/ลูกจ้างประจำ`"
|
||||
@update:model-value="selectType" :disable="status !== ''" />
|
||||
</div>
|
||||
<div class="col-12 text-weight-bold text-grey">
|
||||
ข้อมูลผู้ยืม
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<q-input :disable="disbleStatus || status == 'DONE' || status == 'PENDING'" hide-bottom-space outlined
|
||||
class="inputgreen" v-model="cardid" dense lazy-rules :rules="[
|
||||
(val: string) => !!val || `${'กรุณากรอก เลขบัตรประจำตัวประชาชน'}`,
|
||||
(val: string) =>
|
||||
val.length >= 13 ||
|
||||
`${'กรุณากรอกเลขบัตรประจำตัวประชาชนให้ครบ'}`,
|
||||
]" label="เลขบัตรประจำตัวประชาชน" maxlength="13" mask="#############" @keyup="searchcardid" />
|
||||
<!-- :rules="[(val:any) =>val.length != 13 ||`${'กรุณากรอกเลขบัตรประจำตัวประชาชนให้ครบ'}`,]" -->
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-4">
|
||||
<q-input disable hide-bottom-space outlined dense lazy-rules class="inputgreen" borderless
|
||||
v-model="fullName" :label="`${'ชื่อ-นามสกุล'}`" />
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<q-input disable hide-bottom-space outlined dense lazy-rules class="inputgreen" borderless
|
||||
v-model="position" :label="`ตำเเหน่ง`" />
|
||||
</div>
|
||||
|
||||
<div class="col-6"></div>
|
||||
|
||||
<div class="col-12 q-my-xs"><q-separator size="2px" /></div>
|
||||
<div class="col-12 text-weight-bold text-grey">
|
||||
รายละเอียดการยืมเครื่องราชฯ
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<q-select :disable="disbleStatus || status == 'DONE'" v-model="roundNo" dense outlined lazy-rules
|
||||
hide-bottom-space :label="`${'รอบการขอเครื่องราชฯ'}`" emit-value map-options option-label="name"
|
||||
:options="selectRoundOption" option-value="id" :readonly="false" :borderless="false"
|
||||
style="min-width: 150px" :rules="[
|
||||
(val) => !!val || 'กรุณาเลือกรอบการขอเครื่องราชฯ',
|
||||
]" />
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<q-select :disable="disbleStatus || status == 'DONE'" v-model="brand" dense outlined lazy-rules
|
||||
hide-bottom-space :label="`${'เครื่องราชฯ'}`" emit-value map-options option-label="name"
|
||||
:options="DataStore.insigniaOp2" option-value="id" :readonly="false" :borderless="false"
|
||||
style="min-width: 150px" :rules="[
|
||||
(val) => !!val || 'กรุณาเลือกเครื่องราชฯ',
|
||||
]" />
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<datepicker menu-class-name="modalfix" v-model="receivedate" :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 :disable="disbleStatus || status == 'DONE'" dense borderless outlined
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']" hide-bottom-space :model-value="receivedate != null ? date2Thai(receivedate) : undefined
|
||||
" :label="`${'วันที่ยืม'}`" clearable @clear="clearDateExam">
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer" color="primary">
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<q-select hide-bottom-space :options="OrgOp" dense borderless option-label="name" option-value="id"
|
||||
emit-value map-options outlined v-model="OrganazationId" :label="`เลือกหน่วยงาน`" />
|
||||
</div>
|
||||
|
||||
<div class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs" v-if="props.action === 'editData'">
|
||||
<div class="col-12 q-my-xs"><q-separator size="2px" /></div>
|
||||
<div class="col-12 text-weight-bold text-grey">
|
||||
รายละเอียดการคืนเครื่องราชฯ
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<datepicker menu-class-name="modalfix" v-model="receivedate" :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 :disable="disbleStatus || status == 'DONE'" dense borderless outlined
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']" hide-bottom-space :model-value="receivedate != null ? date2Thai(receivedate) : undefined
|
||||
" :label="`${'วันที่คืน'}`" clearable @clear="clearDateExam">
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer" color="primary">
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<q-select hide-bottom-space :options="OrgOp" dense borderless option-label="name" option-value="id"
|
||||
emit-value map-options outlined v-model="OrganazationId" :label="`เลือกหน่วยงานที่ส่งคืน`" />
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<q-input type="textarea" hide-bottom-space dense borderless option-label="name" option-value="id"
|
||||
emit-value map-options outlined v-model="OrganazationId"
|
||||
:label="`สาเหตุที่ส่งคืนเครื่องราชอิสริยาภรณ์`" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
|
||||
<q-separator />
|
||||
<div class="q-pa-md">
|
||||
<div class="row justify-end">
|
||||
<q-btn label="บันทึก" @click="clickSave" color="public" />
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
|
@ -6,8 +6,7 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
import { useResultDataStore } from "@/modules/07_insignia/storeResult";
|
||||
|
||||
import DialogForm from "@/modules/07_insignia/components/3_result/DialogForm.vue";
|
||||
import fileUploadview from "@/modules/07_insignia/components/3_result/fileUpload.vue";
|
||||
import DialogForm from "@/modules/07_insignia/components/5_Borrow/DialogForm.vue";
|
||||
|
||||
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
||||
import type { QTableProps, QInput } from "quasar";
|
||||
|
|
@ -29,6 +28,8 @@ const tab = ref<string>("");
|
|||
|
||||
const selectRound = ref<string>();
|
||||
const selectRoundOption = ref<OptionData[]>([]);
|
||||
const selectRoundAllOption = ref<OptionData[]>([]);
|
||||
|
||||
const modal = ref<boolean>(false);
|
||||
const action = ref<string>("");
|
||||
const personId = ref<string>();
|
||||
|
|
@ -45,7 +46,21 @@ const fecthRound = async () => {
|
|||
.get(config.API.noteround())
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
selectRoundOption.value = data;
|
||||
selectRoundAllOption.value = [{
|
||||
name: "ทั้งหมด",
|
||||
id: "all",
|
||||
}]
|
||||
data.map((e: any) => {
|
||||
selectRoundOption.value = [...selectRoundOption.value, {
|
||||
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
id: e.id,
|
||||
}]
|
||||
|
||||
selectRoundAllOption.value = [...selectRoundAllOption.value, {
|
||||
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
id: e.id,
|
||||
}]
|
||||
});
|
||||
selectRound.value = data[0].id;
|
||||
// console.log(selectRound.value);
|
||||
})
|
||||
|
|
@ -101,11 +116,20 @@ const columns = ref<QTableProps["columns"]>([
|
|||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
// {
|
||||
// name: "status",
|
||||
// align: "left",
|
||||
// label: "สถานะ",
|
||||
// field: "status",
|
||||
// sortable: true,
|
||||
// sort: (a: string, b: string) =>
|
||||
// a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
// },
|
||||
{
|
||||
name: "status",
|
||||
name: "citizenId",
|
||||
align: "left",
|
||||
label: "สถานะ",
|
||||
field: "status",
|
||||
label: "เลขบัตรประชาชน",
|
||||
field: "citizenId",
|
||||
sortable: true,
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
|
|
@ -245,7 +269,7 @@ const fecthlistInsignia = async () => {
|
|||
citizenId: e.citizenId,
|
||||
prefix: e.prefix,
|
||||
position: e.position,
|
||||
status: DataStore.status(e.status),
|
||||
// status: DataStore.status(e.status),
|
||||
name: e.fullName,
|
||||
type: e.requestInsignia,
|
||||
employeeType: DataStore.profileType(e.profileType),
|
||||
|
|
@ -336,48 +360,13 @@ 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">
|
||||
<div class="q-pl-md q-pr-sm text-weight-medium text-grey-7">รอบ</div>
|
||||
<div>
|
||||
<selector
|
||||
hide-bottom-space
|
||||
borderless
|
||||
dense
|
||||
lazy-rules
|
||||
emit-value
|
||||
map-options
|
||||
options-dense
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
v-model="selectRound"
|
||||
:options="selectRoundOption"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
input-class="text-bold text-grey"
|
||||
@update:emit-value="selectorRound"
|
||||
>
|
||||
</selector>
|
||||
</div>
|
||||
</div>
|
||||
<q-separator />
|
||||
<q-tabs
|
||||
dense
|
||||
v-model="tab"
|
||||
align="left"
|
||||
class="bg-white text-grey"
|
||||
active-color="primary"
|
||||
indicator-color="primary"
|
||||
>
|
||||
<q-tabs dense v-model="tab" align="left" class="bg-white text-grey" active-color="primary" indicator-color="primary">
|
||||
<div v-for="item in DataStore.insigniaType">
|
||||
<q-tab :name="item.name" :label="item.label" />
|
||||
</div>
|
||||
<!-- <q-tab name="hight" label="ขั้นสายสะพาน" />
|
||||
<q-tab name="low" label="ขั้นต่ำกว่าสายสะพาน" />
|
||||
<q-tab name="medal" label="เหรียญตรา" /> -->
|
||||
|
||||
|
||||
</q-tabs>
|
||||
|
||||
|
|
@ -388,113 +377,42 @@ const resetFilter = () => {
|
|||
<div v-if="tab == item.name" class="q-pa-md">
|
||||
<div class="row col-12 q-pb-sm q-col-gutter-x-xs">
|
||||
<div>
|
||||
<q-select
|
||||
v-model="DataStore.insignia"
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
:label="`${'เครื่องราชฯ'}`"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="DataStore.insigniaOp"
|
||||
option-value="id"
|
||||
:readonly="false"
|
||||
:borderless="false"
|
||||
style="min-width: 150px"
|
||||
@update:model-value="selectorInsignia"
|
||||
/>
|
||||
<q-select v-model="selectRound" dense outlined lazy-rules hide-bottom-space
|
||||
:label="`${'รอบการขอเครื่องราชฯ'}`" emit-value map-options option-label="name"
|
||||
:options="selectRoundAllOption" option-value="id" :readonly="false" :borderless="false"
|
||||
style="min-width: 150px" @update:emit-value="selectorRound" />
|
||||
</div>
|
||||
<div>
|
||||
<q-select v-model="DataStore.insignia" dense outlined lazy-rules hide-bottom-space
|
||||
:label="`${'เครื่องราชฯ'}`" emit-value map-options option-label="name" :options="DataStore.insigniaOp"
|
||||
option-value="id" :readonly="false" :borderless="false" style="min-width: 150px"
|
||||
@update:model-value="selectorInsignia" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<q-btn
|
||||
@click="addData()"
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="add"
|
||||
icon="mdi-plus"
|
||||
>
|
||||
<q-btn @click="addData()" size="12px" flat round color="add" icon="mdi-plus">
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
|
||||
<!-- <q-btn flat round color="light-blue" icon="upload">
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item-section avatar
|
||||
><q-icon color="green-7" name="mdi-file-excel"
|
||||
/></q-item-section>
|
||||
<q-item-section
|
||||
>บันทึกผลการได้รับพระราชทานเครื่องราชย์อิสริยสภรณ์</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item-section avatar
|
||||
><q-icon color="green-7" name="mdi-file-excel"
|
||||
/></q-item-section>
|
||||
<q-item-section>บันทึกผลการจ่ายใบกำกับ</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn> -->
|
||||
</div>
|
||||
|
||||
|
||||
<q-space />
|
||||
|
||||
<div class="items-center" style="display: flex">
|
||||
<!-- ค้นหาข้อความใน table -->
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
v-model="filter"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
style="max-width: 200px"
|
||||
class="q-ml-sm"
|
||||
>
|
||||
<q-input standout dense v-model="filter" ref="filterRef" outlined debounce="300" placeholder="ค้นหา"
|
||||
style="max-width: 200px" class="q-ml-sm">
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filter == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filter !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/>
|
||||
<q-icon v-if="filter !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
|
||||
</template>
|
||||
</q-input>
|
||||
<!-- แสดงคอลัมน์ใน table -->
|
||||
<q-select
|
||||
v-model="visibleColumns"
|
||||
:display-value="$q.lang.table.columns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
:options="columns"
|
||||
options-dense
|
||||
option-value="name"
|
||||
map-options
|
||||
emit-value
|
||||
style="min-width: 150px"
|
||||
class="gt-xs q-ml-sm"
|
||||
/>
|
||||
<q-select v-model="visibleColumns" :display-value="$q.lang.table.columns" multiple outlined dense
|
||||
:options="columns" options-dense option-value="name" map-options emit-value style="min-width: 150px"
|
||||
class="gt-xs q-ml-sm" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<d-table
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
:visible-columns="visibleColumns"
|
||||
:filter="filter"
|
||||
row-key="name"
|
||||
>
|
||||
<d-table :rows="rows" :columns="columns" :visible-columns="visibleColumns" :filter="filter" row-key="name">
|
||||
<template v-slot:body-cell="props">
|
||||
<q-td :props="props">
|
||||
<div v-if="props.col.name == 'no'">
|
||||
|
|
@ -502,17 +420,9 @@ const resetFilter = () => {
|
|||
</div>
|
||||
|
||||
<div v-else-if="props.col.name == 'action'">
|
||||
<q-btn
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
@click.stop="editData(props.row)"
|
||||
icon="mdi-pencil-outline"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
<q-td>
|
||||
<q-btn label="คืนเครื่องราชฯ" @click="editData(props.row.id)" color="blue" />
|
||||
</q-td>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
|
|
@ -525,108 +435,34 @@ const resetFilter = () => {
|
|||
|
||||
<div v-else-if="tab == item.name" class="q-pa-md">
|
||||
<div class="row col-12 q-pb-sm q-col-gutter-x-xs">
|
||||
<selector
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="DataStore.insignia"
|
||||
hide-bottom-space
|
||||
:label="`${'เครื่องราชฯ'}`"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="DataStore.insigniaOp"
|
||||
option-value="id"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
style="min-width: 150px"
|
||||
/>
|
||||
<selector outlined dense lazy-rules v-model="DataStore.insignia" hide-bottom-space :label="`${'เครื่องราชฯ'}`"
|
||||
emit-value map-options option-label="name" :options="DataStore.insigniaOp" option-value="id" use-input
|
||||
input-debounce="0" style="min-width: 150px" />
|
||||
<div>
|
||||
<q-btn
|
||||
@click="addData()"
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="add"
|
||||
icon="mdi-plus"
|
||||
>
|
||||
<q-btn @click="addData()" size="12px" flat round color="add" icon="mdi-plus">
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div>
|
||||
<q-btn flat round color="light-blue" icon="upload">
|
||||
<!-- <q-tooltip>อัพโหลดไฟล์</q-tooltip> -->
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item-section avatar
|
||||
><q-icon color="green-7" name="mdi-file-excel"
|
||||
/></q-item-section>
|
||||
<q-item-section
|
||||
>บันทึกผลการได้รับพระราชทานเครื่องราชย์อิสริยสภรณ์</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item-section avatar
|
||||
><q-icon color="green-7" name="mdi-file-excel"
|
||||
/></q-item-section>
|
||||
<q-item-section>บันทึกผลการจ่ายใบกำกับ</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<q-space />
|
||||
|
||||
<div class="items-center" style="display: flex">
|
||||
<!-- ค้นหาข้อความใน table -->
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
v-model="filter"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
style="max-width: 200px"
|
||||
class="q-ml-sm"
|
||||
>
|
||||
<q-input standout dense v-model="filter" ref="filterRef" outlined debounce="300" placeholder="ค้นหา"
|
||||
style="max-width: 200px" class="q-ml-sm">
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filter == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filter !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/>
|
||||
<q-icon v-if="filter !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
|
||||
</template>
|
||||
</q-input>
|
||||
<!-- แสดงคอลัมน์ใน table -->
|
||||
<q-select
|
||||
v-model="visibleColumns"
|
||||
:display-value="$q.lang.table.columns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
:options="columns"
|
||||
options-dense
|
||||
option-value="name"
|
||||
map-options
|
||||
emit-value
|
||||
style="min-width: 150px"
|
||||
class="gt-xs q-ml-sm"
|
||||
/>
|
||||
<q-select v-model="visibleColumns" :display-value="$q.lang.table.columns" multiple outlined dense
|
||||
:options="columns" options-dense option-value="name" map-options emit-value style="min-width: 150px"
|
||||
class="gt-xs q-ml-sm" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<d-table
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
:visible-columns="visibleColumns"
|
||||
:filter="filter"
|
||||
row-key="name"
|
||||
>
|
||||
<d-table :rows="rows" :columns="columns" :visible-columns="visibleColumns" :filter="filter" row-key="name">
|
||||
<template v-slot:body-cell="props">
|
||||
<q-td :props="props">
|
||||
<div v-if="props.col.name == 'no'">
|
||||
|
|
@ -634,17 +470,9 @@ const resetFilter = () => {
|
|||
</div>
|
||||
|
||||
<div v-else-if="props.col.name == 'action'">
|
||||
<q-btn
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
@click="editData(props.row)"
|
||||
icon="mdi-pencil-outline"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
<q-td>
|
||||
<q-btn label="คืนเครื่องราชฯ" @click="editData(props.row.id)" color="blue" />
|
||||
</q-td>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
|
|
@ -657,107 +485,33 @@ const resetFilter = () => {
|
|||
|
||||
<div v-else-if="tab == item.name" class="q-pa-md">
|
||||
<div class="row col-12 q-pb-sm q-col-gutter-x-xs">
|
||||
<selector
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="DataStore.insignia"
|
||||
hide-bottom-space
|
||||
:label="`${'เครื่องราชฯ'}`"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="DataStore.insigniaOp"
|
||||
option-value="id"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
style="min-width: 150px"
|
||||
/>
|
||||
<selector outlined dense lazy-rules v-model="DataStore.insignia" hide-bottom-space :label="`${'เครื่องราชฯ'}`"
|
||||
emit-value map-options option-label="name" :options="DataStore.insigniaOp" option-value="id" use-input
|
||||
input-debounce="0" style="min-width: 150px" />
|
||||
<div>
|
||||
<q-btn
|
||||
@click="addData()"
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="add"
|
||||
icon="mdi-plus"
|
||||
>
|
||||
<q-btn @click="addData()" size="12px" flat round color="add" icon="mdi-plus">
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div>
|
||||
<q-btn flat round color="light-blue" icon="upload">
|
||||
<!-- <q-tooltip>อัพโหลดไฟล์</q-tooltip> -->
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item-section avatar
|
||||
><q-icon color="green-7" name="mdi-file-excel"
|
||||
/></q-item-section>
|
||||
<q-item-section
|
||||
>บันทึกผลการได้รับพระราชทานเครื่องราชย์อิสริยสภรณ์</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item-section avatar
|
||||
><q-icon color="green-7" name="mdi-file-excel"
|
||||
/></q-item-section>
|
||||
<q-item-section>บันทึกผลการจ่ายใบกำกับ</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</div>
|
||||
<q-space />
|
||||
|
||||
<div class="items-center" style="display: flex">
|
||||
<!-- ค้นหาข้อความใน table -->
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
v-model="filter"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
style="max-width: 200px"
|
||||
class="q-ml-sm"
|
||||
>
|
||||
<q-input standout dense v-model="filter" ref="filterRef" outlined debounce="300" placeholder="ค้นหา"
|
||||
style="max-width: 200px" class="q-ml-sm">
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filter == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filter !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/>
|
||||
<q-icon v-if="filter !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
|
||||
</template>
|
||||
</q-input>
|
||||
<!-- แสดงคอลัมน์ใน table -->
|
||||
<q-select
|
||||
v-model="visibleColumns"
|
||||
:display-value="$q.lang.table.columns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
:options="columns"
|
||||
options-dense
|
||||
option-value="name"
|
||||
map-options
|
||||
emit-value
|
||||
style="min-width: 150px"
|
||||
class="gt-xs q-ml-sm"
|
||||
/>
|
||||
<q-select v-model="visibleColumns" :display-value="$q.lang.table.columns" multiple outlined dense
|
||||
:options="columns" options-dense option-value="name" map-options emit-value style="min-width: 150px"
|
||||
class="gt-xs q-ml-sm" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<d-table
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
:visible-columns="visibleColumns"
|
||||
:filter="filter"
|
||||
row-key="name"
|
||||
>
|
||||
<d-table :rows="rows" :columns="columns" :visible-columns="visibleColumns" :filter="filter" row-key="name">
|
||||
<template v-slot:body-cell="props">
|
||||
<q-td :props="props">
|
||||
<div v-if="props.col.name == 'no'">
|
||||
|
|
@ -765,17 +519,9 @@ const resetFilter = () => {
|
|||
</div>
|
||||
|
||||
<div v-else-if="props.col.name == 'action'">
|
||||
<q-btn
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
@click="editData(props.row)"
|
||||
icon="mdi-pencil-outline"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
<q-td>
|
||||
<q-btn label="คืนเครื่องราชฯ" @click="editData(props.row.id)" color="blue" />
|
||||
</q-td>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
|
|
@ -789,15 +535,8 @@ const resetFilter = () => {
|
|||
|
||||
</div>
|
||||
|
||||
<DialogForm
|
||||
:modal="modal"
|
||||
:save="save"
|
||||
:close="close"
|
||||
:roundId="selectRound"
|
||||
:action="action"
|
||||
:personId="personId"
|
||||
:profileType="profileType"
|
||||
/>
|
||||
<DialogForm :modal="modal" :save="save" :close="close" :roundId="selectRound" :action="action" :personId="personId"
|
||||
:profileType="profileType" :selectRoundOption="selectRoundOption" />
|
||||
</q-card>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ const fecthRound = async () => {
|
|||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
selectRoundOption.value = data.map((e: any) => ({
|
||||
name: "รอบการเสนอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
id: e.id,
|
||||
}));
|
||||
selectRound.value = data[0].id;
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -191,11 +191,20 @@ const receiveOcOption = ref<DataOption1[]>([
|
|||
id: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
||||
},
|
||||
]);
|
||||
// C-PM-14
|
||||
const transferOrganizationName = ref<string>("");
|
||||
|
||||
// C-PM-16
|
||||
const orderNumber = ref<string>();
|
||||
const orderNumberDate = ref<Date>(new Date());
|
||||
|
||||
// C-PM-18-20
|
||||
const fault = ref<string>("");
|
||||
const guiltyBasis = ref<string>("");
|
||||
const conclusionFireNo = ref<string>("");
|
||||
const conclusionFireDate = ref<Date>(new Date());
|
||||
const conclusionFireResolution = ref<string>("");
|
||||
|
||||
onMounted(async () => {
|
||||
if (orderId) {
|
||||
fecthTypeOption("hasData");
|
||||
|
|
@ -251,9 +260,8 @@ const fetchdetailOrder = async () => {
|
|||
await http
|
||||
.get(config.API.detailOrder(orderIdString))
|
||||
.then((res: any) => {
|
||||
// console.log(typeOrderOption.value);
|
||||
|
||||
const data = res.data.result;
|
||||
console.log(data);
|
||||
typeOrder.value = typeOrderOption.value.find(
|
||||
(e) => e.id === data.orderTypeValue
|
||||
);
|
||||
|
|
@ -271,6 +279,57 @@ const fetchdetailOrder = async () => {
|
|||
conclusionRegisterDate.value = data.conclusionRegisterDate;
|
||||
conclusionResultNo.value = data.conclusionResultNo;
|
||||
conclusionResultDate.value = data.conclusionResultDate;
|
||||
// 05 -06
|
||||
meeting.value = data.conclusionMeetingNo;
|
||||
dateMeeting.value = data.conclusionMeetingDate;
|
||||
|
||||
// 08
|
||||
conclusionReceive.value = data.conclusionReturnNo;
|
||||
conclusionReceiveDate.value = data.conclusionReturnDate;
|
||||
|
||||
//09
|
||||
organizations.value = data.sourceOrganizationName;
|
||||
order.value = data.conclusionReturnNo;
|
||||
orderDate.value = data.conclusionReturnDate;
|
||||
book.value = data.militaryCommandNo;
|
||||
bookDate.value = data.militaryCommandDate;
|
||||
|
||||
//10
|
||||
organizationsOld.value = data.placementCommandIssuer;
|
||||
orderOld.value = data.placementCommandNo;
|
||||
orderOldDate.value = data.placementCommandDate;
|
||||
locationname.value = data.placementPositionName;
|
||||
experimentOc.value = data.placementOrganizationName;
|
||||
experimentformDate.value = data.probationStartDate;
|
||||
experimenttoDate.value = data.probationEndDate;
|
||||
chairman.value = data.chairManFullName;
|
||||
director.value = data.member1FullName;
|
||||
director2.value = data.member2FullName;
|
||||
|
||||
//11-12
|
||||
committeeOc.value = data.placementCommandIssuer;
|
||||
committeeOrder.value = data.placementCommandNo;
|
||||
committeeDate.value = data.placementCommandDate;
|
||||
|
||||
//13
|
||||
receiveOc.value = data.receiveOrganizationName;
|
||||
|
||||
//14
|
||||
transferOrganizationName.value = data.transferOrganizationName;
|
||||
conclusionReceive.value = data.conclusionReceiveNo;
|
||||
conclusionReceiveDate.value = data.conclusionReceiveDate;
|
||||
|
||||
//16
|
||||
orderNumber.value = data.govAidCommandNo;
|
||||
orderNumberDate.value = data.govAidCommandDate;
|
||||
|
||||
//18-20
|
||||
fault.value = data.fault;
|
||||
guiltyBasis.value = data.guiltyBasis;
|
||||
conclusionFireNo.value = data.conclusionFireNo;
|
||||
conclusionFireDate.value = data.conclusionFireDate;
|
||||
conclusionFireResolution.value = data.conclusionFireResolution;
|
||||
|
||||
fecthExamRoundOption(data.orderTypeCode);
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -285,7 +344,6 @@ const fecthCommand = async () => {
|
|||
await http
|
||||
.get(config.API.organizationsOrder())
|
||||
.then((res: any) => {
|
||||
console.log(res);
|
||||
byOrderOption.value = res.data.result;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
|
|
@ -397,7 +455,7 @@ const submit = async () => {
|
|||
});
|
||||
} else if (typeOrder.value.commandCode == "C-PM-14") {
|
||||
Object.assign(formdata, {
|
||||
transferOrganizationName: "",
|
||||
transferOrganizationName: transferOrganizationName.value,
|
||||
conclusionReceiveNo: conclusionReceive.value,
|
||||
conclusionReceiveDate: conclusionReceiveDate.value,
|
||||
});
|
||||
|
|
@ -412,11 +470,11 @@ const submit = async () => {
|
|||
typeOrder.value.commandCode == "C-PM-20"
|
||||
) {
|
||||
Object.assign(formdata, {
|
||||
fault: "",
|
||||
guiltyBasis: "",
|
||||
conclusionFireNo: "",
|
||||
conclusionFireDate: new Date(),
|
||||
conclusionFireResolution: "",
|
||||
fault: fault.value,
|
||||
guiltyBasis: guiltyBasis.value,
|
||||
conclusionFireNo: conclusionFireNo.value,
|
||||
conclusionFireDate: conclusionFireDate.value,
|
||||
conclusionFireResolution: conclusionFireResolution.value,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -1874,7 +1932,24 @@ const getClass = (val: boolean) => {
|
|||
class="row col-12 q-col-gutter-x-lg q-col-gutter-y-md"
|
||||
v-if="typeOrder.commandCode === 'C-PM-14'"
|
||||
>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="transferOrganizationName"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกส่วนราชการที่ให้โอน'}`]"
|
||||
:label="`${'ส่วนราชการที่ให้โอน'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
|
||||
<!-- <selector :class="getClass(true)" outlined dense lazy-rules v-model="conclusionReceive"
|
||||
:rules="[(val: string) => !!val || `${'มติ กก. ครั้งที่ '}`]" hide-bottom-space
|
||||
:label="`${'มติ กก. ครั้งที่ '}`" emit-value map-options option-label="name" :options="ReceiveOption"
|
||||
option-value="id" use-input input-debounce="0" /> -->
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
|
|
@ -1891,7 +1966,7 @@ const getClass = (val: boolean) => {
|
|||
:label="`${'มติ กก. ครั้งที่ '}`" emit-value map-options option-label="name" :options="ReceiveOption"
|
||||
option-value="id" use-input input-debounce="0" /> -->
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="conclusionReceiveDate"
|
||||
|
|
@ -1993,6 +2068,120 @@ const getClass = (val: boolean) => {
|
|||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- C-PM-18-20 -->
|
||||
<div
|
||||
class="row col-12 q-col-gutter-x-lg q-col-gutter-y-md"
|
||||
v-if="
|
||||
typeOrder.commandCode === 'C-PM-18' ||
|
||||
typeOrder.commandCode === 'C-PM-19' ||
|
||||
typeOrder.commandCode === 'C-PM-20'
|
||||
"
|
||||
>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="fault"
|
||||
:rules="[
|
||||
(val) => !!val || `${'กรุณากรอกรายละเอียดการกระทำความผิด'}`,
|
||||
]"
|
||||
:label="`${'ละเอียดการกระทำความผิด'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="guiltyBasis"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกฐานความผิด'}`]"
|
||||
:label="`${'ฐานความผิด'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="conclusionFireNo"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val ||
|
||||
`${'กรุณากรอกครั่งที่ (เรื่องการดำเนินการทางวินัย)'}`,
|
||||
]"
|
||||
:label="`${'ครั่งที่ (เรื่องการดำเนินการทางวินัย)'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="conclusionFireDate"
|
||||
: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"
|
||||
:model-value="
|
||||
conclusionFireDate != null
|
||||
? date2Thai(conclusionFireDate)
|
||||
: null
|
||||
"
|
||||
:label="`${'ลงวันที่ (เรื่องการดำเนินการทางวินัย) '}`"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val ||
|
||||
`${'กรุณาเลือกลงวันที่ (เรื่องการดำเนินการทางวินัย)'}`,
|
||||
]"
|
||||
>
|
||||
<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-12 col-md-4">
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="conclusionFireResolution"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val ||
|
||||
`${'กรุณากรอก มติที่ประชุม(เรื่องการดำเนินการทางวินัย)'}`,
|
||||
]"
|
||||
:label="`${'มติที่ประชุม(เรื่องการดำเนินการทางวินัย)'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -266,8 +266,9 @@ const myEventHandler = (e: any, setSCroll: boolean) => {
|
|||
*/
|
||||
const activeMenu = (path: string) => {
|
||||
if (path == "dashboard" && route.fullPath == "/") return true;
|
||||
if (path == "registry" && route.fullPath == "/registry-employee")
|
||||
return false;
|
||||
if (path == "registry" && route.fullPath == "/registry-employee") return false;
|
||||
if (path == "registry" && route.fullPath.includes(`/registry-employee/edit`)) return false;
|
||||
|
||||
if (path == "registry" && route.fullPath == "/") return false;
|
||||
// if (path != "registry" && path == "registryEmployee" && route.fullPath == "/registryEmployee") return true;
|
||||
const bool = route.fullPath.includes(`/${path}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue