รายการแต่งตั้ง-เลื่อน-ย้าย
This commit is contained in:
parent
64ac1b507a
commit
4c0df4ed71
3 changed files with 85 additions and 48 deletions
|
|
@ -250,12 +250,12 @@ const menuList = readonly<any[]>([
|
||||||
path: "appoint-promote",
|
path: "appoint-promote",
|
||||||
role: "placement",
|
role: "placement",
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
key: 6.9,
|
// key: 6.9,
|
||||||
label: "รายการย้าย" /* */,
|
// label: "รายการย้าย" /* */,
|
||||||
path: "relocation",
|
// path: "relocation",
|
||||||
role: "placement",
|
// role: "placement",
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
key: 6.1,
|
key: 6.1,
|
||||||
label: "รายการอื่นๆ" /* */,
|
label: "รายการอื่นๆ" /* */,
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ const fecthlistappointment = async () => {
|
||||||
rows.value = response.map((e: any) => ({
|
rows.value = response.map((e: any) => ({
|
||||||
personalId: e.id,
|
personalId: e.id,
|
||||||
citizenId: e.citizenId,
|
citizenId: e.citizenId,
|
||||||
fullname: e.prefix+e.firstname + " " + e.lastname,
|
fullname: e.prefix + e.firstname + " " + e.lastname,
|
||||||
organizationName:
|
organizationName:
|
||||||
e.organizationName +
|
e.organizationName +
|
||||||
" " +
|
" " +
|
||||||
|
|
@ -107,12 +107,17 @@ const fecthlistappointment = async () => {
|
||||||
positionNumber: e.positionNumber,
|
positionNumber: e.positionNumber,
|
||||||
positionPath: e.positionPath,
|
positionPath: e.positionPath,
|
||||||
status: status(e.status),
|
status: status(e.status),
|
||||||
createdAt:date2Thai(e.createdAt),
|
createdAt: date2Thai(e.createdAt),
|
||||||
|
|
||||||
birthday: e.dateOfBirth == null ? "-" : date2Thai(e.dateOfBirth),
|
birthday: e.dateOfBirth == null ? "-" : date2Thai(e.dateOfBirth),
|
||||||
}));
|
}));
|
||||||
// console.log(rows.value);
|
// console.log(rows.value);
|
||||||
rows2.value = rows.value.filter((e: any) => e.orgName !== null && e.status !== 'ส่งรายชื่อไปออกคำสั่ง'&& e.status !== 'ออกคำสั่งเสร็จแล้ว');
|
rows2.value = rows.value.filter(
|
||||||
|
(e: any) =>
|
||||||
|
e.orgName !== null &&
|
||||||
|
e.status !== "ส่งรายชื่อไปออกคำสั่ง" &&
|
||||||
|
e.status !== "ออกคำสั่งเสร็จแล้ว"
|
||||||
|
);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.log(typeof e);
|
console.log(typeof e);
|
||||||
|
|
@ -127,7 +132,10 @@ const fecthTypeOption = async () => {
|
||||||
.get(config.API.typeOrder())
|
.get(config.API.typeOrder())
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
optionsType.value = res.data.result.filter(
|
optionsType.value = res.data.result.filter(
|
||||||
(e: any) => e.commandCode === "C-PM-05" || e.commandCode === "C-PM-06"
|
(e: any) =>
|
||||||
|
e.commandCode === "C-PM-05" ||
|
||||||
|
e.commandCode === "C-PM-06" ||
|
||||||
|
e.commandCode === "C-PM-07"
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -173,7 +181,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "organizationName",
|
field: "organizationName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "birthday",
|
name: "birthday",
|
||||||
|
|
@ -252,7 +259,6 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const openModalTree = (id: string) => {
|
const openModalTree = (id: string) => {
|
||||||
|
|
@ -279,35 +285,64 @@ const deleteAppoint = async (id: string) => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const clickAddlist = () => {
|
const clickAddlist = () => {
|
||||||
dialogConfirm($q, () => createdAppoint());
|
dialogConfirm($q, () => createdAppoint());
|
||||||
};
|
};
|
||||||
const createdAppoint = async () => {
|
const createdAppoint = async () => {
|
||||||
let pId: string[] = [];
|
if (type.value == "c6de09ef-c1f8-4a39-aa31-c7ed88df01d9") {
|
||||||
selected.value.forEach((e: any) => {
|
let pId: string[] = [];
|
||||||
pId.push(e.personalId);
|
selected.value.forEach((e: any) => {
|
||||||
});
|
pId.push(e.personalId);
|
||||||
let data = {
|
|
||||||
id: pId,
|
|
||||||
};
|
|
||||||
console.log(data);
|
|
||||||
showLoader();
|
|
||||||
await http
|
|
||||||
.put(config.API.apppointmentReport(type.value), data)
|
|
||||||
.then((res: any) => {
|
|
||||||
console.log(res);
|
|
||||||
success($q, "บันทึกสำเร็จ");
|
|
||||||
})
|
|
||||||
.catch((e: any) => {
|
|
||||||
console.log(e);
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
fecthlistappointment();
|
|
||||||
selected.value = [];
|
|
||||||
modal.value = false;
|
|
||||||
});
|
});
|
||||||
|
let data = {
|
||||||
|
id: pId,
|
||||||
|
};
|
||||||
|
console.log(data);
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.post(config.API.relocationMainReport(), data)
|
||||||
|
.then((res: any) => {
|
||||||
|
console.log(res);
|
||||||
|
success($q, "บันทึกสำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.log(e);
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(async () => {
|
||||||
|
hideLoader();
|
||||||
|
fecthlistappointment();
|
||||||
|
selected.value = [];
|
||||||
|
modal.value = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let pId: string[] = [];
|
||||||
|
selected.value.forEach((e: any) => {
|
||||||
|
pId.push(e.personalId);
|
||||||
|
});
|
||||||
|
let data = {
|
||||||
|
id: pId,
|
||||||
|
};
|
||||||
|
console.log(data);
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.put(config.API.apppointmentReport(type.value), data)
|
||||||
|
.then((res: any) => {
|
||||||
|
console.log(res);
|
||||||
|
success($q, "บันทึกสำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((e: any) => {
|
||||||
|
console.log(e);
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
fecthlistappointment();
|
||||||
|
selected.value = [];
|
||||||
|
modal.value = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const closeModalTree = async () => {
|
const closeModalTree = async () => {
|
||||||
|
|
@ -340,11 +375,10 @@ const pagination = ref({
|
||||||
page: 1,
|
page: 1,
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
รายการแต่งตั้ง-เลื่อน
|
รายการแต่งตั้ง-เลื่อน-ย้าย
|
||||||
</div>
|
</div>
|
||||||
<q-card flat bordered class="col-12 q-mt-sm">
|
<q-card flat bordered class="col-12 q-mt-sm">
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
@ -363,7 +397,7 @@ const pagination = ref({
|
||||||
color="add"
|
color="add"
|
||||||
icon="mdi-account-arrow-right"
|
icon="mdi-account-arrow-right"
|
||||||
>
|
>
|
||||||
<q-tooltip>ส่งไปออกคำสั่งแต่งตั้ง-เลื่อน</q-tooltip>
|
<q-tooltip>ส่งไปออกคำสั่งแต่งตั้ง-เลื่อน-ย้าย</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
@ -413,7 +447,6 @@ const pagination = ref({
|
||||||
row-key="citizenId"
|
row-key="citizenId"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
|
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
|
@ -503,7 +536,10 @@ const pagination = ref({
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="props.row.status !== 'ส่งรายชื่อไปออกคำสั่ง' && props.row.status !== 'ออกคำสั่งแล้ว'"
|
v-if="
|
||||||
|
props.row.status !== 'ส่งรายชื่อไปออกคำสั่ง' &&
|
||||||
|
props.row.status !== 'ออกคำสั่งแล้ว'
|
||||||
|
"
|
||||||
icon="mdi-dots-vertical"
|
icon="mdi-dots-vertical"
|
||||||
size="12px"
|
size="12px"
|
||||||
color="grey-7"
|
color="grey-7"
|
||||||
|
|
@ -532,9 +568,7 @@ const pagination = ref({
|
||||||
name="mdi-bookmark-outline"
|
name="mdi-bookmark-outline"
|
||||||
/>
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section
|
<q-item-section>เลือกหน่วยงาน/ตำแหน่ง</q-item-section>
|
||||||
>เลือกหน่วยงาน/ตำแหน่ง</q-item-section
|
|
||||||
>
|
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item
|
<q-item
|
||||||
clickable
|
clickable
|
||||||
|
|
@ -565,7 +599,10 @@ const pagination = ref({
|
||||||
|
|
||||||
<q-dialog v-model="modal">
|
<q-dialog v-model="modal">
|
||||||
<q-card style="width: 1200px; max-width: 80vw">
|
<q-card style="width: 1200px; max-width: 80vw">
|
||||||
<DialogHeader title="ส่งไปรายการแต่งตั้ง - เลื่อน" :close="clickClose" />
|
<DialogHeader
|
||||||
|
title="ส่งไปรายการแต่งตั้ง - เลื่อน - ย้าย"
|
||||||
|
:close="clickClose"
|
||||||
|
/>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section class="q-pt-none">
|
<q-card-section class="q-pt-none">
|
||||||
<div class="row justify-between">
|
<div class="row justify-between">
|
||||||
|
|
@ -576,7 +613,7 @@ const pagination = ref({
|
||||||
dense
|
dense
|
||||||
v-model="type"
|
v-model="type"
|
||||||
:options="optionsType"
|
:options="optionsType"
|
||||||
label="คำสั่งแต่งตั่ง - เลื่อน"
|
label="คำสั่งแต่งตั่ง - เลื่อน - ย้าย"
|
||||||
style="width: 400px; max-width: auto"
|
style="width: 400px; max-width: auto"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ const fecthlistOthet = async () => {
|
||||||
fullname: `${r.prefix ?? ""} ${r.firstname ?? ""} ${r.lastname ?? ""}`,
|
fullname: `${r.prefix ?? ""} ${r.firstname ?? ""} ${r.lastname ?? ""}`,
|
||||||
}));
|
}));
|
||||||
console.log(rows.value);
|
console.log(rows.value);
|
||||||
rows2.value = rows.value.filter((e: any) => e.orgName !== null);
|
rows2.value = rows.value.filter((e: any) => e.orgName !== null && e.status !== 'REPORT'&& e.status !== 'DONE');
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q);
|
messageError($q);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue