Merge branch 'develop' into devTee
This commit is contained in:
commit
52dd70ac4c
28 changed files with 442 additions and 299 deletions
|
|
@ -39,38 +39,40 @@ export default {
|
|||
`${registryNew}${type}/nopaid/history/${dataId}`,
|
||||
|
||||
// เครื่องราชฯ
|
||||
profileNewInsign: `${registryNew}/insignia`,
|
||||
profileNewInsignByProfileId: (profileId: string) =>
|
||||
`${registryNew}/insignia/${profileId}`,
|
||||
profileNewInsignById: (dataId: string) => `${registryNew}/insignia/${dataId}`,
|
||||
profileNewInsignHisById: (dataId: string) =>
|
||||
`${registryNew}/insignia/history/${dataId}`,
|
||||
profileNewInsign: (type: string) => `${registryNew}${type}/insignia`,
|
||||
profileNewInsignByProfileId: (profileId: string, type: string) =>
|
||||
`${registryNew}${type}/insignia/${profileId}`,
|
||||
profileNewInsignById: (dataId: string, type: string) =>
|
||||
`${registryNew}${type}/insignia/${dataId}`,
|
||||
profileNewInsignHisById: (dataId: string, type: string) =>
|
||||
`${registryNew}${type}/insignia/history/${dataId}`,
|
||||
|
||||
// ประกาศเกียรติคุณ
|
||||
profileNewHonor: `${registryNew}/honor`,
|
||||
profileNewHonorByProfileId: (profileId: string) =>
|
||||
`${registryNew}/honor/${profileId}`,
|
||||
profileNewHonorById: (dataId: string) => `${registryNew}/honor/${dataId}`,
|
||||
profileNewHonorHisById: (dataId: string) =>
|
||||
`${registryNew}/honor/history/${dataId}`,
|
||||
profileNewHonor: (type: string) => `${registryNew}${type}/honor`,
|
||||
profileNewHonorByProfileId: (profileId: string, type: string) =>
|
||||
`${registryNew}${type}/honor/${profileId}`,
|
||||
profileNewHonorById: (dataId: string, type: string) =>
|
||||
`${registryNew}${type}/honor/${dataId}`,
|
||||
profileNewHonorHisById: (dataId: string, type: string) =>
|
||||
`${registryNew}${type}/honor/history/${dataId}`,
|
||||
|
||||
// ผลการประเมินการปฏิบัติราชการ
|
||||
profileNewAssessments: `${registryNew}/assessments`,
|
||||
profileNewAssessmentsByProfileId: (profileId: string) =>
|
||||
`${registryNew}/assessments/${profileId}`,
|
||||
profileNewAssessmentsById: (dataId: string) =>
|
||||
`${registryNew}/assessments/${dataId}`,
|
||||
profileNewAssessmentsHisById: (dataId: string) =>
|
||||
`${registryNew}/assessments/history/${dataId}`,
|
||||
profileNewAssessments: (type: string) => `${registryNew}${type}/assessments`,
|
||||
profileNewAssessmentsByProfileId: (profileId: string, type: string) =>
|
||||
`${registryNew}${type}/assessments/${profileId}`,
|
||||
profileNewAssessmentsById: (dataId: string, type: string) =>
|
||||
`${registryNew}${type}/assessments/${dataId}`,
|
||||
profileNewAssessmentsHisById: (dataId: string, type: string) =>
|
||||
`${registryNew}${type}/assessments/history/${dataId}`,
|
||||
|
||||
// การฝึกอบรม
|
||||
profileNewTraining: `${registryNew}/training`,
|
||||
profileNewTrainingByProfileId: (profileId: string) =>
|
||||
`${registryNew}/training/${profileId}`,
|
||||
profileNewTrainingByTrainingId: (trainingId: string) =>
|
||||
`${registryNew}/training/${trainingId}`,
|
||||
profileNewTrainingHisByTrainingId: (trainingId: string) =>
|
||||
`${registryNew}/training/history/${trainingId}`,
|
||||
profileNewTraining: (type: string) => `${registryNew}${type}/training`,
|
||||
profileNewTrainingByProfileId: (profileId: string, type: string) =>
|
||||
`${registryNew}${type}/training/${profileId}`,
|
||||
profileNewTrainingByTrainingId: (trainingId: string, type: string) =>
|
||||
`${registryNew}${type}/training/${trainingId}`,
|
||||
profileNewTrainingHisByTrainingId: (trainingId: string, type: string) =>
|
||||
`${registryNew}${type}/training/history/${trainingId}`,
|
||||
|
||||
// ประวัติการศึกษา
|
||||
profileNewEducation: (type: string) => `${registryNew}${type}/educations`,
|
||||
|
|
@ -91,21 +93,24 @@ export default {
|
|||
`${registryNew}${type}/ability/history/${abilityId}`,
|
||||
|
||||
// ใบอนุญาตประกอบวิชาชีพ
|
||||
profileNewCertificate: `${registryNew}/certificate`,
|
||||
profileNewCertificateByProfileId: (profileId: string) =>
|
||||
`${registryNew}/certificate/${profileId}`,
|
||||
profileNewCertificateByCertificateId: (certificateId: string) =>
|
||||
`${registryNew}/certificate/${certificateId}`,
|
||||
profileNewCertificateHisByCertificateId: (certificateId: string) =>
|
||||
`${registryNew}/certificate/history/${certificateId}`,
|
||||
profileNewCertificate: (type: string) => `${registryNew}${type}/certificate`,
|
||||
profileNewCertificateByProfileId: (profileId: string, type: string) =>
|
||||
`${registryNew}${type}/certificate/${profileId}`,
|
||||
profileNewCertificateByCertificateId: (certificateId: string, type: string) =>
|
||||
`${registryNew}${type}/certificate/${certificateId}`,
|
||||
profileNewCertificateHisByCertificateId: (
|
||||
certificateId: string,
|
||||
type: string
|
||||
) => `${registryNew}${type}/certificate/history/${certificateId}`,
|
||||
|
||||
// ข้อมูลอื่นๆ
|
||||
profileNewOther: `${registryNew}/other`,
|
||||
profileNewOtherByProfileId: (profileId: string) =>
|
||||
`${registryNew}/other/${profileId}`,
|
||||
profileNewOtherById: (dataId: string) => `${registryNew}/other/${dataId}`,
|
||||
profileNewOtherHisById: (dataId: string) =>
|
||||
`${registryNew}/other/history/${dataId}`,
|
||||
profileNewOther: (type: string) => `${registryNew}${type}/other`,
|
||||
profileNewOtherByProfileId: (profileId: string, type: string) =>
|
||||
`${registryNew}${type}/other/${profileId}`,
|
||||
profileNewOtherById: (dataId: string, type: string) =>
|
||||
`${registryNew}${type}/other/${dataId}`,
|
||||
profileNewOtherHisById: (dataId: string, type: string) =>
|
||||
`${registryNew}${type}/other/history/${dataId}`,
|
||||
|
||||
// ข้อมูลครอบครัว
|
||||
profileNewFamily: (type: string) => `${registryNew}${type}/family`,
|
||||
|
|
@ -167,4 +172,8 @@ export default {
|
|||
`${registryNew}${type}/changeName/${changeNameId}`,
|
||||
profileNewChangeNameHisByChangeNameId: (changeNameId: string, type: string) =>
|
||||
`${registryNew}${type}/changeName/history/${changeNameId}`,
|
||||
|
||||
//ข้อมูลครอบครับ
|
||||
profileFamily: (empType: string, type: string) =>
|
||||
`${registryNew}${empType}/${type}`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -59,13 +59,6 @@ function fetchProfile(id: string) {
|
|||
)
|
||||
.then(async (res) => {
|
||||
profile.avatar = res.data.downloadUrl;
|
||||
})
|
||||
.catch((e) => {
|
||||
if (e.response.data.message === "ไม่พบไฟล์ในระบบ") {
|
||||
profile.avatar = "";
|
||||
} else {
|
||||
messageError($q, e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
divdivdiv
|
||||
<script setup lang="ts">
|
||||
import { ref, watch, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ async function fetchInformation(id: string) {
|
|||
async function fetchProfileGov(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileNewGovernmentById(id))
|
||||
.get(config.API.profileNewGovernmentById(id, ""))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
goverment.oc = data.org !== "" ? data.org : "-";
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ function onSubmit() {
|
|||
body
|
||||
)
|
||||
.then(() => {
|
||||
props.fetchDataTree(store.draftId);
|
||||
props.edit?.(
|
||||
props.dataNode?.orgTreeId,
|
||||
type,
|
||||
|
|
@ -241,12 +242,12 @@ watch(
|
|||
formData.orgName = props.dataNode.orgTreeName;
|
||||
formData.orgShortName = props.dataNode.orgTreeShortName;
|
||||
formData.orgCode = props.dataNode.orgTreeCode;
|
||||
|
||||
formData.orgPhoneEx = props.dataNode.orgTreePhoneEx;
|
||||
formData.orgPhoneIn = props.dataNode.orgTreePhoneIn;
|
||||
formData.orgFax = props.dataNode.orgTreeFax;
|
||||
formData.orgLevel = props.dataNode.orgTreeRank;
|
||||
formData.orgLevelSub = props.dataNode.orgTreeRankSub;
|
||||
formData.responsibility = props.dataNode.responsibility;
|
||||
orgLevelOption.value =
|
||||
props.dataNode.orgTreeRank === "DEPARTMENT"
|
||||
? orgLevelOptionMain.value
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@ const mode = ref<string>("table");
|
|||
const dialog = ref<boolean>(false);
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id.toString());
|
||||
const empType = ref<string>(
|
||||
route.name === "registryNewByid" ? "" : "-employee"
|
||||
);
|
||||
const dialogStatus = ref<string>("create");
|
||||
const editId = ref<string>("");
|
||||
const keyword = ref<string>("");
|
||||
|
|
@ -235,7 +238,7 @@ function closeHistoryDialog() {
|
|||
async function fetchData(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileNewCertificateByProfileId(id))
|
||||
.get(config.API.profileNewCertificateByProfileId(id,empType.value))
|
||||
.then(async (res) => {
|
||||
rows.value = res.data.result;
|
||||
})
|
||||
|
|
@ -268,8 +271,10 @@ function editForm(row: any) {
|
|||
|
||||
async function addData() {
|
||||
await http
|
||||
.post(config.API.profileNewCertificate, {
|
||||
.post(config.API.profileNewCertificate(empType.value), {
|
||||
...profesLicenseData,
|
||||
profileId: empType.value === "" ? id.value : undefined,
|
||||
profileEmployeeId: empType.value !== "" ? id.value : undefined,
|
||||
})
|
||||
.then(() => {
|
||||
fetchData(id.value);
|
||||
|
|
@ -285,7 +290,7 @@ async function addData() {
|
|||
|
||||
async function editData(idData: string) {
|
||||
await http
|
||||
.patch(config.API.profileNewCertificateByCertificateId(idData), {
|
||||
.patch(config.API.profileNewCertificateByCertificateId(idData,empType.value), {
|
||||
...profesLicenseData,
|
||||
profileId: undefined,
|
||||
})
|
||||
|
|
@ -320,7 +325,7 @@ async function editData(idData: string) {
|
|||
async function fetchHistoryData(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileNewCertificateHisByCertificateId(id))
|
||||
.get(config.API.profileNewCertificateHisByCertificateId(id,empType.value))
|
||||
.then(async (res) => {
|
||||
historyRows.value = res.data.result;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ const {
|
|||
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id.toString());
|
||||
const empType = ref<string>(
|
||||
route.name === "registryNewByid" ? "" : "-employee"
|
||||
);
|
||||
const dialog = ref<boolean>(false);
|
||||
const mode = ref<string>("table");
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -396,11 +399,13 @@ function editForm(row: any) {
|
|||
|
||||
async function addData() {
|
||||
await http
|
||||
.post(config.API.profileNewTraining, {
|
||||
.post(config.API.profileNewTraining(empType.value), {
|
||||
...trainData,
|
||||
startYear: undefined,
|
||||
finishYear: undefined,
|
||||
isDate: isDate.value === "false" ? false : true,
|
||||
profileId: empType.value === "" ? id.value : undefined,
|
||||
profileEmployeeId: empType.value !== "" ? id.value : undefined,
|
||||
})
|
||||
.then(() => {
|
||||
fetchData(id.value);
|
||||
|
|
@ -416,7 +421,7 @@ async function addData() {
|
|||
|
||||
async function editData(idData: string) {
|
||||
await http
|
||||
.patch(config.API.profileNewTrainingByTrainingId(idData), {
|
||||
.patch(config.API.profileNewTrainingByTrainingId(idData, empType.value), {
|
||||
...trainData,
|
||||
profileId: undefined,
|
||||
startYear: undefined,
|
||||
|
|
@ -438,7 +443,7 @@ async function editData(idData: string) {
|
|||
function deleteData(idData: string) {
|
||||
dialogRemove($q, () =>
|
||||
http
|
||||
.delete(config.API.profileNewTrainingByTrainingId(idData))
|
||||
.delete(config.API.profileNewTrainingByTrainingId(idData, empType.value))
|
||||
.then(() => {
|
||||
fetchData(id.value);
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
|
|
@ -463,7 +468,7 @@ function closeHistoryDialog() {
|
|||
async function fetchData(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileNewTrainingByProfileId(id))
|
||||
.get(config.API.profileNewTrainingByProfileId(id, empType.value))
|
||||
.then(async (res) => {
|
||||
rows.value = res.data.result;
|
||||
})
|
||||
|
|
@ -478,7 +483,7 @@ async function fetchData(id: string) {
|
|||
async function fetchHistoryData(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileNewTrainingHisByTrainingId(id))
|
||||
.get(config.API.profileNewTrainingHisByTrainingId(id, empType.value))
|
||||
.then(async (res) => {
|
||||
historyRows.value = res.data.result;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ const {
|
|||
const profileId = ref<string>(
|
||||
route.params.id ? route.params.id.toString() : ""
|
||||
);
|
||||
const empType = ref<string>(
|
||||
route.name === "registryNewByid" ? "" : "-employee"
|
||||
);
|
||||
|
||||
const id = ref<string>("");
|
||||
const insigniaType = ref<string>("");
|
||||
|
|
@ -447,7 +450,7 @@ async function fetchData() {
|
|||
showLoader();
|
||||
try {
|
||||
const res = await http.get(
|
||||
config.API.profileNewInsignByProfileId(profileId.value)
|
||||
config.API.profileNewInsignByProfileId(profileId.value, empType.value)
|
||||
);
|
||||
rows.value = res.data.result;
|
||||
} catch (error) {
|
||||
|
|
@ -474,12 +477,15 @@ async function addEditData(editStatus: boolean = false) {
|
|||
if (!profileId.value) return;
|
||||
|
||||
const url = editStatus
|
||||
? config.API.profileNewInsignById(id.value)
|
||||
: config.API.profileNewInsign;
|
||||
? config.API.profileNewInsignById(id.value, empType.value)
|
||||
: config.API.profileNewInsign(empType.value);
|
||||
const method = editStatus ? "patch" : "post";
|
||||
const reqBody: RequestItemsObject = {
|
||||
...insigniaForm,
|
||||
profileId: editStatus ? undefined : profileId.value,
|
||||
profileEmployeeId:
|
||||
!editStatus && empType.value !== "" ? profileId.value : undefined,
|
||||
profileId:
|
||||
!editStatus && empType.value === "" ? profileId.value : undefined,
|
||||
};
|
||||
try {
|
||||
await http[method](url, reqBody);
|
||||
|
|
@ -528,7 +534,9 @@ async function clickHistory(row: ResponseObject) {
|
|||
|
||||
showLoader();
|
||||
try {
|
||||
const res = await http.get(config.API.profileNewInsignHisById(row.id));
|
||||
const res = await http.get(
|
||||
config.API.profileNewInsignHisById(row.id, empType.value)
|
||||
);
|
||||
rowsHistory.value = res.data.result;
|
||||
} catch (e) {
|
||||
messageError($q, e);
|
||||
|
|
@ -599,7 +607,13 @@ onMounted(async () => {
|
|||
|
||||
<template>
|
||||
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
||||
<q-btn dense color="primary" icon="add" flat round @click="onClickOpenDialog()"
|
||||
<q-btn
|
||||
dense
|
||||
color="primary"
|
||||
icon="add"
|
||||
flat
|
||||
round
|
||||
@click="onClickOpenDialog()"
|
||||
><q-tooltip>เพิ่มข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
|
||||
|
|
@ -799,7 +813,7 @@ onMounted(async () => {
|
|||
/>
|
||||
<q-separator color="grey-4" />
|
||||
<q-card-section style="max-height: 55vh" class="scroll">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<datepicker
|
||||
autoApply
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@ const {
|
|||
const profileId = ref<string>(
|
||||
route.params.id ? route.params.id.toString() : ""
|
||||
);
|
||||
const empType = ref<string>(
|
||||
route.name === "registryNewByid" ? "" : "-employee"
|
||||
);
|
||||
|
||||
const id = ref<string>("");
|
||||
const issueDateYear = ref<number>(0);
|
||||
|
|
@ -223,7 +226,7 @@ async function fetchData() {
|
|||
showLoader();
|
||||
try {
|
||||
const res = await http.get(
|
||||
config.API.profileNewHonorByProfileId(profileId.value)
|
||||
config.API.profileNewHonorByProfileId(profileId.value, empType.value)
|
||||
);
|
||||
rows.value = res.data.result;
|
||||
} catch (error) {
|
||||
|
|
@ -237,12 +240,15 @@ async function addEditData(editStatus: boolean = false) {
|
|||
if (!profileId.value) return;
|
||||
|
||||
const url = editStatus
|
||||
? config.API.profileNewHonorById(id.value)
|
||||
: config.API.profileNewHonor;
|
||||
? config.API.profileNewHonorById(id.value, empType.value)
|
||||
: config.API.profileNewHonor(empType.value);
|
||||
const method = editStatus ? "patch" : "post";
|
||||
const reqBody: RequestItemsObject = {
|
||||
...declHonorForm,
|
||||
profileId: editStatus ? undefined : profileId.value,
|
||||
profileEmployeeId:
|
||||
!editStatus && empType.value !== "" ? profileId.value : undefined,
|
||||
profileId:
|
||||
!editStatus && empType.value === "" ? profileId.value : undefined,
|
||||
isDate: declHonorForm.isDate === "true" ? true : false,
|
||||
issueDate:
|
||||
declHonorForm.isDate === "true"
|
||||
|
|
@ -291,7 +297,9 @@ async function clickHistory(row: ResponseObject) {
|
|||
|
||||
showLoader();
|
||||
try {
|
||||
const res = await http.get(config.API.profileNewHonorHisById(row.id));
|
||||
const res = await http.get(
|
||||
config.API.profileNewHonorHisById(row.id, empType.value)
|
||||
);
|
||||
rowsHistory.value = res.data.result;
|
||||
} catch (e) {
|
||||
messageError($q, e);
|
||||
|
|
@ -329,7 +337,13 @@ onMounted(async () => {
|
|||
</script>
|
||||
<template>
|
||||
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
||||
<q-btn dense color="primary" icon="add" flat round @click="onClickOpenDialog()"
|
||||
<q-btn
|
||||
dense
|
||||
color="primary"
|
||||
icon="add"
|
||||
flat
|
||||
round
|
||||
@click="onClickOpenDialog()"
|
||||
><q-tooltip>เพิ่มข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
|
||||
|
|
@ -722,18 +736,18 @@ onMounted(async () => {
|
|||
</q-card-section>
|
||||
<q-separator color="grey-4" />
|
||||
<q-card-actions align="right">
|
||||
<q-btn
|
||||
dense
|
||||
unelevated
|
||||
label="บันทึก"
|
||||
id="onSubmit"
|
||||
type="submit"
|
||||
color="public"
|
||||
class="q-px-md"
|
||||
>
|
||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-card-actions>
|
||||
<q-btn
|
||||
dense
|
||||
unelevated
|
||||
label="บันทึก"
|
||||
id="onSubmit"
|
||||
type="submit"
|
||||
color="public"
|
||||
class="q-px-md"
|
||||
>
|
||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-card-actions>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@ const {
|
|||
const profileId = ref<string>(
|
||||
route.params.id ? route.params.id.toString() : ""
|
||||
);
|
||||
const empType = ref<string>(
|
||||
route.name === "registryNewByid" ? "" : "-employee"
|
||||
);
|
||||
|
||||
const id = ref<string>("");
|
||||
const resPerformForm = reactive<RequestItemsObject>({
|
||||
|
|
@ -295,7 +298,10 @@ async function fetchData() {
|
|||
showLoader();
|
||||
try {
|
||||
const res = await http.get(
|
||||
config.API.profileNewAssessmentsByProfileId(profileId.value)
|
||||
config.API.profileNewAssessmentsByProfileId(
|
||||
profileId.value,
|
||||
empType.value
|
||||
)
|
||||
);
|
||||
rows.value = res.data.result;
|
||||
} catch (error) {
|
||||
|
|
@ -309,12 +315,15 @@ async function addEditData(editStatus: boolean = false) {
|
|||
if (!profileId.value) return;
|
||||
|
||||
const url = editStatus
|
||||
? config.API.profileNewAssessmentsById(id.value)
|
||||
: config.API.profileNewAssessments;
|
||||
? config.API.profileNewAssessmentsById(id.value, empType.value)
|
||||
: config.API.profileNewAssessments(empType.value);
|
||||
const method = editStatus ? "patch" : "post";
|
||||
const reqBody: RequestItemsObject = {
|
||||
...resPerformForm,
|
||||
profileId: editStatus ? undefined : profileId.value,
|
||||
profileEmployeeId:
|
||||
!editStatus && empType.value !== "" ? profileId.value : undefined,
|
||||
profileId:
|
||||
!editStatus && empType.value === "" ? profileId.value : undefined,
|
||||
};
|
||||
|
||||
try {
|
||||
|
|
@ -358,7 +367,7 @@ async function clickHistory(row: ResponseObject) {
|
|||
|
||||
showLoader();
|
||||
try {
|
||||
const res = await http.get(config.API.profileNewAssessmentsHisById(row.id));
|
||||
const res = await http.get(config.API.profileNewAssessmentsHisById(row.id,empType.value));
|
||||
|
||||
rowsHistory.value = res.data.result;
|
||||
} catch (e) {
|
||||
|
|
@ -398,7 +407,13 @@ onMounted(async () => {
|
|||
</script>
|
||||
<template>
|
||||
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
||||
<q-btn dense color="primary" icon="add" flat round @click="onClickOpenDialog()"
|
||||
<q-btn
|
||||
dense
|
||||
color="primary"
|
||||
icon="add"
|
||||
flat
|
||||
round
|
||||
@click="onClickOpenDialog()"
|
||||
><q-tooltip>เพิ่มข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
|
||||
|
|
@ -767,7 +782,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
||||
|
||||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
<q-btn
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@ const pagination = ref({
|
|||
const profileId = ref<string>(
|
||||
route.params.id ? route.params.id.toString() : ""
|
||||
);
|
||||
const empType = ref<string>(
|
||||
route.name === "registryNewByid" ? "" : "-employee"
|
||||
);
|
||||
const mode = ref<string>("table");
|
||||
const filterKeyword = ref<string>("");
|
||||
const rows = ref<RowList[]>([]);
|
||||
|
|
@ -148,12 +151,13 @@ function validateForm() {
|
|||
async function saveData() {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileNewOther, {
|
||||
profileId: profileId.value,
|
||||
.post(config.API.profileNewOther(empType.value), {
|
||||
profileId: empType.value === "" ? profileId.value : undefined,
|
||||
profileEmployeeId: empType.value !== "" ? profileId.value : undefined,
|
||||
date: date.value,
|
||||
detail: detail.value,
|
||||
})
|
||||
.then((res) => {
|
||||
.then(() => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
getData();
|
||||
closeDialog();
|
||||
|
|
@ -172,7 +176,7 @@ async function saveData() {
|
|||
async function editData() {
|
||||
showLoader();
|
||||
await http
|
||||
.patch(config.API.profileNewOtherById(id.value), {
|
||||
.patch(config.API.profileNewOtherById(id.value, empType.value), {
|
||||
date: date.value,
|
||||
detail: detail.value,
|
||||
})
|
||||
|
|
@ -192,7 +196,7 @@ async function editData() {
|
|||
async function getData() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileNewOtherByProfileId(profileId.value))
|
||||
.get(config.API.profileNewOtherByProfileId(profileId.value, empType.value))
|
||||
.then((res) => {
|
||||
rows.value = res.data.result;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import { ref, watch, reactive } from "vue";
|
|||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar, type QTableProps } from "quasar";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
import type { RowList } from "@/modules/04_registryNew/interface/index/other";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -17,6 +19,7 @@ const modal = defineModel<boolean>("modal", { required: true });
|
|||
const id = defineModel<string>("id", { required: true });
|
||||
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
||||
const historyPagination = ref({
|
||||
|
|
@ -39,6 +42,9 @@ const formFilter = reactive<FormFilter>({
|
|||
isShowRetire: false,
|
||||
isProbation: false,
|
||||
});
|
||||
const empType = ref<string>(
|
||||
route.name === "registryNewByid" ? "" : "-employee"
|
||||
);
|
||||
|
||||
const visibleColumns = ref<String[]>([
|
||||
"date",
|
||||
|
|
@ -95,7 +101,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
function getHistory() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.profileNewOtherHisById(id.value))
|
||||
.get(config.API.profileNewOtherHisById(id.value, empType.value))
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
rows.value = [];
|
||||
|
|
@ -130,10 +136,7 @@ watch(modal, (status) => {
|
|||
<template>
|
||||
<q-dialog v-model="modal" persistent>
|
||||
<q-card style="min-width: 80%">
|
||||
<DialogHeader
|
||||
tittle="ประวัติแก้ไขอื่นๆ"
|
||||
:close="() => (modal = false)"
|
||||
/>
|
||||
<DialogHeader tittle="ประวัติแก้ไขอื่นๆ" :close="() => (modal = false)" />
|
||||
<q-separator color="grey-4" />
|
||||
|
||||
<q-card-section style="max-height: 60vh" class="scroll">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<script setup lang="ts">
|
||||
import { reactive, ref, onMounted } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
|
|
@ -12,6 +14,8 @@ import { useProfileDataStore } from "@/modules/04_registryNew/stores/profile";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
|
||||
const store = useProfileDataStore();
|
||||
const { fetchPerson, filterSelector } = store;
|
||||
const {
|
||||
|
|
@ -24,6 +28,12 @@ const {
|
|||
date2Thai,
|
||||
} = useCounterMixin();
|
||||
|
||||
const profileId = ref<string>(
|
||||
route.params.id ? route.params.id.toString() : ""
|
||||
);
|
||||
const empType = ref<string>(
|
||||
route.name === "registryNewByid" ? "" : "-employee"
|
||||
);
|
||||
const visibleColumns = ref<String[]>([
|
||||
"citizenId",
|
||||
"prefix",
|
||||
|
|
@ -133,10 +143,31 @@ const fromData = reactive({
|
|||
statusMarital: "",
|
||||
});
|
||||
|
||||
function fetchDataChildren() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.profileFamily(empType.value, "children"))
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
function onSubmit(type: string) {
|
||||
console.log(type);
|
||||
|
||||
dialogConfirm($q, () => {
|
||||
if (type === "father") {
|
||||
} else if (type === "mom") {
|
||||
} else if (type === "spouse") {
|
||||
} else if (type === "child") {
|
||||
submitChildren();
|
||||
}
|
||||
closeDialog();
|
||||
});
|
||||
}
|
||||
|
|
@ -164,7 +195,7 @@ function onOpenDialogForm(
|
|||
isEdit.value = isStatusEdit;
|
||||
|
||||
if (type === "father") {
|
||||
titleForm.value = " • บิดา";
|
||||
titleForm.value = "บิดา";
|
||||
if (isStatusEdit) {
|
||||
fromData.isLive = fatherData.value.isLive;
|
||||
fromData.citizenId = fatherData.value.citizenId;
|
||||
|
|
@ -174,7 +205,7 @@ function onOpenDialogForm(
|
|||
fromData.job = fatherData.value.job;
|
||||
}
|
||||
} else if (type === "mom") {
|
||||
titleForm.value = " • มารดา";
|
||||
titleForm.value = "มารดา";
|
||||
if (isStatusEdit) {
|
||||
fromData.isLive = momData.value.isLive;
|
||||
fromData.citizenId = momData.value.citizenId;
|
||||
|
|
@ -184,9 +215,9 @@ function onOpenDialogForm(
|
|||
fromData.job = momData.value.job;
|
||||
}
|
||||
} else if (type === "spouse") {
|
||||
titleForm.value = " • คู่สมรส";
|
||||
titleForm.value = "คู่สมรส";
|
||||
} else if (type === "child") {
|
||||
titleForm.value = " • บุตร";
|
||||
titleForm.value = "บุตร";
|
||||
fromData.isLive = data.isLive;
|
||||
fromData.citizenId = data.citizenId;
|
||||
fromData.prefix = data.prefix;
|
||||
|
|
@ -269,8 +300,31 @@ function convertisLive(status: number) {
|
|||
}
|
||||
}
|
||||
|
||||
function submitChildren() {
|
||||
const body = {
|
||||
profileId: empType.value === "" ? profileId.value : undefined,
|
||||
profileEmployeeId: empType.value !== "" ? profileId.value : undefined,
|
||||
childrenCareer: fromData.job,
|
||||
childrenFirstName: fromData.firstName,
|
||||
childrenLastName: fromData.lastName,
|
||||
childrenPrefix: fromData.prefix,
|
||||
childrenLive: fromData.isLive === 1 ? true : false,
|
||||
childrenCitizenId: fromData.citizenId,
|
||||
};
|
||||
|
||||
http
|
||||
.post(config.API.profileFamily(empType.value, "children"), body)
|
||||
.then(() => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchData();
|
||||
fetchDataChildren();
|
||||
fetchDataRelationship();
|
||||
});
|
||||
</script>
|
||||
|
|
@ -601,20 +655,22 @@ onMounted(() => {
|
|||
<q-card style="min-width: 80%">
|
||||
<q-form @submit.prevent greedy @validation-success="onSubmit(typeForm)">
|
||||
<DialogHeader
|
||||
:tittle="isEdit ? 'แก้ไขข้อมูลครอบครัว' : 'เพิ้มข้อมูลครอบครัว'"
|
||||
:tittle="
|
||||
isEdit ? `แก้ไขข้อมูล${titleForm}` : `เพิ้มข้อมูลค${titleForm}`
|
||||
"
|
||||
:close="closeDialog"
|
||||
/>
|
||||
<q-separator color="grey-4" />
|
||||
<q-card-section>
|
||||
<div class="col-12 row q-pb-sm">
|
||||
<!-- <div class="col-12 row q-pb-sm">
|
||||
<div
|
||||
class="q-mr-md q-pl-md text-weight-bold text-primary text-subtitle1"
|
||||
>
|
||||
{{ titleForm }}
|
||||
</div>
|
||||
</div>
|
||||
<q-card bordered class="bg-grey-1 q-pa-md q-col-gutter-sm">
|
||||
<div class="col" v-if="typeForm === 'spouse'">
|
||||
</div> -->
|
||||
<div class="q-col-gutter-sm">
|
||||
<div class="row col" v-if="typeForm === 'spouse'">
|
||||
<q-select
|
||||
outlined
|
||||
bg-color="white"
|
||||
|
|
@ -741,7 +797,7 @@ onMounted(() => {
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row q-mt-md">
|
||||
<div class="q-mr-sm">สถานภาพการมีชีวิต</div>
|
||||
<div>
|
||||
<q-radio
|
||||
|
|
@ -765,19 +821,21 @@ onMounted(() => {
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
<q-btn
|
||||
unelevated
|
||||
label="บันทึก"
|
||||
id="onSubmit"
|
||||
type="submit"
|
||||
color="public"
|
||||
>
|
||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
<div class="q-pa-sm">
|
||||
<q-btn
|
||||
unelevated
|
||||
label="บันทึก"
|
||||
id="onSubmit"
|
||||
type="submit"
|
||||
color="public"
|
||||
>
|
||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-card-actions>
|
||||
</q-form>
|
||||
</q-card>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
interface RequestItemsObject {
|
||||
profileId?: string;
|
||||
profileEmployeeId?: string;
|
||||
detail: string;
|
||||
issueDate: Date | null;
|
||||
issuer: string;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ interface RequestItemsObject {
|
|||
refCommandDate: Date | null;
|
||||
refCommandNo: string;
|
||||
note: string;
|
||||
profileEmployeeId?: string | null;
|
||||
}
|
||||
|
||||
export type { RequestItemsObject };
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
interface RequestItemsObject {
|
||||
profileId?: string;
|
||||
profileEmployeeId?: string;
|
||||
name: string;
|
||||
date: Date | null;
|
||||
point1: number;
|
||||
|
|
|
|||
|
|
@ -1,16 +1,10 @@
|
|||
divdivdiv
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, reactive } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import CurrencyInput from "@/components/CurruncyInput.vue";
|
||||
import type { ResponseTitle } from "@/modules/05_placement/interface/response/Receive";
|
||||
import type {
|
||||
appointmentData,
|
||||
ResponseData,
|
||||
DataProfile,
|
||||
} from "@/modules/05_placement/interface/response/AppointMent";
|
||||
import type { DataProfile } from "@/modules/05_placement/interface/response/AppointMent";
|
||||
import type { QForm } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -103,7 +97,7 @@ function putAppointment() {
|
|||
positionTypeOld: positionTypeOld.value,
|
||||
positionLevelOld: positionLevelOld.value,
|
||||
positionNumberOld: posNo.value,
|
||||
amountOld: Number(salary.value),
|
||||
amountOld: salary.value.toString().replace(/,/g, ""),
|
||||
reason: reason.value,
|
||||
positionDate: date.value,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { ref, computed, watchEffect } from "vue";
|
|||
import { useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { UserData } from "@/modules/05_placement/interface/response/AppointMent";
|
||||
import type { UserDataNew } from "@/modules/05_placement/interface/response/AppointMent";
|
||||
|
||||
import DialogHeader from "@/modules/05_placement/components/AppointMent/DialogHeader.vue";
|
||||
import { useTransferDataStore } from "@/modules/05_placement/store";
|
||||
|
|
@ -27,7 +27,7 @@ const {
|
|||
const $q = useQuasar();
|
||||
const selected = ref<[]>([]);
|
||||
const checkSelected = computed(() => {
|
||||
if (selected.value.length === 0 || props.type === "") {
|
||||
if (selected.value.length === 0) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
|
@ -48,6 +48,7 @@ const visibleColumns2 = ref<string[]>([
|
|||
"fullname",
|
||||
"organizationName",
|
||||
"birthday",
|
||||
"typeCommand",
|
||||
]);
|
||||
const columns2 = ref<QTableProps["columns"]>([
|
||||
{
|
||||
|
|
@ -88,6 +89,24 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "typeCommand",
|
||||
align: "left",
|
||||
label: "ประเภทคำสั่ง",
|
||||
sortable: true,
|
||||
field: "typeCommand",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (val: string) => {
|
||||
return val === "APPOINT"
|
||||
? "แต่งตั้ง"
|
||||
: val === "SLIP"
|
||||
? "เลื่อน"
|
||||
: val === "MOVE"
|
||||
? "ย้าย"
|
||||
: "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "birthday",
|
||||
align: "left",
|
||||
|
|
@ -110,43 +129,41 @@ const updateInput = (value: any) => {
|
|||
emit("update:filterKeyword2", value);
|
||||
};
|
||||
|
||||
const updateInputType = (value: string) => {
|
||||
emit("update:type", value);
|
||||
};
|
||||
// const updateInputType = (value: string) => {
|
||||
// emit("update:type", value);
|
||||
// };
|
||||
//รีเซ็ตค่าในช่องค้นหา
|
||||
const Reset = () => {
|
||||
emit("update:filterKeyword2", "");
|
||||
};
|
||||
//เปิด modal ยืนยัน
|
||||
const clickAddlist = () => {
|
||||
dialogConfirm($q, () => createdAppoint());
|
||||
};
|
||||
|
||||
//อัพเดต ส่งไปออกคำสั่ง
|
||||
const createdAppoint = async () => {
|
||||
let pId: string[] = [];
|
||||
let Type = props.type as string;
|
||||
selected.value.forEach((e: UserData) => {
|
||||
pId.push(e.personalId);
|
||||
});
|
||||
let data = {
|
||||
id: pId,
|
||||
};
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.apppointmentReport(Type), data)
|
||||
.then((res) => {
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
props.fecthlistappointment?.();
|
||||
selected.value = [];
|
||||
props.clickClose?.();
|
||||
//ส่งไปออกคำสั่ง
|
||||
const sendToCommand = () => {
|
||||
dialogConfirm($q, async () => {
|
||||
let pId: string[] = [];
|
||||
let Type = props.type as string;
|
||||
selected.value.forEach((e: UserDataNew) => {
|
||||
pId.push(e.id);
|
||||
});
|
||||
let data = {
|
||||
id: pId,
|
||||
};
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.apppointmentReport(Type), data)
|
||||
.then((res) => {
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
props.fecthlistappointment?.();
|
||||
selected.value = [];
|
||||
props.clickClose?.();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
watchEffect(() => {
|
||||
|
|
@ -163,7 +180,7 @@ watchEffect(() => {
|
|||
<q-card-section class="q-pt-none">
|
||||
<div class="row justify-between">
|
||||
<div class="col-5">
|
||||
<q-toolbar style="padding: 0">
|
||||
<!-- <q-toolbar style="padding: 0">
|
||||
<q-select
|
||||
outlined
|
||||
dense
|
||||
|
|
@ -177,7 +194,7 @@ watchEffect(() => {
|
|||
option-label="name"
|
||||
option-value="id"
|
||||
/>
|
||||
</q-toolbar>
|
||||
</q-toolbar> -->
|
||||
</div>
|
||||
<div class="col-5">
|
||||
<q-toolbar style="padding: 0">
|
||||
|
|
@ -316,7 +333,7 @@ watchEffect(() => {
|
|||
<q-card-actions align="right" class="bg-white text-teal">
|
||||
<q-btn
|
||||
label="ส่งไปออกคำสั่ง"
|
||||
@click="clickAddlist"
|
||||
@click="sendToCommand"
|
||||
color="public"
|
||||
:disable="checkSelected"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ const visibleColumns = ref<string[]>([
|
|||
"citizenId",
|
||||
"fullname",
|
||||
"organizationName",
|
||||
"typeCommand",
|
||||
"dateOfBirth",
|
||||
"createdAt",
|
||||
"status",
|
||||
|
|
@ -113,6 +114,24 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "typeCommand",
|
||||
align: "left",
|
||||
label: "ประเภทคำสั่ง",
|
||||
sortable: true,
|
||||
field: "typeCommand",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (val: string) => {
|
||||
return val === "APPOINT"
|
||||
? "แต่งตั้ง"
|
||||
: val === "SLIP"
|
||||
? "เลื่อน"
|
||||
: val === "MOVE"
|
||||
? "ย้าย"
|
||||
: "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
align: "left",
|
||||
|
|
@ -146,10 +165,10 @@ const clickClose = () => {
|
|||
};
|
||||
|
||||
//เปิด modal
|
||||
const popup = () => {
|
||||
const sendToCommand = () => {
|
||||
modal.value = true;
|
||||
filterKeyword2.value = "";
|
||||
fecthTypeOption();
|
||||
// fecthTypeOption();
|
||||
};
|
||||
|
||||
//ดึงข้อมูล API
|
||||
|
|
@ -213,22 +232,22 @@ const fecthlistappointment = async () => {
|
|||
};
|
||||
|
||||
//ดึงข้อมูลประเภทคำสั่งเเต่งตั้ง
|
||||
const fecthTypeOption = async () => {
|
||||
type.value = "";
|
||||
await http
|
||||
.get(config.API.typeOrder())
|
||||
.then((res) => {
|
||||
optionsType.value = res.data.result.filter(
|
||||
(e: OpType) =>
|
||||
e.commandCode === "C-PM-05" ||
|
||||
e.commandCode === "C-PM-06" ||
|
||||
e.commandCode === "C-PM-07"
|
||||
);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
});
|
||||
};
|
||||
// const fecthTypeOption = async () => {
|
||||
// type.value = "";
|
||||
// await http
|
||||
// .get(config.API.typeOrder())
|
||||
// .then((res) => {
|
||||
// optionsType.value = res.data.result.filter(
|
||||
// (e: OpType) =>
|
||||
// e.commandCode === "C-PM-05" ||
|
||||
// e.commandCode === "C-PM-06" ||
|
||||
// e.commandCode === "C-PM-07"
|
||||
// );
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// });
|
||||
// };
|
||||
|
||||
// เปิดโครงสร้าง
|
||||
const openModalTree = (data: any, type: string) => {
|
||||
|
|
@ -262,12 +281,6 @@ const deleteAppoint = async (id: string) => {
|
|||
});
|
||||
};
|
||||
|
||||
// ปิด modal โครงส้ราง
|
||||
const closeModalTree = async () => {
|
||||
await fecthlistappointment();
|
||||
modalTree.value = false;
|
||||
};
|
||||
|
||||
// ไปหน้ารายละเอียด
|
||||
const nextPage = (id: string) => {
|
||||
router.push({
|
||||
|
|
@ -314,6 +327,7 @@ onMounted(() => {
|
|||
fecthlistappointment();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
รายการแต่งตั้ง-เลื่อน-ย้าย
|
||||
|
|
@ -324,7 +338,7 @@ onMounted(() => {
|
|||
<div class="col-12">
|
||||
<div class="row col-12">
|
||||
<q-btn
|
||||
@click="popup()"
|
||||
@click="sendToCommand()"
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
|
|
|
|||
|
|
@ -6,20 +6,13 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
import keycloak from "@/plugins/keycloak";
|
||||
|
||||
import type { ResponseDataDetail } from "@/modules/05_placement/interface/response/Transfer";
|
||||
import type {
|
||||
OtherdataInterface,
|
||||
resApiData,
|
||||
} from "@/modules/05_placement/interface/response/OhterMain";
|
||||
import type { resApiData } from "@/modules/05_placement/interface/response/OhterMain";
|
||||
import type { QForm } from "quasar";
|
||||
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
||||
|
||||
/** importComponents*/
|
||||
|
||||
|
||||
import CardProfile from "@/components/CardProfile.vue";
|
||||
import CurruncyInput from "@/components/CurruncyInput.vue";
|
||||
|
||||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
|
|
@ -102,7 +95,7 @@ const onSubmit = async () => {
|
|||
positionTypeOld: positionTypeOld.value,
|
||||
positionLevelOld: positionLevelOld.value,
|
||||
positionNumberOld: posNo.value,
|
||||
amountOld: Number(salary.value),
|
||||
amountOld: salary.value.toString().replace(/,/g, ""),
|
||||
positionDate: date.value,
|
||||
militaryDate: militaryDate.value,
|
||||
reason: reason.value,
|
||||
|
|
@ -145,6 +138,7 @@ onMounted(async () => {
|
|||
await fetchData();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
<q-btn
|
||||
|
|
|
|||
|
|
@ -186,22 +186,6 @@ const fecthTypeOption = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
//----(ลบข้อมูลจากไอดี)------//
|
||||
const deleteOther = async (id: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.otherByid(id))
|
||||
.then(() => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
fecthlistOthet();
|
||||
});
|
||||
};
|
||||
|
||||
//----(รีเซ็ตข้อมูลในช่อง input)------//
|
||||
const resetFilter = () => {
|
||||
filterKeyword.value = "";
|
||||
|
|
@ -224,10 +208,23 @@ const clickClose = () => {
|
|||
|
||||
//----(เปิด Dialog ลบข้อมูล)------//
|
||||
const clickDelete = (id: string) => {
|
||||
dialogRemove($q, () => deleteOther(id));
|
||||
dialogRemove($q, async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.otherByid(id))
|
||||
.then(() => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
fecthlistOthet();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
//----(เปิดหน้าถัดไป)------//
|
||||
//----(เปิดหน้ารายละเอียด)------//
|
||||
const nextPage = (id: string) => {
|
||||
router.push({
|
||||
path: `/other/detail/${id}`,
|
||||
|
|
@ -351,7 +348,7 @@ onMounted(() => {
|
|||
class="text-red-14"
|
||||
icon="mdi-delete"
|
||||
dense
|
||||
@click.stop="clickDelete(props.row.personalId)"
|
||||
@click.stop="clickDelete(props.row.id)"
|
||||
><q-tooltip>ลบข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
</q-td>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ const {
|
|||
} = mixin;
|
||||
|
||||
const profileStore = useProfileDataStore();
|
||||
const { changeRetireText, changeBirth } = profileStore;
|
||||
const { changeRetireText } = profileStore;
|
||||
|
||||
const prefixOps = ref<DataOption[]>([]);
|
||||
const age = ref<string | null>("");
|
||||
|
|
@ -331,7 +331,7 @@ const onSubmit = async () => {
|
|||
.post(config.API.receiveData(), formData)
|
||||
.then(async (res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
await changeBirth(informaData.value.birthDate ?? new Date());
|
||||
// await changeBirth(informaData.value.birthDate ?? new Date());
|
||||
await clickBack();
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,14 @@ const { statusText } = transferStore;
|
|||
const $q = useQuasar();
|
||||
const selected = ref<ResponseRow[]>([]);
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, success, messageError, dialogConfirm, hideLoader,date2Thai } = mixin;
|
||||
const {
|
||||
showLoader,
|
||||
success,
|
||||
messageError,
|
||||
dialogConfirm,
|
||||
hideLoader,
|
||||
date2Thai,
|
||||
} = mixin;
|
||||
|
||||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
|
|
@ -134,7 +141,7 @@ const saveOrder = () => {
|
|||
};
|
||||
//ส่งไปออกคำสั่ง
|
||||
const Ordersave = async () => {
|
||||
const id = selected.value.map((r: ResponseRow) => r.personalId);
|
||||
const id = selected.value.map((r: ResponseRow) => r.id);
|
||||
const body = {
|
||||
id,
|
||||
};
|
||||
|
|
@ -302,7 +309,6 @@ watchEffect(() => {
|
|||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
divdivdiv<script setup lang="ts">
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useProfileDataStore } from "@/modules/08_registryEmployee/store";
|
||||
import CurrencyInput from "@/components/CurruncyInput.vue";
|
||||
import type { QTableProps, QForm } from "quasar";
|
||||
import type {
|
||||
ResponseTitle,
|
||||
|
|
@ -407,21 +406,6 @@ const calRetire = async (birth: Date) => {
|
|||
// }
|
||||
};
|
||||
|
||||
const conditionSave = async () => {
|
||||
if (myForm.value !== null) {
|
||||
myForm.value.validate().then((success) => {
|
||||
if (success) {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => await saveData(),
|
||||
"ต้องการแก้ไขข้อมูลหรือไม่?",
|
||||
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย"
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function saveData() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ const getData = async () => {
|
|||
positionLevelOld: item.positionLevelOld,
|
||||
positionNumberOld: item.positionNumberOld,
|
||||
organizationPositionOld: item.organizationPositionOld,
|
||||
createdAt:date2Thai(item.createdAt),
|
||||
createdAt: date2Thai(item.createdAt),
|
||||
}));
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -516,7 +516,10 @@ const pagination = ref({
|
|||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="props.row.status !== 'DONE' && props.row.status !== 'REPORT'"
|
||||
v-if="
|
||||
props.row.status !== 'DONE' &&
|
||||
props.row.status !== 'REPORT'
|
||||
"
|
||||
icon="mdi-dots-vertical"
|
||||
size="12px"
|
||||
color="grey-7"
|
||||
|
|
|
|||
|
|
@ -1,61 +1,61 @@
|
|||
interface listAppointType {
|
||||
personalId: string
|
||||
citizenId: number
|
||||
fullname: string
|
||||
organizationName: string
|
||||
orgName: string
|
||||
organizationShortName: string
|
||||
positionNumber: string
|
||||
positionPath: string
|
||||
status: string
|
||||
createdAt: string
|
||||
birthday: string
|
||||
educationOld: string
|
||||
organizationPositionOld: string
|
||||
positionTypeOld: string
|
||||
positionLevelOld: string
|
||||
positionNumberOld: string
|
||||
salary: number
|
||||
positionDate: Date
|
||||
personalId: string;
|
||||
citizenId: number;
|
||||
fullname: string;
|
||||
organizationName: string;
|
||||
orgName: string;
|
||||
organizationShortName: string;
|
||||
positionNumber: string;
|
||||
positionPath: string;
|
||||
status: string;
|
||||
createdAt: string;
|
||||
birthday: string;
|
||||
educationOld: string;
|
||||
organizationPositionOld: string;
|
||||
positionTypeOld: string;
|
||||
positionLevelOld: string;
|
||||
positionNumberOld: string;
|
||||
salary: number;
|
||||
positionDate: Date;
|
||||
}
|
||||
|
||||
interface resData {
|
||||
id: string
|
||||
citizenId: number
|
||||
prefix: string
|
||||
firstname: string
|
||||
lastname: string
|
||||
organizationName: string
|
||||
organizationShortName: string
|
||||
positionNumber: string
|
||||
positionPath: string
|
||||
status: string
|
||||
createdAt: Date
|
||||
dateOfBirth: Date
|
||||
educationOld: string
|
||||
organizationPositionOld: string
|
||||
positionTypeOld: string
|
||||
positionLevelOld: string
|
||||
positionNumberOld: string
|
||||
salary: number
|
||||
positionDate: Date
|
||||
id: string;
|
||||
citizenId: number;
|
||||
prefix: string;
|
||||
firstname: string;
|
||||
lastname: string;
|
||||
organizationName: string;
|
||||
organizationShortName: string;
|
||||
positionNumber: string;
|
||||
positionPath: string;
|
||||
status: string;
|
||||
createdAt: Date;
|
||||
dateOfBirth: Date;
|
||||
educationOld: string;
|
||||
organizationPositionOld: string;
|
||||
positionTypeOld: string;
|
||||
positionLevelOld: string;
|
||||
positionNumberOld: string;
|
||||
salary: number;
|
||||
positionDate: Date;
|
||||
}
|
||||
interface orgFilter {
|
||||
orgName: string
|
||||
status: string
|
||||
educationOld: string
|
||||
organizationPositionOld: string
|
||||
positionTypeOld: string
|
||||
positionLevelOld: string
|
||||
positionNumberOld: string
|
||||
salary: number
|
||||
positionDate: Date
|
||||
orgName: string;
|
||||
status: string;
|
||||
educationOld: string;
|
||||
organizationPositionOld: string;
|
||||
positionTypeOld: string;
|
||||
positionLevelOld: string;
|
||||
positionNumberOld: string;
|
||||
salary: number;
|
||||
positionDate: Date;
|
||||
}
|
||||
interface appointmentData {
|
||||
citizenId: string
|
||||
prefixId?: string
|
||||
firstname?: string
|
||||
lastname?: string
|
||||
citizenId: string;
|
||||
prefixId?: string;
|
||||
firstname?: string;
|
||||
lastname?: string;
|
||||
}
|
||||
|
||||
interface UserData {
|
||||
|
|
@ -72,10 +72,24 @@ interface UserData {
|
|||
birthday: string;
|
||||
}
|
||||
|
||||
interface UserDataNew {
|
||||
id: string;
|
||||
citizenId: string;
|
||||
fullname: string;
|
||||
organizationName: string;
|
||||
orgName: string;
|
||||
organizationShortName: string;
|
||||
positionNumber: string;
|
||||
positionPath: string;
|
||||
status: string;
|
||||
createdAt: string;
|
||||
birthday: string;
|
||||
}
|
||||
|
||||
interface ResponseData {
|
||||
data: {
|
||||
result: {
|
||||
citizenId: string
|
||||
citizenId: string;
|
||||
profileId: string;
|
||||
prefix: string;
|
||||
firstname: string;
|
||||
|
|
@ -90,7 +104,6 @@ interface ResponseData {
|
|||
reason: string;
|
||||
positionDate: Date;
|
||||
avatar: string;
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -129,7 +142,7 @@ export type {
|
|||
orgFilter,
|
||||
appointmentData,
|
||||
UserData,
|
||||
UserDataNew,
|
||||
ResponseData,
|
||||
DataProfile
|
||||
|
||||
}
|
||||
DataProfile,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ interface ResponseTitle {
|
|||
}
|
||||
|
||||
interface ResponseRow {
|
||||
personalId: string;
|
||||
id: string;
|
||||
citizenId: string;
|
||||
fullname: string;
|
||||
organizationName: string;
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ const documentFile = ref<any>(null);
|
|||
const fileList = ref<ArrayFileList[]>([]);
|
||||
|
||||
async function getData() {
|
||||
console.log(config.API.kpiFile);
|
||||
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.kpiFile + `/KPI/ไฟล์เอกสาร/${id.value}`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue