ฟิลเตอร์ระบบ บรรจุ
This commit is contained in:
parent
7ab17d378f
commit
992541eded
20 changed files with 674 additions and 488 deletions
|
|
@ -28,6 +28,7 @@ const {
|
|||
messageError,
|
||||
date2Thai,
|
||||
dialogRemove,
|
||||
onSearchDataTable,
|
||||
} = useCounterMixin();
|
||||
|
||||
const modal = ref<boolean>(false);
|
||||
|
|
@ -36,7 +37,9 @@ const modal = ref<boolean>(false);
|
|||
* Table
|
||||
*/
|
||||
const rows = ref<listMain[]>([]); //รายการอื่นๆ
|
||||
const rowsData = ref<listMain[]>([]); //รายการอื่นๆ
|
||||
const rows2 = ref<listMain[]>([]); //รายการออกคำสั่ง
|
||||
const rows2Data = ref<listMain[]>([]); //รายการออกคำสั่ง
|
||||
const filterKeyword = ref<string>(""); //คำค้นหารายการอื่นๆ
|
||||
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
||||
const visibleColumns = ref<string[]>([
|
||||
|
|
@ -138,8 +141,9 @@ async function fecthlistOthet() {
|
|||
.then((res) => {
|
||||
let response = res.data.result;
|
||||
rows.value = response;
|
||||
rowsData.value = response;
|
||||
// หารายชื่อส่งไปออกคำสั่งอื่นๆ
|
||||
rows2.value = rows.value.filter(
|
||||
const listData = rows.value.filter(
|
||||
(e: listMain) =>
|
||||
e.status !== "REPORT" &&
|
||||
e.status !== "DONE" &&
|
||||
|
|
@ -150,6 +154,8 @@ async function fecthlistOthet() {
|
|||
e.positionDate &&
|
||||
e.leaveDate !== null
|
||||
);
|
||||
rows2.value = listData;
|
||||
rows2Data.value = listData;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -206,6 +212,14 @@ function nextPage(id: string) {
|
|||
});
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
rows.value = onSearchDataTable(
|
||||
filterKeyword.value,
|
||||
rowsData.value,
|
||||
columns.value ? columns.value : []
|
||||
);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fecthlistOthet();
|
||||
});
|
||||
|
|
@ -237,6 +251,7 @@ onMounted(() => {
|
|||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter="onSearch"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
|
|
@ -262,7 +277,6 @@ onMounted(() => {
|
|||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
|
|
@ -338,7 +352,8 @@ onMounted(() => {
|
|||
v-model:Modal="modal"
|
||||
v-model:filter-keyword2="filterKeyword2"
|
||||
:click-close="clickClose"
|
||||
:rows2="rows2"
|
||||
v-model:rows="rows2"
|
||||
v-model:rowsData="rows2Data"
|
||||
:fecthlistOthet="fecthlistOthet"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue