รายชื่อลูกจ้างชั่วคราว
This commit is contained in:
parent
ee8138a576
commit
b9f8be8dc0
5 changed files with 22 additions and 26 deletions
|
|
@ -216,19 +216,17 @@ function calculateMaxDate() {
|
|||
}
|
||||
|
||||
function onSubmit() {
|
||||
dialogConfirm($q, () => {
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.post(config.API.registryNew("-employee"), formData)
|
||||
.then(() => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
props.fetchData?.();
|
||||
.then(async () => {
|
||||
await props.fetchData?.();
|
||||
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
closeDialog();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -378,9 +378,9 @@ async function onClickSubmit() {
|
|||
|
||||
await http
|
||||
.put(config.API.positionEmployee(props?.dataRow?.id), body)
|
||||
.then(() => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
props.fetchData?.();
|
||||
.then(async () => {
|
||||
await props.fetchData?.();
|
||||
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
closePopup();
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
|
|||
|
|
@ -182,10 +182,10 @@ function onClickSendOrder() {
|
|||
};
|
||||
http
|
||||
.post(config.API.orgProfileReport, data)
|
||||
.then(() => {
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
.then(async() => {
|
||||
await props?.fetchData?.();
|
||||
await success($q, "บันทึกสำเร็จ");
|
||||
closeDialog();
|
||||
props?.fetchData?.();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
|
|||
|
|
@ -258,16 +258,16 @@ const sendToCommand = async () => {
|
|||
showLoader();
|
||||
await http
|
||||
.post(config.API.organizationEmployeeSendOrder, data)
|
||||
.then((res: any) => {
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
.then(async () => {
|
||||
await props.fetchNewList();
|
||||
await success($q, "บันทึกสำเร็จ");
|
||||
props.closeDialog();
|
||||
selected.value = [];
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
props.fetchNewList();
|
||||
props.closeDialog();
|
||||
selected.value = [];
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ watch(
|
|||
function fetchList() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.registryNew("-employee"), { params: queryParams })
|
||||
.get(config.API.registryNew("-temp"), { params: queryParams })
|
||||
.then((res) => {
|
||||
maxPage.value = Math.ceil(res.data.result.total / queryParams.pageSize);
|
||||
total.value = res.data.result.total;
|
||||
|
|
@ -233,18 +233,16 @@ function fetchList() {
|
|||
}
|
||||
|
||||
function onClickDelete(id: string) {
|
||||
dialogRemove($q, () => {
|
||||
dialogRemove($q, async () => {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.delete(config.API.registryNew("-employee") + `/${id}`)
|
||||
.then(() => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
fetchList();
|
||||
.then(async () => {
|
||||
await fetchList();
|
||||
await success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue