fix file
This commit is contained in:
parent
75b0e08d2c
commit
44c5f56ab0
5 changed files with 3 additions and 685 deletions
|
|
@ -1,682 +0,0 @@
|
||||||
<script setup lang="ts">
|
|
||||||
import { onMounted, reactive, ref, useAttrs, computed } from "vue";
|
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
|
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import router from "@/router";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
|
|
||||||
import type { FormOrderPlacementMainData } from "@/modules/05_placement/interface/request/Main";
|
|
||||||
import type { DataOption } from "@/modules/05_placement/interface/index/Main";
|
|
||||||
|
|
||||||
import { useOrderPlacementDataStore } from "@/modules/05_placement/store";
|
|
||||||
|
|
||||||
/** Use */
|
|
||||||
const $q = useQuasar(); //ใช้ noti quasar
|
|
||||||
const DataStore = useOrderPlacementDataStore();
|
|
||||||
const pagination = ref({
|
|
||||||
sortBy: "desc",
|
|
||||||
descending: false,
|
|
||||||
page: 1,
|
|
||||||
rowsPerPage: 10,
|
|
||||||
});
|
|
||||||
const mixin = useCounterMixin();
|
|
||||||
const { dateText } = mixin;
|
|
||||||
|
|
||||||
// แปลงเวลา ค.ศ ให้เป็น พ.ศ
|
|
||||||
const textDate = (value: Date) => {
|
|
||||||
return dateText(value);
|
|
||||||
};
|
|
||||||
|
|
||||||
/** คอลัมน์ที่แสดง */
|
|
||||||
const visibleColumns = ref<string[]>([
|
|
||||||
"Order",
|
|
||||||
"OrderType",
|
|
||||||
"OrderNum",
|
|
||||||
"OrderDate",
|
|
||||||
"OrderBy",
|
|
||||||
"Signer",
|
|
||||||
"OrderStatus",
|
|
||||||
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
|
||||||
|
|
||||||
// หัวตาราง
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
|
||||||
{
|
|
||||||
name: "Order",
|
|
||||||
align: "left",
|
|
||||||
label: "คำสั่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "Order",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "OrderNum",
|
|
||||||
align: "left",
|
|
||||||
label: "เลขที่คำสั่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "OrderNum",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "OrderType",
|
|
||||||
align: "left",
|
|
||||||
label: "ประเภท",
|
|
||||||
sortable: false,
|
|
||||||
field: "OrderType",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "OrderDate",
|
|
||||||
align: "left",
|
|
||||||
label: "สั่ง ณ วันที่/วันที่คำสั่งมีผล",
|
|
||||||
sortable: true,
|
|
||||||
field: "OrderDate",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "OrderBy",
|
|
||||||
align: "left",
|
|
||||||
label: "คำสั่งโดย",
|
|
||||||
sortable: true,
|
|
||||||
field: "OrderBy",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Signer",
|
|
||||||
align: "left",
|
|
||||||
label: "ผู้ลงนาม",
|
|
||||||
sortable: false,
|
|
||||||
field: "Signer",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "OrderStatus",
|
|
||||||
align: "center",
|
|
||||||
label: "สถานะคำสั่ง",
|
|
||||||
sortable: false,
|
|
||||||
field: "OrderStatus",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "fiscalYear",
|
|
||||||
align: "left",
|
|
||||||
label: "ปีงบประมาณ",
|
|
||||||
sortable: true,
|
|
||||||
field: "fiscalYear",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
// ข้อมูลตาราง (จำลอง)
|
|
||||||
const rows = ref<FormOrderPlacementMainData[]>([
|
|
||||||
{
|
|
||||||
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
|
|
||||||
OrderNum: "1/2565",
|
|
||||||
fiscalYear: 2565,
|
|
||||||
OrderDate: "30 พ.ค. 2565",
|
|
||||||
OrderBy: "สำนักงาน กทม.",
|
|
||||||
Signer: "นาม สมคิด ยอดใจ ",
|
|
||||||
OrderStatus: "จัดทำร่างคำสั่ง",
|
|
||||||
OrderType: "คำสั่งย้าย",
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
|
|
||||||
OrderNum: "1/2565",
|
|
||||||
fiscalYear: 2565,
|
|
||||||
OrderDate: "30 พ.ค. 2565",
|
|
||||||
OrderBy: "สำนักงาน กทม.",
|
|
||||||
Signer: "นาม สมคิด ยอดใจ ",
|
|
||||||
OrderStatus: "จัดทำร่างคำสั่ง",
|
|
||||||
OrderType: "คำสั่งบรรจุและแต่งตั้ง",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
|
|
||||||
OrderNum: "1/2564",
|
|
||||||
fiscalYear: 2564,
|
|
||||||
OrderDate: "30 พ.ค. 2564",
|
|
||||||
OrderBy: "สำนักงาน กทม.",
|
|
||||||
Signer: "นาม สมคิด ยอดใจ ",
|
|
||||||
OrderStatus: "บัญชีแนบท้าย",
|
|
||||||
OrderType: "คำสั่งบรรจุและแต่งตั้ง",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
|
|
||||||
OrderNum: "1/2564",
|
|
||||||
fiscalYear: 2564,
|
|
||||||
OrderDate: "30 พ.ค. 2564",
|
|
||||||
OrderBy: "สำนักงาน กทม.",
|
|
||||||
Signer: "นาม สมคิด ยอดใจ ",
|
|
||||||
OrderStatus: "บัญชีแนบท้าย",
|
|
||||||
OrderType: "คำสั่งย้าย",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
|
|
||||||
OrderNum: "1/2564",
|
|
||||||
fiscalYear: 2564,
|
|
||||||
OrderDate: "30 พ.ค. 2564",
|
|
||||||
OrderBy: "สำนักงาน กทม.",
|
|
||||||
Signer: "นาม สมคิด ยอดใจ ",
|
|
||||||
OrderStatus: "ส่งสำเนาคำสั่ง",
|
|
||||||
OrderType: "คำสั่งย้าย",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
|
|
||||||
OrderNum: "1/2564",
|
|
||||||
fiscalYear: 2564,
|
|
||||||
OrderDate: "30 พ.ค. 2564",
|
|
||||||
OrderBy: "สำนักงาน กทม.",
|
|
||||||
Signer: "นาม สมคิด ยอดใจ ",
|
|
||||||
OrderStatus: "ส่งสำเนาคำสั่ง",
|
|
||||||
OrderType: "คำสั่งบรรจุและแต่งตั้ง",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
|
|
||||||
OrderNum: "1/2566",
|
|
||||||
fiscalYear: 2566,
|
|
||||||
OrderDate: "30 พ.ค. 2566",
|
|
||||||
OrderBy: "สำนักงาน กทม.",
|
|
||||||
Signer: "นาม สมคิด ยอดใจ ",
|
|
||||||
OrderStatus: "รอลงนาม",
|
|
||||||
OrderType: "คำสั่งบรรจุและแต่งตั้ง",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
|
|
||||||
OrderNum: "1/2566",
|
|
||||||
fiscalYear: 2566,
|
|
||||||
OrderDate: "30 พ.ค. 2566",
|
|
||||||
OrderBy: "สำนักงาน กทม.",
|
|
||||||
Signer: "นาม สมคิด ยอดใจ ",
|
|
||||||
OrderStatus: "ออกคำสั่งแล้ว",
|
|
||||||
OrderType: "คำสั่งแต่งตั้ง",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
|
|
||||||
OrderNum: "1/2565",
|
|
||||||
fiscalYear: 2565,
|
|
||||||
OrderDate: "30 พ.ค. 2565",
|
|
||||||
OrderBy: "สำนักงาน กทม.",
|
|
||||||
Signer: "นาม สมคิด ยอดใจ ",
|
|
||||||
OrderStatus: "ออกคำสั่งแล้ว",
|
|
||||||
OrderType: "คำสั่งบรรจุและแต่งตั้ง",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
|
|
||||||
OrderNum: "1/2566",
|
|
||||||
fiscalYear: 2566,
|
|
||||||
OrderDate: "30 พ.ค. 2566",
|
|
||||||
OrderBy: "สำนักงาน กทม.",
|
|
||||||
Signer: "นาม สมคิด ยอดใจ ",
|
|
||||||
OrderStatus: "ออกคำสั่งแล้ว",
|
|
||||||
OrderType: "คำสั่งแต่งตั้ง",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
|
|
||||||
OrderNum: "1/2566",
|
|
||||||
fiscalYear: 2566,
|
|
||||||
OrderDate: "30 พ.ค. 2566",
|
|
||||||
OrderBy: "สำนักงาน กทม.",
|
|
||||||
Signer: "นาม สมคิด ยอดใจ ",
|
|
||||||
OrderStatus: "ออกคำสั่งแล้ว",
|
|
||||||
OrderType: "คำสั่งย้าย",
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
|
|
||||||
OrderNum: "1/2564",
|
|
||||||
fiscalYear: 2564,
|
|
||||||
OrderDate: "30 พ.ค. 2564",
|
|
||||||
OrderBy: "สำนักงาน กทม.",
|
|
||||||
Signer: "นาม สมคิด ยอดใจ ",
|
|
||||||
OrderStatus: "ออกคำสั่งแล้ว",
|
|
||||||
OrderType: "คำสั่งแต่งตั้ง",
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
|
|
||||||
OrderNum: "1/2566",
|
|
||||||
fiscalYear: 2566,
|
|
||||||
OrderDate: "30 พ.ค. 2566",
|
|
||||||
OrderBy: "สำนักงาน กทม.",
|
|
||||||
Signer: "นาม สมคิด ยอดใจ ",
|
|
||||||
OrderStatus: "ออกคำสั่งแล้ว",
|
|
||||||
OrderType: "คำสั่งแต่งตั้ง",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
let OriginalData = ref<FormOrderPlacementMainData[]>([]);
|
|
||||||
let UpdataData = ref<FormOrderPlacementMainData[]>([]);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ดึงค่าข้อมูลจาก store
|
|
||||||
*/
|
|
||||||
async function OriginalDataFetch() {
|
|
||||||
await DataStore.DataMainOrder(rows.value);
|
|
||||||
OriginalData.value = await DataStore.DataMainOrigOrder;
|
|
||||||
UpdataData.value = OriginalData.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ดูรายการหน้าต่อไป
|
|
||||||
function redirectToPage(id?: number) {
|
|
||||||
router.push(`/placement/order/detail`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* function delete
|
|
||||||
* @param id id delete
|
|
||||||
*/
|
|
||||||
function clickDelete(id: string) {
|
|
||||||
$q.dialog({
|
|
||||||
title: "ยืนยันการลบข้อมูล",
|
|
||||||
message: "ต้องการลบข้อมูลนี้ใช่หรือไม่?",
|
|
||||||
cancel: {
|
|
||||||
flat: true,
|
|
||||||
color: "negative",
|
|
||||||
},
|
|
||||||
persistent: true,
|
|
||||||
})
|
|
||||||
.onOk(async () => {})
|
|
||||||
.onCancel(() => {})
|
|
||||||
.onDismiss(() => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
//route ไปหน้า OrderplacementDetail
|
|
||||||
function clickAdd() {
|
|
||||||
router.push({ name: "OrderplacementDetail" });
|
|
||||||
}
|
|
||||||
|
|
||||||
// เลือกปีงบประมาณ
|
|
||||||
const fiscalyear = ref<number | null>(0);
|
|
||||||
const fiscalyearOP = reactive<DataOption[]>([{ id: 0, name: "ทั้งหมด" }]);
|
|
||||||
const addedfiscalYearValues: number[] = [];
|
|
||||||
async function fiscalYearFilter() {
|
|
||||||
for (let data of OriginalData.value) {
|
|
||||||
const year = data.fiscalYear;
|
|
||||||
|
|
||||||
if (fiscalyear.value === null || year > fiscalyear.value) {
|
|
||||||
fiscalyear.value = year;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!addedfiscalYearValues.includes(year)) {
|
|
||||||
fiscalyearOP.push({ id: year, name: year.toString() });
|
|
||||||
addedfiscalYearValues.push(year);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* เลือกประเภทคำสั่ง
|
|
||||||
*/
|
|
||||||
const OrderType = ref<string>("");
|
|
||||||
const OrderTypeOption = reactive<DataOption[]>([{ id: 0, name: "ทั้งหมด" }]);
|
|
||||||
const addedOrderTypeValues: string[] = [];
|
|
||||||
async function OrderTypeFilter() {
|
|
||||||
for (let data of OriginalData.value) {
|
|
||||||
const OrderTypeValue = data.OrderType;
|
|
||||||
if (!addedOrderTypeValues.includes(OrderTypeValue)) {
|
|
||||||
OrderTypeOption.push({
|
|
||||||
id: OrderTypeOption.length,
|
|
||||||
name: OrderTypeValue,
|
|
||||||
});
|
|
||||||
addedOrderTypeValues.push(OrderTypeValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* เลือกStatus คำสั่ง
|
|
||||||
*/
|
|
||||||
const OrderStatus = ref<string>("");
|
|
||||||
const OrderStatusOption = reactive<DataOption[]>([{ id: 1, name: "ทั้งหมด" }]);
|
|
||||||
const addedOrderStatusValues: string[] = [];
|
|
||||||
async function OrderStatusFilter() {
|
|
||||||
for (let data of OriginalData.value) {
|
|
||||||
const OrderStatusValue = data.OrderStatus;
|
|
||||||
|
|
||||||
if (
|
|
||||||
OrderStatusValue === null ||
|
|
||||||
parseInt(OrderStatusValue) > parseInt(OrderStatusValue)
|
|
||||||
) {
|
|
||||||
OrderStatus.value = OrderStatusValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!addedOrderStatusValues.includes(OrderStatusValue)) {
|
|
||||||
OrderStatusOption.push({
|
|
||||||
id: OrderStatusOption.length,
|
|
||||||
name: OrderStatusValue,
|
|
||||||
});
|
|
||||||
addedOrderStatusValues.push(OrderStatusValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ค้นหาในตาราง
|
|
||||||
const filterKeyword = ref<string>("");
|
|
||||||
const filterRef = ref<any>(null);
|
|
||||||
|
|
||||||
/** ล้างค่าในฟิลเตอร์ */
|
|
||||||
function resetFilter() {
|
|
||||||
filterKeyword.value = "";
|
|
||||||
filterRef.value.focus();
|
|
||||||
}
|
|
||||||
const attrs = ref<any>(useAttrs());
|
|
||||||
async function searchFilterTable() {
|
|
||||||
await DataStore.DataUpdateOrder(
|
|
||||||
OrderType.value,
|
|
||||||
OrderStatus.value,
|
|
||||||
fiscalyear.value
|
|
||||||
);
|
|
||||||
UpdataData.value = DataStore.DataMainUpdateOrder;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**Setting pagination */
|
|
||||||
const paging = ref<boolean>(true);
|
|
||||||
function paginationLabel(start: string, end: string, total: string) {
|
|
||||||
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
|
||||||
else return start + "-" + end + " ใน " + total;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**Hook */
|
|
||||||
onMounted(async () => {
|
|
||||||
await OriginalDataFetch();
|
|
||||||
fiscalYearFilter();
|
|
||||||
searchFilterTable();
|
|
||||||
OrderStatusFilter();
|
|
||||||
OrderTypeFilter();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<div class="toptitle text-dark col-12 row items-center">คำสั่งลาออก</div>
|
|
||||||
<div>
|
|
||||||
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
|
||||||
<div class="row q-col-gutter-sm">
|
|
||||||
<div class="row col-12 q-col-gutter-sm">
|
|
||||||
<q-select
|
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
v-model="fiscalyear"
|
|
||||||
label="ปีงบประมาณ"
|
|
||||||
dense
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
:options="fiscalyearOP"
|
|
||||||
option-value="id"
|
|
||||||
option-label="name"
|
|
||||||
lazy-rules
|
|
||||||
hide-bottom-space
|
|
||||||
:readonly="false"
|
|
||||||
:borderless="false"
|
|
||||||
:outlined="true"
|
|
||||||
:hide-dropdown-icon="false"
|
|
||||||
@update:model-value="searchFilterTable"
|
|
||||||
/>
|
|
||||||
<div>
|
|
||||||
<q-btn
|
|
||||||
size="12px"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
color="add"
|
|
||||||
icon="mdi-plus"
|
|
||||||
@click="clickAdd"
|
|
||||||
>
|
|
||||||
<q-tooltip>เพิ่มข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</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-card bordered class="col-12 filter-card q-pa-sm">
|
|
||||||
<div class="row col-12 q-col-gutter-sm">
|
|
||||||
<q-select
|
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
v-model="OrderType"
|
|
||||||
label="ประเภท"
|
|
||||||
dense
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="OrderTypeOption"
|
|
||||||
option-value="id"
|
|
||||||
lazy-rules
|
|
||||||
hide-bottom-space
|
|
||||||
:readonly="false"
|
|
||||||
:borderless="false"
|
|
||||||
:outlined="true"
|
|
||||||
:hide-dropdown-icon="false"
|
|
||||||
@update:model-value="searchFilterTable"
|
|
||||||
/>
|
|
||||||
<q-select
|
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
v-model="OrderStatus"
|
|
||||||
label="สถานะ"
|
|
||||||
dense
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="OrderStatusOption"
|
|
||||||
option-value="id"
|
|
||||||
lazy-rules
|
|
||||||
hide-bottom-space
|
|
||||||
:readonly="false"
|
|
||||||
:borderless="false"
|
|
||||||
:outlined="true"
|
|
||||||
:hide-dropdown-icon="false"
|
|
||||||
@update:model-value="searchFilterTable"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
|
||||||
<div class="col-12">
|
|
||||||
<q-table
|
|
||||||
ref="table"
|
|
||||||
:columns="columns"
|
|
||||||
:rows="UpdataData"
|
|
||||||
:filter="filterKeyword"
|
|
||||||
row-key="Order"
|
|
||||||
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-tr>
|
|
||||||
</template>
|
|
||||||
<template v-slot:body="props">
|
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
|
||||||
<q-td
|
|
||||||
key="Order"
|
|
||||||
:props="props"
|
|
||||||
@click="redirectToPage(props.row.Order)"
|
|
||||||
>
|
|
||||||
{{ props.row.Order }}
|
|
||||||
</q-td>
|
|
||||||
<q-td
|
|
||||||
key="OrderNum"
|
|
||||||
:props="props"
|
|
||||||
@click="redirectToPage(props.row.Order)"
|
|
||||||
>
|
|
||||||
{{ props.row.OrderNum }}
|
|
||||||
</q-td>
|
|
||||||
<q-td
|
|
||||||
key="OrderType"
|
|
||||||
:props="props"
|
|
||||||
@click="redirectToPage(props.row.OrderType)"
|
|
||||||
>
|
|
||||||
{{ props.row.OrderType }}
|
|
||||||
</q-td>
|
|
||||||
<q-td
|
|
||||||
key="OrderDate"
|
|
||||||
:props="props"
|
|
||||||
@click="redirectToPage(props.row.Order)"
|
|
||||||
>
|
|
||||||
{{ props.row.OrderDate }}
|
|
||||||
</q-td>
|
|
||||||
<q-td
|
|
||||||
key="OrderBy"
|
|
||||||
:props="props"
|
|
||||||
@click="redirectToPage(props.row.Order)"
|
|
||||||
>
|
|
||||||
{{ props.row.OrderBy }}
|
|
||||||
</q-td>
|
|
||||||
<q-td
|
|
||||||
key="Signer"
|
|
||||||
:props="props"
|
|
||||||
@click="redirectToPage(props.row.Order)"
|
|
||||||
>
|
|
||||||
{{ props.row.Signer }}
|
|
||||||
</q-td>
|
|
||||||
<q-td
|
|
||||||
key="OrderStatus"
|
|
||||||
:props="props"
|
|
||||||
@click="redirectToPage(props.row.Order)"
|
|
||||||
>
|
|
||||||
{{ props.row.OrderStatus }}
|
|
||||||
</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="dark"
|
|
||||||
:max="scope.pagesNumber"
|
|
||||||
:max-pages="5"
|
|
||||||
size="sm"
|
|
||||||
boundary-links
|
|
||||||
direction-links
|
|
||||||
></q-pagination>
|
|
||||||
</template>
|
|
||||||
</q-table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="scss" scope>
|
|
||||||
.filter-card {
|
|
||||||
background-color: #f1f1f1b0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-expired-account {
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 15px;
|
|
||||||
line-height: 150%;
|
|
||||||
color: #35373c;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-color {
|
|
||||||
color: #4154b3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-header-table {
|
|
||||||
max-height: 64vh;
|
|
||||||
|
|
||||||
.q-table tr:nth-child(odd) td {
|
|
||||||
background: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-table tr:nth-child(even) td {
|
|
||||||
background: #f8f8f8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-table thead tr {
|
|
||||||
background: #ecebeb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-table thead tr th {
|
|
||||||
position: sticky;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* this will be the loading indicator */
|
|
||||||
.q-table thead tr:last-child th {
|
|
||||||
/* height of all previous header rows */
|
|
||||||
top: 48px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-table thead tr:first-child th {
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -14,9 +14,9 @@ const resignByid = () =>
|
||||||
const resignDetailbyid = () =>
|
const resignDetailbyid = () =>
|
||||||
import("@/modules/06_retirement/components/resign/ResignByid.vue");
|
import("@/modules/06_retirement/components/resign/ResignByid.vue");
|
||||||
const deceased = () =>
|
const deceased = () =>
|
||||||
import("@/modules/06_retirement/components/resign/Deceased.vue");
|
import("@/modules/06_retirement/components/Deceased/Deceased.vue");
|
||||||
const detaildeceased = () =>
|
const detaildeceased = () =>
|
||||||
import("@/modules/06_retirement/components/resign/DetailDeceased.vue");
|
import("@/modules/06_retirement/components/Deceased/DetailDeceased.vue");
|
||||||
const dismissOrder = () =>
|
const dismissOrder = () =>
|
||||||
import("@/modules/06_retirement/components/DismissOrder/DismissOrder.vue");
|
import("@/modules/06_retirement/components/DismissOrder/DismissOrder.vue");
|
||||||
const outDetail = () =>
|
const outDetail = () =>
|
||||||
|
|
@ -32,7 +32,7 @@ const exitInterviewDetailsOnly = () =>
|
||||||
const exitInterviewEditQuestion = () =>
|
const exitInterviewEditQuestion = () =>
|
||||||
import("@/modules/06_retirement/components/ExitInterview/EditQuestion.vue");
|
import("@/modules/06_retirement/components/ExitInterview/EditQuestion.vue");
|
||||||
const detaildeceasedByid = () =>
|
const detaildeceasedByid = () =>
|
||||||
import("@/modules/06_retirement/components/resign/DetailByidDeceased.vue");
|
import("@/modules/06_retirement/components/Deceased/DetailByidDeceased.vue");
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue