หน้าที่ความรับผิดชอบ
diff --git a/src/modules/02_organization/components/TableMain.vue b/src/modules/02_organization/components/TableMain.vue
index b307970f0..7d8a2756b 100644
--- a/src/modules/02_organization/components/TableMain.vue
+++ b/src/modules/02_organization/components/TableMain.vue
@@ -9,7 +9,6 @@ import { checkPermission } from "@/utils/permissions";
import { updateCurrentPage } from "@/utils/function";
import { useOrganizational } from "@/modules/02_organization/store/organizational";
import { useCounterMixin } from "@/stores/mixin";
-import { formatPosmasterNo } from "@/utils/function";
/** importType*/
import type { QTableProps } from "quasar";
@@ -206,14 +205,6 @@ const columns = ref([
sortable: false,
field: "posMasterNo",
headerStyle: "font-size: 14px",
- format(val, row) {
- return formatPosmasterNo(
- row.orgShortname,
- row.posMasterNoPrefix,
- row.posMasterNoMain,
- row.posMasterNoSuffix
- );
- },
style: "font-size: 14px",
},
{
@@ -1133,7 +1124,7 @@ watch(
{
posLevelName: e.isSit ? e.profilePoslevel : e.posLevelName,
posExecutiveName: e.posExecutiveName,
isSit: e.isSit,
- orgShortname: e.orgShortname,
- posMasterNoPrefix: e.posMasterNoPrefix,
- posMasterNoSuffix: e.posMasterNoSuffix,
- posMasterNoMain: e.posMasterNo,
-
}));
return newPosMaster || [];
diff --git a/src/modules/03_recruiting/components/Table.vue b/src/modules/03_recruiting/components/Table.vue
index 6ff82cda4..b5f2877f6 100644
--- a/src/modules/03_recruiting/components/Table.vue
+++ b/src/modules/03_recruiting/components/Table.vue
@@ -56,7 +56,6 @@ const optionsStatus = ref([
{ label: "ขาดสอบ", value: "missed_exam" },
{ label: "ผ่าน", value: "pass" },
{ label: "ไม่ผ่าน", value: "notpass" },
- { label: "อื่น ๆ", value: "other" },
]);
const emit = defineEmits([
diff --git a/src/modules/03_recruiting/components/TableCandidate.vue b/src/modules/03_recruiting/components/TableCandidate.vue
index d725a3bc1..f5b1b2b21 100644
--- a/src/modules/03_recruiting/components/TableCandidate.vue
+++ b/src/modules/03_recruiting/components/TableCandidate.vue
@@ -363,59 +363,37 @@ async function downloadFileDashboard() {
}
async function clickPassExam() {
- try {
- showLoader();
- const res = await http.get(
- config.API.downloadCandidatePassExam(examId.value),
- {
- headers: {
- "Content-Type": "application/pdf",
- Accept: "application/pdf",
- },
- responseType: "blob",
- }
- );
- const url = window.URL.createObjectURL(new Blob([res.data]));
- const link = document.createElement("a");
- link.href = url;
- link.setAttribute(
- "download",
- `Candidate_Dashboard_${dateToISO(new Date())}` + ".pdf"
- );
- document.body.appendChild(link);
- link.click();
- document.body.removeChild(link);
- window.URL.revokeObjectURL(url);
- } catch (error) {
- messageError($q, error);
- } finally {
- hideLoader();
- }
+ showLoader();
+ await http
+ .get(config.API.downloadPassExam(examId.value))
+ .then(async (res) => {
+ const data = res.data.result;
+ data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`;
+ await genReport(data, data.reportName, "pdf");
+ })
+ .catch((e) => {
+ messageError($q, e);
+ })
+ .finally(() => {
+ hideLoader();
+ });
}
async function clickCandidateList() {
- try {
- showLoader();
- const res = await http.get(config.API.downloadCandidateExam(examId.value), {
- headers: {
- "Content-Type": "application/pdf",
- Accept: "application/pdf",
- },
- responseType: "blob",
+ showLoader();
+ await http
+ .get(config.API.downloadCandidateExam(examId.value))
+ .then(async (res) => {
+ const data = res.data.result;
+ data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`;
+ await genReport(data, data.reportName, "pdf");
+ })
+ .catch((e) => {
+ messageError($q, e);
+ })
+ .finally(() => {
+ hideLoader();
});
- const url = window.URL.createObjectURL(new Blob([res.data]));
- const link = document.createElement("a");
- link.href = url;
- link.setAttribute("download", "รายชื่อผู้มีสิทธิ์สอบ" + ".pdf");
- document.body.appendChild(link);
- link.click();
- document.body.removeChild(link);
- window.URL.revokeObjectURL(url);
- } catch (error) {
- messageError($q, error);
- } finally {
- hideLoader();
- }
}
async function onCheckShowExaminfo() {
@@ -571,20 +549,8 @@ watch(
-
-
- {{
- attrs.rows.length !== 0
- ? "ดาวน์โหลดไฟล์"
- : "ไม่มีข้อมูลผู้สอบคัดเลือก"
- }}
+
+ ดาวน์โหลดไฟล์
จัดการรอบสอบแข่งขัน
-
{
นำเข้าไฟล์ผู้สมัครสอบ
@@ -849,9 +715,6 @@ watch(notificationCounter, () => {
{
round
color="green"
@click.stop.prevent="clickEdit(props.row.id)"
+ v-if="
+ col.value == null && checkPermission($route)?.attrIsUpdate
+ "
>
@@ -885,11 +751,6 @@ watch(notificationCounter, () => {
{
color="green"
round
@click.stop.prevent="clickResult(props.row.id)"
+ v-if="
+ (props.row.score == null ||
+ props.row.score.resultCount == 0) &&
+ checkPermission($route)?.attrIsUpdate
+ "
>
นำเข้าไฟล์ผลการสอบ (บัญชีรายชื่อ)
@@ -1055,12 +921,12 @@ watch(notificationCounter, () => {
-
+
@@ -1099,12 +965,12 @@ watch(notificationCounter, () => {
-
+
@@ -1143,12 +1009,12 @@ watch(notificationCounter, () => {
-
+
diff --git a/src/modules/03_recruiting/views/01_compete/PeriodAdd.vue b/src/modules/03_recruiting/views/01_compete/PeriodAdd.vue
index 68d8df9ae..8cab7895c 100644
--- a/src/modules/03_recruiting/views/01_compete/PeriodAdd.vue
+++ b/src/modules/03_recruiting/views/01_compete/PeriodAdd.vue
@@ -2,13 +2,11 @@
import { onMounted, ref, watch, computed } from "vue";
import { useQuasar, QForm } from "quasar";
import { useRouter, useRoute } from "vue-router";
-import { storeToRefs } from "pinia";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { calculateFiscalYear } from "@/utils/function";
-import { usePositionKeycloakStore } from "@/stores/positionKeycloak";
import type { RequestPeriodCompete } from "@/modules/03_recruiting/interface/request/Period";
import type {
@@ -18,7 +16,6 @@ import type {
const $q = useQuasar(); // show dialog
const mixin = useCounterMixin();
-const { dataPositionKeycloak } = storeToRefs(usePositionKeycloakStore());
const router = useRouter();
const route = useRoute();
const {
@@ -56,7 +53,6 @@ const fileImgDataUpload = ref([]);
const fileImgs = ref([]);
const id = ref("");
const edit = ref(false);
-const scoreExpireDate = ref(null); //วันหมดอายุบัญชี
/** กลับไปหน้าหลัก */
function clickBack() {
@@ -102,7 +98,6 @@ async function fetchData() {
fileDocs.value = files;
fileImgs.value = images;
- scoreExpireDate.value = data.scoreExpireDate;
})
.catch((e) => {
messageError($q, e);
@@ -258,11 +253,6 @@ function sendData() {
year: yearly.value,
announcementDate:
dateAnnounce.value !== null ? convertDateToAPI(dateAnnounce.value) : null,
- scoreExpireDate:
- scoreExpireDate.value !== null
- ? convertDateToAPI(scoreExpireDate.value)
- : null,
- rootDnaId: !edit.value ? dataPositionKeycloak.value.rootDnaId : undefined,
};
return valueData;
}
@@ -365,13 +355,6 @@ function dateThaiRange(val: [Date, Date]) {
return `${date2Thai(val[0], true)} - ${date2Thai(val[1], true)}`;
}
}
-function onUpdateScoreExpireDate(val: Date | null) {
- if (val) {
- const newDate = new Date(val);
- newDate.setFullYear(newDate.getFullYear() + 2);
- scoreExpireDate.value = newDate;
- }
-}
watch(organizationShortName, (count: DataOption2, prevCount: DataOption2) => {
organizationNameOptions.value = [];
@@ -468,7 +451,6 @@ onMounted(async () => {
-
{
input-class="text-right"
>
-
{
-
{
-
{
dateRegister != null ? dateThaiRange(dateRegister) : null
"
:label="`${'วันที่สมัคร'}`"
- hide-bottom-space
>
{
-
{
"
:label="`${'วันที่ชำระเงิน'}`"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ชำระเงิน'}`]"
- hide-bottom-space
>
{
borderless
:enableTimePicker="false"
week-start="0"
- @update:model-value="onUpdateScoreExpireDate"
>
{{ year + 543 }}
@@ -674,48 +649,6 @@ onMounted(async () => {
"
:label="`${'วันประกาศผลสอบ'}`"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันประกาศผลสอบ'}`]"
- hide-bottom-space
- >
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
-
-
- {{ parseInt(value + 543) }}
-
-
-
0) {
data.map((r: ResponseRecruitPeriod) => {
if (r.score != null) {
- r.scoreCount = r.score.scoreCount ? r.score.scoreCount : 0;
- r.scoreImportDate = r.score.importDate ? r.score.importDate : "-";
+ r.scoreCount = r.score.scoreCount;
+ r.scoreImportDate = r.score.importDate;
}
result.push(r);
});
@@ -715,11 +715,7 @@ onMounted(async () => {
นำเข้าไฟล์ผลคะแนนสอบ
- {{
- props.row.score
- ? props.row.score.scoreCount.toLocaleString()
- : "-"
- }}
+ {{ props.row.score.scoreCount.toLocaleString() }}
{
นำเข้าไฟล์ผลการสอบ (บัญชีรายชื่อ)
- {{
- props.row.score
- ? props.row.score.resultCount.toLocaleString()
- : "-"
- }}
+ {{ props.row.score.resultCount.toLocaleString() }}
([]);
const organizationShortName = ref({ id: "", name: "" });
const organizationName = ref({ id: "", name: "" });
const organizationNameOptions = ref([]);
-const scoreExpireDate = ref(null); //วันหมดอายุบัญชี
+
const fileDocDataUpload = ref([]);
const fileDocs = ref([]);
const fileImgDataUpload = ref([]);
@@ -93,7 +90,6 @@ async function fetchData() {
data.announcementDate != null ? new Date(data.announcementDate) : null;
fileDocs.value = data.documents;
fileImgs.value = data.images;
- scoreExpireDate.value = data.scoreExpireDate;
})
.catch((e) => {
messageError($q, e);
@@ -163,11 +159,6 @@ function sendData() {
year: yearly.value,
announcementDate:
dateAnnounce.value !== null ? convertDateToAPI(dateAnnounce.value) : null,
- rootDnaId: !edit.value ? dataPositionKeycloak.value.rootDnaId : undefined,
- scoreExpireDate:
- scoreExpireDate.value !== null
- ? convertDateToAPI(scoreExpireDate.value)
- : null,
};
return valueData;
}
@@ -357,14 +348,6 @@ function dateThaiRange(val: [Date, Date] | null) {
}
}
-function onUpdateScoreExpireDate(val: Date | null) {
- if (val) {
- const newDate = new Date(val);
- newDate.setFullYear(newDate.getFullYear() + 2);
- scoreExpireDate.value = newDate;
- }
-}
-
watch(organizationShortName, (count: DataOption2, prevCount: DataOption2) => {
organizationNameOptions.value = [];
});
@@ -403,7 +386,7 @@ onMounted(async () => {
-
+
{
(val:string) =>
!!val || `${'กรุณากรอกชื่อรอบคัดเลือก/ชื่อประกาศ'}`,
]"
- hide-bottom-space
>
-
{
dense
lazy-rules
:rules="[(val:number) => val > 0 || `${'กรุณากรอกรอบการสอบให้ถูกต้อง'}`]"
- hide-bottom-space
>
-
{
:model-value="yearly + 543"
:rules="[(val:string) => !!val || `${'กรุณาเลือกปีงบประมาณ'}`]"
:label="`${'ปีงบประมาณ'}`"
- hide-bottom-space
>
{
:rules="[
(val:any) => val >= 0 || `${'กรุณากรอกค่าธรรมเนียมให้ถูกต้อง'}`,
]"
- hide-bottom-space
>
@@ -503,7 +480,6 @@ onMounted(async () => {
:model-value="dateExam != null ? date2Thai(dateExam) : null"
:label="`${'วันที่สอบ'}`"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่สอบ'}`]"
- hide-bottom-space
>
{
{
{
{
borderless
:enableTimePicker="false"
week-start="0"
- @update:model-value="onUpdateScoreExpireDate"
>
{{ year + 543 }}
@@ -657,54 +629,12 @@ onMounted(async () => {
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
-
-
- {{ parseInt(value + 543) }}
-
-
-
("");
-const scoreExpireDate = ref(null);
const fileDocDataUpload = ref([]);
const fileDocs = ref([]);
@@ -334,7 +333,6 @@ async function fetchData() {
refNo1.value = data.refNo1;
reason.value = data.reason;
graduationYearLock.value = data.graduationYearLock;
- scoreExpireDate.value = data.scoreExpireDate;
})
.catch((e) => {
messageError($q, e);
@@ -508,10 +506,6 @@ function sendData() {
refNo1: refNo1.value,
reason: reason.value,
graduationYearLock: Number(graduationYearLock.value),
- scoreExpireDate:
- scoreExpireDate.value != null
- ? convertDateToAPI(scoreExpireDate.value)
- : null,
};
return valueData;
}
@@ -945,14 +939,6 @@ watch(
}
);
-function onUpdateScoreExpireDate(val: Date | null) {
- if (val) {
- const newDate = new Date(val);
- newDate.setFullYear(newDate.getFullYear() + 2);
- scoreExpireDate.value = newDate;
- }
-}
-
onMounted(async () => {
hideLoader();
if (route.params.id != undefined) {
@@ -1256,7 +1242,6 @@ onMounted(async () => {
borderless
:enableTimePicker="false"
week-start="0"
- @update:model-value="onUpdateScoreExpireDate"
>
{{ year + 543 }}
@@ -1290,63 +1275,21 @@ onMounted(async () => {
-
-
-
-
- {{ year + 543 }}
-
-
- {{ parseInt(value + 543) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ type="number"
+ >
+
diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/02_Discipline.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/02_Discipline.vue
index 3be9068cb..a726a067f 100644
--- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/02_Discipline.vue
+++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/02_Discipline.vue
@@ -16,11 +16,9 @@ import type {
DisciplineOps,
DataOption,
} from "@/modules/04_registryPerson/interface/index/discipline";
-import type { Discipline } from "@/modules/04_registryPerson/interface/response/Discipline";
import DialogHeader from "@/components/DialogHeader.vue";
import DialogHistory from "@/modules/04_registryPerson/components/detail/DialogHistory.vue";
-import DialogPreviewCommand from "@/modules/18_command/components/DialogPreviewCommand.vue";
const route = useRoute();
const $q = useQuasar();
@@ -49,9 +47,6 @@ const empType = ref
(pathRegistryEmp(route.name?.toString() ?? ""));
const isLeave = defineModel("isLeave", {
required: true,
});
-const citizenId = defineModel("citizenId", {
- required: true,
-});
const baseColumns = ref([
{
@@ -157,8 +152,8 @@ const baseVisibleColumns = ref([
"lastUpdatedAt",
]);
-const rows = ref([]); //รายการวินัย
-const rowsMain = ref([]); //รายการวินัย
+const rows = ref([]); //รายการวินัย
+const rowsMain = ref([]); //รายการวินัย
const mode = ref("table"); //การแสดงผล Table card
const filterKeyword = ref(""); //คำค้นหา
@@ -249,10 +244,6 @@ const fileUpload = ref(null);
const fileData = ref(null);
const isUpload = ref(false);
-const modalCommand = ref(false);
-const command = ref("");
-const commandId = ref("");
-
/**
* function ค้นหา คำใน option
* @param val คำค้นหา
@@ -314,7 +305,7 @@ async function fetchData(id: string) {
* กดเลือกข้อมูลที่จะแก้ไข
* @param props ค่า props ใน row ที่เลือก
*/
-async function openDialogEdit(props: Discipline) {
+async function openDialogEdit(props: RequestItemsObject) {
showLoader();
try {
modal.value = true;
@@ -487,12 +478,6 @@ function handleDelete(id: string) {
});
}
-function openViewCommand(data: Discipline) {
- command.value = data.refCommandNo;
- commandId.value = data.refCommandId;
- modalCommand.value = true;
-}
-
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
onMounted(() => {
fetchData(profileId.value);
@@ -636,19 +621,7 @@ onMounted(() => {
:key="col.id"
:class="props.row.isEntry ? 'text-grey' : ''"
>
-
- {{ col.value ? col.value : "-" }}
- ดูคำสั่ง
-
-
+
{{ col.value ? col.value : "-" }}
@@ -1002,13 +975,6 @@ onMounted(() => {
:visible-columns="visibleColumnsHistory"
:fetch-data="fetchDataHistory"
/>
-
-
diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/06_HelpGovernment.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/06_HelpGovernment.vue
index 71a7e3bd5..c97cbb2c3 100644
--- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/06_HelpGovernment.vue
+++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/06_HelpGovernment.vue
@@ -866,8 +866,7 @@ onMounted(() => {
outlined
dense
:model-value="date2Thai(formData.dateEnd)"
- clearable
- @clear="formData.dateEnd = null"
+ :rules="[(val:string) => !!val || `${'กรุณาเลือก วันที่สิ้นสุด'}`]"
hide-bottom-space
:label="`${'วันที่สิ้นสุด'}`"
>
diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/Main.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/Main.vue
index 189faa16b..3f30cf12e 100644
--- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/Main.vue
+++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/Main.vue
@@ -58,10 +58,7 @@ const storeRegistry = useRegistryNewDataStore();
-
+
diff --git a/src/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue b/src/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue
index 0b2bca785..7730029f7 100644
--- a/src/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue
+++ b/src/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue
@@ -96,11 +96,11 @@ const columnsHistory = ref([
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
- name: "prefixMain",
+ name: "prefix",
align: "left",
label: "คำนำหน้าชื่อ",
sortable: true,
- field: "prefixMain",
+ field: "prefix",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
@@ -256,7 +256,7 @@ const columnsHistory = ref([
]);
const visibleColumnsHistory = ref([
"citizenId",
- "prefixMain",
+ "prefix",
"rank",
"firstName",
"lastName",
@@ -408,8 +408,7 @@ function calculateMinDate() {
function prefixRankRule() {
return [
- () =>
- !!formData.rank || !!formData.prefix || "กรุณาเลือกคำนำหน้าชื่อ หรือยศ",
+ () => !!formData.rank || !!formData.prefix || "กรุณาเลือกคำนำหน้าชื่อ หรือยศ",
];
}
@@ -589,8 +588,6 @@ onMounted(() => {
{
option-value="name"
v-model="formData.prefix"
clearable
+ class="inputgreen"
:options="store.Ops.prefixOps"
:label="dataLabel.prefix"
:rules="prefixRankRule()"
@@ -642,24 +640,24 @@ onMounted(() => {
@@ -723,7 +721,6 @@ onMounted(() => {
{
option-label="name"
option-value="name"
v-model="formData.gender"
+ class="inputgreen"
:options="store.Ops.genderOps"
:label="dataLabel.gender"
@filter="(inputValue: string,
diff --git a/src/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue b/src/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue
index 06b598ad8..cbe7f361e 100644
--- a/src/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue
+++ b/src/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue
@@ -59,7 +59,6 @@ const changeNameData = reactive({
profileId: profileId.value,
prefixId: "", // id คำนำหน้า
prefix: "", // คำนำหน้า
- rank: "", // ยศ
firstName: "", // ชื่อ
lastName: "", // นามสกุล
status: "", // สถานะ
@@ -70,13 +69,11 @@ const selection = ref([]); // ตัวเลือก
const prefixChange = ref(""); // เปลี่ยนคำนำหน้า
const firstNameChange = ref(""); // เปลียนชื่อ
const lastNameChange = ref(""); // เปลี่ยนนามสกุล
-const rankChange = ref(""); // เปลี่ยนยศ
const profileInfo = ref(); // ข้อมูล Profile
const statusOption = ref([
"เปลี่ยนคำนำหน้าชื่อ",
- "เปลี่ยนยศ",
"เปลี่ยนชื่อ",
"เปลี่ยนนามสกุล",
"เปลี่ยนชื่อ-นามสกุล",
@@ -87,7 +84,6 @@ const statusOption = ref([
const statusOptionFilter = ref([
"เปลี่ยนคำนำหน้าชื่อ",
"เปลี่ยนชื่อ",
- "เปลี่ยนยศ",
"เปลี่ยนนามสกุล",
"เปลี่ยนชื่อ-นามสกุล",
"เปลี่ยนคำนำหน้าชื่อ และชื่อ",
@@ -111,17 +107,6 @@ const columns = ref([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
- {
- name: "rank",
- align: "left",
- label: "ยศ",
- sortable: true,
- field: "rank",
- headerStyle: "font-size: 14px",
- style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
- },
{
name: "firstName",
align: "left",
@@ -171,7 +156,6 @@ const columns = ref([
]);
const visibleColumns = ref([
"prefix",
- "rank",
"firstName",
"lastName",
"lastUpdateFullName",
@@ -231,7 +215,6 @@ function onSubmit() {
firstName: changeNameData.firstName,
lastName: changeNameData.lastName,
status: changeNameData.status,
- rank: changeNameData.rank,
documentId: changeNameData.documentId,
})
.then(async (res) => {
@@ -363,14 +346,6 @@ function filterSelector(val: string, update: Function, refData: string) {
);
});
break;
-
- case "rankOps":
- update(() => {
- store.Ops.rankOps = store.OpsFilter.rankOps.filter(
- (v: DataOption) => v.name.indexOf(val) > -1
- );
- });
- break;
default:
break;
}
@@ -415,14 +390,12 @@ watch(
changeNameData.prefix,
changeNameData.firstName,
changeNameData.lastName,
- changeNameData.rank,
],
() => {
submitDisable.value =
changeNameData.prefix === prefixChange.value &&
changeNameData.firstName === firstNameChange.value &&
- changeNameData.lastName === lastNameChange.value &&
- changeNameData.rank === rankChange.value;
+ changeNameData.lastName === lastNameChange.value;
}
);
@@ -438,9 +411,6 @@ watch(
if (!selection.value.includes("lastname")) {
changeNameData.lastName = lastNameChange.value;
}
- if (!selection.value.includes("rank")) {
- changeNameData.rank = rankChange.value;
- }
}
);
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
@@ -478,11 +448,9 @@ onMounted(async () => {
changeNameData.prefix = profileInfo?.prefixMain;
changeNameData.firstName = profileInfo?.firstName;
changeNameData.lastName = profileInfo?.lastName;
- changeNameData.rank = profileInfo?.rank;
prefixChange = changeNameData.prefix;
firstNameChange = changeNameData.firstName;
lastNameChange = changeNameData.lastName;
- rankChange = changeNameData.rank;
changeNameData.status = '';
dialogStatus = 'create';
submitDisable = true;
@@ -565,7 +533,7 @@ onMounted(async () => {
:class="props.row.isEntry ? 'text-grey' : ''"
>
- {{ col.value ? col.value : "-" }}
+ {{ col.value }}
@@ -595,17 +563,12 @@ onMounted(async () => {
-
+
-
{
) "
/>
-
- filterSelector(inputValue, doneFn,'rankOps'
- ) "
- />
-
{
{
id: "posNo",
name:
- route.name === "registryNew" || route.name === "registryRetireOfficer"
+ route.name === "registryNew" ||
+ route.name === "registryRetireOfficer"
? "เลขที่ตำแหน่ง"
: "ตำแหน่งเลขที่",
},
@@ -129,8 +130,6 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
return "ให้ออกจากราชการ";
case "DISCIPLINE_TEMP_SUSPEND":
return "ให้ออกจากราชการไว้ก่อน";
- case "RETIRE_MILITARY":
- return "ลาออกเพื่อไปรับราชการทหาร";
default:
return "";
}
diff --git a/src/modules/04_registryPerson/views/detailView.vue b/src/modules/04_registryPerson/views/detailView.vue
index 1318ed468..33ca37200 100644
--- a/src/modules/04_registryPerson/views/detailView.vue
+++ b/src/modules/04_registryPerson/views/detailView.vue
@@ -121,8 +121,7 @@ const itemsMenu = computed(() => {
if (
leaveType.value === "DISCIPLINE_TEMP_SUSPEND" ||
leaveType.value === "RETIRE_RESIGN" ||
- leaveType.value === "DISCIPLINE_SUSPEND" ||
- leaveType.value === "RETIRE_MILITARY"
+ leaveType.value === "DISCIPLINE_SUSPEND"
) {
return (
baseItemsMenu.value?.filter(
@@ -324,10 +323,10 @@ async function uploadFileURL(uploadUrl: string, file: any) {
* ฟังก์ชันดึงข้อมูลรูปโปรไฟล์
* @param id โปรไฟล์
*/
-function fetchProfile(id: string) {
- http
+async function fetchProfile(id: string) {
+ await http
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, fileName.value))
- .then((res) => {
+ .then(async (res) => {
profilePicture.value = res.data.downloadUrl;
})
.catch(() => {
@@ -404,7 +403,7 @@ async function fetchDataPersonal() {
fileName.value = res.data.result.avatarName;
if (formDetail.value?.avatarName) {
- fetchProfile(profileId.value);
+ await fetchProfile(profileId.value);
} else {
profilePicture.value = avatar;
}
@@ -858,8 +857,7 @@ onMounted(async () => {
])) ||
leaveType === 'DISCIPLINE_TEMP_SUSPEND' ||
leaveType === 'RETIRE_RESIGN' ||
- leaveType === 'DISCIPLINE_SUSPEND' ||
- leaveType === 'RETIRE_MILITARY'
+ leaveType === 'DISCIPLINE_SUSPEND'
"
size="md"
rounded
diff --git a/src/modules/04_registryPerson/views/edit/components/Table.vue b/src/modules/04_registryPerson/views/edit/components/Table.vue
index da180ac32..f470254c6 100644
--- a/src/modules/04_registryPerson/views/edit/components/Table.vue
+++ b/src/modules/04_registryPerson/views/edit/components/Table.vue
@@ -437,6 +437,66 @@ function classColorRow(isDelete: boolean, isEdit: boolean, isEntry: boolean) {
/** ฟังก์ชันดาวน์โหลดไฟล Excel */
function exportToExcel() {
exportToExcelPosition(rows.value);
+ // const newData = rows.value.map((e: DataPosition) => {
+ // return {
+ // commandDateAffect: date2Thai(e.commandDateAffect),
+ // positionName: e.positionName,
+ // positionType: e.positionType,
+ // positionLevel: e.positionLevel
+ // ? e.positionLevel
+ // : e.positionCee
+ // ? e.positionCee
+ // : "",
+ // positionExecutive: e.positionExecutive,
+ // amount: e.amount,
+ // mouthSalaryAmount: e.mouthSalaryAmount,
+ // positionSalaryAmount: e.positionSalaryAmount,
+ // organization: findOrgName({
+ // root: e.orgRoot,
+ // child1: e.orgChild1,
+ // child2: e.orgChild2,
+ // child3: e.orgChild3,
+ // child4: e.orgChild4,
+ // }),
+ // posNo:
+ // e.posNoAbb && e.posNo
+ // ? `${e.posNoAbb} ${e.posNo}`
+ // : e.posNo
+ // ? e.posNo
+ // : "",
+ // posNumCodeSit:
+ // e.posNumCodeSitAbb && e.posNumCodeSit
+ // ? `${e.posNumCodeSit} (${e.posNumCodeSitAbb})`
+ // : e.posNumCodeSit
+ // ? e.posNumCodeSit
+ // : "",
+ // commandNo:
+ // e.commandNo && e.commandYear
+ // ? `${e.commandNo}/${Number(e.commandYear) + 543}`
+ // : "",
+ // commandDateSign: date2Thai(e.commandDateSign),
+ // commandCode: store.convertCommandCodeName(e.commandCode),
+ // remark: e.remark,
+ // };
+ // });
+
+ // const headers = columns.value.map((item: any) => item.label) || []; // หัวคอลัมน์ภาษาไทย
+ // const worksheet = XLSX.utils.json_to_sheet(newData, {
+ // header: visibleColumns.value,
+ // });
+
+ // //แทรกหัวคอลัมน์ภาษาไทย (ใช้ A1, B1, C1 แทน)
+ // XLSX.utils.sheet_add_aoa(worksheet, [headers], { origin: "A1" });
+
+ // // Create a new workbook and append the worksheet
+ // const workbook = XLSX.utils.book_new();
+
+ // XLSX.utils.book_append_sheet(
+ // workbook,
+ // worksheet,
+ // `รายการประวัติตำแหน่งเงินเดือน`
+ // );
+ // XLSX.writeFile(workbook, "รายการประวัติตำแหน่งเงินเดือน.xlsx");
}
const commandCodeOptions = ref(store.commandCodeData); //รายการปรเภทคำสั่ง
@@ -871,29 +931,6 @@ function onCancelUpload() {
excelPreviewModal.value = false;
}
-/** ฟังก์ชันจัดเรียงข้อมูลตามวันที่*/
-function handleSortByDate() {
- dialogConfirm(
- $q,
- async () => {
- try {
- showLoader();
- await http.put(config.API.sortOrderByDate, {
- type: empType.value.toLocaleUpperCase(),
- profileId: profileId.value,
- });
- await fetchData();
- } catch (error) {
- messageError($q, error);
- } finally {
- hideLoader();
- }
- },
- "ยืนยันการจัดลำดับ",
- "ต้องการยืนยันการจัดลำดับข้อมูลตามวันที่คำสั่งมีผลใช่หรือไม่?"
- );
-}
-
onMounted(async () => {
await Promise.all([fetchData(), fetchType()]);
});
@@ -929,23 +966,8 @@ onMounted(async () => {
icon="mdi-sort"
@click="modalSort = true"
>
- จัดลำดับข้อมูล
-
-
- จัดลำดับข้อมูล
- จัดลำดับตามวันที่คำสั่งมีผล
-
{
:model-value="
dateEnd !== null ? date2Thai(dateEnd) : null
"
+ :rules="edit ? [(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]:[]"
hide-bottom-space
:label="`${'ถึงวันที่'}`"
- clearable
- @clear="dateEnd = null"
>
-
+
diff --git a/src/modules/05_placement/components/PersonalList/DialogDetail.vue b/src/modules/05_placement/components/PersonalList/DialogDetail.vue
index dff09ffdd..13aa09aef 100644
--- a/src/modules/05_placement/components/PersonalList/DialogDetail.vue
+++ b/src/modules/05_placement/components/PersonalList/DialogDetail.vue
@@ -525,14 +525,14 @@ watch(props, () => {
{{ personalForm?.pass }}
{{ personalForm?.examNumber }}
-
+
{{ personalForm?.examRound }}
diff --git a/src/modules/05_placement/components/PersonalList/DialogOrders.vue b/src/modules/05_placement/components/PersonalList/DialogOrders.vue
index c7d70b924..8ac613a5f 100644
--- a/src/modules/05_placement/components/PersonalList/DialogOrders.vue
+++ b/src/modules/05_placement/components/PersonalList/DialogOrders.vue
@@ -242,7 +242,7 @@ watch(
v.code === "C-PM-04" ||
v.code === "C-PM-06")) ||
((status?.examTypeName === "สอบคัดเลือก" ||
- status?.examTypeName === "คัดเลือกอื่นๆ") &&
+ status?.examTypeName === "คัดเลือกคนพิการ") &&
(v.code === "C-PM-02" ||
v.code === "C-PM-03" ||
v.code === "C-PM-04" ||
diff --git a/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue b/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue
index ad1028738..e54741069 100644
--- a/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue
+++ b/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue
@@ -165,9 +165,7 @@ async function fetchDataTable(id: string, level: number = 0) {
(e) => e !== props.dataRow?.posmasterId
);
- positionNo.value = posMain.filter(
- (e: DataPositionNo) => !newUse.includes(e.id)
- );
+ positionNo.value = posMain.filter((e: DataPositionNo) => !newUse.includes(e.id));
} else {
positionNo.value = posMain.filter(
(e: DataPositionNo) => !positionUse.value.includes(e.id)
@@ -243,7 +241,6 @@ async function onClickSubmit() {
posLevelId: selectedPos.value[0].posLevelId, //ชื่อตำแหน่ง
posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง
posExecutiveName: selectedPos.value[0].posExecutiveName,
- posExecutiveId: selectedPos.value[0].posExecutiveId,
reportingDate: convertDateToAPI(datePos.value),
posmasterId: dataPosMaster.id,
positionExecutiveField: selectedPos.value[0].positionExecutiveField, //ด้านทางการบริหาร
@@ -293,10 +290,7 @@ watch(
if (modal.value) {
await fetchPositionUes();
if (props?.dataRow?.node !== null && props?.dataRow?.nodeId !== null) {
- await fetchPosFind(
- props?.dataRow?.node ?? 0,
- props?.dataRow?.nodeId ?? ""
- );
+ await fetchPosFind(props?.dataRow?.node ?? 0, props?.dataRow?.nodeId ?? "");
} else {
expanded.value = [];
}
@@ -351,7 +345,7 @@ function onPosType() {
watch(
[isAll, isBlank, () => isPosition.value],
([newAll, newBlank, newPos], [oldAll, oldBlank, oldPos]) => {
- const shouldFetch = newAll !== oldAll || newBlank !== oldBlank;
+ const shouldFetch = (newAll !== oldAll) || (newBlank !== oldBlank);
const isSelectMode = newPos === "select" && oldPos !== "select";
if (shouldFetch || isSelectMode) {
diff --git a/src/modules/05_placement/components/PersonalList/Table.vue b/src/modules/05_placement/components/PersonalList/Table.vue
index 1e151ee01..1d43085e9 100644
--- a/src/modules/05_placement/components/PersonalList/Table.vue
+++ b/src/modules/05_placement/components/PersonalList/Table.vue
@@ -1,5 +1,5 @@
-
@@ -280,33 +249,6 @@ watch(
-
filterSelector(inputValue, doneFn
- ) "
- >
-
-
-
- ไม่มีข้อมูล
-
-
-
-
@@ -399,7 +341,7 @@ watch(
diff --git a/src/modules/06_retirement/components/02_resign/ResignByid.vue b/src/modules/06_retirement/components/02_resign/ResignByid.vue
index b17345bea..4d4dac874 100644
--- a/src/modules/06_retirement/components/02_resign/ResignByid.vue
+++ b/src/modules/06_retirement/components/02_resign/ResignByid.vue
@@ -47,7 +47,6 @@ const {
success,
dialogConfirm,
dialogRemove,
- convertDateToAPI,
} = mixin;
/** ตัวแปร */
@@ -478,8 +477,9 @@ function onSubmitConditions() {
function onSubmitAttached() {
dialogConfirm($q, async () => {
const formData = new FormData();
- const send: string = convertDateToAPI(date.value) ?? "";
- const activeDate: string = convertDateToAPI(dateLeave.value) ?? "";
+ 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);
@@ -771,13 +771,10 @@ onMounted(async () => {
(route.name == "resignDetailreject");
@@ -314,8 +313,9 @@ async function clickCancel() {
function onSubmitAttached() {
dialogConfirm($q, () => {
const formData = new FormData();
- const send: string = convertDateToAPI(date.value) ?? "";
- const activeDate: string = convertDateToAPI(dateLeave.value) ?? "";
+ 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);
@@ -439,7 +439,7 @@ onMounted(async () => {
class="q-mr-sm"
@click="router.push('/retirement/resign')"
/>
- รายละเอียดการยกเลิกลาออก
+ รายละเอียดการยกเลิกลาออก
{{
dataDetail.prefix + dataDetail.firstName + " " + dataDetail.lastName
}}
diff --git a/src/modules/06_retirement/components/02_resign/Table.vue b/src/modules/06_retirement/components/02_resign/Table.vue
index c4a1001b8..b5769dc33 100644
--- a/src/modules/06_retirement/components/02_resign/Table.vue
+++ b/src/modules/06_retirement/components/02_resign/Table.vue
@@ -33,8 +33,7 @@ const {
showLoader,
hideLoader,
onSearchDataTable,
- dialogRemove,
- success,
+ findOrgName,
} = mixin;
/** Table */
@@ -258,21 +257,6 @@ function onSearch() {
);
}
-function handleDelete(id: string) {
- dialogRemove($q, async () => {
- try {
- showLoader();
- await http.delete(config.API.listResign() + `/admin/${id}`);
- await fecthlist();
- success($q, "ลบข้อมูลสำเร็จ");
- } catch (error) {
- messageError($q, error);
- } finally {
- hideLoader();
- }
- });
-}
-
/**Hook */
onMounted(async () => {
status.value = stroeResign.formQurey.status;
@@ -324,11 +308,7 @@ onMounted(async () => {
color="primary"
icon="mdi-account-arrow-right"
>
- {{
- `ส่งไปออกคำสั่ง${
- stroeResign.mainTabs == "2" ? "ยกเลิกการ" : ""
- }ลาออก`
- }}
+ {{ `ส่งไปออกคำสั่ง${stroeResign.mainTabs == '2'?"ยกเลิกการ":''}ลาออก` }}
@@ -413,26 +393,6 @@ onMounted(async () => {
>
แก้ไขข้อมูล
-
-
- ลบข้อมูล
-
{
{
const formData = new FormData();
- const send: string = convertDateToAPI(date.value) ?? "";
- const activeDate: string = convertDateToAPI(dateLeave.value) ?? "";
-
+ 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);
diff --git a/src/modules/06_retirement/components/03_resignEmp/Table.vue b/src/modules/06_retirement/components/03_resignEmp/Table.vue
index 7eeee2f80..89a181576 100644
--- a/src/modules/06_retirement/components/03_resignEmp/Table.vue
+++ b/src/modules/06_retirement/components/03_resignEmp/Table.vue
@@ -27,15 +27,8 @@ const stroeResign = useDataStore();
const { statusText } = stroe;
const router = useRouter();
const mixin = useCounterMixin();
-const {
- messageError,
- date2Thai,
- showLoader,
- hideLoader,
- onSearchDataTable,
- dialogRemove,
- success,
-} = mixin;
+const { messageError, date2Thai, showLoader, hideLoader, onSearchDataTable } =
+ mixin;
/** Table */
const rows = ref([]);
@@ -136,7 +129,7 @@ const columns = ref([
sortable: true,
field: "status",
format(val, row) {
- return stroeResign.mainTabsEMP === "1"
+ return stroeResign.mainTabs === "1"
? statusText(row.status)
: statusText(row.status, "อนุญาต");
},
@@ -259,21 +252,6 @@ function onSearch() {
);
}
-function handleDelete(id: string) {
- dialogRemove($q, async () => {
- try {
- showLoader();
- await http.delete(config.API.listResignEMP() + `/admin/${id}`);
- await fecthlist();
- success($q, "ลบข้อมูลสำเร็จ");
- } catch (error) {
- messageError($q, error);
- } finally {
- hideLoader();
- }
- });
-}
-
/**Hook */
onMounted(async () => {
statusEMP.value = stroeResign.formQureyEMP.status;
@@ -413,26 +391,6 @@ onMounted(async () => {
>
แก้ไขข้อมูล
-
-
- ลบข้อมูล
-
-
{{ col.label }}
+
{{
+ getColumnLabel(col, isAct)
+ }}
diff --git a/src/modules/08_registryEmployee/components/DialogSelectPos.vue b/src/modules/08_registryEmployee/components/DialogSelectPos.vue
index 222890238..7602cb043 100644
--- a/src/modules/08_registryEmployee/components/DialogSelectPos.vue
+++ b/src/modules/08_registryEmployee/components/DialogSelectPos.vue
@@ -5,7 +5,6 @@ import { useQuasar } from "quasar";
import { useRoute } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import { useStructureTree } from "@/stores/structureTree";
-import { formatPosmasterNo } from "@/utils/function";
import http from "@/plugins/http";
import config from "@/app.config";
@@ -75,12 +74,7 @@ const columns = ref
([
sortable: true,
field: "posMasterNo",
format(val, row) {
- return formatPosmasterNo(
- row.orgShortname,
- row.posMasterNoPrefix,
- row.posMasterNo.toString(),
- row.posMasterNoSuffix
- );
+ return `${row.orgShortname} ${row.posMasterNo}`;
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
diff --git a/src/modules/09_leave/components/01_RoundTime/DialogForm.vue b/src/modules/09_leave/components/01_RoundTime/DialogForm.vue
index 8eaf9c6b5..c6883cb11 100644
--- a/src/modules/09_leave/components/01_RoundTime/DialogForm.vue
+++ b/src/modules/09_leave/components/01_RoundTime/DialogForm.vue
@@ -212,7 +212,7 @@ watch(
:close="close"
/>
-
+
@@ -362,7 +362,6 @@ watch(
-
@@ -514,7 +513,6 @@ watch(
-
-
+ >
@@ -544,7 +541,6 @@ watch(
-
@@ -563,7 +559,6 @@ watch(
-
diff --git a/src/modules/09_leave/components/02_WorkList/Tab4_Pending.vue b/src/modules/09_leave/components/02_WorkList/Tab4_Pending.vue
deleted file mode 100644
index 60637c6b6..000000000
--- a/src/modules/09_leave/components/02_WorkList/Tab4_Pending.vue
+++ /dev/null
@@ -1,263 +0,0 @@
-
-
-
-
-
-
-
- ไม่มีข้อมูล
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/modules/09_leave/components/04_SpecialTime/DialogApprove.vue b/src/modules/09_leave/components/04_SpecialTime/DialogApprove.vue
index af47e1dcf..2eb7b2cd0 100644
--- a/src/modules/09_leave/components/04_SpecialTime/DialogApprove.vue
+++ b/src/modules/09_leave/components/04_SpecialTime/DialogApprove.vue
@@ -96,8 +96,8 @@ watch(
formData.checkOut = "";
formData.note = "";
} else if (props.editCheck === "PENDING") {
- if (props.detailData) {
- if (props.detailData.checkInEdit && props.detailData.checkOutEdit) {
+ if (props.detailData) {
+ if (props.detailData.checkInEdit) {
formData.checkIn = props.detailData.startTimeMorning;
formData.checkOut = props.detailData.endTimeAfternoon;
} else if (
diff --git a/src/modules/09_leave/components/04_SpecialTime/DialogMultipleApprove.vue b/src/modules/09_leave/components/04_SpecialTime/DialogMultipleApprove.vue
deleted file mode 100644
index 0caf9f339..000000000
--- a/src/modules/09_leave/components/04_SpecialTime/DialogMultipleApprove.vue
+++ /dev/null
@@ -1,344 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
-
-
- {{ parseInt(value + 543) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- *หมายเหตุเลือกทั้งหมดเฉพาะรายการที่แสดงเท่านั้น
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ props.rowIndex + 1 }}
-
-
- {{ col.value ?? "-" }}
-
-
- {{ col.value ?? "-" }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- บันทึก
-
-
-
-
-
-
-
-
diff --git a/src/modules/09_leave/components/05_Leave/Calendar.vue b/src/modules/09_leave/components/05_Leave/Calendar.vue
index eff336884..14665b235 100644
--- a/src/modules/09_leave/components/05_Leave/Calendar.vue
+++ b/src/modules/09_leave/components/05_Leave/Calendar.vue
@@ -228,12 +228,8 @@ onMounted(async () => {