no message
This commit is contained in:
parent
b31c3b847c
commit
c99fa4493c
3 changed files with 42 additions and 36 deletions
|
|
@ -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="วันเดือนปีเกิด"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue