รายการลาออก
This commit is contained in:
parent
2c3be4c51e
commit
e2e24b7717
9 changed files with 231 additions and 132 deletions
|
|
@ -10,6 +10,7 @@ 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 type {
|
||||
TypeFile,
|
||||
|
|
@ -32,6 +33,8 @@ import WorkFlow from "@/components/Workflow/Main.vue";
|
|||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const store = useRetirementDataStore();
|
||||
const { convertStatusText } = store;
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailRejectEMP");
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
|
|
@ -139,20 +142,11 @@ const columnsCommanders = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "org",
|
||||
align: "left",
|
||||
label: "สังกัด",
|
||||
sortable: true,
|
||||
field: "org",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "สถานะ",
|
||||
name: "approveStatus",
|
||||
align: "left",
|
||||
label: "สถานะ",
|
||||
sortable: true,
|
||||
field: "สถานะ",
|
||||
field: "approveStatus",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
|
@ -281,6 +275,7 @@ async function fetchData(id: string) {
|
|||
status.value = data.status ?? "";
|
||||
remarkHorizontal.value = data.remarkHorizontal ?? "-";
|
||||
isNoDebt.value = data.isNoDebt;
|
||||
statusCheck.value = data.status;
|
||||
isNoBurden.value = data.isNoBurden;
|
||||
isDiscipline.value = data.isDiscipline;
|
||||
})
|
||||
|
|
@ -446,7 +441,7 @@ function onSend() {
|
|||
() => {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.sendApprove(id.value))
|
||||
.get(config.API.sendApproveRetirement("-employee", id.value))
|
||||
.then(async (res) => {
|
||||
await fetchData(id.value);
|
||||
success($q, "ส่งไปพิจารณา");
|
||||
|
|
@ -461,9 +456,23 @@ function onSend() {
|
|||
);
|
||||
}
|
||||
|
||||
async function fetchKeycloakPosition() {
|
||||
if (keycloakId.value == "") {
|
||||
await http
|
||||
.get(config.API.keycloakPosition())
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
keycloakId.value = data.profileId;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** Hook */
|
||||
onMounted(async () => {
|
||||
await Promise.all([fetchData(id.value), checkOfficer()]);
|
||||
await Promise.all([await fetchKeycloakPosition(),fetchData(id.value), checkOfficer()]);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -581,7 +590,7 @@ onMounted(async () => {
|
|||
ผลการพิจารณาของผู้บังคับบัญชา
|
||||
</div>
|
||||
<q-btn
|
||||
v-if="statusCheck == 'NEW' && (isOfficer || isStaff)"
|
||||
v-if="statusCheck == 'WAITTING' && (isOfficer || isStaff)"
|
||||
flat
|
||||
round
|
||||
icon="add"
|
||||
|
|
@ -702,6 +711,13 @@ onMounted(async () => {
|
|||
{{ props.row.comment ? props.row.comment : "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.name == 'approveStatus'">
|
||||
{{
|
||||
props.row.approveStatus
|
||||
? convertStatusText(props.row.approveStatus)
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
|
|
@ -719,7 +735,7 @@ onMounted(async () => {
|
|||
ผลการพิจารณาของผู้มีอำนาจ
|
||||
</div>
|
||||
<q-btn
|
||||
v-if="statusCheck == 'NEW' && (isOfficer || isStaff)"
|
||||
v-if="statusCheck == 'WAITTING' && (isOfficer || isStaff)"
|
||||
flat
|
||||
round
|
||||
icon="add"
|
||||
|
|
@ -784,8 +800,10 @@ onMounted(async () => {
|
|||
<div class="col-12 text-top">สถานะ</div>
|
||||
<div class="col-12 text-detail">
|
||||
{{
|
||||
dataDetail.oligarchReject !== null
|
||||
? statusOrder(dataDetail.oligarchReject)
|
||||
rowsApprover &&
|
||||
rowsApprover.approvers &&
|
||||
rowsApprover.approvers[0]?.approveStatus
|
||||
? convertStatusText(rowsApprover?.approvers[0].approveStatus)
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
|
|
@ -816,7 +834,7 @@ onMounted(async () => {
|
|||
<q-card
|
||||
bordered
|
||||
class="row col-12 text-dark q-mt-sm q-pa-sm"
|
||||
v-if="statusCheck == 'NEW' && (isOfficer || isStaff)"
|
||||
v-if="statusCheck == 'WAITTING' && (isOfficer || isStaff)"
|
||||
>
|
||||
<q-btn
|
||||
@click="onSend"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue