ปรับ code บรรจุ
This commit is contained in:
parent
063db4e245
commit
35a5817db3
16 changed files with 559 additions and 700 deletions
|
|
@ -346,6 +346,18 @@ interface PersonData {
|
|||
statusName: string;
|
||||
organizationName: string;
|
||||
id: string;
|
||||
posTypeOldId: string;
|
||||
posLevelOldId: string;
|
||||
positionOld: string;
|
||||
status: string;
|
||||
educationOld: string;
|
||||
organizationPositionOld: string;
|
||||
positionTypeOld: string;
|
||||
positionLevelOld: string;
|
||||
positionNumberOld: number;
|
||||
positionDate: string;
|
||||
posTypeNameOld: string;
|
||||
posLevelNameOld: string;
|
||||
}
|
||||
|
||||
interface AppointTopic {
|
||||
|
|
|
|||
|
|
@ -131,6 +131,22 @@ interface MemBerType {
|
|||
actFullName: string;
|
||||
isDirector?: boolean;
|
||||
}
|
||||
|
||||
interface FormDataAppoint {
|
||||
node: string;
|
||||
nodeId: number;
|
||||
orgRevisionId: string;
|
||||
positionId: string;
|
||||
posMasterNo: number;
|
||||
positionName: string;
|
||||
posTypeId: string;
|
||||
posTypeName: string;
|
||||
posLevelId: string;
|
||||
posLevelName: string;
|
||||
reportingDate: string;
|
||||
posmasterId: string;
|
||||
typeCommand: string;
|
||||
}
|
||||
export type {
|
||||
FormPlacementMainData,
|
||||
FormOrderPlacementMainData,
|
||||
|
|
@ -146,5 +162,6 @@ export type {
|
|||
AppointMainRows,
|
||||
FormAppointData,
|
||||
MemBerType,
|
||||
PersonsAppointData
|
||||
PersonsAppointData,
|
||||
FormDataAppoint,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,6 +28,10 @@ interface ResponseRow {
|
|||
positionTypeId: string;
|
||||
positionLevelId: string;
|
||||
amountOld: number;
|
||||
posTypeOldId: string;
|
||||
posLevelOldId: string;
|
||||
positionOld: string;
|
||||
posMasterNo: number;
|
||||
}
|
||||
|
||||
interface ResponseData {
|
||||
|
|
|
|||
|
|
@ -89,8 +89,8 @@ export const useProfileDataStore = defineStore("profilePlacenent", () => {
|
|||
export const usePlacementDataStore = defineStore("placement", () => {
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const tabsMain = ref<string>("probation");
|
||||
const isOfficer = ref<boolean|null>(null);
|
||||
const isStaff = ref<boolean|null>(null);
|
||||
const isOfficer = ref<boolean | null>(null);
|
||||
const isStaff = ref<boolean | null>(null);
|
||||
const { hideLoader } = mixin;
|
||||
interface placement {
|
||||
mappingPosition: { columns: String[] };
|
||||
|
|
@ -113,8 +113,9 @@ export const usePlacementDataStore = defineStore("placement", () => {
|
|||
let DataMainUpdate = ref<FormPlacementMainData[]>([]); // ข้อมูลเปลี่ยนแปลง
|
||||
const DataMainYearSet = (val: FormPlacementMainData[]) =>
|
||||
(DataMainYear.value = val);
|
||||
const DataMain = (val: FormPlacementMainData[]) => (DataMainOrig.value = val);
|
||||
const DataUpdateMain = (
|
||||
const DataMain = async (val: FormPlacementMainData[]) =>
|
||||
(DataMainOrig.value = val);
|
||||
const DataUpdateMain = async (
|
||||
filter_1: number | string,
|
||||
filter_2: string | null,
|
||||
filter_3: boolean
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ import config from "@/app.config";
|
|||
const DataStore = usePlacementDataStore();
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader, messageError, date2Thai,onSearchDataTable } = mixin;
|
||||
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
||||
mixin;
|
||||
|
||||
const searchYear = ref();
|
||||
const yearOptions = reactive<DataOption[]>([{ id: 0, name: "ทั้งหมด" }]);
|
||||
|
|
@ -31,10 +32,6 @@ const rowsData = ref<any[]>([]);
|
|||
/** ค้นหาในตาราง */
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterRef = ref<any>(null);
|
||||
const resetFilter = () => {
|
||||
filterKeyword.value = "";
|
||||
filterRef.value.focus();
|
||||
};
|
||||
|
||||
/**ครั้งที่สอบ */
|
||||
const examTime = ref<number | string>("");
|
||||
|
|
@ -59,19 +56,6 @@ const pagination = ref({
|
|||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
/** ส่วนเเสดงผล ตาราง */
|
||||
const visibleColumns = ref([
|
||||
"id",
|
||||
"examRound",
|
||||
"examOrder",
|
||||
"examOrder",
|
||||
"fiscalYear",
|
||||
"numberOfCandidates",
|
||||
"examTypeName",
|
||||
"accountStartDate",
|
||||
"accountExpirationDate",
|
||||
]);
|
||||
|
||||
/**หัวตาราง */
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
|
|
@ -151,6 +135,17 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
const visibleColumns = ref([
|
||||
"id",
|
||||
"examRound",
|
||||
"examOrder",
|
||||
"examOrder",
|
||||
"fiscalYear",
|
||||
"numberOfCandidates",
|
||||
"examTypeName",
|
||||
"accountStartDate",
|
||||
"accountExpirationDate",
|
||||
]);
|
||||
|
||||
/**
|
||||
* ฟังชั่นดึงข้อมูรายการสอบแข่งขัน / คัดเลือกตามปี
|
||||
|
|
@ -165,8 +160,7 @@ async function fetchPlacementData(val: number) {
|
|||
const data = await res.data.result;
|
||||
dataPlacement.value = data;
|
||||
DataStore.DataMainOrig = dataPlacement.value;
|
||||
const listData =
|
||||
DataStore.DataMainOrig.map((e: any) => ({
|
||||
const listData = DataStore.DataMainOrig.map((e: any) => ({
|
||||
id: e.id,
|
||||
examRound: e.examRound,
|
||||
examOrder: e.examOrder,
|
||||
|
|
@ -178,8 +172,8 @@ async function fetchPlacementData(val: number) {
|
|||
fiscalYear: e.fiscalYear,
|
||||
numberOfCandidates: e.numberOfCandidates,
|
||||
}));
|
||||
rows.value = listData
|
||||
rowsData.value = listData
|
||||
rows.value = listData;
|
||||
rowsData.value = listData;
|
||||
filterKeyword.value = "";
|
||||
examTime.value = "ทั้งหมด";
|
||||
examType.value = "ทั้งหมด";
|
||||
|
|
@ -199,9 +193,7 @@ async function fetchPlacementData(val: number) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังชั่นดึงข้อมูล ปี ค.ส.
|
||||
*/
|
||||
/** ฟังชั่นดึงข้อมูล ปี ค.ส. */
|
||||
async function fetchYearOptions() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -243,9 +235,7 @@ function redirectToPage(examId?: number) {
|
|||
router.push(`/placement/personal-list/${examId}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟิลเตอร์หาครั้งที่สอบ ตาม ปี
|
||||
*/
|
||||
/** ฟิลเตอร์หาครั้งที่สอบ ตาม ปี*/
|
||||
async function examTimeFilter() {
|
||||
for (const data of dataPlacement.value) {
|
||||
const examOrder = data.examOrder;
|
||||
|
|
@ -275,9 +265,7 @@ function examTypeFilter() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันค้นหาข้อมูล ายการสอบแข่งขัน / คัดเลือก
|
||||
*/
|
||||
/** ฟังก์ชันค้นหาข้อมูล ายการสอบแข่งขัน / คัดเลือก*/
|
||||
async function searchFilterTable() {
|
||||
rows.value = [];
|
||||
if (examType.value !== undefined && examType.value !== null) {
|
||||
|
|
@ -287,7 +275,7 @@ async function searchFilterTable() {
|
|||
expiredAccount.value
|
||||
);
|
||||
const dataArr: any = [];
|
||||
await DataStore.DataMainUpdate.map((e: any) => {
|
||||
DataStore.DataMainUpdate.map((e: any) => {
|
||||
dataArr.push({
|
||||
id: e.id,
|
||||
examRound: e.examRound,
|
||||
|
|
@ -373,11 +361,6 @@ function filterFnYear(val: string, update: any) {
|
|||
}
|
||||
}
|
||||
|
||||
function paginationLabel(start: number, end: number, total: number) {
|
||||
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||
else return start + "-" + end + " ใน " + total;
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
rows.value = onSearchDataTable(
|
||||
filterKeyword.value,
|
||||
|
|
@ -386,9 +369,7 @@ function onSearch() {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* เรียกใช้ฟังชั่น เมื่อเริ่มหน้านี้
|
||||
*/
|
||||
/** เรียกใช้ฟังชั่น เมื่อเริ่มหน้านี้*/
|
||||
onMounted(async () => {
|
||||
await fetchYearOptions();
|
||||
});
|
||||
|
|
@ -398,9 +379,10 @@ onMounted(async () => {
|
|||
<div class="toptitle text-dark col-12 row items-center">
|
||||
รายการสอบแข่งขัน/คัดเลือก
|
||||
</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">
|
||||
<div class="row col-12">
|
||||
<q-select
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
v-model="searchYear"
|
||||
|
|
@ -432,7 +414,6 @@ onMounted(async () => {
|
|||
<q-space />
|
||||
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
|
|
@ -442,18 +423,12 @@ onMounted(async () => {
|
|||
@keydown.enter="onSearch"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
<!-- <q-icon
|
||||
v-if="filterKeyword !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/> -->
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-select
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
class="q-ml-sm"
|
||||
v-model="visibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
|
|
@ -526,7 +501,11 @@ onMounted(async () => {
|
|||
hide-selected
|
||||
fill-input
|
||||
:clearable="examType !== 'all' && examType !== 'ทั้งหมด'"
|
||||
@clear="(examType = 'all'), searchFilterTable()"
|
||||
@clear="
|
||||
(examTimeOP2 = examTimeOP),
|
||||
(examType = 'ทั้งหมด'),
|
||||
searchFilterTable()
|
||||
"
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
|
|
@ -547,8 +526,9 @@ onMounted(async () => {
|
|||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<q-table
|
||||
<d-table
|
||||
ref="table"
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
|
|
@ -556,12 +536,9 @@ onMounted(async () => {
|
|||
flat
|
||||
bordered
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
:pagination-label="paginationLabel"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:pagination="scope">
|
||||
<!-- <template v-slot:pagination="scope">
|
||||
<q-pagination
|
||||
v-model="pagination.page"
|
||||
active-color="primary"
|
||||
|
|
@ -572,7 +549,7 @@ onMounted(async () => {
|
|||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
</template> -->
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width />
|
||||
|
|
@ -621,7 +598,7 @@ onMounted(async () => {
|
|||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</q-table>
|
||||
</d-table>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
|
|
@ -643,35 +620,4 @@ onMounted(async () => {
|
|||
.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>
|
||||
|
|
|
|||
|
|
@ -18,14 +18,15 @@ const $q = useQuasar();
|
|||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
const { statusText } = useTransferDataStore();
|
||||
const { date2Thai, messageError, showLoader, hideLoader } = mixin;
|
||||
const { date2Thai, messageError, showLoader, hideLoader, onSearchDataTable } =
|
||||
mixin;
|
||||
|
||||
const modal = ref<boolean>(false); //ส่งไปออกคำสั่ง
|
||||
const dataTransfer = ref<ResponseData[]>([]); //ช่อมูลรายการขอโอน
|
||||
|
||||
//Table
|
||||
const rows = ref<ResponseData[]>([]); //รายการขอโอน
|
||||
const filterMain = ref<string>(""); //คำค้นหารายการขอโอน
|
||||
const filter = ref(""); //คำค้นหารายการขอโอน
|
||||
const rowsOrder = ref<ResponseData[]>([]); //รายการส่งไปออกคำสั่ง
|
||||
const rowsOrderData = ref<ResponseData[]>([]); //รายการส่งไปออกคำสั่ง
|
||||
const filterOrder = ref<string>(""); //คำค้นหารายการส่งไปออกคำสั่ง
|
||||
|
|
@ -118,9 +119,7 @@ const visibleColumns = ref<string[]>([
|
|||
"createdAt",
|
||||
]);
|
||||
|
||||
/**
|
||||
* ฟังก์ชันดึงข้อมูรายการขอโอน
|
||||
*/
|
||||
/** ฟังก์ชันดึงข้อมูรายการขอโอน*/
|
||||
async function fetchData() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -140,7 +139,6 @@ async function fetchData() {
|
|||
|
||||
/**
|
||||
* ฟังก์ชันส่งไปออกคำสั่ง
|
||||
*
|
||||
* ค้นหารายชื่อออกคำสั่งตามสถานะ อนุมัติ (APPROVE)
|
||||
*/
|
||||
function openModalOrder() {
|
||||
|
|
@ -159,62 +157,34 @@ function openModalOrder() {
|
|||
modal.value = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันปิด popup ส่งไปออกคำสั่ง
|
||||
*
|
||||
*/
|
||||
/** ฟังก์ชันปิด popup ส่งไปออกคำสั่ง*/
|
||||
function closeModal() {
|
||||
modal.value = false;
|
||||
filterOrder.value = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันคืนค่าตัวแปรค้นหา
|
||||
*
|
||||
* กำหนด filterMain และ filterOrder เป็นค่าว่าง
|
||||
*/
|
||||
function resetFilter() {
|
||||
filterMain.value = "";
|
||||
filterOrder.value = "";
|
||||
function onSearch() {
|
||||
rows.value = onSearchDataTable(
|
||||
filter.value,
|
||||
dataTransfer.value,
|
||||
columns.value ? columns.value : []
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ทำงานเมื่อ Components ถูกเรียกใช้งาน
|
||||
*
|
||||
* จะเรียกใช้ fetchData เพื่อดึงข้อมูลรายการขอโอน
|
||||
*/
|
||||
onMounted(async () => {
|
||||
await fetchData();
|
||||
});
|
||||
|
||||
const filter = ref("");
|
||||
|
||||
const filterAndApply = () => {
|
||||
const searchText = filter.value.trim().toLowerCase();
|
||||
|
||||
if (!searchText) {
|
||||
rows.value = dataTransfer.value; // คืนค่าทั้งหมดถ้าไม่มีข้อความค้นหา
|
||||
return;
|
||||
}
|
||||
|
||||
rows.value = dataTransfer.value.filter((row: any) => {
|
||||
return columns.value?.some((col: any) => {
|
||||
const rawValue = row[col.field];
|
||||
const formattedValue = col.format
|
||||
? col.format(rawValue, row) // ใช้ `format` ถ้ามี
|
||||
: rawValue;
|
||||
|
||||
return String(formattedValue).toLowerCase().includes(searchText);
|
||||
});
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">รายการขอโอน</div>
|
||||
<q-card flat bordered class="col-12 q-mt-sm">
|
||||
<div class="row q-pa-md">
|
||||
<div class="col-12">
|
||||
<div class="col-12 q-col-gutter-sm">
|
||||
<div class="row col-12">
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
|
|
@ -229,14 +199,13 @@ const filterAndApply = () => {
|
|||
|
||||
<q-space />
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
standout
|
||||
dense
|
||||
v-model="filter"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
placeholder="ค้นหา"
|
||||
@keyup.enter="filterAndApply"
|
||||
@keyup.enter="onSearch"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
|
|
@ -244,6 +213,7 @@ const filterAndApply = () => {
|
|||
</q-input>
|
||||
|
||||
<q-select
|
||||
class="q-ml-sm"
|
||||
v-model="visibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
|
|
@ -255,11 +225,10 @@ const filterAndApply = () => {
|
|||
:options="columns"
|
||||
option-value="name"
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-12 q-pt-sm">
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { FormDataAppoint } from "@/modules/05_placement/interface/request/Main";
|
||||
import type {
|
||||
ResponseData,
|
||||
ResponseRow,
|
||||
|
|
@ -31,7 +32,7 @@ const {
|
|||
messageError,
|
||||
date2Thai,
|
||||
dialogRemove,
|
||||
onSearchDataTable
|
||||
onSearchDataTable,
|
||||
} = mixin;
|
||||
|
||||
const dataRecevice = ref<ResponseData[]>([]); //ข้อมูลรายการรับโอน
|
||||
|
|
@ -149,9 +150,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
},
|
||||
]);
|
||||
|
||||
/**
|
||||
* ฟังก์ชันดึงข้อมูลรายการรับโอน
|
||||
*/
|
||||
/** ฟังก์ชันดึงข้อมูลรายการรับโอน*/
|
||||
async function fecthlistRecevice() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -171,16 +170,12 @@ async function fecthlistRecevice() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ไปหน้าเพิ่มข้อมูลรายการรับโอน
|
||||
*/
|
||||
/** ไปหน้าเพิ่มข้อมูลรายการรับโอน*/
|
||||
function onAddReceive() {
|
||||
router.push(`/placement/receive/add`);
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันบันทึกการอัปโหลดเอกสาร
|
||||
*/
|
||||
/** ฟังก์ชันบันทึกการอัปโหลดเอกสาร*/
|
||||
function onSubmitDoc() {
|
||||
const formData = new FormData();
|
||||
formData.append("File", files.value);
|
||||
|
|
@ -199,24 +194,13 @@ function onSubmitDoc() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันบรีเซ็ตค่าในฟิลเตอร์
|
||||
*/
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
filterKeyword2.value = "";
|
||||
}
|
||||
/**
|
||||
* ฟังก์ชันปิด popup ออกคำสั่ง
|
||||
*/
|
||||
/** ฟังก์ชันปิด popup ออกคำสั่ง*/
|
||||
function clickClose() {
|
||||
modal.value = false;
|
||||
filterKeyword2.value = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันปิด popup อัปเดตไฟล์
|
||||
*/
|
||||
/** ฟังก์ชันปิด popup อัปเดตไฟล์*/
|
||||
function clickCloseUpload() {
|
||||
modalupload.value = false;
|
||||
files.value = null;
|
||||
|
|
@ -224,8 +208,10 @@ function clickCloseUpload() {
|
|||
|
||||
/**
|
||||
* ฟังก์ชันเปิด popup เลือกหน่วยงานที่รับโอน
|
||||
* @param id id รายการรับโอนที่เลือกหน่วยงานที่รับโอน
|
||||
* @param data ข้อมูลรายการรับโอน
|
||||
*/
|
||||
function openModalTree(id: string, data: any) {
|
||||
function openModalTree(id: string, data: ResponseRow) {
|
||||
personalId.value = id;
|
||||
personal.value = dataRecevice.value.filter((e: ResponseData) => e.id === id);
|
||||
dataRows.value = data;
|
||||
|
|
@ -260,6 +246,8 @@ function openDelete(id: string) {
|
|||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
|
|
@ -277,12 +265,11 @@ function nextPage(id: string) {
|
|||
|
||||
/**
|
||||
* ฟังก์ชันส่งไปออกคำสั่ง
|
||||
*
|
||||
* ค้นหารายชื่อออกคำสั่งตามสถานะ อนุมัติ (APPROVE)
|
||||
*/
|
||||
function openModalOrder() {
|
||||
const row = filters.value.filter(
|
||||
(r: any) =>
|
||||
(r: ResponseRow) =>
|
||||
(r.status == "WAITTING" ||
|
||||
r.status == "PENDING" ||
|
||||
r.status == "APPROVE") &&
|
||||
|
|
@ -299,7 +286,11 @@ function openModalOrder() {
|
|||
modal.value = true;
|
||||
}
|
||||
|
||||
async function onSave(data: any) {
|
||||
/**
|
||||
* ฟังก์ชันบันทึกการเลือกหน่วยงานที่รับโอน
|
||||
* @param data ข้อมูลหน่วยงานที่รับโอน
|
||||
*/
|
||||
async function onSave(data: FormDataAppoint) {
|
||||
const dataAppoint = {
|
||||
node: data.node,
|
||||
nodeId: data.nodeId,
|
||||
|
|
@ -340,19 +331,16 @@ function onSearch() {
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ทำงานเมื่อมีการเรียกใช้ Components
|
||||
*/
|
||||
onMounted(() => {
|
||||
fecthlistRecevice();
|
||||
/** ทำงานเมื่อมีการเรียกใช้ Components*/
|
||||
onMounted(async () => {
|
||||
await fecthlistRecevice();
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">รายการรับโอน</div>
|
||||
<q-card flat bordered class="col-12 q-mt-sm">
|
||||
<div class="row q-pa-md">
|
||||
<div class="col-12">
|
||||
<div class="col-12 q-gutter-sm">
|
||||
<div class="row col-12">
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsCreate"
|
||||
|
|
@ -377,7 +365,6 @@ onMounted(() => {
|
|||
</q-btn>
|
||||
<q-space />
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
|
|
@ -388,15 +375,10 @@ onMounted(() => {
|
|||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
<!-- <q-icon
|
||||
v-if="filterKeyword !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/> -->
|
||||
</template>
|
||||
</q-input>
|
||||
<q-select
|
||||
class="q-ml-sm"
|
||||
v-model="visibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
|
|
@ -408,11 +390,10 @@ onMounted(() => {
|
|||
:options="columns"
|
||||
option-value="name"
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-12 q-pt-sm">
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
|
|
|
|||
|
|
@ -9,15 +9,11 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
/**
|
||||
* importType
|
||||
*/
|
||||
/** importType*/
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { officerType } from "@/modules/05_placement/interface/response/officer";
|
||||
|
||||
/**
|
||||
* importComponents
|
||||
*/
|
||||
/** importComponents*/
|
||||
import Dialogbody from "@/modules/05_placement/components/Help-Government/DialogOrders.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
|
|
@ -34,14 +30,11 @@ const {
|
|||
dialogRemove,
|
||||
findOrgNameOld,
|
||||
findPosMasterNoOld,
|
||||
onSearchDataTable
|
||||
onSearchDataTable,
|
||||
} = mixin;
|
||||
|
||||
/**
|
||||
* Table
|
||||
*/
|
||||
/** Table*/
|
||||
const modal = ref<boolean>(false); //แสดง popup ส่งไปออกคำสั่งช่วยราชการ;
|
||||
|
||||
const filterKeyword = ref<string>(""); //คำค้นหารายการช่วยราชการ
|
||||
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
||||
const rows = ref<officerType[]>([]); //รายการช่วยราชการ
|
||||
|
|
@ -185,9 +178,7 @@ const visibleColumns = ref<string[]>([
|
|||
"status",
|
||||
]);
|
||||
|
||||
/**
|
||||
* fetch รายการช่วยราชการ
|
||||
*/
|
||||
/**fetch รายการช่วยราชการ*/
|
||||
async function getData() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -210,9 +201,9 @@ async function getData() {
|
|||
* @param id รายการที่ต้องการลบ
|
||||
*/
|
||||
function clickDelete(id: string) {
|
||||
dialogRemove($q, () => {
|
||||
dialogRemove($q, async () => {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.delete(config.API.officerMainDelete(id))
|
||||
.then(async () => {
|
||||
await getData();
|
||||
|
|
@ -235,9 +226,7 @@ function openDetail(id: string) {
|
|||
router.push(`/placement/help-government/detail/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* เปิด popup ส่งไปออกคำสั่งช่วยราชการ
|
||||
*/
|
||||
/** เปิด popup ส่งไปออกคำสั่งช่วยราชการ*/
|
||||
function openModalOrder() {
|
||||
const row = rows.value.filter(
|
||||
(item: officerType) =>
|
||||
|
|
@ -254,22 +243,12 @@ function openModalOrder() {
|
|||
modal.value = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* ปิด popup ส่งไปออกคำสั่งช่วยราชการ
|
||||
*/
|
||||
/** ปิด popup ส่งไปออกคำสั่งช่วยราชการ*/
|
||||
function closeModal() {
|
||||
modal.value = false;
|
||||
filterKeyword2.value = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* รีเซ็ตข้อมูลในช่องฟิลเตอร์
|
||||
*/
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
filterKeyword2.value = "";
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
rows.value = onSearchDataTable(
|
||||
filterKeyword.value,
|
||||
|
|
@ -278,17 +257,15 @@ function onSearch() {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ทำงานเมื่อมีการเรียกใช้ Components
|
||||
*/
|
||||
onMounted(() => {
|
||||
getData();
|
||||
/** ทำงานเมื่อมีการเรียกใช้ Components*/
|
||||
onMounted(async () => {
|
||||
await getData();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">รายการช่วยราชการ</div>
|
||||
<q-card flat bordered class="col-12 q-mt-sm">
|
||||
<q-card flat bordered class="col-12">
|
||||
<div class="row q-pa-md">
|
||||
<div class="col-12">
|
||||
<div class="row col-12">
|
||||
|
|
@ -305,7 +282,6 @@ onMounted(() => {
|
|||
</q-btn>
|
||||
<q-space />
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
|
|
@ -320,6 +296,7 @@ onMounted(() => {
|
|||
</q-input>
|
||||
|
||||
<q-select
|
||||
class="q-ml-sm"
|
||||
v-model="visibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
|
|
@ -331,7 +308,6 @@ onMounted(() => {
|
|||
:options="columns"
|
||||
option-value="name"
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ const {
|
|||
success,
|
||||
dialogRemove,
|
||||
findPosMasterNoOld,
|
||||
onSearchDataTable
|
||||
onSearchDataTable,
|
||||
} = useCounterMixin();
|
||||
|
||||
const modal = ref<boolean>(false); // ส่งไปออกคำสั่งส่งตัวกลับ
|
||||
|
|
@ -143,16 +143,12 @@ const visibleColumns = ref<string[]>([
|
|||
"status",
|
||||
]);
|
||||
|
||||
/**
|
||||
* rediarect ไปหน้ารายละเอียด
|
||||
*/
|
||||
/** rediarect ไปหน้ารายละเอียด*/
|
||||
function openDetail(id: string) {
|
||||
router.push(`/placement/repatriate/detail/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* fetch รายการส่งตัวกลับ
|
||||
*/
|
||||
/** fetch รายการส่งตัวกลับ*/
|
||||
async function getData() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -169,9 +165,7 @@ async function getData() {
|
|||
hideLoader();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* ยืนยันการลบรายการ
|
||||
*/
|
||||
/** ยืนยันการลบรายการ*/
|
||||
function clickDelete(id: string) {
|
||||
dialogRemove($q, () => {
|
||||
showLoader();
|
||||
|
|
@ -190,9 +184,7 @@ function clickDelete(id: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* เปิด popup ส่งไปออกคำสั่งส่งตัวกลับ
|
||||
*/
|
||||
/** เปิด popup ส่งไปออกคำสั่งส่งตัวกลับ*/
|
||||
function openModalOrder() {
|
||||
// filter หา status
|
||||
const row = rows.value.filter(
|
||||
|
|
@ -214,22 +206,12 @@ function openModalOrder() {
|
|||
modal.value = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* ปิด popup ส่งไปออกคำสั่งส่งตัวกลับ
|
||||
*/
|
||||
/** ปิด popup ส่งไปออกคำสั่งส่งตัวกลับ*/
|
||||
function closeModal() {
|
||||
modal.value = false;
|
||||
filterKeyword2.value = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* รีเซ้ตค่าในช่อง ฟิลเตอร์
|
||||
*/
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
filterKeyword2.value = "";
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
rows.value = onSearchDataTable(
|
||||
filterKeyword.value,
|
||||
|
|
@ -238,9 +220,7 @@ function onSearch() {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ทำงานเมื่อมีการเรียกใช้ Components
|
||||
*/
|
||||
/** ทำงานเมื่อมีการเรียกใช้ Components*/
|
||||
onMounted(async () => {
|
||||
await getData();
|
||||
});
|
||||
|
|
@ -265,7 +245,6 @@ onMounted(async () => {
|
|||
</q-btn>
|
||||
<q-space />
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
|
|
@ -279,7 +258,7 @@ onMounted(async () => {
|
|||
</template>
|
||||
</q-input>
|
||||
<q-select
|
||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||
class="q-ml-sm"
|
||||
v-model="visibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
|
|
@ -338,7 +317,6 @@ onMounted(async () => {
|
|||
flat
|
||||
round
|
||||
dense
|
||||
|
||||
@click.stop.prevent="clickDelete(props.row.id)"
|
||||
>
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import type { resData } from "@/modules/05_placement/interface/response/AppointM
|
|||
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";
|
||||
import type { FormDataAppoint } from "@/modules/05_placement/interface/request/Main";
|
||||
|
||||
/** importComponents*/
|
||||
import Dialogbody from "@/modules/05_placement/components/AppointMent/DialogOrders.vue"; //ส่งไปออกคำสั่ง
|
||||
|
|
@ -30,7 +31,7 @@ const {
|
|||
messageError,
|
||||
date2Thai,
|
||||
dialogRemove,
|
||||
onSearchDataTable
|
||||
onSearchDataTable,
|
||||
} = useCounterMixin();
|
||||
|
||||
const modal = ref<boolean>(false); //แสดง popup ส่งไปออกคำสั่ง
|
||||
|
|
@ -39,7 +40,7 @@ const posType = ref<string>(""); //ประเภทตำแหน่ง
|
|||
const posLevel = ref<string>(""); //ระดับตำแหน่ง
|
||||
const position = ref<string>(""); //ตำแหน่ง
|
||||
const typeModal = ref<string | null>(null); //ประเภท popup แต่งตั้ง , เลื่อน , ย้าย
|
||||
const dataRows = ref<any[]>([]);
|
||||
const dataRows = ref<PersonData>();
|
||||
const personalId = ref<string>("");
|
||||
|
||||
const filterRef = ref<any>(null);
|
||||
|
|
@ -154,13 +155,6 @@ const pagination = ref({
|
|||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
/** รีเซ็ตคำค้นหารายการ*/
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
filterKeyword2.value = "";
|
||||
filterRef.value.focus();
|
||||
}
|
||||
|
||||
/** fetch รายการแต่งตั้ง-เลื่อน-ย้าย*/
|
||||
async function fecthlistappointment() {
|
||||
showLoader();
|
||||
|
|
@ -172,8 +166,7 @@ async function fecthlistappointment() {
|
|||
rows.value = response;
|
||||
rowsData.value = response;
|
||||
// รายชื่อ ส่งไปออกคำสั่ง
|
||||
const listData =
|
||||
rows.value.filter(
|
||||
const listData = rows.value.filter(
|
||||
(e: any) =>
|
||||
e.root !== null &&
|
||||
e.status !== "REPORT" &&
|
||||
|
|
@ -185,8 +178,8 @@ async function fecthlistappointment() {
|
|||
e.positionNumberOld &&
|
||||
e.positionDate
|
||||
);
|
||||
rows2.value = listData
|
||||
rows2Data.value = listData
|
||||
rows2.value = listData;
|
||||
rows2Data.value = listData;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -229,7 +222,7 @@ function nextPage(id: string) {
|
|||
}
|
||||
|
||||
/** เปิด popup เลือกหน่วยงาน*/
|
||||
function openModalTree(data: any, type: string) {
|
||||
function openModalTree(data: PersonData, type: string) {
|
||||
personalId.value = data.id;
|
||||
typeModal.value = type;
|
||||
dataRows.value = data;
|
||||
|
|
@ -240,7 +233,7 @@ function openModalTree(data: any, type: string) {
|
|||
}
|
||||
|
||||
/** ยืนยันการเลือกหน่วยงานที่แต่งตั้ง*/
|
||||
function onSave(data: any) {
|
||||
async function onSave(data: FormDataAppoint) {
|
||||
const dataAppoint = {
|
||||
node: data.node,
|
||||
nodeId: data.nodeId,
|
||||
|
|
@ -258,7 +251,7 @@ function onSave(data: any) {
|
|||
};
|
||||
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.put(config.API.appointmentPosition(personalId.value), dataAppoint)
|
||||
.then(async () => {
|
||||
await fecthlistappointment();
|
||||
|
|
@ -268,7 +261,7 @@ function onSave(data: any) {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
|
@ -293,8 +286,8 @@ function onSearch() {
|
|||
}
|
||||
|
||||
/** ทำงานเมื่อมีการเรียกใช้ Components*/
|
||||
onMounted(() => {
|
||||
fecthlistappointment();
|
||||
onMounted(async () => {
|
||||
await fecthlistappointment();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import type { QTableProps } from "quasar";
|
|||
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 type { FormDataAppoint } from "@/modules/05_placement/interface/request/Main";
|
||||
|
||||
import DialogOrgSelectEmployee from "@/components/Dialogs/DialogOrgSelectEmployee.vue"; //เลือกหน่วยงาน
|
||||
import Dialogbody from "@/modules/05_placement/components/AppointEmployee/DialogOrders.vue";
|
||||
|
|
@ -29,7 +30,7 @@ const {
|
|||
messageError,
|
||||
date2Thai,
|
||||
dialogRemove,
|
||||
onSearchDataTable
|
||||
onSearchDataTable,
|
||||
} = mixin;
|
||||
|
||||
const personalId = ref<string>("");
|
||||
|
|
@ -39,7 +40,7 @@ const typeModal = ref<string>(""); //ประเภท popup ปรับระ
|
|||
const posType = ref<string>(""); //ประเภทตำแหน่ง
|
||||
const posLevel = ref<string>(""); //ระดับตำแหน่ง
|
||||
const position = ref<string>(""); //ตำแหน่ง
|
||||
const dataRows = ref<any[]>([]);
|
||||
const dataRows = ref<PersonData>();
|
||||
|
||||
const filterRef = ref<any>(null);
|
||||
const listRecevice = ref<resData[]>([]); //ข้อมูลรายการปรับระดับชั้นงานลูกจ้าง
|
||||
|
|
@ -150,21 +151,10 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
/**
|
||||
* รีเซ็ต input
|
||||
*/
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
filterKeyword2.value = "";
|
||||
filterRef.value.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* fetch รายการปรับระดับชั้นงานลูกจ้าง
|
||||
*/
|
||||
/** fetch รายการปรับระดับชั้นงานลูกจ้าง*/
|
||||
async function fecthlistappointment() {
|
||||
showLoader();
|
||||
|
||||
await http
|
||||
.get(config.API.appointEmployee())
|
||||
.then(async (res) => {
|
||||
|
|
@ -172,11 +162,9 @@ async function fecthlistappointment() {
|
|||
listRecevice.value = response;
|
||||
rows.value = response;
|
||||
rowsData.value = response;
|
||||
|
||||
//หารายชื่อส่งไปออกคำสั่ง
|
||||
const listData =
|
||||
rows.value.filter(
|
||||
(e: any) =>
|
||||
const listData = rows.value.filter(
|
||||
(e: PersonData) =>
|
||||
e.root !== null &&
|
||||
e.status !== "REPORT" &&
|
||||
e.status !== "DONE" &&
|
||||
|
|
@ -187,8 +175,8 @@ async function fecthlistappointment() {
|
|||
e.positionNumberOld &&
|
||||
e.positionDate
|
||||
);
|
||||
rows2.value = listData
|
||||
rows2Data.value = listData
|
||||
rows2.value = listData;
|
||||
rows2Data.value = listData;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -203,9 +191,9 @@ async function fecthlistappointment() {
|
|||
* @param id รายการปรับระดับชั้นงานลูกจ้าง
|
||||
*/
|
||||
function clickDelete(id: string) {
|
||||
dialogRemove($q, () => {
|
||||
dialogRemove($q, async () => {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.delete(config.API.appointEmployeeByid(id))
|
||||
.then(async () => {
|
||||
await fecthlistappointment();
|
||||
|
|
@ -230,17 +218,13 @@ function nextPage(id: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* เปิด popup ส่งไปออกคำสั่ง
|
||||
*/
|
||||
/** เปิด popup ส่งไปออกคำสั่ง*/
|
||||
function popup() {
|
||||
modal.value = true;
|
||||
filterKeyword2.value = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* ปิด popup ส่งไปออกคำสั่ง
|
||||
*/
|
||||
/** ปิด popup ส่งไปออกคำสั่ง*/
|
||||
function clickClose() {
|
||||
modal.value = false;
|
||||
}
|
||||
|
|
@ -250,7 +234,7 @@ function clickClose() {
|
|||
* @param data ข้อมูลหน่วยงาน
|
||||
* @param type ประเภท ย้าย,ปรับ
|
||||
*/
|
||||
function openModalTree(data: any, type: string) {
|
||||
function openModalTree(data: PersonData, type: string) {
|
||||
typeModal.value = type;
|
||||
personalId.value = data.id;
|
||||
dataRows.value = data;
|
||||
|
|
@ -260,10 +244,8 @@ function openModalTree(data: any, type: string) {
|
|||
modalTree.value = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* ยืนยันการบันทึกข้อมูลเลือกตำแหน่ง
|
||||
*/
|
||||
function onSave(data: any) {
|
||||
/** ยืนยันการบันทึกข้อมูลเลือกตำแหน่ง*/
|
||||
async function onSave(data: FormDataAppoint) {
|
||||
const dataAppoint = {
|
||||
node: data.node,
|
||||
nodeId: data.nodeId,
|
||||
|
|
@ -280,7 +262,7 @@ function onSave(data: any) {
|
|||
typeCommand: data.typeCommand,
|
||||
};
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.put(config.API.appointmentPosition(personalId.value), dataAppoint)
|
||||
.then(async () => {
|
||||
await fecthlistappointment();
|
||||
|
|
@ -303,8 +285,8 @@ function onSearch() {
|
|||
);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fecthlistappointment();
|
||||
onMounted(async () => {
|
||||
await fecthlistappointment();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -330,7 +312,6 @@ onMounted(() => {
|
|||
|
||||
<q-space />
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
|
|
@ -356,7 +337,7 @@ onMounted(() => {
|
|||
:options="columns"
|
||||
option-value="name"
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||
class="q-ml-sm"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -33,9 +33,7 @@ const {
|
|||
|
||||
const modal = ref<boolean>(false);
|
||||
|
||||
/**
|
||||
* Table
|
||||
*/
|
||||
/** Table*/
|
||||
const rows = ref<listMain[]>([]); //รายการอื่นๆ
|
||||
const rowsData = ref<listMain[]>([]); //รายการอื่นๆ
|
||||
const rows2 = ref<listMain[]>([]); //รายการออกคำสั่ง
|
||||
|
|
@ -131,9 +129,7 @@ const pagination = ref({
|
|||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
/**
|
||||
* fetch รายการอื่นๆ
|
||||
*/
|
||||
/** fetch รายการอื่นๆ*/
|
||||
async function fecthlistOthet() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -165,17 +161,13 @@ async function fecthlistOthet() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* เปิด popup ส่งไปออกคำสั่งอื่นๆ
|
||||
*/
|
||||
/** เปิด popup ส่งไปออกคำสั่งอื่นๆ*/
|
||||
function popup() {
|
||||
modal.value = true;
|
||||
filterKeyword2.value = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* ปิด popup ส่งไปออกคำสั่งอื่นๆ
|
||||
*/
|
||||
/** ปิด popup ส่งไปออกคำสั่งอื่นๆ*/
|
||||
function clickClose() {
|
||||
modal.value = false;
|
||||
}
|
||||
|
|
@ -185,9 +177,9 @@ function clickClose() {
|
|||
* @param id รายการอื่นๆ
|
||||
*/
|
||||
function clickDelete(id: string) {
|
||||
dialogRemove($q, () => {
|
||||
dialogRemove($q, async () => {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.delete(config.API.otherByid(id))
|
||||
.then(async () => {
|
||||
await fecthlistOthet();
|
||||
|
|
@ -243,7 +235,6 @@ onMounted(() => {
|
|||
</q-btn>
|
||||
<q-space />
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
|
|
@ -268,7 +259,7 @@ onMounted(() => {
|
|||
:options="columns"
|
||||
option-value="name"
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||
class="q-ml-sm"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue