Compare commits
No commits in common. "dev" and "v1.1.98" have entirely different histories.
108 changed files with 387 additions and 2568 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -194,7 +194,6 @@ export default {
|
||||||
`${orgProfile}${type}/profileid/position`,
|
`${orgProfile}${type}/profileid/position`,
|
||||||
uploadProfile: (type: string, id: string) =>
|
uploadProfile: (type: string, id: string) =>
|
||||||
`${organization}/upload/${type}-profileSalaryTemp/${id}`,
|
`${organization}/upload/${type}-profileSalaryTemp/${id}`,
|
||||||
sortOrderByDate: `${orgProfile}/salaryTemp/sort-order`,
|
|
||||||
|
|
||||||
workflowCommanderOperate: `${workflow}/commander/operate`,
|
workflowCommanderOperate: `${workflow}/commander/operate`,
|
||||||
workflowCommanderSign: `${workflow}/commander/sign`,
|
workflowCommanderSign: `${workflow}/commander/sign`,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ export default {
|
||||||
specialTime: () => `${leave}/admin/edit`,
|
specialTime: () => `${leave}/admin/edit`,
|
||||||
specialTimeApprove: (id: string) => `${leave}/admin/edit/approve/${id}`,
|
specialTimeApprove: (id: string) => `${leave}/admin/edit/approve/${id}`,
|
||||||
specialTimeReject: (id: string) => `${leave}/admin/edit/reject/${id}`,
|
specialTimeReject: (id: string) => `${leave}/admin/edit/reject/${id}`,
|
||||||
specialTimeApproveLists: `${leave}/admin/edit/approve-list`,
|
|
||||||
|
|
||||||
/** รายการลา*/
|
/** รายการลา*/
|
||||||
leaveType: () => `${leave}/type`,
|
leaveType: () => `${leave}/type`,
|
||||||
|
|
@ -64,5 +63,4 @@ export default {
|
||||||
`${leave}/report/download/time-records/${type}`,
|
`${leave}/report/download/time-records/${type}`,
|
||||||
|
|
||||||
leaveTask: `${leave}/admin/leave-task/process`,
|
leaveTask: `${leave}/admin/leave-task/process`,
|
||||||
leavePendingJobs: `${leave}/pending-jobs/`,
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -98,9 +98,6 @@ export default {
|
||||||
`${env.API_URI}/placement/candidate/pdf/${candidateId}`,
|
`${env.API_URI}/placement/candidate/pdf/${candidateId}`,
|
||||||
|
|
||||||
downloadCandidateExam: (id: string) =>
|
downloadCandidateExam: (id: string) =>
|
||||||
`${exam_report}candidate/candidate-new/${id}`,
|
`${periodExam}download/candidate-exam/${id}`,
|
||||||
downloadPassExam: (id: string) => `${periodExam}download/pass-exam/${id}`,
|
downloadPassExam: (id: string) => `${periodExam}download/pass-exam/${id}`,
|
||||||
|
|
||||||
downloadCandidatePassExam: (id: string) =>
|
|
||||||
`${exam_report}candidate/pass-new/${id}`,
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import config from "@/app.config";
|
||||||
import type { PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
import type { FormProfile } from "@/interface/main";
|
import type { FormProfile } from "@/interface/main";
|
||||||
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
||||||
import avatarMain from "@/assets/avatar_user.jpg";
|
|
||||||
|
|
||||||
/** importComponents*/
|
/** importComponents*/
|
||||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||||
|
|
@ -92,11 +91,8 @@ function fetchProfile(id: string, name: string) {
|
||||||
if (profile.avatar === "") {
|
if (profile.avatar === "") {
|
||||||
http
|
http
|
||||||
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, `${name}`))
|
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, `${name}`))
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
profile.avatar = res.data.downloadUrl;
|
profile.avatar = res.data.downloadUrl;
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
profile.avatar = avatarMain;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,6 @@
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
@click="close"
|
@click="close"
|
||||||
@keydown.enter.prevent
|
|
||||||
@keydown.space.prevent
|
|
||||||
style="color: #ff8080; background-color: #ffdede"
|
style="color: #ff8080; background-color: #ffdede"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useStructureTree } from "@/stores/structureTree";
|
import { useStructureTree } from "@/stores/structureTree";
|
||||||
import { formatPosmasterNo } from "@/utils/function";
|
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -263,7 +262,6 @@ async function getDataTable(id: string, level: number = 0) {
|
||||||
posType: posType.value ? posType.value : "",
|
posType: posType.value ? posType.value : "",
|
||||||
isAll: isAll.value,
|
isAll: isAll.value,
|
||||||
isBlank: isBlank.value,
|
isBlank: isBlank.value,
|
||||||
profileId: type.value === "MOVE" ? props.dataRows.profileId : undefined,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
await http
|
await http
|
||||||
|
|
@ -284,12 +282,12 @@ async function getDataTable(id: string, level: number = 0) {
|
||||||
const listPosNo: DataPositionNo[] = dataMain.map((e: PositionMain) => ({
|
const listPosNo: DataPositionNo[] = dataMain.map((e: PositionMain) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
isPosition: e.isPosition,
|
isPosition: e.isPosition,
|
||||||
posMasterNo: formatPosmasterNo(
|
posMasterNo:
|
||||||
e.orgShortname,
|
e.orgShortname +
|
||||||
e.posMasterNoPrefix,
|
(e.posMasterNoPrefix != null ? e.posMasterNoPrefix : "") +
|
||||||
e.posMasterNo.toString(),
|
" " +
|
||||||
e.posMasterNoSuffix
|
e.posMasterNo +
|
||||||
),
|
(e.posMasterNoSuffix != null ? e.posMasterNoSuffix : ""),
|
||||||
positionName: e.positionName,
|
positionName: e.positionName,
|
||||||
posTypeName: e.posTypeName,
|
posTypeName: e.posTypeName,
|
||||||
posLevelName: e.posLevelName,
|
posLevelName: e.posLevelName,
|
||||||
|
|
@ -514,7 +512,6 @@ function onSubmit() {
|
||||||
posLevelId: selectedPos.value[0].posLevelId, //ชื่อตำแหน่ง
|
posLevelId: selectedPos.value[0].posLevelId, //ชื่อตำแหน่ง
|
||||||
posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง
|
posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง
|
||||||
posExecutiveName: selectedPos.value[0].posExecutiveName, //ชื่อตำแหน่ง
|
posExecutiveName: selectedPos.value[0].posExecutiveName, //ชื่อตำแหน่ง
|
||||||
posExecutiveId: selectedPos.value[0].posExecutiveId, //ชื่อตำแหน่ง
|
|
||||||
reportingDate: convertDateToAPI(datePos.value),
|
reportingDate: convertDateToAPI(datePos.value),
|
||||||
posmasterId: dataPosMaster.id,
|
posmasterId: dataPosMaster.id,
|
||||||
typeCommand: type.value,
|
typeCommand: type.value,
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useStructureTree } from "@/stores/structureTree";
|
import { useStructureTree } from "@/stores/structureTree";
|
||||||
import { formatPosmasterNo } from "@/utils/function";
|
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -233,8 +232,7 @@ function close() {
|
||||||
|
|
||||||
async function getDataTable(id: string, level: number = 0) {
|
async function getDataTable(id: string, level: number = 0) {
|
||||||
showLoader();
|
showLoader();
|
||||||
positionNo.value = [];
|
|
||||||
rowsData.value = [];
|
|
||||||
const body = {
|
const body = {
|
||||||
node: level,
|
node: level,
|
||||||
nodeId: id,
|
nodeId: id,
|
||||||
|
|
@ -264,12 +262,11 @@ async function getDataTable(id: string, level: number = 0) {
|
||||||
const listPosNo: DataPositionNo[] = dataMain.map((e: PositionMain) => ({
|
const listPosNo: DataPositionNo[] = dataMain.map((e: PositionMain) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
isPosition: e.isPosition,
|
isPosition: e.isPosition,
|
||||||
posMasterNo: formatPosmasterNo(
|
posMasterNo:
|
||||||
e.orgShortname,
|
e.orgShortname +
|
||||||
e.posMasterNoPrefix,
|
(e.posMasterNoPrefix != null ? e.posMasterNoPrefix : "") +
|
||||||
e.posMasterNo.toString(),
|
e.posMasterNo +
|
||||||
e.posMasterNoSuffix
|
(e.posMasterNoSuffix != null ? e.posMasterNoSuffix : ""),
|
||||||
),
|
|
||||||
positionName: e.positionName,
|
positionName: e.positionName,
|
||||||
posTypeName: e.posTypeName,
|
posTypeName: e.posTypeName,
|
||||||
posLevelName: e.posLevelName,
|
posLevelName: e.posLevelName,
|
||||||
|
|
@ -305,7 +302,9 @@ async function getDataTable(id: string, level: number = 0) {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
setTimeout(() => {
|
||||||
|
hideLoader();
|
||||||
|
}, 1000);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ import type {
|
||||||
GovermentEmpTemp,
|
GovermentEmpTemp,
|
||||||
} from "@/components/information/interface/response/Government";
|
} from "@/components/information/interface/response/Government";
|
||||||
import type { Avatar } from "@/components/information/interface/response/avatar";
|
import type { Avatar } from "@/components/information/interface/response/avatar";
|
||||||
import avatarMain from "@/assets/avatar_user.jpg";
|
|
||||||
|
|
||||||
/** importStore*/
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
@ -168,9 +167,9 @@ async function fetchInformation(id: string) {
|
||||||
avatar.position = data.position ? data.position : "-";
|
avatar.position = data.position ? data.position : "-";
|
||||||
//ถ้ามีรูปเรียก Function fetchProfile เรียกข้อมูลรูปโปรไฟล์
|
//ถ้ามีรูปเรียก Function fetchProfile เรียกข้อมูลรูปโปรไฟล์
|
||||||
if (data.avatarName) {
|
if (data.avatarName) {
|
||||||
fetchProfile(data.id as string, data.avatarName);
|
await fetchProfile(data.id as string, data.avatarName);
|
||||||
} else {
|
} else {
|
||||||
avatar.avatar = avatarMain;
|
avatar.avatar = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.id) {
|
if (props.id) {
|
||||||
|
|
@ -261,14 +260,11 @@ async function fetchProfileGovTemp(id: string) {
|
||||||
* @param id profileID
|
* @param id profileID
|
||||||
* @param avatarName ชื่อไฟล์
|
* @param avatarName ชื่อไฟล์
|
||||||
*/
|
*/
|
||||||
function fetchProfile(id: string, avatarName: string) {
|
async function fetchProfile(id: string, avatarName: string) {
|
||||||
http
|
await http
|
||||||
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, avatarName))
|
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, avatarName))
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
avatar.avatar = res.data.downloadUrl;
|
avatar.avatar = await res.data.downloadUrl;
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
avatar.avatar = avatarMain;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,11 +89,6 @@ const formData = reactive<FormDataAgency>({
|
||||||
DIVISION_CODE: "",
|
DIVISION_CODE: "",
|
||||||
SECTION_CODE: "",
|
SECTION_CODE: "",
|
||||||
JOB_CODE: "",
|
JOB_CODE: "",
|
||||||
ROOT_CODE: "",
|
|
||||||
CHILD1_CODE: "",
|
|
||||||
CHILD2_CODE: "",
|
|
||||||
CHILD3_CODE: "",
|
|
||||||
CHILD4_CODE: "",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -165,11 +160,6 @@ function onSubmit() {
|
||||||
DIVISION_CODE: formData.DIVISION_CODE,
|
DIVISION_CODE: formData.DIVISION_CODE,
|
||||||
SECTION_CODE: formData.SECTION_CODE,
|
SECTION_CODE: formData.SECTION_CODE,
|
||||||
JOB_CODE: formData.JOB_CODE,
|
JOB_CODE: formData.JOB_CODE,
|
||||||
ROOT_CODE: formData.ROOT_CODE,
|
|
||||||
CHILD1_CODE: formData.CHILD1_CODE,
|
|
||||||
CHILD2_CODE: formData.CHILD2_CODE,
|
|
||||||
CHILD3_CODE: formData.CHILD3_CODE,
|
|
||||||
CHILD4_CODE: formData.CHILD4_CODE,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// เพิ่มข้อมูล
|
// เพิ่มข้อมูล
|
||||||
|
|
@ -199,20 +189,18 @@ function onSubmit() {
|
||||||
body
|
body
|
||||||
)
|
)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await Promise.all([
|
await props.fetchDataTree(store.draftId);
|
||||||
await props.fetchDataTree(store.draftId),
|
await props.edit?.(
|
||||||
await props.edit?.(
|
props.dataNode?.orgTreeId,
|
||||||
props.dataNode?.orgTreeId,
|
type,
|
||||||
type,
|
body,
|
||||||
body,
|
props.dataNode?.orgRootCode
|
||||||
props.dataNode?.orgRootCode
|
);
|
||||||
),
|
await props.fetchDataTable(
|
||||||
await props.fetchDataTable(
|
props?.dataNode?.orgTreeId,
|
||||||
props?.dataNode?.orgTreeId,
|
props?.dataNode?.orgLevel,
|
||||||
props?.dataNode?.orgLevel,
|
false
|
||||||
false
|
);
|
||||||
),
|
|
||||||
]);
|
|
||||||
await success($q, "บันทึกข้อมูลสำเร็จ");
|
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
closeClear();
|
closeClear();
|
||||||
})
|
})
|
||||||
|
|
@ -243,11 +231,6 @@ function closeClear() {
|
||||||
formData.isCommission = false;
|
formData.isCommission = false;
|
||||||
formData.isInformation = false;
|
formData.isInformation = false;
|
||||||
formData.misId = "";
|
formData.misId = "";
|
||||||
formData.ROOT_CODE = "";
|
|
||||||
formData.CHILD1_CODE = "";
|
|
||||||
formData.CHILD2_CODE = "";
|
|
||||||
formData.CHILD3_CODE = "";
|
|
||||||
formData.CHILD4_CODE = "";
|
|
||||||
formData.DEPARTMENT_CODE = "";
|
formData.DEPARTMENT_CODE = "";
|
||||||
formData.DIVISION_CODE = "";
|
formData.DIVISION_CODE = "";
|
||||||
formData.SECTION_CODE = "";
|
formData.SECTION_CODE = "";
|
||||||
|
|
@ -473,7 +456,6 @@ watch(
|
||||||
else {
|
else {
|
||||||
props.dataNode?.orgLevel === 1 && checkOfficer();
|
props.dataNode?.orgLevel === 1 && checkOfficer();
|
||||||
if (props.dataNode) {
|
if (props.dataNode) {
|
||||||
console.log(props.dataNode);
|
|
||||||
formData.orgName = props.dataNode.orgTreeName;
|
formData.orgName = props.dataNode.orgTreeName;
|
||||||
formData.orgShortName = props.dataNode.orgTreeShortName;
|
formData.orgShortName = props.dataNode.orgTreeShortName;
|
||||||
formData.orgCode = props.dataNode.orgTreeCode;
|
formData.orgCode = props.dataNode.orgTreeCode;
|
||||||
|
|
@ -492,11 +474,6 @@ watch(
|
||||||
formData.DIVISION_CODE = props.dataNode.DIVISION_CODE;
|
formData.DIVISION_CODE = props.dataNode.DIVISION_CODE;
|
||||||
formData.SECTION_CODE = props.dataNode.SECTION_CODE;
|
formData.SECTION_CODE = props.dataNode.SECTION_CODE;
|
||||||
formData.JOB_CODE = props.dataNode.JOB_CODE;
|
formData.JOB_CODE = props.dataNode.JOB_CODE;
|
||||||
formData.ROOT_CODE = props.dataNode.ROOT_CODE;
|
|
||||||
formData.CHILD1_CODE = props.dataNode.CHILD1_CODE;
|
|
||||||
formData.CHILD2_CODE = props.dataNode.CHILD2_CODE;
|
|
||||||
formData.CHILD3_CODE = props.dataNode.CHILD3_CODE;
|
|
||||||
formData.CHILD4_CODE = props.dataNode.CHILD4_CODE;
|
|
||||||
orgLevelOption.value =
|
orgLevelOption.value =
|
||||||
props.dataNode.orgTreeRank === "DEPARTMENT"
|
props.dataNode.orgTreeRank === "DEPARTMENT"
|
||||||
? orgLevelOptionMain.value
|
? orgLevelOptionMain.value
|
||||||
|
|
@ -753,66 +730,6 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
|
||||||
<div class="col-12 row q-col-gutter-sm">
|
|
||||||
<div class="col">
|
|
||||||
<q-input
|
|
||||||
v-model="formData.ROOT_CODE"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
label="ROOT CODE"
|
|
||||||
hide-bottom-space
|
|
||||||
:class="classInput(false)"
|
|
||||||
maxlength="3"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<q-input
|
|
||||||
v-model="formData.CHILD1_CODE"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
label="CHILD1 CODE"
|
|
||||||
hide-bottom-space
|
|
||||||
:class="classInput(false)"
|
|
||||||
maxlength="3"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<q-input
|
|
||||||
v-model="formData.CHILD2_CODE"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
label="CHILD2 CODE"
|
|
||||||
hide-bottom-space
|
|
||||||
:class="classInput(false)"
|
|
||||||
maxlength="3"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<q-input
|
|
||||||
v-model="formData.CHILD3_CODE"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
label="CHILD3 CODE"
|
|
||||||
hide-bottom-space
|
|
||||||
:class="classInput(false)"
|
|
||||||
maxlength="3"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<q-input
|
|
||||||
v-model="formData.CHILD4_CODE"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
label="CHILD4 CODE"
|
|
||||||
hide-bottom-space
|
|
||||||
:class="classInput(false)"
|
|
||||||
maxlength="3"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
v-model="formData.responsibility"
|
v-model="formData.responsibility"
|
||||||
|
|
|
||||||
|
|
@ -213,9 +213,7 @@ function formatHistoryOwnerData(data: HistoryPos[]) {
|
||||||
return data.map((item) => ({
|
return data.map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
fullname: item.firstName
|
fullname: item.firstName
|
||||||
? `${item.prefix || ""}${item.firstName || ""} ${
|
? `${item.prefix}${item.firstName} ${item.lastName}`.trim()
|
||||||
item.lastName || ""
|
|
||||||
}`.trim()
|
|
||||||
: "ว่าง",
|
: "ว่าง",
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
@ -277,7 +275,7 @@ watch(
|
||||||
(store.typeOrganizational === "draft" ||
|
(store.typeOrganizational === "draft" ||
|
||||||
store.typeOrganizational === "old")
|
store.typeOrganizational === "old")
|
||||||
? "2 (ปัจจุบัน)"
|
? "2 (ปัจจุบัน)"
|
||||||
: props.rowIndex + 1
|
: props.rowIndex + 1
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ const modal = defineModel<boolean>("modal", { required: true });
|
||||||
let reqMaster = defineModel<FilterMaster>("reqMaster", { required: true });
|
let reqMaster = defineModel<FilterMaster>("reqMaster", { required: true });
|
||||||
const totalPage = defineModel<number>("totalPage", { required: true });
|
const totalPage = defineModel<number>("totalPage", { required: true });
|
||||||
const nodeTree = defineModel<OrgTree[]>("nodeTree", { required: true });
|
const nodeTree = defineModel<OrgTree[]>("nodeTree", { required: true });
|
||||||
const columns = defineModel<QTableProps['columns']>("columns", {});
|
const columns = defineModel<QTableProps[]>("columns", {});
|
||||||
const rows = defineModel<PosMaster2[]>("rows", { required: true });
|
const rows = defineModel<PosMaster2[]>("rows", { required: true });
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataTree: {
|
fetchDataTree: {
|
||||||
|
|
|
||||||
|
|
@ -36,11 +36,6 @@ const formData = reactive({
|
||||||
responsibility: "", //หน้าที่ความรับผิดชอบ
|
responsibility: "", //หน้าที่ความรับผิดชอบ
|
||||||
isCommission: "", //สำนักปลัด
|
isCommission: "", //สำนักปลัด
|
||||||
isDeputy: "", //สำนักงาน กก.
|
isDeputy: "", //สำนักงาน กก.
|
||||||
rootCode: "", //ROOT CODE
|
|
||||||
child1Code: "", //CHILD1 CODE
|
|
||||||
child2Code: "", //CHILD2 CODE
|
|
||||||
child3Code: "", //CHILD3 CODE
|
|
||||||
child4Code: "", //CHILD4 CODE
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -81,11 +76,6 @@ async function fetchDetailTree(id: string, type: string) {
|
||||||
formData.responsibility = data.responsibility ? data.responsibility : "-";
|
formData.responsibility = data.responsibility ? data.responsibility : "-";
|
||||||
formData.isDeputy = data.isDeputy ? "ใช่" : "-";
|
formData.isDeputy = data.isDeputy ? "ใช่" : "-";
|
||||||
formData.isCommission = data.isCommission ? "ใช่" : "-";
|
formData.isCommission = data.isCommission ? "ใช่" : "-";
|
||||||
formData.rootCode = data.ROOT_CODE ? data.ROOT_CODE : "-";
|
|
||||||
formData.child1Code = data.CHILD1_CODE ? data.CHILD1_CODE : "-";
|
|
||||||
formData.child2Code = data.CHILD2_CODE ? data.CHILD2_CODE : "-";
|
|
||||||
formData.child3Code = data.CHILD3_CODE ? data.CHILD3_CODE : "-";
|
|
||||||
formData.child4Code = data.CHILD4_CODE ? data.CHILD4_CODE : "-";
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -218,41 +208,6 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row q-col-gutter-sm q-mb-xs">
|
|
||||||
<div class="col-4 text-bold">ROOT CODE</div>
|
|
||||||
<div class="col-8 text-grey-8">
|
|
||||||
<p>{{ formData.rootCode }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row q-col-gutter-sm q-mb-xs">
|
|
||||||
<div class="col-4 text-bold">CHILD1 CODE</div>
|
|
||||||
<div class="col-8 text-grey-8">
|
|
||||||
<p>{{ formData.child1Code }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row q-col-gutter-sm q-mb-xs">
|
|
||||||
<div class="col-4 text-bold">CHILD2 CODE</div>
|
|
||||||
<div class="col-8 text-grey-8">
|
|
||||||
<p>{{ formData.child2Code }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row q-col-gutter-sm q-mb-xs">
|
|
||||||
<div class="col-4 text-bold">CHILD3 CODE</div>
|
|
||||||
<div class="col-8 text-grey-8">
|
|
||||||
<p>{{ formData.child3Code }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row q-col-gutter-sm q-mb-xs">
|
|
||||||
<div class="col-4 text-bold">CHILD4 CODE</div>
|
|
||||||
<div class="col-8 text-grey-8">
|
|
||||||
<p>{{ formData.child4Code }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row q-col-gutter-sm q-mb-xs">
|
<div class="row q-col-gutter-sm q-mb-xs">
|
||||||
<div class="col-4 text-bold">หน้าที่ความรับผิดชอบ</div>
|
<div class="col-4 text-bold">หน้าที่ความรับผิดชอบ</div>
|
||||||
<div class="col-8 text-grey-8">
|
<div class="col-8 text-grey-8">
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import { checkPermission } from "@/utils/permissions";
|
||||||
import { updateCurrentPage } from "@/utils/function";
|
import { updateCurrentPage } from "@/utils/function";
|
||||||
import { useOrganizational } from "@/modules/02_organization/store/organizational";
|
import { useOrganizational } from "@/modules/02_organization/store/organizational";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { formatPosmasterNo } from "@/utils/function";
|
|
||||||
|
|
||||||
/** importType*/
|
/** importType*/
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
@ -206,14 +205,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "posMasterNo",
|
field: "posMasterNo",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
format(val, row) {
|
|
||||||
return formatPosmasterNo(
|
|
||||||
row.orgShortname,
|
|
||||||
row.posMasterNoPrefix,
|
|
||||||
row.posMasterNoMain,
|
|
||||||
row.posMasterNoSuffix
|
|
||||||
);
|
|
||||||
},
|
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1133,7 +1124,7 @@ watch(
|
||||||
<DialogMovePos
|
<DialogMovePos
|
||||||
v-model:modal="modalDialogMMove"
|
v-model:modal="modalDialogMMove"
|
||||||
v-model:nodeTree="nodeTree"
|
v-model:nodeTree="nodeTree"
|
||||||
v-model:columns="columns"
|
v-model:columns="columns as QTableProps[]"
|
||||||
v-model:rows="posMaster"
|
v-model:rows="posMaster"
|
||||||
v-model:totalPage="totalPage"
|
v-model:totalPage="totalPage"
|
||||||
v-model:reqMaster="reqMaster"
|
v-model:reqMaster="reqMaster"
|
||||||
|
|
|
||||||
|
|
@ -44,11 +44,6 @@ interface FormDataAgency {
|
||||||
DIVISION_CODE: string;
|
DIVISION_CODE: string;
|
||||||
SECTION_CODE: string;
|
SECTION_CODE: string;
|
||||||
JOB_CODE: string;
|
JOB_CODE: string;
|
||||||
ROOT_CODE: string;
|
|
||||||
CHILD1_CODE: string;
|
|
||||||
CHILD2_CODE: string;
|
|
||||||
CHILD3_CODE: string;
|
|
||||||
CHILD4_CODE: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface FormDataPosition {
|
interface FormDataPosition {
|
||||||
|
|
|
||||||
|
|
@ -108,11 +108,6 @@ export const useOrganizational = defineStore("organizationalStore", () => {
|
||||||
posLevelName: e.isSit ? e.profilePoslevel : e.posLevelName,
|
posLevelName: e.isSit ? e.profilePoslevel : e.posLevelName,
|
||||||
posExecutiveName: e.posExecutiveName,
|
posExecutiveName: e.posExecutiveName,
|
||||||
isSit: e.isSit,
|
isSit: e.isSit,
|
||||||
orgShortname: e.orgShortname,
|
|
||||||
posMasterNoPrefix: e.posMasterNoPrefix,
|
|
||||||
posMasterNoSuffix: e.posMasterNoSuffix,
|
|
||||||
posMasterNoMain: e.posMasterNo,
|
|
||||||
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return newPosMaster || [];
|
return newPosMaster || [];
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,6 @@ const optionsStatus = ref<ExamResultOption[]>([
|
||||||
{ label: "ขาดสอบ", value: "missed_exam" },
|
{ label: "ขาดสอบ", value: "missed_exam" },
|
||||||
{ label: "ผ่าน", value: "pass" },
|
{ label: "ผ่าน", value: "pass" },
|
||||||
{ label: "ไม่ผ่าน", value: "notpass" },
|
{ label: "ไม่ผ่าน", value: "notpass" },
|
||||||
{ label: "อื่น ๆ", value: "other" },
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
|
|
|
||||||
|
|
@ -363,59 +363,37 @@ async function downloadFileDashboard() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function clickPassExam() {
|
async function clickPassExam() {
|
||||||
try {
|
showLoader();
|
||||||
showLoader();
|
await http
|
||||||
const res = await http.get(
|
.get(config.API.downloadPassExam(examId.value))
|
||||||
config.API.downloadCandidatePassExam(examId.value),
|
.then(async (res) => {
|
||||||
{
|
const data = res.data.result;
|
||||||
headers: {
|
data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`;
|
||||||
"Content-Type": "application/pdf",
|
await genReport(data, data.reportName, "pdf");
|
||||||
Accept: "application/pdf",
|
})
|
||||||
},
|
.catch((e) => {
|
||||||
responseType: "blob",
|
messageError($q, e);
|
||||||
}
|
})
|
||||||
);
|
.finally(() => {
|
||||||
const url = window.URL.createObjectURL(new Blob([res.data]));
|
hideLoader();
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function clickCandidateList() {
|
async function clickCandidateList() {
|
||||||
try {
|
showLoader();
|
||||||
showLoader();
|
await http
|
||||||
const res = await http.get(config.API.downloadCandidateExam(examId.value), {
|
.get(config.API.downloadCandidateExam(examId.value))
|
||||||
headers: {
|
.then(async (res) => {
|
||||||
"Content-Type": "application/pdf",
|
const data = res.data.result;
|
||||||
Accept: "application/pdf",
|
data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`;
|
||||||
},
|
await genReport(data, data.reportName, "pdf");
|
||||||
responseType: "blob",
|
})
|
||||||
|
.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() {
|
async function onCheckShowExaminfo() {
|
||||||
|
|
@ -571,20 +549,8 @@ watch(
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn icon="mdi-download" round color="green-6" flat>
|
||||||
icon="mdi-download"
|
<q-tooltip>ดาวน์โหลดไฟล์</q-tooltip>
|
||||||
round
|
|
||||||
color="green-6"
|
|
||||||
flat
|
|
||||||
:disable="attrs.rows.length === 0"
|
|
||||||
>
|
|
||||||
<q-tooltip>
|
|
||||||
{{
|
|
||||||
attrs.rows.length !== 0
|
|
||||||
? "ดาวน์โหลดไฟล์"
|
|
||||||
: "ไม่มีข้อมูลผู้สอบคัดเลือก"
|
|
||||||
}}</q-tooltip
|
|
||||||
>
|
|
||||||
<q-menu>
|
<q-menu>
|
||||||
<q-list style="min-width: 100px">
|
<q-list style="min-width: 100px">
|
||||||
<!-- <q-item clickable v-close-popup @click="downloadFileDashboard">
|
<!-- <q-item clickable v-close-popup @click="downloadFileDashboard">
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,6 @@ interface RequestPeriodCompete {
|
||||||
order: number;
|
order: number;
|
||||||
year: number;
|
year: number;
|
||||||
announcementDate: string | null;
|
announcementDate: string | null;
|
||||||
rootDnaId: string;
|
|
||||||
scoreExpireDate: string | null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface RequestPeriodDisable {
|
interface RequestPeriodDisable {
|
||||||
|
|
@ -65,8 +63,6 @@ interface RequestPeriodDisable {
|
||||||
round: number;
|
round: number;
|
||||||
year: number;
|
year: number;
|
||||||
announcementDate: string | null;
|
announcementDate: string | null;
|
||||||
rootDnaId: string;
|
|
||||||
scoreExpireDate: string | null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface RequestPosition {
|
interface RequestPosition {
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ export default [
|
||||||
component: PeriodDisable,
|
component: PeriodDisable,
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: "SYS_EXAM_SELECT_PERIOD_DIS",
|
Key: "SYS_EXAM_SELECT_LISTNAME",
|
||||||
Role: "STAFF",
|
Role: "STAFF",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -242,7 +242,7 @@ export default [
|
||||||
component: PeriodDisableAdd,
|
component: PeriodDisableAdd,
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: "SYS_EXAM_SELECT_PERIOD_DIS",
|
Key: "SYS_EXAM_SELECT_LISTNAME",
|
||||||
Role: "STAFF",
|
Role: "STAFF",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -252,7 +252,7 @@ export default [
|
||||||
component: PeriodDisableAdd,
|
component: PeriodDisableAdd,
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: "SYS_EXAM_SELECT_PERIOD_DIS",
|
Key: "SYS_EXAM_SELECT_LISTNAME",
|
||||||
Role: "STAFF",
|
Role: "STAFF",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -262,7 +262,7 @@ export default [
|
||||||
component: MainDisableDetail,
|
component: MainDisableDetail,
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: "SYS_EXAM_SELECT_PERIOD_DIS",
|
Key: "SYS_EXAM_SELECT_LISTNAME",
|
||||||
Role: "STAFF",
|
Role: "STAFF",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -272,7 +272,7 @@ export default [
|
||||||
component: MainDisableEx,
|
component: MainDisableEx,
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: "SYS_EXAM_SELECT_PERIOD_DIS",
|
Key: "SYS_EXAM_SELECT_LISTNAME",
|
||||||
Role: "STAFF",
|
Role: "STAFF",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!-- page:จัดการรอบการสอบ สรรหา -->
|
<!-- page:จัดการรอบการสอบ สรรหา -->
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import { onMounted, ref, watch } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import genReport from "@/plugins/genreport";
|
import genReport from "@/plugins/genreport";
|
||||||
|
|
@ -12,8 +12,6 @@ import { checkPermission } from "@/utils/permissions";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { calculateFiscalYear } from "@/utils/function";
|
import { calculateFiscalYear } from "@/utils/function";
|
||||||
import { useUploadProgressStore } from "@/stores/uploadProgress";
|
import { useUploadProgressStore } from "@/stores/uploadProgress";
|
||||||
import { useSocketStore } from "@/stores/socket";
|
|
||||||
import { storeToRefs } from "pinia";
|
|
||||||
|
|
||||||
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
|
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -41,9 +39,6 @@ const {
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const uploadProgress = useUploadProgressStore();
|
const uploadProgress = useUploadProgressStore();
|
||||||
const socketStore = useSocketStore();
|
|
||||||
const { notificationCounter } = storeToRefs(socketStore);
|
|
||||||
|
|
||||||
const name = ref<string>("");
|
const name = ref<string>("");
|
||||||
const year = ref<number>(calculateFiscalYear(new Date()) + 543);
|
const year = ref<number>(calculateFiscalYear(new Date()) + 543);
|
||||||
const order = ref<number>(1);
|
const order = ref<number>(1);
|
||||||
|
|
@ -685,11 +680,6 @@ onMounted(async () => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
await fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
|
|
||||||
/** Watch notification counter on socket */
|
|
||||||
watch(notificationCounter, () => {
|
|
||||||
fetchData();
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,11 @@
|
||||||
import { onMounted, ref, watch, computed } from "vue";
|
import { onMounted, ref, watch, computed } from "vue";
|
||||||
import { useQuasar, QForm } from "quasar";
|
import { useQuasar, QForm } from "quasar";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { storeToRefs } from "pinia";
|
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { calculateFiscalYear } from "@/utils/function";
|
import { calculateFiscalYear } from "@/utils/function";
|
||||||
import { usePositionKeycloakStore } from "@/stores/positionKeycloak";
|
|
||||||
|
|
||||||
import type { RequestPeriodCompete } from "@/modules/03_recruiting/interface/request/Period";
|
import type { RequestPeriodCompete } from "@/modules/03_recruiting/interface/request/Period";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -18,7 +16,6 @@ import type {
|
||||||
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dataPositionKeycloak } = storeToRefs(usePositionKeycloakStore());
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const {
|
const {
|
||||||
|
|
@ -56,7 +53,6 @@ const fileImgDataUpload = ref<File[]>([]);
|
||||||
const fileImgs = ref<UploadType[]>([]);
|
const fileImgs = ref<UploadType[]>([]);
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
const scoreExpireDate = ref<Date | null>(null); //วันหมดอายุบัญชี
|
|
||||||
|
|
||||||
/** กลับไปหน้าหลัก */
|
/** กลับไปหน้าหลัก */
|
||||||
function clickBack() {
|
function clickBack() {
|
||||||
|
|
@ -102,7 +98,6 @@ async function fetchData() {
|
||||||
|
|
||||||
fileDocs.value = files;
|
fileDocs.value = files;
|
||||||
fileImgs.value = images;
|
fileImgs.value = images;
|
||||||
scoreExpireDate.value = data.scoreExpireDate;
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -258,11 +253,6 @@ function sendData() {
|
||||||
year: yearly.value,
|
year: yearly.value,
|
||||||
announcementDate:
|
announcementDate:
|
||||||
dateAnnounce.value !== null ? convertDateToAPI(dateAnnounce.value) : null,
|
dateAnnounce.value !== null ? convertDateToAPI(dateAnnounce.value) : null,
|
||||||
scoreExpireDate:
|
|
||||||
scoreExpireDate.value !== null
|
|
||||||
? convertDateToAPI(scoreExpireDate.value)
|
|
||||||
: null,
|
|
||||||
rootDnaId: !edit.value ? dataPositionKeycloak.value.rootDnaId : undefined,
|
|
||||||
};
|
};
|
||||||
return valueData;
|
return valueData;
|
||||||
}
|
}
|
||||||
|
|
@ -365,13 +355,6 @@ function dateThaiRange(val: [Date, Date]) {
|
||||||
return `${date2Thai(val[0], true)} - ${date2Thai(val[1], true)}`;
|
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) => {
|
watch(organizationShortName, (count: DataOption2, prevCount: DataOption2) => {
|
||||||
organizationNameOptions.value = [];
|
organizationNameOptions.value = [];
|
||||||
|
|
@ -468,7 +451,6 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</datepicker>
|
</datepicker>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-4 col-md-2" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-4 col-md-2" v-if="announcementExam">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -484,7 +466,6 @@ onMounted(async () => {
|
||||||
input-class="text-right"
|
input-class="text-right"
|
||||||
></q-input>
|
></q-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-4 col-md-3" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-4 col-md-3" v-if="announcementExam">
|
||||||
<datepicker
|
<datepicker
|
||||||
v-model="dateExam"
|
v-model="dateExam"
|
||||||
|
|
@ -520,7 +501,6 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</datepicker>
|
</datepicker>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
<datepicker
|
<datepicker
|
||||||
v-model="dateAnnouncement"
|
v-model="dateAnnouncement"
|
||||||
|
|
@ -563,7 +543,6 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</datepicker>
|
</datepicker>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
||||||
<datepicker
|
<datepicker
|
||||||
v-model="dateRegister"
|
v-model="dateRegister"
|
||||||
|
|
@ -589,7 +568,6 @@ onMounted(async () => {
|
||||||
dateRegister != null ? dateThaiRange(dateRegister) : null
|
dateRegister != null ? dateThaiRange(dateRegister) : null
|
||||||
"
|
"
|
||||||
:label="`${'วันที่สมัคร'}`"
|
:label="`${'วันที่สมัคร'}`"
|
||||||
hide-bottom-space
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
@ -603,7 +581,6 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</datepicker>
|
</datepicker>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="col-xs-12 col-sm-3 col-md-3"
|
class="col-xs-12 col-sm-3 col-md-3"
|
||||||
v-if="announcementExam && isFeeNotZero"
|
v-if="announcementExam && isFeeNotZero"
|
||||||
|
|
@ -633,7 +610,6 @@ onMounted(async () => {
|
||||||
"
|
"
|
||||||
:label="`${'วันที่ชำระเงิน'}`"
|
:label="`${'วันที่ชำระเงิน'}`"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ชำระเงิน'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ชำระเงิน'}`]"
|
||||||
hide-bottom-space
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
@ -656,7 +632,6 @@ onMounted(async () => {
|
||||||
borderless
|
borderless
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
@update:model-value="onUpdateScoreExpireDate"
|
|
||||||
>
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
|
|
@ -674,48 +649,6 @@ onMounted(async () => {
|
||||||
"
|
"
|
||||||
:label="`${'วันประกาศผลสอบ'}`"
|
:label="`${'วันประกาศผลสอบ'}`"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันประกาศผลสอบ'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันประกาศผลสอบ'}`]"
|
||||||
hide-bottom-space
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon
|
|
||||||
name="event"
|
|
||||||
class="cursor-pointer"
|
|
||||||
style="color: var(--q-primary)"
|
|
||||||
>
|
|
||||||
</q-icon>
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</template>
|
|
||||||
</datepicker>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
|
||||||
<datepicker
|
|
||||||
v-model="scoreExpireDate"
|
|
||||||
:locale="'th'"
|
|
||||||
autoApply
|
|
||||||
borderless
|
|
||||||
: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
|
|
||||||
class="full-width datepicker q-mb-md"
|
|
||||||
:model-value="
|
|
||||||
scoreExpireDate != null ? date2Thai(scoreExpireDate) : null
|
|
||||||
"
|
|
||||||
:label="`${'วันหมดอายุบัญชี'}`"
|
|
||||||
clearable
|
|
||||||
@clear="scoreExpireDate = null"
|
|
||||||
hide-bottom-space
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
|
||||||
|
|
@ -309,8 +309,8 @@ async function fetchData(actionType?: string) {
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
data.map((r: ResponseRecruitPeriod) => {
|
data.map((r: ResponseRecruitPeriod) => {
|
||||||
if (r.score != null) {
|
if (r.score != null) {
|
||||||
r.scoreCount = r.score.scoreCount ? r.score.scoreCount : 0;
|
r.scoreCount = r.score.scoreCount;
|
||||||
r.scoreImportDate = r.score.importDate ? r.score.importDate : "-";
|
r.scoreImportDate = r.score.importDate;
|
||||||
}
|
}
|
||||||
result.push(r);
|
result.push(r);
|
||||||
});
|
});
|
||||||
|
|
@ -715,11 +715,7 @@ onMounted(async () => {
|
||||||
<q-tooltip>นำเข้าไฟล์ผลคะแนนสอบ</q-tooltip>
|
<q-tooltip>นำเข้าไฟล์ผลคะแนนสอบ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{
|
{{ props.row.score.scoreCount.toLocaleString() }}
|
||||||
props.row.score
|
|
||||||
? props.row.score.scoreCount.toLocaleString()
|
|
||||||
: "-"
|
|
||||||
}}
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="checkPermission($route)?.attrIsUpdate"
|
v-if="checkPermission($route)?.attrIsUpdate"
|
||||||
dense
|
dense
|
||||||
|
|
@ -754,11 +750,7 @@ onMounted(async () => {
|
||||||
<q-tooltip>นำเข้าไฟล์ผลการสอบ (บัญชีรายชื่อ)</q-tooltip>
|
<q-tooltip>นำเข้าไฟล์ผลการสอบ (บัญชีรายชื่อ)</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{
|
{{ props.row.score.resultCount.toLocaleString() }}
|
||||||
props.row.score
|
|
||||||
? props.row.score.resultCount.toLocaleString()
|
|
||||||
: "-"
|
|
||||||
}}
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="checkPermission($route)?.attrIsUpdate"
|
v-if="checkPermission($route)?.attrIsUpdate"
|
||||||
dense
|
dense
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,11 @@
|
||||||
import { onMounted, ref, watch } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import { useQuasar, QForm } from "quasar";
|
import { useQuasar, QForm } from "quasar";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { storeToRefs } from "pinia";
|
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { calculateFiscalYear } from "@/utils/function";
|
import { calculateFiscalYear } from "@/utils/function";
|
||||||
import { usePositionKeycloakStore } from "@/stores/positionKeycloak";
|
|
||||||
|
|
||||||
import type { RequestPeriodDisable } from "@/modules/03_recruiting/interface/request/Period";
|
import type { RequestPeriodDisable } from "@/modules/03_recruiting/interface/request/Period";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -19,7 +17,6 @@ import type {
|
||||||
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dataPositionKeycloak } = storeToRefs(usePositionKeycloakStore());
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const {
|
const {
|
||||||
|
|
@ -47,7 +44,7 @@ const positionPathOptions = ref<DataOption2[]>([]);
|
||||||
const organizationShortName = ref<DataOption2>({ id: "", name: "" });
|
const organizationShortName = ref<DataOption2>({ id: "", name: "" });
|
||||||
const organizationName = ref<DataOption2>({ id: "", name: "" });
|
const organizationName = ref<DataOption2>({ id: "", name: "" });
|
||||||
const organizationNameOptions = ref<DataOption2[]>([]);
|
const organizationNameOptions = ref<DataOption2[]>([]);
|
||||||
const scoreExpireDate = ref<Date | null>(null); //วันหมดอายุบัญชี
|
|
||||||
const fileDocDataUpload = ref<File[]>([]);
|
const fileDocDataUpload = ref<File[]>([]);
|
||||||
const fileDocs = ref<UploadType[]>([]);
|
const fileDocs = ref<UploadType[]>([]);
|
||||||
const fileImgDataUpload = ref<File[]>([]);
|
const fileImgDataUpload = ref<File[]>([]);
|
||||||
|
|
@ -93,7 +90,6 @@ async function fetchData() {
|
||||||
data.announcementDate != null ? new Date(data.announcementDate) : null;
|
data.announcementDate != null ? new Date(data.announcementDate) : null;
|
||||||
fileDocs.value = data.documents;
|
fileDocs.value = data.documents;
|
||||||
fileImgs.value = data.images;
|
fileImgs.value = data.images;
|
||||||
scoreExpireDate.value = data.scoreExpireDate;
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -163,11 +159,6 @@ function sendData() {
|
||||||
year: yearly.value,
|
year: yearly.value,
|
||||||
announcementDate:
|
announcementDate:
|
||||||
dateAnnounce.value !== null ? convertDateToAPI(dateAnnounce.value) : null,
|
dateAnnounce.value !== null ? convertDateToAPI(dateAnnounce.value) : null,
|
||||||
rootDnaId: !edit.value ? dataPositionKeycloak.value.rootDnaId : undefined,
|
|
||||||
scoreExpireDate:
|
|
||||||
scoreExpireDate.value !== null
|
|
||||||
? convertDateToAPI(scoreExpireDate.value)
|
|
||||||
: null,
|
|
||||||
};
|
};
|
||||||
return valueData;
|
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) => {
|
watch(organizationShortName, (count: DataOption2, prevCount: DataOption2) => {
|
||||||
organizationNameOptions.value = [];
|
organizationNameOptions.value = [];
|
||||||
});
|
});
|
||||||
|
|
@ -403,7 +386,7 @@ onMounted(async () => {
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<q-card-section class="q-pa-md">
|
<q-card-section class="q-pa-md">
|
||||||
<div class="col-xs-12 col-sm-8"></div>
|
<div class="col-xs-12 col-sm-8"></div>
|
||||||
<div class="col-12 row q-col-gutter-sm">
|
<div class="col-12 row items-center q-col-gutter-x-sm">
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -415,10 +398,8 @@ onMounted(async () => {
|
||||||
(val:string) =>
|
(val:string) =>
|
||||||
!!val || `${'กรุณากรอกชื่อรอบคัดเลือก/ชื่อประกาศ'}`,
|
!!val || `${'กรุณากรอกชื่อรอบคัดเลือก/ชื่อประกาศ'}`,
|
||||||
]"
|
]"
|
||||||
hide-bottom-space
|
|
||||||
></q-input>
|
></q-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-4 col-md-1" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-4 col-md-1" v-if="announcementExam">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -428,10 +409,8 @@ onMounted(async () => {
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:rules="[(val:number) => val > 0 || `${'กรุณากรอกรอบการสอบให้ถูกต้อง'}`]"
|
:rules="[(val:number) => val > 0 || `${'กรุณากรอกรอบการสอบให้ถูกต้อง'}`]"
|
||||||
hide-bottom-space
|
|
||||||
></q-input>
|
></q-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-4 col-md-1" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-4 col-md-1" v-if="announcementExam">
|
||||||
<datepicker
|
<datepicker
|
||||||
v-model="yearly"
|
v-model="yearly"
|
||||||
|
|
@ -452,7 +431,6 @@ onMounted(async () => {
|
||||||
:model-value="yearly + 543"
|
:model-value="yearly + 543"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกปีงบประมาณ'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือกปีงบประมาณ'}`]"
|
||||||
:label="`${'ปีงบประมาณ'}`"
|
:label="`${'ปีงบประมาณ'}`"
|
||||||
hide-bottom-space
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
@ -478,7 +456,6 @@ onMounted(async () => {
|
||||||
:rules="[
|
:rules="[
|
||||||
(val:any) => val >= 0 || `${'กรุณากรอกค่าธรรมเนียมให้ถูกต้อง'}`,
|
(val:any) => val >= 0 || `${'กรุณากรอกค่าธรรมเนียมให้ถูกต้อง'}`,
|
||||||
]"
|
]"
|
||||||
hide-bottom-space
|
|
||||||
></q-input>
|
></q-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
||||||
|
|
@ -503,7 +480,6 @@ onMounted(async () => {
|
||||||
:model-value="dateExam != null ? date2Thai(dateExam) : null"
|
:model-value="dateExam != null ? date2Thai(dateExam) : null"
|
||||||
:label="`${'วันที่สอบ'}`"
|
:label="`${'วันที่สอบ'}`"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่สอบ'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่สอบ'}`]"
|
||||||
hide-bottom-space
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
@ -537,11 +513,10 @@ onMounted(async () => {
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
class="full-width datepicker"
|
class="full-width datepicker q-mb-md"
|
||||||
:model-value="dateThaiRange(dateAnnouncement)"
|
:model-value="dateThaiRange(dateAnnouncement)"
|
||||||
:label="`${'วันที่ประกาศ'}`"
|
:label="`${'วันที่ประกาศ'}`"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ประกาศ'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ประกาศ'}`]"
|
||||||
hide-bottom-space
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
@ -575,11 +550,10 @@ onMounted(async () => {
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
class="full-width datepicker"
|
class="full-width datepicker q-mb-md"
|
||||||
:model-value="dateThaiRange(dateRegister)"
|
:model-value="dateThaiRange(dateRegister)"
|
||||||
:label="`${'วันที่สมัคร'}`"
|
:label="`${'วันที่สมัคร'}`"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่สมัคร'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่สมัคร'}`]"
|
||||||
hide-bottom-space
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
@ -616,13 +590,12 @@ onMounted(async () => {
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
class="full-width datepicker"
|
class="full-width datepicker q-mb-md"
|
||||||
:model-value="
|
:model-value="
|
||||||
datePayment != null ? dateThaiRange(datePayment) : null
|
datePayment != null ? dateThaiRange(datePayment) : null
|
||||||
"
|
"
|
||||||
:label="`${'วันที่ชำระเงิน'}`"
|
:label="`${'วันที่ชำระเงิน'}`"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ชำระเงิน'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ชำระเงิน'}`]"
|
||||||
hide-bottom-space
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
@ -645,7 +618,6 @@ onMounted(async () => {
|
||||||
borderless
|
borderless
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
@update:model-value="onUpdateScoreExpireDate"
|
|
||||||
>
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
|
|
@ -657,54 +629,12 @@ onMounted(async () => {
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
class="full-width datepicker"
|
class="full-width datepicker q-mb-md"
|
||||||
:model-value="
|
:model-value="
|
||||||
dateAnnounce != null ? date2Thai(dateAnnounce) : null
|
dateAnnounce != null ? date2Thai(dateAnnounce) : null
|
||||||
"
|
"
|
||||||
:label="`${'วันประกาศผลสอบ'}`"
|
:label="`${'วันประกาศผลสอบ'}`"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันประกาศผลสอบ'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันประกาศผลสอบ'}`]"
|
||||||
hide-bottom-space
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon
|
|
||||||
name="event"
|
|
||||||
class="cursor-pointer"
|
|
||||||
style="color: var(--q-primary)"
|
|
||||||
>
|
|
||||||
</q-icon>
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</template>
|
|
||||||
</datepicker>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
|
||||||
<datepicker
|
|
||||||
v-model="scoreExpireDate"
|
|
||||||
:locale="'th'"
|
|
||||||
autoApply
|
|
||||||
borderless
|
|
||||||
: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
|
|
||||||
class="full-width datepicker"
|
|
||||||
:model-value="
|
|
||||||
scoreExpireDate != null ? date2Thai(scoreExpireDate) : null
|
|
||||||
"
|
|
||||||
:label="`${'วันหมดอายุบัญชี'}`"
|
|
||||||
clearable
|
|
||||||
@clear="scoreExpireDate = null"
|
|
||||||
hide-bottom-space
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,6 @@ const examTypeOptions = [
|
||||||
{ name: "แพทย์", id: "docter" },
|
{ name: "แพทย์", id: "docter" },
|
||||||
];
|
];
|
||||||
const category = ref<string>("");
|
const category = ref<string>("");
|
||||||
const scoreExpireDate = ref<Date | null>(null);
|
|
||||||
|
|
||||||
const fileDocDataUpload = ref<File[]>([]);
|
const fileDocDataUpload = ref<File[]>([]);
|
||||||
const fileDocs = ref<UploadType[]>([]);
|
const fileDocs = ref<UploadType[]>([]);
|
||||||
|
|
@ -334,7 +333,6 @@ async function fetchData() {
|
||||||
refNo1.value = data.refNo1;
|
refNo1.value = data.refNo1;
|
||||||
reason.value = data.reason;
|
reason.value = data.reason;
|
||||||
graduationYearLock.value = data.graduationYearLock;
|
graduationYearLock.value = data.graduationYearLock;
|
||||||
scoreExpireDate.value = data.scoreExpireDate;
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -508,10 +506,6 @@ function sendData() {
|
||||||
refNo1: refNo1.value,
|
refNo1: refNo1.value,
|
||||||
reason: reason.value,
|
reason: reason.value,
|
||||||
graduationYearLock: Number(graduationYearLock.value),
|
graduationYearLock: Number(graduationYearLock.value),
|
||||||
scoreExpireDate:
|
|
||||||
scoreExpireDate.value != null
|
|
||||||
? convertDateToAPI(scoreExpireDate.value)
|
|
||||||
: null,
|
|
||||||
};
|
};
|
||||||
return valueData;
|
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 () => {
|
onMounted(async () => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
if (route.params.id != undefined) {
|
if (route.params.id != undefined) {
|
||||||
|
|
@ -1256,7 +1242,6 @@ onMounted(async () => {
|
||||||
borderless
|
borderless
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
@update:model-value="onUpdateScoreExpireDate"
|
|
||||||
>
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
|
|
@ -1290,63 +1275,21 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</datepicker>
|
</datepicker>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row col-12" v-if="announcementExam">
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
<div class="col-xs-12 col-md-2">
|
||||||
<datepicker
|
<q-input
|
||||||
v-model="scoreExpireDate"
|
outlined
|
||||||
:locale="'th'"
|
v-model="graduationYearLock"
|
||||||
autoApply
|
label="ล็อกวันที่สำเร็จการศึกษา (ปี)"
|
||||||
:readonly="checkRoutePermisson"
|
dense
|
||||||
borderless
|
:readonly="checkRoutePermisson"
|
||||||
:enableTimePicker="false"
|
lazy-rules
|
||||||
week-start="0"
|
:rules="[
|
||||||
>
|
|
||||||
<template #year="{ year }">
|
|
||||||
{{ year + 543 }}
|
|
||||||
</template>
|
|
||||||
<template #year-overlay-value="{ value }">
|
|
||||||
{{ parseInt(value + 543) }}
|
|
||||||
</template>
|
|
||||||
<template #trigger>
|
|
||||||
<q-input
|
|
||||||
outlined
|
|
||||||
:readonly="checkRoutePermisson"
|
|
||||||
dense
|
|
||||||
class="full-width datepicker q-mb-md"
|
|
||||||
:model-value="
|
|
||||||
scoreExpireDate != null ? date2Thai(scoreExpireDate) : null
|
|
||||||
"
|
|
||||||
:label="`${'วันหมดอายุบัญชี'}`"
|
|
||||||
clearable
|
|
||||||
@clear="scoreExpireDate = null"
|
|
||||||
hide-bottom-space
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon
|
|
||||||
name="event"
|
|
||||||
class="cursor-pointer"
|
|
||||||
style="color: var(--q-primary)"
|
|
||||||
>
|
|
||||||
</q-icon>
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</template>
|
|
||||||
</datepicker>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-2 col-md-2" v-if="announcementExam">
|
|
||||||
<q-input
|
|
||||||
outlined
|
|
||||||
v-model="graduationYearLock"
|
|
||||||
label="ล็อกวันที่สำเร็จการศึกษา (ปี)"
|
|
||||||
dense
|
|
||||||
:readonly="checkRoutePermisson"
|
|
||||||
lazy-rules
|
|
||||||
:rules="[
|
|
||||||
(val:string) => !!val || `${'กรุณากรอกล็อกวันที่สำเร็จการศึกษา (ปี)'}`,
|
(val:string) => !!val || `${'กรุณากรอกล็อกวันที่สำเร็จการศึกษา (ปี)'}`,
|
||||||
]"
|
]"
|
||||||
type="number"
|
type="number"
|
||||||
></q-input>
|
></q-input>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12" v-if="announcementExam">
|
<div class="col-12" v-if="announcementExam">
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,9 @@ import type {
|
||||||
DisciplineOps,
|
DisciplineOps,
|
||||||
DataOption,
|
DataOption,
|
||||||
} from "@/modules/04_registryPerson/interface/index/discipline";
|
} from "@/modules/04_registryPerson/interface/index/discipline";
|
||||||
import type { Discipline } from "@/modules/04_registryPerson/interface/response/Discipline";
|
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
import DialogHistory from "@/modules/04_registryPerson/components/detail/DialogHistory.vue";
|
import DialogHistory from "@/modules/04_registryPerson/components/detail/DialogHistory.vue";
|
||||||
import DialogPreviewCommand from "@/modules/18_command/components/DialogPreviewCommand.vue";
|
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -49,9 +47,6 @@ const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
|
||||||
const isLeave = defineModel<boolean>("isLeave", {
|
const isLeave = defineModel<boolean>("isLeave", {
|
||||||
required: true,
|
required: true,
|
||||||
});
|
});
|
||||||
const citizenId = defineModel<string>("citizenId", {
|
|
||||||
required: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
const baseColumns = ref<QTableColumn[]>([
|
const baseColumns = ref<QTableColumn[]>([
|
||||||
{
|
{
|
||||||
|
|
@ -157,8 +152,8 @@ const baseVisibleColumns = ref<string[]>([
|
||||||
"lastUpdatedAt",
|
"lastUpdatedAt",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const rows = ref<Discipline[]>([]); //รายการวินัย
|
const rows = ref<RequestItemsObject[]>([]); //รายการวินัย
|
||||||
const rowsMain = ref<Discipline[]>([]); //รายการวินัย
|
const rowsMain = ref<RequestItemsObject[]>([]); //รายการวินัย
|
||||||
const mode = ref<string>("table"); //การแสดงผล Table card
|
const mode = ref<string>("table"); //การแสดงผล Table card
|
||||||
const filterKeyword = ref<string>(""); //คำค้นหา
|
const filterKeyword = ref<string>(""); //คำค้นหา
|
||||||
|
|
||||||
|
|
@ -249,10 +244,6 @@ const fileUpload = ref<File | null>(null);
|
||||||
const fileData = ref<ResFileData | null>(null);
|
const fileData = ref<ResFileData | null>(null);
|
||||||
const isUpload = ref<boolean>(false);
|
const isUpload = ref<boolean>(false);
|
||||||
|
|
||||||
const modalCommand = ref<boolean>(false);
|
|
||||||
const command = ref<string>("");
|
|
||||||
const commandId = ref<string>("");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function ค้นหา คำใน option
|
* function ค้นหา คำใน option
|
||||||
* @param val คำค้นหา
|
* @param val คำค้นหา
|
||||||
|
|
@ -314,7 +305,7 @@ async function fetchData(id: string) {
|
||||||
* กดเลือกข้อมูลที่จะแก้ไข
|
* กดเลือกข้อมูลที่จะแก้ไข
|
||||||
* @param props ค่า props ใน row ที่เลือก
|
* @param props ค่า props ใน row ที่เลือก
|
||||||
*/
|
*/
|
||||||
async function openDialogEdit(props: Discipline) {
|
async function openDialogEdit(props: RequestItemsObject) {
|
||||||
showLoader();
|
showLoader();
|
||||||
try {
|
try {
|
||||||
modal.value = true;
|
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 ถูกเรียกใช้งาน*/
|
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchData(profileId.value);
|
fetchData(profileId.value);
|
||||||
|
|
@ -636,19 +621,7 @@ onMounted(() => {
|
||||||
:key="col.id"
|
:key="col.id"
|
||||||
:class="props.row.isEntry ? 'text-grey' : ''"
|
:class="props.row.isEntry ? 'text-grey' : ''"
|
||||||
>
|
>
|
||||||
<div
|
<div>
|
||||||
v-if="col.name == 'refCommandNo' && props.row.refCommandId"
|
|
||||||
@click="col.value ? openViewCommand(props.row) : null"
|
|
||||||
:class="
|
|
||||||
col.value
|
|
||||||
? 'table_ellipsis text-blue cursor-pointer'
|
|
||||||
: 'table_ellipsis'
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ col.value ? col.value : "-" }}
|
|
||||||
<q-tooltip v-if="col.value">ดูคำสั่ง</q-tooltip>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -1002,13 +975,6 @@ onMounted(() => {
|
||||||
:visible-columns="visibleColumnsHistory"
|
:visible-columns="visibleColumnsHistory"
|
||||||
:fetch-data="fetchDataHistory"
|
:fetch-data="fetchDataHistory"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<DialogPreviewCommand
|
|
||||||
v-model:modal="modalCommand"
|
|
||||||
v-model:command="command"
|
|
||||||
v-model:command-id="commandId"
|
|
||||||
:citizen-id="citizenId"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
|
||||||
|
|
@ -866,8 +866,7 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
:model-value="date2Thai(formData.dateEnd)"
|
:model-value="date2Thai(formData.dateEnd)"
|
||||||
clearable
|
:rules="[(val:string) => !!val || `${'กรุณาเลือก วันที่สิ้นสุด'}`]"
|
||||||
@clear="formData.dateEnd = null"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'วันที่สิ้นสุด'}`"
|
:label="`${'วันที่สิ้นสุด'}`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -58,10 +58,7 @@ const storeRegistry = useRegistryNewDataStore();
|
||||||
<Info :is-leave="storeRegistry.isLeave" />
|
<Info :is-leave="storeRegistry.isLeave" />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="2">
|
<q-tab-panel name="2">
|
||||||
<Discipline
|
<Discipline :is-leave="storeRegistry.isLeave" />
|
||||||
:is-leave="storeRegistry.isLeave"
|
|
||||||
:citizen-id="storeRegistry.citizenId"
|
|
||||||
/>
|
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="3">
|
<q-tab-panel name="3">
|
||||||
<Leave :is-leave="storeRegistry.isLeave" />
|
<Leave :is-leave="storeRegistry.isLeave" />
|
||||||
|
|
|
||||||
|
|
@ -96,11 +96,11 @@ const columnsHistory = ref<QTableColumn[]>([
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "prefixMain",
|
name: "prefix",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "คำนำหน้าชื่อ",
|
label: "คำนำหน้าชื่อ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "prefixMain",
|
field: "prefix",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
|
|
@ -256,7 +256,7 @@ const columnsHistory = ref<QTableColumn[]>([
|
||||||
]);
|
]);
|
||||||
const visibleColumnsHistory = ref<string[]>([
|
const visibleColumnsHistory = ref<string[]>([
|
||||||
"citizenId",
|
"citizenId",
|
||||||
"prefixMain",
|
"prefix",
|
||||||
"rank",
|
"rank",
|
||||||
"firstName",
|
"firstName",
|
||||||
"lastName",
|
"lastName",
|
||||||
|
|
@ -408,8 +408,7 @@ function calculateMinDate() {
|
||||||
|
|
||||||
function prefixRankRule() {
|
function prefixRankRule() {
|
||||||
return [
|
return [
|
||||||
() =>
|
() => !!formData.rank || !!formData.prefix || "กรุณาเลือกคำนำหน้าชื่อ หรือยศ",
|
||||||
!!formData.rank || !!formData.prefix || "กรุณาเลือกคำนำหน้าชื่อ หรือยศ",
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -589,8 +588,6 @@ onMounted(() => {
|
||||||
|
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<q-select
|
<q-select
|
||||||
:readonly="checkPermission($route)?.attrOwnership !== 'OWNER'"
|
|
||||||
:class="checkPermission($route)?.attrOwnership === 'OWNER' ? 'inputgreen' : ''"
|
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
use-input
|
use-input
|
||||||
|
|
@ -605,6 +602,7 @@ onMounted(() => {
|
||||||
option-value="name"
|
option-value="name"
|
||||||
v-model="formData.prefix"
|
v-model="formData.prefix"
|
||||||
clearable
|
clearable
|
||||||
|
class="inputgreen"
|
||||||
:options="store.Ops.prefixOps"
|
:options="store.Ops.prefixOps"
|
||||||
:label="dataLabel.prefix"
|
:label="dataLabel.prefix"
|
||||||
:rules="prefixRankRule()"
|
:rules="prefixRankRule()"
|
||||||
|
|
@ -642,24 +640,24 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<q-input
|
<q-input
|
||||||
:readonly="checkPermission($route)?.attrOwnership !== 'OWNER'"
|
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
v-model="formData.firstName"
|
v-model="formData.firstName"
|
||||||
|
class="inputgreen"
|
||||||
:label="dataLabel.firstName"
|
:label="dataLabel.firstName"
|
||||||
:rules="[(val: string) => !!val || `${'กรุณากรอก ชื่อ'}`]"
|
:rules="[(val: string) => !!val || `${'กรุณากรอก ชื่อ'}`]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<q-input
|
<q-input
|
||||||
:readonly="checkPermission($route)?.attrOwnership !== 'OWNER'"
|
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
v-model="formData.lastName"
|
v-model="formData.lastName"
|
||||||
|
class="inputgreen"
|
||||||
:label="dataLabel.lastName"
|
:label="dataLabel.lastName"
|
||||||
:rules="[(val: string) => !!val || `${'กรุณากรอก นามสกุล'}`]"
|
:rules="[(val: string) => !!val || `${'กรุณากรอก นามสกุล'}`]"
|
||||||
/>
|
/>
|
||||||
|
|
@ -723,7 +721,6 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<q-select
|
<q-select
|
||||||
:readonly="checkPermission($route)?.attrOwnership !== 'OWNER'"
|
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
use-input
|
use-input
|
||||||
|
|
@ -738,6 +735,7 @@ onMounted(() => {
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
v-model="formData.gender"
|
v-model="formData.gender"
|
||||||
|
class="inputgreen"
|
||||||
:options="store.Ops.genderOps"
|
:options="store.Ops.genderOps"
|
||||||
:label="dataLabel.gender"
|
:label="dataLabel.gender"
|
||||||
@filter="(inputValue: string,
|
@filter="(inputValue: string,
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,6 @@ const changeNameData = reactive<FormChangeName>({
|
||||||
profileId: profileId.value,
|
profileId: profileId.value,
|
||||||
prefixId: "", // id คำนำหน้า
|
prefixId: "", // id คำนำหน้า
|
||||||
prefix: "", // คำนำหน้า
|
prefix: "", // คำนำหน้า
|
||||||
rank: "", // ยศ
|
|
||||||
firstName: "", // ชื่อ
|
firstName: "", // ชื่อ
|
||||||
lastName: "", // นามสกุล
|
lastName: "", // นามสกุล
|
||||||
status: "", // สถานะ
|
status: "", // สถานะ
|
||||||
|
|
@ -70,13 +69,11 @@ const selection = ref<string[]>([]); // ตัวเลือก
|
||||||
const prefixChange = ref<string | null | undefined>(""); // เปลี่ยนคำนำหน้า
|
const prefixChange = ref<string | null | undefined>(""); // เปลี่ยนคำนำหน้า
|
||||||
const firstNameChange = ref<string | null | undefined>(""); // เปลียนชื่อ
|
const firstNameChange = ref<string | null | undefined>(""); // เปลียนชื่อ
|
||||||
const lastNameChange = ref<string | null | undefined>(""); // เปลี่ยนนามสกุล
|
const lastNameChange = ref<string | null | undefined>(""); // เปลี่ยนนามสกุล
|
||||||
const rankChange = ref<string | null | undefined>(""); // เปลี่ยนยศ
|
|
||||||
|
|
||||||
const profileInfo = ref<DataProfile>(); // ข้อมูล Profile
|
const profileInfo = ref<DataProfile>(); // ข้อมูล Profile
|
||||||
|
|
||||||
const statusOption = ref<string[]>([
|
const statusOption = ref<string[]>([
|
||||||
"เปลี่ยนคำนำหน้าชื่อ",
|
"เปลี่ยนคำนำหน้าชื่อ",
|
||||||
"เปลี่ยนยศ",
|
|
||||||
"เปลี่ยนชื่อ",
|
"เปลี่ยนชื่อ",
|
||||||
"เปลี่ยนนามสกุล",
|
"เปลี่ยนนามสกุล",
|
||||||
"เปลี่ยนชื่อ-นามสกุล",
|
"เปลี่ยนชื่อ-นามสกุล",
|
||||||
|
|
@ -87,7 +84,6 @@ const statusOption = ref<string[]>([
|
||||||
const statusOptionFilter = ref<string[]>([
|
const statusOptionFilter = ref<string[]>([
|
||||||
"เปลี่ยนคำนำหน้าชื่อ",
|
"เปลี่ยนคำนำหน้าชื่อ",
|
||||||
"เปลี่ยนชื่อ",
|
"เปลี่ยนชื่อ",
|
||||||
"เปลี่ยนยศ",
|
|
||||||
"เปลี่ยนนามสกุล",
|
"เปลี่ยนนามสกุล",
|
||||||
"เปลี่ยนชื่อ-นามสกุล",
|
"เปลี่ยนชื่อ-นามสกุล",
|
||||||
"เปลี่ยนคำนำหน้าชื่อ และชื่อ",
|
"เปลี่ยนคำนำหน้าชื่อ และชื่อ",
|
||||||
|
|
@ -111,17 +107,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
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",
|
name: "firstName",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -171,7 +156,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
]);
|
]);
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"prefix",
|
"prefix",
|
||||||
"rank",
|
|
||||||
"firstName",
|
"firstName",
|
||||||
"lastName",
|
"lastName",
|
||||||
"lastUpdateFullName",
|
"lastUpdateFullName",
|
||||||
|
|
@ -231,7 +215,6 @@ function onSubmit() {
|
||||||
firstName: changeNameData.firstName,
|
firstName: changeNameData.firstName,
|
||||||
lastName: changeNameData.lastName,
|
lastName: changeNameData.lastName,
|
||||||
status: changeNameData.status,
|
status: changeNameData.status,
|
||||||
rank: changeNameData.rank,
|
|
||||||
documentId: changeNameData.documentId,
|
documentId: changeNameData.documentId,
|
||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
|
@ -363,14 +346,6 @@ function filterSelector(val: string, update: Function, refData: string) {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "rankOps":
|
|
||||||
update(() => {
|
|
||||||
store.Ops.rankOps = store.OpsFilter.rankOps.filter(
|
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
|
||||||
);
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -415,14 +390,12 @@ watch(
|
||||||
changeNameData.prefix,
|
changeNameData.prefix,
|
||||||
changeNameData.firstName,
|
changeNameData.firstName,
|
||||||
changeNameData.lastName,
|
changeNameData.lastName,
|
||||||
changeNameData.rank,
|
|
||||||
],
|
],
|
||||||
() => {
|
() => {
|
||||||
submitDisable.value =
|
submitDisable.value =
|
||||||
changeNameData.prefix === prefixChange.value &&
|
changeNameData.prefix === prefixChange.value &&
|
||||||
changeNameData.firstName === firstNameChange.value &&
|
changeNameData.firstName === firstNameChange.value &&
|
||||||
changeNameData.lastName === lastNameChange.value &&
|
changeNameData.lastName === lastNameChange.value;
|
||||||
changeNameData.rank === rankChange.value;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -438,9 +411,6 @@ watch(
|
||||||
if (!selection.value.includes("lastname")) {
|
if (!selection.value.includes("lastname")) {
|
||||||
changeNameData.lastName = lastNameChange.value;
|
changeNameData.lastName = lastNameChange.value;
|
||||||
}
|
}
|
||||||
if (!selection.value.includes("rank")) {
|
|
||||||
changeNameData.rank = rankChange.value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
||||||
|
|
@ -478,11 +448,9 @@ onMounted(async () => {
|
||||||
changeNameData.prefix = profileInfo?.prefixMain;
|
changeNameData.prefix = profileInfo?.prefixMain;
|
||||||
changeNameData.firstName = profileInfo?.firstName;
|
changeNameData.firstName = profileInfo?.firstName;
|
||||||
changeNameData.lastName = profileInfo?.lastName;
|
changeNameData.lastName = profileInfo?.lastName;
|
||||||
changeNameData.rank = profileInfo?.rank;
|
|
||||||
prefixChange = changeNameData.prefix;
|
prefixChange = changeNameData.prefix;
|
||||||
firstNameChange = changeNameData.firstName;
|
firstNameChange = changeNameData.firstName;
|
||||||
lastNameChange = changeNameData.lastName;
|
lastNameChange = changeNameData.lastName;
|
||||||
rankChange = changeNameData.rank;
|
|
||||||
changeNameData.status = '';
|
changeNameData.status = '';
|
||||||
dialogStatus = 'create';
|
dialogStatus = 'create';
|
||||||
submitDisable = true;
|
submitDisable = true;
|
||||||
|
|
@ -565,7 +533,7 @@ onMounted(async () => {
|
||||||
:class="props.row.isEntry ? 'text-grey' : ''"
|
:class="props.row.isEntry ? 'text-grey' : ''"
|
||||||
>
|
>
|
||||||
<div class="table_ellipsis">
|
<div class="table_ellipsis">
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
||||||
|
|
@ -595,17 +563,12 @@ onMounted(async () => {
|
||||||
<div class="row q-mb-sm">
|
<div class="row q-mb-sm">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="q-col-gutter-sm">
|
<div class="q-gutter-sm">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
v-model="selection"
|
v-model="selection"
|
||||||
val="prefix"
|
val="prefix"
|
||||||
label="เปลี่ยนคำนำหน้าชื่อ"
|
label="เปลี่ยนคำนำหน้าชื่อ"
|
||||||
/>
|
/>
|
||||||
<q-checkbox
|
|
||||||
v-model="selection"
|
|
||||||
val="rank"
|
|
||||||
label="เปลี่ยนยศ"
|
|
||||||
/>
|
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
v-model="selection"
|
v-model="selection"
|
||||||
val="firstname"
|
val="firstname"
|
||||||
|
|
@ -646,30 +609,6 @@ onMounted(async () => {
|
||||||
) "
|
) "
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
|
||||||
<q-select
|
|
||||||
:readonly="!selection.includes('rank')"
|
|
||||||
v-model="changeNameData.rank"
|
|
||||||
:options="store.Ops.rankOps"
|
|
||||||
label="ยศ"
|
|
||||||
dense
|
|
||||||
:class="!selection.includes('rank') ? '' : 'inputgreen'"
|
|
||||||
outlined
|
|
||||||
use-input
|
|
||||||
hide-selected
|
|
||||||
fill-input
|
|
||||||
lazy-rules
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
hide-bottom-space
|
|
||||||
input-debounce="0"
|
|
||||||
option-label="name"
|
|
||||||
option-value="name"
|
|
||||||
@filter="(inputValue:string,
|
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn,'rankOps'
|
|
||||||
) "
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input
|
<q-input
|
||||||
:readonly="!selection.includes('firstname')"
|
:readonly="!selection.includes('firstname')"
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,6 @@ interface FormChangeName {
|
||||||
profileId: string;
|
profileId: string;
|
||||||
prefixId: string | null | undefined;
|
prefixId: string | null | undefined;
|
||||||
prefix: string | null | undefined;
|
prefix: string | null | undefined;
|
||||||
rank: string | null | undefined;
|
|
||||||
firstName: string | null | undefined;
|
firstName: string | null | undefined;
|
||||||
lastName: string | null | undefined;
|
lastName: string | null | undefined;
|
||||||
status: string | null | undefined;
|
status: string | null | undefined;
|
||||||
|
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
interface Discipline {
|
|
||||||
createdAt: Date | null;
|
|
||||||
createdFullName: string;
|
|
||||||
createdUserId: string;
|
|
||||||
date: Date | null;
|
|
||||||
detail: string;
|
|
||||||
id: string;
|
|
||||||
isDeleted: false;
|
|
||||||
isEntry: false;
|
|
||||||
isUpload: true;
|
|
||||||
lastUpdateFullName: string;
|
|
||||||
lastUpdateUserId: string;
|
|
||||||
lastUpdatedAt: Date | null;
|
|
||||||
level: string;
|
|
||||||
profileEmployeeId: string;
|
|
||||||
profileId: string;
|
|
||||||
refCommandDate: Date | null;
|
|
||||||
refCommandNo: string;
|
|
||||||
refCommandId: string;
|
|
||||||
unStigma: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type { Discipline };
|
|
||||||
|
|
@ -25,7 +25,8 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
||||||
{
|
{
|
||||||
id: "posNo",
|
id: "posNo",
|
||||||
name:
|
name:
|
||||||
route.name === "registryNew" || route.name === "registryRetireOfficer"
|
route.name === "registryNew" ||
|
||||||
|
route.name === "registryRetireOfficer"
|
||||||
? "เลขที่ตำแหน่ง"
|
? "เลขที่ตำแหน่ง"
|
||||||
: "ตำแหน่งเลขที่",
|
: "ตำแหน่งเลขที่",
|
||||||
},
|
},
|
||||||
|
|
@ -129,8 +130,6 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
||||||
return "ให้ออกจากราชการ";
|
return "ให้ออกจากราชการ";
|
||||||
case "DISCIPLINE_TEMP_SUSPEND":
|
case "DISCIPLINE_TEMP_SUSPEND":
|
||||||
return "ให้ออกจากราชการไว้ก่อน";
|
return "ให้ออกจากราชการไว้ก่อน";
|
||||||
case "RETIRE_MILITARY":
|
|
||||||
return "ลาออกเพื่อไปรับราชการทหาร";
|
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -121,8 +121,7 @@ const itemsMenu = computed(() => {
|
||||||
if (
|
if (
|
||||||
leaveType.value === "DISCIPLINE_TEMP_SUSPEND" ||
|
leaveType.value === "DISCIPLINE_TEMP_SUSPEND" ||
|
||||||
leaveType.value === "RETIRE_RESIGN" ||
|
leaveType.value === "RETIRE_RESIGN" ||
|
||||||
leaveType.value === "DISCIPLINE_SUSPEND" ||
|
leaveType.value === "DISCIPLINE_SUSPEND"
|
||||||
leaveType.value === "RETIRE_MILITARY"
|
|
||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
baseItemsMenu.value?.filter(
|
baseItemsMenu.value?.filter(
|
||||||
|
|
@ -324,10 +323,10 @@ async function uploadFileURL(uploadUrl: string, file: any) {
|
||||||
* ฟังก์ชันดึงข้อมูลรูปโปรไฟล์
|
* ฟังก์ชันดึงข้อมูลรูปโปรไฟล์
|
||||||
* @param id โปรไฟล์
|
* @param id โปรไฟล์
|
||||||
*/
|
*/
|
||||||
function fetchProfile(id: string) {
|
async function fetchProfile(id: string) {
|
||||||
http
|
await http
|
||||||
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, fileName.value))
|
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, fileName.value))
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
profilePicture.value = res.data.downloadUrl;
|
profilePicture.value = res.data.downloadUrl;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|
@ -404,7 +403,7 @@ async function fetchDataPersonal() {
|
||||||
|
|
||||||
fileName.value = res.data.result.avatarName;
|
fileName.value = res.data.result.avatarName;
|
||||||
if (formDetail.value?.avatarName) {
|
if (formDetail.value?.avatarName) {
|
||||||
fetchProfile(profileId.value);
|
await fetchProfile(profileId.value);
|
||||||
} else {
|
} else {
|
||||||
profilePicture.value = avatar;
|
profilePicture.value = avatar;
|
||||||
}
|
}
|
||||||
|
|
@ -858,8 +857,7 @@ onMounted(async () => {
|
||||||
])) ||
|
])) ||
|
||||||
leaveType === 'DISCIPLINE_TEMP_SUSPEND' ||
|
leaveType === 'DISCIPLINE_TEMP_SUSPEND' ||
|
||||||
leaveType === 'RETIRE_RESIGN' ||
|
leaveType === 'RETIRE_RESIGN' ||
|
||||||
leaveType === 'DISCIPLINE_SUSPEND' ||
|
leaveType === 'DISCIPLINE_SUSPEND'
|
||||||
leaveType === 'RETIRE_MILITARY'
|
|
||||||
"
|
"
|
||||||
size="md"
|
size="md"
|
||||||
rounded
|
rounded
|
||||||
|
|
|
||||||
|
|
@ -437,6 +437,66 @@ function classColorRow(isDelete: boolean, isEdit: boolean, isEntry: boolean) {
|
||||||
/** ฟังก์ชันดาวน์โหลดไฟล Excel */
|
/** ฟังก์ชันดาวน์โหลดไฟล Excel */
|
||||||
function exportToExcel() {
|
function exportToExcel() {
|
||||||
exportToExcelPosition(rows.value);
|
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<DataOption[]>(store.commandCodeData); //รายการปรเภทคำสั่ง
|
const commandCodeOptions = ref<DataOption[]>(store.commandCodeData); //รายการปรเภทคำสั่ง
|
||||||
|
|
@ -871,29 +931,6 @@ function onCancelUpload() {
|
||||||
excelPreviewModal.value = false;
|
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 () => {
|
onMounted(async () => {
|
||||||
await Promise.all([fetchData(), fetchType()]);
|
await Promise.all([fetchData(), fetchType()]);
|
||||||
});
|
});
|
||||||
|
|
@ -929,23 +966,8 @@ onMounted(async () => {
|
||||||
icon="mdi-sort"
|
icon="mdi-sort"
|
||||||
@click="modalSort = true"
|
@click="modalSort = true"
|
||||||
>
|
>
|
||||||
<q-tooltip>จัดลำดับข้อมูล</q-tooltip>
|
<q-tooltip>จัดลำดับข้อมูล</q-tooltip></q-btn
|
||||||
</q-btn>
|
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="
|
|
||||||
tabs === 'PENDING' && statusCheckEdit == 'PENDING' && isConfirmEdit
|
|
||||||
"
|
|
||||||
class="q-ml-sm"
|
|
||||||
round
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
color="indigo-5"
|
|
||||||
icon="mdi-calendar-export"
|
|
||||||
@click="handleSortByDate()"
|
|
||||||
>
|
>
|
||||||
<q-tooltip>จัดลำดับตามวันที่คำสั่งมีผล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
|
|
@ -316,10 +316,9 @@ onMounted(() => {
|
||||||
:model-value="
|
:model-value="
|
||||||
dateEnd !== null ? date2Thai(dateEnd) : null
|
dateEnd !== null ? date2Thai(dateEnd) : null
|
||||||
"
|
"
|
||||||
|
:rules="edit ? [(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]:[]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'ถึงวันที่'}`"
|
:label="`${'ถึงวันที่'}`"
|
||||||
clearable
|
|
||||||
@clear="dateEnd = null"
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
|
||||||
|
|
@ -48,12 +48,12 @@ const props = defineProps({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="col">
|
<div class="col">
|
||||||
<div class="header-text-right q-px-xs">จำนวนครั้งที่สมัครสอบ</div>
|
<div class="header-text-right q-px-xs">จำนวนครั้งที่สมัครสอบ</div>
|
||||||
<div class="sub-text-right q-px-xs q-pb-sm">
|
<div class="sub-text-right q-px-xs q-pb-sm">
|
||||||
{{ props.data.examRound ? props.data.examRound : "-" }}
|
{{ props.data.examRound ? props.data.examRound : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -525,14 +525,14 @@ watch(props, () => {
|
||||||
<div class="col-7 header-sub-text">
|
<div class="col-7 header-sub-text">
|
||||||
<div class="q-pb-sm">ผลการสอบ</div>
|
<div class="q-pb-sm">ผลการสอบ</div>
|
||||||
<div class="q-pb-sm">ลำดับที่สอบได้</div>
|
<div class="q-pb-sm">ลำดับที่สอบได้</div>
|
||||||
<!-- <div class="q-pb-sm">จำนวนครั้งที่สมัครสอบ</div> -->
|
<div class="q-pb-sm">จำนวนครั้งที่สมัครสอบ</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-5 sub-text-exam">
|
<div class="col-5 sub-text-exam">
|
||||||
<div class="q-pb-sm">
|
<div class="q-pb-sm">
|
||||||
{{ personalForm?.pass }}
|
{{ personalForm?.pass }}
|
||||||
</div>
|
</div>
|
||||||
<div class="q-pb-sm">{{ personalForm?.examNumber }}</div>
|
<div class="q-pb-sm">{{ personalForm?.examNumber }}</div>
|
||||||
<!-- <div class="q-pb-sm">{{ personalForm?.examRound }}</div> -->
|
<div class="q-pb-sm">{{ personalForm?.examRound }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,7 @@ watch(
|
||||||
v.code === "C-PM-04" ||
|
v.code === "C-PM-04" ||
|
||||||
v.code === "C-PM-06")) ||
|
v.code === "C-PM-06")) ||
|
||||||
((status?.examTypeName === "สอบคัดเลือก" ||
|
((status?.examTypeName === "สอบคัดเลือก" ||
|
||||||
status?.examTypeName === "คัดเลือกอื่นๆ") &&
|
status?.examTypeName === "คัดเลือกคนพิการ") &&
|
||||||
(v.code === "C-PM-02" ||
|
(v.code === "C-PM-02" ||
|
||||||
v.code === "C-PM-03" ||
|
v.code === "C-PM-03" ||
|
||||||
v.code === "C-PM-04" ||
|
v.code === "C-PM-04" ||
|
||||||
|
|
|
||||||
|
|
@ -165,9 +165,7 @@ async function fetchDataTable(id: string, level: number = 0) {
|
||||||
(e) => e !== props.dataRow?.posmasterId
|
(e) => e !== props.dataRow?.posmasterId
|
||||||
);
|
);
|
||||||
|
|
||||||
positionNo.value = posMain.filter(
|
positionNo.value = posMain.filter((e: DataPositionNo) => !newUse.includes(e.id));
|
||||||
(e: DataPositionNo) => !newUse.includes(e.id)
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
positionNo.value = posMain.filter(
|
positionNo.value = posMain.filter(
|
||||||
(e: DataPositionNo) => !positionUse.value.includes(e.id)
|
(e: DataPositionNo) => !positionUse.value.includes(e.id)
|
||||||
|
|
@ -243,7 +241,6 @@ async function onClickSubmit() {
|
||||||
posLevelId: selectedPos.value[0].posLevelId, //ชื่อตำแหน่ง
|
posLevelId: selectedPos.value[0].posLevelId, //ชื่อตำแหน่ง
|
||||||
posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง
|
posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง
|
||||||
posExecutiveName: selectedPos.value[0].posExecutiveName,
|
posExecutiveName: selectedPos.value[0].posExecutiveName,
|
||||||
posExecutiveId: selectedPos.value[0].posExecutiveId,
|
|
||||||
reportingDate: convertDateToAPI(datePos.value),
|
reportingDate: convertDateToAPI(datePos.value),
|
||||||
posmasterId: dataPosMaster.id,
|
posmasterId: dataPosMaster.id,
|
||||||
positionExecutiveField: selectedPos.value[0].positionExecutiveField, //ด้านทางการบริหาร
|
positionExecutiveField: selectedPos.value[0].positionExecutiveField, //ด้านทางการบริหาร
|
||||||
|
|
@ -293,10 +290,7 @@ watch(
|
||||||
if (modal.value) {
|
if (modal.value) {
|
||||||
await fetchPositionUes();
|
await fetchPositionUes();
|
||||||
if (props?.dataRow?.node !== null && props?.dataRow?.nodeId !== null) {
|
if (props?.dataRow?.node !== null && props?.dataRow?.nodeId !== null) {
|
||||||
await fetchPosFind(
|
await fetchPosFind(props?.dataRow?.node ?? 0, props?.dataRow?.nodeId ?? "");
|
||||||
props?.dataRow?.node ?? 0,
|
|
||||||
props?.dataRow?.nodeId ?? ""
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
expanded.value = [];
|
expanded.value = [];
|
||||||
}
|
}
|
||||||
|
|
@ -351,7 +345,7 @@ function onPosType() {
|
||||||
watch(
|
watch(
|
||||||
[isAll, isBlank, () => isPosition.value],
|
[isAll, isBlank, () => isPosition.value],
|
||||||
([newAll, newBlank, newPos], [oldAll, oldBlank, oldPos]) => {
|
([newAll, newBlank, newPos], [oldAll, oldBlank, oldPos]) => {
|
||||||
const shouldFetch = newAll !== oldAll || newBlank !== oldBlank;
|
const shouldFetch = (newAll !== oldAll) || (newBlank !== oldBlank);
|
||||||
const isSelectMode = newPos === "select" && oldPos !== "select";
|
const isSelectMode = newPos === "select" && oldPos !== "select";
|
||||||
|
|
||||||
if (shouldFetch || isSelectMode) {
|
if (shouldFetch || isSelectMode) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch, reactive, computed, type PropType } from "vue";
|
import { ref, onMounted, watch, reactive, computed } from "vue";
|
||||||
import { useQuasar, QForm } from "quasar";
|
import { useQuasar, QForm } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
@ -48,7 +48,7 @@ const {
|
||||||
/** รับค่ามาจากหน้าหลัก */
|
/** รับค่ามาจากหน้าหลัก */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
statCard: {
|
statCard: {
|
||||||
type: Function as PropType<() => Promise<void>>,
|
type: Function,
|
||||||
default: () => console.log("getStat"),
|
default: () => console.log("getStat"),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -264,7 +264,7 @@ watch(
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="modal" persistent>
|
<q-dialog v-model="modal" persistent>
|
||||||
<q-card style="min-width: 85%">
|
<q-card style="min-width: 85%">
|
||||||
<DialogHeader :tittle="'ส่งไปออกคำสั่ง'" :close="closeModal" />
|
<DialogHeader :tittle="'ส่งไปออกคำสั่ง'" :close="closeModal" />
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="row col-12 q-col-gutter-sm">
|
<div class="row col-12 q-col-gutter-sm">
|
||||||
|
|
@ -341,7 +341,7 @@ watch(
|
||||||
keep-color
|
keep-color
|
||||||
color="primary"
|
color="primary"
|
||||||
dense
|
dense
|
||||||
:disable="!commandType ? true : false"
|
:disable="commandType"
|
||||||
v-model="scope.selected"
|
v-model="scope.selected"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -352,7 +352,7 @@ watch(
|
||||||
keep-color
|
keep-color
|
||||||
color="primary"
|
color="primary"
|
||||||
dense
|
dense
|
||||||
:disable="!commandType ? true : false"
|
:disable="commandType"
|
||||||
v-model="props.selected"
|
v-model="props.selected"
|
||||||
/>
|
/>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
|
||||||
|
|
@ -97,8 +97,6 @@ const develop_result_option = ref<any>([
|
||||||
|
|
||||||
const isCheckFile = ref<boolean>(false);
|
const isCheckFile = ref<boolean>(false);
|
||||||
|
|
||||||
const isSelectionPartfour = ref<boolean>(false);
|
|
||||||
|
|
||||||
// score
|
// score
|
||||||
const score1 = computed(() => {
|
const score1 = computed(() => {
|
||||||
if (
|
if (
|
||||||
|
|
@ -214,21 +212,20 @@ const percent_sum: any = computed(() => {
|
||||||
});
|
});
|
||||||
const score4 = computed(() => {
|
const score4 = computed(() => {
|
||||||
return (
|
return (
|
||||||
Number(orientation.value) +
|
(Number(orientation.value) +
|
||||||
Number(self_learning.value) +
|
Number(self_learning.value) +
|
||||||
Number(training_seminar.value) +
|
Number(training_seminar.value) +
|
||||||
(isSelectionPartfour.value ? Number(other_training.value) : 0)
|
Number(other_training.value)) /
|
||||||
|
4
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
const score5 = computed(() => {
|
const score5 = computed(() => {
|
||||||
const rawTotal =
|
const total =
|
||||||
(Number(orientation_percent.value) +
|
(Number(orientation_percent.value) +
|
||||||
Number(self_learning_percent.value) +
|
Number(self_learning_percent.value) +
|
||||||
Number(training_seminar_percent.value) +
|
Number(training_seminar_percent.value) +
|
||||||
Number(other_training_percent.value)) /
|
Number(other_training_percent.value)) /
|
||||||
(isSelectionPartfour.value ? 4 : 3);
|
4;
|
||||||
|
|
||||||
const total = Math.trunc(rawTotal);
|
|
||||||
|
|
||||||
develop_result.value = total > 60 ? 1 : 0;
|
develop_result.value = total > 60 ? 1 : 0;
|
||||||
|
|
||||||
|
|
@ -1136,20 +1133,10 @@ onMounted(async () => {
|
||||||
<q-separator class="q-my-xs" />
|
<q-separator class="q-my-xs" />
|
||||||
<div class="row q-gutter-md align-center q-pl-md">
|
<div class="row q-gutter-md align-center q-pl-md">
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<q-checkbox
|
|
||||||
class="q-mr-sm"
|
|
||||||
dense
|
|
||||||
v-model="isSelectionPartfour"
|
|
||||||
@update:model-value="
|
|
||||||
other_training = 0;
|
|
||||||
other_training_percent = 0;
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
|
4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input
|
<q-input
|
||||||
:disable="!isSelectionPartfour"
|
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
type="number"
|
type="number"
|
||||||
|
|
@ -1161,7 +1148,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input
|
<q-input
|
||||||
:disable="!isSelectionPartfour"
|
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
type="number"
|
type="number"
|
||||||
|
|
|
||||||
|
|
@ -90,8 +90,6 @@ const develop_result_option = ref<any>([
|
||||||
// footer
|
// footer
|
||||||
const dateAutherise = ref<any>(null);
|
const dateAutherise = ref<any>(null);
|
||||||
|
|
||||||
const isSelectionPartfour = ref<boolean>(false);
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fecthAssign(assignId.value);
|
fecthAssign(assignId.value);
|
||||||
});
|
});
|
||||||
|
|
@ -241,21 +239,20 @@ const percent_sum: any = computed(() => {
|
||||||
});
|
});
|
||||||
const score4 = computed(() => {
|
const score4 = computed(() => {
|
||||||
return (
|
return (
|
||||||
Number(orientation.value) +
|
(Number(orientation.value) +
|
||||||
Number(self_learning.value) +
|
Number(self_learning.value) +
|
||||||
Number(training_seminar.value) +
|
Number(training_seminar.value) +
|
||||||
(isSelectionPartfour.value ? Number(other_training.value) : 0)
|
Number(other_training.value)) /
|
||||||
|
4
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
const score5 = computed(() => {
|
const score5 = computed(() => {
|
||||||
const rawTotal =
|
const total =
|
||||||
(Number(orientation_percent.value) +
|
(Number(orientation_percent.value) +
|
||||||
Number(self_learning_percent.value) +
|
Number(self_learning_percent.value) +
|
||||||
Number(training_seminar_percent.value) +
|
Number(training_seminar_percent.value) +
|
||||||
Number(other_training_percent.value)) /
|
Number(other_training_percent.value)) /
|
||||||
(isSelectionPartfour.value ? 4 : 3);
|
4;
|
||||||
|
|
||||||
const total = Math.trunc(rawTotal);
|
|
||||||
|
|
||||||
develop_result.value = total > 60 ? 1 : 0;
|
develop_result.value = total > 60 ? 1 : 0;
|
||||||
|
|
||||||
|
|
@ -1217,20 +1214,10 @@ watch(lengthdiscipline_level, (newLength) => {
|
||||||
<q-separator class="q-my-xs" />
|
<q-separator class="q-my-xs" />
|
||||||
<div class="row q-gutter-md align-center q-pl-md">
|
<div class="row q-gutter-md align-center q-pl-md">
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<q-checkbox
|
|
||||||
class="q-mr-sm"
|
|
||||||
dense
|
|
||||||
v-model="isSelectionPartfour"
|
|
||||||
@update:model-value="
|
|
||||||
other_training = 0;
|
|
||||||
other_training_percent = 0;
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
|
4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input
|
<q-input
|
||||||
:disable="!isSelectionPartfour"
|
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
type="number"
|
type="number"
|
||||||
|
|
@ -1244,7 +1231,6 @@ watch(lengthdiscipline_level, (newLength) => {
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
type="number"
|
type="number"
|
||||||
:disable="!isSelectionPartfour"
|
|
||||||
v-model="other_training_percent"
|
v-model="other_training_percent"
|
||||||
:rules="[(val:number) => val <= 100 || 'ร้อยละต้องไม่เกิน 100']"
|
:rules="[(val:number) => val <= 100 || 'ร้อยละต้องไม่เกิน 100']"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,6 @@ interface FormDataAppoint {
|
||||||
reportingDate: string;
|
reportingDate: string;
|
||||||
posmasterId: string;
|
posmasterId: string;
|
||||||
posExecutiveName?: string;
|
posExecutiveName?: string;
|
||||||
posExecutiveId?: string;
|
|
||||||
typeCommand: string;
|
typeCommand: string;
|
||||||
positionExecutiveField?: string;
|
positionExecutiveField?: string;
|
||||||
positionArea?: string;
|
positionArea?: string;
|
||||||
|
|
|
||||||
|
|
@ -10,25 +10,25 @@ import type {
|
||||||
} from "@/modules/05_placement/interface/request/Main";
|
} from "@/modules/05_placement/interface/request/Main";
|
||||||
import type { FormOrderPlacementMainData } from "@/modules/05_placement/interface/request/Main";
|
import type { FormOrderPlacementMainData } from "@/modules/05_placement/interface/request/Main";
|
||||||
|
|
||||||
interface profile {
|
|
||||||
main: { columns: String[] };
|
|
||||||
education: { columns: String[] };
|
|
||||||
certicate: { columns: String[] };
|
|
||||||
train: { columns: String[] };
|
|
||||||
insignia: { columns: String[] };
|
|
||||||
coined: { columns: String[] };
|
|
||||||
assessment: { columns: String[] };
|
|
||||||
salary: { columns: String[] };
|
|
||||||
discipline: { columns: String[] };
|
|
||||||
leave: { columns: String[] };
|
|
||||||
talent: { columns: String[] };
|
|
||||||
work: { columns: String[] };
|
|
||||||
record: { columns: String[] };
|
|
||||||
other: { columns: String[] };
|
|
||||||
document: { columns: String[] };
|
|
||||||
}
|
|
||||||
|
|
||||||
export const useProfileDataStore = defineStore("profilePlacenent", () => {
|
export const useProfileDataStore = defineStore("profilePlacenent", () => {
|
||||||
|
interface profile {
|
||||||
|
main: { columns: String[] };
|
||||||
|
education: { columns: String[] };
|
||||||
|
certicate: { columns: String[] };
|
||||||
|
train: { columns: String[] };
|
||||||
|
insignia: { columns: String[] };
|
||||||
|
coined: { columns: String[] };
|
||||||
|
assessment: { columns: String[] };
|
||||||
|
salary: { columns: String[] };
|
||||||
|
discipline: { columns: String[] };
|
||||||
|
leave: { columns: String[] };
|
||||||
|
talent: { columns: String[] };
|
||||||
|
work: { columns: String[] };
|
||||||
|
record: { columns: String[] };
|
||||||
|
other: { columns: String[] };
|
||||||
|
document: { columns: String[] };
|
||||||
|
}
|
||||||
|
|
||||||
const birthDate = ref<Date>(new Date());
|
const birthDate = ref<Date>(new Date());
|
||||||
const retireText = ref<string | null>(null);
|
const retireText = ref<string | null>(null);
|
||||||
const changeRetireText = (val: string | null) => {
|
const changeRetireText = (val: string | null) => {
|
||||||
|
|
@ -87,15 +87,15 @@ export const useProfileDataStore = defineStore("profilePlacenent", () => {
|
||||||
changeRetireText,
|
changeRetireText,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
interface placement {
|
|
||||||
mappingPosition: { columns: String[] };
|
|
||||||
}
|
|
||||||
export const usePlacementDataStore = defineStore("placement", () => {
|
export const usePlacementDataStore = defineStore("placement", () => {
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const tabsMain = ref<string>("probation");
|
const tabsMain = ref<string>("probation");
|
||||||
const isOfficer = ref<boolean | null>(null);
|
const isOfficer = ref<boolean | null>(null);
|
||||||
const isStaff = ref<boolean | null>(null);
|
const isStaff = ref<boolean | null>(null);
|
||||||
const { hideLoader } = mixin;
|
const { hideLoader } = mixin;
|
||||||
|
interface placement {
|
||||||
|
mappingPosition: { columns: String[] };
|
||||||
|
}
|
||||||
const placementData = ref<placement>({
|
const placementData = ref<placement>({
|
||||||
mappingPosition: { columns: [] },
|
mappingPosition: { columns: [] },
|
||||||
});
|
});
|
||||||
|
|
@ -218,10 +218,10 @@ export const usePlacementDataStore = defineStore("placement", () => {
|
||||||
isStaff,
|
isStaff,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
interface placementOrder {
|
|
||||||
mappingPosition: { columns: String[] };
|
|
||||||
}
|
|
||||||
export const useOrderPlacementDataStore = defineStore("placementOrder", () => {
|
export const useOrderPlacementDataStore = defineStore("placementOrder", () => {
|
||||||
|
interface placementOrder {
|
||||||
|
mappingPosition: { columns: String[] };
|
||||||
|
}
|
||||||
const placementOrderData = ref<placementOrder>({
|
const placementOrderData = ref<placementOrder>({
|
||||||
mappingPosition: { columns: [] },
|
mappingPosition: { columns: [] },
|
||||||
});
|
});
|
||||||
|
|
@ -369,8 +369,6 @@ export const useTransferDataStore = defineStore("transferDataStore", () => {
|
||||||
]);
|
]);
|
||||||
const statusOp = ref<DataOptions[]>(statusMainOp.value);
|
const statusOp = ref<DataOptions[]>(statusMainOp.value);
|
||||||
|
|
||||||
const statusDelete = ["REPORT", "WAITING", "DONE"];
|
|
||||||
|
|
||||||
const statusText = (val: string) => {
|
const statusText = (val: string) => {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case "WAITTING":
|
case "WAITTING":
|
||||||
|
|
@ -440,6 +438,5 @@ export const useTransferDataStore = defineStore("transferDataStore", () => {
|
||||||
statusOp,
|
statusOp,
|
||||||
statusMainOp,
|
statusMainOp,
|
||||||
filterOption,
|
filterOption,
|
||||||
statusDelete,
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { formatPosmasterNo } from "@/utils/function";
|
import { ref } from "vue";
|
||||||
/** importType*/
|
/** importType*/
|
||||||
import type { PositionMaim } from "@/modules/05_placement/interface/response/SelectOrg";
|
import type { PositionMaim } from "@/modules/05_placement/interface/response/SelectOrg";
|
||||||
import type { DataPositionNo } from "@/modules/05_placement/interface/index/SelectOrg";
|
import type { DataPositionNo } from "@/modules/05_placement/interface/index/SelectOrg";
|
||||||
|
|
@ -12,13 +12,11 @@ export const useSelectOrgStore = defineStore("selectorg", () => {
|
||||||
const listPosNo: DataPositionNo[] = data.map((e: PositionMaim) => ({
|
const listPosNo: DataPositionNo[] = data.map((e: PositionMaim) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
isPosition: e.isPosition,
|
isPosition: e.isPosition,
|
||||||
posMasterNo: formatPosmasterNo(
|
posMasterNo:
|
||||||
e.orgShortname,
|
e.orgShortname +
|
||||||
e.posMasterNoPrefix,
|
(e.posMasterNoPrefix != null ? e.posMasterNoPrefix : " ") +
|
||||||
e.posMasterNo.toString(),
|
e.posMasterNo +
|
||||||
e.posMasterNoSuffix
|
(e.posMasterNoSuffix != null ? e.posMasterNoSuffix : " "),
|
||||||
),
|
|
||||||
|
|
||||||
positionName: e.positionName,
|
positionName: e.positionName,
|
||||||
posTypeName: e.posTypeName,
|
posTypeName: e.posTypeName,
|
||||||
posLevelName: e.posLevelName,
|
posLevelName: e.posLevelName,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import { ref, onMounted, computed } from "vue";
|
import { ref, onMounted, computed } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import {
|
import {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
checkPermissionList,
|
checkPermissionList,
|
||||||
|
|
@ -20,19 +20,11 @@ import DialogOrders from "@/modules/05_placement/components/Transfer/DialogOrder
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const store = useTransferDataStore();
|
const store = useTransferDataStore();
|
||||||
const { statusText, filterOption } = useTransferDataStore();
|
const { statusText, filterOption } = useTransferDataStore();
|
||||||
const {
|
const { date2Thai, messageError, showLoader, hideLoader, onSearchDataTable } =
|
||||||
date2Thai,
|
mixin;
|
||||||
messageError,
|
|
||||||
showLoader,
|
|
||||||
hideLoader,
|
|
||||||
onSearchDataTable,
|
|
||||||
dialogRemove,
|
|
||||||
success,
|
|
||||||
} = mixin;
|
|
||||||
|
|
||||||
const modal = ref<boolean>(false); //ส่งไปออกคำสั่ง
|
const modal = ref<boolean>(false); //ส่งไปออกคำสั่ง
|
||||||
const dataTransfer = ref<ResponseData[]>([]); //ช่อมูลรายการขอโอน
|
const dataTransfer = ref<ResponseData[]>([]); //ช่อมูลรายการขอโอน
|
||||||
|
|
@ -149,15 +141,6 @@ const visibleColumns = ref<string[]>([
|
||||||
"createdAt",
|
"createdAt",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const isPermissionDelete = computed(() => {
|
|
||||||
return (status: string) => {
|
|
||||||
return (
|
|
||||||
checkPermission(route)?.attrOwnership === "OWNER" &&
|
|
||||||
!store.statusDelete.includes(status)
|
|
||||||
);
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
/** ฟังก์ชันดึงข้อมูรายการขอโอน*/
|
/** ฟังก์ชันดึงข้อมูรายการขอโอน*/
|
||||||
async function fetchData() {
|
async function fetchData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -211,21 +194,6 @@ function onSearch() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDelete(id: string) {
|
|
||||||
dialogRemove($q, async () => {
|
|
||||||
try {
|
|
||||||
showLoader();
|
|
||||||
await http.delete(config.API.transfer + `/admin/${id}`);
|
|
||||||
await fetchData();
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
} catch (error) {
|
|
||||||
messageError($q, error);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ทำงานเมื่อ Components ถูกเรียกใช้งาน
|
* ทำงานเมื่อ Components ถูกเรียกใช้งาน
|
||||||
* จะเรียกใช้ fetchData เพื่อดึงข้อมูลรายการขอโอน
|
* จะเรียกใช้ fetchData เพื่อดึงข้อมูลรายการขอโอน
|
||||||
|
|
@ -369,18 +337,6 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>รายละเอียด</q-tooltip>
|
<q-tooltip>รายละเอียด</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="isPermissionDelete(props.row.status)"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
dense
|
|
||||||
icon="mdi-delete"
|
|
||||||
color="red"
|
|
||||||
@click.prevent="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div v-if="col.name === 'no'">
|
<div v-if="col.name === 'no'">
|
||||||
|
|
|
||||||
|
|
@ -313,7 +313,7 @@ function openDelete(id: string) {
|
||||||
dialogRemove($q, async () => {
|
dialogRemove($q, async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.receiveData() + `/admin/${id}`)
|
.delete(config.API.receiveDataId(id))
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await fecthlistRecevice();
|
await fecthlistRecevice();
|
||||||
await success($q, "ลบข้อมูลสำเร็จ");
|
await success($q, "ลบข้อมูลสำเร็จ");
|
||||||
|
|
@ -382,7 +382,6 @@ async function onSave(data: FormDataAppoint) {
|
||||||
typeCommand: data.typeCommand,
|
typeCommand: data.typeCommand,
|
||||||
positionExecutiveField: data.positionExecutiveField,
|
positionExecutiveField: data.positionExecutiveField,
|
||||||
positionArea: data.positionArea,
|
positionArea: data.positionArea,
|
||||||
posExecutiveId: data.posExecutiveId,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -606,10 +605,8 @@ onMounted(async () => {
|
||||||
|
|
||||||
<q-item
|
<q-item
|
||||||
v-if="
|
v-if="
|
||||||
checkPermission($route)?.attrOwnership ===
|
checkPermission($route)?.attrIsDelete &&
|
||||||
'OWNER' &&
|
|
||||||
props.row.status !== 'REPORT' &&
|
props.row.status !== 'REPORT' &&
|
||||||
props.row.status !== 'WAITING' &&
|
|
||||||
props.row.status !== 'DONE'
|
props.row.status !== 'DONE'
|
||||||
"
|
"
|
||||||
clickable
|
clickable
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return row.positionNumberOld ?? "-";
|
return findPosMasterNoOld(row);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -236,7 +236,8 @@ function openModalOrder() {
|
||||||
item.status == "APPROVE") &&
|
item.status == "APPROVE") &&
|
||||||
item.organizationPositionOld &&
|
item.organizationPositionOld &&
|
||||||
item.organization &&
|
item.organization &&
|
||||||
item.dateStart
|
item.dateStart &&
|
||||||
|
item.dateEnd
|
||||||
);
|
);
|
||||||
rows2.value = row;
|
rows2.value = row;
|
||||||
rows2Data.value = row;
|
rows2Data.value = row;
|
||||||
|
|
|
||||||
|
|
@ -457,7 +457,6 @@ async function onSave(data: FormDataAppoint) {
|
||||||
typeCommand: data.typeCommand,
|
typeCommand: data.typeCommand,
|
||||||
positionExecutiveField: data.positionExecutiveField,
|
positionExecutiveField: data.positionExecutiveField,
|
||||||
positionArea: data.positionArea,
|
positionArea: data.positionArea,
|
||||||
posExecutiveId: data.posExecutiveId,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,6 @@ async function onSaveSelectOrg(data: any) {
|
||||||
typeCommand: data.typeCommand,
|
typeCommand: data.typeCommand,
|
||||||
positionExecutiveField: data.positionExecutiveField,
|
positionExecutiveField: data.positionExecutiveField,
|
||||||
positionArea: data.positionArea,
|
positionArea: data.positionArea,
|
||||||
posExecutiveId: data.posExecutiveId,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,10 @@ import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
|
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
|
||||||
import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow";
|
import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow";
|
||||||
import { useCommandMainStore } from "@/modules/18_command/store/Main";
|
|
||||||
|
|
||||||
import type { PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
|
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
|
||||||
import type { ListCommand } from "@/modules/18_command/interface/index/Main";
|
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
|
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
|
||||||
|
|
@ -18,7 +16,6 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
|
||||||
/** use */
|
/** use */
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const stroe = useRetirementDataStore();
|
const stroe = useRetirementDataStore();
|
||||||
const storeCommand = useCommandMainStore();
|
|
||||||
const { fetchDataCheckIsoffice } = useRoleWorkflowDataStore();
|
const { fetchDataCheckIsoffice } = useRoleWorkflowDataStore();
|
||||||
const { statusText } = stroe;
|
const { statusText } = stroe;
|
||||||
const selected = ref<ResponseItems[]>([]);
|
const selected = ref<ResponseItems[]>([]);
|
||||||
|
|
@ -50,10 +47,6 @@ const props = defineProps({
|
||||||
cancel: { type: Boolean, default: false },
|
cancel: { type: Boolean, default: false },
|
||||||
});
|
});
|
||||||
|
|
||||||
const commandType = ref<string>("");
|
|
||||||
const commandMainOp = ref<ListCommand[]>([]); //ข้อมูลรายการคำสั่ง
|
|
||||||
const commandOp = ref<ListCommand[]>([]); //ตัวเลือกคำสั่ง
|
|
||||||
|
|
||||||
//Table
|
//Table
|
||||||
const filterKeyword = defineModel<string>("filterKeyword", { required: true });
|
const filterKeyword = defineModel<string>("filterKeyword", { required: true });
|
||||||
const rowsData = ref<ResponseItems[]>([]);
|
const rowsData = ref<ResponseItems[]>([]);
|
||||||
|
|
@ -176,11 +169,6 @@ const visibleColumns = ref<string[]>([
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const modalCommand = ref<boolean>(false);
|
const modalCommand = ref<boolean>(false);
|
||||||
const isDisable = computed(() => {
|
|
||||||
return props.mainTabs === "1"
|
|
||||||
? selected.value.length === 0 || commandType.value === ""
|
|
||||||
: selected.value.length === 0;
|
|
||||||
});
|
|
||||||
|
|
||||||
/** popup ยืนยันส่งัว */
|
/** popup ยืนยันส่งัว */
|
||||||
function saveOrder() {
|
function saveOrder() {
|
||||||
|
|
@ -222,19 +210,6 @@ async function fetchCheckOfficer() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ฟิลเตอร์ คำสั่ง
|
|
||||||
* @param val ค่าจาก Input
|
|
||||||
* @param update Funtion quasar
|
|
||||||
*/
|
|
||||||
function filterSelector(val: string, update: Function) {
|
|
||||||
update(() => {
|
|
||||||
commandOp.value = commandMainOp.value.filter(
|
|
||||||
(v: ListCommand) => v.name.indexOf(val) > -1
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.modal,
|
() => props.modal,
|
||||||
async (val) => {
|
async (val) => {
|
||||||
|
|
@ -256,11 +231,6 @@ watch(
|
||||||
|
|
||||||
rowsData.value = data ? data : [];
|
rowsData.value = data ? data : [];
|
||||||
rowsDataMain.value = data ? data : [];
|
rowsDataMain.value = data ? data : [];
|
||||||
commandType.value = "";
|
|
||||||
const dataCommandTypes = await storeCommand.getCommandTypes();
|
|
||||||
commandMainOp.value = dataCommandTypes.filter(
|
|
||||||
(e: ListCommand) => e.code === "C-PM-17" || e.code === "C-PM-48"
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
rowsData.value = [];
|
rowsData.value = [];
|
||||||
rowsDataMain.value = [];
|
rowsDataMain.value = [];
|
||||||
|
|
@ -268,7 +238,6 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="props.modal" persistent>
|
<q-dialog v-model="props.modal" persistent>
|
||||||
<q-card style="min-width: 85%">
|
<q-card style="min-width: 85%">
|
||||||
|
|
@ -280,33 +249,6 @@ watch(
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="row col-12 q-col-gutter-sm">
|
<div class="row col-12 q-col-gutter-sm">
|
||||||
<div class="col-12 row">
|
<div class="col-12 row">
|
||||||
<q-select
|
|
||||||
v-if="props.mainTabs === '1'"
|
|
||||||
v-model="commandType"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
label="ประเภทคำสั่ง"
|
|
||||||
:options="commandOp"
|
|
||||||
option-label="name"
|
|
||||||
option-value="code"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
use-input
|
|
||||||
hide-selected
|
|
||||||
fill-input
|
|
||||||
@update:model-value="onSearch"
|
|
||||||
@filter="(inputValue:string,
|
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn
|
|
||||||
) "
|
|
||||||
>
|
|
||||||
<template v-slot:no-option>
|
|
||||||
<q-item>
|
|
||||||
<q-item-section class="text-grey">
|
|
||||||
ไม่มีข้อมูล
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</template>
|
|
||||||
</q-select>
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-input
|
<q-input
|
||||||
borderless
|
borderless
|
||||||
|
|
@ -390,7 +332,7 @@ watch(
|
||||||
<q-btn
|
<q-btn
|
||||||
label="ส่งไปออกคำสั่ง"
|
label="ส่งไปออกคำสั่ง"
|
||||||
@click="saveOrder"
|
@click="saveOrder"
|
||||||
:disable="isDisable"
|
:disable="selected.length === 0"
|
||||||
color="public"
|
color="public"
|
||||||
/>
|
/>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
|
|
@ -399,7 +341,7 @@ watch(
|
||||||
|
|
||||||
<DialogCreateCommand
|
<DialogCreateCommand
|
||||||
v-model:modal="modalCommand"
|
v-model:modal="modalCommand"
|
||||||
:command-type-code="props.mainTabs === '1' ? commandType : 'C-PM-41'"
|
:command-type-code="props.mainTabs === '1' ? 'C-PM-17' : 'C-PM-41'"
|
||||||
:persons="dataMapToSend"
|
:persons="dataMapToSend"
|
||||||
:fetch-data="props.fecthList"
|
:fetch-data="props.fecthList"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@ const {
|
||||||
success,
|
success,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
convertDateToAPI,
|
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
/** ตัวแปร */
|
/** ตัวแปร */
|
||||||
|
|
@ -478,8 +477,9 @@ function onSubmitConditions() {
|
||||||
function onSubmitAttached() {
|
function onSubmitAttached() {
|
||||||
dialogConfirm($q, async () => {
|
dialogConfirm($q, async () => {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
const send: string = convertDateToAPI(date.value) ?? "";
|
const send = date.value !== null ? new Date(date.value).toUTCString() : "";
|
||||||
const activeDate: string = convertDateToAPI(dateLeave.value) ?? "";
|
const activeDate =
|
||||||
|
dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : "";
|
||||||
formData.append("Location", location.value);
|
formData.append("Location", location.value);
|
||||||
formData.append("SendDate", send);
|
formData.append("SendDate", send);
|
||||||
formData.append("ActiveDate", activeDate);
|
formData.append("ActiveDate", activeDate);
|
||||||
|
|
@ -771,13 +771,10 @@ onMounted(async () => {
|
||||||
<q-space />
|
<q-space />
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
(!checkRoutePermisson &&
|
!checkRoutePermisson &&
|
||||||
isStaff &&
|
isStaff &&
|
||||||
status === 'WAITTING' &&
|
status === 'WAITTING' &&
|
||||||
checkPermission($route)?.attrIsUpdate) ||
|
checkPermission($route)?.attrIsUpdate
|
||||||
(!checkRoutePermisson &&
|
|
||||||
((isStaff && group === '1.1' && approveStep === 'st1') ||
|
|
||||||
(isOfficer && group !== '1.1' && approveStep === 'st3')))
|
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ const {
|
||||||
hideLoader,
|
hideLoader,
|
||||||
success,
|
success,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
convertDateToAPI,
|
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailreject");
|
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailreject");
|
||||||
|
|
@ -314,8 +313,9 @@ async function clickCancel() {
|
||||||
function onSubmitAttached() {
|
function onSubmitAttached() {
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, () => {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
const send: string = convertDateToAPI(date.value) ?? "";
|
const send = date.value !== null ? new Date(date.value).toUTCString() : "";
|
||||||
const activeDate: string = convertDateToAPI(dateLeave.value) ?? "";
|
const activeDate =
|
||||||
|
dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : "";
|
||||||
formData.append("Location", location.value);
|
formData.append("Location", location.value);
|
||||||
formData.append("SendDate", send);
|
formData.append("SendDate", send);
|
||||||
formData.append("ActiveDate", activeDate);
|
formData.append("ActiveDate", activeDate);
|
||||||
|
|
@ -439,7 +439,7 @@ onMounted(async () => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.push('/retirement/resign')"
|
@click="router.push('/retirement/resign')"
|
||||||
/>
|
/>
|
||||||
รายละเอียดการยกเลิกลาออก
|
รายละเอียดการยกเลิกลาออก
|
||||||
{{
|
{{
|
||||||
dataDetail.prefix + dataDetail.firstName + " " + dataDetail.lastName
|
dataDetail.prefix + dataDetail.firstName + " " + dataDetail.lastName
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,7 @@ const {
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
dialogRemove,
|
findOrgName,
|
||||||
success,
|
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
/** Table */
|
/** 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 */
|
/**Hook */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
status.value = stroeResign.formQurey.status;
|
status.value = stroeResign.formQurey.status;
|
||||||
|
|
@ -324,11 +308,7 @@ onMounted(async () => {
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="mdi-account-arrow-right"
|
icon="mdi-account-arrow-right"
|
||||||
>
|
>
|
||||||
<q-tooltip>{{
|
<q-tooltip>{{ `ส่งไปออกคำสั่ง${stroeResign.mainTabs == '2'?"ยกเลิกการ":''}ลาออก` }}</q-tooltip>
|
||||||
`ส่งไปออกคำสั่ง${
|
|
||||||
stroeResign.mainTabs == "2" ? "ยกเลิกการ" : ""
|
|
||||||
}ลาออก`
|
|
||||||
}}</q-tooltip>
|
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
@ -413,26 +393,6 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="
|
|
||||||
checkPermission($route)?.attrOwnership === 'OWNER' &&
|
|
||||||
props.row.status !== 'REPORT' &&
|
|
||||||
props.row.status !== 'WAITING' &&
|
|
||||||
props.row.status !== 'DONE' &&
|
|
||||||
props.row.status !== 'CANCELING' &&
|
|
||||||
props.row.status !== 'CANCEL' &&
|
|
||||||
stroeResign.mainTabs === '1'
|
|
||||||
"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
color="red"
|
|
||||||
icon="delete"
|
|
||||||
@click.prevent="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -801,11 +801,10 @@ onMounted(async () => {
|
||||||
<q-space />
|
<q-space />
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
(!checkRoutePermisson &&
|
!checkRoutePermisson &&
|
||||||
isStaff &&
|
isStaff &&
|
||||||
status === 'WAITTING' &&
|
status === 'WAITTING' &&
|
||||||
checkPermission($route)?.attrIsUpdate) ||
|
checkPermission($route)?.attrIsUpdate
|
||||||
(!checkRoutePermisson && isStaff && approveStep === 'st1')
|
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ const {
|
||||||
hideLoader,
|
hideLoader,
|
||||||
success,
|
success,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
convertDateToAPI,
|
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
/** ตัวแปร */
|
/** ตัวแปร */
|
||||||
|
|
@ -302,9 +301,9 @@ async function clickCancel() {
|
||||||
function onSubmitAttached() {
|
function onSubmitAttached() {
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, () => {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
const send: string = convertDateToAPI(date.value) ?? "";
|
const send = date.value !== null ? new Date(date.value).toUTCString() : "";
|
||||||
const activeDate: string = convertDateToAPI(dateLeave.value) ?? "";
|
const activeDate =
|
||||||
|
dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : "";
|
||||||
formData.append("Location", location.value);
|
formData.append("Location", location.value);
|
||||||
formData.append("SendDate", send);
|
formData.append("SendDate", send);
|
||||||
formData.append("ActiveDate", activeDate);
|
formData.append("ActiveDate", activeDate);
|
||||||
|
|
|
||||||
|
|
@ -27,15 +27,8 @@ const stroeResign = useDataStore();
|
||||||
const { statusText } = stroe;
|
const { statusText } = stroe;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const { messageError, date2Thai, showLoader, hideLoader, onSearchDataTable } =
|
||||||
messageError,
|
mixin;
|
||||||
date2Thai,
|
|
||||||
showLoader,
|
|
||||||
hideLoader,
|
|
||||||
onSearchDataTable,
|
|
||||||
dialogRemove,
|
|
||||||
success,
|
|
||||||
} = mixin;
|
|
||||||
|
|
||||||
/** Table */
|
/** Table */
|
||||||
const rows = ref<ResponseItems[]>([]);
|
const rows = ref<ResponseItems[]>([]);
|
||||||
|
|
@ -136,7 +129,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "status",
|
field: "status",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return stroeResign.mainTabsEMP === "1"
|
return stroeResign.mainTabs === "1"
|
||||||
? statusText(row.status)
|
? statusText(row.status)
|
||||||
: 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 */
|
/**Hook */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
statusEMP.value = stroeResign.formQureyEMP.status;
|
statusEMP.value = stroeResign.formQureyEMP.status;
|
||||||
|
|
@ -413,26 +391,6 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="
|
|
||||||
checkPermission($route)?.attrOwnership === 'OWNER' &&
|
|
||||||
props.row.status !== 'REPORT' &&
|
|
||||||
props.row.status !== 'WAITING' &&
|
|
||||||
props.row.status !== 'DONE' &&
|
|
||||||
props.row.status !== 'CANCELING' &&
|
|
||||||
props.row.status !== 'CANCEL' &&
|
|
||||||
stroeResign.mainTabsEMP === '1'
|
|
||||||
"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
color="red"
|
|
||||||
icon="delete"
|
|
||||||
@click.prevent="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { useQuasar } from "quasar";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useStructureTree } from "@/stores/structureTree";
|
import { useStructureTree } from "@/stores/structureTree";
|
||||||
import { formatPosmasterNo } from "@/utils/function";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -75,12 +74,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posMasterNo",
|
field: "posMasterNo",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return formatPosmasterNo(
|
return `${row.orgShortname} ${row.posMasterNo}`;
|
||||||
row.orgShortname,
|
|
||||||
row.posMasterNoPrefix,
|
|
||||||
row.posMasterNo.toString(),
|
|
||||||
row.posMasterNoSuffix
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ watch(
|
||||||
:close="close"
|
:close="close"
|
||||||
/>
|
/>
|
||||||
<q-separator color="grey-4" />
|
<q-separator color="grey-4" />
|
||||||
<q-card-section style="max-height: 55vh" class="scroll q-pa-none">
|
<q-card-section style="max-height: 80vh" class="scroll q-pa-none">
|
||||||
<div
|
<div
|
||||||
class="col q-ma-md q-pa-sm bg-white border_custom text-weight-medium"
|
class="col q-ma-md q-pa-sm bg-white border_custom text-weight-medium"
|
||||||
>
|
>
|
||||||
|
|
@ -362,7 +362,6 @@ watch(
|
||||||
</datepicker>
|
</datepicker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="col q-ma-md q-pa-sm bg-white border_custom text-weight-medium"
|
class="col q-ma-md q-pa-sm bg-white border_custom text-weight-medium"
|
||||||
>
|
>
|
||||||
|
|
@ -514,7 +513,6 @@ watch(
|
||||||
</datepicker>
|
</datepicker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
class="col-12 bg-white q-ma-md"
|
class="col-12 bg-white q-ma-md"
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -524,8 +522,7 @@ watch(
|
||||||
label="คำอธิบาย"
|
label="คำอธิบาย"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
type="textarea"
|
type="textarea"
|
||||||
/>
|
></q-input>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="col q-ma-md q-pa-sm bg-white border_custom text-weight-medium"
|
class="col q-ma-md q-pa-sm bg-white border_custom text-weight-medium"
|
||||||
>
|
>
|
||||||
|
|
@ -544,7 +541,6 @@ watch(
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="col q-ma-md q-pa-sm bg-white border_custom text-weight-medium"
|
class="col q-ma-md q-pa-sm bg-white border_custom text-weight-medium"
|
||||||
>
|
>
|
||||||
|
|
@ -563,7 +559,6 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
<q-separator color="grey-4" v-if="!isRead" />
|
<q-separator color="grey-4" v-if="!isRead" />
|
||||||
<div class="q-pa-sm" v-if="!isRead">
|
<div class="q-pa-sm" v-if="!isRead">
|
||||||
<div class="row justify-end">
|
<div class="row justify-end">
|
||||||
|
|
|
||||||
|
|
@ -1,263 +0,0 @@
|
||||||
<script setup lang="ts">
|
|
||||||
import { onMounted, ref } from "vue";
|
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
|
||||||
import config from "@/app.config";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
import type { DataOption } from "@/interface/main";
|
|
||||||
import type { DataPendingJobs } from "@/modules/09_leave/interface/response/work";
|
|
||||||
|
|
||||||
const $q = useQuasar();
|
|
||||||
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
|
||||||
useCounterMixin();
|
|
||||||
|
|
||||||
/** ข้อมูลตาราง*/
|
|
||||||
const keyword = ref<string>("");
|
|
||||||
const timeOutMinutes = ref<string>("30");
|
|
||||||
const rowsMain = ref<DataPendingJobs[]>([]);
|
|
||||||
const rows = ref<DataPendingJobs[]>([]);
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
|
||||||
{
|
|
||||||
name: "no",
|
|
||||||
align: "left",
|
|
||||||
label: "ลำดับ",
|
|
||||||
sortable: false,
|
|
||||||
field: "no",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "createdFullName",
|
|
||||||
align: "left",
|
|
||||||
label: "ชื่อ-นามสกุล",
|
|
||||||
sortable: true,
|
|
||||||
field: "createdFullName",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "checkType",
|
|
||||||
align: "left",
|
|
||||||
label: "ลงเวลาเข้า/ลงเวลาออก",
|
|
||||||
sortable: true,
|
|
||||||
field: "checkType",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format(val, row) {
|
|
||||||
return val ? convertcheckType(val) : "-";
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "status",
|
|
||||||
align: "left",
|
|
||||||
label: "สถานะ ",
|
|
||||||
sortable: true,
|
|
||||||
field: "status",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format(val, row) {
|
|
||||||
return val ? convertStatus(val) : "-";
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "createdDate",
|
|
||||||
align: "left",
|
|
||||||
label: "ลงเวลาเมื่อ",
|
|
||||||
sortable: true,
|
|
||||||
field: "createdDate",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format(val, row) {
|
|
||||||
return val ? date2Thai(val, false, true) : "-";
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "processingDate",
|
|
||||||
align: "left",
|
|
||||||
label: "เริ่มประมวลผล",
|
|
||||||
sortable: true,
|
|
||||||
field: "processingDate",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format(val, row) {
|
|
||||||
return val ? date2Thai(val, false, true) : "-";
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "completedDate",
|
|
||||||
align: "left",
|
|
||||||
label: "ประมวลผลเสร็จ",
|
|
||||||
sortable: true,
|
|
||||||
field: "completedDate",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format(val, row) {
|
|
||||||
return val ? date2Thai(val, false, true) : "-";
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const visibleColumns = ref<string[]>([
|
|
||||||
"no",
|
|
||||||
"createdFullName",
|
|
||||||
"checkType",
|
|
||||||
"status",
|
|
||||||
"createdDate",
|
|
||||||
"processingDate",
|
|
||||||
"completedDate",
|
|
||||||
]);
|
|
||||||
const timeOutMinutesOption = ref<DataOption[]>([
|
|
||||||
{ id: "30", label: "30 นาที" },
|
|
||||||
{ id: "60", label: "1 ชั่วโมง" },
|
|
||||||
{ id: "1440", label: "1 วัน" },
|
|
||||||
{ id: "10080", label: "7 วัน" },
|
|
||||||
]);
|
|
||||||
|
|
||||||
/** ฟังก์ชันดึงข้อมูลจาก API */
|
|
||||||
async function fetchData() {
|
|
||||||
try {
|
|
||||||
showLoader();
|
|
||||||
const res = await http.get(
|
|
||||||
`${config.API.leavePendingJobs}${Number(timeOutMinutes.value)}`
|
|
||||||
);
|
|
||||||
|
|
||||||
rowsMain.value = res.data.result;
|
|
||||||
serchDataTable();
|
|
||||||
} catch (error) {
|
|
||||||
messageError($q, error);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ฟังก์ชันค้นหาข้อมูลในตาราง */
|
|
||||||
function serchDataTable() {
|
|
||||||
rows.value = onSearchDataTable(
|
|
||||||
keyword.value,
|
|
||||||
rowsMain.value,
|
|
||||||
columns.value ? columns.value : []
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ฟังก์ชันแปลงสถานะเป็นข้อความ
|
|
||||||
* @param val
|
|
||||||
*/
|
|
||||||
function convertStatus(val: string) {
|
|
||||||
switch (val) {
|
|
||||||
case "PENDING":
|
|
||||||
return "รอดำเนินการ";
|
|
||||||
case "COMPLETED":
|
|
||||||
return "ดำเนินการเสร็จสิ้น";
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function convertcheckType(val: string) {
|
|
||||||
switch (val) {
|
|
||||||
case "CHECK_OUT":
|
|
||||||
return "ลงเวลาออก";
|
|
||||||
case "CHECK_IN":
|
|
||||||
return "ลงเวลาเข้า";
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
fetchData();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
|
||||||
<q-select
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
option-value="id"
|
|
||||||
option-label="label"
|
|
||||||
label="เวลาย้อนหลัง"
|
|
||||||
use-input
|
|
||||||
v-model="timeOutMinutes"
|
|
||||||
hide-selected
|
|
||||||
fill-input
|
|
||||||
:options="timeOutMinutesOption"
|
|
||||||
@update:model-value="fetchData"
|
|
||||||
>
|
|
||||||
<template v-slot:no-option>
|
|
||||||
<q-item>
|
|
||||||
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</template>
|
|
||||||
</q-select>
|
|
||||||
<q-space />
|
|
||||||
|
|
||||||
<q-input
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
v-model="keyword"
|
|
||||||
label="ค้นหา"
|
|
||||||
@keydown.enter.prevent="serchDataTable"
|
|
||||||
>
|
|
||||||
<template v-slot:append>
|
|
||||||
<q-icon name="search" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
<q-select
|
|
||||||
v-model="visibleColumns"
|
|
||||||
multiple
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
options-dense
|
|
||||||
:display-value="$q.lang.table.columns"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
:options="columns"
|
|
||||||
option-value="name"
|
|
||||||
style="min-width: 140px"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<d-table
|
|
||||||
:columns="columns"
|
|
||||||
:rows="rows"
|
|
||||||
row-key="id"
|
|
||||||
flat
|
|
||||||
bordered
|
|
||||||
:paging="true"
|
|
||||||
dense
|
|
||||||
class="custom-header-table"
|
|
||||||
:visible-columns="visibleColumns"
|
|
||||||
>
|
|
||||||
<template v-slot:header="props">
|
|
||||||
<q-tr :props="props">
|
|
||||||
<q-th
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
style="color: #000000; font-weight: 500"
|
|
||||||
>
|
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
|
||||||
</q-th>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
<template v-slot:body="props">
|
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
|
||||||
<div v-if="col.name == 'no'">
|
|
||||||
{{ props.rowIndex + 1 }}
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value ? col.value : "-" }}
|
|
||||||
</div>
|
|
||||||
</q-td>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
|
|
@ -96,8 +96,8 @@ watch(
|
||||||
formData.checkOut = "";
|
formData.checkOut = "";
|
||||||
formData.note = "";
|
formData.note = "";
|
||||||
} else if (props.editCheck === "PENDING") {
|
} else if (props.editCheck === "PENDING") {
|
||||||
if (props.detailData) {
|
if (props.detailData) {
|
||||||
if (props.detailData.checkInEdit && props.detailData.checkOutEdit) {
|
if (props.detailData.checkInEdit) {
|
||||||
formData.checkIn = props.detailData.startTimeMorning;
|
formData.checkIn = props.detailData.startTimeMorning;
|
||||||
formData.checkOut = props.detailData.endTimeAfternoon;
|
formData.checkOut = props.detailData.endTimeAfternoon;
|
||||||
} else if (
|
} else if (
|
||||||
|
|
|
||||||
|
|
@ -1,344 +0,0 @@
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref, watch } from "vue";
|
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
|
||||||
import config from "@/app.config";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useSpecialTimeStore } from "@/modules/09_leave/stores/SpecialTimeStore";
|
|
||||||
import { usePagination } from "@/composables/usePagination";
|
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
import type { DataSpecialTime } from "@/modules/09_leave/interface/index/Main";
|
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
|
||||||
|
|
||||||
const $q = useQuasar();
|
|
||||||
const store = useSpecialTimeStore();
|
|
||||||
const {
|
|
||||||
hideLoader,
|
|
||||||
messageError,
|
|
||||||
showLoader,
|
|
||||||
success,
|
|
||||||
date2Thai,
|
|
||||||
dialogConfirm,
|
|
||||||
dialogMessageNotify,
|
|
||||||
dateToISO,
|
|
||||||
} = useCounterMixin();
|
|
||||||
const { pagination, params, onRequest } = usePagination("", fetchDataList);
|
|
||||||
|
|
||||||
/** props*/
|
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
|
||||||
const props = defineProps({
|
|
||||||
fetchData: { type: Function, default: () => {} },
|
|
||||||
dateThaiRange: { type: Function, default: () => {} },
|
|
||||||
columns: { type: Array as () => QTableProps["columns"], default: () => [] },
|
|
||||||
visibleColumnsMain: { type: Array as () => string[], default: () => [] },
|
|
||||||
});
|
|
||||||
|
|
||||||
const filterKeyword = ref<string>("");
|
|
||||||
const filterStatus = ref<string>("PENDING");
|
|
||||||
const filterDate = ref<[Date, Date] | null>([new Date(), new Date()]); //วันที่ประกาศ
|
|
||||||
|
|
||||||
const rows = ref<DataSpecialTime[]>([]);
|
|
||||||
const visibleColumns = ref<string[]>(props.visibleColumnsMain);
|
|
||||||
const selected = ref<DataSpecialTime[]>([]);
|
|
||||||
const reason = ref<string>("");
|
|
||||||
|
|
||||||
/** ฟังก์ชันเรียกข้อมูลรายการลงเวลากรณีพิเศษ*/
|
|
||||||
async function fetchDataList() {
|
|
||||||
showLoader();
|
|
||||||
selected.value = [];
|
|
||||||
await http
|
|
||||||
.get(config.API.specialTime(), {
|
|
||||||
params: {
|
|
||||||
...params.value,
|
|
||||||
keyword: filterKeyword.value.trim(),
|
|
||||||
status: filterStatus.value,
|
|
||||||
startDate: filterDate.value ? dateToISO(filterDate.value[0]) : null,
|
|
||||||
endDate: filterDate.value ? dateToISO(filterDate.value[1]) : null,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then(async (res) => {
|
|
||||||
const result = await res.data.result;
|
|
||||||
pagination.value.rowsNumber = result.total;
|
|
||||||
if (result.data.length > 0) {
|
|
||||||
rows.value = result.data.map((e: DataSpecialTime) => ({
|
|
||||||
...e,
|
|
||||||
date: date2Thai(new Date(e.createdAt), false, true),
|
|
||||||
dateFix: date2Thai(new Date(e.checkDate)),
|
|
||||||
timeMorning:
|
|
||||||
e.startTimeMorning == null
|
|
||||||
? "-"
|
|
||||||
: e.checkInEdit == true
|
|
||||||
? e.startTimeMorning + " - " + e.endTimeMorning
|
|
||||||
: "-",
|
|
||||||
timeAfternoon:
|
|
||||||
e.startTimeAfternoon == null
|
|
||||||
? "-"
|
|
||||||
: e.checkOutEdit == true
|
|
||||||
? e.startTimeAfternoon + " - " + e.endTimeAfternoon
|
|
||||||
: "-",
|
|
||||||
checkIn: e.checkInTime,
|
|
||||||
checkOut: e.checkOutTime,
|
|
||||||
checkInStatus: store.convertStatus(e.checkInStatus),
|
|
||||||
checkOutStatus: store.convertStatus(e.checkOutStatus),
|
|
||||||
checkInStatusMain: e.checkInStatus,
|
|
||||||
checkOutStatusMain: e.checkOutStatus,
|
|
||||||
}));
|
|
||||||
} else {
|
|
||||||
rows.value = [];
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
rows.value = [];
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ฟังก์ชันบันทึกข้อมูล*/
|
|
||||||
function onSubmit() {
|
|
||||||
if (selected.value.length === 0) {
|
|
||||||
dialogMessageNotify($q, "กรุณาเลือกอย่างน้อย 1 รายการ");
|
|
||||||
} else {
|
|
||||||
dialogConfirm($q, async () => {
|
|
||||||
showLoader();
|
|
||||||
const payload = selected.value.map((e: DataSpecialTime) => {
|
|
||||||
let checkInTime: string;
|
|
||||||
let checkOutTime: string;
|
|
||||||
|
|
||||||
if (e.checkInEdit && e.checkOutEdit) {
|
|
||||||
checkInTime = e.startTimeMorning;
|
|
||||||
checkOutTime = e.endTimeAfternoon;
|
|
||||||
} else if (e.checkInEdit && !e.checkOutEdit) {
|
|
||||||
checkInTime = e.startTimeMorning;
|
|
||||||
checkOutTime = e.endTimeMorning;
|
|
||||||
} else if (!e.checkInEdit && e.checkOutEdit) {
|
|
||||||
checkInTime = e.startTimeAfternoon;
|
|
||||||
checkOutTime = e.endTimeAfternoon;
|
|
||||||
} else {
|
|
||||||
checkInTime = e.checkInTime;
|
|
||||||
checkOutTime = e.checkOutTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
recId: e.id,
|
|
||||||
checkInTime,
|
|
||||||
checkOutTime,
|
|
||||||
checkInStatus: e.checkInEdit ? "NORMAL" : e.checkInStatusMain,
|
|
||||||
checkOutStatus: e.checkOutEdit ? "NORMAL" : e.checkOutStatusMain,
|
|
||||||
reason: reason.value,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
try {
|
|
||||||
await http.put(config.API.specialTimeApproveLists, payload);
|
|
||||||
await props.fetchData();
|
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
|
||||||
handleClose();
|
|
||||||
} catch (error) {
|
|
||||||
messageError($q, error);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ฟังก์ชั่นค้นหาข้อมูล */
|
|
||||||
function onSearchData() {
|
|
||||||
pagination.value.page = 1;
|
|
||||||
fetchDataList();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ฟังก์ชันปิด*/
|
|
||||||
function handleClose() {
|
|
||||||
modal.value = false;
|
|
||||||
selected.value = [];
|
|
||||||
rows.value = [];
|
|
||||||
reason.value = "";
|
|
||||||
filterDate.value = [new Date(), new Date()];
|
|
||||||
filterKeyword.value = "";
|
|
||||||
pagination.value.page = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
watch(modal, async (val) => {
|
|
||||||
if (val) {
|
|
||||||
await fetchDataList();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<q-dialog v-model="modal" persistent>
|
|
||||||
<q-card style="min-width: 800px">
|
|
||||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
|
||||||
<DialogHeader
|
|
||||||
tittle="อนุมัติการลงเวลากรณีพิเศษแบบหลายรายการ"
|
|
||||||
:close="handleClose"
|
|
||||||
/>
|
|
||||||
<q-separator />
|
|
||||||
<q-card-section class="row q-col-gutter-sm">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="row col-12 q-col-gutter-sm">
|
|
||||||
<div class="col-xs-12 col-sm-6 col-md-5">
|
|
||||||
<datepicker
|
|
||||||
v-model="filterDate"
|
|
||||||
:locale="'th'"
|
|
||||||
autoApply
|
|
||||||
borderless
|
|
||||||
range
|
|
||||||
:enableTimePicker="false"
|
|
||||||
week-start="0"
|
|
||||||
@update:modelValue="onSearchData()"
|
|
||||||
>
|
|
||||||
<template #year="{ year }">
|
|
||||||
{{ year + 543 }}
|
|
||||||
</template>
|
|
||||||
<template #year-overlay-value="{ value }">
|
|
||||||
{{ parseInt(value + 543) }}
|
|
||||||
</template>
|
|
||||||
<template #trigger>
|
|
||||||
<q-input
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
class="full-width datepicker"
|
|
||||||
:model-value="
|
|
||||||
filterDate != null ? dateThaiRange(filterDate) : null
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon
|
|
||||||
name="event"
|
|
||||||
class="cursor-pointer"
|
|
||||||
style="color: var(--q-primary)"
|
|
||||||
>
|
|
||||||
</q-icon>
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</template>
|
|
||||||
</datepicker>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<q-space v-if="!$q.screen.xs && !$q.screen.sm" />
|
|
||||||
<div class="col-xs-12 col-sm-6 col-md-4">
|
|
||||||
<q-input
|
|
||||||
standout
|
|
||||||
dense
|
|
||||||
v-model="filterKeyword"
|
|
||||||
outlined
|
|
||||||
placeholder="ค้นหาชื่อ-นามสกุล"
|
|
||||||
@keydown.enter.prevent="onSearchData()"
|
|
||||||
>
|
|
||||||
<template v-slot:append>
|
|
||||||
<q-icon name="search" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-6 col-md-2">
|
|
||||||
<q-select
|
|
||||||
v-model="visibleColumns"
|
|
||||||
multiple
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
options-dense
|
|
||||||
:display-value="$q.lang.table.columns"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
:options="columns"
|
|
||||||
option-value="name"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<span class="text-red"
|
|
||||||
>*หมายเหตุเลือกทั้งหมดเฉพาะรายการที่แสดงเท่านั้น</span
|
|
||||||
>
|
|
||||||
<div class="col-12">
|
|
||||||
<p-table
|
|
||||||
:columns="columns"
|
|
||||||
:rows="rows"
|
|
||||||
row-key="id"
|
|
||||||
flat
|
|
||||||
bordered
|
|
||||||
:paging="false"
|
|
||||||
dense
|
|
||||||
:visible-columns="visibleColumns"
|
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
|
||||||
v-model:pagination="pagination"
|
|
||||||
@request="onRequest"
|
|
||||||
selection="multiple"
|
|
||||||
v-model:selected="selected"
|
|
||||||
>
|
|
||||||
<template v-slot:header-selection="scope">
|
|
||||||
<q-checkbox
|
|
||||||
keep-color
|
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
v-model="scope.selected"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-slot:body="props">
|
|
||||||
<q-tr :props="props">
|
|
||||||
<q-td>
|
|
||||||
<q-checkbox
|
|
||||||
keep-color
|
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
v-model="props.selected"
|
|
||||||
/>
|
|
||||||
</q-td>
|
|
||||||
<q-td
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
>
|
|
||||||
<div v-if="col.name == 'no'">
|
|
||||||
{{ props.rowIndex + 1 }}
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-else-if="col.name === 'description'"
|
|
||||||
class="table_ellipsis"
|
|
||||||
>
|
|
||||||
{{ col.value ?? "-" }}
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value ?? "-" }}
|
|
||||||
</div>
|
|
||||||
</q-td>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
</p-table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12">
|
|
||||||
<q-input
|
|
||||||
outlined
|
|
||||||
v-model="reason"
|
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
type="textarea"
|
|
||||||
:rules="[(val:string) => !!val || 'กรุณาเหตุผลการอนุมัติ']"
|
|
||||||
label="เหตุผลการอนุมัติ"
|
|
||||||
hide-bottom-space
|
|
||||||
rows="3"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
|
||||||
<q-separator />
|
|
||||||
<q-card-actions align="right">
|
|
||||||
<q-btn label="บันทึก" color="public" id="onSubmit" type="submit">
|
|
||||||
<q-tooltip>บันทึก</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-card-actions>
|
|
||||||
</q-form>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
|
|
@ -260,14 +260,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const isSysCancel = computed(() => {
|
|
||||||
return (
|
|
||||||
formData.reasonOligarch === "อนุมัติการขอยกเลิกการลา โดยระบบ" &&
|
|
||||||
statusCheck.value === "DELETE"
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชั่นเรียกรายละเอียดของข้อมูล
|
* ฟังก์ชั่นเรียกรายละเอียดของข้อมูล
|
||||||
* @param paramsId รับ ID จาก paramID
|
* @param paramsId รับ ID จาก paramID
|
||||||
|
|
@ -1044,12 +1036,7 @@ onMounted(async () => {
|
||||||
props.row.comment == ''
|
props.row.comment == ''
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div v-if="isSysCancel" class="text-red-6">
|
|
||||||
ยังไม่ได้แสดงความคิดเห็น
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-else
|
|
||||||
dense
|
dense
|
||||||
:disable="
|
:disable="
|
||||||
statusCheck == 'NEW' ||
|
statusCheck == 'NEW' ||
|
||||||
|
|
@ -1146,13 +1133,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div v-if="isSysCancel" class="row col-12 q-pa-md">
|
<div class="row col-12 q-pa-md">
|
||||||
<q-banner class="bg-red-2 text-red-6 full-width" rounded>
|
|
||||||
ผู้มีอำนาจยังไม่ได้พิจารณา ใบลานี้ถูกยกเลิกแล้ว
|
|
||||||
</q-banner>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row col-12 q-pa-md" v-else>
|
|
||||||
<div class="col-12 row bg-white q-col-gutter-md">
|
<div class="col-12 row bg-white q-col-gutter-md">
|
||||||
<div class="col-xs-6 row items-start">
|
<div class="col-xs-6 row items-start">
|
||||||
<div class="col-12 text-weight-bold text-top">
|
<div class="col-12 text-weight-bold text-top">
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted, computed } from "vue";
|
import { ref, reactive, onMounted } from "vue";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
|
|
@ -158,13 +158,6 @@ const isLoadData = ref<boolean>(false);
|
||||||
const leaveType = ref<LeaveType[]>([]); //ประเภทการลา
|
const leaveType = ref<LeaveType[]>([]); //ประเภทการลา
|
||||||
const checkForm = ref<string>(""); //เช็คประเภทการลา
|
const checkForm = ref<string>(""); //เช็คประเภทการลา
|
||||||
|
|
||||||
const isSysCancel = computed(() => {
|
|
||||||
return (
|
|
||||||
formData.reasonOligarch === "อนุมัติการขอยกเลิกการลา โดยระบบ" &&
|
|
||||||
statusCheck.value === "DELETE"
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์เรียกข้อมูลรายละเอียดของการยกเลิกลา
|
* ฟังก์เรียกข้อมูลรายละเอียดของการยกเลิกลา
|
||||||
* @param paramsId รับ ID จาก paramID
|
* @param paramsId รับ ID จาก paramID
|
||||||
|
|
@ -776,13 +769,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
<div class="row col-12 q-pa-md">
|
||||||
<div v-if="isSysCancel" class="row col-12 q-pa-md">
|
|
||||||
<q-banner class="bg-green-2 text-green-6 full-width" rounded>
|
|
||||||
{{ formDataReject.leaveDirectorComment }}
|
|
||||||
</q-banner>
|
|
||||||
</div>
|
|
||||||
<div class="row col-12 q-pa-md" v-else>
|
|
||||||
<div class="col-12 row bg-white q-col-gutter-md">
|
<div class="col-12 row bg-white q-col-gutter-md">
|
||||||
<div class="col-xs-6 row items-start">
|
<div class="col-xs-6 row items-start">
|
||||||
<div class="col-12 text-weight-bold text-top">
|
<div class="col-12 text-weight-bold text-top">
|
||||||
|
|
@ -812,7 +799,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div class="col-xs-6 row items-start">
|
<div class="col-xs-6 row items-start">
|
||||||
<div class="col-12 text-weight-bold text-top">
|
<div class="col-12 text-weight-bold text-top">
|
||||||
ผลการพิจารณายกเลิกวันลา
|
ผลการพิจารณา
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 text-detail">
|
<div class="col-12 text-detail">
|
||||||
{{
|
{{
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ const props = defineProps({
|
||||||
const pageId = ref<string>(route.params.id as string);
|
const pageId = ref<string>(route.params.id as string);
|
||||||
const keyword = ref<string>("");
|
const keyword = ref<string>("");
|
||||||
const isAct = ref<boolean>(false);
|
const isAct = ref<boolean>(false);
|
||||||
const isAllDirector = ref<boolean>(false);
|
|
||||||
|
|
||||||
const total = ref<number>(0);
|
const total = ref<number>(0);
|
||||||
const totalList = ref<number>(1);
|
const totalList = ref<number>(1);
|
||||||
|
|
@ -106,7 +105,6 @@ async function getData() {
|
||||||
page: pagination.value.page,
|
page: pagination.value.page,
|
||||||
keyword: keyword.value,
|
keyword: keyword.value,
|
||||||
isAct: isAct.value,
|
isAct: isAct.value,
|
||||||
isAllDirector: isAllDirector.value,
|
|
||||||
keycloakId: props.keycloakUserId,
|
keycloakId: props.keycloakUserId,
|
||||||
type:
|
type:
|
||||||
props.profileType?.toLocaleLowerCase() === "officer"
|
props.profileType?.toLocaleLowerCase() === "officer"
|
||||||
|
|
@ -198,7 +196,6 @@ function closeDialog() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
rows.value = [];
|
rows.value = [];
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
isAllDirector.value = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
|
@ -234,45 +231,19 @@ watch(
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="row q-col-gutter-sm">
|
<div class="row q-col-gutter-sm">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row items-center q-mb-sm">
|
<div class="row q-gutter-x-xs">
|
||||||
<q-input
|
<q-input
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
label="ค้นหา"
|
label="ค้นหา"
|
||||||
v-model="keyword"
|
v-model="keyword"
|
||||||
class="col-grow"
|
style="width: 300px"
|
||||||
style="max-width: 400px"
|
|
||||||
@keydown.enter.prevent="onSearchData()"
|
@keydown.enter.prevent="onSearchData()"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search"></q-icon>
|
<q-icon name="search"></q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
<q-space />
|
|
||||||
|
|
||||||
<q-btn
|
|
||||||
color="primary"
|
|
||||||
icon="search"
|
|
||||||
label="ค้นหา"
|
|
||||||
class="q-px-md"
|
|
||||||
@click.prevent="onSearchData"
|
|
||||||
style="width: 150px"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="row items-center q-gutter-x-md text-subtitle2 text-grey-8"
|
|
||||||
>
|
|
||||||
<q-checkbox
|
|
||||||
keep-color
|
|
||||||
v-model="isAllDirector"
|
|
||||||
label="หัวหน้าทั้งหน่วยงาน"
|
|
||||||
color="primary"
|
|
||||||
@update:model-value="onSearchData"
|
|
||||||
>
|
|
||||||
<q-tooltip>หัวหน้าทั้งหน่วยงาน</q-tooltip>
|
|
||||||
</q-checkbox>
|
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
keep-color
|
keep-color
|
||||||
v-model="isAct"
|
v-model="isAct"
|
||||||
|
|
@ -280,11 +251,20 @@ watch(
|
||||||
color="primary"
|
color="primary"
|
||||||
@update:model-value="onSearchData"
|
@update:model-value="onSearchData"
|
||||||
>
|
>
|
||||||
<q-tooltip>แสดงเฉพาะรักษาการแทน</q-tooltip>
|
<q-tooltip>แสดงเฉพาะรักษาการแทน </q-tooltip>
|
||||||
</q-checkbox>
|
</q-checkbox>
|
||||||
|
<q-space />
|
||||||
|
<q-btn
|
||||||
|
color="primary"
|
||||||
|
icon="search"
|
||||||
|
label="ค้นหา"
|
||||||
|
class="q-pa-sm"
|
||||||
|
@click.prevent="onSearchData"
|
||||||
|
style="width: 200px"
|
||||||
|
>
|
||||||
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 text-red">
|
<div class="col-12 text-red">
|
||||||
{{
|
{{
|
||||||
props.type == "APPROVER"
|
props.type == "APPROVER"
|
||||||
|
|
|
||||||
|
|
@ -1,59 +1,17 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, computed } from "vue";
|
import { ref, onMounted, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
|
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import http from "@/plugins/http";
|
|
||||||
import config from "@/app.config";
|
|
||||||
|
|
||||||
const $q = useQuasar();
|
|
||||||
const leaveStore = useLeavelistDataStore();
|
const leaveStore = useLeavelistDataStore();
|
||||||
const route = useRoute();
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { showLoader, hideLoader, messageError, dialogRemove, success } =
|
|
||||||
useCounterMixin();
|
|
||||||
|
|
||||||
const total = defineModel<number>("total", { required: true });
|
const total = defineModel<number>("total", { required: true });
|
||||||
const totalList = defineModel<number>("totalList", { required: true });
|
const totalList = defineModel<number>("totalList", { required: true });
|
||||||
const pagination = defineModel<any>("pagination", { required: true });
|
const pagination = defineModel<any>("pagination", { required: true });
|
||||||
const props = defineProps({
|
|
||||||
getList: Function,
|
|
||||||
rows: {
|
|
||||||
type: Object,
|
|
||||||
require: true,
|
|
||||||
},
|
|
||||||
page: {
|
|
||||||
type: Number,
|
|
||||||
require: true,
|
|
||||||
},
|
|
||||||
rowsPerPage: {
|
|
||||||
type: Number,
|
|
||||||
require: true,
|
|
||||||
},
|
|
||||||
maxPage: {
|
|
||||||
type: Number,
|
|
||||||
require: true,
|
|
||||||
},
|
|
||||||
totalList: {
|
|
||||||
type: Number,
|
|
||||||
require: true,
|
|
||||||
},
|
|
||||||
dataToobar: Object,
|
|
||||||
});
|
|
||||||
|
|
||||||
const isPermissionDelete = computed(() => {
|
|
||||||
return (status: string) => {
|
|
||||||
return (
|
|
||||||
checkPermission(route)?.attrOwnership === "OWNER" &&
|
|
||||||
!leaveStore.statusDelete.includes(status) &&
|
|
||||||
leaveStore.tabMenu === "1"
|
|
||||||
);
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
/** ข้อมูลหัวตาราง รายการลา */
|
/** ข้อมูลหัวตาราง รายการลา */
|
||||||
const columnsLeave = ref<QTableProps["columns"]>([
|
const columnsLeave = ref<QTableProps["columns"]>([
|
||||||
|
|
@ -254,6 +212,31 @@ const visibleReject = ref<string[]>([
|
||||||
"status",
|
"status",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
getList: Function,
|
||||||
|
rows: {
|
||||||
|
type: Object,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
type: Number,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
|
rowsPerPage: {
|
||||||
|
type: Number,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
|
maxPage: {
|
||||||
|
type: Number,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
|
totalList: {
|
||||||
|
type: Number,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
|
dataToobar: Object,
|
||||||
|
});
|
||||||
|
|
||||||
/** ไปหน้ารายละเอียด */
|
/** ไปหน้ารายละเอียด */
|
||||||
function redirectToDetail(id: string) {
|
function redirectToDetail(id: string) {
|
||||||
const routePrefix = leaveStore.tabMenu === "1" ? "/leave" : "/leave-reject";
|
const routePrefix = leaveStore.tabMenu === "1" ? "/leave" : "/leave-reject";
|
||||||
|
|
@ -281,21 +264,6 @@ function getStatusColor(statusText: string) {
|
||||||
return statusMap[statusText.toUpperCase()] ?? "";
|
return statusMap[statusText.toUpperCase()] ?? "";
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDelete(id: string) {
|
|
||||||
dialogRemove($q, async () => {
|
|
||||||
try {
|
|
||||||
showLoader();
|
|
||||||
await http.delete(config.API.leaveList() + `/${id}`);
|
|
||||||
await props.getList?.();
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
} catch (error) {
|
|
||||||
messageError($q, error);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Hook*/
|
/** Hook*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (leaveStore.tabMenu === "1") {
|
if (leaveStore.tabMenu === "1") {
|
||||||
|
|
@ -345,17 +313,6 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>รายละเอียด</q-tooltip>
|
<q-tooltip>รายละเอียด</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
|
||||||
v-if="isPermissionDelete(props.row.statusText)"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
dense
|
|
||||||
icon="mdi-delete"
|
|
||||||
color="red"
|
|
||||||
@click.prevent="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,6 @@ interface DataSpecialTime {
|
||||||
statusSort: number;
|
statusSort: number;
|
||||||
timeAfternoon: string;
|
timeAfternoon: string;
|
||||||
timeMorning: string;
|
timeMorning: string;
|
||||||
checkInStatusMain: string;
|
|
||||||
checkOutStatusMain: string;
|
|
||||||
}
|
}
|
||||||
export type {
|
export type {
|
||||||
DataOption,
|
DataOption,
|
||||||
|
|
|
||||||
|
|
@ -98,26 +98,6 @@ interface DataProcess {
|
||||||
errorMessage: string | null;
|
errorMessage: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DataPendingJobs {
|
|
||||||
taskId: string;
|
|
||||||
keycloakUserId: string;
|
|
||||||
createdDate: string | Date;
|
|
||||||
processingDate: string | Date;
|
|
||||||
completedDate: string | Date;
|
|
||||||
status: string;
|
|
||||||
checkType: string;
|
|
||||||
checkInId: string;
|
|
||||||
errorMessage: string;
|
|
||||||
additionalData: string;
|
|
||||||
id: string;
|
|
||||||
createdAt: string | Date;
|
|
||||||
createdUserId: string;
|
|
||||||
lastUpdatedAt: string;
|
|
||||||
lastUpdateUserId: string;
|
|
||||||
createdFullName: string;
|
|
||||||
lastUpdateFullName: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
TableRows,
|
TableRows,
|
||||||
DataResLog,
|
DataResLog,
|
||||||
|
|
@ -125,5 +105,4 @@ export type {
|
||||||
TableRowsTime,
|
TableRowsTime,
|
||||||
FormDetail,
|
FormDetail,
|
||||||
DataProcess,
|
DataProcess,
|
||||||
DataPendingJobs,
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,6 @@ export const useLeavelistDataStore = defineStore("leave", () => {
|
||||||
|
|
||||||
const leaveType = ref<LeaveType[]>([]);
|
const leaveType = ref<LeaveType[]>([]);
|
||||||
|
|
||||||
const statusDelete = ["APPROVE", "DELETING", "DELETE"];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชั่น fetchListLeave
|
* ฟังก์ชั่น fetchListLeave
|
||||||
* @param data รับข้อมูลจาก Page
|
* @param data รับข้อมูลจาก Page
|
||||||
|
|
@ -266,6 +264,5 @@ export const useLeavelistDataStore = defineStore("leave", () => {
|
||||||
leaveTypeOption,
|
leaveTypeOption,
|
||||||
leaveTypeList,
|
leaveTypeList,
|
||||||
fetchKeycloakPosition,
|
fetchKeycloakPosition,
|
||||||
statusDelete,
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import { useRoute } from "vue-router";
|
||||||
import Tab1 from "@/modules/09_leave/components/02_WorkList/Tab1.vue";
|
import Tab1 from "@/modules/09_leave/components/02_WorkList/Tab1.vue";
|
||||||
import Tab2 from "@/modules/09_leave/components/02_WorkList/Tab2.vue";
|
import Tab2 from "@/modules/09_leave/components/02_WorkList/Tab2.vue";
|
||||||
import Tab3 from "@/modules/09_leave/components/02_WorkList/Tab3_Processed_Late.vue";
|
import Tab3 from "@/modules/09_leave/components/02_WorkList/Tab3_Processed_Late.vue";
|
||||||
import Tab4_Pending from "@/modules/09_leave/components/02_WorkList/Tab4_Pending.vue";
|
|
||||||
|
|
||||||
const stores = useWorklistDataStore();
|
const stores = useWorklistDataStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
@ -22,10 +21,6 @@ const isPermissionTab3 = computed(() => {
|
||||||
checkPermission(route)?.attrIsUpdate)
|
checkPermission(route)?.attrIsUpdate)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
const isPermissionTab4 = computed(() => {
|
|
||||||
return checkPermission(route)?.attrOwnership === "OWNER";
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -51,7 +46,6 @@ const isPermissionTab4 = computed(() => {
|
||||||
name="3"
|
name="3"
|
||||||
label="ประมวลผลการขาดราชการ/มาสาย"
|
label="ประมวลผลการขาดราชการ/มาสาย"
|
||||||
/>
|
/>
|
||||||
<q-tab v-if="isPermissionTab4" name="4" label="รอประมวลผล" />
|
|
||||||
<!-- เพิ่มแท็บใหม่ -->
|
<!-- เพิ่มแท็บใหม่ -->
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
|
|
||||||
|
|
@ -68,9 +62,6 @@ const isPermissionTab4 = computed(() => {
|
||||||
<q-tab-panel name="3">
|
<q-tab-panel name="3">
|
||||||
<Tab3 />
|
<Tab3 />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="4">
|
|
||||||
<Tab4_Pending />
|
|
||||||
</q-tab-panel>
|
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ import type {
|
||||||
|
|
||||||
import DialogReason from "@/components/Dialogs/PopupReason.vue";
|
import DialogReason from "@/components/Dialogs/PopupReason.vue";
|
||||||
import DialogApprove from "@/modules/09_leave/components/04_SpecialTime/DialogApprove.vue";
|
import DialogApprove from "@/modules/09_leave/components/04_SpecialTime/DialogApprove.vue";
|
||||||
import DialogMultipleApprove from "@/modules/09_leave/components/04_SpecialTime/DialogMultipleApprove.vue";
|
|
||||||
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
@ -48,7 +47,6 @@ const name = ref<string>("");
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const dateDialog = ref<string>("");
|
const dateDialog = ref<string>("");
|
||||||
const dateFixDialog = ref<string>("");
|
const dateFixDialog = ref<string>("");
|
||||||
const modalMultiple = ref<boolean>(false);
|
|
||||||
|
|
||||||
// ค้นหาในตาราง
|
// ค้นหาในตาราง
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
|
|
@ -56,7 +54,7 @@ const filterStatus = ref<string>("PENDING");
|
||||||
const filterDate = ref<[Date, Date] | null>([new Date(), new Date()]); //วันที่ประกาศ
|
const filterDate = ref<[Date, Date] | null>([new Date(), new Date()]); //วันที่ประกาศ
|
||||||
const optionStatus = ref<DataOption[]>(store.optionStatusMain);
|
const optionStatus = ref<DataOption[]>(store.optionStatusMain);
|
||||||
const rows = ref<DataSpecialTime[]>([]);
|
const rows = ref<DataSpecialTime[]>([]);
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<String[]>([
|
||||||
"no",
|
"no",
|
||||||
"fullName",
|
"fullName",
|
||||||
"createdAt",
|
"createdAt",
|
||||||
|
|
@ -285,20 +283,6 @@ onMounted(async () => {
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
รายการลงเวลากรณีพิเศษ
|
รายการลงเวลากรณีพิเศษ
|
||||||
<q-space />
|
|
||||||
<q-btn
|
|
||||||
v-if="
|
|
||||||
checkPermission($route)?.attrIsUpdate &&
|
|
||||||
checkPermission($route)?.attrIsGet
|
|
||||||
"
|
|
||||||
class="q-px-md"
|
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
unelevated
|
|
||||||
@click="modalMultiple = true"
|
|
||||||
>
|
|
||||||
อนุมัติแบบหลายรายการ
|
|
||||||
</q-btn>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-card flat bordered class="col-12 q-pa-md">
|
<q-card flat bordered class="col-12 q-pa-md">
|
||||||
|
|
@ -508,14 +492,6 @@ onMounted(async () => {
|
||||||
:detailData="detailData"
|
:detailData="detailData"
|
||||||
:fetch-data="fetchData"
|
:fetch-data="fetchData"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<DialogMultipleApprove
|
|
||||||
v-model:modal="modalMultiple"
|
|
||||||
:fetch-data="fetchData"
|
|
||||||
:dateThaiRange="dateThaiRange"
|
|
||||||
:columns="columns"
|
|
||||||
:visibleColumnsMain="visibleColumns"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style></style>
|
<style></style>
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ const id = ref<string>(route.params.id as string); // id รายการป
|
||||||
const isLoadView = ref<boolean>(false); //แสดง view
|
const isLoadView = ref<boolean>(false); //แสดง view
|
||||||
const modalHistory = ref<boolean>(false); //แสดง popup ประวัติการประเมิน
|
const modalHistory = ref<boolean>(false); //แสดง popup ประวัติการประเมิน
|
||||||
// ข้อมูลผู้เซ็นเอกสาร
|
// ข้อมูลผู้เซ็นเอกสาร
|
||||||
const formCommand = reactive({
|
const formCommand = reactive<FormCommand>({
|
||||||
elementaryFullName: "", //ชื่อผู้บังคับบัญชาชั้นต้น
|
elementaryFullName: "", //ชื่อผู้บังคับบัญชาชั้นต้น
|
||||||
elementaryPosition: "", //ตำแหน่งผู้บังคับบัญชาชั้นต้น
|
elementaryPosition: "", //ตำแหน่งผู้บังคับบัญชาชั้นต้น
|
||||||
abovelevelFullname: "", //ชื่อผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ
|
abovelevelFullname: "", //ชื่อผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,6 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
|
||||||
const dataList: EvaluateList[] = data.map(
|
const dataList: EvaluateList[] = data.map(
|
||||||
(data: EvaluateRes) =>
|
(data: EvaluateRes) =>
|
||||||
({
|
({
|
||||||
...data,
|
|
||||||
id: data.id,
|
id: data.id,
|
||||||
citizenId: data.citizenId,
|
citizenId: data.citizenId,
|
||||||
fullName: data.fullName,
|
fullName: data.fullName,
|
||||||
|
|
@ -134,7 +133,7 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "เลขที่ตำแหน่ง",
|
label: "เลขที่ตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posNo",
|
field: "positionNumber",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -351,7 +351,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ !col.value ? "-" : col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
|
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
|
||||||
import { usePagination } from "@/composables/usePagination";
|
import { usePagination } from "@/composables/usePagination";
|
||||||
import { formatPosmasterNo } from "@/utils/function";
|
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
||||||
|
|
@ -73,12 +72,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return formatPosmasterNo(
|
return row.orgShortName && row.posMasterNo
|
||||||
row.orgShortName,
|
? `${row.orgShortName} ${row.posMasterNo}`
|
||||||
row.posMasterNoPrefix,
|
: "-";
|
||||||
row.posMasterNo,
|
|
||||||
row.posMasterNoSuffix
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import DialogMoveLevel from "@/modules/13_salary/components/04_salaryLists/Dialo
|
||||||
/** importStore*/
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
|
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
|
||||||
import { formatPosmasterNo } from "@/utils/function";
|
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -88,12 +87,9 @@ const baseColumns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return formatPosmasterNo(
|
return row.orgShortName && row.posMasterNo
|
||||||
row.orgShortName,
|
? `${row.orgShortName} ${row.posMasterNo}`
|
||||||
row.posMasterNoPrefix,
|
: "-";
|
||||||
row.posMasterNo,
|
|
||||||
row.posMasterNoSuffix
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import DialogInfo from "@/modules/13_salary/components/DialogInfoMain.vue";
|
||||||
/** importStore*/
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
|
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
|
||||||
import { formatPosmasterNo } from "@/utils/function";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -99,12 +98,9 @@ const columns = ref<QTableColumn[]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return formatPosmasterNo(
|
return row.orgShortName && row.posMasterNo
|
||||||
row.orgShortName,
|
? `${row.orgShortName} ${row.posMasterNo}`
|
||||||
row.posMasterNoPrefix,
|
: "-";
|
||||||
row.posMasterNo,
|
|
||||||
row.posMasterNoSuffix
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore";
|
import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore";
|
||||||
import { usePagination } from "@/composables/usePagination";
|
import { usePagination } from "@/composables/usePagination";
|
||||||
import { formatPosmasterNo } from "@/utils/function";
|
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
||||||
|
|
@ -72,12 +71,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return formatPosmasterNo(
|
return row.orgShortName && row.posMasterNo
|
||||||
row.orgShortName,
|
? `${row.orgShortName} ${row.posMasterNo}`
|
||||||
row.posMasterNoPrefix,
|
: "-";
|
||||||
row.posMasterNo,
|
|
||||||
row.posMasterNoSuffix
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { useQuasar } from "quasar";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore";
|
import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore";
|
||||||
import { formatPosmasterNo } from "@/utils/function";
|
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
||||||
|
|
@ -85,14 +84,6 @@ const baseColumns = ref<QTableProps["columns"]>([
|
||||||
field: "orgShortName",
|
field: "orgShortName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
|
||||||
return formatPosmasterNo(
|
|
||||||
row.orgShortName,
|
|
||||||
row.posMasterNoPrefix,
|
|
||||||
row.posMasterNo,
|
|
||||||
row.posMasterNoSuffix
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "position",
|
name: "position",
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore";
|
import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore";
|
||||||
import { formatPosmasterNo } from "@/utils/function";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -99,12 +98,9 @@ const columns = ref<QTableColumn[]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return formatPosmasterNo(
|
return row.orgShortName && row.posMasterNo
|
||||||
row.orgShortName,
|
? `${row.orgShortName} ${row.posMasterNo}`
|
||||||
row.posMasterNoPrefix,
|
: "-";
|
||||||
row.posMasterNo,
|
|
||||||
row.posMasterNoSuffix
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ function fetchInformation() {
|
||||||
citizenId.value = data.citizenId;
|
citizenId.value = data.citizenId;
|
||||||
|
|
||||||
if (data.avatarName) {
|
if (data.avatarName) {
|
||||||
fetchProfile(data.id as string, data.avatarName);
|
await fetchProfile(data.id as string, data.avatarName);
|
||||||
} else {
|
} else {
|
||||||
avatar.value = avatarMain;
|
avatar.value = avatarMain;
|
||||||
}
|
}
|
||||||
|
|
@ -70,14 +70,11 @@ function fetchInformation() {
|
||||||
* @param id profileId
|
* @param id profileId
|
||||||
* @param avatarName ชื้อไฟล์
|
* @param avatarName ชื้อไฟล์
|
||||||
*/
|
*/
|
||||||
function fetchProfile(id: string, avatarName: string) {
|
async function fetchProfile(id: string, avatarName: string) {
|
||||||
http
|
http
|
||||||
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, avatarName))
|
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, avatarName))
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
avatar.value = res.data.downloadUrl;
|
avatar.value = res.data.downloadUrl;
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
avatar.value = avatarMain;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useKpiDataStore } from "@/modules/14_KPI/store";
|
import { useKpiDataStore } from "@/modules/14_KPI/store";
|
||||||
import avatar from "@/assets/avatar_user.jpg";
|
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
import type { FormProfile } from "@/modules/14_KPI/interface/request/index";
|
import type { FormProfile } from "@/modules/14_KPI/interface/request/index";
|
||||||
|
|
@ -66,7 +65,7 @@ async function fetchEvaluation() {
|
||||||
await store.checkCompetency();
|
await store.checkCompetency();
|
||||||
await store.checkCompetencyDefaultCompetencyLevel();
|
await store.checkCompetencyDefaultCompetencyLevel();
|
||||||
|
|
||||||
fetchProfile(data.profileId);
|
await fetchProfile(data.profileId);
|
||||||
|
|
||||||
plannedPoint.value = data.plannedPoint == null ? "" : data.plannedPoint;
|
plannedPoint.value = data.plannedPoint == null ? "" : data.plannedPoint;
|
||||||
rolePoint.value = data.rolePoint == null ? "" : data.rolePoint;
|
rolePoint.value = data.rolePoint == null ? "" : data.rolePoint;
|
||||||
|
|
@ -82,8 +81,8 @@ async function fetchEvaluation() {
|
||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
function fetchProfile(id: string) {
|
async function fetchProfile(id: string) {
|
||||||
http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, `profile-${id}`)
|
config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, `profile-${id}`)
|
||||||
)
|
)
|
||||||
|
|
@ -91,7 +90,6 @@ function fetchProfile(id: string) {
|
||||||
store.dataEvaluation.avartar = res.data.downloadUrl;
|
store.dataEvaluation.avartar = res.data.downloadUrl;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
store.dataEvaluation.avartar = avatar;
|
|
||||||
// profilePicture.value = avatar;
|
// profilePicture.value = avatar;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ const modal = defineModel<boolean>("modal", { required: true });
|
||||||
let reqMaster = defineModel<FilterMaster>("reqMaster", { required: true });
|
let reqMaster = defineModel<FilterMaster>("reqMaster", { required: true });
|
||||||
const totalPage = defineModel<number>("totalPage", { required: true });
|
const totalPage = defineModel<number>("totalPage", { required: true });
|
||||||
const nodeTree = defineModel<OrgTree[]>("nodeTree", { required: true });
|
const nodeTree = defineModel<OrgTree[]>("nodeTree", { required: true });
|
||||||
const columns = defineModel<QTableProps["columns"]>("columns", { required: true });
|
const columns = defineModel<QTableProps[]>("columns", {});
|
||||||
const rows = defineModel<PosMaster2[]>("rows", { required: true });
|
const rows = defineModel<PosMaster2[]>("rows", { required: true });
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataTree: {
|
fetchDataTree: {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { useQuasar } from "quasar";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
||||||
import { formatPosmasterNo } from "@/utils/function";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -136,12 +135,11 @@ async function fetchTable() {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
const list = data.map((e: PosMaster) => ({
|
const list = data.map((e: PosMaster) => ({
|
||||||
...e,
|
...e,
|
||||||
posMasterNo: formatPosmasterNo(
|
posMasterNo:
|
||||||
e.orgShortname,
|
(e.orgShortname !== null ? e.orgShortname : "") +
|
||||||
e.posMasterNoPrefix,
|
(e.posMasterNoPrefix ? e.posMasterNoPrefix : "") +
|
||||||
e.posMasterNo.toString(),
|
(e.posMasterNo !== null ? e.posMasterNo : "") +
|
||||||
e.posMasterNoSuffix ?? ""
|
(e.posMasterNoSuffix !== null ? e.posMasterNoPrefix : ""),
|
||||||
),
|
|
||||||
}));
|
}));
|
||||||
rows.value = list;
|
rows.value = list;
|
||||||
})
|
})
|
||||||
|
|
@ -159,7 +157,7 @@ function updatePagination(newPagination: NewPagination) {
|
||||||
reqMaster.page = 1;
|
reqMaster.page = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
funcion ค้นหาข้อมูลใน Table
|
funcion ค้นหาข้อมูลใน Table
|
||||||
*/
|
*/
|
||||||
async function filterKeyword() {
|
async function filterKeyword() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { useQuasar } from "quasar";
|
||||||
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
import { updateCurrentPage, formatPosmasterNo } from "@/utils/function";
|
import { updateCurrentPage } from "@/utils/function";
|
||||||
import genreport from "@/plugins/genreportxlsx";
|
import genreport from "@/plugins/genreportxlsx";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
@ -145,13 +145,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
label: "ตำแหน่งเลขที่",
|
label: "ตำแหน่งเลขที่",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "posMasterNo",
|
field: "posMasterNo",
|
||||||
format: (val: any, row: any) =>
|
|
||||||
formatPosmasterNo(
|
|
||||||
row.orgShortname,
|
|
||||||
row.posMasterNoPrefix,
|
|
||||||
row.posMasterNoMain,
|
|
||||||
row.posMasterNoSuffix
|
|
||||||
),
|
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -784,7 +777,7 @@ watch(
|
||||||
<DialogMovePos
|
<DialogMovePos
|
||||||
v-model:modal="modalDialogMMove"
|
v-model:modal="modalDialogMMove"
|
||||||
v-model:nodeTree="nodeTree"
|
v-model:nodeTree="nodeTree"
|
||||||
v-model:columns="columns"
|
v-model:columns="columns as QTableProps[]"
|
||||||
v-model:rows="posMaster"
|
v-model:rows="posMaster"
|
||||||
v-model:totalPage="totalPage"
|
v-model:totalPage="totalPage"
|
||||||
v-model:reqMaster="reqMaster"
|
v-model:reqMaster="reqMaster"
|
||||||
|
|
|
||||||
|
|
@ -80,10 +80,6 @@ export const usePositionEmp = defineStore("positionEmpStore", () => {
|
||||||
posLevelName: e.isSit ? e.profilePoslevel : e.posLevelName,
|
posLevelName: e.isSit ? e.profilePoslevel : e.posLevelName,
|
||||||
posExecutiveName: e.posExecutiveName,
|
posExecutiveName: e.posExecutiveName,
|
||||||
isSit: e.isSit,
|
isSit: e.isSit,
|
||||||
orgShortname: e.orgShortname,
|
|
||||||
posMasterNoPrefix: e.posMasterNoPrefix,
|
|
||||||
posMasterNoMain: e.posMasterNo,
|
|
||||||
posMasterNoSuffix: e.posMasterNoSuffix,
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return newPosMaster;
|
return newPosMaster;
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,8 @@ const visibleColumns = ref<Array<string>>([
|
||||||
|
|
||||||
const modalAddOperator = ref<boolean>(false); // แสดงเพิ่มรายชื่อลงนามในแนบท้ายคำสั่ง
|
const modalAddOperator = ref<boolean>(false); // แสดงเพิ่มรายชื่อลงนามในแนบท้ายคำสั่ง
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชันบันทึกข้อมูลรายละเอียดคำสั่ง
|
* ฟังก์ชันบันทึกข้อมูลรายละเอียดคำสั่ง
|
||||||
* และกำหนด isChangeData เป็น false
|
* และกำหนด isChangeData เป็น false
|
||||||
|
|
@ -223,8 +225,6 @@ onMounted(async () => {
|
||||||
formData.commandExcecuteDate = props.formCommandList.commandExcecuteDate;
|
formData.commandExcecuteDate = props.formCommandList.commandExcecuteDate;
|
||||||
formData.isBangkok = !store.isIdofficer
|
formData.isBangkok = !store.isIdofficer
|
||||||
? null
|
? null
|
||||||
: props.formCommandList.commandCode === "C-PM-47"
|
|
||||||
? "BANGKOK"
|
|
||||||
: props.formCommandList.isBangkok;
|
: props.formCommandList.isBangkok;
|
||||||
commandCode.value = props.formCommandList.commandCode;
|
commandCode.value = props.formCommandList.commandCode;
|
||||||
const [volume, chapter] = props.formCommandList.commandNo.split("/");
|
const [volume, chapter] = props.formCommandList.commandNo.split("/");
|
||||||
|
|
@ -486,9 +486,12 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 q-gutter-sm" v-if="store.isIdofficer">
|
<div
|
||||||
|
class="col-12 q-gutter-sm"
|
||||||
|
v-if="store.isIdofficer && commandCode !== 'C-PM-47'"
|
||||||
|
>
|
||||||
<q-radio
|
<q-radio
|
||||||
:disable="store.readonly || commandCode === 'C-PM-47'"
|
:disable="store.readonly"
|
||||||
keep-color
|
keep-color
|
||||||
color="primary"
|
color="primary"
|
||||||
dense
|
dense
|
||||||
|
|
@ -498,7 +501,7 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-radio
|
<q-radio
|
||||||
:disable="store.readonly || commandCode === 'C-PM-47'"
|
:disable="store.readonly"
|
||||||
keep-color
|
keep-color
|
||||||
color="primary"
|
color="primary"
|
||||||
dense
|
dense
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import { storeToRefs } from "pinia";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useStructureTree } from "@/stores/structureTree";
|
import { useStructureTree } from "@/stores/structureTree";
|
||||||
import { formatPosmasterNo } from "@/utils/function";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -72,18 +71,8 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "posMasterNo",
|
field: "posMasterNo",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return row.isSit
|
return row.isSit
|
||||||
? formatPosmasterNo(
|
? `${row.orgShortname} ${row.posMasterNo}(นั่งทับตำแหน่ง)`
|
||||||
row.orgShortname,
|
: `${row.orgShortname} ${row.posMasterNo}`;
|
||||||
row.posMasterNoPrefix,
|
|
||||||
row.posMasterNo,
|
|
||||||
row.posMasterNoSuffix
|
|
||||||
) + " (นั่งทับตำแหน่ง)"
|
|
||||||
: formatPosmasterNo(
|
|
||||||
row.orgShortname,
|
|
||||||
row.posMasterNoPrefix,
|
|
||||||
row.posMasterNo,
|
|
||||||
row.posMasterNoSuffix
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
|
@ -218,7 +207,7 @@ async function fetchDataTree() {
|
||||||
function onSelectedOrgTree(data: OrgTree) {
|
function onSelectedOrgTree(data: OrgTree) {
|
||||||
orgTreeId.value = data.orgTreeId;
|
orgTreeId.value = data.orgTreeId;
|
||||||
orgLevel.value = data.orgLevel;
|
orgLevel.value = data.orgLevel;
|
||||||
onSearchDataTable();
|
fetchDataTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ const modal = defineModel<boolean>("modal", { required: true });
|
||||||
let reqMaster = defineModel<FilterMaster>("reqMaster", { required: true });
|
let reqMaster = defineModel<FilterMaster>("reqMaster", { required: true });
|
||||||
const totalPage = defineModel<number>("totalPage", { required: true });
|
const totalPage = defineModel<number>("totalPage", { required: true });
|
||||||
const nodeTree = defineModel<OrgTree[]>("nodeTree", { required: true });
|
const nodeTree = defineModel<OrgTree[]>("nodeTree", { required: true });
|
||||||
const columns = defineModel<QTableProps["columns"]>("columns", {});
|
const columns = defineModel<QTableProps[]>("columns", {});
|
||||||
const rows = defineModel<PosMaster2[]>("rows", { required: true });
|
const rows = defineModel<PosMaster2[]>("rows", { required: true });
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataTree: {
|
fetchDataTree: {
|
||||||
|
|
|
||||||
|
|
@ -706,7 +706,7 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<!-- <div class="row col-12 q-pa-sm">
|
<div class="row col-12 q-pa-sm">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
keep-color
|
keep-color
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|
@ -714,7 +714,7 @@ watch(
|
||||||
v-model="isSit"
|
v-model="isSit"
|
||||||
label="นั่งทับตำแหน่ง"
|
label="นั่งทับตำแหน่ง"
|
||||||
/>
|
/>
|
||||||
</div> -->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { useQuasar } from "quasar";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { usePositionEmp } from "@/modules/20_positionTemp/store/organizational";
|
import { usePositionEmp } from "@/modules/20_positionTemp/store/organizational";
|
||||||
import { formatPosmasterNo } from "@/utils/function";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -136,12 +135,11 @@ async function fetchTable() {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
const list = data.map((e: PosMaster) => ({
|
const list = data.map((e: PosMaster) => ({
|
||||||
...e,
|
...e,
|
||||||
posMasterNo: formatPosmasterNo(
|
posMasterNo:
|
||||||
e.orgShortname,
|
(e.orgShortname !== null ? e.orgShortname : "") +
|
||||||
e.posMasterNoPrefix,
|
(e.posMasterNoPrefix ? e.posMasterNoPrefix : "") +
|
||||||
e.posMasterNo.toString(),
|
(e.posMasterNo !== null ? e.posMasterNo : "") +
|
||||||
e.posMasterNoSuffix ?? ""
|
(e.posMasterNoSuffix !== null ? e.posMasterNoPrefix : ""),
|
||||||
),
|
|
||||||
}));
|
}));
|
||||||
rows.value = list;
|
rows.value = list;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -719,7 +719,7 @@ watch(
|
||||||
<DialogMovePos
|
<DialogMovePos
|
||||||
v-model:modal="modalDialogMMove"
|
v-model:modal="modalDialogMMove"
|
||||||
v-model:nodeTree="nodeTree"
|
v-model:nodeTree="nodeTree"
|
||||||
v-model:columns="columns"
|
v-model:columns="columns as QTableProps[]"
|
||||||
v-model:rows="posMaster"
|
v-model:rows="posMaster"
|
||||||
v-model:totalPage="totalPage"
|
v-model:totalPage="totalPage"
|
||||||
v-model:reqMaster="reqMaster"
|
v-model:reqMaster="reqMaster"
|
||||||
|
|
|
||||||
|
|
@ -1,306 +0,0 @@
|
||||||
<script setup lang="ts">
|
|
||||||
import { onMounted, reactive, ref } from "vue";
|
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
|
||||||
import config from "@/app.config";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { usePersonsStore } from "@/modules/23_persons/stores/PersonsStore";
|
|
||||||
import { usePagination } from "@/composables/usePagination";
|
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
import type {
|
|
||||||
DataOptions,
|
|
||||||
PosTypes,
|
|
||||||
PosLevels,
|
|
||||||
Person,
|
|
||||||
} from "@/modules/23_persons/interface/Main";
|
|
||||||
|
|
||||||
const $q = useQuasar();
|
|
||||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
|
||||||
const { pagination, params, onRequest } = usePagination("", fetchData);
|
|
||||||
const store = usePersonsStore();
|
|
||||||
|
|
||||||
const props = defineProps<{ type: "current" | "draft" }>();
|
|
||||||
|
|
||||||
const options = reactive({
|
|
||||||
posType: [] as DataOptions[],
|
|
||||||
posLevel: [] as DataOptions[],
|
|
||||||
});
|
|
||||||
|
|
||||||
const filters = reactive({
|
|
||||||
keyword: "",
|
|
||||||
position: "",
|
|
||||||
posTypeId: "",
|
|
||||||
posLevelId: "",
|
|
||||||
});
|
|
||||||
|
|
||||||
const rows = ref<Person[]>([]);
|
|
||||||
const visibleColumns = ref<string[]>([
|
|
||||||
"citizenId",
|
|
||||||
"fullName",
|
|
||||||
"position",
|
|
||||||
"posType",
|
|
||||||
"posLevel",
|
|
||||||
]);
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
|
||||||
{
|
|
||||||
name: "citizenId",
|
|
||||||
align: "left",
|
|
||||||
label: "เลขบัตรประชาชน",
|
|
||||||
sortable: false,
|
|
||||||
field: "citizenId",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "fullName",
|
|
||||||
align: "left",
|
|
||||||
label: "ชื่อ-นามสกุล",
|
|
||||||
sortable: false,
|
|
||||||
field: "fullName",
|
|
||||||
format(val, row) {
|
|
||||||
return `${row.prefix || ""}${row.firstName || ""} ${
|
|
||||||
row.lastName || ""
|
|
||||||
}`.trim();
|
|
||||||
},
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "position",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่งในสายงาน",
|
|
||||||
sortable: false,
|
|
||||||
field: "position",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "posType",
|
|
||||||
align: "left",
|
|
||||||
label: "ประเภทตำแหน่ง",
|
|
||||||
sortable: false,
|
|
||||||
field: "posType",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "posLevel",
|
|
||||||
align: "left",
|
|
||||||
label: "ระดับตำแหน่ง",
|
|
||||||
sortable: false,
|
|
||||||
field: "posLevel",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
/** ฟังก์ชันดึงข้อมูลรายชื่อขรก. ที่ไม่อยู่ในโครงสร้าง */
|
|
||||||
async function fetchData() {
|
|
||||||
try {
|
|
||||||
showLoader();
|
|
||||||
const payload = {
|
|
||||||
...params.value,
|
|
||||||
posTypeId: filters.posTypeId,
|
|
||||||
posLevelId: filters.posLevelId,
|
|
||||||
position: filters.position.trim(),
|
|
||||||
keyword: filters.keyword.trim(),
|
|
||||||
};
|
|
||||||
const endpoint =
|
|
||||||
props.type === "current"
|
|
||||||
? config.API.orgSearchCurrentProfile
|
|
||||||
: config.API.orgSearchProfile;
|
|
||||||
|
|
||||||
const res = await http.post(endpoint, payload);
|
|
||||||
const result = res.data.result;
|
|
||||||
|
|
||||||
pagination.value.rowsNumber = result?.total || 0;
|
|
||||||
rows.value = result?.data || [];
|
|
||||||
} catch (error) {
|
|
||||||
messageError($q, error);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ฟังก์ชันดึงข้อมูลประเภทตำแหน่ง */
|
|
||||||
async function getPosType() {
|
|
||||||
try {
|
|
||||||
options.posType = await store.fetchPosType();
|
|
||||||
} catch (error) {
|
|
||||||
messageError($q, error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ฟังก์ชันอัปเดตตัวเลือกระดับตำแหน่งเมื่อเลือกประเภทตำแหน่ง
|
|
||||||
* @param val ID เภทตำแหน่ง
|
|
||||||
*/
|
|
||||||
function updateSelectType(val: string) {
|
|
||||||
const listLevel: PosTypes | undefined = store.optionsData.dataType.find(
|
|
||||||
(e: PosTypes) => e.id === val
|
|
||||||
);
|
|
||||||
|
|
||||||
store.optionsData.posLevel =
|
|
||||||
listLevel?.posLevels?.map((e: PosLevels) => ({
|
|
||||||
id: e.id,
|
|
||||||
name: e.posLevelName,
|
|
||||||
})) || [];
|
|
||||||
|
|
||||||
options.posLevel = store.optionsData.posLevel;
|
|
||||||
|
|
||||||
filters.posLevelId = "";
|
|
||||||
searchData();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ฟังก์ชันค้นหาข้อมูล*/
|
|
||||||
function searchData() {
|
|
||||||
pagination.value.page = 1;
|
|
||||||
fetchData();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ฟังก์ชันเปิดหน้าทะเบียนขรก. ในแท็บใหม่
|
|
||||||
* @param personId ID ของขรก.
|
|
||||||
*/
|
|
||||||
function handleRedirect(personId: string) {
|
|
||||||
window.open(`/registry-officer/${personId}`, "_blank");
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
fetchData();
|
|
||||||
getPosType();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="col-12">
|
|
||||||
<!-- Filter Section -->
|
|
||||||
<div class="row col-12 q-col-gutter-sm q-mb-sm">
|
|
||||||
<div class="col-xs-12 col-sm-6 col-md-2">
|
|
||||||
<q-input
|
|
||||||
v-model="filters.position"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
label="ตำแหน่งในสายงาน"
|
|
||||||
@keydown.enter.prevent="searchData"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-6 col-md-2">
|
|
||||||
<q-select
|
|
||||||
label="ตำแหน่งประเภท"
|
|
||||||
v-model="filters.posTypeId"
|
|
||||||
:options="options.posType"
|
|
||||||
emit-value
|
|
||||||
dense
|
|
||||||
map-options
|
|
||||||
outlined
|
|
||||||
option-label="name"
|
|
||||||
option-value="id"
|
|
||||||
clearable
|
|
||||||
@clear="filters.posTypeId = ''"
|
|
||||||
@update:model-value="updateSelectType"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-6 col-md-2">
|
|
||||||
<q-select
|
|
||||||
label="ระดับตำแหน่ง"
|
|
||||||
v-model="filters.posLevelId"
|
|
||||||
:disable="!filters.posTypeId"
|
|
||||||
:options="options.posLevel"
|
|
||||||
emit-value
|
|
||||||
dense
|
|
||||||
map-options
|
|
||||||
outlined
|
|
||||||
option-label="name"
|
|
||||||
option-value="id"
|
|
||||||
clearable
|
|
||||||
@clear="filters.posLevelId = ''"
|
|
||||||
@update:model-value="searchData"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<q-space />
|
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-6 col-md-2">
|
|
||||||
<q-input
|
|
||||||
v-model="filters.keyword"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
label="ค้นหาจากชื่อ-นามสกุล หรือเลขประจำตัวประชาชน"
|
|
||||||
@keydown.enter.prevent="searchData"
|
|
||||||
>
|
|
||||||
<template v-slot:append>
|
|
||||||
<q-icon name="search" class="cursor-pointer" @click="searchData" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-6 col-md-2">
|
|
||||||
<q-select
|
|
||||||
for="visibleColumns"
|
|
||||||
v-model="visibleColumns"
|
|
||||||
multiple
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
options-dense
|
|
||||||
:display-value="$q.lang.table.columns"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
:options="columns"
|
|
||||||
option-value="name"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Table Section -->
|
|
||||||
<div class="col-12">
|
|
||||||
<p-table
|
|
||||||
ref="table"
|
|
||||||
:columns="columns"
|
|
||||||
:rows="rows"
|
|
||||||
row-key="id"
|
|
||||||
flat
|
|
||||||
bordered
|
|
||||||
dense
|
|
||||||
class="custom-header-table"
|
|
||||||
:visible-columns="visibleColumns"
|
|
||||||
:rows-per-page-options="[1, 10, 25, 50, 100]"
|
|
||||||
v-model:pagination="pagination"
|
|
||||||
@request="onRequest"
|
|
||||||
>
|
|
||||||
<template v-slot:header="props">
|
|
||||||
<q-tr :props="props">
|
|
||||||
<q-th auto-width></q-th>
|
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
|
||||||
</q-th>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
<template v-slot:body="props">
|
|
||||||
<q-tr :props="props">
|
|
||||||
<q-td auto-width>
|
|
||||||
<q-btn
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
color="info"
|
|
||||||
icon="mdi-eye"
|
|
||||||
@click.prevent="handleRedirect(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ดูรายละเอียด</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
|
||||||
<div>
|
|
||||||
{{ col.value ? col.value : "-" }}
|
|
||||||
</div>
|
|
||||||
</q-td>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
</p-table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
interface DataOptions {
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface PosTypes {
|
|
||||||
createdAt: Date;
|
|
||||||
id: string;
|
|
||||||
lastUpdateFullName: string;
|
|
||||||
lastUpdatedAt: Date;
|
|
||||||
posTypeName: string;
|
|
||||||
posTypeRank: number;
|
|
||||||
posLevels: PosLevels[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface PosLevels {
|
|
||||||
createdAt: Date;
|
|
||||||
id: string;
|
|
||||||
lastUpdateFullName: string;
|
|
||||||
lastUpdatedAt: Date;
|
|
||||||
posLevelAuthority: string;
|
|
||||||
posLevelName: string;
|
|
||||||
posLevelRank: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Person {
|
|
||||||
citizenId: string;
|
|
||||||
firstName: string;
|
|
||||||
id: string;
|
|
||||||
lastName: string;
|
|
||||||
posLevel: string;
|
|
||||||
posType: string;
|
|
||||||
position: string;
|
|
||||||
prefix: string;
|
|
||||||
rank: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type { DataOptions, PosTypes, PosLevels, Person };
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
const Main = () => import("@/modules/23_persons/views/Main.vue");
|
|
||||||
|
|
||||||
export default [
|
|
||||||
{
|
|
||||||
path: "/persons",
|
|
||||||
name: "personsMain",
|
|
||||||
component: Main,
|
|
||||||
meta: {
|
|
||||||
Auth: true,
|
|
||||||
Key: "PERSONS",
|
|
||||||
Role: "PERSONS",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue