Merge branch 'develop' into devTee

This commit is contained in:
STW_TTTY\stwtt 2024-08-29 14:38:10 +07:00
commit f34e62713a
17 changed files with 115 additions and 109 deletions

View file

@ -88,6 +88,6 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
mode,
formFilter,
labelOption,
nodeData
nodeData,
};
});

View file

@ -143,9 +143,9 @@ function fetchDataPerson() {
queryParams.type = empType.value;
}
if (nodeData.node !== null && nodeData.nodeId !== null) {
queryParams.node = nodeData.node;
queryParams.nodeId = nodeData.nodeId;
if (store.nodeData.node !== null && store.nodeData.nodeId !== null) {
queryParams.node = store.nodeData.node;
queryParams.nodeId = store.nodeData.nodeId;
}
http
.get(
@ -256,12 +256,14 @@ async function selectType() {
: "เลือกหน่วยงาน";
} else {
// filter
if (
store.formFilter.keyword != "" ||
store.labelOption.posType != "ทั้งหมด" ||
store.labelOption.posLevel != "ทั้งหมด" ||
store.formFilter.isShowRetire != null ||
store.formFilter.isProbation != null
store.formFilter.isShowRetire ||
store.formFilter.isProbation ||
store.nodeData.nodeId != null
) {
store.formFilter.page = 1;
fetchDataPerson();

View file

@ -325,7 +325,9 @@ onMounted(async () => {
/>
รายละเอยดการขอโอนของ{{ responseData.fullname }}
</div>
<CardProfile :data="dataProfile as DataProfile" />
<!-- <q-card bordered class="row col-12 text-dark">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-subtitle2">

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"

View file

@ -4,6 +4,7 @@ import { useQuasar } from "quasar";
import { useRouter } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
import { checkPermissionGet } from "@/utils/permissions";
/**
* importCOmponents
@ -48,12 +49,13 @@ function fetchInformation() {
showLoader();
http
.get(config.API.orgProfileById(profileId.value, props.employeeClass))
.then((res) => {
.then(async (res) => {
const data = res.data.result;
fullName.value = `${data.prefix}${data.firstName} ${data.lastName}`;
position.value = data.position;
if (data.avatarName) {
fetchProfile(data.id as string, data.avatarName);
await fetchProfile(data.id as string, data.avatarName);
}
})
.catch((err) => {
@ -133,7 +135,15 @@ watch(
<div class="q-mb-xs text-center text-grey" v-if="position">
{{ position }}
</div>
<div class="q-mt-md">
<div
class="q-mt-md"
v-if="
props.employeeClass === '-employee'
? checkPermissionGet('SYS_REGISTRY_EMP')
: checkPermissionGet('SYS_REGISTRY_OFFICER')
"
>
<q-btn
class="bg-white"
outline

View file

@ -103,12 +103,7 @@ const visibleColumns = ref<string[]>([
function fetchListDiscipline() {
showLoader();
http
.get(
config.API.profileNewDisciplineByProfileId(
profileId.value,
employeeClass.value
)
)
.get(config.API.disciplineListCard(profileId.value, employeeClass.value))
.then((res) => {
rows.value = res.data.result;
})

View file

@ -105,7 +105,7 @@ const visibleColumns = ref<string[]>([
function fetchListSalary() {
showLoader();
http
.get(config.API.profileNewLeaveById(profileId.value, employeeClass.value))
.get(config.API.leaveListCard(profileId.value, employeeClass.value))
.then((res) => {
rows.value = res.data.result;
})
@ -203,7 +203,7 @@ onMounted(() => {
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" >
<q-tr :props="props">
<q-td v-for="col in props.cols" :key="col.id">
<div class="table_ellipsis">
{{ col.value ? col.value : "-" }}

View file

@ -151,7 +151,7 @@ const visibleColumns = ref<string[]>([
function fetchListSalary() {
showLoader();
http
.get(config.API.profileListSalaryNew(profileId.value, employeeClass.value))
.get(config.API.salaryListCard(profileId.value, employeeClass.value))
.then((res) => {
rows.value = res.data.result;
})