2023-07-24 13:19:14 +07:00
|
|
|
<script setup lang="ts">
|
2024-10-21 15:37:18 +07:00
|
|
|
import { ref, onMounted, computed } from "vue";
|
2024-09-18 15:18:57 +07:00
|
|
|
import axios from "axios";
|
2023-08-09 14:46:46 +07:00
|
|
|
import { useRouter, useRoute } from "vue-router";
|
2023-07-24 13:19:14 +07:00
|
|
|
import { useQuasar, QForm } from "quasar";
|
2024-09-18 15:18:57 +07:00
|
|
|
|
2023-08-09 14:46:46 +07:00
|
|
|
import http from "@/plugins/http";
|
|
|
|
|
import config from "@/app.config";
|
2024-09-18 15:18:57 +07:00
|
|
|
import genReport from "@/plugins/genreport";
|
|
|
|
|
import { useCounterMixin } from "@/stores/mixin";
|
|
|
|
|
import DialogHeader from "@/components/DialogHeader.vue";
|
2024-05-23 16:34:22 +07:00
|
|
|
|
2023-11-17 14:21:53 +07:00
|
|
|
import type {
|
|
|
|
|
TypeFile,
|
|
|
|
|
rowFile,
|
2024-02-27 14:52:53 +07:00
|
|
|
FileList,
|
2023-11-17 14:21:53 +07:00
|
|
|
} from "@/modules/06_retirement/interface/response/Main";
|
2023-08-23 17:42:38 +07:00
|
|
|
import type { QTableProps } from "quasar";
|
2024-05-23 13:10:14 +07:00
|
|
|
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
|
|
|
|
|
2024-09-18 15:18:57 +07:00
|
|
|
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
2024-05-23 13:10:14 +07:00
|
|
|
import CardProfile from "@/components/CardProfile.vue";
|
2024-10-17 18:06:31 +07:00
|
|
|
import WorkFlow from "@/components/Workflow/Main.vue";
|
2024-02-27 14:52:53 +07:00
|
|
|
|
2023-11-17 14:21:53 +07:00
|
|
|
/** Use */
|
2023-08-14 16:45:23 +07:00
|
|
|
const $q = useQuasar();
|
2023-08-09 14:46:46 +07:00
|
|
|
const route = useRoute();
|
2023-08-14 16:45:23 +07:00
|
|
|
const router = useRouter();
|
2024-08-13 11:22:07 +07:00
|
|
|
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailbyid");
|
2023-08-09 14:46:46 +07:00
|
|
|
const mixin = useCounterMixin();
|
2023-08-14 16:45:23 +07:00
|
|
|
const {
|
|
|
|
|
messageError,
|
|
|
|
|
date2Thai,
|
|
|
|
|
showLoader,
|
|
|
|
|
hideLoader,
|
|
|
|
|
success,
|
2024-05-23 16:34:22 +07:00
|
|
|
|
2023-08-29 14:17:00 +07:00
|
|
|
dialogConfirm,
|
2024-02-27 14:52:53 +07:00
|
|
|
dialogRemove,
|
2023-08-14 16:45:23 +07:00
|
|
|
} = mixin;
|
|
|
|
|
|
2023-11-17 14:21:53 +07:00
|
|
|
/** ตัวแปร */
|
2024-09-18 15:18:57 +07:00
|
|
|
const modalPersonal = ref<boolean>(false);
|
|
|
|
|
const personId = ref<string>("");
|
2024-10-24 16:09:11 +07:00
|
|
|
const roleUser = ref<string>("");
|
2024-05-23 13:10:14 +07:00
|
|
|
const dataProfile = ref<DataProfile>();
|
|
|
|
|
|
2023-08-09 14:46:46 +07:00
|
|
|
const id = ref<string>(route.params.id.toString());
|
2023-08-14 16:45:23 +07:00
|
|
|
const myForm = ref<QForm | null>(null);
|
|
|
|
|
const edit = ref<boolean>(false);
|
2024-02-27 14:52:53 +07:00
|
|
|
const conditions = ref<boolean>(false);
|
2023-08-29 14:17:00 +07:00
|
|
|
const dataDetail = ref<any>({
|
2023-08-22 15:24:49 +07:00
|
|
|
datetext: "",
|
2023-08-14 16:45:23 +07:00
|
|
|
activeDate: new Date(),
|
|
|
|
|
createdAt: new Date(),
|
|
|
|
|
firstName: "",
|
|
|
|
|
id: "",
|
|
|
|
|
isActive: true,
|
|
|
|
|
lastName: "",
|
|
|
|
|
location: "",
|
|
|
|
|
organizationPositionOld: "",
|
|
|
|
|
positionLevelOld: "",
|
|
|
|
|
positionNumberOld: "",
|
|
|
|
|
positionTypeOld: "",
|
|
|
|
|
prefix: "",
|
|
|
|
|
profileId: "",
|
|
|
|
|
reason: "",
|
|
|
|
|
salary: 0,
|
|
|
|
|
sendDate: new Date(),
|
|
|
|
|
status: "",
|
|
|
|
|
statustext: "",
|
|
|
|
|
fullname: "",
|
2024-11-15 11:38:24 +07:00
|
|
|
statusMain: "",
|
|
|
|
|
cancelReason: "",
|
2024-12-12 15:56:52 +07:00
|
|
|
remark: "",
|
2025-01-13 17:06:48 +07:00
|
|
|
reasonResign: "",
|
2023-08-14 16:45:23 +07:00
|
|
|
});
|
2024-09-18 15:18:57 +07:00
|
|
|
|
2024-10-17 18:06:31 +07:00
|
|
|
const workflowRef = ref<any>(null);
|
2023-08-14 16:45:23 +07:00
|
|
|
const organizationPositionOld = ref<string>("");
|
|
|
|
|
const positionTypeOld = ref<string>("");
|
|
|
|
|
const positionLevelOld = ref<string>("");
|
|
|
|
|
const posNo = ref<string>("");
|
|
|
|
|
const salary = ref<number>(0);
|
|
|
|
|
const date = ref<Date | null>(null);
|
|
|
|
|
const dateLeave = ref<Date | null>(null);
|
|
|
|
|
const reason = ref<string>("");
|
|
|
|
|
const location = ref<string>("");
|
2023-08-22 15:24:49 +07:00
|
|
|
const status = ref<string>("");
|
2023-10-06 13:32:54 +07:00
|
|
|
const remarkHorizontal = ref<string>("");
|
2023-08-22 17:41:35 +07:00
|
|
|
const modal = ref<boolean>(false);
|
|
|
|
|
const actionPass = ref<boolean>(false);
|
|
|
|
|
const reasonReign = ref<string>("");
|
2023-08-23 14:57:50 +07:00
|
|
|
const dateBreak = ref<Date | null>(null);
|
2023-08-22 17:41:35 +07:00
|
|
|
|
2024-10-21 15:37:18 +07:00
|
|
|
const isCheckData = computed(() => {
|
|
|
|
|
if (
|
|
|
|
|
organizationPositionOld.value !== "" &&
|
|
|
|
|
positionTypeOld.value !== "" &&
|
|
|
|
|
positionLevelOld.value !== "" &&
|
|
|
|
|
posNo.value !== "" &&
|
2024-10-24 16:09:11 +07:00
|
|
|
date.value !== null &&
|
2024-10-25 10:41:12 +07:00
|
|
|
dataDetail.value.commanderReject !== null &&
|
|
|
|
|
dataDetail.value.oligarchReject !== null
|
2024-10-21 15:37:18 +07:00
|
|
|
) {
|
|
|
|
|
return true;
|
|
|
|
|
} else return false;
|
|
|
|
|
});
|
|
|
|
|
|
2023-11-17 14:21:53 +07:00
|
|
|
/** คอลัมน์ */
|
2023-08-23 17:42:38 +07:00
|
|
|
const rows = ref<TypeFile[]>([]);
|
|
|
|
|
const columns = ref<QTableProps["columns"]>([
|
|
|
|
|
{
|
|
|
|
|
name: "no",
|
|
|
|
|
align: "left",
|
|
|
|
|
label: "ลำดับ",
|
|
|
|
|
sortable: true,
|
|
|
|
|
field: "no",
|
|
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "fileName",
|
|
|
|
|
align: "left",
|
|
|
|
|
label: "ชื่อไฟล์",
|
|
|
|
|
sortable: true,
|
|
|
|
|
field: "fileName",
|
|
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "btnMicrosoft",
|
|
|
|
|
align: "right",
|
|
|
|
|
label: "ปุ่ม",
|
|
|
|
|
sortable: true,
|
|
|
|
|
field: "btnMicrosoft",
|
|
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
|
|
|
|
]);
|
|
|
|
|
|
2023-11-17 14:21:53 +07:00
|
|
|
/**เปิด-ปิด modal */
|
2024-10-24 16:09:11 +07:00
|
|
|
function closeModal() {
|
|
|
|
|
modal.value = false;
|
|
|
|
|
}
|
|
|
|
|
function openModal() {
|
|
|
|
|
modal.value = true;
|
|
|
|
|
}
|
2023-08-22 17:41:35 +07:00
|
|
|
|
2024-02-27 14:52:53 +07:00
|
|
|
const file = ref<any>(null);
|
|
|
|
|
const fileList = ref<FileList[]>([]);
|
2024-05-27 09:55:39 +07:00
|
|
|
const isNoDebt = ref<boolean>(false);
|
2024-06-10 12:04:57 +07:00
|
|
|
const isNoBurden = ref<boolean>(false);
|
|
|
|
|
const isDiscipline = ref<boolean>(false);
|
2024-05-23 16:34:22 +07:00
|
|
|
|
2024-09-18 15:18:57 +07:00
|
|
|
// เอกสารดาวน์โหลด
|
|
|
|
|
const rowsFileDownload = ref<rowFile[]>([
|
|
|
|
|
{
|
|
|
|
|
fileName: "แบบฟอร์มหนังสือขอลาออกจากราชการ",
|
|
|
|
|
pathName: "",
|
|
|
|
|
},
|
|
|
|
|
]);
|
2023-08-14 16:45:23 +07:00
|
|
|
|
2024-09-18 15:18:57 +07:00
|
|
|
function diffDate() {
|
2023-08-22 18:02:46 +07:00
|
|
|
if (date.value !== null && dateLeave.value !== null) {
|
|
|
|
|
const time = dateLeave.value.getTime() - date.value.getTime();
|
|
|
|
|
//วันที่ขอลาออกจากราชการ - วันที่ยื่นขอลาออกจากราชการ
|
|
|
|
|
const day = time / (1000 * 3600 * 24);
|
|
|
|
|
if (day < 30) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
2024-09-18 15:18:57 +07:00
|
|
|
}
|
2023-08-22 18:02:46 +07:00
|
|
|
|
2024-05-23 16:34:22 +07:00
|
|
|
/** นำข้อมูลมาจาก API*/
|
2024-09-18 15:18:57 +07:00
|
|
|
async function fetchData(id: string) {
|
2024-10-25 10:41:12 +07:00
|
|
|
showLoader();
|
2023-08-09 14:46:46 +07:00
|
|
|
await http
|
|
|
|
|
.get(config.API.resingByid(id))
|
2024-10-24 16:09:11 +07:00
|
|
|
.then(async (res) => {
|
|
|
|
|
const data = await res.data.result;
|
2024-05-23 13:10:14 +07:00
|
|
|
dataProfile.value = data as DataProfile;
|
2023-10-06 13:32:54 +07:00
|
|
|
|
2023-08-23 17:42:38 +07:00
|
|
|
let list: TypeFile[] = [];
|
|
|
|
|
if (data.docs.length > 0) {
|
|
|
|
|
data.docs.map((doc: TypeFile) => {
|
|
|
|
|
list.push({
|
|
|
|
|
pathName: doc.pathName ?? "",
|
|
|
|
|
fileName: doc.fileName ?? "",
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
2023-08-28 14:33:50 +07:00
|
|
|
rows.value = list;
|
2023-08-23 17:42:38 +07:00
|
|
|
dataDetail.value = data;
|
2024-05-27 09:55:39 +07:00
|
|
|
|
2023-08-14 16:45:23 +07:00
|
|
|
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
|
|
|
|
positionTypeOld.value = data.positionTypeOld ?? "";
|
|
|
|
|
positionLevelOld.value = data.positionLevelOld ?? "";
|
|
|
|
|
posNo.value = data.positionNumberOld ?? "";
|
|
|
|
|
salary.value = data.salary ? data.salary : 0;
|
|
|
|
|
date.value = data.sendDate ? new Date(data.sendDate) : null;
|
|
|
|
|
dateLeave.value = data.activeDate ? new Date(data.activeDate) : null;
|
2025-01-13 17:06:48 +07:00
|
|
|
reason.value = data.reasonResign ?? "";
|
2023-08-14 16:45:23 +07:00
|
|
|
location.value = data.location ?? "";
|
2023-08-22 15:24:49 +07:00
|
|
|
status.value = data.status ?? "";
|
2023-10-06 13:32:54 +07:00
|
|
|
remarkHorizontal.value = data.remarkHorizontal ?? "-";
|
2024-05-27 09:55:39 +07:00
|
|
|
isNoDebt.value = data.isNoDebt;
|
2024-06-10 12:04:57 +07:00
|
|
|
isNoBurden.value = data.isNoBurden;
|
|
|
|
|
isDiscipline.value = data.isDiscipline;
|
2023-08-09 14:46:46 +07:00
|
|
|
})
|
2023-08-29 15:22:27 +07:00
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
2024-10-25 10:41:12 +07:00
|
|
|
})
|
|
|
|
|
.finally(() => {
|
2023-08-29 15:22:27 +07:00
|
|
|
hideLoader();
|
|
|
|
|
});
|
2024-09-18 15:18:57 +07:00
|
|
|
}
|
2024-01-31 16:23:21 +07:00
|
|
|
|
2023-11-17 14:21:53 +07:00
|
|
|
/**Pop up */
|
2024-10-24 16:09:11 +07:00
|
|
|
function popUp(action: "pass" | "passNot", type: string) {
|
2023-08-22 17:41:35 +07:00
|
|
|
reasonReign.value = "";
|
2023-08-23 14:57:50 +07:00
|
|
|
dateBreak.value = null;
|
2023-08-22 17:41:35 +07:00
|
|
|
actionPass.value = action === "pass";
|
2024-10-24 16:09:11 +07:00
|
|
|
roleUser.value = type;
|
2023-08-22 17:41:35 +07:00
|
|
|
openModal();
|
2024-09-18 15:18:57 +07:00
|
|
|
}
|
2024-05-23 16:34:22 +07:00
|
|
|
|
2023-11-17 14:21:53 +07:00
|
|
|
//เงื่อนไขpop up
|
2024-10-24 16:09:11 +07:00
|
|
|
function onSubmit() {
|
|
|
|
|
if (actionPass.value) {
|
|
|
|
|
confirmpopUp();
|
|
|
|
|
} else {
|
|
|
|
|
rejectpopUp();
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-08-14 16:45:23 +07:00
|
|
|
|
2024-07-09 16:02:27 +07:00
|
|
|
//pop up ยืนยันการอนุญาต
|
2024-10-24 16:09:11 +07:00
|
|
|
async function confirmpopUp() {
|
|
|
|
|
dialogConfirm(
|
|
|
|
|
$q,
|
|
|
|
|
async () => {
|
|
|
|
|
showLoader();
|
|
|
|
|
const body = {
|
|
|
|
|
reason: reasonReign.value,
|
|
|
|
|
};
|
|
|
|
|
await http
|
|
|
|
|
.put(config.API.resignConfirm(roleUser.value, id.value), body)
|
|
|
|
|
.then(async () => {
|
|
|
|
|
await fetchData(id.value);
|
|
|
|
|
closeModal();
|
|
|
|
|
success($q, "การอนุญาตสำเร็จ");
|
|
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
"ยืนยันการอนุญาต",
|
|
|
|
|
"ต้องการยืนยันการอนุญาตการลานี้หรือไม่ ?"
|
|
|
|
|
);
|
|
|
|
|
}
|
2023-08-14 16:45:23 +07:00
|
|
|
|
2023-11-17 14:21:53 +07:00
|
|
|
//pop up การยับยั้งสำเร็จ
|
2024-10-24 16:09:11 +07:00
|
|
|
async function rejectpopUp() {
|
|
|
|
|
dialogConfirm(
|
|
|
|
|
$q,
|
|
|
|
|
async () => {
|
|
|
|
|
showLoader();
|
|
|
|
|
const body = {
|
|
|
|
|
reason: reasonReign.value,
|
|
|
|
|
date: dateBreak.value,
|
|
|
|
|
};
|
|
|
|
|
await http
|
|
|
|
|
.put(config.API.resignReject(roleUser.value, id.value), body)
|
|
|
|
|
.then(async () => {
|
|
|
|
|
await fetchData(id.value);
|
|
|
|
|
closeModal();
|
|
|
|
|
success($q, "การยับยั้งสำเร็จ");
|
|
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
"ยืนยันการยับยั้ง",
|
|
|
|
|
"ต้องการยืนยันการยับยั้งนี้หรือไม่ ?"
|
|
|
|
|
);
|
|
|
|
|
}
|
2023-11-17 14:21:53 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* กดยกเลิก
|
|
|
|
|
*/
|
2024-09-18 15:18:57 +07:00
|
|
|
async function clickCancel() {
|
2023-09-26 13:14:57 +07:00
|
|
|
edit.value = false;
|
2024-11-29 14:28:21 +07:00
|
|
|
const data = dataDetail.value;
|
|
|
|
|
if (data) {
|
|
|
|
|
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
|
|
|
|
positionTypeOld.value = data.positionTypeOld ?? "";
|
|
|
|
|
positionLevelOld.value = data.positionLevelOld ?? "";
|
|
|
|
|
posNo.value = data.positionNumberOld ?? "";
|
|
|
|
|
salary.value = data.salary ? data.salary : 0;
|
|
|
|
|
date.value = data.sendDate ? new Date(data.sendDate) : null;
|
|
|
|
|
dateLeave.value = data.activeDate ? new Date(data.activeDate) : null;
|
2025-01-13 17:06:48 +07:00
|
|
|
reason.value = data.reasonResign ?? "";
|
2024-11-29 14:28:21 +07:00
|
|
|
location.value = data.location ?? "";
|
|
|
|
|
status.value = data.status ?? "";
|
|
|
|
|
remarkHorizontal.value = data.remarkHorizontal ?? "-";
|
|
|
|
|
isNoDebt.value = data.isNoDebt;
|
|
|
|
|
isNoBurden.value = data.isNoBurden;
|
|
|
|
|
isDiscipline.value = data.isDiscipline;
|
|
|
|
|
}
|
2024-05-23 16:34:22 +07:00
|
|
|
myForm.value?.resetValidation();
|
2024-09-18 15:18:57 +07:00
|
|
|
}
|
2024-02-27 14:52:53 +07:00
|
|
|
/**
|
|
|
|
|
* กดยกเลิก
|
|
|
|
|
*/
|
2024-09-18 15:18:57 +07:00
|
|
|
async function clickCancelConditions() {
|
2024-02-27 14:52:53 +07:00
|
|
|
await fetchData(id.value);
|
|
|
|
|
conditions.value = false;
|
2024-09-18 15:18:57 +07:00
|
|
|
}
|
2024-02-27 14:52:53 +07:00
|
|
|
|
2024-11-28 13:44:28 +07:00
|
|
|
/** Function บันทึก รายการตรวจสอบเงื่อนไขต่างๆ*/
|
2024-09-18 15:18:57 +07:00
|
|
|
function onSubmitConditions() {
|
2024-05-23 16:34:22 +07:00
|
|
|
dialogConfirm($q, () => {
|
|
|
|
|
showLoader();
|
|
|
|
|
http
|
|
|
|
|
.put(config.API.resignConditions(id.value), {
|
2024-05-27 09:55:39 +07:00
|
|
|
isNoDebt: isNoDebt.value,
|
2024-06-10 12:04:57 +07:00
|
|
|
isNoBurden: isNoBurden.value,
|
|
|
|
|
isDiscipline: isDiscipline.value,
|
2024-05-23 16:34:22 +07:00
|
|
|
})
|
2024-10-24 16:09:11 +07:00
|
|
|
.then(async () => {
|
|
|
|
|
await fetchData(id.value);
|
2024-11-28 13:44:28 +07:00
|
|
|
success($q, "บันทึกเงื่อนไขต่างๆ สำเร็จ");
|
2024-05-23 16:34:22 +07:00
|
|
|
conditions.value = false;
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
messageError($q, err);
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
|
|
|
|
});
|
2024-09-18 15:18:57 +07:00
|
|
|
}
|
2024-02-27 14:52:53 +07:00
|
|
|
|
2024-05-23 16:34:22 +07:00
|
|
|
/** Function บันทึก ,แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย*/
|
2024-09-18 15:18:57 +07:00
|
|
|
function onSubmitAttached() {
|
2024-05-23 16:34:22 +07:00
|
|
|
dialogConfirm($q, () => {
|
|
|
|
|
const formData = new FormData();
|
|
|
|
|
const send = date.value !== null ? new Date(date.value).toUTCString() : "";
|
|
|
|
|
const activeDate =
|
|
|
|
|
dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : "";
|
|
|
|
|
formData.append("Location", location.value);
|
|
|
|
|
formData.append("SendDate", send);
|
|
|
|
|
formData.append("ActiveDate", activeDate);
|
|
|
|
|
formData.append("Reason", reason.value);
|
|
|
|
|
formData.append("OrganizationPositionOld", organizationPositionOld.value);
|
|
|
|
|
formData.append("PositionTypeOld", positionTypeOld.value);
|
|
|
|
|
formData.append("PositionLevelOld", positionLevelOld.value);
|
|
|
|
|
formData.append("PositionNumberOld", posNo.value);
|
|
|
|
|
formData.append("AmountOld", salary.value.toString());
|
|
|
|
|
formData.append("remarkHorizontal", remarkHorizontal.value);
|
|
|
|
|
showLoader();
|
|
|
|
|
http
|
|
|
|
|
.put(config.API.resingByid(id.value), formData)
|
2024-10-24 16:09:11 +07:00
|
|
|
.then(async () => {
|
|
|
|
|
await fetchData(id.value);
|
2024-05-23 16:34:22 +07:00
|
|
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
2024-10-24 16:09:11 +07:00
|
|
|
edit.value = false;
|
2024-05-23 16:34:22 +07:00
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
})
|
2024-10-24 16:09:11 +07:00
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader();
|
2024-05-23 16:34:22 +07:00
|
|
|
});
|
|
|
|
|
});
|
2024-09-18 15:18:57 +07:00
|
|
|
}
|
2023-08-29 14:17:00 +07:00
|
|
|
|
2023-11-17 14:21:53 +07:00
|
|
|
/**
|
|
|
|
|
* Function เพิ่ม Class เวลา Edit
|
|
|
|
|
* @param val เมื่อเป็นEdit จะเปลี่ยน Class
|
|
|
|
|
*/
|
2024-09-18 15:18:57 +07:00
|
|
|
function getClass(val: boolean) {
|
2023-08-29 14:17:00 +07:00
|
|
|
return {
|
|
|
|
|
"full-width inputgreen cursor-pointer": val,
|
|
|
|
|
"full-width cursor-pointer": !val,
|
|
|
|
|
};
|
2024-09-18 15:18:57 +07:00
|
|
|
}
|
2023-11-17 14:21:53 +07:00
|
|
|
|
|
|
|
|
/** แปลง StatusOrder */
|
2024-09-18 15:18:57 +07:00
|
|
|
function statusOrder(val: boolean) {
|
2023-08-29 14:17:00 +07:00
|
|
|
switch (val) {
|
|
|
|
|
case true:
|
2024-07-09 16:02:27 +07:00
|
|
|
return "ยับยั้ง";
|
2023-08-29 14:17:00 +07:00
|
|
|
case false:
|
2024-07-09 16:02:27 +07:00
|
|
|
return "อนุญาต";
|
2023-08-29 14:17:00 +07:00
|
|
|
}
|
2024-09-18 15:18:57 +07:00
|
|
|
}
|
2023-10-10 12:03:49 +07:00
|
|
|
|
2023-11-17 14:21:53 +07:00
|
|
|
// ดาว์นโหลดไฟล์
|
2024-09-18 15:18:57 +07:00
|
|
|
async function fileDownload(type: string, fileName: string) {
|
2023-10-10 12:03:49 +07:00
|
|
|
showLoader();
|
|
|
|
|
await http
|
2024-08-22 13:08:09 +07:00
|
|
|
.get(config.API.reportResignList(type, id.value))
|
2023-10-10 12:03:49 +07:00
|
|
|
.then(async (res) => {
|
2024-08-22 13:08:09 +07:00
|
|
|
const data = res.data.result;
|
|
|
|
|
await genReport(data, `${fileName}`, type);
|
2023-10-10 12:03:49 +07:00
|
|
|
})
|
2024-06-14 11:06:31 +07:00
|
|
|
.catch(async (e) => {
|
|
|
|
|
messageError($q, JSON.parse(await e.response.data.text()));
|
2024-08-22 13:08:09 +07:00
|
|
|
})
|
2024-10-24 17:52:42 +07:00
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
2024-09-18 15:18:57 +07:00
|
|
|
}
|
2024-01-11 17:21:51 +07:00
|
|
|
|
|
|
|
|
function updatemodalPersonal(modal: boolean) {
|
|
|
|
|
modalPersonal.value = modal;
|
|
|
|
|
}
|
2024-02-27 14:52:53 +07:00
|
|
|
|
2024-05-23 16:34:22 +07:00
|
|
|
async function fetchFile() {
|
|
|
|
|
showLoader();
|
|
|
|
|
await http
|
|
|
|
|
.get(config.API.file("พ้นจากราชการ", "หลักฐานลาออก", id.value))
|
2024-10-24 17:52:42 +07:00
|
|
|
.then(async (res) => {
|
|
|
|
|
fileList.value = await res.data;
|
2024-05-23 16:34:22 +07:00
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-27 14:52:53 +07:00
|
|
|
function uploadFiles() {
|
2024-05-23 16:34:22 +07:00
|
|
|
showLoader();
|
|
|
|
|
http
|
|
|
|
|
.post(config.API.file("พ้นจากราชการ", "หลักฐานลาออก", id.value), {
|
|
|
|
|
replace: true,
|
|
|
|
|
fileList: [
|
|
|
|
|
{
|
|
|
|
|
fileName: file.value.name,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
})
|
|
|
|
|
.then(async (res) => {
|
|
|
|
|
const foundKey: string | undefined = Object.keys(res.data).find(
|
|
|
|
|
(key) =>
|
|
|
|
|
res.data[key]?.fileName !== undefined &&
|
|
|
|
|
res.data[key]?.fileName !== ""
|
|
|
|
|
);
|
2024-10-24 17:52:42 +07:00
|
|
|
foundKey && (await uploadFileURL(res.data[foundKey]?.uploadUrl));
|
2024-05-23 16:34:22 +07:00
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
messageError($q, err);
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function uploadFileURL(uploadUrl: string) {
|
2024-02-27 14:52:53 +07:00
|
|
|
const Data = new FormData();
|
|
|
|
|
Data.append("file", file.value);
|
|
|
|
|
showLoader();
|
2024-05-23 16:34:22 +07:00
|
|
|
await axios
|
|
|
|
|
.put(uploadUrl, file.value, {
|
|
|
|
|
headers: {
|
|
|
|
|
"Content-Type": file.value.type,
|
|
|
|
|
},
|
|
|
|
|
})
|
2024-10-24 17:52:42 +07:00
|
|
|
.then(async () => {
|
|
|
|
|
await fetchFile();
|
2024-02-27 14:52:53 +07:00
|
|
|
success($q, "อัปโหลดไฟล์สำเร็จ");
|
|
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
})
|
2024-05-23 16:34:22 +07:00
|
|
|
.finally(() => {
|
2024-02-27 14:52:53 +07:00
|
|
|
hideLoader();
|
|
|
|
|
file.value = null;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-24 17:52:42 +07:00
|
|
|
async function downloadFiles(fileName: string) {
|
2024-02-27 14:52:53 +07:00
|
|
|
showLoader();
|
2024-10-24 17:52:42 +07:00
|
|
|
await http
|
2024-05-23 16:34:22 +07:00
|
|
|
.get(
|
|
|
|
|
config.API.fileByFile("พ้นจากราชการ", "หลักฐานลาออก", id.value, fileName)
|
|
|
|
|
)
|
2024-10-24 17:52:42 +07:00
|
|
|
.then(async (res) => {
|
|
|
|
|
const data = await res.data.downloadUrl;
|
2024-05-23 16:34:22 +07:00
|
|
|
window.open(data, "_blank");
|
2024-02-27 14:52:53 +07:00
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
})
|
2024-05-23 16:34:22 +07:00
|
|
|
.finally(async () => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ลบไฟล์
|
|
|
|
|
* @param id id file
|
|
|
|
|
*/
|
|
|
|
|
function removeFile(fileName: string) {
|
|
|
|
|
dialogRemove($q, () => {
|
|
|
|
|
showLoader();
|
|
|
|
|
http
|
|
|
|
|
.delete(
|
|
|
|
|
config.API.fileByFile(
|
|
|
|
|
"พ้นจากราชการ",
|
|
|
|
|
"หลักฐานลาออก",
|
|
|
|
|
id.value,
|
|
|
|
|
fileName
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
.then(() => {
|
2024-10-24 17:52:42 +07:00
|
|
|
setTimeout(async () => {
|
|
|
|
|
await fetchFile();
|
|
|
|
|
success($q, `ลบไฟล์สำเร็จ`);
|
2024-05-23 16:34:22 +07:00
|
|
|
hideLoader();
|
|
|
|
|
}, 1000);
|
|
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
|
|
|
|
});
|
2024-02-27 14:52:53 +07:00
|
|
|
}
|
2024-09-18 15:18:57 +07:00
|
|
|
|
2024-12-12 15:56:52 +07:00
|
|
|
function convertStatus(val: string) {
|
|
|
|
|
if (/^[A-Za-z]+$/.test(val)) {
|
|
|
|
|
switch (val) {
|
|
|
|
|
case "CAREER":
|
|
|
|
|
return "ประกอบอาชีพอื่น";
|
|
|
|
|
case "MOVE":
|
|
|
|
|
return "รับราชการสังกัดอื่น";
|
|
|
|
|
case "FAMILY":
|
|
|
|
|
return "ดูแลบิดามารดา";
|
|
|
|
|
case "EDUCATION":
|
|
|
|
|
return "ศึกษาต่อ";
|
|
|
|
|
case "OTHER":
|
|
|
|
|
return "อื่น ๆ";
|
|
|
|
|
}
|
|
|
|
|
} else return val;
|
|
|
|
|
}
|
2024-09-18 15:18:57 +07:00
|
|
|
/** Hook */
|
|
|
|
|
onMounted(async () => {
|
2024-10-24 17:52:42 +07:00
|
|
|
showLoader();
|
|
|
|
|
await Promise.all([fetchData(id.value), fetchFile()]).finally(() => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
2024-09-18 15:18:57 +07:00
|
|
|
});
|
2023-08-29 14:17:00 +07:00
|
|
|
</script>
|
2024-07-18 17:19:26 +07:00
|
|
|
|
2023-07-24 13:19:14 +07:00
|
|
|
<template>
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="q-gutter-sm q-pa-sm">
|
|
|
|
|
<div class="toptitle text-dark col-12 row items-center">
|
|
|
|
|
<q-btn
|
|
|
|
|
icon="mdi-arrow-left"
|
|
|
|
|
unelevated
|
|
|
|
|
round
|
|
|
|
|
dense
|
|
|
|
|
flat
|
|
|
|
|
color="primary"
|
|
|
|
|
class="q-mr-sm"
|
|
|
|
|
@click="router.push('/retirement/resign')"
|
|
|
|
|
/>
|
2024-12-12 15:56:52 +07:00
|
|
|
รายละเอียดการลาออก
|
|
|
|
|
{{
|
|
|
|
|
dataDetail.prefix + dataDetail.firstName + " " + dataDetail.lastName
|
2024-11-29 14:28:21 +07:00
|
|
|
}}
|
2024-10-17 18:06:31 +07:00
|
|
|
</div>
|
2024-05-23 13:10:14 +07:00
|
|
|
|
2024-10-17 18:06:31 +07:00
|
|
|
<CardProfile :data="dataProfile as DataProfile" />
|
2024-05-23 13:10:14 +07:00
|
|
|
|
2024-10-17 18:06:31 +07:00
|
|
|
<!-- ข้อมูลการลาออก -->
|
|
|
|
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
|
|
|
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
|
|
|
<div class="q-pl-sm text-weight-bold text-dark">ข้อมูลการลาออก</div>
|
2024-10-18 14:51:16 +07:00
|
|
|
<!-- <q-space />
|
2024-10-17 18:06:31 +07:00
|
|
|
<div
|
|
|
|
|
class="q-gutter-x-sm"
|
|
|
|
|
v-if="
|
|
|
|
|
(roleUser === 'officer' && dataDetail.officerReject === null) ||
|
|
|
|
|
(roleUser === 'commander' &&
|
|
|
|
|
dataDetail.commanderReject === null &&
|
|
|
|
|
dataDetail.officerReject !== null) ||
|
|
|
|
|
(roleUser === 'oligarch' &&
|
|
|
|
|
dataDetail.oligarchReject === null &&
|
|
|
|
|
dataDetail.commanderReject !== null &&
|
|
|
|
|
dataDetail.officerReject !== null)
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<q-btn
|
|
|
|
|
outline
|
|
|
|
|
color="primary"
|
|
|
|
|
dense
|
|
|
|
|
icon-right="check"
|
|
|
|
|
class="q-px-sm"
|
|
|
|
|
label="อนุญาต"
|
|
|
|
|
@click="popUp('pass')"
|
|
|
|
|
/>
|
|
|
|
|
<q-btn
|
|
|
|
|
outline
|
|
|
|
|
color="red"
|
|
|
|
|
dense
|
|
|
|
|
icon-right="close"
|
|
|
|
|
class="q-px-sm"
|
|
|
|
|
label="ยับยั้ง"
|
|
|
|
|
@click="popUp('passNot')"
|
|
|
|
|
/>
|
2024-10-18 14:51:16 +07:00
|
|
|
</div> -->
|
2024-10-17 18:06:31 +07:00
|
|
|
</div>
|
|
|
|
|
<div class="col-12"><q-separator /></div>
|
|
|
|
|
<div class="row col-12 q-pa-md">
|
|
|
|
|
<div class="col-12 row bg-white q-col-gutter-md">
|
|
|
|
|
<div class="col-xs-6 col-sm-3 row items-start">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<div class="col-12 text-top">สถานที่ยื่นขอลาออกจากราชการ</div>
|
|
|
|
|
<div class="col-12 text-detail">{{ dataDetail.location }}</div>
|
2023-08-09 14:46:46 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-xs-6 col-sm-3 row items-start">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<div class="col-12 text-top">วันที่ยื่นขอลาออกจากราชการ</div>
|
|
|
|
|
<div class="col-12 text-detail">
|
|
|
|
|
{{ date2Thai(dataDetail.sendDate) }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-08-09 14:46:46 +07:00
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-xs-6 col-sm-3 row items-start">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<div class="col-12 text-top">เหตุผลที่ลาออกจากราชการ</div>
|
2024-12-12 15:56:52 +07:00
|
|
|
<div class="col-12 text-detail">
|
|
|
|
|
{{
|
|
|
|
|
`${convertStatus(dataDetail.reason)}${
|
|
|
|
|
dataDetail.remark ? `(${dataDetail.remark})` : ""
|
|
|
|
|
}`
|
|
|
|
|
}}
|
|
|
|
|
</div>
|
2023-08-09 14:46:46 +07:00
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
</div>
|
|
|
|
|
<div class="col-xs-6 col-sm-3 row items-start">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<div class="col-12 text-top">วันที่ขอลาออกจากราชการ</div>
|
|
|
|
|
<div
|
|
|
|
|
:class="
|
|
|
|
|
diffDate()
|
|
|
|
|
? 'col-12 text-detail text-red text-bold'
|
|
|
|
|
: 'col-12 text-detail'
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
{{ date2Thai(dataDetail.activeDate) }}
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
:class="
|
|
|
|
|
diffDate()
|
|
|
|
|
? 'col-12 text-detail text-red text-bold'
|
|
|
|
|
: 'col-12 text-detail'
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
{{ diffDate() ? "(ยื่นขอลาออกน้อยกว่า 30 วัน)" : "" }}
|
|
|
|
|
</div>
|
2023-08-22 18:02:46 +07:00
|
|
|
</div>
|
2023-08-09 14:46:46 +07:00
|
|
|
</div>
|
2024-11-15 11:38:24 +07:00
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
class="col-xs-12 col-sm-12 row items-start"
|
|
|
|
|
v-if="dataDetail.statusMain === 'CANCEL'"
|
|
|
|
|
>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<div class="col-12 text-top">เหตุผลการขอยกเลิก</div>
|
|
|
|
|
<div class="col-12 text-detail text-red">
|
|
|
|
|
{{ dataDetail.cancelReason }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-08-09 14:46:46 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
</q-card>
|
2023-10-10 12:03:49 +07:00
|
|
|
|
2024-10-17 18:06:31 +07:00
|
|
|
<!-- เอกสารเพิ่มเติม -->
|
|
|
|
|
<q-card
|
|
|
|
|
v-if="rows.length > 0"
|
|
|
|
|
bordered
|
|
|
|
|
class="row col-12 text-dark q-mt-sm"
|
|
|
|
|
>
|
|
|
|
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
|
|
|
<div class="q-pl-sm text-weight-bold text-dark">เอกสารเพิ่มเติม</div>
|
2024-02-27 14:52:53 +07:00
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-12"><q-separator /></div>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<d-table
|
|
|
|
|
:rows="rows"
|
|
|
|
|
:columns="columns"
|
|
|
|
|
row-key="fileName"
|
|
|
|
|
hide-header
|
|
|
|
|
hide-bottom
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:body="props">
|
|
|
|
|
<q-tr :props="props" class="cursor-pointer">
|
|
|
|
|
<q-td key="no" :props="props">
|
|
|
|
|
{{ props.rowIndex + 1 }}
|
|
|
|
|
</q-td>
|
|
|
|
|
<q-td key="fileName" :props="props">
|
|
|
|
|
{{ props.row.fileName }}
|
|
|
|
|
</q-td>
|
|
|
|
|
<q-td key="btnMicrosoft" :props="props">
|
2024-06-25 01:09:43 +07:00
|
|
|
<q-btn
|
2024-10-17 18:06:31 +07:00
|
|
|
type="a"
|
|
|
|
|
target="_blank"
|
|
|
|
|
:href="props.row.pathName"
|
|
|
|
|
flat
|
2024-06-25 01:09:43 +07:00
|
|
|
dense
|
2024-10-17 18:06:31 +07:00
|
|
|
round
|
|
|
|
|
color="red"
|
|
|
|
|
icon="picture_as_pdf"
|
|
|
|
|
>
|
|
|
|
|
<q-tooltip>ไฟล์ PDF</q-tooltip>
|
|
|
|
|
</q-btn>
|
|
|
|
|
</q-td>
|
|
|
|
|
</q-tr>
|
|
|
|
|
</template>
|
|
|
|
|
</d-table>
|
|
|
|
|
</div>
|
|
|
|
|
</q-card>
|
|
|
|
|
|
|
|
|
|
<!-- เอกสารดาวน์โหลด -->
|
|
|
|
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
|
|
|
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
|
|
|
<div class="q-pl-sm text-weight-bold text-dark">เอกสารดาวน์โหลด</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12"><q-separator /></div>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<d-table
|
|
|
|
|
:rows="rowsFileDownload"
|
|
|
|
|
:columns="columns"
|
|
|
|
|
row-key="fileName"
|
|
|
|
|
hide-header
|
|
|
|
|
hide-bottom
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:body="props">
|
|
|
|
|
<q-tr :props="props" class="cursor-pointer">
|
|
|
|
|
<q-td key="fileName" :props="props">
|
|
|
|
|
{{ props.row.fileName }}
|
|
|
|
|
</q-td>
|
|
|
|
|
<q-td key="btnMicrosoft" :props="props">
|
2024-06-25 01:09:43 +07:00
|
|
|
<q-btn
|
2024-10-17 18:06:31 +07:00
|
|
|
flat
|
2024-06-25 01:09:43 +07:00
|
|
|
dense
|
2024-10-17 18:06:31 +07:00
|
|
|
round
|
2024-06-25 01:09:43 +07:00
|
|
|
color="red"
|
2024-10-17 18:06:31 +07:00
|
|
|
icon="picture_as_pdf"
|
|
|
|
|
@click="fileDownload('pdf', props.row.fileName)"
|
|
|
|
|
>
|
|
|
|
|
<q-tooltip>ไฟล์ PDF</q-tooltip>
|
|
|
|
|
</q-btn>
|
|
|
|
|
<q-btn
|
|
|
|
|
flat
|
2024-06-25 01:09:43 +07:00
|
|
|
dense
|
2024-10-17 18:06:31 +07:00
|
|
|
round
|
|
|
|
|
color="blue"
|
|
|
|
|
icon="mdi-file-word"
|
|
|
|
|
@click="fileDownload('docx', props.row.fileName)"
|
|
|
|
|
>
|
|
|
|
|
<q-tooltip>ไฟล์ WORD</q-tooltip>
|
|
|
|
|
</q-btn>
|
|
|
|
|
</q-td>
|
|
|
|
|
</q-tr>
|
|
|
|
|
</template>
|
|
|
|
|
</d-table>
|
2024-05-23 16:34:22 +07:00
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
</q-card>
|
|
|
|
|
|
2024-11-28 13:44:28 +07:00
|
|
|
<!-- รายการตรวจสอบเงื่อนไขต่างๆ -->
|
2024-10-17 18:06:31 +07:00
|
|
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
|
|
|
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
|
|
|
<div class="q-pl-sm text-weight-bold text-dark">
|
2024-11-28 13:44:28 +07:00
|
|
|
รายการตรวจสอบเงื่อนไขต่างๆ
|
2024-10-17 18:06:31 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-12"><q-separator /></div>
|
|
|
|
|
<div class="row col-12 q-pa-sm q-col-gutter-sm">
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
|
|
|
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
|
|
|
<div class="q-pl-sm text-weight-bold text-dark">
|
2024-11-28 13:44:28 +07:00
|
|
|
เงื่อนไขต่างๆ
|
2024-10-17 18:06:31 +07:00
|
|
|
</div>
|
|
|
|
|
<q-space />
|
2025-04-03 17:38:20 +07:00
|
|
|
<!-- workflowRef?.permission.isUpdate && -->
|
2024-10-17 18:06:31 +07:00
|
|
|
|
|
|
|
|
<div
|
2024-11-15 11:38:24 +07:00
|
|
|
v-if="
|
2025-04-04 10:20:11 +07:00
|
|
|
!checkRoutePermisson && dataDetail.statusMain === 'WAITTING'
|
2024-11-15 11:38:24 +07:00
|
|
|
"
|
2024-02-27 14:52:53 +07:00
|
|
|
>
|
2024-10-17 18:06:31 +07:00
|
|
|
<div v-if="!conditions">
|
2024-05-23 16:34:22 +07:00
|
|
|
<q-btn
|
2024-10-17 18:06:31 +07:00
|
|
|
outline
|
|
|
|
|
color="primary"
|
2024-05-23 16:34:22 +07:00
|
|
|
dense
|
2024-10-17 18:06:31 +07:00
|
|
|
icon-right="mdi-file-edit-outline"
|
|
|
|
|
class="q-px-sm"
|
|
|
|
|
label="แก้ไข"
|
|
|
|
|
style="width: 80px"
|
|
|
|
|
@click="conditions = !conditions"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else class="q-gutter-x-sm">
|
|
|
|
|
<q-btn
|
|
|
|
|
outline
|
|
|
|
|
color="public"
|
|
|
|
|
dense
|
|
|
|
|
class="q-px-sm"
|
|
|
|
|
label="บันทึก"
|
|
|
|
|
style="width: 80px"
|
|
|
|
|
@click="onSubmitConditions"
|
|
|
|
|
/>
|
|
|
|
|
<q-btn
|
|
|
|
|
outline
|
|
|
|
|
color="red"
|
|
|
|
|
dense
|
|
|
|
|
class="q-px-sm"
|
|
|
|
|
label="ยกเลิก"
|
|
|
|
|
style="width: 80px"
|
|
|
|
|
@click="clickCancelConditions"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-05-23 16:34:22 +07:00
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-12"><q-separator /></div>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<q-checkbox
|
|
|
|
|
v-model="isNoDebt"
|
|
|
|
|
label="ไม่เป็นหนี้สหกรณ์"
|
|
|
|
|
color="teal"
|
2024-10-25 10:41:12 +07:00
|
|
|
:disable="!conditions"
|
2024-10-17 18:06:31 +07:00
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<q-checkbox
|
|
|
|
|
v-model="isNoBurden"
|
|
|
|
|
label="ไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"
|
|
|
|
|
color="teal"
|
2024-10-25 10:41:12 +07:00
|
|
|
:disable="!conditions"
|
2024-10-17 18:06:31 +07:00
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<q-checkbox
|
|
|
|
|
v-model="isDiscipline"
|
|
|
|
|
label="ไม่มีพฤติการณ์ทางวินัย"
|
|
|
|
|
color="teal"
|
2024-10-25 10:41:12 +07:00
|
|
|
:disable="!conditions"
|
2024-10-17 18:06:31 +07:00
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</q-card>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
|
|
|
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
|
|
|
<div class="q-pl-sm text-weight-bold text-dark">
|
2024-11-28 13:44:28 +07:00
|
|
|
เอกสารหลักฐานต่างๆ
|
2024-10-17 18:06:31 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12"><q-separator /></div>
|
|
|
|
|
<div class="row col-12 q-col-gutter-y-sm q-pa-sm">
|
|
|
|
|
<div class="col-12 row">
|
2025-04-03 17:38:20 +07:00
|
|
|
<!-- workflowRef?.permission.isUpdate && -->
|
|
|
|
|
|
2024-10-17 18:06:31 +07:00
|
|
|
<q-file
|
|
|
|
|
v-if="
|
2025-04-04 10:20:11 +07:00
|
|
|
!checkRoutePermisson && dataDetail.statusMain === 'WAITTING'
|
2024-10-17 18:06:31 +07:00
|
|
|
"
|
|
|
|
|
class="col-12"
|
|
|
|
|
for="#evidenceFiles"
|
|
|
|
|
outlined
|
|
|
|
|
dense
|
|
|
|
|
v-model="file"
|
2024-11-28 13:44:28 +07:00
|
|
|
label="อัปโหลดเอกสารหลักฐานต่างๆ"
|
2024-10-17 18:06:31 +07:00
|
|
|
hide-bottom-space
|
2024-05-23 16:34:22 +07:00
|
|
|
>
|
2024-10-17 18:06:31 +07:00
|
|
|
<template v-slot:prepend>
|
|
|
|
|
<q-icon name="attach_file" color="primary" />
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:after>
|
|
|
|
|
<q-btn
|
|
|
|
|
v-if="file"
|
|
|
|
|
size="14px"
|
|
|
|
|
flat
|
|
|
|
|
round
|
|
|
|
|
dense
|
2024-12-04 16:13:12 +07:00
|
|
|
color="primary"
|
2024-10-17 18:06:31 +07:00
|
|
|
icon="mdi-upload"
|
|
|
|
|
@click="uploadFiles"
|
|
|
|
|
><q-tooltip>อัปโหลดเอกสาร</q-tooltip></q-btn
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
</q-file>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-if="fileList.length > 0" class="col-xs-12 row">
|
|
|
|
|
<q-list class="full-width rounded-borders" bordered separator>
|
|
|
|
|
<q-item
|
|
|
|
|
v-for="File in fileList"
|
|
|
|
|
:key="File.id"
|
|
|
|
|
clickable
|
|
|
|
|
v-ripple
|
|
|
|
|
>
|
|
|
|
|
<q-item-section>{{ File.title }}</q-item-section>
|
|
|
|
|
<q-item-section avatar>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div>
|
|
|
|
|
<q-btn
|
|
|
|
|
dense
|
|
|
|
|
flat
|
|
|
|
|
round
|
|
|
|
|
size="12px"
|
|
|
|
|
color="blue"
|
|
|
|
|
icon="mdi-download-outline"
|
|
|
|
|
@click="downloadFiles(File.fileName)"
|
|
|
|
|
>
|
|
|
|
|
<q-tooltip>ดาวน์โหลดไฟล์</q-tooltip>
|
|
|
|
|
</q-btn>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<q-btn
|
|
|
|
|
v-if="
|
2024-11-15 11:38:24 +07:00
|
|
|
!checkRoutePermisson &&
|
2024-11-15 15:15:12 +07:00
|
|
|
dataDetail.statusMain === 'WAITTING'
|
2024-10-17 18:06:31 +07:00
|
|
|
"
|
|
|
|
|
dense
|
|
|
|
|
flat
|
|
|
|
|
round
|
|
|
|
|
size="12px"
|
|
|
|
|
color="red"
|
|
|
|
|
icon="mdi-delete-outline"
|
|
|
|
|
@click="removeFile(File.fileName)"
|
|
|
|
|
><q-tooltip>ลบไฟล์</q-tooltip></q-btn
|
|
|
|
|
>
|
|
|
|
|
</div>
|
2024-05-23 16:34:22 +07:00
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
</q-list>
|
|
|
|
|
</div>
|
2024-05-23 16:34:22 +07:00
|
|
|
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-12" v-else>
|
|
|
|
|
<q-card class="q-pa-sm" bordered> ไม่มีรายการเอกสาร </q-card>
|
|
|
|
|
</div>
|
2024-05-23 16:34:22 +07:00
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
</q-card>
|
|
|
|
|
</div>
|
2024-05-23 16:34:22 +07:00
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
</q-card>
|
2024-02-27 14:52:53 +07:00
|
|
|
|
2024-10-17 18:06:31 +07:00
|
|
|
<!-- ผลการพิจารณาของการเจ้าหน้าที่ของหน่วยงาน -->
|
2024-10-24 16:09:11 +07:00
|
|
|
<!-- <q-card bordered class="row col-12 text-dark q-mt-sm">
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
|
|
|
<div class="q-pl-sm text-weight-bold text-dark">
|
|
|
|
|
ผลการพิจารณาของการเจ้าหน้าที่ของหน่วยงาน
|
|
|
|
|
</div>
|
2024-05-23 16:34:22 +07:00
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-12"><q-separator /></div>
|
|
|
|
|
<div class="row col-12 q-pa-md">
|
|
|
|
|
<div class="col-12 row bg-white q-col-gutter-md">
|
|
|
|
|
<div class="col-xs-6 row items-start">
|
|
|
|
|
<div class="col-12 text-top">สถานะ</div>
|
|
|
|
|
<div class="col-12 text-detail">
|
|
|
|
|
{{
|
|
|
|
|
dataDetail.officerReject !== null
|
|
|
|
|
? statusOrder(dataDetail.officerReject)
|
|
|
|
|
: "-"
|
|
|
|
|
}}
|
|
|
|
|
</div>
|
2024-05-23 16:34:22 +07:00
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-xs-6 row items-start">
|
|
|
|
|
<div class="col-12 text-top">วันสุดท้ายที่ยับยั้ง</div>
|
|
|
|
|
<div class="col-12 text-detail">
|
|
|
|
|
{{
|
|
|
|
|
dataDetail.officerRejectDate !== null
|
|
|
|
|
? date2Thai(dataDetail.officerRejectDate)
|
|
|
|
|
: "-"
|
|
|
|
|
}}
|
|
|
|
|
</div>
|
2024-05-23 16:34:22 +07:00
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-xs-12 row items-start">
|
|
|
|
|
<div class="col-12 text-top">ความคิดเห็นและเหตุผล</div>
|
2024-02-27 14:52:53 +07:00
|
|
|
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-12 text-detail">
|
|
|
|
|
{{
|
|
|
|
|
dataDetail.officerReject
|
|
|
|
|
? dataDetail.officerRejectReason
|
|
|
|
|
: dataDetail.officerApproveReason
|
|
|
|
|
}}
|
|
|
|
|
</div>
|
2024-05-23 16:34:22 +07:00
|
|
|
</div>
|
2024-02-27 14:52:53 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-10-24 16:09:11 +07:00
|
|
|
</q-card> -->
|
2024-02-27 14:52:53 +07:00
|
|
|
|
2024-10-17 18:06:31 +07:00
|
|
|
<!-- ผลการพิจารณาของผู้บังคับบัญชา -->
|
|
|
|
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
|
|
|
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
|
|
|
<div class="q-pl-sm text-weight-bold text-dark">
|
|
|
|
|
ผลการพิจารณาของผู้บังคับบัญชา
|
2023-08-23 14:57:50 +07:00
|
|
|
</div>
|
2024-10-24 16:09:11 +07:00
|
|
|
<q-space />
|
2025-04-03 17:38:20 +07:00
|
|
|
<!-- workflowRef?.permission.isUpdate && -->
|
|
|
|
|
|
2024-10-30 14:51:00 +07:00
|
|
|
<div
|
|
|
|
|
class="q-gutter-x-sm"
|
|
|
|
|
v-if="
|
2024-11-15 11:38:24 +07:00
|
|
|
dataDetail.commanderReject === null &&
|
2024-11-15 15:15:12 +07:00
|
|
|
dataDetail.statusMain === 'WAITTING'
|
2024-10-30 14:51:00 +07:00
|
|
|
"
|
|
|
|
|
>
|
2024-10-24 16:09:11 +07:00
|
|
|
<q-btn
|
|
|
|
|
outline
|
|
|
|
|
color="primary"
|
|
|
|
|
dense
|
|
|
|
|
icon-right="check"
|
|
|
|
|
class="q-px-sm"
|
|
|
|
|
label="อนุญาต"
|
|
|
|
|
@click="popUp('pass', 'commander')"
|
|
|
|
|
/>
|
|
|
|
|
<q-btn
|
|
|
|
|
outline
|
|
|
|
|
color="red"
|
|
|
|
|
dense
|
|
|
|
|
icon-right="close"
|
|
|
|
|
class="q-px-sm"
|
|
|
|
|
label="ยับยั้ง"
|
|
|
|
|
@click="popUp('passNot', 'commander')"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2023-08-23 14:57:50 +07:00
|
|
|
</div>
|
2024-10-24 16:09:11 +07:00
|
|
|
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-12"><q-separator /></div>
|
|
|
|
|
<div class="row col-12 q-pa-md">
|
|
|
|
|
<div class="col-12 row bg-white q-col-gutter-md">
|
|
|
|
|
<div class="col-xs-6 row items-start">
|
|
|
|
|
<div class="col-12 text-top">สถานะ</div>
|
|
|
|
|
<div class="col-12 text-detail">
|
|
|
|
|
{{
|
|
|
|
|
dataDetail.commanderReject !== null
|
|
|
|
|
? statusOrder(dataDetail.commanderReject)
|
|
|
|
|
: "-"
|
|
|
|
|
}}
|
|
|
|
|
</div>
|
2023-08-29 14:17:00 +07:00
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-xs-6 row items-start">
|
|
|
|
|
<div class="col-12 text-top">วันสุดท้ายที่ยับยั้ง</div>
|
|
|
|
|
<div class="col-12 text-detail">
|
|
|
|
|
{{
|
|
|
|
|
dataDetail.commanderRejectDate !== null
|
|
|
|
|
? date2Thai(dataDetail.commanderRejectDate)
|
|
|
|
|
: "-"
|
|
|
|
|
}}
|
|
|
|
|
</div>
|
2023-08-29 14:17:00 +07:00
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-xs-12 row items-start">
|
|
|
|
|
<div class="col-12 text-top">ความคิดเห็นและเหตุผล</div>
|
|
|
|
|
<div class="col-12 text-detail">
|
|
|
|
|
{{
|
|
|
|
|
dataDetail.commanderReject
|
|
|
|
|
? dataDetail.commanderRejectReason
|
|
|
|
|
: dataDetail.commanderApproveReason
|
|
|
|
|
}}
|
|
|
|
|
</div>
|
2023-08-29 14:17:00 +07:00
|
|
|
</div>
|
2023-08-23 14:57:50 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
</q-card>
|
2023-07-24 13:19:14 +07:00
|
|
|
|
2024-10-17 18:06:31 +07:00
|
|
|
<!-- ผลการพิจารณาของผู้มีอำนาจ -->
|
|
|
|
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
2024-05-23 16:34:22 +07:00
|
|
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
|
|
|
<div class="q-pl-sm text-weight-bold text-dark">
|
2024-10-17 18:06:31 +07:00
|
|
|
ผลการพิจารณาของผู้มีอำนาจ
|
2024-05-23 16:34:22 +07:00
|
|
|
</div>
|
2024-10-24 16:09:11 +07:00
|
|
|
<q-space />
|
2025-04-03 17:38:20 +07:00
|
|
|
<!-- workflowRef?.permission.isUpdate && -->
|
|
|
|
|
|
2024-10-30 14:51:00 +07:00
|
|
|
<div
|
|
|
|
|
class="q-gutter-x-sm"
|
|
|
|
|
v-if="
|
2024-11-15 11:38:24 +07:00
|
|
|
dataDetail.oligarchReject === null &&
|
2024-11-15 15:15:12 +07:00
|
|
|
dataDetail.statusMain === 'WAITTING'
|
2024-10-30 14:51:00 +07:00
|
|
|
"
|
|
|
|
|
>
|
2024-10-24 16:09:11 +07:00
|
|
|
<q-btn
|
|
|
|
|
outline
|
|
|
|
|
color="primary"
|
|
|
|
|
dense
|
|
|
|
|
icon-right="check"
|
|
|
|
|
class="q-px-sm"
|
|
|
|
|
label="อนุญาต"
|
|
|
|
|
@click="popUp('pass', 'oligarch')"
|
|
|
|
|
/>
|
|
|
|
|
<q-btn
|
|
|
|
|
outline
|
|
|
|
|
color="red"
|
|
|
|
|
dense
|
|
|
|
|
icon-right="close"
|
|
|
|
|
class="q-px-sm"
|
|
|
|
|
label="ยับยั้ง"
|
|
|
|
|
@click="popUp('passNot', 'oligarch')"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2023-08-14 16:45:23 +07:00
|
|
|
</div>
|
2024-05-23 16:34:22 +07:00
|
|
|
<div class="col-12"><q-separator /></div>
|
2023-08-14 16:45:23 +07:00
|
|
|
<div class="row col-12 q-pa-md">
|
|
|
|
|
<div class="col-12 row bg-white q-col-gutter-md">
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-xs-6 row items-start">
|
|
|
|
|
<div class="col-12 text-top">สถานะ</div>
|
|
|
|
|
<div class="col-12 text-detail">
|
|
|
|
|
{{
|
|
|
|
|
dataDetail.oligarchReject !== null
|
|
|
|
|
? statusOrder(dataDetail.oligarchReject)
|
|
|
|
|
: "-"
|
|
|
|
|
}}
|
2023-08-14 16:45:23 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-xs-6 row items-start">
|
|
|
|
|
<div class="col-12 text-top">วันสุดท้ายที่ยับยั้ง</div>
|
|
|
|
|
<div class="col-12 text-detail">
|
|
|
|
|
{{
|
|
|
|
|
dataDetail.oligarchRejectDate !== null
|
|
|
|
|
? date2Thai(dataDetail.oligarchRejectDate)
|
|
|
|
|
: "-"
|
|
|
|
|
}}
|
2023-08-14 16:45:23 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-xs-12 row items-start">
|
|
|
|
|
<div class="col-12 text-top">ความคิดเห็นและเหตุผล</div>
|
|
|
|
|
<div class="col-12 text-detail">
|
|
|
|
|
{{
|
|
|
|
|
dataDetail.oligarchReject
|
|
|
|
|
? dataDetail.oligarchRejectReason
|
|
|
|
|
: dataDetail.oligarchApproveReason
|
|
|
|
|
}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</q-card>
|
|
|
|
|
|
|
|
|
|
<!-- แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย -->
|
|
|
|
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
|
|
|
|
<q-form
|
2024-11-14 18:01:33 +07:00
|
|
|
class="col-12"
|
2024-10-17 18:06:31 +07:00
|
|
|
ref="myForm"
|
|
|
|
|
greedy
|
|
|
|
|
@submit.prevent
|
|
|
|
|
@validation-success="onSubmitAttached"
|
|
|
|
|
>
|
|
|
|
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
|
|
|
<div class="q-pl-sm text-weight-bold text-dark">
|
|
|
|
|
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
|
|
|
|
</div>
|
|
|
|
|
<q-space />
|
2025-04-03 17:38:20 +07:00
|
|
|
<!-- workflowRef?.permission.isUpdate && -->
|
2024-10-17 18:06:31 +07:00
|
|
|
|
2024-11-15 11:38:24 +07:00
|
|
|
<div
|
2025-04-04 10:20:11 +07:00
|
|
|
v-if="!checkRoutePermisson && dataDetail.statusMain === 'WAITTING'"
|
2024-11-15 11:38:24 +07:00
|
|
|
>
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="q-gutter-sm" v-if="!edit">
|
|
|
|
|
<q-btn
|
|
|
|
|
outline
|
|
|
|
|
color="primary"
|
2023-08-14 16:45:23 +07:00
|
|
|
dense
|
2024-10-17 18:06:31 +07:00
|
|
|
icon-right="mdi-file-edit-outline"
|
|
|
|
|
class="q-px-sm"
|
|
|
|
|
label="แก้ไข"
|
|
|
|
|
style="width: 80px"
|
|
|
|
|
@click="edit = !edit"
|
|
|
|
|
v-if="!(status == 'REPORT' || status == 'DONE')"
|
2023-08-14 16:45:23 +07:00
|
|
|
/>
|
|
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="q-gutter-sm" v-else>
|
|
|
|
|
<q-btn
|
|
|
|
|
outline
|
|
|
|
|
color="public"
|
2023-08-14 16:45:23 +07:00
|
|
|
dense
|
2024-10-17 18:06:31 +07:00
|
|
|
class="q-px-sm"
|
|
|
|
|
label="บันทึก"
|
|
|
|
|
style="width: 80px"
|
|
|
|
|
type="submit"
|
|
|
|
|
/>
|
|
|
|
|
<q-btn
|
|
|
|
|
outline
|
|
|
|
|
color="red"
|
|
|
|
|
dense
|
|
|
|
|
class="q-px-sm"
|
|
|
|
|
label="ยกเลิก"
|
|
|
|
|
style="width: 80px"
|
|
|
|
|
@click="clickCancel"
|
2023-08-14 16:45:23 +07:00
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
</div>
|
|
|
|
|
<div class="col-12"><q-separator /></div>
|
|
|
|
|
<div class="row col-12 q-pa-md">
|
|
|
|
|
<div class="col-12 row bg-white q-col-gutter-md">
|
|
|
|
|
<div class="col-xs-12 row items-center">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<q-input
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
|
|
|
|
v-model="organizationPositionOld"
|
|
|
|
|
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัดเดิม'}`]"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:label="`${'ตำแหน่ง/สังกัดเดิม'}`"
|
|
|
|
|
type="textarea"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-11-04 16:24:35 +07:00
|
|
|
<div class="col-xs-6 col-sm-4 row">
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-12">
|
|
|
|
|
<q-input
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
|
|
|
|
v-model="positionTypeOld"
|
|
|
|
|
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:label="`${'ตำแหน่งประเภท'}`"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-11-04 16:24:35 +07:00
|
|
|
<div class="col-xs-6 col-sm-4 row">
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-12">
|
|
|
|
|
<q-input
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
|
|
|
|
v-model="positionLevelOld"
|
|
|
|
|
:rules="[(val:string) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:label="`${'ระดับตำแหน่ง'}`"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-11-04 16:24:35 +07:00
|
|
|
<div class="col-xs-6 col-sm-4 row">
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-12">
|
|
|
|
|
<q-input
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
|
|
|
|
v-model="posNo"
|
2025-03-19 17:41:35 +07:00
|
|
|
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่ตำแหน่ง'}`]"
|
2024-10-17 18:06:31 +07:00
|
|
|
hide-bottom-space
|
2025-03-19 17:41:35 +07:00
|
|
|
:label="`${'เลขที่ตำแหน่ง'}`"
|
2024-10-17 18:06:31 +07:00
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-11-04 16:24:35 +07:00
|
|
|
<!-- <div class="col-xs-6 col-sm-3 row">
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-12">
|
|
|
|
|
<q-input
|
|
|
|
|
v-model="salary"
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:label="`${'เงินเดือน'}`"
|
|
|
|
|
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
|
|
|
|
lazy-rules
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
mask="###,###,###,###"
|
|
|
|
|
reverse-fill-mask
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2024-11-04 16:24:35 +07:00
|
|
|
</div> -->
|
2024-10-17 18:06:31 +07:00
|
|
|
<div class="col-12"><q-separator /></div>
|
|
|
|
|
<div class="col-xs-4 row">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<q-input
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
|
|
|
|
v-model="location"
|
|
|
|
|
:rules="[
|
|
|
|
|
(val:string) => !!val || `${'กรุณากรอกสถานที่ยื่นขอลาออกจากราชการ'}`,
|
|
|
|
|
]"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:label="`${'สถานที่ยื่นขอลาออกจากราชการ'}`"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-xs-4 row">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<datepicker
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
v-model="date"
|
|
|
|
|
:locale="'th'"
|
|
|
|
|
autoApply
|
|
|
|
|
:enableTimePicker="false"
|
|
|
|
|
week-start="0"
|
|
|
|
|
>
|
|
|
|
|
<template #year="{ year }">{{ year + 543 }}</template>
|
|
|
|
|
<template #year-overlay-value="{ value }">{{
|
|
|
|
|
parseInt(value + 543)
|
|
|
|
|
}}</template>
|
|
|
|
|
<template #trigger>
|
|
|
|
|
<q-input
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
:borderless="!edit"
|
|
|
|
|
:model-value="date !== null ? date2Thai(date) : null"
|
2024-11-29 14:28:21 +07:00
|
|
|
:rules="edit ? [
|
2024-10-17 18:06:31 +07:00
|
|
|
(val:string) =>
|
|
|
|
|
!!val || `${'กรุณาเลือก วันที่ยื่นขอลาออกจากราชการ'}`,
|
2024-11-29 14:28:21 +07:00
|
|
|
] : []"
|
2024-10-17 18:06:31 +07:00
|
|
|
hide-bottom-space
|
|
|
|
|
:label="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:prepend>
|
|
|
|
|
<q-icon
|
|
|
|
|
name="event"
|
|
|
|
|
class="cursor-pointer"
|
|
|
|
|
:style="
|
|
|
|
|
edit
|
|
|
|
|
? 'color: var(--q-primary)'
|
|
|
|
|
: 'color: var(--q-grey)'
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
</q-icon>
|
|
|
|
|
</template>
|
|
|
|
|
</q-input>
|
|
|
|
|
</template>
|
|
|
|
|
</datepicker>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-08-14 16:45:23 +07:00
|
|
|
<div class="col-12">
|
2024-05-24 17:50:43 +07:00
|
|
|
<q-input
|
2024-10-17 18:06:31 +07:00
|
|
|
:class="getClass(edit)"
|
2024-05-24 17:50:43 +07:00
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
2024-10-17 18:06:31 +07:00
|
|
|
lazy-rules
|
2024-05-24 17:50:43 +07:00
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
2024-10-17 18:06:31 +07:00
|
|
|
v-model="reason"
|
|
|
|
|
:rules="[
|
|
|
|
|
(val:string) => !!val || `${'กรุณากรอกเหตุผลที่ลาออกจากราชการ'}`,
|
|
|
|
|
]"
|
2024-05-24 17:50:43 +07:00
|
|
|
hide-bottom-space
|
2024-10-17 18:06:31 +07:00
|
|
|
:label="`${'เหตุผลที่ลาออกจากราชการ (หมายเหตุแนวตั้ง)'}`"
|
|
|
|
|
type="textarea"
|
2023-08-14 16:45:23 +07:00
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<q-input
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
2024-10-17 18:06:31 +07:00
|
|
|
v-model="remarkHorizontal"
|
|
|
|
|
:rules="[(val:string) => !!val || `${'กรุณากรอกหมายเหตุแนวนอน '}`]"
|
2023-08-14 16:45:23 +07:00
|
|
|
hide-bottom-space
|
2024-10-17 18:06:31 +07:00
|
|
|
:label="`${'หมายเหตุแนวนอน '}`"
|
|
|
|
|
type="textarea"
|
2023-08-14 16:45:23 +07:00
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-10-17 18:06:31 +07:00
|
|
|
</q-form>
|
|
|
|
|
</q-card>
|
|
|
|
|
|
2025-04-03 17:38:20 +07:00
|
|
|
<!-- <WorkFlow
|
2024-10-21 15:37:18 +07:00
|
|
|
ref="workflowRef"
|
|
|
|
|
v-model:is-check-data="isCheckData"
|
|
|
|
|
:id="id"
|
2024-11-15 10:24:53 +07:00
|
|
|
sys-name="SYS_RESIGN"
|
2025-04-03 17:38:20 +07:00
|
|
|
/> -->
|
2024-10-17 18:06:31 +07:00
|
|
|
</div>
|
2024-05-23 16:34:22 +07:00
|
|
|
|
2023-08-22 17:41:35 +07:00
|
|
|
<q-dialog v-model="modal" persistent>
|
|
|
|
|
<q-card style="width: 800px">
|
2024-10-24 16:09:11 +07:00
|
|
|
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
2023-08-22 17:41:35 +07:00
|
|
|
<DialogHeader
|
2024-09-17 17:34:38 +07:00
|
|
|
:tittle="`${actionPass ? 'อนุญาตการลาออก' : 'ยับยั้งการลาออก'}`"
|
2023-08-22 17:41:35 +07:00
|
|
|
:close="closeModal"
|
|
|
|
|
/>
|
|
|
|
|
<q-separator />
|
2023-08-23 14:57:50 +07:00
|
|
|
<q-card-section class="q-p-sm q-gutter-md">
|
2023-08-22 17:41:35 +07:00
|
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
|
|
|
<q-input
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
dense
|
|
|
|
|
outlined
|
|
|
|
|
lazy-rules
|
2024-09-20 15:23:06 +07:00
|
|
|
:rules="[(val:string) => !!val || 'กรุณากรอกความคิดเห็น/เหตุผล']"
|
2023-08-22 17:41:35 +07:00
|
|
|
v-model="reasonReign"
|
2023-08-23 14:57:50 +07:00
|
|
|
:label="`${'กรอกความคิดเห็น/เหตุผล'}`"
|
2023-08-22 17:41:35 +07:00
|
|
|
type="textarea"
|
2024-10-24 16:09:11 +07:00
|
|
|
class="inputgreen"
|
2023-08-22 17:41:35 +07:00
|
|
|
/>
|
|
|
|
|
</div>
|
2023-08-23 14:57:50 +07:00
|
|
|
<div class="col-xs-12 col-sm-12 col-md-12" v-if="!actionPass">
|
|
|
|
|
<datepicker
|
|
|
|
|
menu-class-name="modalfix"
|
|
|
|
|
v-model="dateBreak"
|
|
|
|
|
:locale="'th'"
|
|
|
|
|
autoApply
|
|
|
|
|
:enableTimePicker="false"
|
|
|
|
|
week-start="0"
|
|
|
|
|
>
|
|
|
|
|
<template #year="{ year }">{{ year + 543 }}</template>
|
|
|
|
|
<template #year-overlay-value="{ value }">{{
|
|
|
|
|
parseInt(value + 543)
|
|
|
|
|
}}</template>
|
|
|
|
|
<template #trigger>
|
|
|
|
|
<q-input
|
|
|
|
|
outlined
|
|
|
|
|
dense
|
2024-10-24 16:09:11 +07:00
|
|
|
class="inputgreen"
|
2023-08-23 14:57:50 +07:00
|
|
|
:model-value="
|
|
|
|
|
dateBreak !== null ? date2Thai(dateBreak) : null
|
|
|
|
|
"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:label="`${' วันสุดท้ายที่ยับยั้ง'}`"
|
2024-09-20 15:23:06 +07:00
|
|
|
:rules="[(val:string) => !!val || 'กรุณาเลือกวันที่']"
|
2023-08-23 14:57:50 +07:00
|
|
|
>
|
|
|
|
|
<template v-slot:prepend>
|
|
|
|
|
<q-icon
|
|
|
|
|
name="event"
|
|
|
|
|
class="cursor-pointer"
|
2024-10-24 16:09:11 +07:00
|
|
|
color="primary"
|
2023-08-23 14:57:50 +07:00
|
|
|
:style="
|
|
|
|
|
edit
|
|
|
|
|
? 'color: var(--q-primary)'
|
|
|
|
|
: 'color: var(--q-grey)'
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
</q-icon>
|
|
|
|
|
</template>
|
|
|
|
|
</q-input>
|
|
|
|
|
</template>
|
|
|
|
|
</datepicker>
|
|
|
|
|
</div>
|
2023-08-22 17:41:35 +07:00
|
|
|
</q-card-section>
|
|
|
|
|
<q-separator />
|
2024-10-24 16:09:11 +07:00
|
|
|
<q-card-actions align="right" class="bg-white text-teal">
|
|
|
|
|
<q-btn label="บันทึก" color="secondary" type="submit"
|
|
|
|
|
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
|
|
|
|
>
|
|
|
|
|
</q-card-actions>
|
2024-10-18 14:51:16 +07:00
|
|
|
<!-- <DialogFooter :editvisible="true" :save="conditionPopup" /> -->
|
2023-08-22 17:41:35 +07:00
|
|
|
</q-form>
|
|
|
|
|
</q-card>
|
|
|
|
|
</q-dialog>
|
2024-01-11 17:21:51 +07:00
|
|
|
|
|
|
|
|
<PopupPersonal
|
|
|
|
|
:modal="modalPersonal"
|
|
|
|
|
:id="personId"
|
|
|
|
|
@update:modal="updatemodalPersonal"
|
|
|
|
|
/>
|
2023-07-24 13:19:14 +07:00
|
|
|
</template>
|
2023-08-14 16:45:23 +07:00
|
|
|
|
2023-07-24 13:19:14 +07:00
|
|
|
<style lang="scss" scope>
|
2025-04-04 10:20:11 +07:00
|
|
|
.modalfix {
|
|
|
|
|
position: fixed !important;
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-24 13:19:14 +07:00
|
|
|
.q-img {
|
|
|
|
|
border-radius: 5px;
|
2023-08-09 14:46:46 +07:00
|
|
|
height: 70px;
|
2023-07-24 13:19:14 +07:00
|
|
|
}
|
2023-08-09 14:46:46 +07:00
|
|
|
.text-top {
|
|
|
|
|
color: gray;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
padding-bottom: 3px;
|
2023-07-24 13:19:14 +07:00
|
|
|
}
|
2023-08-09 14:46:46 +07:00
|
|
|
.text-detail {
|
|
|
|
|
font-weight: 500;
|
2023-07-24 13:19:14 +07:00
|
|
|
}
|
2023-08-09 14:46:46 +07:00
|
|
|
</style>
|