no message
This commit is contained in:
parent
9a05bf2a24
commit
51d5f3e27e
3 changed files with 34 additions and 591 deletions
|
|
@ -8,4 +8,7 @@ export default {
|
||||||
listRoundInsignia: (type: string) => `${insignia}/period/${type}`,
|
listRoundInsignia: (type: string) => `${insignia}/period/${type}`,
|
||||||
editRoundInsignia: (id: string) => `${insignia}/period/${id}`,
|
editRoundInsignia: (id: string) => `${insignia}/period/${id}`,
|
||||||
RoundInsignia: (id: string) => `${insignia}/period/${id}`,
|
RoundInsignia: (id: string) => `${insignia}/period/${id}`,
|
||||||
|
// manage
|
||||||
|
insigniaManage: (type: string) => `${insignia}/manage/${type}`,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, useAttrs, reactive, watch } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type {
|
import type {
|
||||||
FormMainProbation,
|
FormMainProbation,
|
||||||
FormMainProbation2,
|
FormMainProbation2,
|
||||||
} from "@/modules/05_placement/interface/request/Main";
|
} from "@/modules/05_placement/interface/request/Main";
|
||||||
|
import type { DataOption1 } from "@/modules/05_placement/interface/index/Main";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
@ -12,7 +13,7 @@ import config from "@/app.config";
|
||||||
import DialogHeader from "@/modules/07_insignia/components/DialogHeader.vue";
|
import DialogHeader from "@/modules/07_insignia/components/DialogHeader.vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import type { resMain } from "@/modules/06_retirement/interface/response/Main";
|
import type { resMain } from "@/modules/06_retirement/interface/response/Main";
|
||||||
const yearOptions = reactive<any[]>([]);
|
|
||||||
import cardTop from "@/modules/07_insignia/components/2_Manage/StatCard.vue";
|
import cardTop from "@/modules/07_insignia/components/2_Manage/StatCard.vue";
|
||||||
import tab1 from "@/modules/07_insignia/components/2_Manage/Tab1.vue";
|
import tab1 from "@/modules/07_insignia/components/2_Manage/Tab1.vue";
|
||||||
import tab2 from "@/modules/07_insignia/components/2_Manage/Tab2.vue";
|
import tab2 from "@/modules/07_insignia/components/2_Manage/Tab2.vue";
|
||||||
|
|
@ -27,330 +28,12 @@ const { messageError, date2Thai, showLoader, hideLoader, dialogMessage } =
|
||||||
mixin;
|
mixin;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const $q = useQuasar(); //ใช้ noti quasar
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
const modal = ref<boolean>(false);
|
|
||||||
const pagination = ref({
|
|
||||||
sortBy: "desc",
|
|
||||||
descending: false,
|
|
||||||
page: 1,
|
|
||||||
rowsPerPage: 10,
|
|
||||||
});
|
|
||||||
const round = ref<string>("รอบการเสนอพระราชทานเครื่องราชปี 2556");
|
|
||||||
const optionRound = [
|
|
||||||
"รอบการเสนอพระราชทานเครื่องราชปี 2557",
|
|
||||||
"รอบการเสนอพระราชทานเครื่องราชปี 2558",
|
|
||||||
"รอบการเสนอพระราชทานเครื่องราชปี 2556",
|
|
||||||
];
|
|
||||||
const visibleColumns = ref<string[]>([
|
|
||||||
"no",
|
|
||||||
"citizenId",
|
|
||||||
"name",
|
|
||||||
"position",
|
|
||||||
"level",
|
|
||||||
"salary",
|
|
||||||
"organization",
|
|
||||||
"insigniaType",
|
|
||||||
"insigniaSend",
|
|
||||||
"insigniaLevel",
|
|
||||||
"dateSend",
|
|
||||||
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
|
||||||
|
|
||||||
// หัวตาราง
|
const round = ref<string>("");
|
||||||
const columns = ref<QTableProps["columns"]>([
|
|
||||||
{
|
|
||||||
name: "no",
|
|
||||||
align: "left",
|
|
||||||
label: "ลำดับ",
|
|
||||||
sortable: true,
|
|
||||||
field: "no",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "citizenId",
|
|
||||||
align: "left",
|
|
||||||
label: "เลขบัตรประชาชน",
|
|
||||||
sortable: true,
|
|
||||||
field: "citizenId",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "name",
|
|
||||||
align: "left",
|
|
||||||
label: "ชื่อ-นามสกุล",
|
|
||||||
sortable: true,
|
|
||||||
field: "name",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "position",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "position",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "level",
|
|
||||||
align: "left",
|
|
||||||
label: "อันดับ/ระดับ",
|
|
||||||
sortable: true,
|
|
||||||
field: "level",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "salary",
|
|
||||||
align: "left",
|
|
||||||
label: "เงินเดือน",
|
|
||||||
sortable: true,
|
|
||||||
field: "salary",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "organization",
|
|
||||||
align: "left",
|
|
||||||
label: "หน่วยงาน",
|
|
||||||
sortable: true,
|
|
||||||
field: "organization",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "insigniaType",
|
|
||||||
align: "left",
|
|
||||||
label: "ประเภทเครื่องราชฯ ปัจจุบัน",
|
|
||||||
sortable: true,
|
|
||||||
field: "insigniaType",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "insigniaSend",
|
|
||||||
align: "left",
|
|
||||||
label: "ประเภทเครื่องราชฯ ที่ยื่นขอ",
|
|
||||||
sortable: true,
|
|
||||||
field: "insigniaSend",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "insigniaLevel",
|
|
||||||
align: "left",
|
|
||||||
label: "ชั้นเครื่องราชฯ",
|
|
||||||
sortable: true,
|
|
||||||
field: "insigniaLevel",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "dateSend",
|
|
||||||
align: "left",
|
|
||||||
label: "วันที่ยื่นขอ",
|
|
||||||
sortable: true,
|
|
||||||
field: "dateSend",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
// ข้อมูลตาราง (จำลอง)
|
const optionRound = ref<DataOption1[]>([]);
|
||||||
const rows = ref<any[]>([
|
|
||||||
{
|
|
||||||
no: "1",
|
|
||||||
citizenId: "1xxxxxxxxxx",
|
|
||||||
name: "นายใจดี ยอดใจ ",
|
|
||||||
position: "นักวิชาการพัสดุ",
|
|
||||||
level: "1",
|
|
||||||
salary: "15000",
|
|
||||||
organization: "บริหาร",
|
|
||||||
insigniaType: "ทวีติยาภรณ์ช้างเผือก",
|
|
||||||
insigniaSend: "ตริตาภรณ์ช้างเผือก",
|
|
||||||
insigniaLevel: "ต่ำกว่าสายสะพาย",
|
|
||||||
dateSend: "31 ม.ค. 2566",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
no: "2",
|
|
||||||
citizenId: "1xxxxxxxxxx",
|
|
||||||
name: "นายจักกริน บัณฑิต",
|
|
||||||
position: "นักวิชาการพัสดุ",
|
|
||||||
level: "ปฏิบัติการ",
|
|
||||||
salary: "15000",
|
|
||||||
organization: "บริหาร",
|
|
||||||
insigniaType: "ทวีติยาภรณ์ช้างเผือก",
|
|
||||||
insigniaSend: "ตริตาภรณ์ช้างเผือก",
|
|
||||||
insigniaLevel: "ต่ำกว่าสายสะพาย",
|
|
||||||
dateSend: "31 ม.ค. 2566",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
no: "3",
|
|
||||||
citizenId: "1xxxxxxxxxx",
|
|
||||||
name: "นางสาวกัณฐิมา กาฬสินธุ์",
|
|
||||||
position: "นักจัดการงานทั่วไป",
|
|
||||||
level: "ปฏิบัติการ",
|
|
||||||
salary: "15000",
|
|
||||||
organization: "บริหาร",
|
|
||||||
insigniaType: "ทวีติยาภรณ์ช้างเผือก",
|
|
||||||
insigniaSend: "ตริตาภรณ์ช้างเผือก",
|
|
||||||
insigniaLevel: "ต่ำกว่าสายสะพาย",
|
|
||||||
dateSend: "31 ม.ค. 2566",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
no: "4",
|
|
||||||
citizenId: "1xxxxxxxxxx",
|
|
||||||
name: "นางสาวเมขลา กระจ่างมนตรี",
|
|
||||||
position: "นักจัดการงานทั่วไป",
|
|
||||||
level: "ปฏิบัติการ",
|
|
||||||
salary: "15000",
|
|
||||||
organization: "บริหาร",
|
|
||||||
insigniaType: "ทวีติยาภรณ์ช้างเผือก",
|
|
||||||
insigniaSend: "ตริตาภรณ์ช้างเผือก",
|
|
||||||
insigniaLevel: "ต่ำกว่าสายสะพาย",
|
|
||||||
dateSend: "31 ม.ค. 2566",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
// ข้อมูลตาราง (จำลอง)
|
|
||||||
const currentYear = new Date().getFullYear();
|
|
||||||
const tab = ref<any>("haveInsignia");
|
const tab = ref<any>("haveInsignia");
|
||||||
const visibleColumns2 = ref<string[]>(["no", "name", "retireNumber"]);
|
|
||||||
// หัวตาราง2
|
|
||||||
const columns2 = ref<QTableProps["columns"]>([
|
|
||||||
{
|
|
||||||
name: "no",
|
|
||||||
align: "left",
|
|
||||||
label: "ลำดับ",
|
|
||||||
sortable: true,
|
|
||||||
field: "no",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "name",
|
|
||||||
align: "left",
|
|
||||||
label: "วันที่สร้าง",
|
|
||||||
sortable: true,
|
|
||||||
field: "name",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "retireNumber",
|
|
||||||
align: "left",
|
|
||||||
label: "จำนวนผู้เกษียณ",
|
|
||||||
sortable: true,
|
|
||||||
field: "total",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
// ข้อมูลตาราง (จำลอง)
|
|
||||||
const rows2 = ref<FormMainProbation2[]>([
|
|
||||||
{
|
|
||||||
no: "1",
|
|
||||||
name: "นายใจดี ยอดใจ ",
|
|
||||||
position: "นักวิชาการพัสดุ",
|
|
||||||
level: "ปฏิบัติการ",
|
|
||||||
institution: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
no: "2",
|
|
||||||
name: "นายจักกริน บัณฑิต",
|
|
||||||
position: "นักวิชาการพัสดุ",
|
|
||||||
level: "ปฏิบัติการ",
|
|
||||||
institution: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
no: "3",
|
|
||||||
name: "นางสาวกัณฐิมา กาฬสินธุ์",
|
|
||||||
position: "นักจัดการงานทั่วไป",
|
|
||||||
level: "ปฏิบัติการ",
|
|
||||||
institution: "กลุ่มงานช่วยนักบริหาร",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
no: "4",
|
|
||||||
name: "นางสาวเมขลา กระจ่างมนตรี",
|
|
||||||
position: "นักจัดการงานทั่วไป",
|
|
||||||
level: "ปฏิบัติการ",
|
|
||||||
institution: "กลุ่มงานช่วยนักบริหาร",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
no: "5",
|
|
||||||
name: "นางสาวฐิติรัตน์ พงษ์ศิริ",
|
|
||||||
position: "นักจัดการงานทั่วไป",
|
|
||||||
level: "ปฏิบัติการ",
|
|
||||||
institution: "กลุ่มงานช่วยนักบริหาร",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const clickDelete = (id: string) => {
|
|
||||||
$q.dialog({
|
|
||||||
title: "ยืนยันการลบข้อมูล",
|
|
||||||
message: "ต้องการลบข้อมูลนี้ใช่หรือไม่?",
|
|
||||||
cancel: {
|
|
||||||
flat: true,
|
|
||||||
color: "negative",
|
|
||||||
},
|
|
||||||
persistent: true,
|
|
||||||
})
|
|
||||||
.onOk(async () => {})
|
|
||||||
.onCancel(() => {})
|
|
||||||
.onDismiss(() => {});
|
|
||||||
};
|
|
||||||
const clickNote = () => {
|
|
||||||
addNote.value = true;
|
|
||||||
};
|
|
||||||
const clickAdd = () => {
|
|
||||||
// modal.value = true;
|
|
||||||
$q.dialog({
|
|
||||||
title: "เพิ่มประกาศ",
|
|
||||||
message: "เลือกประกาศที่ต้องการเพิ่มข้อมูล",
|
|
||||||
options: {
|
|
||||||
type: "radio",
|
|
||||||
model: "opt1",
|
|
||||||
// inline: true
|
|
||||||
items: [
|
|
||||||
{ label: "ประกาศเพิ่มผู้เกษียณ", value: "ADD" },
|
|
||||||
{ label: "ประกาศแก้ไขข้อมูลผู้เกษียน", value: "EDIT" },
|
|
||||||
{ label: "ประกาศยกเลิกผู้เกษียณ", value: "REMOVE" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
cancel: {
|
|
||||||
flat: true,
|
|
||||||
color: "negative",
|
|
||||||
},
|
|
||||||
persistent: true,
|
|
||||||
})
|
|
||||||
.onOk((data) => {
|
|
||||||
console.log("option===>", data);
|
|
||||||
router.push(`/retirement/list/${type.value}/${currentYear}`);
|
|
||||||
})
|
|
||||||
.onCancel(() => {})
|
|
||||||
.onDismiss(() => {});
|
|
||||||
/* $q.dialog({
|
|
||||||
title: "ยืนยันการเพิ่มข้อมูลประกาศเกษียณ",
|
|
||||||
message: "ต้องการเพิ่มข้อมูลประกาศเกษียณใช่หรือไม่?",
|
|
||||||
cancel: {
|
|
||||||
flat: true,
|
|
||||||
color: "negative",
|
|
||||||
},
|
|
||||||
persistent: true,
|
|
||||||
})
|
|
||||||
.onOk(async () => {
|
|
||||||
router.push(`/retirement/list/${type.value}/${currentYear}`);
|
|
||||||
})
|
|
||||||
.onCancel(() => {})
|
|
||||||
.onDismiss(() => {}); */
|
|
||||||
};
|
|
||||||
const clickClose = async () => {
|
|
||||||
addNote.value = false;
|
|
||||||
};
|
|
||||||
const organization = ref<string>();
|
|
||||||
const organizationOptions = ref<any>([{ id: 1, name: "ทั้งหมด" }]);
|
|
||||||
const stat = ref<any>({
|
const stat = ref<any>({
|
||||||
total: 0,
|
total: 0,
|
||||||
sendName: 0,
|
sendName: 0,
|
||||||
|
|
@ -358,54 +41,22 @@ const stat = ref<any>({
|
||||||
personSend: 0,
|
personSend: 0,
|
||||||
disclaim: 0,
|
disclaim: 0,
|
||||||
});
|
});
|
||||||
|
onMounted(async () => {
|
||||||
const saveNote = async () => {
|
await fecthlistRound();
|
||||||
if (saveWriteNote.value.length == 0) {
|
});
|
||||||
dialogMessage(
|
const fecthlistRound = async () => {
|
||||||
$q,
|
await http
|
||||||
"ไม่สามารถบันทึกข้อมูลได้",
|
.get(config.API.listRoundInsignia("insignia"))
|
||||||
"กรุณาเพิ่มหมายเหตุ",
|
.then((res: any) => {
|
||||||
"warning",
|
optionRound.value = res.data.result.map((e) => ({
|
||||||
undefined,
|
id: e.period_id,
|
||||||
"orange",
|
year: e.period_year,
|
||||||
undefined,
|
name: `รอบการเสนอพระราชทานเครื่องราช ${e.period_name} ปี ${e.period_year} `,
|
||||||
undefined,
|
}));
|
||||||
true
|
})
|
||||||
);
|
.catch((err) => {
|
||||||
return;
|
console.log(err);
|
||||||
} else {
|
});
|
||||||
await saveTextNote();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const saveTextNote = async () => {};
|
|
||||||
|
|
||||||
// ค้นหาในตาราง
|
|
||||||
const filterKeyword = ref<string>("");
|
|
||||||
const filterRef = ref<any>(null);
|
|
||||||
const resetFilter = () => {
|
|
||||||
filterKeyword.value = "";
|
|
||||||
filterRef.value.focus();
|
|
||||||
};
|
|
||||||
|
|
||||||
const filterKeyword2 = ref<string>("");
|
|
||||||
const filterRef2 = ref<any>(null);
|
|
||||||
const resetFilter2 = () => {
|
|
||||||
filterKeyword2.value = "";
|
|
||||||
filterRef2.value.focus();
|
|
||||||
};
|
|
||||||
|
|
||||||
const attrs = ref<any>(useAttrs());
|
|
||||||
|
|
||||||
const paging = ref<boolean>(true);
|
|
||||||
const paginationLabel = (start: string, end: string, total: string) => {
|
|
||||||
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
|
||||||
else return start + "-" + end + " ใน " + total;
|
|
||||||
};
|
|
||||||
const nextPage = (prop: any) => {
|
|
||||||
// console.log(prop.id);
|
|
||||||
|
|
||||||
router.push(`/retirement/listretire/${prop.id}/${type.value}`);
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -417,7 +68,14 @@ const nextPage = (prop: any) => {
|
||||||
<div class="bg-grey-2 col-12 row items-center">
|
<div class="bg-grey-2 col-12 row items-center">
|
||||||
<div class="q-pl-sm q-mr-md text-weight-bold text-grey">รอบ</div>
|
<div class="q-pl-sm q-mr-md text-weight-bold text-grey">รอบ</div>
|
||||||
|
|
||||||
<q-select borderless v-model="round" :options="optionRound" />
|
<q-select
|
||||||
|
borderless
|
||||||
|
v-model="round"
|
||||||
|
:options="optionRound"
|
||||||
|
map-options
|
||||||
|
option-value="id"
|
||||||
|
option-label="name"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row bg-white">
|
<div class="col-12 row bg-white">
|
||||||
<div class="fit q-px-md q-py-sm">
|
<div class="fit q-px-md q-py-sm">
|
||||||
|
|
@ -479,221 +137,7 @@ const nextPage = (prop: any) => {
|
||||||
<tab4 />
|
<tab4 />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
|
|
||||||
<!-- <div class="col-12 row q-pa-md">
|
|
||||||
<div class="row col-12">
|
|
||||||
<div class="row col-12 q-col-gutter-sm">
|
|
||||||
<q-select
|
|
||||||
v-model="organization"
|
|
||||||
label="หน่วยงาน"
|
|
||||||
dense
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
:options="organizationOptions"
|
|
||||||
option-value="id"
|
|
||||||
option-label="name"
|
|
||||||
lazy-rules
|
|
||||||
hide-bottom-space
|
|
||||||
:readonly="false"
|
|
||||||
:borderless="false"
|
|
||||||
:outlined="true"
|
|
||||||
:hide-dropdown-icon="false"
|
|
||||||
style="min-width: 150px"
|
|
||||||
/>
|
|
||||||
<div>
|
|
||||||
<q-btn
|
|
||||||
@click="clickAdd()"
|
|
||||||
size="12px"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
color="add"
|
|
||||||
icon="mdi-plus"
|
|
||||||
>
|
|
||||||
<q-tooltip>เพิ่ม</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-btn size="md" icon="mdi-download" flat round color="primary">
|
|
||||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
|
||||||
</q-btn> -->
|
|
||||||
<!-- <q-menu>
|
|
||||||
<q-list style="min-width: 100px">
|
|
||||||
<q-item clickable @click="clickAdd">
|
|
||||||
<q-item-section>ขรก.กทม.สามัญ</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-item clickable @click="clickAdd">
|
|
||||||
<q-item-section>ลูกจ้างประจำ</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-menu> -->
|
|
||||||
<!-- </div>
|
|
||||||
<q-space />
|
|
||||||
|
|
||||||
<q-input
|
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
standout
|
|
||||||
dense
|
|
||||||
v-model="filterKeyword"
|
|
||||||
ref="filterRef"
|
|
||||||
outlined
|
|
||||||
debounce="300"
|
|
||||||
placeholder="ค้นหา"
|
|
||||||
>
|
|
||||||
<template v-slot:append>
|
|
||||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
|
||||||
<q-icon
|
|
||||||
v-if="filterKeyword !== ''"
|
|
||||||
name="clear"
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="resetFilter"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
|
|
||||||
<q-select
|
|
||||||
v-model="visibleColumns"
|
|
||||||
multiple
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
options-dense
|
|
||||||
:display-value="$q.lang.table.columns"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
:options="columns"
|
|
||||||
option-value="name"
|
|
||||||
options-cover
|
|
||||||
style="min-width: 150px"
|
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 q-pt-sm">
|
|
||||||
<q-table
|
|
||||||
ref="table"
|
|
||||||
:columns="columns"
|
|
||||||
:rows="rows"
|
|
||||||
:filter="filterKeyword"
|
|
||||||
row-key="name"
|
|
||||||
flat
|
|
||||||
bordered
|
|
||||||
:paging="true"
|
|
||||||
dense
|
|
||||||
class="custom-header-table"
|
|
||||||
v-bind="attrs"
|
|
||||||
:visible-columns="visibleColumns"
|
|
||||||
:pagination-label="paginationLabel"
|
|
||||||
v-model:pagination="pagination"
|
|
||||||
>
|
|
||||||
<template v-slot:header="props">
|
|
||||||
<q-tr :props="props">
|
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
|
||||||
</q-th>
|
|
||||||
<q-th auto-width />
|
|
||||||
<q-th auto-width />
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
<template v-slot:body="props">
|
|
||||||
<q-tr
|
|
||||||
:props="props"
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="nextPage(props.row)"
|
|
||||||
>
|
|
||||||
<q-td key="no" :props="props">
|
|
||||||
{{ props.rowIndex + 1 }}
|
|
||||||
</q-td>
|
|
||||||
<q-td key="citizenId" :props="props">
|
|
||||||
{{ props.row.citizenId }}
|
|
||||||
</q-td>
|
|
||||||
<q-td key="name" :props="props">
|
|
||||||
{{ props.row.name }}
|
|
||||||
</q-td>
|
|
||||||
<q-td key="position" :props="props">
|
|
||||||
{{ props.row.position }}
|
|
||||||
</q-td>
|
|
||||||
<q-td key="level" :props="props">
|
|
||||||
{{ props.row.level }}
|
|
||||||
</q-td>
|
|
||||||
<q-td key="salary" :props="props">
|
|
||||||
{{ props.row.salary }}
|
|
||||||
</q-td>
|
|
||||||
<q-td key="organization" :props="props">
|
|
||||||
{{ props.row.organization }}
|
|
||||||
</q-td>
|
|
||||||
<q-td key="insigniaType" :props="props">
|
|
||||||
{{ props.row.insigniaType }}
|
|
||||||
</q-td>
|
|
||||||
<q-td key="insigniaSend" :props="props">
|
|
||||||
{{ props.row.insigniaSend }}
|
|
||||||
</q-td>
|
|
||||||
<q-td key="insigniaLevel" :props="props">
|
|
||||||
{{ props.row.insigniaLevel }}
|
|
||||||
</q-td>
|
|
||||||
<q-td key="dateSend" :props="props">
|
|
||||||
{{ props.row.dateSend }}
|
|
||||||
</q-td>
|
|
||||||
<q-td auto-width>
|
|
||||||
<q-btn
|
|
||||||
dense
|
|
||||||
size="12px"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
color="blue"
|
|
||||||
@click="clickNote(props.row.id)"
|
|
||||||
icon="mdi-alert-circle-outline"
|
|
||||||
>
|
|
||||||
<q-tooltip>หมายเหตุ</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
|
||||||
<q-td auto-width>
|
|
||||||
<q-btn
|
|
||||||
dense
|
|
||||||
size="12px"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
color="red"
|
|
||||||
@click="clickDelete(props.row.id)"
|
|
||||||
icon="mdi-delete"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
<template v-slot:pagination="scope">
|
|
||||||
<q-pagination
|
|
||||||
v-model="pagination.page"
|
|
||||||
active-color="primary"
|
|
||||||
color="primary"
|
|
||||||
:max="scope.pagesNumber"
|
|
||||||
:max-pages="5"
|
|
||||||
size="sm"
|
|
||||||
boundary-links
|
|
||||||
direction-links
|
|
||||||
></q-pagination>
|
|
||||||
</template>
|
|
||||||
</q-table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<q-dialog v-model="addNote" persistent>
|
|
||||||
<q-card style="min-width: 350px">
|
|
||||||
<DialogHeader tittle="หมายเหตุ " :close="clickClose" />
|
|
||||||
|
|
||||||
<q-card-section class="q-pt-none">
|
|
||||||
<q-input
|
|
||||||
dense
|
|
||||||
type="textarea"
|
|
||||||
label="กรอกหมายเหตุ"
|
|
||||||
v-model="Note"
|
|
||||||
autofocus
|
|
||||||
@keyup.enter="addNote = false"
|
|
||||||
/>
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
|
||||||
<q-btn label="บันทึก" @click="saveNote" color="public" />
|
|
||||||
</q-card-actions>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scope>
|
<style lang="scss" scope>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
divdiv
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch } from "vue";
|
import { ref, onMounted, watch } from "vue";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -218,8 +217,7 @@ watch(byOrder, async () => {
|
||||||
watch(nameCommand, async () => {
|
watch(nameCommand, async () => {
|
||||||
console.log(nameCommand.value);
|
console.log(nameCommand.value);
|
||||||
console.log(positionCommand.value);
|
console.log(positionCommand.value);
|
||||||
|
|
||||||
|
|
||||||
if (positionCommand.value === "" || positionCommand.value === undefined) {
|
if (positionCommand.value === "" || positionCommand.value === undefined) {
|
||||||
positionCommand.value = nameCommand.value.positionName;
|
positionCommand.value = nameCommand.value.positionName;
|
||||||
}
|
}
|
||||||
|
|
@ -313,9 +311,7 @@ const submit = async () => {
|
||||||
orderTypeValue: typeOrder.value.id,
|
orderTypeValue: typeOrder.value.id,
|
||||||
orderTitle: nameOrder.value,
|
orderTitle: nameOrder.value,
|
||||||
orderNo:
|
orderNo:
|
||||||
command.value == undefined || command.value == ""
|
command.value == undefined || command.value == "" ? "" : command.value,
|
||||||
? ""
|
|
||||||
: command.value,
|
|
||||||
orderYear: dateYear.value,
|
orderYear: dateYear.value,
|
||||||
orderDate: dateCommand.value,
|
orderDate: dateCommand.value,
|
||||||
orderBy: byOrder.value,
|
orderBy: byOrder.value,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue