no message
This commit is contained in:
parent
b31c3b847c
commit
c99fa4493c
3 changed files with 42 additions and 36 deletions
|
|
@ -62,9 +62,9 @@ function onClickPopupHistory() {
|
||||||
/** function NextToStep*/
|
/** function NextToStep*/
|
||||||
async function onCilckNextStep() {
|
async function onCilckNextStep() {
|
||||||
const functionCreateDoc: (() => Promise<void>) | null =
|
const functionCreateDoc: (() => Promise<void>) | null =
|
||||||
// store.step === 1
|
store.step === 1
|
||||||
// ? await saveStep1
|
? await saveStep1
|
||||||
// :
|
:
|
||||||
store.step === 3
|
store.step === 3
|
||||||
? await saveStep3
|
? await saveStep3
|
||||||
: store.step === 7
|
: store.step === 7
|
||||||
|
|
@ -231,6 +231,7 @@ async function updateCheckSpec(data: FormSpec) {
|
||||||
*/
|
*/
|
||||||
function updateFormDetail(data: any) {
|
function updateFormDetail(data: any) {
|
||||||
formDetail.value = data;
|
formDetail.value = data;
|
||||||
|
console.log("🚀 ~ updateFormDetail ~ data:", data)
|
||||||
}
|
}
|
||||||
/** function เช็คการการคุณสมบัติ*/
|
/** function เช็คการการคุณสมบัติ*/
|
||||||
function checkSelectForm() {
|
function checkSelectForm() {
|
||||||
|
|
@ -267,7 +268,7 @@ async function saveStep1() {
|
||||||
country: e.country,
|
country: e.country,
|
||||||
degree: e.degree,
|
degree: e.degree,
|
||||||
duration: e.duration,
|
duration: e.duration,
|
||||||
durationYear: e.durationYear.toString(),
|
durationYear: e.durationYear,
|
||||||
educationLevel: e.educationLevel,
|
educationLevel: e.educationLevel,
|
||||||
endDate: e.endDate,
|
endDate: e.endDate,
|
||||||
field: e.field,
|
field: e.field,
|
||||||
|
|
|
||||||
|
|
@ -75,11 +75,13 @@ async function fetchDetail() {
|
||||||
formDetail.citizenId = data.citizenId;
|
formDetail.citizenId = data.citizenId;
|
||||||
formDetail.prefix = data.prefix;
|
formDetail.prefix = data.prefix;
|
||||||
formDetail.fullName = `${data.firstName} ${data.lastName}`;
|
formDetail.fullName = `${data.firstName} ${data.lastName}`;
|
||||||
|
formDetail.firstName = data.firstName
|
||||||
|
formDetail.lastName = data.lastName
|
||||||
formDetail.position = data.position;
|
formDetail.position = data.position;
|
||||||
formDetail.oc = data.rootShortName;
|
formDetail.oc = data.rootShortName;
|
||||||
formDetail.positionLevel = data.posLevelName;
|
formDetail.positionLevel = data.posLevelName;
|
||||||
formDetail.posNo = data.rootShortName + data.posMasterNo;
|
formDetail.posNo = data.rootShortName + data.posMasterNo;
|
||||||
formDetail.birthDate = data.birthDate && date2Thai(data.birthDate);
|
formDetail.birthDate = data.birthDate
|
||||||
formDetail.govAge = data.govAge; // ยังไม่มี
|
formDetail.govAge = data.govAge; // ยังไม่มี
|
||||||
|
|
||||||
http.get(config.API.dataUserEducations).then((res) => {
|
http.get(config.API.dataUserEducations).then((res) => {
|
||||||
|
|
@ -91,8 +93,8 @@ async function fetchDetail() {
|
||||||
(e: CertificatesForm) => ({
|
(e: CertificatesForm) => ({
|
||||||
certificateNo: e.certificateNo,
|
certificateNo: e.certificateNo,
|
||||||
certificateType: e.certificateType,
|
certificateType: e.certificateType,
|
||||||
expireDate: date2Thai(e.expireDate),
|
expireDate: e.expireDate,
|
||||||
issueDate: date2Thai(e.issueDate),
|
issueDate: e.issueDate,
|
||||||
issuer: e.issuer,
|
issuer: e.issuer,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
@ -101,35 +103,28 @@ async function fetchDetail() {
|
||||||
http.get(config.API.dataUserSalary).then((res) => {
|
http.get(config.API.dataUserSalary).then((res) => {
|
||||||
formDetail.salaries = res.data.result.map((e: any) => ({
|
formDetail.salaries = res.data.result.map((e: any) => ({
|
||||||
amount: e.amount,
|
amount: e.amount,
|
||||||
date: date2Thai(e.date),
|
date: e.date,
|
||||||
mouthSalaryAmount: e.mouthSalaryAmount ? e.mouthSalaryAmount : 0,
|
mouthSalaryAmount: e.mouthSalaryAmount ? e.mouthSalaryAmount : 0,
|
||||||
posNo: e.posNo,
|
posNo: e.posNo,
|
||||||
position: e.position,
|
position: e.position,
|
||||||
positionSalaryAmount: e.positionSalaryAmount
|
positionSalaryAmount: e.positionSalaryAmount
|
||||||
? e.positionSalaryAmount
|
? e.positionSalaryAmount
|
||||||
: 0,
|
: 0,
|
||||||
refCommandDate: e.refCommandDate ? e.refCommandDate : "",
|
refCommandDate: e.refCommandDate,
|
||||||
|
|
||||||
refCommandNo: e.refCommandNo ? e.refCommandNo : "",
|
refCommandNo: e.refCommandNo,
|
||||||
salaryClass: e.salaryClass ? e.salaryClass : "",
|
salaryClass: e.salaryClass,
|
||||||
salaryRef: e.salaryRef ? e.salaryRef : "",
|
salaryRef: e.salaryRef,
|
||||||
salaryStatus: e.salaryStatus ? e.salariesStatus : "",
|
salaryStatus: e.salaryStatus,
|
||||||
//
|
//
|
||||||
oc: "",//ไม่มี
|
oc: "",//ไม่มี
|
||||||
lineWork: e.positionLine ? e.positionLine : "-",
|
lineWork: e.positionLine,
|
||||||
side: e.positionPathSide ? e.positionPathSide : "-",
|
side: e.positionPathSide,
|
||||||
positionType: e.positionType ? e.positionType : "-",
|
positionType: e.positionType,
|
||||||
level: e.positionLevel ? e.positionLevel : "-",
|
level: e.positionLevel,
|
||||||
positionsAdministrative: e.positionExecutive
|
positionsAdministrative: e.positionExecutive,
|
||||||
? e.positionExecutive
|
|
||||||
: "-",
|
|
||||||
aspectAdministrative: "",//ไม่มี
|
aspectAdministrative: "",//ไม่มี
|
||||||
}));
|
}));
|
||||||
console.log(
|
|
||||||
"🚀 ~ formDetail.salaries=res.data.result.map ~ formDetail.salaries:",
|
|
||||||
formDetail.salaries
|
|
||||||
);
|
|
||||||
|
|
||||||
formDetail.salary = formDetail.salaries
|
formDetail.salary = formDetail.salaries
|
||||||
? formattedNumber(
|
? formattedNumber(
|
||||||
formDetail.salaries[formDetail.salaries.length - 1].amount
|
formDetail.salaries[formDetail.salaries.length - 1].amount
|
||||||
|
|
@ -139,20 +134,20 @@ async function fetchDetail() {
|
||||||
|
|
||||||
http.get(config.API.dataUserCertificate("training")).then((res) => {
|
http.get(config.API.dataUserCertificate("training")).then((res) => {
|
||||||
formDetail.trainings = res.data.result.map((e: any) => ({
|
formDetail.trainings = res.data.result.map((e: any) => ({
|
||||||
dateOrder: date2Thai(e.dateOrder),
|
dateOrder: e.dateOrder,
|
||||||
department: e.department,
|
department: e.department,
|
||||||
duration: e.duration,
|
duration: e.duration,
|
||||||
endDate: date2Thai(e.endDate),
|
endDate: e.endDate,
|
||||||
name: e.name,
|
name: e.name,
|
||||||
numberOrder: e.numberOrder,
|
numberOrder: e.numberOrder,
|
||||||
place: e.place,
|
place: e.place,
|
||||||
startDate: date2Thai(e.startDate),
|
startDate: e.startDate,
|
||||||
topic: e.topic,
|
topic: e.topic,
|
||||||
yearly: e.yearly,
|
yearly: e.yearly,
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
// formDetail.assessments = data.assessments;
|
// formDetail.assessments = data.assessments;
|
||||||
emit("update:formDeital", data);
|
emit("update:formDeital", formDetail);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -178,7 +173,7 @@ async function fetchCheckSpec(data: any) {
|
||||||
formDetail.salary = data.salary ? formattedNumber(data.salary) : "";
|
formDetail.salary = data.salary ? formattedNumber(data.salary) : "";
|
||||||
formDetail.positionLevel = data.positionLevel;
|
formDetail.positionLevel = data.positionLevel;
|
||||||
formDetail.posNo = data.posNo;
|
formDetail.posNo = data.posNo;
|
||||||
formDetail.birthDate = data.birthDate && date2Thai(data.birthDate);
|
formDetail.birthDate = data.birthDate
|
||||||
formDetail.educations = data.educations;
|
formDetail.educations = data.educations;
|
||||||
|
|
||||||
formDetail.certificates = data.certificates.map((e: CertificatesForm) => ({
|
formDetail.certificates = data.certificates.map((e: CertificatesForm) => ({
|
||||||
|
|
@ -190,7 +185,7 @@ async function fetchCheckSpec(data: any) {
|
||||||
}));
|
}));
|
||||||
formDetail.salaries = data.salaries.map((e: any) => ({
|
formDetail.salaries = data.salaries.map((e: any) => ({
|
||||||
amount: e.amount,
|
amount: e.amount,
|
||||||
date: date2Thai(e.date),
|
date: e.date,
|
||||||
mouthSalaryAmount: e.mouthSalaryAmount ? e.mouthSalaryAmount : 0,
|
mouthSalaryAmount: e.mouthSalaryAmount ? e.mouthSalaryAmount : 0,
|
||||||
posNo: e.posNo,
|
posNo: e.posNo,
|
||||||
position: e.position,
|
position: e.position,
|
||||||
|
|
@ -297,7 +292,7 @@ onMounted(async () => {
|
||||||
<div class="col-xs-6 col-sm-4 col-md-3">
|
<div class="col-xs-6 col-sm-4 col-md-3">
|
||||||
<q-input
|
<q-input
|
||||||
borderless
|
borderless
|
||||||
:model-value="formDetail.birthDate"
|
:model-value="formDetail.birthDate ? date2Thai(formDetail.birthDate):'-'"
|
||||||
readonly
|
readonly
|
||||||
label="วันเดือนปีเกิด"
|
label="วันเดือนปีเกิด"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,13 @@ import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
||||||
/** columns TableViewStep1*/
|
/** columns TableViewStep1*/
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const { date2Thai } = mixin;
|
||||||
|
|
||||||
const columnsCertificates = ref<QTableProps["columns"]>([
|
const columnsCertificates = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "certificateType",
|
name: "certificateType",
|
||||||
|
|
@ -38,7 +42,7 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "วันที่ออกใบอนุญาต",
|
label: "วันที่ออกใบอนุญาต",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "issueDate",
|
field: (value) => date2Thai(value),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -47,7 +51,7 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "วันที่หมดอายุ",
|
label: "วันที่หมดอายุ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "expireDate",
|
field: (value) => date2Thai(value),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -60,6 +64,9 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
||||||
label: "วัน เดือน ปี",
|
label: "วัน เดือน ปี",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "date",
|
field: "date",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(row.date)
|
||||||
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -170,7 +177,7 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "วันเริ่มต้นการฝึกอบรม/ดูงาน",
|
label: "วันเริ่มต้นการฝึกอบรม/ดูงาน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "startDate",
|
field: (value) => date2Thai(value),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -179,7 +186,7 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "วันสิ้นสุดการฝึกอบรม/ดูงาน",
|
label: "วันสิ้นสุดการฝึกอบรม/ดูงาน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "endDate",
|
field: (value) => date2Thai(value),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -189,6 +196,9 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
||||||
label: "ปีที่อบรม/ดูงาน",
|
label: "ปีที่อบรม/ดูงาน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "yearly",
|
field: "yearly",
|
||||||
|
format(val, row) {
|
||||||
|
return row.yearly + 543
|
||||||
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue