ออกคำสั่ง 21
This commit is contained in:
parent
81ca5ade12
commit
bf53fbc7d2
2 changed files with 21 additions and 33 deletions
|
|
@ -812,6 +812,7 @@ onMounted(async () => {
|
||||||
: formDetail.prefix ?? ""
|
: formDetail.prefix ?? ""
|
||||||
}${formDetail.firstName} ${formDetail.lastName}`
|
}${formDetail.firstName} ${formDetail.lastName}`
|
||||||
}}
|
}}
|
||||||
|
<span class="text-red"> {{ leaveReason }}</span>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import type { DataEmployee } from "@/modules/08_registryEmployee/interface/respo
|
||||||
|
|
||||||
/** importComponents*/
|
/** importComponents*/
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const {
|
const {
|
||||||
|
|
@ -164,9 +165,9 @@ const visibleColumns = ref<String[]>([
|
||||||
"statustext",
|
"statustext",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/**
|
const modalCommand = ref<boolean>(false); //สร้างคำสั่ง
|
||||||
* ฟังก์ชันยืนยันการส่งออกคำสั่ง
|
|
||||||
*/
|
/** ฟังก์ชันยืนยันการส่งออกคำสั่ง*/
|
||||||
function onClickSendOrder() {
|
function onClickSendOrder() {
|
||||||
if (selected.value.length == 0) {
|
if (selected.value.length == 0) {
|
||||||
dialogMessageNotify($q, "กรุณาเลือกคนออกคำสั่ง");
|
dialogMessageNotify($q, "กรุณาเลือกคนออกคำสั่ง");
|
||||||
|
|
@ -174,27 +175,8 @@ function onClickSendOrder() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
() => {
|
() => {
|
||||||
showLoader();
|
modalCommand.value = true;
|
||||||
let pId: string[] = [];
|
closeDialog();
|
||||||
selected.value.forEach((e: any) => {
|
|
||||||
pId.push(e.id);
|
|
||||||
});
|
|
||||||
let data = {
|
|
||||||
id: pId,
|
|
||||||
};
|
|
||||||
http
|
|
||||||
.post(config.API.orgProfileReport, data)
|
|
||||||
.then(async () => {
|
|
||||||
await props?.fetchData?.();
|
|
||||||
await success($q, "บันทึกสำเร็จ");
|
|
||||||
closeDialog();
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
messageError($q, err);
|
|
||||||
})
|
|
||||||
.finally(async () => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
"ยื่นยันการส่งรายชื่อไปออกคำสั่ง",
|
"ยื่นยันการส่งรายชื่อไปออกคำสั่ง",
|
||||||
"ต้องการยืนยันการส่งรายชื่อไปออกคำสั่งนี้หรือไม่ ?"
|
"ต้องการยืนยันการส่งรายชื่อไปออกคำสั่งนี้หรือไม่ ?"
|
||||||
|
|
@ -202,15 +184,17 @@ function onClickSendOrder() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** ฟังก์ชันดึงข้อมูลราชชื่อส่งออกคำสั่ง*/
|
||||||
* ฟังก์ชันดึงข้อมูลราชชื่อส่งออกคำสั่ง
|
|
||||||
*/
|
|
||||||
function fetchList() {
|
function fetchList() {
|
||||||
|
selected.value = [];
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.registryNew("-employee") + `/temp`)
|
.get(config.API.registryNew("-employee") + `/temp`)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
rows.value = res.data.result.data;
|
rows.value = res.data.result.data.map((e: DataEmployee) => ({
|
||||||
|
...e,
|
||||||
|
profileId: e.id,
|
||||||
|
}));
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -220,17 +204,13 @@ function fetchList() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** ฟังก์ชันปิด Popup*/
|
||||||
* ฟังก์ชันปิด Popup
|
|
||||||
*/
|
|
||||||
function closeDialog() {
|
function closeDialog() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
selected.value = [];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ทำเมื่อ modal เป็น true
|
* ทำเมื่อ modal เป็น true
|
||||||
*
|
|
||||||
* ทำการเรียก fetchList เพื่อข้อมูลราชชื่อส่งออกคำสั่ง
|
* ทำการเรียก fetchList เพื่อข้อมูลราชชื่อส่งออกคำสั่ง
|
||||||
*/
|
*/
|
||||||
watch(
|
watch(
|
||||||
|
|
@ -336,6 +316,13 @@ watch(
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
|
<!-- dialog สร้างคำสั่ง -->
|
||||||
|
<DialogCreateCommand
|
||||||
|
v-model:modal="modalCommand"
|
||||||
|
:command-type-code="'C-PM-21'"
|
||||||
|
:persons="selected"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue