เครื่องราช
This commit is contained in:
parent
88016802b4
commit
b02e8283d0
5 changed files with 40 additions and 73 deletions
|
|
@ -566,10 +566,7 @@ onMounted(async () => {
|
||||||
<q-tooltip> รายละเอียด</q-tooltip>
|
<q-tooltip> รายละเอียด</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="checkPermission($route)?.attrIsUpdate"
|
||||||
checkPermission($route)?.attrIsGet &&
|
|
||||||
checkPermission($route)?.attrIsUpdate
|
|
||||||
"
|
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,9 @@ async function fecthListData() {
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => hideLoader());
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** funcion เรียกข้อมูลหน่วยงานจัดสรรเครื่องราชอิสริยาภรณ์ */
|
/** funcion เรียกข้อมูลหน่วยงานจัดสรรเครื่องราชอิสริยาภรณ์ */
|
||||||
|
|
@ -160,21 +162,6 @@ async function fetchOrgList() {
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, 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 ย้อนกลับหน้าจัดสรรเครื่องราชอิสริยาภรณ์*/
|
/** funcion ย้อนกลับหน้าจัดสรรเครื่องราชอิสริยาภรณ์*/
|
||||||
|
|
@ -286,10 +273,8 @@ const resetFilter = () => {
|
||||||
|
|
||||||
/** Hook*/
|
/** Hook*/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
fecthDashboard();
|
|
||||||
fecthListData();
|
|
||||||
name.value = DataStore.insigniaName;
|
name.value = DataStore.insigniaName;
|
||||||
fetchOrgList();
|
await Promise.all([fecthDashboard(), fecthListData(), fetchOrgList()]);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -412,10 +397,7 @@ onMounted(async () => {
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="checkPermission($route)?.attrIsUpdate"
|
||||||
checkPermission($route)?.attrIsGet &&
|
|
||||||
checkPermission($route)?.attrIsUpdate
|
|
||||||
"
|
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
|
|
|
||||||
|
|
@ -125,8 +125,6 @@ async function fecthlistInsignia() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** function ดึงข้อมูลรายการหน่วยงาน */
|
|
||||||
|
|
||||||
/** funcion เรียกข้อมูลหน่วยงานจัดสรรเครื่องราชอิสริยาภรณ์ */
|
/** funcion เรียกข้อมูลหน่วยงานจัดสรรเครื่องราชอิสริยาภรณ์ */
|
||||||
async function fetchOrgList() {
|
async function fetchOrgList() {
|
||||||
http
|
http
|
||||||
|
|
@ -180,8 +178,8 @@ async function onSubmit() {
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await props.closeAndFecth();
|
await props.closeAndFecth();
|
||||||
await clearData();
|
|
||||||
await success($q, "บันทึกข้อมูลสำเร็จ");
|
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
await clearData();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -292,6 +290,7 @@ watch(props, () => {
|
||||||
// fetchOrgList();
|
// fetchOrgList();
|
||||||
} else {
|
} else {
|
||||||
fecthlistInsignia();
|
fecthlistInsignia();
|
||||||
|
setValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -476,6 +475,7 @@ watch(props, () => {
|
||||||
"
|
"
|
||||||
:label="`${'วันที่คืน'}`"
|
:label="`${'วันที่คืน'}`"
|
||||||
clearable
|
clearable
|
||||||
|
class="inputgreen"
|
||||||
@clear="clearReturnDate"
|
@clear="clearReturnDate"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
|
|
@ -515,6 +515,7 @@ watch(props, () => {
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
class="inputgreen"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
dense
|
dense
|
||||||
|
|
@ -529,8 +530,9 @@ watch(props, () => {
|
||||||
:label="`สาเหตุที่ส่งคืนเครื่องราชอิสริยาภรณ์`"
|
:label="`สาเหตุที่ส่งคืนเครื่องราชอิสริยาภรณ์`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div></div
|
</div>
|
||||||
></q-card-section>
|
</div>
|
||||||
|
</q-card-section>
|
||||||
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -374,9 +374,9 @@ function close() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** function closePopup และเเรียกข้อมูลรายชื่อการเสนอขอเครื่องราชฯ */
|
/** function closePopup และเเรียกข้อมูลรายชื่อการเสนอขอเครื่องราชฯ */
|
||||||
function closeAndFecth() {
|
async function closeAndFecth() {
|
||||||
|
await fecthlistInsignia();
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
fecthlistInsignia();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** function openPopup เพิ่มรายการ ยืม-คืนเครื่องราชฯ*/
|
/** function openPopup เพิ่มรายการ ยืม-คืนเครื่องราชฯ*/
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ import type { QTableProps, QInput } from "quasar";
|
||||||
* import Components
|
* import Components
|
||||||
*/
|
*/
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
import Dialogbody from "@/modules/07_insignia/components/3_result/Dialogbody.vue";
|
import Dialogbody from "@/modules/07_insignia/components/3_result/Dialogbody.vue"; //รับ-คืนเครื่องราชฯ
|
||||||
import DialogForm from "@/modules/07_insignia/components/3_result/DialogForm.vue";
|
import DialogForm from "@/modules/07_insignia/components/3_result/DialogForm.vue"; //บันทึกผล
|
||||||
import fileUploadview from "../components/3_result/fileUpload.vue";
|
import fileUploadview from "../components/3_result/fileUpload.vue";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -932,27 +932,6 @@ onMounted(() => {
|
||||||
<fileUploadview :roundId="selectRound" />
|
<fileUploadview :roundId="selectRound" />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</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>
|
||||||
<q-card v-else>
|
<q-card v-else>
|
||||||
<div class="q-pa-md q-gutter-sm">
|
<div class="q-pa-md q-gutter-sm">
|
||||||
|
|
@ -962,25 +941,32 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</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-dialog v-model="modelPerview">
|
||||||
<q-card style="width: 850px; max-width: 80vw">
|
<q-card style="width: 850px; max-width: 80vw">
|
||||||
<DialogHeader tittle="ยืนยันรายการข้อมูล" :close="closeDialogPerview" />
|
<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">
|
<q-card-section class="q-pt-none">
|
||||||
<d-table
|
<d-table
|
||||||
:rows="rowspreview"
|
:rows="rowspreview"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue