This commit is contained in:
Warunee Tamkoo 2024-04-29 12:28:17 +07:00
parent 6bd6f99770
commit 1aff001bce
2 changed files with 107 additions and 4 deletions

View file

@ -46,6 +46,10 @@ const props = defineProps({
require: true,
},
fetchStatCard: { type: Function, require: true },
typeCommand: {
type: String,
require: true,
},
});
/** Tree*/
@ -137,6 +141,7 @@ async function fetchDataTable(id: string, level: number = 0) {
node: level,
nodeId: id,
position: props?.dataRow?.positionCandidate,
typeCommand: props.typeCommand,
};
await http
.post(config.API.orgPosPlacement, body)
@ -217,6 +222,7 @@ async function onClickSubmit() {
orgTreeShortName: dataNode.orgTreeShortName, //
posPath: selectedPos.value[0].positionName, //
posNumber: dataPosMaster.posMasterNo, //()
typeCommand: props.typeCommand,
};
await http

View file

@ -262,7 +262,7 @@ function convertDraft(val: boolean) {
}
}
/**เรียกข้อมูลรายชื่อผู้สอบผ่า */
/**เรียกข้อมูลรายชื่อผู้สอบผ่า */
async function getTable() {
showLoader();
await http
@ -493,8 +493,13 @@ const editDetail = (
* @param pid id personal
*/
const modalDialogSelectOrg = ref<boolean>(false);
const typeCommand = ref<string>("");
const dataRow = ref<DataList>();
function openAppointModal(pid: string, data: DataList) {
function openAppointModal(
pid: string,
data: DataList,
typeCommandVal: "APPOINTED" | "APPOINT" | "SLIP" | "MOVE"
) {
// appointModal.value = true;
// personalId.value = pid;
// personal.value = dataRes.value.filter(
@ -503,6 +508,7 @@ function openAppointModal(pid: string, data: DataList) {
// console.log(personal.value);
dataRow.value = data;
typeCommand.value = typeCommandVal;
modalDialogSelectOrg.value = !modalDialogSelectOrg.value;
}
@ -623,6 +629,7 @@ onMounted(async () => {
await getTable();
});
</script>
<template>
<q-form ref="myForm">
<Table
@ -772,7 +779,13 @@ onMounted(async () => {
"
clickable
v-close-popup
@click="openAppointModal(props.row.personalId, props.row)"
@click="
openAppointModal(
props.row.personalId,
props.row,
'APPOINTED'
)
"
>
<q-item-section
style="min-width: 0px"
@ -785,7 +798,90 @@ onMounted(async () => {
name="mdi-bookmark-outline"
/>
</q-item-section>
<q-item-section>เลอกหนวยงานทบบรรจ</q-item-section>
<q-item-section
>เลอกหนวยงานทบบรรจและแตงต</q-item-section
>
</q-item>
<q-item
v-if="
(roleAdmin && props.row.statusId === 'UN-CONTAIN') ||
(props.row.draft === 'รอส่งตัว' &&
props.row.statusId !== 'DISCLAIM')
"
clickable
v-close-popup
@click="
openAppointModal(
props.row.personalId,
props.row,
'APPOINT'
)
"
>
<q-item-section
style="min-width: 0px"
avatar
class="q-py-sm"
>
<q-icon
color="primary"
size="xs"
name="mdi-bookmark-outline"
/>
</q-item-section>
<q-item-section>เลอกหนวยงานทบแตงต</q-item-section>
</q-item>
<q-item
v-if="
(roleAdmin && props.row.statusId === 'UN-CONTAIN') ||
(props.row.draft === 'รอส่งตัว' &&
props.row.statusId !== 'DISCLAIM')
"
clickable
v-close-popup
@click="
openAppointModal(props.row.personalId, props.row, 'SLIP')
"
>
<q-item-section
style="min-width: 0px"
avatar
class="q-py-sm"
>
<q-icon
color="primary"
size="xs"
name="mdi-bookmark-outline"
/>
</q-item-section>
<q-item-section>เลอกหนวยงานทบเลอน</q-item-section>
</q-item>
<q-item
v-if="
(roleAdmin && props.row.statusId === 'UN-CONTAIN') ||
(props.row.draft === 'รอส่งตัว' &&
props.row.statusId !== 'DISCLAIM')
"
clickable
v-close-popup
@click="
openAppointModal(props.row.personalId, props.row, 'MOVE')
"
>
<q-item-section
style="min-width: 0px"
avatar
class="q-py-sm"
>
<q-icon
color="primary"
size="xs"
name="mdi-bookmark-outline"
/>
</q-item-section>
<q-item-section>เลอกหนวยงานทบยาย</q-item-section>
</q-item>
<q-separator />
@ -1231,6 +1327,7 @@ onMounted(async () => {
:dataRow="dataRow"
:fetchTable="getTable"
:fetchStatCard="statCard"
:typeCommand="typeCommand"
/>
</template>