ปรับโหลด
This commit is contained in:
parent
83f176bc5e
commit
ee9891275f
2 changed files with 9 additions and 12 deletions
|
|
@ -34,7 +34,7 @@ const profileId = ref<string>(route.params.id.toString());
|
||||||
/**
|
/**
|
||||||
* props
|
* props
|
||||||
*/
|
*/
|
||||||
const isLeave = defineModel<boolean>("isLeave", {
|
const isLeave = defineModel<boolean>("isLeave", {
|
||||||
required: true,
|
required: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -96,9 +96,9 @@ const formData = reactive<FormEmployment>({
|
||||||
});
|
});
|
||||||
|
|
||||||
/** function fetch ข้อมูลรายการการจ้าง*/
|
/** function fetch ข้อมูลรายการการจ้าง*/
|
||||||
function fetchListEmployment() {
|
async function fetchListEmployment() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(config.API.employmentEmployee(profileId.value))
|
.get(config.API.employmentEmployee(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
@ -170,10 +170,9 @@ function onSubmit() {
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
})
|
||||||
|
.finally(() => {});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -275,7 +274,6 @@ onMounted(() => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns?.slice(0, 2)"
|
:options="columns?.slice(0, 2)"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -474,7 +472,6 @@ onMounted(() => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -217,9 +217,9 @@ const docOption = ref<DataOption2[]>(store.optionTemplateDoc);
|
||||||
/**
|
/**
|
||||||
* function fetch รายการ ตำแหน่งเงินเดือน
|
* function fetch รายการ ตำแหน่งเงินเดือน
|
||||||
*/
|
*/
|
||||||
function fetchListSalary() {
|
async function fetchListSalary() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(config.API.profileListSalaryNew(profileId.value, empType.value))
|
.get(config.API.profileListSalaryNew(profileId.value, empType.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
rows.value = res.data.result;
|
rows.value = res.data.result;
|
||||||
|
|
@ -448,13 +448,13 @@ function onSubmit() {
|
||||||
: config.API.profileSalaryNew(empType.value);
|
: config.API.profileSalaryNew(empType.value);
|
||||||
const method = isStatusEdit.value ? "patch" : "post";
|
const method = isStatusEdit.value ? "patch" : "post";
|
||||||
await http[method](url, formData);
|
await http[method](url, formData);
|
||||||
|
await onClickCloseDialog();
|
||||||
await fetchListSalary();
|
await fetchListSalary();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
await onClickCloseDialog();
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
hideLoader()
|
||||||
} finally {
|
} finally {
|
||||||
hideLoader();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue