เครื่องราช

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-08-28 17:34:38 +07:00
parent 88016802b4
commit b02e8283d0
5 changed files with 40 additions and 73 deletions

View file

@ -566,10 +566,7 @@ onMounted(async () => {
<q-tooltip> รายละเอยด</q-tooltip>
</q-btn>
<q-btn
v-if="
checkPermission($route)?.attrIsGet &&
checkPermission($route)?.attrIsUpdate
"
v-if="checkPermission($route)?.attrIsUpdate"
flat
round
dense

View file

@ -134,7 +134,9 @@ async function fecthListData() {
.catch((err) => {
messageError($q, err);
})
.finally(() => hideLoader());
.finally(() => {
hideLoader();
});
}
/** funcion เรียกข้อมูลหน่วยงานจัดสรรเครื่องราชอิสริยาภรณ์ */
@ -160,21 +162,6 @@ async function fetchOrgList() {
.catch((err) => {
messageError($q, err);
});
// showLoader();
// await http
// .get(config.API.typeOc())
// .then(async (response: any) => {
// orgList.value = response.data.result.map((e: any) => ({
// id: e.organizationId,
// name: e.organizationName,
// }));
// })
// .catch((err) => {
// messageError($q, err);
// })
// .finally(() => {
// hideLoader();
// });
}
/** funcion ย้อนกลับหน้าจัดสรรเครื่องราชอิสริยาภรณ์*/
@ -286,10 +273,8 @@ const resetFilter = () => {
/** Hook*/
onMounted(async () => {
fecthDashboard();
fecthListData();
name.value = DataStore.insigniaName;
fetchOrgList();
await Promise.all([fecthDashboard(), fecthListData(), fetchOrgList()]);
});
</script>
@ -412,10 +397,7 @@ onMounted(async () => {
<q-tr :props="props">
<q-td auto-width>
<q-btn
v-if="
checkPermission($route)?.attrIsGet &&
checkPermission($route)?.attrIsUpdate
"
v-if="checkPermission($route)?.attrIsUpdate"
flat
round
dense

View file

@ -125,8 +125,6 @@ async function fecthlistInsignia() {
}
}
/** function ดึงข้อมูลรายการหน่วยงาน */
/** funcion เรียกข้อมูลหน่วยงานจัดสรรเครื่องราชอิสริยาภรณ์ */
async function fetchOrgList() {
http
@ -180,8 +178,8 @@ async function onSubmit() {
})
.then(async () => {
await props.closeAndFecth();
await clearData();
await success($q, "บันทึกข้อมูลสำเร็จ");
await clearData();
})
.catch((err) => {
messageError($q, err);
@ -292,6 +290,7 @@ watch(props, () => {
// fetchOrgList();
} else {
fecthlistInsignia();
setValue();
}
}
});
@ -476,6 +475,7 @@ watch(props, () => {
"
:label="`${'วันที่คืน'}`"
clearable
class="inputgreen"
@clear="clearReturnDate"
>
<template v-slot:prepend>
@ -515,6 +515,7 @@ watch(props, () => {
<div class="col-12">
<q-input
class="inputgreen"
type="textarea"
hide-bottom-space
dense
@ -529,8 +530,9 @@ watch(props, () => {
:label="`สาเหตุที่ส่งคืนเครื่องราชอิสริยาภรณ์`"
/>
</div>
</div></div
></q-card-section>
</div>
</div>
</q-card-section>
<q-separator />

View file

@ -374,9 +374,9 @@ function close() {
}
/** function closePopup และเเรียกข้อมูลรายชื่อการเสนอขอเครื่องราชฯ */
function closeAndFecth() {
async function closeAndFecth() {
await fecthlistInsignia();
modal.value = false;
fecthlistInsignia();
}
/** function openPopup เพิ่มรายการ ยืม-คืนเครื่องราชฯ*/

View file

@ -15,8 +15,8 @@ import type { QTableProps, QInput } from "quasar";
* import Components
*/
import DialogHeader from "@/components/DialogHeader.vue";
import Dialogbody from "@/modules/07_insignia/components/3_result/Dialogbody.vue";
import DialogForm from "@/modules/07_insignia/components/3_result/DialogForm.vue";
import Dialogbody from "@/modules/07_insignia/components/3_result/Dialogbody.vue"; //-
import DialogForm from "@/modules/07_insignia/components/3_result/DialogForm.vue"; //
import fileUploadview from "../components/3_result/fileUpload.vue";
/**
@ -932,27 +932,6 @@ onMounted(() => {
<fileUploadview :roundId="selectRound" />
</q-tab-panel>
</q-tab-panels>
<Dialogbody
:modal="ModalDialog"
:close="close"
:dateCheckReceive="dateCheckReceive"
:dateCheckReturn="dateCheckReturn"
:dataModal="dataModal"
:personId="personId"
:fecthlistInsignia="fecthlistInsignia"
/>
<DialogForm
:modal="modal"
:save="save"
:close="close"
:roundId="selectRound"
:action="action"
:personId="personId"
:profileType="profileType"
:fecthlistInsignia="fecthlistInsignia"
/>
</q-card>
<q-card v-else>
<div class="q-pa-md q-gutter-sm">
@ -962,25 +941,32 @@ onMounted(() => {
</div>
</q-card>
<!-- -นเครองราชฯ -->
<Dialogbody
:modal="ModalDialog"
:close="close"
:dateCheckReceive="dateCheckReceive"
:dateCheckReturn="dateCheckReturn"
:dataModal="dataModal"
:personId="personId"
:fecthlistInsignia="fecthlistInsignia"
/>
<!-- DialogForm -->
<DialogForm
:modal="modal"
:save="save"
:close="close"
:roundId="selectRound"
:action="action"
:personId="personId"
:profileType="profileType"
:fecthlistInsignia="fecthlistInsignia"
/>
<!-- นยนรายการขอม -->
<q-dialog v-model="modelPerview">
<q-card style="width: 850px; max-width: 80vw">
<DialogHeader tittle="ยืนยันรายการข้อมูล" :close="closeDialogPerview" />
<!-- <q-card-section>
<q-toolbar class="q-py-md">
<q-toolbar-title class="header-text">
นยนรายการขอม
</q-toolbar-title>
<q-btn
icon="close"
unelevated
round
dense
v-close-popup
style="color: #ff8080; background-color: #ffdede"
/>
</q-toolbar>
</q-card-section> -->
<q-card-section class="q-pt-none">
<d-table
:rows="rowspreview"