updated
This commit is contained in:
parent
6bd6f99770
commit
1aff001bce
2 changed files with 107 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue