แก้ฟอร์ม ลา
This commit is contained in:
parent
418a80b523
commit
b1fd996cb8
3 changed files with 16 additions and 9 deletions
|
|
@ -250,9 +250,9 @@ async function fetchDetailLeave(paramsId: string) {
|
||||||
data.leaveLastStart && date2Thai(data.leaveLastEnd);
|
data.leaveLastStart && date2Thai(data.leaveLastEnd);
|
||||||
formData.leaveTotal = data.leaveTotal;
|
formData.leaveTotal = data.leaveTotal;
|
||||||
formData.leavebirthDate =
|
formData.leavebirthDate =
|
||||||
data.leavebirthDate && date2Thai(data.leavebirthDate);
|
data.leaveBirthDate && date2Thai(data.leaveBirthDate);
|
||||||
formData.leavegovernmentDate =
|
formData.leavegovernmentDate =
|
||||||
data.leavegovernmentDate && date2Thai(data.leavegovernmentDate);
|
data.leaveGovernmentDate && date2Thai(data.leaveGovernmentDate);
|
||||||
formData.leaveSalary = data.leaveSalary;
|
formData.leaveSalary = data.leaveSalary;
|
||||||
formData.leaveSalaryText = data.leaveSalaryText;
|
formData.leaveSalaryText = data.leaveSalaryText;
|
||||||
formData.leaveTypeDay =
|
formData.leaveTypeDay =
|
||||||
|
|
@ -323,7 +323,7 @@ async function fectOptionType() {
|
||||||
.get(config.API.leaveType())
|
.get(config.API.leaveType())
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
leaveType.value = res.data.result;
|
leaveType.value = res.data.result;
|
||||||
checkLeaveType(formData.leaveTypeId, formData.leaveTypeName);
|
checkLeaveType(formData.leaveTypeId, formData.leaveSubTypeName);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -348,15 +348,22 @@ function checkLeaveType(leaveTypeId: string, leaveTypeName: string) {
|
||||||
checkForm.value = "FormChildbirth";
|
checkForm.value = "FormChildbirth";
|
||||||
} else if (type === "LV-005") {
|
} else if (type === "LV-005") {
|
||||||
checkForm.value = "FormHoliday";
|
checkForm.value = "FormHoliday";
|
||||||
} else if (type === "LV-006") {
|
} else if (type === "LV-006" && formData.leaveSubTypeName === "ลาอุปสมบท") {
|
||||||
checkForm.value = "FormUpasom";
|
checkForm.value = "FormUpasom";
|
||||||
} else if (type === "LV-006" && leaveTypeName === "พิธีฮัจญ์ฯ") {
|
} else if (
|
||||||
|
type === "LV-006" &&
|
||||||
|
formData.leaveSubTypeName === "ลาประกอบพิธีฮัจญ์"
|
||||||
|
) {
|
||||||
checkForm.value = "FormHajj";
|
checkForm.value = "FormHajj";
|
||||||
} else if (type === "LV-007") {
|
} else if (type === "LV-007") {
|
||||||
checkForm.value = "FormCheckSelect";
|
checkForm.value = "FormCheckSelect";
|
||||||
} else if (type === "LV-008" && leaveTypeName === "ลาไปศีกษา") {
|
} else if (type === "LV-008" && formData.leaveSubTypeName === "ศึกษาต่อ") {
|
||||||
checkForm.value = "FormStudy";
|
checkForm.value = "FormStudy";
|
||||||
} else if (type === "LV-008") {
|
} else if (
|
||||||
|
(type === "LV-008" && formData.leaveSubTypeName === "ฝึกอบรม") ||
|
||||||
|
(type === "LV-008" && formData.leaveSubTypeName === "ปฎิบัติการวิจัย") ||
|
||||||
|
(type === "LV-008" && formData.leaveSubTypeName === "ดูงาน")
|
||||||
|
) {
|
||||||
checkForm.value = "FormLeaveToTraining";
|
checkForm.value = "FormLeaveToTraining";
|
||||||
} else if (type === "LV-009") {
|
} else if (type === "LV-009") {
|
||||||
checkForm.value = "FormLeaveToWorkInternational";
|
checkForm.value = "FormLeaveToWorkInternational";
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ function convertDateToEng(dataThia: string) {
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col text-grey-8">เงินเดือนปัจจุบัน</div>
|
<div class="col text-grey-8">เงินเดือนปัจจุบัน</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
{{ props.data.leaveSalary }} ({{ props.data.leaveSalaryText }})
|
{{ props.data.leaveSalary.toLocaleString() }} ({{ props.data.leaveSalaryText }})
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ function convertDateToEng(dataThia: string) {
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col text-grey-8">เงินเดือนปัจจุบัน</div>
|
<div class="col text-grey-8">เงินเดือนปัจจุบัน</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
{{ props.data.leaveSalary }} ({{ props.data.leaveSalaryText }})
|
{{ props.data.leaveSalary.toLocaleString() }} ({{ props.data.leaveSalaryText }})
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue