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