comment code retirement
This commit is contained in:
parent
45fc4848ac
commit
45ef9649e1
15 changed files with 295 additions and 64 deletions
|
|
@ -6,12 +6,14 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import { useQuasar } from "quasar";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
/** Use */
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError, success, showLoader, hideLoader, dialogConfirm } = mixin;
|
||||
const route = useRoute();
|
||||
|
||||
const retireld_params = route.params.id;
|
||||
|
||||
/** props*/
|
||||
const props = defineProps({
|
||||
retireld: String,
|
||||
profileId: String,
|
||||
|
|
@ -27,6 +29,7 @@ const retireld = ref<any>();
|
|||
const type = ref<any>();
|
||||
const filter = ref<string>("");
|
||||
|
||||
/** คอลัมน์ */
|
||||
const columns = ref<any["columns"]>([
|
||||
{
|
||||
name: "index",
|
||||
|
|
@ -78,6 +81,7 @@ watch(modal, () => {
|
|||
fecthlistRetire();
|
||||
}
|
||||
});
|
||||
|
||||
// fecth profile
|
||||
const fecthlistRetire = async () => {
|
||||
showLoader();
|
||||
|
|
@ -93,6 +97,7 @@ const fecthlistRetire = async () => {
|
|||
messageError($q, e);
|
||||
});
|
||||
};
|
||||
|
||||
// เรียกรายชื่อประกาศเกษียณอายุราชการเพิ่ม
|
||||
const findlist = async (id: string) => {
|
||||
let data = [{}];
|
||||
|
|
@ -154,6 +159,9 @@ const updateListData = (retireld: string, pId: string) => {
|
|||
props.UpdateListId(retireld, pId);
|
||||
};
|
||||
|
||||
/**
|
||||
* Setiting Pagination
|
||||
*/
|
||||
const paging = ref<boolean>(true);
|
||||
const pagination = ref({
|
||||
sortBy: "fullname",
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import config from "@/app.config";
|
|||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import DialogPopupReason from "@/components/Dialogs/PopupReason.vue";
|
||||
|
||||
/** Use */
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const $q = useQuasar();
|
||||
|
|
@ -26,6 +27,7 @@ const {
|
|||
} = mixin;
|
||||
const myForm = ref<QForm | null>(null);
|
||||
|
||||
/** ตัวแปร */
|
||||
const retireld_params = route.params.retirementId;
|
||||
const modalNote = ref<boolean>(false);
|
||||
const note = ref<string>("");
|
||||
|
|
@ -37,7 +39,14 @@ const statusUpload = ref<boolean>();
|
|||
const modalEdit = ref<boolean>(false);
|
||||
const textReport = ref<string>("");
|
||||
const employeeType = ref<string>("OFFICER");
|
||||
const action = ref<string>("");
|
||||
const fileUpload = ref<any>(null);
|
||||
const round = ref<number>();
|
||||
const typeReport = ref<string>("");
|
||||
const statusReport = ref<boolean>();
|
||||
const dataProfile = ref<Object>([]);
|
||||
|
||||
/** คอลัมน์ที่แสดง */
|
||||
const columns = ref<any["columns"]>([]);
|
||||
const rows = ref<any>([]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
|
|
@ -55,22 +64,20 @@ const visibleColumns = ref<string[]>([
|
|||
"bureau",
|
||||
]);
|
||||
|
||||
const action = ref<string>("");
|
||||
const fileUpload = ref<any>(null);
|
||||
|
||||
/** Hook */
|
||||
onMounted(() => {
|
||||
retireld.value = retireld_params.toString();
|
||||
fecthlistprofile(retireld.value);
|
||||
});
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่นปิด Dialog
|
||||
*/
|
||||
const closeDialog = () => {
|
||||
modalNote.value = false;
|
||||
modalUpload.value = false;
|
||||
};
|
||||
const round = ref<number>();
|
||||
const typeReport = ref<string>("");
|
||||
const statusReport = ref<boolean>();
|
||||
const dataProfile = ref<Object>([]);
|
||||
|
||||
// fecthlist
|
||||
const fecthlistprofile = async (id: string) => {
|
||||
showLoader();
|
||||
|
|
@ -121,6 +128,7 @@ const fecthlistprofile = async (id: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
//คอลัมน์
|
||||
columns.value = [
|
||||
{
|
||||
name: "order",
|
||||
|
|
@ -243,6 +251,7 @@ const fecthCheck = async (id: string) => {
|
|||
messageError($q, err);
|
||||
});
|
||||
};
|
||||
|
||||
// DelProfile
|
||||
const clickDelete = () => {
|
||||
dialogRemove(
|
||||
|
|
@ -269,6 +278,7 @@ const clickDelete = () => {
|
|||
"ต้องการลบข้อมูลนี้ใช่หรือไม่ ?"
|
||||
);
|
||||
};
|
||||
|
||||
// แก้ไข้ข้อมูล
|
||||
const saveNote = () => {
|
||||
dialogConfirm(
|
||||
|
|
@ -296,19 +306,23 @@ const saveNote = () => {
|
|||
);
|
||||
};
|
||||
|
||||
//อัพเดท ListId
|
||||
const UpdateListId = (retireld: string, pId: string) => {
|
||||
profileId.value = pId;
|
||||
fecthlistprofile(retireld);
|
||||
};
|
||||
|
||||
// กลับหน้าเดิม
|
||||
const backHistory = () => {
|
||||
window.history.back();
|
||||
};
|
||||
|
||||
const visibleNote = computed(() => {
|
||||
if (note.value === "" || note.value === undefined) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
// อัปโหลดไฟล์
|
||||
const modalUpload = ref<boolean>(false);
|
||||
const signDate = ref<Date | null>(null);
|
||||
|
|
@ -352,6 +366,7 @@ const uploadFile = async (event: any, signDate: any) => {
|
|||
});
|
||||
}
|
||||
};
|
||||
|
||||
// downloadAttachment
|
||||
const downloadAttachment = async (type: string, id: string) => {
|
||||
showLoader();
|
||||
|
|
@ -369,6 +384,7 @@ const downloadAttachment = async (type: string, id: string) => {
|
|||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
// downloadFile
|
||||
const downloadFile = (response: any, filename: string) => {
|
||||
const link = document.createElement("a");
|
||||
|
|
@ -379,6 +395,7 @@ const downloadFile = (response: any, filename: string) => {
|
|||
link.click();
|
||||
document.body.removeChild(link);
|
||||
};
|
||||
|
||||
// ยืนยันการแก้ไขข้อมูล
|
||||
const saveEdiitReport = (reason: string) => {
|
||||
const formdata = new FormData();
|
||||
|
|
@ -403,15 +420,18 @@ const saveEdiitReport = (reason: string) => {
|
|||
"ต้องการยืนยันการแก้ไขข้อมูลนี้หรือไม่ ?"
|
||||
);
|
||||
};
|
||||
|
||||
// เปิด popup เหตุผล
|
||||
const openmodalEditReport = () => {
|
||||
modalEdit.value = true;
|
||||
};
|
||||
|
||||
// ปิด popup เหตุผล
|
||||
const closemodalEditReport = () => {
|
||||
modalEdit.value = false;
|
||||
};
|
||||
|
||||
/** Setting Pagination */
|
||||
const paging = ref<boolean>(true);
|
||||
const pagination = ref({
|
||||
sortBy: "order",
|
||||
|
|
|
|||
|
|
@ -6,11 +6,13 @@ import { useRouter } from "vue-router";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
/** Use */
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { dialogConfirm, messageError } = mixin;
|
||||
const router = useRouter();
|
||||
|
||||
/** Prop */
|
||||
const props = defineProps({
|
||||
type: {
|
||||
type: String,
|
||||
|
|
@ -63,6 +65,7 @@ const clickAdd = () => {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
// เลือกรายการเพิ่ม
|
||||
const clickSelect = async (action: string) => {
|
||||
dialogConfirm(
|
||||
|
|
@ -81,6 +84,7 @@ const clickSelect = async (action: string) => {
|
|||
"ต้องการแก้ไขข้อมูลประกาศเกษียณใช่หรือไม่ ?"
|
||||
);
|
||||
};
|
||||
|
||||
// เพิ่มรอบประกาศเกษียณอายุราชการ API
|
||||
const cerateRetirement = async (data: object) => {
|
||||
await http
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue