UI => ส่งคนไประบบออกคำสั่ง
This commit is contained in:
parent
3ca0390b87
commit
fc75e315f5
19 changed files with 816 additions and 842 deletions
|
|
@ -9,19 +9,16 @@ import { useTransferDataStore } from "@/modules/05_placement/store";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
/**
|
||||
* importType
|
||||
*/
|
||||
/** importType*/
|
||||
import type {
|
||||
listAppointType,
|
||||
resData,
|
||||
} from "@/modules/05_placement/interface/response/AppointMent";
|
||||
import type { OpType } from "@/modules/05_placement/interface/response/Main";
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { PersonData } from "@/modules/05_placement/interface/index/Main";
|
||||
|
||||
/**
|
||||
* importComponents
|
||||
*/
|
||||
/** importComponents*/
|
||||
import Dialogbody from "@/modules/05_placement/components/AppointMent/DialogOrders.vue"; //ส่งไปออกคำสั่ง
|
||||
import DialogOrgSelect from "@/components/Dialogs/DialogOrgSelect.vue"; // เลือกหน่วยงาน
|
||||
|
||||
|
|
@ -52,11 +49,9 @@ const listRecevice = ref<resData[]>([]); //ข้อมูลรายการ
|
|||
const optionsType = ref<OpType[]>([]);
|
||||
const type = ref<string>("");
|
||||
|
||||
/**
|
||||
* Table
|
||||
*/
|
||||
const rows = ref<listAppointType[]>([]); //รายการแต่งตั้ง-เลื่อน-ย้าย
|
||||
const rows2 = ref<listAppointType[]>([]); //รายการออกคำสั่ง
|
||||
//table
|
||||
const rows = ref<PersonData[]>([]); //รายการแต่งตั้ง-เลื่อน-ย้าย
|
||||
const rows2 = ref<PersonData[]>([]); //รายการออกคำสั่ง
|
||||
const filterKeyword = ref<string>(""); //คำค้นหารายการแต่งตั้ง-เลื่อน-ย้าย
|
||||
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -159,18 +154,14 @@ const pagination = ref({
|
|||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
/**
|
||||
* รีเซ็ตคำค้นหารายการ
|
||||
*/
|
||||
/** รีเซ็ตคำค้นหารายการ*/
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
filterKeyword2.value = "";
|
||||
filterRef.value.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* fetch รายการแต่งตั้ง-เลื่อน-ย้าย
|
||||
*/
|
||||
/** fetch รายการแต่งตั้ง-เลื่อน-ย้าย*/
|
||||
async function fecthlistappointment() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -234,9 +225,7 @@ function nextPage(id: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* เปิด popup เลือกหน่วยงาน
|
||||
*/
|
||||
/** เปิด popup เลือกหน่วยงาน*/
|
||||
function openModalTree(data: any, type: string) {
|
||||
personalId.value = data.id;
|
||||
typeModal.value = type;
|
||||
|
|
@ -247,9 +236,7 @@ function openModalTree(data: any, type: string) {
|
|||
modalTree.value = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* ยืนยันการเลือกหน่วยงานที่แต่งตั้ง
|
||||
*/
|
||||
/** ยืนยันการเลือกหน่วยงานที่แต่งตั้ง*/
|
||||
function onSave(data: any) {
|
||||
const dataAppoint = {
|
||||
node: data.node,
|
||||
|
|
@ -283,24 +270,18 @@ function onSave(data: any) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* เปิด popup ส่งไปออกคำสั่ง
|
||||
*/
|
||||
/** เปิด popup ส่งไปออกคำสั่ง*/
|
||||
function sendToCommand() {
|
||||
modal.value = true;
|
||||
filterKeyword2.value = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* ปิด popup ส่งไปออกคำสั่ง
|
||||
*/
|
||||
/** ปิด popup ส่งไปออกคำสั่ง*/
|
||||
function clickClose() {
|
||||
modal.value = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* ทำงานเมื่อมีการเรียกใช้ Components
|
||||
*/
|
||||
/** ทำงานเมื่อมีการเรียกใช้ Components*/
|
||||
onMounted(() => {
|
||||
fecthlistappointment();
|
||||
});
|
||||
|
|
@ -582,9 +563,9 @@ onMounted(() => {
|
|||
v-model:type="type"
|
||||
:click-close="clickClose"
|
||||
:options-type="optionsType"
|
||||
:rows2="rows2"
|
||||
:next-page="nextPage"
|
||||
:fetch-data="fecthlistappointment"
|
||||
:rows2="rows2"
|
||||
/>
|
||||
|
||||
<DialogOrgSelect
|
||||
|
|
|
|||
|
|
@ -10,11 +10,8 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
import type {
|
||||
listAppointType,
|
||||
resData,
|
||||
} from "@/modules/05_placement/interface/response/AppointMent";
|
||||
import type { PersonData } from "@/modules/05_placement/interface/index/Main";
|
||||
import type { resData } from "@/modules/05_placement/interface/response/AppointMent";
|
||||
import type { OpType } from "@/modules/05_placement/interface/response/Main";
|
||||
|
||||
import DialogOrgSelectEmployee from "@/components/Dialogs/DialogOrgSelectEmployee.vue"; //เลือกหน่วยงาน
|
||||
|
|
@ -49,8 +46,8 @@ const optionsType = ref<OpType[]>([]);
|
|||
const type = ref<string>("");
|
||||
|
||||
// Table
|
||||
const rows = ref<listAppointType[]>([]); //รายการปรับระดับชั้นงานลูกจ้าง
|
||||
const rows2 = ref<listAppointType[]>([]); //รายการออกคำสั่ง
|
||||
const rows = ref<PersonData[]>([]); //รายการปรับระดับชั้นงานลูกจ้าง
|
||||
const rows2 = ref<PersonData[]>([]); //รายการออกคำสั่ง
|
||||
const filterKeyword = ref<string>(""); //คำค้นหารายการปรับระดับชั้นงานลูกจ้าง
|
||||
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
||||
const visibleColumns = ref<string[]>([
|
||||
|
|
@ -59,6 +56,7 @@ const visibleColumns = ref<string[]>([
|
|||
"fullname",
|
||||
"organizationName",
|
||||
"dateOfBirth",
|
||||
"typeCommand",
|
||||
"createdAt",
|
||||
"status",
|
||||
]);
|
||||
|
|
@ -114,6 +112,18 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "typeCommand",
|
||||
align: "left",
|
||||
label: "ประเภทคำสั่ง",
|
||||
sortable: true,
|
||||
field: "typeCommand",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (val: string) => {
|
||||
return val === "SLIP" ? "เลื่อน" : val === "MOVE" ? "ย้าย" : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
align: "left",
|
||||
|
|
@ -527,9 +537,9 @@ onMounted(() => {
|
|||
v-model:type="type"
|
||||
:click-close="clickClose"
|
||||
:options-type="optionsType"
|
||||
:rows2="rows2"
|
||||
:next-page="nextPage"
|
||||
:fetch-data="fecthlistappointment"
|
||||
:rows2="rows2"
|
||||
/>
|
||||
|
||||
<DialogOrgSelectEmployee
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ const {
|
|||
} = useCounterMixin();
|
||||
|
||||
const modal = ref<boolean>(false);
|
||||
const type = ref<string>("");
|
||||
const optionsType = ref<OpType[]>([]);
|
||||
|
||||
/**
|
||||
* Table
|
||||
|
|
@ -163,29 +161,6 @@ async function fecthlistOthet() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* fetch รายการข้อมูลประเภทคำสั่ง
|
||||
*/
|
||||
function fecthTypeOption() {
|
||||
showLoader();
|
||||
type.value = "";
|
||||
http
|
||||
.get(config.API.typeOrder())
|
||||
.then((res) => {
|
||||
// หาคำสั่ง เฉพาะ C-PM-08 และ C-PM-09
|
||||
optionsType.value = res.data.result.filter(
|
||||
(e: OpType) =>
|
||||
e.commandCode === "C-PM-08" || e.commandCode === "C-PM-09"
|
||||
);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* รีเซ็ตข้อมูลในช่อง input
|
||||
*/
|
||||
|
|
@ -200,9 +175,6 @@ function resetFilter() {
|
|||
function popup() {
|
||||
modal.value = true;
|
||||
filterKeyword2.value = "";
|
||||
type.value = "";
|
||||
// fetch รายการข้อมูลประเภทคำสั่ง
|
||||
fecthTypeOption();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -380,9 +352,7 @@ onMounted(() => {
|
|||
<Dialogbody
|
||||
v-model:Modal="modal"
|
||||
v-model:filter-keyword2="filterKeyword2"
|
||||
v-model:type="type"
|
||||
:click-close="clickClose"
|
||||
:options-type="optionsType"
|
||||
:rows2="rows2"
|
||||
:fecthlistOthet="fecthlistOthet"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue