รายชื่อผู้สอบในรอบ => วันที่รายงานตัว
This commit is contained in:
parent
f3d8aac352
commit
6df41b9881
3 changed files with 133 additions and 3 deletions
|
|
@ -60,6 +60,8 @@ export default {
|
||||||
// clear Position
|
// clear Position
|
||||||
clearPosition: (personalId: string) =>
|
clearPosition: (personalId: string) =>
|
||||||
`${placement}/position/clear/${personalId}`,
|
`${placement}/position/clear/${personalId}`,
|
||||||
|
clearDate: (personalId: string) =>
|
||||||
|
`${placement}/date/update/${personalId}`,
|
||||||
// Document
|
// Document
|
||||||
documentByid: (personalId: string) => `${placement}/doc/${personalId}`,
|
documentByid: (personalId: string) => `${placement}/doc/${personalId}`,
|
||||||
documentDelid: (personalId: string, docid: string) =>
|
documentDelid: (personalId: string, docid: string) =>
|
||||||
|
|
|
||||||
|
|
@ -198,11 +198,13 @@ async function fetchPosFind(level: number, id: string) {
|
||||||
.post(config.API.orgPosFind, body)
|
.post(config.API.orgPosFind, body)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
expanded.value = data;
|
expanded.value = data;
|
||||||
nodeId.value = id;
|
nodeId.value = id;
|
||||||
positionId.value = props?.dataRow?.posmasterId;
|
positionId.value = props?.dataRow?.posmasterId;
|
||||||
seletcId.value = props?.dataRow?.positionId;
|
seletcId.value = props?.dataRow?.positionId;
|
||||||
datePos.value = props?.dataRow?.reportingDateFullDate;
|
datePos.value = props?.dataRow?.reportingDate;
|
||||||
|
|
||||||
fetchDataTable(nodeId.value, level);
|
fetchDataTable(nodeId.value, level);
|
||||||
})
|
})
|
||||||
|
|
@ -277,7 +279,10 @@ watch(
|
||||||
async () => {
|
async () => {
|
||||||
if (modal.value) {
|
if (modal.value) {
|
||||||
await fetchOrganizationActive();
|
await fetchOrganizationActive();
|
||||||
|
console.log(props?.dataRow);
|
||||||
|
|
||||||
if (props?.dataRow?.node !== null && props?.dataRow?.nodeId !== null) {
|
if (props?.dataRow?.node !== null && props?.dataRow?.nodeId !== null) {
|
||||||
|
|
||||||
await fetchPosFind(props?.dataRow?.node, props?.dataRow?.nodeId);
|
await fetchPosFind(props?.dataRow?.node, props?.dataRow?.nodeId);
|
||||||
} else {
|
} else {
|
||||||
expanded.value = [];
|
expanded.value = [];
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,7 @@ const {
|
||||||
dateText,
|
dateText,
|
||||||
success,
|
success,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
|
date2Thai,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
@ -363,7 +364,10 @@ async function getTable() {
|
||||||
: rowsAll.value.filter((x: any) => x.statusId !== "CONTAIN"));
|
: rowsAll.value.filter((x: any) => x.statusId !== "CONTAIN"));
|
||||||
// รายชื่อไปยังหน่วยงาน
|
// รายชื่อไปยังหน่วยงาน
|
||||||
rowsFilter.value = await rows.value.filter(
|
rowsFilter.value = await rows.value.filter(
|
||||||
(e: any) => e.draft == "รอส่งตัว"
|
(e: any) =>
|
||||||
|
e.draft == "รอส่งตัว" &&
|
||||||
|
e.nodeName !== null &&
|
||||||
|
e.reportingDate !== null
|
||||||
);
|
);
|
||||||
|
|
||||||
insertAvatar(rows.value);
|
insertAvatar(rows.value);
|
||||||
|
|
@ -621,6 +625,7 @@ async function clickClose() {
|
||||||
modalDefermentDisclaim.value = false;
|
modalDefermentDisclaim.value = false;
|
||||||
modalwaitInfo.value = false;
|
modalwaitInfo.value = false;
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
|
modalDate.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -699,6 +704,35 @@ function onRestorePos(id: string) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const modalDate = ref<boolean>(false);
|
||||||
|
const reportingDate = ref<Date | null>(null);
|
||||||
|
const rowId = ref<string>("");
|
||||||
|
function onSelectDate(id: string, date: Date) {
|
||||||
|
modalDate.value = true;
|
||||||
|
rowId.value = id;
|
||||||
|
reportingDate.value = date;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onSubmitDate() {
|
||||||
|
dialogConfirm($q, () => {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.put(config.API.clearDate(rowId.value), { date: reportingDate.value })
|
||||||
|
.then(() => {
|
||||||
|
getTable();
|
||||||
|
props.statCard();
|
||||||
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
modalDate.value = false;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(async () => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
if (keycloak.tokenParsed != null) {
|
if (keycloak.tokenParsed != null) {
|
||||||
roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1");
|
roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1");
|
||||||
|
|
@ -897,7 +931,35 @@ onMounted(async () => {
|
||||||
v-if="
|
v-if="
|
||||||
roleAdmin &&
|
roleAdmin &&
|
||||||
props.row.draft === 'รอส่งตัว' &&
|
props.row.draft === 'รอส่งตัว' &&
|
||||||
props.row.orgName !== null
|
props.row.nodeName !== null
|
||||||
|
"
|
||||||
|
clickable
|
||||||
|
v-close-popup
|
||||||
|
@click="
|
||||||
|
onSelectDate(
|
||||||
|
props.row.personalId,
|
||||||
|
props.row.reportingDate
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<q-item-section
|
||||||
|
style="min-width: 0px"
|
||||||
|
avatar
|
||||||
|
class="q-py-sm"
|
||||||
|
>
|
||||||
|
<q-icon
|
||||||
|
color="blue-7"
|
||||||
|
size="xs"
|
||||||
|
name="mdi-calendar-account"
|
||||||
|
/>
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section>เลือกวันรายงานตัว</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
<q-item
|
||||||
|
v-if="
|
||||||
|
roleAdmin &&
|
||||||
|
props.row.draft === 'รอส่งตัว' &&
|
||||||
|
props.row.nodeName !== null
|
||||||
"
|
"
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
|
|
@ -1443,6 +1505,67 @@ onMounted(async () => {
|
||||||
:fetchStatCard="statCard"
|
:fetchStatCard="statCard"
|
||||||
:typeCommand="typeCommand"
|
:typeCommand="typeCommand"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- dialog วันรายงานตัว-->
|
||||||
|
<q-dialog v-model="modalDate" persistent>
|
||||||
|
<q-card style="width: 500px; max-width: 300px">
|
||||||
|
<q-form
|
||||||
|
ref="myForm"
|
||||||
|
greedy
|
||||||
|
@submit.prevent
|
||||||
|
@validation-success="onSubmitDate"
|
||||||
|
>
|
||||||
|
<DialogHeader :tittle="`เลือกวันรายงานตัว`" :close="clickClose" />
|
||||||
|
<q-separator />
|
||||||
|
<q-card-section class="q-p-sm">
|
||||||
|
<datepicker
|
||||||
|
menu-class-name="modalfix"
|
||||||
|
v-model="reportingDate"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
borderless
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
:min-date="new Date()"
|
||||||
|
>
|
||||||
|
<template #year="{ year }">
|
||||||
|
{{ year + 543 }}
|
||||||
|
</template>
|
||||||
|
<template #year-overlay-value="{ value }">
|
||||||
|
{{ parseInt(value + 543) }}
|
||||||
|
</template>
|
||||||
|
<template #trigger>
|
||||||
|
<q-input
|
||||||
|
ref="dateRef"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
hide-bottom-space
|
||||||
|
:model-value="
|
||||||
|
reportingDate != null ? date2Thai(reportingDate) : null
|
||||||
|
"
|
||||||
|
label="วันที่รายงานตัว"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</template>
|
||||||
|
</datepicker>
|
||||||
|
</q-card-section>
|
||||||
|
<q-separator />
|
||||||
|
<q-card-actions align="right">
|
||||||
|
<q-btn label="บันทึก" color="secondary" type="submit"
|
||||||
|
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</q-card-actions>
|
||||||
|
</q-form>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue