รายการออกคำสั่งย้ายสับเปลี่ยนตำแหน่ง (รอ API)
This commit is contained in:
parent
49bb827226
commit
aad0d88867
5 changed files with 69 additions and 94 deletions
|
|
@ -92,4 +92,6 @@ export default {
|
||||||
|
|
||||||
//
|
//
|
||||||
orgCheckAvatar: (id: string) => `${orgProfile}/avatar/profileId/${id}`,
|
orgCheckAvatar: (id: string) => `${orgProfile}/avatar/profileId/${id}`,
|
||||||
|
|
||||||
|
changePosition: `${organization}/placement/change-position`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -175,4 +175,7 @@ export default {
|
||||||
appointEmployeeOrder: (typeId: string) =>
|
appointEmployeeOrder: (typeId: string) =>
|
||||||
`${placement}/appointment/temp/report/${typeId}`,
|
`${placement}/appointment/temp/report/${typeId}`,
|
||||||
apppointmentPositionUse: () => `${placement}/appointment/temp/use`,
|
apppointmentPositionUse: () => `${placement}/appointment/temp/use`,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -26,20 +26,19 @@ function close() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
// dialogConfirm($q, () => {
|
dialogConfirm($q, () => {
|
||||||
// const url = editCheck.value
|
const url = editCheck.value
|
||||||
// ? config.API.
|
? config.API.changePosition+`/${idRound.value}`
|
||||||
// : config.API.;
|
: config.API.changePosition;
|
||||||
|
|
||||||
// http[editCheck.value ? "put" : "post"](url, {
|
http[editCheck.value ? "put" : "post"](url, {
|
||||||
// id: editCheck.value ? idRound : undefined,
|
name: round.value,
|
||||||
// round: round.value,
|
}).then((res) => {
|
||||||
// }).then((res) => {
|
close();
|
||||||
// close();
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
// success($q, "บันทึกข้อมูลสำเร็จ");
|
props.getData?.();
|
||||||
// props.getData?.();
|
});
|
||||||
// });
|
});
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -54,13 +53,14 @@ function onSubmit() {
|
||||||
:close="close"
|
:close="close"
|
||||||
/>
|
/>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section>
|
<q-card-section class="q-pa-sm">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
:model-value="round"
|
v-model="round"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
hide-bottom-space
|
||||||
class="inputgreen"
|
class="inputgreen"
|
||||||
label="ชื่อรอบการย้ายสับเปลี่ยนตำแหน่ง"
|
label="ชื่อรอบการย้ายสับเปลี่ยนตำแหน่ง"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อรอบการย้ายสับเปลี่ยนตำแหน่ง'}`,]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อรอบการย้ายสับเปลี่ยนตำแหน่ง'}`,]"
|
||||||
|
|
|
||||||
|
|
@ -111,37 +111,19 @@ const sendToCommand = () => {
|
||||||
|
|
||||||
//ดึงข้อมูล API
|
//ดึงข้อมูล API
|
||||||
const fecthLists = async () => {
|
const fecthLists = async () => {
|
||||||
// showLoader();
|
showLoader();
|
||||||
// rows.value = [];
|
rows.value = [];
|
||||||
// await http
|
await http
|
||||||
// .get(config.API.appointmentMain())
|
.get(config.API.changePosition)
|
||||||
// .then((res) => {
|
.then((res) => {
|
||||||
// let response = res.data.result;
|
rows.value = res.data.result;
|
||||||
// listRecevice.value = response;
|
})
|
||||||
// rows.value = response;
|
.catch((e) => {
|
||||||
// rows2.value = rows.value.filter(
|
messageError($q, e);
|
||||||
// (e: any) => e.status !== "REPORT" && e.status !== "DONE"
|
})
|
||||||
// );
|
.finally(() => {
|
||||||
// })
|
hideLoader();
|
||||||
// .catch((e) => {
|
});
|
||||||
// messageError($q, e);
|
|
||||||
// })
|
|
||||||
// .finally(() => {
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
|
|
||||||
rows.value = [
|
|
||||||
{
|
|
||||||
id: "08dc86c2-98a5-45f0-8e37-3502a4eb78c0",
|
|
||||||
name: "ย้ายสับเปลี่ยนตำแหน่งทุกเขต",
|
|
||||||
status: "WAITTING",
|
|
||||||
createdAt: "2024-06-07T14:22:31.985829",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
rows2.value = rows.value.filter(
|
|
||||||
(e: any) => e.status !== "REPORT" && e.status !== "DONE"
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// dialog สำหรับแก้ไข
|
// dialog สำหรับแก้ไข
|
||||||
|
|
@ -160,19 +142,19 @@ function addRound() {
|
||||||
//ลบข้อมูล
|
//ลบข้อมูล
|
||||||
const clickDelete = (id: string) => {
|
const clickDelete = (id: string) => {
|
||||||
dialogRemove($q, () => {
|
dialogRemove($q, () => {
|
||||||
// showLoader();
|
showLoader();
|
||||||
// http
|
http
|
||||||
// .delete(config.API.appointmentDelete(id))
|
.delete(config.API.changePosition+`/${id}`)
|
||||||
// .then(() => {
|
.then(() => {
|
||||||
// success($q, "ลบข้อมูลสำเร็จ");
|
success($q, "ลบข้อมูลสำเร็จ");
|
||||||
// })
|
})
|
||||||
// .catch((e) => {
|
.catch((e) => {
|
||||||
// messageError($q, e);
|
messageError($q, e);
|
||||||
// })
|
})
|
||||||
// .finally(() => {
|
.finally(() => {
|
||||||
// fecthLists();
|
fecthLists();
|
||||||
// hideLoader();
|
hideLoader();
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -183,23 +165,6 @@ const personalListPage = (id: string) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function onSave(data: any) {
|
|
||||||
// showLoader();
|
|
||||||
// http
|
|
||||||
// .put(config.API.appointmentPosition(personalId.value), dataAppoint)
|
|
||||||
// .then((res) => {
|
|
||||||
// modalTree.value = false;
|
|
||||||
// success($q, "บันทึกสำเร็จ");
|
|
||||||
// })
|
|
||||||
// .catch((e) => {
|
|
||||||
// messageError($q, e);
|
|
||||||
// })
|
|
||||||
// .finally(async () => {
|
|
||||||
// fecthLists();
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fecthLists();
|
fecthLists();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useTransferDataStore } from "@/modules/05_placement/store";
|
import { useTransferDataStore } from "@/modules/05_placement/store";
|
||||||
|
|
||||||
|
|
@ -13,6 +13,12 @@ import config from "@/app.config";
|
||||||
import DialogOrgSelect from "@/components/Dialogs/DialogOrgSelect.vue";
|
import DialogOrgSelect from "@/components/Dialogs/DialogOrgSelect.vue";
|
||||||
import DialogEvalute from '@/modules/05_placement/components/ChangePosition/DialogChange.vue'
|
import DialogEvalute from '@/modules/05_placement/components/ChangePosition/DialogChange.vue'
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const id = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
|
|
||||||
const modalDialog = ref<boolean>(false)
|
const modalDialog = ref<boolean>(false)
|
||||||
const posType = ref<string>("");
|
const posType = ref<string>("");
|
||||||
const posLevel = ref<string>("");
|
const posLevel = ref<string>("");
|
||||||
|
|
@ -34,7 +40,7 @@ const {
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const router = useRouter();
|
|
||||||
const rows = ref<any>([]);
|
const rows = ref<any>([]);
|
||||||
const modalTree = ref<boolean>(false);
|
const modalTree = ref<boolean>(false);
|
||||||
const personalId = ref<string>("");
|
const personalId = ref<string>("");
|
||||||
|
|
@ -144,20 +150,20 @@ const addPerson = () => {
|
||||||
|
|
||||||
//ดึงข้อมูล API
|
//ดึงข้อมูล API
|
||||||
const fecthLists = async () => {
|
const fecthLists = async () => {
|
||||||
// showLoader();
|
showLoader();
|
||||||
// rows.value = [];
|
rows.value = [];
|
||||||
// await http
|
await http
|
||||||
// .get(config.API.appointmentMain())
|
.get(config.API.changePosition+`/${id.value}`)
|
||||||
// .then((res) => {
|
.then((res) => {
|
||||||
// let response = res.data.result;
|
let response = res.data.result;
|
||||||
// rows.value = response;
|
rows.value = response;
|
||||||
// })
|
})
|
||||||
// .catch((e) => {
|
.catch((e) => {
|
||||||
// messageError($q, e);
|
messageError($q, e);
|
||||||
// })
|
})
|
||||||
// .finally(() => {
|
.finally(() => {
|
||||||
// hideLoader();
|
hideLoader();
|
||||||
// });
|
});
|
||||||
|
|
||||||
rows.value = [
|
rows.value = [
|
||||||
{
|
{
|
||||||
|
|
@ -598,8 +604,7 @@ onMounted(() => {
|
||||||
:onSubmit="onSave"
|
:onSubmit="onSave"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<DialogEvalute
|
<DialogEvalute v-model:modal="modalDialog" />
|
||||||
v-model:modal="modalDialog"/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue