รายการลาออก
This commit is contained in:
parent
045bd3aee6
commit
474a856eb0
11 changed files with 285 additions and 165 deletions
|
|
@ -10,6 +10,7 @@ import genReport from "@/plugins/genreport";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
|
||||
import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow";
|
||||
|
||||
import type {
|
||||
TypeFile,
|
||||
|
|
@ -35,6 +36,7 @@ const $q = useQuasar();
|
|||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const store = useRetirementDataStore();
|
||||
const { fetchDataCheckIsoffice } = useRoleWorkflowDataStore();
|
||||
const { convertStatusText } = store;
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailbyidEMP");
|
||||
const mixin = useCounterMixin();
|
||||
|
|
@ -384,7 +386,14 @@ async function confirmpopUp() {
|
|||
reason: reasonReign.value,
|
||||
};
|
||||
await http
|
||||
.put(config.API.commanderApproveRetirement("-employee", id.value,'approve'), body)
|
||||
.put(
|
||||
config.API.commanderApproveRetirement(
|
||||
"-employee",
|
||||
id.value,
|
||||
"approve"
|
||||
),
|
||||
body
|
||||
)
|
||||
.then(async () => {
|
||||
await fetchData(id.value);
|
||||
closeModal();
|
||||
|
|
@ -413,7 +422,14 @@ async function rejectpopUp() {
|
|||
date: dateBreak.value,
|
||||
};
|
||||
await http
|
||||
.put(config.API.commanderApproveRetirement('-employee', id.value,'reject'), body)
|
||||
.put(
|
||||
config.API.commanderApproveRetirement(
|
||||
"-employee",
|
||||
id.value,
|
||||
"reject"
|
||||
),
|
||||
body
|
||||
)
|
||||
.then(async () => {
|
||||
await fetchData(id.value);
|
||||
closeModal();
|
||||
|
|
@ -698,16 +714,13 @@ function onAddPerson(type: string) {
|
|||
}
|
||||
|
||||
async function checkOfficer() {
|
||||
http
|
||||
.get(config.API.checkIsofficer + `SYS_RESIGN_EMP`)
|
||||
.then(async (res) => {
|
||||
isOfficer.value = await res.data.result.isOfficer;
|
||||
isStaff.value = await res.data.result.isStaff;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {});
|
||||
try {
|
||||
const data = await fetchDataCheckIsoffice("SYS_RESIGN_EMP");
|
||||
isOfficer.value = data.isOfficer;
|
||||
isStaff.value = data.isStaff;
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
}
|
||||
}
|
||||
|
||||
function onSend() {
|
||||
|
|
|
|||
|
|
@ -1,22 +1,17 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, computed } from "vue";
|
||||
import axios from "axios";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useQuasar, QForm } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import genReport from "@/plugins/genreport";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
|
||||
import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow";
|
||||
|
||||
import type {
|
||||
TypeFile,
|
||||
rowFile,
|
||||
FileList,
|
||||
} from "@/modules/06_retirement/interface/response/Main";
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
||||
import type {
|
||||
|
|
@ -34,6 +29,7 @@ const $q = useQuasar();
|
|||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const store = useRetirementDataStore();
|
||||
const { fetchDataCheckIsoffice } = useRoleWorkflowDataStore();
|
||||
const { convertStatusText } = store;
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailRejectEMP");
|
||||
const mixin = useCounterMixin();
|
||||
|
|
@ -423,16 +419,13 @@ function onAddPerson(type: string) {
|
|||
}
|
||||
|
||||
async function checkOfficer() {
|
||||
http
|
||||
.get(config.API.checkIsofficer + `SYS_RESIGN_EMP`)
|
||||
.then(async (res) => {
|
||||
isOfficer.value = await res.data.result.isOfficer;
|
||||
isStaff.value = await res.data.result.isStaff;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {});
|
||||
try {
|
||||
const data = await fetchDataCheckIsoffice("SYS_RESIGN_EMP");
|
||||
isOfficer.value = data.isOfficer;
|
||||
isStaff.value = data.isStaff;
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
}
|
||||
}
|
||||
|
||||
function onSend() {
|
||||
|
|
@ -472,7 +465,11 @@ async function fetchKeycloakPosition() {
|
|||
|
||||
/** Hook */
|
||||
onMounted(async () => {
|
||||
await Promise.all([await fetchKeycloakPosition(),fetchData(id.value), checkOfficer()]);
|
||||
await Promise.all([
|
||||
await fetchKeycloakPosition(),
|
||||
fetchData(id.value),
|
||||
checkOfficer(),
|
||||
]);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue