Merge branch 'develop' into develop-tee
This commit is contained in:
commit
8bba6bf7c9
37 changed files with 3414 additions and 1050 deletions
|
|
@ -193,6 +193,12 @@ const menuList = readonly<any[]>([
|
||||||
path: "Orderplacement",
|
path: "Orderplacement",
|
||||||
role: "placement",
|
role: "placement",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 6.3,
|
||||||
|
label: "การทดลองงาน" /* การทดลองงาน */,
|
||||||
|
path: "probation",
|
||||||
|
role: "probation",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
<q-btn
|
<q-btn
|
||||||
icon="mdi-arrow-"
|
icon="mdi-arrow-left"
|
||||||
unelevated
|
unelevated
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
class="full-width datepicker q-mb-md"
|
class="full-width datepicker q-mb-sm"
|
||||||
:model-value="dateExam != null ? date2Thai(dateExam) : null"
|
:model-value="dateExam != null ? date2Thai(dateExam) : null"
|
||||||
:label="`${'วันที่สอบ'}`"
|
:label="`${'วันที่สอบ'}`"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่สอบ'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่สอบ'}`]"
|
||||||
|
|
@ -149,7 +149,7 @@
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
class="full-width datepicker q-mb-md"
|
class="full-width datepicker q-mb-sm"
|
||||||
:model-value="
|
:model-value="
|
||||||
dateAnnouncement != null
|
dateAnnouncement != null
|
||||||
? dateThaiRange(dateAnnouncement)
|
? dateThaiRange(dateAnnouncement)
|
||||||
|
|
@ -191,7 +191,7 @@
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
class="full-width datepicker q-mb-md"
|
class="full-width datepicker q-mb-sm"
|
||||||
:model-value="
|
:model-value="
|
||||||
dateRegister != null ? dateThaiRange(dateRegister) : null
|
dateRegister != null ? dateThaiRange(dateRegister) : null
|
||||||
"
|
"
|
||||||
|
|
@ -231,7 +231,7 @@
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
class="full-width datepicker q-mb-md"
|
class="full-width datepicker q-mb-sm"
|
||||||
:model-value="
|
:model-value="
|
||||||
datePayment != null ? dateThaiRange(datePayment) : null
|
datePayment != null ? dateThaiRange(datePayment) : null
|
||||||
"
|
"
|
||||||
|
|
@ -271,7 +271,7 @@
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
class="full-width datepicker q-mb-md"
|
class="full-width datepicker q-mb-sm"
|
||||||
:model-value="
|
:model-value="
|
||||||
dateAnnounce != null ? date2Thai(dateAnnounce) : null
|
dateAnnounce != null ? date2Thai(dateAnnounce) : null
|
||||||
"
|
"
|
||||||
|
|
|
||||||
|
|
@ -366,7 +366,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขผลก
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
@ -595,34 +597,36 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileAssessmentId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileAssessmentId(profileId.value))
|
||||||
let data = res.data.result;
|
.then((res) => {
|
||||||
rows.value = [];
|
let data = res.data.result;
|
||||||
data.map((e: ResponseObject) => {
|
rows.value = [];
|
||||||
rows.value.push({
|
data.map((e: ResponseObject) => {
|
||||||
id: e.id,
|
rows.value.push({
|
||||||
name: e.name,
|
id: e.id,
|
||||||
point1Total: e.point1Total,
|
name: e.name,
|
||||||
point1: e.point1,
|
point1Total: e.point1Total,
|
||||||
point2Total: e.point2Total,
|
point1: e.point1,
|
||||||
point2: e.point2,
|
point2Total: e.point2Total,
|
||||||
pointSumTotal: e.pointSumTotal,
|
point2: e.point2,
|
||||||
pointSum: e.pointSum,
|
pointSumTotal: e.pointSumTotal,
|
||||||
date: new Date(e.date),
|
pointSum: e.pointSum,
|
||||||
createdAt: new Date(e.createdAt),
|
date: new Date(e.date),
|
||||||
createdFullName: e.createdFullName,
|
createdAt: new Date(e.createdAt),
|
||||||
|
createdFullName: e.createdFullName,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -712,29 +716,31 @@ const clickSave = async () => {
|
||||||
* บันทึกเพิ่มข้อมูล
|
* บันทึกเพิ่มข้อมูล
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.post(config.API.profileAssessmentId(profileId.value), {
|
await http
|
||||||
id: id.value,
|
.post(config.API.profileAssessmentId(profileId.value), {
|
||||||
name: name.value,
|
id: id.value,
|
||||||
point1Total: point1Total.value,
|
name: name.value,
|
||||||
point1: point1.value,
|
point1Total: point1Total.value,
|
||||||
point2Total: point2Total.value,
|
point1: point1.value,
|
||||||
point2: point2.value,
|
point2Total: point2Total.value,
|
||||||
pointSumTotal: pointSumTotal.value,
|
point2: point2.value,
|
||||||
pointSum: pointSum.value,
|
pointSumTotal: pointSumTotal.value,
|
||||||
date: dateToISO(date.value),
|
pointSum: pointSum.value,
|
||||||
})
|
date: dateToISO(date.value),
|
||||||
.then((res) => {
|
})
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
.then((res) => {
|
||||||
modal.value = false;
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
modal.value = false;
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(async () => {
|
})
|
||||||
await fetchData();
|
.finally(async () => {
|
||||||
});
|
await fetchData();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขประ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
@ -360,29 +362,31 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileHonorId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileHonorId(profileId.value))
|
||||||
let data = res.data.result;
|
.then((res) => {
|
||||||
rows.value = [];
|
let data = res.data.result;
|
||||||
data.map((e: ResponseObject) => {
|
rows.value = [];
|
||||||
rows.value.push({
|
data.map((e: ResponseObject) => {
|
||||||
id: e.id,
|
rows.value.push({
|
||||||
issuer: e.issuer,
|
id: e.id,
|
||||||
detail: e.detail,
|
issuer: e.issuer,
|
||||||
issueDate: new Date(e.issueDate),
|
detail: e.detail,
|
||||||
createdAt: new Date(e.createdAt),
|
issueDate: new Date(e.issueDate),
|
||||||
createdFullName: e.createdFullName,
|
createdAt: new Date(e.createdAt),
|
||||||
|
createdFullName: e.createdFullName,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -467,24 +471,26 @@ const clickSave = async () => {
|
||||||
* บันทึกเพิ่มข้อมูล
|
* บันทึกเพิ่มข้อมูล
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.post(config.API.profileHonorId(profileId.value), {
|
await http
|
||||||
id: id.value,
|
.post(config.API.profileHonorId(profileId.value), {
|
||||||
issuer: issuer.value,
|
id: id.value,
|
||||||
detail: detail.value,
|
issuer: issuer.value,
|
||||||
issueDate: dateToISO(issueDate.value),
|
detail: detail.value,
|
||||||
})
|
issueDate: dateToISO(issueDate.value),
|
||||||
.then((res) => {
|
})
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
.then((res) => {
|
||||||
modal.value = false;
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
modal.value = false;
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(async () => {
|
})
|
||||||
await fetchData();
|
.finally(async () => {
|
||||||
});
|
await fetchData();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -363,7 +363,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขวิน
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
@ -545,31 +547,33 @@ const filterSelector = (val: string, update: Function, refData: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileDisId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileDisId(profileId.value))
|
||||||
let data = res.data.result;
|
.then((res) => {
|
||||||
rows.value = [];
|
let data = res.data.result;
|
||||||
data.map((e: ResponseObject) => {
|
rows.value = [];
|
||||||
rows.value.push({
|
data.map((e: ResponseObject) => {
|
||||||
id: e.id,
|
rows.value.push({
|
||||||
level: e.level,
|
id: e.id,
|
||||||
detail: e.detail,
|
level: e.level,
|
||||||
refCommandNo: e.refCommandNo,
|
detail: e.detail,
|
||||||
refCommandDate: new Date(e.refCommandDate),
|
refCommandNo: e.refCommandNo,
|
||||||
date: new Date(e.date),
|
refCommandDate: new Date(e.refCommandDate),
|
||||||
createdFullName: e.createdFullName,
|
date: new Date(e.date),
|
||||||
createdAt: new Date(e.createdAt),
|
createdFullName: e.createdFullName,
|
||||||
|
createdAt: new Date(e.createdAt),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -656,26 +660,28 @@ const clickSave = async () => {
|
||||||
* บันทึกเพิ่มข้อมูล
|
* บันทึกเพิ่มข้อมูล
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.post(config.API.profileDisId(profileId.value), {
|
await http
|
||||||
id: id.value,
|
.post(config.API.profileDisId(profileId.value), {
|
||||||
level: level.value,
|
id: id.value,
|
||||||
detail: detail.value,
|
level: level.value,
|
||||||
refCommandNo: refCommandNo.value,
|
detail: detail.value,
|
||||||
refCommandDate: dateToISO(refCommandDate.value),
|
refCommandNo: refCommandNo.value,
|
||||||
date: dateToISO(date.value),
|
refCommandDate: dateToISO(refCommandDate.value),
|
||||||
})
|
date: dateToISO(date.value),
|
||||||
.then((res) => {
|
})
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
.then((res) => {
|
||||||
modal.value = false;
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
modal.value = false;
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(async () => {
|
})
|
||||||
await fetchData();
|
.finally(async () => {
|
||||||
});
|
await fetchData();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
:changeBtn="changeBtn"
|
:changeBtn="changeBtn"
|
||||||
:disable="statusEdit"
|
:disable="statusEdit"
|
||||||
:save="uploadData"
|
:save="uploadData"
|
||||||
|
:addEmployee="statusAdd()"
|
||||||
/>
|
/>
|
||||||
<div class="row col-12 q-pt-sm">
|
<div class="row col-12 q-pt-sm">
|
||||||
<q-card bordered flat class="full-width">
|
<q-card bordered flat class="full-width">
|
||||||
|
|
@ -153,6 +154,10 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
},
|
},
|
||||||
|
statusAdd: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const emit = defineEmits(["update:statusEdit"]);
|
const emit = defineEmits(["update:statusEdit"]);
|
||||||
|
|
||||||
|
|
@ -162,7 +167,9 @@ const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { success, messageError } = mixin;
|
const { success, messageError } = mixin;
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
const uploader = ref<any>();
|
const uploader = ref<any>();
|
||||||
const files = ref<any>([]);
|
const files = ref<any>([]);
|
||||||
|
|
@ -171,22 +178,37 @@ const name = ref<string>("");
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getData();
|
await getData();
|
||||||
|
defaultAdd();
|
||||||
});
|
});
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profilePaperId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profilePaperId(profileId.value))
|
||||||
const data = res.data.result;
|
.then((res) => {
|
||||||
files.value = data;
|
const data = res.data.result;
|
||||||
})
|
files.value = data;
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(() => {
|
})
|
||||||
loaderPage(false);
|
.finally(() => {
|
||||||
});
|
loaderPage(false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const statusAdd = () => props.statusAdd;
|
||||||
|
|
||||||
|
const defaultAdd = () => {
|
||||||
|
if (props.statusAdd) {
|
||||||
|
edit.value = props.statusAdd;
|
||||||
|
name.value = "";
|
||||||
|
if (uploader.value) {
|
||||||
|
uploader.value.reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteData = async (id: string) => {
|
const deleteData = async (id: string) => {
|
||||||
|
|
@ -206,31 +228,33 @@ const deleteData = async (id: string) => {
|
||||||
|
|
||||||
const uploadData = async () => {
|
const uploadData = async () => {
|
||||||
if (file.value.length > 0) {
|
if (file.value.length > 0) {
|
||||||
const blob = file.value.slice(0, file.value[0].size);
|
if (profileId.value !== "") {
|
||||||
const newFile = new File(blob, name.value, {
|
const blob = file.value.slice(0, file.value[0].size);
|
||||||
type: file.value[0].type,
|
const newFile = new File(blob, name.value, {
|
||||||
});
|
type: file.value[0].type,
|
||||||
const formData = new FormData();
|
|
||||||
formData.append("avatar", newFile);
|
|
||||||
formData.append("moss", "newFile");
|
|
||||||
console.log(formData);
|
|
||||||
loaderPage(true);
|
|
||||||
await http
|
|
||||||
.post(config.API.profilePaperId(profileId.value), formData)
|
|
||||||
.then((res) => {
|
|
||||||
const data = res.data.result;
|
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(async () => {
|
|
||||||
uploader.value.reset();
|
|
||||||
name.value = "";
|
|
||||||
edit.value = false;
|
|
||||||
emit("update:statusEdit", false);
|
|
||||||
await getData();
|
|
||||||
});
|
});
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append("avatar", newFile);
|
||||||
|
formData.append("moss", "newFile");
|
||||||
|
console.log(formData);
|
||||||
|
loaderPage(true);
|
||||||
|
await http
|
||||||
|
.post(config.API.profilePaperId(profileId.value), formData)
|
||||||
|
.then((res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(async () => {
|
||||||
|
uploader.value.reset();
|
||||||
|
name.value = "";
|
||||||
|
edit.value = false;
|
||||||
|
emit("update:statusEdit", false);
|
||||||
|
await getData();
|
||||||
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// modalError(
|
// modalError(
|
||||||
// $q,
|
// $q,
|
||||||
|
|
|
||||||
|
|
@ -506,7 +506,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขประ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
@ -960,42 +962,44 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileEduId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileEduId(profileId.value))
|
||||||
let data = res.data.result;
|
.then((res) => {
|
||||||
rows.value = [];
|
let data = res.data.result;
|
||||||
data.map((e: ResponseObject) => {
|
rows.value = [];
|
||||||
rows.value.push({
|
data.map((e: ResponseObject) => {
|
||||||
id: e.id,
|
rows.value.push({
|
||||||
level: e.educationLevel,
|
id: e.id,
|
||||||
levelId: e.educationLevelId,
|
level: e.educationLevel,
|
||||||
positionPath: e.positionPath,
|
levelId: e.educationLevelId,
|
||||||
positionPathId: e.positionPathId,
|
positionPath: e.positionPath,
|
||||||
institute: e.institute,
|
positionPathId: e.positionPathId,
|
||||||
degree: e.degree,
|
institute: e.institute,
|
||||||
field: e.field,
|
degree: e.degree,
|
||||||
gpa: e.gpa,
|
field: e.field,
|
||||||
country: e.country,
|
gpa: e.gpa,
|
||||||
duration: e.duration,
|
country: e.country,
|
||||||
durationYear: e.durationYear,
|
duration: e.duration,
|
||||||
other: e.other,
|
durationYear: e.durationYear,
|
||||||
fundName: e.fundName,
|
other: e.other,
|
||||||
finishDate: new Date(e.finishDate),
|
fundName: e.fundName,
|
||||||
startDate: new Date(e.startDate).getFullYear(),
|
finishDate: new Date(e.finishDate),
|
||||||
endDate: new Date(e.endDate).getFullYear(),
|
startDate: new Date(e.startDate).getFullYear(),
|
||||||
createdFullName: e.createdFullName,
|
endDate: new Date(e.endDate).getFullYear(),
|
||||||
createdAt: new Date(e.createdAt),
|
createdFullName: e.createdFullName,
|
||||||
|
createdAt: new Date(e.createdAt),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1090,43 +1094,46 @@ const clickSave = async () => {
|
||||||
/**
|
/**
|
||||||
* บันทึกเพิ่มข้อมูล
|
* บันทึกเพิ่มข้อมูล
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
// const filter = OpsFilter.value.levelOptions.filter(
|
if (profileId.value !== "") {
|
||||||
// (r: any) => r.id == levelId.value
|
// const filter = OpsFilter.value.levelOptions.filter(
|
||||||
// );
|
// (r: any) => r.id == levelId.value
|
||||||
// const filterPositionPath = OpsFilter.value.positionPathOptions.filter(
|
// );
|
||||||
// (r: any) => r.id == positionPathId.value
|
// const filterPositionPath = OpsFilter.value.positionPathOptions.filter(
|
||||||
// );
|
// (r: any) => r.id == positionPathId.value
|
||||||
loaderPage(true);
|
// );
|
||||||
await http
|
loaderPage(true);
|
||||||
.post(config.API.profileEduId(profileId.value), {
|
await http
|
||||||
id: id.value,
|
.post(config.API.profileEduId(profileId.value), {
|
||||||
// educationLevel: filter[0].name,
|
id: id.value,
|
||||||
educationLevelId: levelId.value,
|
// educationLevel: filter[0].name,
|
||||||
positionPathId: positionPathId.value,
|
educationLevelId: levelId.value,
|
||||||
institute: institute.value,
|
positionPathId: positionPathId.value,
|
||||||
degree: degree.value,
|
institute: institute.value,
|
||||||
field: field.value,
|
degree: degree.value,
|
||||||
gpa: gpa.value,
|
field: field.value,
|
||||||
country: country.value,
|
gpa: gpa.value,
|
||||||
duration: duration.value,
|
country: country.value,
|
||||||
durationYear: durationYear.value,
|
duration: duration.value,
|
||||||
other: other.value,
|
durationYear: durationYear.value,
|
||||||
fundName: fundName.value,
|
other: other.value,
|
||||||
finishDate: dateToISO(finishDate.value),
|
fundName: fundName.value,
|
||||||
startDate: new Date(`${startDate.value}-01-01`),
|
finishDate: dateToISO(finishDate.value),
|
||||||
endDate: new Date(`${endDate.value}-01-01`),
|
startDate: new Date(`${startDate.value}-01-01`),
|
||||||
})
|
endDate: new Date(`${endDate.value}-01-01`),
|
||||||
.then((res) => {
|
})
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
.then((res) => {
|
||||||
modal.value = false;
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
modal.value = false;
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(async () => {
|
})
|
||||||
await fetchData();
|
.finally(async () => {
|
||||||
});
|
await fetchData();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,12 @@
|
||||||
header="ข้อมูลที่อยู่"
|
header="ข้อมูลที่อยู่"
|
||||||
icon="mdi-map-marker"
|
icon="mdi-map-marker"
|
||||||
:save="saveData"
|
:save="saveData"
|
||||||
:history="true"
|
:history="!statusAdd()"
|
||||||
:changeBtn="changeBtn"
|
:changeBtn="changeBtn"
|
||||||
:disable="statusEdit"
|
:disable="statusEdit"
|
||||||
:cancel="refreshData"
|
:cancel="refreshData"
|
||||||
:historyClick="clickHistory"
|
:historyClick="clickHistory"
|
||||||
|
:addEmployee="statusAdd()"
|
||||||
/>
|
/>
|
||||||
<q-form ref="myform">
|
<q-form ref="myform">
|
||||||
<div class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs">
|
<div class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs">
|
||||||
|
|
@ -311,6 +312,10 @@ const props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
statusAdd: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const emit = defineEmits(["update:statusEdit"]);
|
const emit = defineEmits(["update:statusEdit"]);
|
||||||
|
|
||||||
|
|
@ -507,8 +512,28 @@ const visibleColumnsHistory = ref<String[]>([
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getNewData();
|
await getNewData();
|
||||||
emit("update:statusEdit", false);
|
emit("update:statusEdit", false);
|
||||||
|
defaultAdd();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const statusAdd = () => props.statusAdd;
|
||||||
|
|
||||||
|
const defaultAdd = () => {
|
||||||
|
if (props.statusAdd) {
|
||||||
|
edit.value = props.statusAdd;
|
||||||
|
addressData.value = {
|
||||||
|
address: null,
|
||||||
|
provinceId: null,
|
||||||
|
districtId: null,
|
||||||
|
subdistrictId: null,
|
||||||
|
addressC: null,
|
||||||
|
provinceIdC: null,
|
||||||
|
districtIdC: null,
|
||||||
|
subdistrictIdC: null,
|
||||||
|
same: "0",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const filterSelector = (val: any, update: Function, refData: string) => {
|
const filterSelector = (val: any, update: Function, refData: string) => {
|
||||||
switch (refData) {
|
switch (refData) {
|
||||||
case "provinceOps":
|
case "provinceOps":
|
||||||
|
|
@ -556,37 +581,39 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
||||||
* ฟังชั้นดูข้อมูลประวัติแก้ไขข้อมูลที่เลือก
|
* ฟังชั้นดูข้อมูลประวัติแก้ไขข้อมูลที่เลือก
|
||||||
*/
|
*/
|
||||||
const clickHistory = async () => {
|
const clickHistory = async () => {
|
||||||
modalHistory.value = true;
|
if (route.params.id) {
|
||||||
loaderPage(true);
|
modalHistory.value = true;
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileAdrsHisId(route.params.id.toString()))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileAdrsHisId(route.params.id.toString()))
|
||||||
let data = res.data.result;
|
.then((res) => {
|
||||||
rowsHistory.value = [];
|
let data = res.data.result;
|
||||||
data.map((e: RequestItemsHistoryObject) => {
|
rowsHistory.value = [];
|
||||||
rowsHistory.value.push({
|
data.map((e: RequestItemsHistoryObject) => {
|
||||||
currentAddress: e.currentAddress,
|
rowsHistory.value.push({
|
||||||
currentDistrict: e.currentDistrict,
|
currentAddress: e.currentAddress,
|
||||||
currentProvince: e.currentProvince,
|
currentDistrict: e.currentDistrict,
|
||||||
currentSubDistrict: e.currentSubDistrict,
|
currentProvince: e.currentProvince,
|
||||||
currentZipCode: e.currentZipCode,
|
currentSubDistrict: e.currentSubDistrict,
|
||||||
registrationSame: e.registrationSame,
|
currentZipCode: e.currentZipCode,
|
||||||
registrationAddress: e.registrationAddress,
|
registrationSame: e.registrationSame,
|
||||||
registrationDistrict: e.registrationDistrict,
|
registrationAddress: e.registrationAddress,
|
||||||
registrationProvince: e.registrationProvince,
|
registrationDistrict: e.registrationDistrict,
|
||||||
registrationSubDistrict: e.registrationSubDistrict,
|
registrationProvince: e.registrationProvince,
|
||||||
registrationZipCode: e.registrationZipCode,
|
registrationSubDistrict: e.registrationSubDistrict,
|
||||||
createdFullName: e.createdFullName,
|
registrationZipCode: e.registrationZipCode,
|
||||||
createdAt: new Date(e.createdAt),
|
createdFullName: e.createdFullName,
|
||||||
|
createdAt: new Date(e.createdAt),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const refreshData = async () => {
|
const refreshData = async () => {
|
||||||
|
|
@ -606,27 +633,29 @@ const getNewData = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
if (route.params.id) {
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileAdrsId(route.params.id.toString()))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileAdrsId(route.params.id.toString()))
|
||||||
const data: ResponseObject = res.data.result;
|
.then((res) => {
|
||||||
addressData.value.address = data.registrationAddress;
|
const data: ResponseObject = res.data.result;
|
||||||
addressData.value.addressC = data.currentAddress;
|
addressData.value.address = data.registrationAddress;
|
||||||
addressData.value.districtId = data.registrationDistrictId;
|
addressData.value.addressC = data.currentAddress;
|
||||||
addressData.value.districtIdC = data.currentDistrictId;
|
addressData.value.districtId = data.registrationDistrictId;
|
||||||
addressData.value.provinceId = data.registrationProvinceId;
|
addressData.value.districtIdC = data.currentDistrictId;
|
||||||
addressData.value.provinceIdC = data.currentProvinceId;
|
addressData.value.provinceId = data.registrationProvinceId;
|
||||||
addressData.value.subdistrictId = data.registrationSubDistrictId;
|
addressData.value.provinceIdC = data.currentProvinceId;
|
||||||
addressData.value.subdistrictIdC = data.currentSubDistrictId;
|
addressData.value.subdistrictId = data.registrationSubDistrictId;
|
||||||
addressData.value.same = data.registrationSame ? "1" : "0";
|
addressData.value.subdistrictIdC = data.currentSubDistrictId;
|
||||||
})
|
addressData.value.same = data.registrationSame ? "1" : "0";
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(() => {
|
})
|
||||||
loaderPage(false);
|
.finally(() => {
|
||||||
});
|
loaderPage(false);
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
|
|
@ -676,12 +705,34 @@ const editData = async () => {
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
await myform.value.validate().then(async (success: boolean) => {
|
await myform.value.validate().then(async (success: boolean) => {
|
||||||
if (success) {
|
if (success) {
|
||||||
await editData();
|
if (props.statusAdd) {
|
||||||
|
await addData();
|
||||||
|
} else {
|
||||||
|
await editData();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const addData = async () => {
|
||||||
|
// loaderPage(true);
|
||||||
|
// await http
|
||||||
|
// .put(config.API.profileInforId(route.params.id.toString()), body)
|
||||||
|
// .then((res) => {
|
||||||
|
// success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
// })
|
||||||
|
// .catch((e) => {
|
||||||
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(async () => {
|
||||||
|
// edit.value = false;
|
||||||
|
// emit("update:statusEdit", false);
|
||||||
|
// await fetchData();
|
||||||
|
// await changeBirth(informaData.value.birthDate ?? new Date());
|
||||||
|
// });
|
||||||
|
};
|
||||||
|
|
||||||
const selectProvince = async (e: string | null, name: string) => {
|
const selectProvince = async (e: string | null, name: string) => {
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
if (name == "1") {
|
if (name == "1") {
|
||||||
|
|
|
||||||
|
|
@ -285,6 +285,10 @@ const props = defineProps({
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
statusAdd: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -316,7 +320,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขใบอ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
@ -484,31 +490,33 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileCertId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileCertId(profileId.value))
|
||||||
let data = res.data.result;
|
.then((res) => {
|
||||||
rows.value = [];
|
let data = res.data.result;
|
||||||
data.map((e: ResponseObject) => {
|
rows.value = [];
|
||||||
rows.value.push({
|
data.map((e: ResponseObject) => {
|
||||||
id: e.id,
|
rows.value.push({
|
||||||
certificateNo: e.certificateNo,
|
id: e.id,
|
||||||
issuer: e.issuer,
|
certificateNo: e.certificateNo,
|
||||||
issueDate: new Date(e.issueDate),
|
issuer: e.issuer,
|
||||||
expireDate: new Date(e.expireDate),
|
issueDate: new Date(e.issueDate),
|
||||||
certificateType: e.certificateType,
|
expireDate: new Date(e.expireDate),
|
||||||
createdFullName: e.createdFullName,
|
certificateType: e.certificateType,
|
||||||
createdAt: new Date(e.createdAt),
|
createdFullName: e.createdFullName,
|
||||||
|
createdAt: new Date(e.createdAt),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -595,26 +603,28 @@ const clickSave = async () => {
|
||||||
* บันทึกเพิ่มข้อมูล
|
* บันทึกเพิ่มข้อมูล
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.post(config.API.profileCertId(profileId.value), {
|
await http
|
||||||
id: id.value,
|
.post(config.API.profileCertId(profileId.value), {
|
||||||
certificateNo: certificateNo.value,
|
id: id.value,
|
||||||
issuer: issuer.value,
|
certificateNo: certificateNo.value,
|
||||||
issueDate: dateToISO(issueDate.value),
|
issuer: issuer.value,
|
||||||
expireDate: dateToISO(expireDate.value),
|
issueDate: dateToISO(issueDate.value),
|
||||||
certificateType: certificateType.value,
|
expireDate: dateToISO(expireDate.value),
|
||||||
})
|
certificateType: certificateType.value,
|
||||||
.then((res) => {
|
})
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
.then((res) => {
|
||||||
modal.value = false;
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
modal.value = false;
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(async () => {
|
})
|
||||||
await fetchData();
|
.finally(async () => {
|
||||||
});
|
await fetchData();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,12 @@
|
||||||
header="ข้อมูลครอบครัว"
|
header="ข้อมูลครอบครัว"
|
||||||
icon="mdi-account-group"
|
icon="mdi-account-group"
|
||||||
:save="saveData"
|
:save="saveData"
|
||||||
:history="true"
|
:history="!statusAdd()"
|
||||||
:changeBtn="changeBtn"
|
:changeBtn="changeBtn"
|
||||||
:disable="statusEdit"
|
:disable="statusEdit"
|
||||||
:cancel="refreshData"
|
:cancel="refreshData"
|
||||||
:historyClick="historyData"
|
:historyClick="historyData"
|
||||||
|
:addEmployee="statusAdd()"
|
||||||
/>
|
/>
|
||||||
<q-form ref="myform" class="col-12">
|
<q-form ref="myform" class="col-12">
|
||||||
<div class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs">
|
<div class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs">
|
||||||
|
|
@ -784,6 +785,10 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
},
|
},
|
||||||
|
statusAdd: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const emit = defineEmits(["update:statusEdit"]);
|
const emit = defineEmits(["update:statusEdit"]);
|
||||||
|
|
||||||
|
|
@ -835,8 +840,37 @@ onMounted(async () => {
|
||||||
await fetchPrefix();
|
await fetchPrefix();
|
||||||
await fetchData();
|
await fetchData();
|
||||||
emit("update:statusEdit", false);
|
emit("update:statusEdit", false);
|
||||||
|
defaultAdd();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const statusAdd = () => props.statusAdd;
|
||||||
|
|
||||||
|
const defaultAdd = () => {
|
||||||
|
if (props.statusAdd) {
|
||||||
|
edit.value = props.statusAdd;
|
||||||
|
familyData.value = {
|
||||||
|
prefixC: null,
|
||||||
|
prefixIdC: null,
|
||||||
|
firstnameC: null,
|
||||||
|
lastnameC: null,
|
||||||
|
lastnameCOld: null,
|
||||||
|
occupationC: null,
|
||||||
|
prefixM: null,
|
||||||
|
prefixIdM: null,
|
||||||
|
firstnameM: null,
|
||||||
|
lastnameM: null,
|
||||||
|
occupationM: null,
|
||||||
|
prefixF: null,
|
||||||
|
prefixIdF: null,
|
||||||
|
firstnameF: null,
|
||||||
|
lastnameF: null,
|
||||||
|
occupationF: null,
|
||||||
|
same: "0",
|
||||||
|
childrens: [],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const historyData = async () => {
|
const historyData = async () => {
|
||||||
await fetchHistory();
|
await fetchHistory();
|
||||||
};
|
};
|
||||||
|
|
@ -955,53 +989,55 @@ const fetchHistory = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
if (route.params.id) {
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileFamiId(route.params.id.toString()))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileFamiId(route.params.id.toString()))
|
||||||
const data: ResponseObject = res.data.result;
|
.then((res) => {
|
||||||
familyData.value.prefixC = "";
|
const data: ResponseObject = res.data.result;
|
||||||
familyData.value.prefixIdC = data.couplePrefixId;
|
familyData.value.prefixC = "";
|
||||||
familyData.value.firstnameC = data.coupleFirstName;
|
familyData.value.prefixIdC = data.couplePrefixId;
|
||||||
familyData.value.lastnameC = data.coupleLastName;
|
familyData.value.firstnameC = data.coupleFirstName;
|
||||||
familyData.value.lastnameCOld = data.coupleLastNameOld;
|
familyData.value.lastnameC = data.coupleLastName;
|
||||||
familyData.value.occupationC = data.coupleCareer;
|
familyData.value.lastnameCOld = data.coupleLastNameOld;
|
||||||
familyData.value.prefixM = "";
|
familyData.value.occupationC = data.coupleCareer;
|
||||||
familyData.value.prefixIdM = data.fatherPrefixId;
|
familyData.value.prefixM = "";
|
||||||
|
familyData.value.prefixIdM = data.fatherPrefixId;
|
||||||
|
|
||||||
familyData.value.firstnameM = data.fatherFirstName;
|
familyData.value.firstnameM = data.fatherFirstName;
|
||||||
familyData.value.lastnameM = data.fatherLastName;
|
familyData.value.lastnameM = data.fatherLastName;
|
||||||
familyData.value.occupationM = data.fatherCareer;
|
familyData.value.occupationM = data.fatherCareer;
|
||||||
familyData.value.prefixF = "";
|
familyData.value.prefixF = "";
|
||||||
familyData.value.prefixIdF = data.motherPrefixId;
|
familyData.value.prefixIdF = data.motherPrefixId;
|
||||||
|
|
||||||
familyData.value.firstnameF = data.motherFirstName;
|
familyData.value.firstnameF = data.motherFirstName;
|
||||||
familyData.value.lastnameF = data.motherLastName;
|
familyData.value.lastnameF = data.motherLastName;
|
||||||
familyData.value.occupationF = data.motherCareer;
|
familyData.value.occupationF = data.motherCareer;
|
||||||
familyData.value.same = data.couple ? "1" : "0";
|
familyData.value.same = data.couple ? "1" : "0";
|
||||||
|
|
||||||
if (data.childrens.length > 0) {
|
if (data.childrens.length > 0) {
|
||||||
let dataChild: childrenFamily[] = [];
|
let dataChild: childrenFamily[] = [];
|
||||||
data.childrens.map((row: childrenFamily, index: number) => {
|
data.childrens.map((row: childrenFamily, index: number) => {
|
||||||
dataChild.push({
|
dataChild.push({
|
||||||
id: `${index + 1}`,
|
id: `${index + 1}`,
|
||||||
childrenPrefixId: row.childrenPrefixId,
|
childrenPrefixId: row.childrenPrefixId,
|
||||||
childrenFirstName: row.childrenFirstName,
|
childrenFirstName: row.childrenFirstName,
|
||||||
childrenLastName: row.childrenLastName,
|
childrenLastName: row.childrenLastName,
|
||||||
childrenCareer: row.childrenCareer,
|
childrenCareer: row.childrenCareer,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
familyData.value.childrens = dataChild;
|
||||||
familyData.value.childrens = dataChild;
|
} else {
|
||||||
} else {
|
familyData.value.childrens = [];
|
||||||
familyData.value.childrens = [];
|
}
|
||||||
}
|
})
|
||||||
})
|
.catch((e) => {
|
||||||
.catch((e) => {
|
messageError($q, e);
|
||||||
messageError($q, e);
|
})
|
||||||
})
|
.finally(async () => {
|
||||||
.finally(async () => {
|
loaderPage(false);
|
||||||
loaderPage(false);
|
});
|
||||||
});
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
|
|
@ -1040,10 +1076,32 @@ const editData = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const addData = async () => {
|
||||||
|
// loaderPage(true);
|
||||||
|
// await http
|
||||||
|
// .put(config.API.profileInforId(route.params.id.toString()), body)
|
||||||
|
// .then((res) => {
|
||||||
|
// success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
// })
|
||||||
|
// .catch((e) => {
|
||||||
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(async () => {
|
||||||
|
// edit.value = false;
|
||||||
|
// emit("update:statusEdit", false);
|
||||||
|
// await fetchData();
|
||||||
|
// await changeBirth(informaData.value.birthDate ?? new Date());
|
||||||
|
// });
|
||||||
|
};
|
||||||
|
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
await myform.value?.validate().then(async (success: boolean) => {
|
await myform.value?.validate().then(async (success: boolean) => {
|
||||||
if (success) {
|
if (success) {
|
||||||
await editData();
|
if (props.statusAdd) {
|
||||||
|
await addData();
|
||||||
|
} else {
|
||||||
|
await editData();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,12 @@
|
||||||
header="ข้อมูลส่วนตัว"
|
header="ข้อมูลส่วนตัว"
|
||||||
icon="mdi-account"
|
icon="mdi-account"
|
||||||
:save="saveData"
|
:save="saveData"
|
||||||
:history="true"
|
:history="!statusAdd()"
|
||||||
:changeBtn="changeBtn"
|
:changeBtn="changeBtn"
|
||||||
:disable="statusEdit"
|
:disable="statusEdit"
|
||||||
:cancel="onCancel"
|
:cancel="onCancel"
|
||||||
:historyClick="clickHistory"
|
:historyClick="clickHistory"
|
||||||
|
:addEmployee="statusAdd()"
|
||||||
/>
|
/>
|
||||||
<q-form ref="myform" class="col-12">
|
<q-form ref="myform" class="col-12">
|
||||||
<div class="row col-12 items-center q-col-gutter-x-sm q-col-gutter-y-sm">
|
<div class="row col-12 items-center q-col-gutter-x-sm q-col-gutter-y-sm">
|
||||||
|
|
@ -115,7 +116,11 @@
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
:model-value="date2Thai(informaData.birthDate)"
|
:model-value="
|
||||||
|
informaData.birthDate == null
|
||||||
|
? ''
|
||||||
|
: date2Thai(informaData.birthDate)
|
||||||
|
"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี เกิด'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี เกิด'}`]"
|
||||||
:label="`${'วัน/เดือน/ปี เกิด'}`"
|
:label="`${'วัน/เดือน/ปี เกิด'}`"
|
||||||
>
|
>
|
||||||
|
|
@ -438,6 +443,10 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
},
|
},
|
||||||
|
statusAdd: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const emit = defineEmits(["update:statusEdit"]);
|
const emit = defineEmits(["update:statusEdit"]);
|
||||||
|
|
||||||
|
|
@ -692,8 +701,36 @@ onMounted(async () => {
|
||||||
await fetchPerson();
|
await fetchPerson();
|
||||||
await fetchData();
|
await fetchData();
|
||||||
emit("update:statusEdit", false);
|
emit("update:statusEdit", false);
|
||||||
|
defaultAdd();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const statusAdd = () => props.statusAdd;
|
||||||
|
|
||||||
|
const defaultAdd = () => {
|
||||||
|
if (props.statusAdd) {
|
||||||
|
edit.value = props.statusAdd;
|
||||||
|
informaData.value = {
|
||||||
|
cardid: null,
|
||||||
|
age: null,
|
||||||
|
prefix: null,
|
||||||
|
prefixId: null,
|
||||||
|
firstname: null,
|
||||||
|
lastname: null,
|
||||||
|
birthDate: null,
|
||||||
|
genderId: null,
|
||||||
|
bloodId: null,
|
||||||
|
nationality: null,
|
||||||
|
ethnicity: null,
|
||||||
|
statusId: null,
|
||||||
|
religionId: null,
|
||||||
|
tel: null,
|
||||||
|
employeeType: null,
|
||||||
|
employeeClass: null,
|
||||||
|
profileType: null,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const onCancel = async () => {
|
const onCancel = async () => {
|
||||||
if (myform.value != null) {
|
if (myform.value != null) {
|
||||||
myform.value.reset();
|
myform.value.reset();
|
||||||
|
|
@ -821,50 +858,52 @@ const checkCitizen = async (id: string) => {
|
||||||
* ฟังชั้นดูข้อมูลประวัติแก้ไขข้อมูลที่เลือก
|
* ฟังชั้นดูข้อมูลประวัติแก้ไขข้อมูลที่เลือก
|
||||||
*/
|
*/
|
||||||
const clickHistory = async () => {
|
const clickHistory = async () => {
|
||||||
modalHistory.value = true;
|
if (route.params.id) {
|
||||||
loaderPage(true);
|
modalHistory.value = true;
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileInforHisId(route.params.id.toString()))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileInforHisId(route.params.id.toString()))
|
||||||
let data = res.data.result;
|
.then((res) => {
|
||||||
rowsHistory.value = [];
|
let data = res.data.result;
|
||||||
data.map((e: RequestItemsHistoryObject) => {
|
rowsHistory.value = [];
|
||||||
rowsHistory.value.push({
|
data.map((e: RequestItemsHistoryObject) => {
|
||||||
citizenId: e.citizenId,
|
rowsHistory.value.push({
|
||||||
prefix: e.prefix,
|
citizenId: e.citizenId,
|
||||||
firstName: e.firstName,
|
prefix: e.prefix,
|
||||||
lastName: e.lastName,
|
firstName: e.firstName,
|
||||||
birthDate: new Date(e.birthDate),
|
lastName: e.lastName,
|
||||||
gender: e.gender,
|
birthDate: new Date(e.birthDate),
|
||||||
relationship: e.relationship,
|
gender: e.gender,
|
||||||
bloodGroup: e.bloodGroup,
|
relationship: e.relationship,
|
||||||
nationality: e.nationality,
|
bloodGroup: e.bloodGroup,
|
||||||
race: e.race,
|
nationality: e.nationality,
|
||||||
religion: e.religion,
|
race: e.race,
|
||||||
telephoneNumber: e.telephoneNumber,
|
religion: e.religion,
|
||||||
employeeType:
|
telephoneNumber: e.telephoneNumber,
|
||||||
e.employeeType == "gov"
|
employeeType:
|
||||||
? "งบประมาณเงินอุดหนุนรัฐบาล"
|
e.employeeType == "gov"
|
||||||
: e.employeeType == "bkk"
|
? "งบประมาณเงินอุดหนุนรัฐบาล"
|
||||||
? "งบประมาณกรุงเทพมหานคร"
|
: e.employeeType == "bkk"
|
||||||
: "-",
|
? "งบประมาณกรุงเทพมหานคร"
|
||||||
employeeClass:
|
: "-",
|
||||||
e.employeeClass == "perm"
|
employeeClass:
|
||||||
? "ลูกจ้างประจำ"
|
e.employeeClass == "perm"
|
||||||
: e.employeeClass == "temp"
|
? "ลูกจ้างประจำ"
|
||||||
? "ลูกจ้างชั่วคราว"
|
: e.employeeClass == "temp"
|
||||||
: "-",
|
? "ลูกจ้างชั่วคราว"
|
||||||
createdFullName: e.createdFullName,
|
: "-",
|
||||||
createdAt: new Date(e.createdAt),
|
createdFullName: e.createdFullName,
|
||||||
|
createdAt: new Date(e.createdAt),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const filterSelector = (val: any, update: Function, refData: string) => {
|
const filterSelector = (val: any, update: Function, refData: string) => {
|
||||||
|
|
@ -961,44 +1000,49 @@ const calRetire = async (birth: Date) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
if (route.params.id) {
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileInforId(route.params.id.toString()))
|
await http
|
||||||
.then(async (res: any) => {
|
.get(config.API.profileInforId(route.params.id.toString()))
|
||||||
const data: ResponseObject = res.data.result;
|
.then(async (res: any) => {
|
||||||
defaultCitizenData.value = data.citizenId;
|
const data: ResponseObject = res.data.result;
|
||||||
informaData.value.cardid = data.citizenId;
|
defaultCitizenData.value = data.citizenId;
|
||||||
informaData.value.prefix = "";
|
informaData.value.cardid = data.citizenId;
|
||||||
informaData.value.prefixId = data.prefixId;
|
informaData.value.prefix = "";
|
||||||
informaData.value.firstname = data.firstName;
|
informaData.value.prefixId = data.prefixId;
|
||||||
informaData.value.lastname = data.lastName;
|
informaData.value.firstname = data.firstName;
|
||||||
informaData.value.birthDate = new Date(data.birthDate);
|
informaData.value.lastname = data.lastName;
|
||||||
informaData.value.genderId = data.genderId;
|
informaData.value.birthDate = new Date(data.birthDate);
|
||||||
informaData.value.bloodId = data.bloodGroupId;
|
informaData.value.genderId = data.genderId;
|
||||||
informaData.value.nationality = data.nationality;
|
informaData.value.bloodId = data.bloodGroupId;
|
||||||
informaData.value.ethnicity = data.race;
|
informaData.value.nationality = data.nationality;
|
||||||
informaData.value.statusId = data.relationshipId;
|
informaData.value.ethnicity = data.race;
|
||||||
informaData.value.religionId = data.religionId;
|
informaData.value.statusId = data.relationshipId;
|
||||||
informaData.value.tel = data.telephoneNumber;
|
informaData.value.religionId = data.religionId;
|
||||||
informaData.value.age = data.age;
|
informaData.value.tel = data.telephoneNumber;
|
||||||
informaData.value.employeeType = data.employeeType;
|
informaData.value.age = data.age;
|
||||||
informaData.value.employeeClass = data.employeeClass;
|
informaData.value.employeeType = data.employeeType;
|
||||||
informaData.value.profileType = data.profileType;
|
informaData.value.employeeClass = data.employeeClass;
|
||||||
dateBefore.value = new Date(data.birthDate);
|
informaData.value.profileType = data.profileType;
|
||||||
same.value = data.changeName == true ? "1" : "0";
|
dateBefore.value = new Date(data.birthDate);
|
||||||
await calRetire(new Date(dateToISO(new Date(data.birthDate))));
|
same.value = data.changeName == true ? "1" : "0";
|
||||||
if (data.profileType == "officer" && columnsHistory.value.length >= 15) {
|
await calRetire(new Date(dateToISO(new Date(data.birthDate))));
|
||||||
columnsHistory.value.splice(13, 1);
|
if (
|
||||||
columnsHistory.value.splice(12, 1);
|
data.profileType == "officer" &&
|
||||||
}
|
columnsHistory.value.length >= 15
|
||||||
})
|
) {
|
||||||
.catch((e) => {
|
columnsHistory.value.splice(13, 1);
|
||||||
messageError($q, e);
|
columnsHistory.value.splice(12, 1);
|
||||||
})
|
}
|
||||||
.finally(async () => {
|
})
|
||||||
// loaderPage(false);
|
.catch((e) => {
|
||||||
await props.fetchDataProfile();
|
messageError($q, e);
|
||||||
});
|
})
|
||||||
|
.finally(async () => {
|
||||||
|
// loaderPage(false);
|
||||||
|
await props.fetchDataProfile();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
|
|
@ -1011,7 +1055,10 @@ const editData = async () => {
|
||||||
nationality: informaData.value.nationality,
|
nationality: informaData.value.nationality,
|
||||||
race: informaData.value.ethnicity,
|
race: informaData.value.ethnicity,
|
||||||
religionId: informaData.value.religionId,
|
religionId: informaData.value.religionId,
|
||||||
birthDate: dateToISO(informaData.value.birthDate) ?? dateToISO(new Date()),
|
birthDate:
|
||||||
|
informaData.value.birthDate == null
|
||||||
|
? dateToISO(new Date())
|
||||||
|
: dateToISO(informaData.value.birthDate),
|
||||||
bloodGroupId: informaData.value.bloodId,
|
bloodGroupId: informaData.value.bloodId,
|
||||||
relationshipId: informaData.value.statusId,
|
relationshipId: informaData.value.statusId,
|
||||||
telephoneNumber: informaData.value.tel,
|
telephoneNumber: informaData.value.tel,
|
||||||
|
|
@ -1039,11 +1086,33 @@ const editData = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const addData = async () => {
|
||||||
|
// loaderPage(true);
|
||||||
|
// await http
|
||||||
|
// .put(config.API.profileInforId(route.params.id.toString()), body)
|
||||||
|
// .then((res) => {
|
||||||
|
// success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
// })
|
||||||
|
// .catch((e) => {
|
||||||
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(async () => {
|
||||||
|
// edit.value = false;
|
||||||
|
// emit("update:statusEdit", false);
|
||||||
|
// await fetchData();
|
||||||
|
// await changeBirth(informaData.value.birthDate ?? new Date());
|
||||||
|
// });
|
||||||
|
};
|
||||||
|
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (myform.value != null) {
|
if (myform.value != null) {
|
||||||
await myform.value.validate().then(async (success: boolean) => {
|
await myform.value.validate().then(async (success: boolean) => {
|
||||||
if (success) {
|
if (success) {
|
||||||
await editData();
|
if (props.statusAdd) {
|
||||||
|
await addData();
|
||||||
|
} else {
|
||||||
|
await editData();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -362,7 +362,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขประ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const file = ref<string | null>(null);
|
const file = ref<string | null>(null);
|
||||||
const fileUpload = ref<any>([]);
|
const fileUpload = ref<any>([]);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
|
|
@ -538,32 +540,34 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileChangeNameId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileChangeNameId(profileId.value))
|
||||||
let data = res.data.result;
|
.then((res) => {
|
||||||
rows.value = [];
|
let data = res.data.result;
|
||||||
data.map((e: ResponseObject) => {
|
rows.value = [];
|
||||||
rows.value.push({
|
data.map((e: ResponseObject) => {
|
||||||
id: e.id,
|
rows.value.push({
|
||||||
prefix: e.prefix,
|
id: e.id,
|
||||||
prefixId: e.prefixId,
|
prefix: e.prefix,
|
||||||
firstName: e.firstName,
|
prefixId: e.prefixId,
|
||||||
lastName: e.lastName,
|
firstName: e.firstName,
|
||||||
status: e.status,
|
lastName: e.lastName,
|
||||||
file: e.file,
|
status: e.status,
|
||||||
createdFullName: e.createdFullName,
|
file: e.file,
|
||||||
createdAt: new Date(e.createdAt),
|
createdFullName: e.createdFullName,
|
||||||
|
createdAt: new Date(e.createdAt),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -665,44 +669,19 @@ const clickSave = async () => {
|
||||||
if (modalEdit.value) {
|
if (modalEdit.value) {
|
||||||
await editData();
|
await editData();
|
||||||
} else {
|
} else {
|
||||||
await saveData();
|
await checkSave();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
const checkSave = async () => {
|
||||||
* บันทึกเพิ่มข้อมูล
|
|
||||||
*/
|
|
||||||
const saveData = async () => {
|
|
||||||
if (fileUpload.value.length > 0) {
|
if (fileUpload.value.length > 0) {
|
||||||
const blob = fileUpload.value.slice(0, fileUpload.value[0].size);
|
if (profileId.value !== "") {
|
||||||
const newFile = new File(blob, nameFile.value, {
|
await saveData();
|
||||||
type: fileUpload.value[0].type,
|
} else {
|
||||||
});
|
await saveDataEmployee();
|
||||||
const formData = new FormData();
|
}
|
||||||
formData.append("", newFile);
|
|
||||||
if (prefixId.value != undefined)
|
|
||||||
formData.append("prefixId", prefixId.value);
|
|
||||||
if (firstName.value != undefined)
|
|
||||||
formData.append("firstName", firstName.value);
|
|
||||||
if (lastName.value != undefined)
|
|
||||||
formData.append("lastName", lastName.value);
|
|
||||||
if (status.value != undefined) formData.append("status", status.value);
|
|
||||||
loaderPage(true);
|
|
||||||
await http
|
|
||||||
.post(config.API.profileChangeNameId(profileId.value), formData)
|
|
||||||
.then((res) => {
|
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
|
||||||
modal.value = false;
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(async () => {
|
|
||||||
await fetchData();
|
|
||||||
await props.fetchDataInformation();
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
dialogMessage(
|
dialogMessage(
|
||||||
$q,
|
$q,
|
||||||
|
|
@ -718,6 +697,41 @@ const saveData = async () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* บันทึกเพิ่มข้อมูล
|
||||||
|
*/
|
||||||
|
const saveData = async () => {
|
||||||
|
const blob = fileUpload.value.slice(0, fileUpload.value[0].size);
|
||||||
|
const newFile = new File(blob, nameFile.value, {
|
||||||
|
type: fileUpload.value[0].type,
|
||||||
|
});
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append("", newFile);
|
||||||
|
if (prefixId.value != undefined) formData.append("prefixId", prefixId.value);
|
||||||
|
if (firstName.value != undefined)
|
||||||
|
formData.append("firstName", firstName.value);
|
||||||
|
if (lastName.value != undefined) formData.append("lastName", lastName.value);
|
||||||
|
if (status.value != undefined) formData.append("status", status.value);
|
||||||
|
loaderPage(true);
|
||||||
|
await http
|
||||||
|
.post(config.API.profileChangeNameId(profileId.value), formData)
|
||||||
|
.then((res) => {
|
||||||
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
modal.value = false;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(async () => {
|
||||||
|
await fetchData();
|
||||||
|
await props.fetchDataInformation();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const saveDataEmployee = async () => {
|
||||||
|
console.log("saveDataEmployee");
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
size="12px"
|
size="12px"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
v-if="edit"
|
v-if="edit && !addEmployee"
|
||||||
:color="!edit ? 'grey-7' : 'red'"
|
:color="!edit ? 'grey-7' : 'red'"
|
||||||
@click="ClickCancel"
|
@click="ClickCancel"
|
||||||
icon="mdi-undo"
|
icon="mdi-undo"
|
||||||
|
|
@ -125,6 +125,7 @@ const props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
defualt: false,
|
defualt: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
disable: {
|
disable: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
defualt: false,
|
defualt: false,
|
||||||
|
|
@ -157,6 +158,10 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
},
|
},
|
||||||
|
addEmployee: {
|
||||||
|
type: Boolean,
|
||||||
|
defualt: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(["update:edit"]);
|
const emit = defineEmits(["update:edit"]);
|
||||||
|
|
|
||||||
|
|
@ -454,7 +454,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขเคร
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
@ -816,38 +818,40 @@ const fetchInsignia = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileInsignId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileInsignId(profileId.value))
|
||||||
let data = res.data.result;
|
.then((res) => {
|
||||||
rows.value = [];
|
let data = res.data.result;
|
||||||
data.map((e: ResponseObject) => {
|
rows.value = [];
|
||||||
rows.value.push({
|
data.map((e: ResponseObject) => {
|
||||||
id: e.id,
|
rows.value.push({
|
||||||
insignia: e.insignia,
|
id: e.id,
|
||||||
insigniaId: e.insigniaId,
|
insignia: e.insignia,
|
||||||
insigniaType: e.insigniaType,
|
insigniaId: e.insigniaId,
|
||||||
year: e.year,
|
insigniaType: e.insigniaType,
|
||||||
no: e.no,
|
year: e.year,
|
||||||
issue: e.issue,
|
no: e.no,
|
||||||
volumeNo: e.volumeNo,
|
issue: e.issue,
|
||||||
volume: e.volume,
|
volumeNo: e.volumeNo,
|
||||||
section: e.section,
|
volume: e.volume,
|
||||||
page: e.page,
|
section: e.section,
|
||||||
receiveDate: new Date(e.receiveDate),
|
page: e.page,
|
||||||
dateAnnounce: new Date(e.dateAnnounce),
|
receiveDate: new Date(e.receiveDate),
|
||||||
createdFullName: e.createdFullName,
|
dateAnnounce: new Date(e.dateAnnounce),
|
||||||
createdAt: new Date(e.createdAt),
|
createdFullName: e.createdFullName,
|
||||||
|
createdAt: new Date(e.createdAt),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -940,32 +944,34 @@ const clickSave = async () => {
|
||||||
* บันทึกเพิ่มข้อมูล
|
* บันทึกเพิ่มข้อมูล
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.post(config.API.profileInsignId(profileId.value), {
|
await http
|
||||||
id: id.value,
|
.post(config.API.profileInsignId(profileId.value), {
|
||||||
insigniaId: insigniaId.value,
|
id: id.value,
|
||||||
insigniaType: insigniaType.value,
|
insigniaId: insigniaId.value,
|
||||||
year: year.value,
|
insigniaType: insigniaType.value,
|
||||||
no: no.value,
|
year: year.value,
|
||||||
issue: issue.value,
|
no: no.value,
|
||||||
volumeNo: volumeNo.value,
|
issue: issue.value,
|
||||||
volume: volume.value,
|
volumeNo: volumeNo.value,
|
||||||
section: section.value,
|
volume: volume.value,
|
||||||
page: page.value,
|
section: section.value,
|
||||||
receiveDate: dateToISO(receiveDate.value),
|
page: page.value,
|
||||||
dateAnnounce: dateToISO(dateAnnounce.value),
|
receiveDate: dateToISO(receiveDate.value),
|
||||||
})
|
dateAnnounce: dateToISO(dateAnnounce.value),
|
||||||
.then((res) => {
|
})
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
.then((res) => {
|
||||||
modal.value = false;
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
modal.value = false;
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(async () => {
|
})
|
||||||
await fetchData();
|
.finally(async () => {
|
||||||
});
|
await fetchData();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -263,11 +263,7 @@
|
||||||
>
|
>
|
||||||
<template #columns="props">
|
<template #columns="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
>
|
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -280,9 +276,7 @@
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
col.value == null
|
col.value == null ? "" : col.value.toLocaleString("en-US")
|
||||||
? ""
|
|
||||||
: col.value.toLocaleString("en-US")
|
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
|
@ -442,7 +436,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขการ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filterTotal = ref<string>("");
|
const filterTotal = ref<string>("");
|
||||||
const rowsTotal = ref<RequestItemsTotalObject[]>([]); //select data history
|
const rowsTotal = ref<RequestItemsTotalObject[]>([]); //select data history
|
||||||
|
|
@ -712,34 +708,36 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
rows.value = [];
|
if (profileId.value !== "") {
|
||||||
loaderPage(true);
|
rows.value = [];
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileLeaveId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileLeaveId(profileId.value))
|
||||||
const data = res.data.result;
|
.then((res) => {
|
||||||
// console.log(data);
|
const data = res.data.result;
|
||||||
data.map((e: ResponseObject) => {
|
// console.log(data);
|
||||||
rows.value.push({
|
data.map((e: ResponseObject) => {
|
||||||
id: e.id,
|
rows.value.push({
|
||||||
typeLeave: e.typeLeave,
|
id: e.id,
|
||||||
dateStartLeave: new Date(e.dateStartLeave),
|
typeLeave: e.typeLeave,
|
||||||
dateEndLeave: new Date(e.dateEndLeave),
|
dateStartLeave: new Date(e.dateStartLeave),
|
||||||
numLeave: e.numLeave,
|
dateEndLeave: new Date(e.dateEndLeave),
|
||||||
sumLeave: e.sumLeave,
|
numLeave: e.numLeave,
|
||||||
totalLeave: e.totalLeave,
|
sumLeave: e.sumLeave,
|
||||||
status: e.status,
|
totalLeave: e.totalLeave,
|
||||||
reason: e.reason,
|
status: e.status,
|
||||||
typeLeaveId: e.typeLeaveId,
|
reason: e.reason,
|
||||||
|
typeLeaveId: e.typeLeaveId,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const filterSelector = (val: any, update: Function, filtername: string) => {
|
const filterSelector = (val: any, update: Function, filtername: string) => {
|
||||||
|
|
@ -960,30 +958,31 @@ const clickSave = async () => {
|
||||||
// * บันทึกเพิ่มข้อมูล
|
// * บันทึกเพิ่มข้อมูล
|
||||||
// */
|
// */
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
const sum = Number(numLeave.value) + Number(numUsedLeave.value);
|
if (profileId.value !== "") {
|
||||||
|
const sum = Number(numLeave.value) + Number(numUsedLeave.value);
|
||||||
loaderPage(true);
|
loaderPage(true);
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileLeaveId(profileId.value), {
|
.post(config.API.profileLeaveId(profileId.value), {
|
||||||
dateStartLeave: dateToISO(dateRange.value[0]),
|
dateStartLeave: dateToISO(dateRange.value[0]),
|
||||||
dateEndLeave: dateToISO(dateRange.value[1]),
|
dateEndLeave: dateToISO(dateRange.value[1]),
|
||||||
numLeave: numLeave.value,
|
numLeave: numLeave.value,
|
||||||
sumLeave: numUsedLeave.value,
|
sumLeave: numUsedLeave.value,
|
||||||
totalLeave: sum,
|
totalLeave: sum,
|
||||||
status: statLeave.value,
|
status: statLeave.value,
|
||||||
reason: reason.value,
|
reason: reason.value,
|
||||||
typeLeaveId: typeLeave.value,
|
typeLeaveId: typeLeave.value,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
modalAdd.value = false;
|
modalAdd.value = false;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
await fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
|
|
@ -1182,28 +1181,30 @@ const addData = async () => {
|
||||||
* @param row ข้อมูล row ที่ดูประวัติการแก้ไข
|
* @param row ข้อมูล row ที่ดูประวัติการแก้ไข
|
||||||
*/
|
*/
|
||||||
const clickTotal = async () => {
|
const clickTotal = async () => {
|
||||||
rowsTotal.value = [];
|
if (profileId.value !== "") {
|
||||||
loaderPage(true);
|
rowsTotal.value = [];
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileLeaveTotalId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileLeaveTotalId(profileId.value))
|
||||||
let data = res.data.result;
|
.then((res) => {
|
||||||
data.map((e: ResponseTotalObject) => {
|
let data = res.data.result;
|
||||||
rowsTotal.value.push({
|
data.map((e: ResponseTotalObject) => {
|
||||||
typeLeaveId: e.typeLeaveId,
|
rowsTotal.value.push({
|
||||||
totalLeave: e.totalLeave,
|
typeLeaveId: e.typeLeaveId,
|
||||||
limitLeave: e.limitLeave,
|
totalLeave: e.totalLeave,
|
||||||
remainLeave: e.remainLeave,
|
limitLeave: e.limitLeave,
|
||||||
typeLeave: e.typeLeave,
|
remainLeave: e.remainLeave,
|
||||||
|
typeLeave: e.typeLeave,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขอื่
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
@ -302,28 +304,30 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileOtherId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileOtherId(profileId.value))
|
||||||
let data = res.data.result;
|
.then((res) => {
|
||||||
rows.value = [];
|
let data = res.data.result;
|
||||||
data.map((e: ResponseObject) => {
|
rows.value = [];
|
||||||
rows.value.push({
|
data.map((e: ResponseObject) => {
|
||||||
id: e.id,
|
rows.value.push({
|
||||||
date: new Date(e.date),
|
id: e.id,
|
||||||
detail: e.detail,
|
date: new Date(e.date),
|
||||||
createdFullName: e.createdFullName,
|
detail: e.detail,
|
||||||
createdAt: new Date(e.createdAt),
|
createdFullName: e.createdFullName,
|
||||||
|
createdAt: new Date(e.createdAt),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -407,23 +411,25 @@ const clickSave = async () => {
|
||||||
* บันทึกเพิ่มข้อมูล
|
* บันทึกเพิ่มข้อมูล
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.post(config.API.profileOtherId(profileId.value), {
|
await http
|
||||||
id: id.value,
|
.post(config.API.profileOtherId(profileId.value), {
|
||||||
date: date.value,
|
id: id.value,
|
||||||
detail: detail.value,
|
date: date.value,
|
||||||
})
|
detail: detail.value,
|
||||||
.then((res) => {
|
})
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
.then((res) => {
|
||||||
modal.value = false;
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
modal.value = false;
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(async () => {
|
})
|
||||||
await fetchData();
|
.finally(async () => {
|
||||||
});
|
await fetchData();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -486,12 +486,8 @@
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-actions align="right">
|
<q-card-actions align="right">
|
||||||
<q-btn
|
<q-btn unelevated label="บันทึก" color="public" @click="Retire"
|
||||||
unelevated
|
><!-- icon="mdi-content-save-outline"
|
||||||
label="บันทึก"
|
|
||||||
color="public"
|
|
||||||
@click="Retire"
|
|
||||||
><!-- icon="mdi-content-save-outline"
|
|
||||||
<q-tooltip>บันทึก</q-tooltip> -->
|
<q-tooltip>บันทึก</q-tooltip> -->
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
|
|
@ -500,35 +496,75 @@
|
||||||
<full-loader :visibility="loader"></full-loader>
|
<full-loader :visibility="loader"></full-loader>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted, defineAsyncComponent } from "vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
import { useDataStore } from "@/stores/data";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import EducationVue from "@/modules/04_registry/components/Education.vue";
|
|
||||||
import TrainVue from "@/modules/04_registry/components/Train.vue";
|
|
||||||
import InsigniaVue from "@/modules/04_registry/components/Insignia.vue";
|
|
||||||
import CoinedVue from "@/modules/04_registry/components/Coin.vue";
|
|
||||||
import AssessmentVue from "@/modules/04_registry/components/Assessment.vue";
|
|
||||||
import SalaryVue from "@/modules/04_registry/components/Salary.vue";
|
|
||||||
import SalaryEmployeeVue from "@/modules/04_registry/components/SalaryEmployee.vue";
|
|
||||||
import DisciplineVue from "@/modules/04_registry/components/Discipline.vue";
|
|
||||||
import LeaveVue from "@/modules/04_registry/components/Leave.vue";
|
|
||||||
import TalentVue from "@/modules/04_registry/components/Talent.vue";
|
|
||||||
import WorkVue from "@/modules/04_registry/components/Work.vue";
|
|
||||||
import RecordVue from "@/modules/04_registry/components/Record.vue";
|
|
||||||
import OtherVue from "@/modules/04_registry/components/Other.vue";
|
|
||||||
import DocumentVue from "@/modules/04_registry/components/Document.vue";
|
|
||||||
import Certicate from "@/modules/04_registry/components/Information/Certicate.vue";
|
|
||||||
import Information from "@/modules/04_registry/components/Information/Information.vue";
|
|
||||||
import Government from "@/modules/04_registry/components/Information/Government.vue";
|
|
||||||
import Address from "@/modules/04_registry/components/Information/Address.vue";
|
|
||||||
import Family from "@/modules/04_registry/components/Information/Family.vue";
|
|
||||||
import OldName from "@/modules/04_registry/components/Information/OldName.vue";
|
import OldName from "@/modules/04_registry/components/Information/OldName.vue";
|
||||||
import type { DataOption } from "@/modules/04_registry/interface/index/Main";
|
import type { DataOption } from "@/modules/04_registry/interface/index/Main";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
const EducationVue = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Education.vue")
|
||||||
|
);
|
||||||
|
const TrainVue = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Train.vue")
|
||||||
|
);
|
||||||
|
const InsigniaVue = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Insignia.vue")
|
||||||
|
);
|
||||||
|
const CoinedVue = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Coin.vue")
|
||||||
|
);
|
||||||
|
const AssessmentVue = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Assessment.vue")
|
||||||
|
);
|
||||||
|
const SalaryVue = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Salary.vue")
|
||||||
|
);
|
||||||
|
const SalaryEmployeeVue = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/SalaryEmployee.vue")
|
||||||
|
);
|
||||||
|
const DisciplineVue = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Discipline.vue")
|
||||||
|
);
|
||||||
|
const LeaveVue = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Leave.vue")
|
||||||
|
);
|
||||||
|
const TalentVue = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Talent.vue")
|
||||||
|
);
|
||||||
|
const WorkVue = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Work.vue")
|
||||||
|
);
|
||||||
|
const RecordVue = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Record.vue")
|
||||||
|
);
|
||||||
|
const OtherVue = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Other.vue")
|
||||||
|
);
|
||||||
|
const DocumentVue = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Document.vue")
|
||||||
|
);
|
||||||
|
const Certicate = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Information/Certicate.vue")
|
||||||
|
);
|
||||||
|
const Information = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Information/Information.vue")
|
||||||
|
);
|
||||||
|
const Government = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Information/Government.vue")
|
||||||
|
);
|
||||||
|
const Address = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Information/Address.vue")
|
||||||
|
);
|
||||||
|
const Family = defineAsyncComponent(
|
||||||
|
() => import("@/modules/04_registry/components/Information/Family.vue")
|
||||||
|
);
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useDataStore();
|
const store = useDataStore();
|
||||||
const { changeTab, loaderPage } = store;
|
const { changeTab, loaderPage } = store;
|
||||||
|
|
|
||||||
|
|
@ -234,7 +234,9 @@ const tittleHistory = ref<string>(
|
||||||
);
|
);
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
|
|
@ -351,29 +353,31 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileNopaidId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileNopaidId(profileId.value))
|
||||||
let data = res.data.result;
|
.then((res) => {
|
||||||
rows.value = [];
|
let data = res.data.result;
|
||||||
data.map((e: ResponseObject) => {
|
rows.value = [];
|
||||||
rows.value.push({
|
data.map((e: ResponseObject) => {
|
||||||
id: e.id,
|
rows.value.push({
|
||||||
date: new Date(e.date),
|
id: e.id,
|
||||||
detail: e.detail,
|
date: new Date(e.date),
|
||||||
reference: e.reference,
|
detail: e.detail,
|
||||||
createdFullName: e.createdFullName,
|
reference: e.reference,
|
||||||
createdAt: new Date(e.createdAt),
|
createdFullName: e.createdFullName,
|
||||||
|
createdAt: new Date(e.createdAt),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -458,24 +462,26 @@ const clickSave = async () => {
|
||||||
* บันทึกเพิ่มข้อมูล
|
* บันทึกเพิ่มข้อมูล
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.post(config.API.profileNopaidId(profileId.value), {
|
await http
|
||||||
id: id.value,
|
.post(config.API.profileNopaidId(profileId.value), {
|
||||||
date: dateToISO(date.value),
|
id: id.value,
|
||||||
detail: detail.value,
|
date: dateToISO(date.value),
|
||||||
reference: reference.value,
|
detail: detail.value,
|
||||||
})
|
reference: reference.value,
|
||||||
.then((res) => {
|
})
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
.then((res) => {
|
||||||
modal.value = false;
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
modal.value = false;
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(async () => {
|
})
|
||||||
await fetchData();
|
.finally(async () => {
|
||||||
});
|
await fetchData();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -500,6 +500,10 @@ const props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
statusAdd: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -822,7 +826,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขตำแ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<ResponseObjectEmployee[]>([]);
|
const rows = ref<ResponseObjectEmployee[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
@ -1328,45 +1334,47 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
loaderPage(true);
|
||||||
await http
|
if (profileId.value !== "") {
|
||||||
.get(config.API.profileSalaryEmployeeId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileSalaryEmployeeId(profileId.value))
|
||||||
const data = res.data.result;
|
.then((res) => {
|
||||||
// console.log(data);
|
const data = res.data.result;
|
||||||
rows.value = [];
|
// console.log(data);
|
||||||
data.map((e: ResponseObjectEmployee) => {
|
rows.value = [];
|
||||||
rows.value.push({
|
data.map((e: ResponseObjectEmployee) => {
|
||||||
id: e.id,
|
rows.value.push({
|
||||||
date: new Date(e.date),
|
id: e.id,
|
||||||
amount: e.amount,
|
date: new Date(e.date),
|
||||||
positionSalaryAmount: e.positionSalaryAmount,
|
amount: e.amount,
|
||||||
mouthSalaryAmount: e.mouthSalaryAmount,
|
positionSalaryAmount: e.positionSalaryAmount,
|
||||||
oc: e.oc,
|
mouthSalaryAmount: e.mouthSalaryAmount,
|
||||||
ocId: e.ocId,
|
oc: e.oc,
|
||||||
posNo: e.posNo,
|
ocId: e.ocId,
|
||||||
posNoId: e.posNoId,
|
posNo: e.posNo,
|
||||||
posNoEmployee: e.posNoEmployee,
|
posNoId: e.posNoId,
|
||||||
positionEmployeeGroup: e.positionEmployeeGroup,
|
posNoEmployee: e.posNoEmployee,
|
||||||
positionEmployeeGroupId: e.positionEmployeeGroupId,
|
positionEmployeeGroup: e.positionEmployeeGroup,
|
||||||
positionEmployeeLevel: e.positionEmployeeLevel,
|
positionEmployeeGroupId: e.positionEmployeeGroupId,
|
||||||
positionEmployeeLevelId: e.positionEmployeeLevelId,
|
positionEmployeeLevel: e.positionEmployeeLevel,
|
||||||
positionEmployeePosition: e.positionEmployeePosition,
|
positionEmployeeLevelId: e.positionEmployeeLevelId,
|
||||||
positionEmployeePositionId: e.positionEmployeePositionId,
|
positionEmployeePosition: e.positionEmployeePosition,
|
||||||
positionEmployeePositionSide: e.positionEmployeePositionSide,
|
positionEmployeePositionId: e.positionEmployeePositionId,
|
||||||
positionEmployeePositionSideId: e.positionEmployeePositionSideId,
|
positionEmployeePositionSide: e.positionEmployeePositionSide,
|
||||||
salaryClass: e.salaryClass,
|
positionEmployeePositionSideId: e.positionEmployeePositionSideId,
|
||||||
salaryRef: e.salaryRef,
|
salaryClass: e.salaryClass,
|
||||||
createdFullName: e.createdFullName,
|
salaryRef: e.salaryRef,
|
||||||
createdAt: new Date(e.createdAt),
|
createdFullName: e.createdFullName,
|
||||||
|
createdAt: new Date(e.createdAt),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchPositionNumber = async (id: string) => {
|
const fetchPositionNumber = async (id: string) => {
|
||||||
|
|
@ -1548,33 +1556,35 @@ const clickSave = async () => {
|
||||||
* บันทึกเพิ่มข้อมูล
|
* บันทึกเพิ่มข้อมูล
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.post(config.API.profileSalaryEmployeeId(profileId.value), {
|
await http
|
||||||
amount: amount.value,
|
.post(config.API.profileSalaryEmployeeId(profileId.value), {
|
||||||
date: dateToISO(date.value),
|
amount: amount.value,
|
||||||
positionSalaryAmount: positionSalaryAmount.value,
|
date: dateToISO(date.value),
|
||||||
mouthSalaryAmount: mouthSalaryAmount.value,
|
positionSalaryAmount: positionSalaryAmount.value,
|
||||||
ocId: agencyId.value,
|
mouthSalaryAmount: mouthSalaryAmount.value,
|
||||||
// posNoId: posNoId.value,
|
ocId: agencyId.value,
|
||||||
posNoEmployee: posNoEmployee.value,
|
// posNoId: posNoId.value,
|
||||||
positionEmployeeGroupId: employeeGroupId.value,
|
posNoEmployee: posNoEmployee.value,
|
||||||
positionEmployeeLevelId: employeeLevelId.value,
|
positionEmployeeGroupId: employeeGroupId.value,
|
||||||
positionEmployeePositionId: employeePositionId.value,
|
positionEmployeeLevelId: employeeLevelId.value,
|
||||||
positionEmployeePositionSideId: employeePositionSideId.value,
|
positionEmployeePositionId: employeePositionId.value,
|
||||||
salaryClass: salaryClass.value,
|
positionEmployeePositionSideId: employeePositionSideId.value,
|
||||||
salaryRef: salaryRef.value,
|
salaryClass: salaryClass.value,
|
||||||
})
|
salaryRef: salaryRef.value,
|
||||||
.then((res) => {
|
})
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
.then((res) => {
|
||||||
modal.value = false;
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
modal.value = false;
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(async () => {
|
})
|
||||||
await fetchData();
|
.finally(async () => {
|
||||||
});
|
await fetchData();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -314,7 +314,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขควา
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
@ -506,32 +508,34 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileAbiliId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileAbiliId(profileId.value))
|
||||||
let data = res.data.result;
|
.then((res) => {
|
||||||
rows.value = [];
|
let data = res.data.result;
|
||||||
data.map((e: ResponseObject) => {
|
rows.value = [];
|
||||||
rows.value.push({
|
data.map((e: ResponseObject) => {
|
||||||
id: e.id,
|
rows.value.push({
|
||||||
field: e.field,
|
id: e.id,
|
||||||
detail: e.detail,
|
field: e.field,
|
||||||
remark: e.remark,
|
detail: e.detail,
|
||||||
dateStart: new Date(e.dateStart),
|
remark: e.remark,
|
||||||
dateEnd: new Date(e.dateEnd),
|
dateStart: new Date(e.dateStart),
|
||||||
reference: e.reference,
|
dateEnd: new Date(e.dateEnd),
|
||||||
createdFullName: e.createdFullName,
|
reference: e.reference,
|
||||||
createdAt: new Date(e.createdAt),
|
createdFullName: e.createdFullName,
|
||||||
|
createdAt: new Date(e.createdAt),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -619,27 +623,29 @@ const clickSave = async () => {
|
||||||
* บันทึกเพิ่มข้อมูล
|
* บันทึกเพิ่มข้อมูล
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.post(config.API.profileAbiliId(profileId.value), {
|
await http
|
||||||
id: id.value,
|
.post(config.API.profileAbiliId(profileId.value), {
|
||||||
field: field.value,
|
id: id.value,
|
||||||
detail: detail.value,
|
field: field.value,
|
||||||
remark: remark.value,
|
detail: detail.value,
|
||||||
dateStart: dateToISO(dateStart.value),
|
remark: remark.value,
|
||||||
dateEnd: dateToISO(dateEnd.value),
|
dateStart: dateToISO(dateStart.value),
|
||||||
reference: reference.value,
|
dateEnd: dateToISO(dateEnd.value),
|
||||||
})
|
reference: reference.value,
|
||||||
.then((res) => {
|
})
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
.then((res) => {
|
||||||
modal.value = false;
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
modal.value = false;
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(async () => {
|
})
|
||||||
await fetchData();
|
.finally(async () => {
|
||||||
});
|
await fetchData();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -459,7 +459,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขการ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
@ -751,36 +753,38 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileTrainId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileTrainId(profileId.value))
|
||||||
let data = res.data.result;
|
.then((res) => {
|
||||||
rows.value = [];
|
let data = res.data.result;
|
||||||
data.map((e: ResponseObject) => {
|
rows.value = [];
|
||||||
rows.value.push({
|
data.map((e: ResponseObject) => {
|
||||||
id: e.id,
|
rows.value.push({
|
||||||
name: e.name,
|
id: e.id,
|
||||||
topic: e.topic,
|
name: e.name,
|
||||||
yearly: e.yearly,
|
topic: e.topic,
|
||||||
place: e.place,
|
yearly: e.yearly,
|
||||||
duration: e.duration,
|
place: e.place,
|
||||||
department: e.department,
|
duration: e.duration,
|
||||||
numberOrder: e.numberOrder,
|
department: e.department,
|
||||||
dateOrder: e.dateOrder,
|
numberOrder: e.numberOrder,
|
||||||
startDate: new Date(e.startDate),
|
dateOrder: e.dateOrder,
|
||||||
endDate: new Date(e.endDate),
|
startDate: new Date(e.startDate),
|
||||||
createdFullName: e.createdFullName,
|
endDate: new Date(e.endDate),
|
||||||
createdAt: new Date(e.createdAt),
|
createdFullName: e.createdFullName,
|
||||||
|
createdAt: new Date(e.createdAt),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -872,31 +876,33 @@ const clickSave = async () => {
|
||||||
* บันทึกเพิ่มข้อมูล
|
* บันทึกเพิ่มข้อมูล
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.post(config.API.profileTrainId(profileId.value), {
|
await http
|
||||||
id: id.value,
|
.post(config.API.profileTrainId(profileId.value), {
|
||||||
name: name.value,
|
id: id.value,
|
||||||
topic: topic.value,
|
name: name.value,
|
||||||
yearly: yearly.value,
|
topic: topic.value,
|
||||||
place: place.value,
|
yearly: yearly.value,
|
||||||
duration: duration.value,
|
place: place.value,
|
||||||
department: department.value,
|
duration: duration.value,
|
||||||
numberOrder: numberOrder.value,
|
department: department.value,
|
||||||
dateOrder: dateOrder.value,
|
numberOrder: numberOrder.value,
|
||||||
startDate: dateToISO(startDate.value),
|
dateOrder: dateOrder.value,
|
||||||
endDate: dateToISO(endDate.value),
|
startDate: dateToISO(startDate.value),
|
||||||
})
|
endDate: dateToISO(endDate.value),
|
||||||
.then((res) => {
|
})
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
.then((res) => {
|
||||||
modal.value = false;
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
modal.value = false;
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(async () => {
|
})
|
||||||
await fetchData();
|
.finally(async () => {
|
||||||
});
|
await fetchData();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -283,7 +283,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขปฏิ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
@ -426,30 +428,32 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.get(config.API.profileDutyId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileDutyId(profileId.value))
|
||||||
let data = res.data.result;
|
.then((res) => {
|
||||||
rows.value = [];
|
let data = res.data.result;
|
||||||
data.map((e: ResponseObject) => {
|
rows.value = [];
|
||||||
rows.value.push({
|
data.map((e: ResponseObject) => {
|
||||||
id: e.id,
|
rows.value.push({
|
||||||
dateStart: new Date(e.dateStart),
|
id: e.id,
|
||||||
dateEnd: new Date(e.dateEnd),
|
dateStart: new Date(e.dateStart),
|
||||||
detail: e.detail,
|
dateEnd: new Date(e.dateEnd),
|
||||||
reference: e.reference,
|
detail: e.detail,
|
||||||
createdFullName: e.createdFullName,
|
reference: e.reference,
|
||||||
createdAt: new Date(e.createdAt),
|
createdFullName: e.createdFullName,
|
||||||
|
createdAt: new Date(e.createdAt),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loaderPage(false);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -535,25 +539,27 @@ const clickSave = async () => {
|
||||||
* บันทึกเพิ่มข้อมูล
|
* บันทึกเพิ่มข้อมูล
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
loaderPage(true);
|
if (profileId.value !== "") {
|
||||||
await http
|
loaderPage(true);
|
||||||
.post(config.API.profileDutyId(profileId.value), {
|
await http
|
||||||
id: id.value,
|
.post(config.API.profileDutyId(profileId.value), {
|
||||||
dateStart: dateToISO(dateStart.value),
|
id: id.value,
|
||||||
dateEnd: dateToISO(dateEnd.value),
|
dateStart: dateToISO(dateStart.value),
|
||||||
detail: detail.value,
|
dateEnd: dateToISO(dateEnd.value),
|
||||||
reference: reference.value,
|
detail: detail.value,
|
||||||
})
|
reference: reference.value,
|
||||||
.then((res) => {
|
})
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
.then((res) => {
|
||||||
modal.value = false;
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
modal.value = false;
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(async () => {
|
})
|
||||||
await fetchData();
|
.finally(async () => {
|
||||||
});
|
await fetchData();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ interface Information {
|
||||||
prefixId: string | null;
|
prefixId: string | null;
|
||||||
firstname: string | null;
|
firstname: string | null;
|
||||||
lastname: string | null;
|
lastname: string | null;
|
||||||
birthDate: Date;
|
birthDate: Date | null;
|
||||||
genderId: string | null;
|
genderId: string | null;
|
||||||
bloodId: string | null;
|
bloodId: string | null;
|
||||||
nationality: string | null;
|
nationality: string | null;
|
||||||
|
|
|
||||||
|
|
@ -315,7 +315,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
รายการสอบแข่งขัน / คัดเลือก
|
รายการสอบแข่งขัน / คัดเลือก
|
||||||
</div>
|
</div>
|
||||||
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
||||||
<div class="row q-col-gutter-md">
|
<div class="row q-col-gutter-sm">
|
||||||
<div class="row col-12 q-col-gutter-sm">
|
<div class="row col-12 q-col-gutter-sm">
|
||||||
<q-select
|
<q-select
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="toptitle text-dark col-12 row items-center">ออกคำสั่ง</div>
|
<div class="toptitle text-dark col-12 row items-center">ออกคำสั่ง</div>
|
||||||
<div>
|
<div>
|
||||||
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
||||||
<div class="row q-col-gutter-md">
|
<div class="row q-col-gutter-sm">
|
||||||
<div class="row col-12 q-col-gutter-sm">
|
<div class="row col-12 q-col-gutter-sm">
|
||||||
<q-select
|
<q-select
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:body-selection="scope">
|
<template v-slot:body-selection="scope">
|
||||||
<q-checkbox
|
<!-- <q-checkbox
|
||||||
keep-color
|
keep-color
|
||||||
color="primary"
|
color="primary"
|
||||||
dense
|
dense
|
||||||
|
|
@ -83,6 +83,12 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
/> -->
|
||||||
|
<q-checkbox
|
||||||
|
keep-color
|
||||||
|
color="primary"
|
||||||
|
dense
|
||||||
|
v-model="scope.selected"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -175,6 +181,7 @@ import { ref } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import type { QInput } from "quasar";
|
import type { QInput } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
next: {
|
next: {
|
||||||
|
|
@ -197,7 +204,7 @@ const $q = useQuasar();
|
||||||
const filterRef = ref<QInput>();
|
const filterRef = ref<QInput>();
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
const visibleColumns = ref<String[]>(["no", "idcard", "name", "educate"]);
|
const visibleColumns = ref<String[]>(["no", "idcard", "name", "educate"]);
|
||||||
const columns = [
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{ name: "no", align: "left", label: "ลำดับ", field: "no", sortable: true },
|
{ name: "no", align: "left", label: "ลำดับ", field: "no", sortable: true },
|
||||||
{
|
{
|
||||||
name: "idcard",
|
name: "idcard",
|
||||||
|
|
@ -220,7 +227,7 @@ const columns = [
|
||||||
field: "educate",
|
field: "educate",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
];
|
]);
|
||||||
|
|
||||||
const rows = [
|
const rows = [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -270,7 +270,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:body-selection="scope">
|
<template v-slot:body-selection="scope">
|
||||||
<q-checkbox
|
<!-- <q-checkbox
|
||||||
keep-color
|
keep-color
|
||||||
color="primary"
|
color="primary"
|
||||||
dense
|
dense
|
||||||
|
|
@ -283,6 +283,12 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
/> -->
|
||||||
|
<q-checkbox
|
||||||
|
keep-color
|
||||||
|
color="primary"
|
||||||
|
dense
|
||||||
|
v-model="scope.selected"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -337,6 +343,7 @@ import type { QInput, QForm } from "quasar";
|
||||||
import type { treeTab } from "@/modules/05_placement/interface/index/Main";
|
import type { treeTab } from "@/modules/05_placement/interface/index/Main";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
next: {
|
next: {
|
||||||
|
|
@ -370,7 +377,7 @@ const selectedModal = ref([]);
|
||||||
const test = ref([]);
|
const test = ref([]);
|
||||||
const filterModal = ref<string>("");
|
const filterModal = ref<string>("");
|
||||||
const visibleColumnsModal = ref<String[]>(["no", "idcard", "name"]);
|
const visibleColumnsModal = ref<String[]>(["no", "idcard", "name"]);
|
||||||
const columnsModal = [
|
const columnsModal = ref<QTableProps["columns"]>([
|
||||||
{ name: "no", align: "left", label: "ลำดับ", field: "no", sortable: true },
|
{ name: "no", align: "left", label: "ลำดับ", field: "no", sortable: true },
|
||||||
{
|
{
|
||||||
name: "idcard",
|
name: "idcard",
|
||||||
|
|
@ -386,7 +393,7 @@ const columnsModal = [
|
||||||
field: "name",
|
field: "name",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
];
|
]);
|
||||||
|
|
||||||
const rowsModal = [
|
const rowsModal = [
|
||||||
{
|
{
|
||||||
|
|
@ -482,7 +489,7 @@ const visibleColumns = ref<String[]>([
|
||||||
"agency",
|
"agency",
|
||||||
"send",
|
"send",
|
||||||
]);
|
]);
|
||||||
const columns = [
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{ name: "no", align: "left", label: "ลำดับ", field: "no", sortable: true },
|
{ name: "no", align: "left", label: "ลำดับ", field: "no", sortable: true },
|
||||||
{
|
{
|
||||||
name: "idcard",
|
name: "idcard",
|
||||||
|
|
@ -519,7 +526,7 @@ const columns = [
|
||||||
field: "send",
|
field: "send",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
];
|
]);
|
||||||
|
|
||||||
const rows = ref([
|
const rows = ref([
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,10 @@ const tittleHistory = ref<string>("ประวัติแก้ไขใบอ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
// const profileId = ref<string>(route.params.id.toString());
|
// const profileId = ref<string>(
|
||||||
const profileId = ref<string>('');
|
// route.params.id ? route.params.id.toString() : ""
|
||||||
|
// );
|
||||||
|
const profileId = ref<string>("");
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
@ -226,34 +228,39 @@ watch(visibleColumns, async (count: String[], prevCount: String[]) => {
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
// await fetchData();
|
// await fetchData();
|
||||||
|
if (route.params.id) {
|
||||||
|
profileId.value = route.params.id.toString();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
showLoader();
|
if (profileId.value != "") {
|
||||||
await http
|
showLoader();
|
||||||
.get(config.API.profileCertId(profileId.value))
|
await http
|
||||||
.then((res) => {
|
.get(config.API.profileCertId(profileId.value))
|
||||||
let data = res.data.result;
|
.then((res) => {
|
||||||
rows.value = [];
|
let data = res.data.result;
|
||||||
data.map((e: ResponseObject) => {
|
rows.value = [];
|
||||||
rows.value.push({
|
data.map((e: ResponseObject) => {
|
||||||
id: e.id,
|
rows.value.push({
|
||||||
certificateNo: e.certificateNo,
|
id: e.id,
|
||||||
issuer: e.issuer,
|
certificateNo: e.certificateNo,
|
||||||
issueDate: new Date(e.issueDate),
|
issuer: e.issuer,
|
||||||
expireDate: new Date(e.expireDate),
|
issueDate: new Date(e.issueDate),
|
||||||
certificateType: e.certificateType,
|
expireDate: new Date(e.expireDate),
|
||||||
createdFullName: e.createdFullName,
|
certificateType: e.certificateType,
|
||||||
createdAt: new Date(e.createdAt),
|
createdFullName: e.createdFullName,
|
||||||
|
createdAt: new Date(e.createdAt),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -340,26 +347,28 @@ const clickSave = async () => {
|
||||||
* บันทึกเพิ่มข้อมูล
|
* บันทึกเพิ่มข้อมูล
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
showLoader();
|
if (profileId.value !== "") {
|
||||||
await http
|
showLoader();
|
||||||
.post(config.API.profileCertId(profileId.value), {
|
await http
|
||||||
id: id.value,
|
.post(config.API.profileCertId(profileId.value), {
|
||||||
certificateNo: certificateNo.value,
|
id: id.value,
|
||||||
issuer: issuer.value,
|
certificateNo: certificateNo.value,
|
||||||
issueDate: dateToISO(issueDate.value),
|
issuer: issuer.value,
|
||||||
expireDate: dateToISO(expireDate.value),
|
issueDate: dateToISO(issueDate.value),
|
||||||
certificateType: certificateType.value,
|
expireDate: dateToISO(expireDate.value),
|
||||||
})
|
certificateType: certificateType.value,
|
||||||
.then((res) => {
|
})
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
.then((res) => {
|
||||||
modal.value = false;
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
modal.value = false;
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(async () => {
|
})
|
||||||
await fetchData();
|
.finally(async () => {
|
||||||
});
|
await fetchData();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
566
src/modules/05_placement/components/probation/MainProbation.vue
Normal file
566
src/modules/05_placement/components/probation/MainProbation.vue
Normal file
|
|
@ -0,0 +1,566 @@
|
||||||
|
<template>
|
||||||
|
<div class="toptitle text-dark col-12 row items-center">รายการผู้ทดลองปฏิบัติหน้าที่ราชการ</div>
|
||||||
|
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
||||||
|
<div class="row q-col-gutter-sm">
|
||||||
|
<div class="row col-12 q-col-gutter-sm">
|
||||||
|
<div>
|
||||||
|
<q-btn @click="clickAdd()" size="12px" flat round color="add" icon="mdi-plus">
|
||||||
|
<q-tooltip>เพิ่มผู้ทดลองปฏิบัติหน้าที่ราชการ</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
<q-space />
|
||||||
|
|
||||||
|
<q-input
|
||||||
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
|
standout
|
||||||
|
dense
|
||||||
|
v-model="filterKeyword"
|
||||||
|
ref="filterRef"
|
||||||
|
outlined
|
||||||
|
debounce="300"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||||
|
<q-icon
|
||||||
|
v-if="filterKeyword !== ''"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click="resetFilter"
|
||||||
|
/>
|
||||||
|
</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"
|
||||||
|
options-cover
|
||||||
|
style="min-width: 150px"
|
||||||
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-table
|
||||||
|
ref="table"
|
||||||
|
:columns="columns"
|
||||||
|
:rows="rows"
|
||||||
|
:filter="filterKeyword"
|
||||||
|
row-key="Order"
|
||||||
|
flat
|
||||||
|
bordered
|
||||||
|
:paging="true"
|
||||||
|
dense
|
||||||
|
class="custom-header-table"
|
||||||
|
v-bind="attrs"
|
||||||
|
:visible-columns="visibleColumns"
|
||||||
|
:pagination-label="paginationLabel"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
>
|
||||||
|
<template v-slot:header="props">
|
||||||
|
<q-tr :props="props">
|
||||||
|
<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" class="cursor-pointer" @click="router.push(`/probation/detail/${props.rowIndex + 1}`)">
|
||||||
|
<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 == 'status'">
|
||||||
|
<q-icon size="20px" v-if="props.row.status == 'อยู่ระหว่างการทดลองงาน'" name="mdi-timer-sand" color="deep-orange">
|
||||||
|
<q-tooltip>อยู่ระหว่างการทดลองงาน</q-tooltip>
|
||||||
|
</q-icon>
|
||||||
|
<q-icon size="20px" v-else-if="props.row.status == 'ไม่ผ่านการทดลอง'" name="mdi-close" color="red">
|
||||||
|
<q-tooltip>ไม่ผ่านการทดลอง</q-tooltip>
|
||||||
|
</q-icon>
|
||||||
|
<q-icon size="20px" v-else name="mdi-check" color="teal">
|
||||||
|
<q-tooltip>ผ่านการทดลองงาน</q-tooltip>
|
||||||
|
</q-icon>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
{{ col.value }}
|
||||||
|
</div>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<template v-slot:pagination="scope">
|
||||||
|
<q-pagination
|
||||||
|
v-model="pagination.page"
|
||||||
|
active-color="primary"
|
||||||
|
color="dark"
|
||||||
|
:max="scope.pagesNumber"
|
||||||
|
:max-pages="5"
|
||||||
|
size="sm"
|
||||||
|
boundary-links
|
||||||
|
direction-links
|
||||||
|
></q-pagination>
|
||||||
|
</template>
|
||||||
|
</q-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
|
||||||
|
<q-dialog v-model="modal" persistent>
|
||||||
|
<q-card style="width: 900px; max-width: 80vw;">
|
||||||
|
<q-form ref="myForm">
|
||||||
|
<DialogHeader tittle="เพิ่มผู้ทดลองปฏิบัติหน้าที่ราชการ " :close="clickClose" />
|
||||||
|
<q-separator />
|
||||||
|
<q-card-section class="q-pa-md q-col-gutter-sm">
|
||||||
|
<q-input
|
||||||
|
class="col-12"
|
||||||
|
standout
|
||||||
|
dense
|
||||||
|
v-model="filterKeyword2"
|
||||||
|
ref="filterRef2"
|
||||||
|
outlined
|
||||||
|
debounce="300"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon v-if="filterKeyword2 == ''" name="search" />
|
||||||
|
<q-icon
|
||||||
|
v-if="filterKeyword2 !== ''"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click="resetFilter2"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-table
|
||||||
|
ref="table2"
|
||||||
|
:columns="columns2"
|
||||||
|
:rows="rows2"
|
||||||
|
:filter="filterKeyword2"
|
||||||
|
row-key="Order"
|
||||||
|
flat
|
||||||
|
bordered
|
||||||
|
:paging="true"
|
||||||
|
dense
|
||||||
|
class="custom-header-table"
|
||||||
|
v-bind="attrs"
|
||||||
|
:visible-columns="visibleColumns2"
|
||||||
|
:pagination-label="paginationLabel"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
>
|
||||||
|
<template v-slot:header="props">
|
||||||
|
<q-tr :props="props">
|
||||||
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
|
</q-th>
|
||||||
|
<q-th auto-width />
|
||||||
|
</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 }}
|
||||||
|
</div>
|
||||||
|
</q-td>
|
||||||
|
<q-td auto-width>
|
||||||
|
<q-btn
|
||||||
|
dense
|
||||||
|
class="q-px-md"
|
||||||
|
outline
|
||||||
|
color="primary"
|
||||||
|
v-close-popup
|
||||||
|
label="เพิ่ม"
|
||||||
|
>
|
||||||
|
</q-btn>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<template v-slot:pagination="scope">
|
||||||
|
<q-pagination
|
||||||
|
v-model="pagination.page"
|
||||||
|
active-color="primary"
|
||||||
|
color="dark"
|
||||||
|
:max="scope.pagesNumber"
|
||||||
|
:max-pages="5"
|
||||||
|
size="sm"
|
||||||
|
boundary-links
|
||||||
|
direction-links
|
||||||
|
></q-pagination>
|
||||||
|
</template>
|
||||||
|
</q-table>
|
||||||
|
</div>
|
||||||
|
</q-card-section>
|
||||||
|
</q-form>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, useAttrs } from "vue";
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
|
import type { FormMainProbation, FormMainProbation2 } from "@/modules/05_placement/interface/request/Main";
|
||||||
|
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
||||||
|
import router from "@/router";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
|
const modal = ref<boolean>(false);
|
||||||
|
const pagination = ref({
|
||||||
|
sortBy: "desc",
|
||||||
|
descending: false,
|
||||||
|
page: 1,
|
||||||
|
rowsPerPage: 10,
|
||||||
|
});
|
||||||
|
|
||||||
|
const visibleColumns = ref<string[]>([
|
||||||
|
"no",
|
||||||
|
"name",
|
||||||
|
"position",
|
||||||
|
"level",
|
||||||
|
"institution",
|
||||||
|
"time",
|
||||||
|
"status",
|
||||||
|
"orderNum",
|
||||||
|
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||||
|
|
||||||
|
// หัวตาราง
|
||||||
|
const columns = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "no",
|
||||||
|
align: "left",
|
||||||
|
label: "ลำดับ",
|
||||||
|
sortable: true,
|
||||||
|
field: "no",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "name",
|
||||||
|
align: "left",
|
||||||
|
label: "ชื่อ-สกุล",
|
||||||
|
sortable: true,
|
||||||
|
field: "name",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "position",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่งในสายงาน",
|
||||||
|
sortable: true,
|
||||||
|
field: "position",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "level",
|
||||||
|
align: "left",
|
||||||
|
label: "ระดับ",
|
||||||
|
sortable: true,
|
||||||
|
field: "level",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "institution",
|
||||||
|
align: "left",
|
||||||
|
label: "สังกัด",
|
||||||
|
sortable: true,
|
||||||
|
field: "institution",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "time",
|
||||||
|
align: "center",
|
||||||
|
label: "ครั้งที่ทดลองงาน",
|
||||||
|
sortable: true,
|
||||||
|
field: "time",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "orderNum",
|
||||||
|
align: "center",
|
||||||
|
label: "เลขที่คําสั่งบรรจุแต่งตั้ง",
|
||||||
|
sortable: true,
|
||||||
|
field: "orderNum",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "status",
|
||||||
|
align: "center",
|
||||||
|
label: "สถานะทดลองงาน",
|
||||||
|
sortable: true,
|
||||||
|
field: "status",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
// ข้อมูลตาราง (จำลอง)
|
||||||
|
const rows = ref<FormMainProbation[]>([
|
||||||
|
{
|
||||||
|
no:"1",
|
||||||
|
name: "นายสมคิด ยอดใจ ",
|
||||||
|
position: "นักวิชาการพัสดุ",
|
||||||
|
level: "ปฏิบัติการ",
|
||||||
|
institution: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
|
||||||
|
time: "1",
|
||||||
|
status: "อยู่ระหว่างการทดลองงาน",
|
||||||
|
orderNum: "11/2566",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
no:"2",
|
||||||
|
name: "นายเกียรติศักดิ์ บัณฑิต",
|
||||||
|
position: "นักวิชาการพัสดุ",
|
||||||
|
level: "ปฏิบัติการ",
|
||||||
|
institution: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
|
||||||
|
time: "1",
|
||||||
|
status: "อยู่ระหว่างการทดลองงาน",
|
||||||
|
orderNum: "11/2566",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
no:"3",
|
||||||
|
name: "นางสาวกัณฐิมา กาฬสินธุ์",
|
||||||
|
position: "นักจัดการงานทั่วไป",
|
||||||
|
level: "ปฏิบัติการ",
|
||||||
|
institution: "กลุ่มงานช่วยนักบริหาร",
|
||||||
|
time: "1",
|
||||||
|
status: "อยู่ระหว่างการทดลองงาน",
|
||||||
|
orderNum: "11/2566",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
no:"4",
|
||||||
|
name: "นางสาวเมขลา กระจ่างมนตรี",
|
||||||
|
position: "นักจัดการงานทั่วไป",
|
||||||
|
level: "ปฏิบัติการ",
|
||||||
|
institution: "กลุ่มงานช่วยนักบริหาร",
|
||||||
|
time: "1",
|
||||||
|
status: "ไม่ผ่านการทดลอง",
|
||||||
|
orderNum: "11/2566",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
no:"5",
|
||||||
|
name: "นางสาวฐิติรัตน์ พงษ์ศิริ",
|
||||||
|
position: "นักจัดการงานทั่วไป",
|
||||||
|
level: "ปฏิบัติการ",
|
||||||
|
institution: "กลุ่มงานช่วยนักบริหาร",
|
||||||
|
time: "1",
|
||||||
|
status: "ผ่านการทดลองงาน",
|
||||||
|
orderNum: "11/2566",
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
const visibleColumns2 = ref<string[]>([
|
||||||
|
"no",
|
||||||
|
"name",
|
||||||
|
"position",
|
||||||
|
"level",
|
||||||
|
"institution"
|
||||||
|
]);
|
||||||
|
|
||||||
|
// หัวตาราง2
|
||||||
|
const columns2 = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "no",
|
||||||
|
align: "left",
|
||||||
|
label: "ลำดับ",
|
||||||
|
sortable: true,
|
||||||
|
field: "no",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "name",
|
||||||
|
align: "left",
|
||||||
|
label: "ชื่อ-สกุล",
|
||||||
|
sortable: true,
|
||||||
|
field: "name",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "position",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่งในสายงาน",
|
||||||
|
sortable: true,
|
||||||
|
field: "position",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "level",
|
||||||
|
align: "left",
|
||||||
|
label: "ระดับ",
|
||||||
|
sortable: true,
|
||||||
|
field: "level",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "institution",
|
||||||
|
align: "left",
|
||||||
|
label: "สังกัด",
|
||||||
|
sortable: true,
|
||||||
|
field: "institution",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
// ข้อมูลตาราง (จำลอง)
|
||||||
|
const rows2 = ref<FormMainProbation2[]>([
|
||||||
|
{
|
||||||
|
no:"1",
|
||||||
|
name: "นายใจดี ยอดใจ ",
|
||||||
|
position: "นักวิชาการพัสดุ",
|
||||||
|
level: "ปฏิบัติการ",
|
||||||
|
institution: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
no:"2",
|
||||||
|
name: "นายจักกริน บัณฑิต",
|
||||||
|
position: "นักวิชาการพัสดุ",
|
||||||
|
level: "ปฏิบัติการ",
|
||||||
|
institution: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
no:"3",
|
||||||
|
name: "นางสาวกัณฐิมา กาฬสินธุ์",
|
||||||
|
position: "นักจัดการงานทั่วไป",
|
||||||
|
level: "ปฏิบัติการ",
|
||||||
|
institution: "กลุ่มงานช่วยนักบริหาร",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
no:"4",
|
||||||
|
name: "นางสาวเมขลา กระจ่างมนตรี",
|
||||||
|
position: "นักจัดการงานทั่วไป",
|
||||||
|
level: "ปฏิบัติการ",
|
||||||
|
institution: "กลุ่มงานช่วยนักบริหาร",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
no:"5",
|
||||||
|
name: "นางสาวฐิติรัตน์ พงษ์ศิริ",
|
||||||
|
position: "นักจัดการงานทั่วไป",
|
||||||
|
level: "ปฏิบัติการ",
|
||||||
|
institution: "กลุ่มงานช่วยนักบริหาร",
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
const clickDelete = (id: string) => {
|
||||||
|
$q.dialog({
|
||||||
|
title: "ยืนยันการลบข้อมูล",
|
||||||
|
message: "ต้องการลบข้อมูลนี้ใช่หรือไม่?",
|
||||||
|
cancel: {
|
||||||
|
flat: true,
|
||||||
|
color: "negative",
|
||||||
|
},
|
||||||
|
persistent: true,
|
||||||
|
})
|
||||||
|
.onOk(async () => {
|
||||||
|
})
|
||||||
|
.onCancel(() => {})
|
||||||
|
.onDismiss(() => {});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const clickAdd = () => {
|
||||||
|
modal.value = true
|
||||||
|
};
|
||||||
|
const clickClose = async () => {
|
||||||
|
modal.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// ค้นหาในตาราง
|
||||||
|
const filterKeyword = ref<string>("");
|
||||||
|
const filterRef = ref<any>(null);
|
||||||
|
const resetFilter = () => {
|
||||||
|
filterKeyword.value = "";
|
||||||
|
filterRef.value.focus();
|
||||||
|
};
|
||||||
|
|
||||||
|
const filterKeyword2 = ref<string>("");
|
||||||
|
const filterRef2 = ref<any>(null);
|
||||||
|
const resetFilter2 = () => {
|
||||||
|
filterKeyword2.value = "";
|
||||||
|
filterRef2.value.focus();
|
||||||
|
};
|
||||||
|
|
||||||
|
const attrs = ref<any>(useAttrs());
|
||||||
|
|
||||||
|
const paging = ref<boolean>(true);
|
||||||
|
const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
|
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||||
|
else return start + "-" + end + " ใน " + total;
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scope>
|
||||||
|
.filter-card {
|
||||||
|
background-color: #f1f1f1b0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle-expired-account {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 15px;
|
||||||
|
line-height: 150%;
|
||||||
|
color: #35373c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-color {
|
||||||
|
color: #4154b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-header-table {
|
||||||
|
max-height: 64vh;
|
||||||
|
|
||||||
|
.q-table tr:nth-child(odd) td {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-table tr:nth-child(even) td {
|
||||||
|
background: #f8f8f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-table thead tr {
|
||||||
|
background: #ecebeb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-table thead tr th {
|
||||||
|
position: sticky;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* this will be the loading indicator */
|
||||||
|
.q-table thead tr:last-child th {
|
||||||
|
/* height of all previous header rows */
|
||||||
|
top: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-table thead tr:first-child th {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,333 @@
|
||||||
|
<template>
|
||||||
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
|
<q-btn
|
||||||
|
icon="mdi-arrow-left"
|
||||||
|
unelevated
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
color="primary"
|
||||||
|
class="q-mr-sm"
|
||||||
|
@click="router.go(-1)"
|
||||||
|
/>
|
||||||
|
รายละเอียดงานที่ได้รับมอบหมายของ {{ name }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<q-card bordered class="row col-12 text-dark">
|
||||||
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||||
|
<div class="q-pl-sm text-weight-bold text-subtitle2">{{ name }}</div>
|
||||||
|
<q-space />
|
||||||
|
<q-btn outline color="blue" dense icon-right="mdi-open-in-new" class="q-px-sm" label="ดูข้อมูลทะเบียนประวัติ" />
|
||||||
|
</div>
|
||||||
|
<div class="col-12"><q-separator/></div>
|
||||||
|
<div class="row col-12 q-pa-md">
|
||||||
|
<div class="col-12 row bg-white q-col-gutter-md">
|
||||||
|
<div class="col-xs-3 col-sm-2 col-md-1 row ">
|
||||||
|
<q-img src="@/assets/avatar_user.jpg" />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6 col-sm-3 row items-center">
|
||||||
|
<div class="col-12 q-pl-md">
|
||||||
|
<div class="col-12 text-top">ตำแหน่งในสายงาน</div>
|
||||||
|
<div class="col-12 text-detail">{{position}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6 col-sm-2 row items-center">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="col-12 text-top">ระดับ</div>
|
||||||
|
<div class="col-12 text-detail">{{level}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6 col-sm-3 row items-center">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="col-12 text-top">สังกัด</div>
|
||||||
|
<div class="col-12 text-detail">{{institution}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6 col-sm-3 row items-center">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="col-12 text-top">สถานะการทดลองงาน</div>
|
||||||
|
<div class="col-12 text-detail">
|
||||||
|
<q-icon size="20px" v-if="status == 'อยู่ระหว่างการทดลองงาน'" name="mdi-timer-sand" color="deep-orange" />
|
||||||
|
<q-icon size="20px" v-else-if="status == 'ไม่ผ่านการทดลอง'" name="mdi-close" color="red" />
|
||||||
|
<q-icon size="20px" v-else name="mdi-check" color="teal" />
|
||||||
|
{{ status }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
||||||
|
<div class="row q-col-gutter-sm">
|
||||||
|
<div class="row col-12 q-col-gutter-sm">
|
||||||
|
<div>
|
||||||
|
<q-btn @click="clickAdd()" size="12px" flat round color="add" icon="mdi-plus">
|
||||||
|
<q-tooltip>เพิ่มงานที่ได้รับมอบหมาย</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
<q-space />
|
||||||
|
<div>
|
||||||
|
<q-btn flat round color="blue" icon="mdi-file-download-outline">
|
||||||
|
<q-tooltip> ดาวน์โหลด .Docx</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
<q-input
|
||||||
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
|
standout
|
||||||
|
dense
|
||||||
|
v-model="filterKeyword"
|
||||||
|
ref="filterRef"
|
||||||
|
outlined
|
||||||
|
debounce="300"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||||
|
<q-icon
|
||||||
|
v-if="filterKeyword !== ''"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click="resetFilter"
|
||||||
|
/>
|
||||||
|
</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"
|
||||||
|
options-cover
|
||||||
|
style="min-width: 150px"
|
||||||
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-table
|
||||||
|
ref="table"
|
||||||
|
:columns="columns"
|
||||||
|
:rows="rows"
|
||||||
|
:filter="filterKeyword"
|
||||||
|
row-key="Order"
|
||||||
|
flat
|
||||||
|
bordered
|
||||||
|
:paging="true"
|
||||||
|
dense
|
||||||
|
class="custom-header-table"
|
||||||
|
v-bind="attrs"
|
||||||
|
:visible-columns="visibleColumns"
|
||||||
|
:pagination-label="paginationLabel"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
>
|
||||||
|
<template v-slot:header="props">
|
||||||
|
<q-tr :props="props">
|
||||||
|
<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" 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 }}
|
||||||
|
</div>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<template v-slot:pagination="scope">
|
||||||
|
<q-pagination
|
||||||
|
v-model="pagination.page"
|
||||||
|
active-color="primary"
|
||||||
|
color="dark"
|
||||||
|
:max="scope.pagesNumber"
|
||||||
|
:max-pages="5"
|
||||||
|
size="sm"
|
||||||
|
boundary-links
|
||||||
|
direction-links
|
||||||
|
></q-pagination>
|
||||||
|
</template>
|
||||||
|
</q-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import { ref, useAttrs } from "vue";
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
|
import type { FormProbationDetail } from "@/modules/05_placement/interface/request/Main";
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const name = ref<string>('นายสมคิด ยอดใจ')
|
||||||
|
const position = ref<string>('นักจัดการงานทั่วไป')
|
||||||
|
const level = ref<string>('ชำนาญการพิเศษ')
|
||||||
|
const institution = ref<string>('ฝ่ายบริหารงานทั่วไป')
|
||||||
|
const status = ref<string>('อยู่ระหว่างการทดลองงาน')
|
||||||
|
|
||||||
|
const pagination = ref({
|
||||||
|
sortBy: "desc",
|
||||||
|
descending: false,
|
||||||
|
page: 1,
|
||||||
|
rowsPerPage: 10,
|
||||||
|
});
|
||||||
|
|
||||||
|
const visibleColumns = ref<string[]>([
|
||||||
|
"no",
|
||||||
|
"startDate",
|
||||||
|
"endDete",
|
||||||
|
"intendant",
|
||||||
|
"commander",
|
||||||
|
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||||
|
|
||||||
|
// หัวตาราง
|
||||||
|
const columns = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "no",
|
||||||
|
align: "left",
|
||||||
|
label: "ลำดับ",
|
||||||
|
sortable: true,
|
||||||
|
field: "no",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "startDate",
|
||||||
|
align: "left",
|
||||||
|
label: "ตั้งแต่วันที่",
|
||||||
|
sortable: true,
|
||||||
|
field: "startDate",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "endDete",
|
||||||
|
align: "left",
|
||||||
|
label: "ถึงวันที่",
|
||||||
|
sortable: true,
|
||||||
|
field: "endDete",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "intendant",
|
||||||
|
align: "left",
|
||||||
|
label: "ผู้ดูแล",
|
||||||
|
sortable: true,
|
||||||
|
field: "intendant",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "commander",
|
||||||
|
align: "left",
|
||||||
|
label: "ผู้บังคับบัญชา",
|
||||||
|
sortable: true,
|
||||||
|
field: "commander",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
// ข้อมูลตาราง (จำลอง)
|
||||||
|
const rows = ref<FormProbationDetail[]>([
|
||||||
|
{
|
||||||
|
no: "1",
|
||||||
|
startDate: "09 ก.ย. 2566",
|
||||||
|
endDete: "20 ต.ค. 2566",
|
||||||
|
intendant: "นางสาวรัชภรณ์ ภักดี",
|
||||||
|
commander: "นายนภัทร วันดี"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
no: "2",
|
||||||
|
startDate: "09 ก.ย. 2566",
|
||||||
|
endDete: "20 ต.ค. 2566",
|
||||||
|
intendant: "นางสาวทวิดา กมลเวชชี",
|
||||||
|
commander: "นางพิศ โพธิ์ดำ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
no: "3",
|
||||||
|
startDate: "09 ก.ย. 2566",
|
||||||
|
endDete: "20 ต.ค. 2566",
|
||||||
|
intendant: "นางสาวทวิดา กมลเวชชี",
|
||||||
|
commander: "นายนภัทร วันดี"
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const clickAdd = () => {
|
||||||
|
};
|
||||||
|
|
||||||
|
// ค้นหาในตาราง
|
||||||
|
const filterKeyword = ref<string>("");
|
||||||
|
const filterRef = ref<any>(null);
|
||||||
|
const resetFilter = () => {
|
||||||
|
filterKeyword.value = "";
|
||||||
|
filterRef.value.focus();
|
||||||
|
};
|
||||||
|
|
||||||
|
const attrs = ref<any>(useAttrs());
|
||||||
|
|
||||||
|
const paging = ref<boolean>(true);
|
||||||
|
const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
|
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||||
|
else return start + "-" + end + " ใน " + total;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scope>
|
||||||
|
.q-img {
|
||||||
|
border-radius: 5px;
|
||||||
|
height: 70px;
|
||||||
|
}
|
||||||
|
.text-top{
|
||||||
|
color: gray;
|
||||||
|
font-weight: 400;
|
||||||
|
padding-bottom: 3px;
|
||||||
|
}
|
||||||
|
.text-detail{
|
||||||
|
font-weight: 500;
|
||||||
|
|
||||||
|
}
|
||||||
|
.custom-header-table {
|
||||||
|
max-height: 64vh;
|
||||||
|
|
||||||
|
.q-table tr:nth-child(odd) td {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-table tr:nth-child(even) td {
|
||||||
|
background: #f8f8f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-table thead tr {
|
||||||
|
background: #ecebeb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-table thead tr th {
|
||||||
|
position: sticky;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* this will be the loading indicator */
|
||||||
|
.q-table thead tr:last-child th {
|
||||||
|
/* height of all previous header rows */
|
||||||
|
top: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-table thead tr:first-child th {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -23,5 +23,32 @@ interface FormOrderPlacementMainData {
|
||||||
OrderType: string;
|
OrderType: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface FormMainProbation {
|
||||||
|
no: string;
|
||||||
|
name: string;
|
||||||
|
position: string;
|
||||||
|
level: string;
|
||||||
|
institution: string;
|
||||||
|
time: string;
|
||||||
|
status: string;
|
||||||
|
orderNum: string;
|
||||||
|
}
|
||||||
|
interface FormMainProbation2 {
|
||||||
|
no: string;
|
||||||
|
name: string;
|
||||||
|
position: string;
|
||||||
|
level: string;
|
||||||
|
institution: string;
|
||||||
|
}
|
||||||
|
interface FormProbationDetail {
|
||||||
|
no: string;
|
||||||
|
startDate: string;
|
||||||
|
endDete: string;
|
||||||
|
intendant: string;
|
||||||
|
commander: string;
|
||||||
|
}
|
||||||
export type { FormPlacementMainData };
|
export type { FormPlacementMainData };
|
||||||
export type { FormOrderPlacementMainData };
|
export type { FormOrderPlacementMainData };
|
||||||
|
export type { FormMainProbation };
|
||||||
|
export type { FormMainProbation2 };
|
||||||
|
export type { FormProbationDetail };
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,11 @@ const detailOrderReplace = () =>
|
||||||
import(
|
import(
|
||||||
"@/modules/05_placement/components/OrderPlacement/detailOrderPlacement.vue"
|
"@/modules/05_placement/components/OrderPlacement/detailOrderPlacement.vue"
|
||||||
);
|
);
|
||||||
|
const mainProbation = () =>
|
||||||
|
import("@/modules/05_placement/components/probation/MainProbation.vue");
|
||||||
|
|
||||||
|
const probationDetail = () =>
|
||||||
|
import("@/modules/05_placement/components/probation/ProbationDetail.vue");
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
path: "/placement",
|
path: "/placement",
|
||||||
|
|
@ -82,4 +86,24 @@ export default [
|
||||||
Role: "placement",
|
Role: "placement",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/probation",
|
||||||
|
name: "probation",
|
||||||
|
component: mainProbation,
|
||||||
|
meta: {
|
||||||
|
Auth: true,
|
||||||
|
Key: [6.3],
|
||||||
|
Role: "placement",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/probation/detail/:id",
|
||||||
|
name: "probationDetail",
|
||||||
|
component: probationDetail,
|
||||||
|
meta: {
|
||||||
|
Auth: true,
|
||||||
|
Key: [6.3],
|
||||||
|
Role: "placement",
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,16 @@
|
||||||
/**
|
/**
|
||||||
* Router ระบบทะเบียนประวัติลูกจ้าง (registryEmployee)
|
* Router ระบบทะเบียนประวัติลูกจ้าง (registryEmployee)
|
||||||
*/
|
*/
|
||||||
|
import { defineAsyncComponent } from "vue";
|
||||||
|
|
||||||
const Main = () => import("@/modules/08_registryEmployee/views/Main.vue");
|
// const Main = () => import("@/modules/08_registryEmployee/views/Main.vue");
|
||||||
// const Detail = () =>
|
// const Detail = () => import("@/modules/08_registryEmployee/views/Detail.vue");
|
||||||
// import("@/modules/08_registryEmployee/components/Profile.vue");
|
const Main = defineAsyncComponent(
|
||||||
|
() => import("@/modules/08_registryEmployee/views/Main.vue")
|
||||||
|
);
|
||||||
|
const Detail = defineAsyncComponent(
|
||||||
|
() => import("@/modules/08_registryEmployee/views/Detail.vue")
|
||||||
|
);
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
|
|
@ -23,8 +29,18 @@ export default [
|
||||||
// component: Detail,
|
// component: Detail,
|
||||||
// meta: {
|
// meta: {
|
||||||
// Auth: true,
|
// Auth: true,
|
||||||
// Key: [9],
|
// Key: [10],
|
||||||
// Role: "registryEmployeeDetails",
|
// Role: "registryEmployeeDetails",
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
|
{
|
||||||
|
path: "/registryEmployee/add",
|
||||||
|
name: "registryEmployeeAdd",
|
||||||
|
component: Detail,
|
||||||
|
meta: {
|
||||||
|
Auth: true,
|
||||||
|
Key: [11],
|
||||||
|
Role: "registryEmployee",
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
1012
src/modules/08_registryEmployee/views/Detail.vue
Normal file
1012
src/modules/08_registryEmployee/views/Detail.vue
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -166,10 +166,10 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import router from "@/router";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import type { QInput, QForm } from "quasar";
|
import type { QInput, QForm } from "quasar";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -188,6 +188,7 @@ const $q = useQuasar();
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const { dialogMessage, messageError, showLoader, hideLoader } = mixin;
|
const { dialogMessage, messageError, showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
const myForm = ref<QForm>();
|
const myForm = ref<QForm>();
|
||||||
const filterRef = ref<QInput>();
|
const filterRef = ref<QInput>();
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
|
|
@ -489,6 +490,10 @@ onMounted(async () => {
|
||||||
await nodeTree();
|
await nodeTree();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const next = (id: string) => {
|
||||||
|
router.push(`/registryEmployee/${id}`);
|
||||||
|
};
|
||||||
|
|
||||||
const paginationLabel = (start: number, end: number, total: number) => {
|
const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
// if (props.paging == true)
|
// if (props.paging == true)
|
||||||
// return " " + start + " ใน " + end + " จากจำนวน " + total + " รายการ";
|
// return " " + start + " ใน " + end + " จากจำนวน " + total + " รายการ";
|
||||||
|
|
@ -529,7 +534,10 @@ const clickClose = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const clickAdd = () => {
|
const clickAdd = () => {
|
||||||
router.push({ name: "" });
|
// modal.value = true;
|
||||||
|
|
||||||
|
router.push(`/registryEmployee/add`);
|
||||||
|
// router.push(`/placement/detail`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const clickDelete = (id: string) => {
|
const clickDelete = (id: string) => {
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ const options = ref<optionType[]>([
|
||||||
* ให้แสดง แทปด้านขวา เมื่อเข้าหน้า รายละเอียดทะเบียนประวัติ
|
* ให้แสดง แทปด้านขวา เมื่อเข้าหน้า รายละเอียดทะเบียนประวัติ
|
||||||
*/
|
*/
|
||||||
const tabScroll = () => {
|
const tabScroll = () => {
|
||||||
return route.name == "registryDetail";
|
return route.name == "registryDetail" || route.name == "registryEmployeeAdd";
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -96,8 +96,11 @@ const toggleBtnLeft = () => {
|
||||||
*/
|
*/
|
||||||
const onScroll = (scroll: ScrollType) => {
|
const onScroll = (scroll: ScrollType) => {
|
||||||
const { position } = scroll;
|
const { position } = scroll;
|
||||||
updateScroll(position);
|
if (route.name == "PlacementPersonalDetail") {
|
||||||
updateScrollPlacement(position);
|
updateScrollPlacement(position);
|
||||||
|
} else {
|
||||||
|
updateScroll(position);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -154,7 +157,10 @@ const updateScroll = (position: number) => {
|
||||||
* ให้แสดง แทปด้านขวา เมื่อเข้าหน้า รายละเอียดทะเบียนประวัติ และ rightActive เท่ากับ true
|
* ให้แสดง แทปด้านขวา เมื่อเข้าหน้า รายละเอียดทะเบียนประวัติ และ rightActive เท่ากับ true
|
||||||
*/
|
*/
|
||||||
const activeBtn = () => {
|
const activeBtn = () => {
|
||||||
return route.name == "registryDetail" && rightActive.value;
|
return (
|
||||||
|
(route.name == "registryDetail" || route.name == "registryEmployeeAdd") &&
|
||||||
|
rightActive.value
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -218,6 +224,9 @@ const myEventHandler = (e: any, setSCroll: boolean) => {
|
||||||
*/
|
*/
|
||||||
const activeMenu = (path: string) => {
|
const activeMenu = (path: string) => {
|
||||||
if (path == "dashboard" && route.fullPath == "/") return true;
|
if (path == "dashboard" && route.fullPath == "/") return true;
|
||||||
|
|
||||||
|
if (path == "registry" && route.fullPath.includes("registryEmployee"))
|
||||||
|
return false;
|
||||||
const bool = route.fullPath.includes(path);
|
const bool = route.fullPath.includes(path);
|
||||||
return bool;
|
return bool;
|
||||||
};
|
};
|
||||||
|
|
@ -780,9 +789,9 @@ if (keycloak.tokenParsed != null) {
|
||||||
<!-- เมนูปกติ -->
|
<!-- เมนูปกติ -->
|
||||||
<q-item
|
<q-item
|
||||||
class="text-weight-medium menu"
|
class="text-weight-medium menu"
|
||||||
|
:active="activeMenu(menuItem.path)"
|
||||||
active-class="text-primary active-item text-weight-bold menuActive"
|
active-class="text-primary active-item text-weight-bold menuActive"
|
||||||
:to="{ name: `${menuItem.path}` }"
|
:to="{ name: `${menuItem.path}` }"
|
||||||
:active="activeMenu(menuItem.path)"
|
|
||||||
clickable
|
clickable
|
||||||
v-ripple
|
v-ripple
|
||||||
dense
|
dense
|
||||||
|
|
@ -898,7 +907,8 @@ if (keycloak.tokenParsed != null) {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.menuSub .q-item__section--avatar, .menu .q-item__section--avatar{
|
.menuSub .q-item__section--avatar,
|
||||||
|
.menu .q-item__section--avatar {
|
||||||
min-width: 0px;
|
min-width: 0px;
|
||||||
}
|
}
|
||||||
.menu {
|
.menu {
|
||||||
|
|
@ -927,11 +937,11 @@ if (keycloak.tokenParsed != null) {
|
||||||
/* .menuSubAct {
|
/* .menuSubAct {
|
||||||
background: #1e2529d9;
|
background: #1e2529d9;
|
||||||
} */
|
} */
|
||||||
.expan2 .menuSubHover{
|
.expan2 .menuSubHover {
|
||||||
padding-left: 30%;
|
padding-left: 30%;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
.menuSubHover{
|
.menuSubHover {
|
||||||
padding-left: 25%;
|
padding-left: 25%;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
|
|
@ -1005,7 +1015,7 @@ if (keycloak.tokenParsed != null) {
|
||||||
background-color: #a8bbbf;
|
background-color: #a8bbbf;
|
||||||
}
|
}
|
||||||
|
|
||||||
.q-card__actions .q-btn--rectangle{
|
.q-card__actions .q-btn--rectangle {
|
||||||
padding: 0 14px !important;
|
padding: 0 14px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue