อัตรากำลังลูกจ้างประจำ ฯ => fix bug
This commit is contained in:
parent
df481043b1
commit
722794a27e
5 changed files with 49 additions and 29 deletions
|
|
@ -841,7 +841,10 @@ async function emitSearch(keyword: string, typeSelect: string) {
|
||||||
icon="mdi-dots-horizontal-circle-outline"
|
icon="mdi-dots-horizontal-circle-outline"
|
||||||
round
|
round
|
||||||
>
|
>
|
||||||
<q-menu anchor="bottom middle" self="top middle">
|
<q-menu
|
||||||
|
transition-show="jump-down"
|
||||||
|
transition-hide="jump-up"
|
||||||
|
>
|
||||||
<q-list
|
<q-list
|
||||||
dense
|
dense
|
||||||
v-for="(item, index) in listMenu"
|
v-for="(item, index) in listMenu"
|
||||||
|
|
@ -858,7 +861,10 @@ async function emitSearch(keyword: string, typeSelect: string) {
|
||||||
: deletePos(props.row.id)
|
: deletePos(props.row.id)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-item-section avatar>
|
<q-item-section
|
||||||
|
avatar
|
||||||
|
style="min-width: 0px"
|
||||||
|
>
|
||||||
<q-icon
|
<q-icon
|
||||||
:color="item.color"
|
:color="item.color"
|
||||||
:name="item.icon"
|
:name="item.icon"
|
||||||
|
|
|
||||||
|
|
@ -223,9 +223,13 @@ function onSubmit() {
|
||||||
? config.API.orgPosMasterEmp
|
? config.API.orgPosMasterEmp
|
||||||
: config.API.orgPosMasterByIdEmp(props.rowId);
|
: config.API.orgPosMasterByIdEmp(props.rowId);
|
||||||
await http[props.actionType === "ADD" ? "post" : "put"](url, body);
|
await http[props.actionType === "ADD" ? "post" : "put"](url, body);
|
||||||
success($q, "บันทีกข้อมูลสำเร็จ");
|
await props.getSummary?.();
|
||||||
props.getSummary?.();
|
await props.fetchDataTable?.(
|
||||||
props.fetchDataTable?.(reqMaster.value.id, reqMaster.value.type, false);
|
reqMaster.value.id,
|
||||||
|
reqMaster.value.type,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
await success($q, "บันทีกข้อมูลสำเร็จ");
|
||||||
close();
|
close();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -296,9 +300,9 @@ function deletePos(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.delete(config.API.orgEmployeePosById(id))
|
.delete(config.API.orgEmployeePosById(id))
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
await searchInput();
|
||||||
searchInput();
|
await success($q, "ลบข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -629,11 +633,14 @@ watch(
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
icon="mdi-dots-vertical"
|
color="secondary"
|
||||||
class="q-pa-none q-ml-xs"
|
icon="mdi-dots-horizontal-circle-outline"
|
||||||
color="grey-13"
|
round
|
||||||
>
|
>
|
||||||
<q-menu anchor="bottom middle" self="top middle">
|
<q-menu
|
||||||
|
transition-show="jump-down"
|
||||||
|
transition-hide="jump-up"
|
||||||
|
>
|
||||||
<q-list
|
<q-list
|
||||||
dense
|
dense
|
||||||
v-for="(item, index) in listMenu"
|
v-for="(item, index) in listMenu"
|
||||||
|
|
@ -650,11 +657,14 @@ watch(
|
||||||
: deletePos(props.row.id)
|
: deletePos(props.row.id)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-item-section avatar>
|
<q-item-section
|
||||||
|
avatar
|
||||||
|
style="min-width: 0px"
|
||||||
|
>
|
||||||
<q-icon
|
<q-icon
|
||||||
:color="item.color"
|
:color="item.color"
|
||||||
:name="item.icon"
|
:name="item.icon"
|
||||||
size="sm"
|
size="xs"
|
||||||
/>
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>{{
|
<q-item-section>{{
|
||||||
|
|
|
||||||
|
|
@ -123,10 +123,10 @@ function onClickMovePos() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.orgPosMoveEmp, body)
|
.post(config.API.orgPosMoveEmp, body)
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
props.fetchDataTree?.(store.activeId);
|
await props.fetchDataTree?.(store.activeId);
|
||||||
|
await success($q, "ย้ายตำแหน่งสำเร็จ");
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
success($q, "ย้ายตำแหน่งสำเร็จ");
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
|
||||||
|
|
@ -279,10 +279,10 @@ function onSubmit() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.post(config.API.orgProfileEmp, body)
|
.post(config.API.orgProfileEmp, body)
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
props.fetchDataTable?.(store.treeId, store.level, false);
|
await props.fetchDataTable?.(store.treeId, store.level, false);
|
||||||
props.getSummary();
|
await props.getSummary();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
|
||||||
|
|
@ -193,10 +193,14 @@ function onClickDelete(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.orgPosMasterByIdEmp(id))
|
.delete(config.API.orgPosMasterByIdEmp(id))
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
|
await props.fetchDataTable?.(
|
||||||
|
reqMaster.value.id,
|
||||||
|
reqMaster.value.type,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
await getSummary();
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
success($q, "ลบข้อมูลสำเร็จ");
|
||||||
props.fetchDataTable?.(reqMaster.value.id, reqMaster.value.type, false);
|
|
||||||
getSummary();
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -262,14 +266,14 @@ function removePerson(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.orgDeleteProfileEmp(id))
|
.post(config.API.orgDeleteProfileEmp(id))
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
await props.fetchDataTable?.(
|
||||||
props.fetchDataTable?.(
|
|
||||||
reqMaster.value.id,
|
reqMaster.value.id,
|
||||||
reqMaster.value.type,
|
reqMaster.value.type,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
getSummary();
|
await getSummary();
|
||||||
|
await success($q, "ลบข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue