ฟิลเตอร์ระบบ บรรจุ
This commit is contained in:
parent
7ab17d378f
commit
992541eded
20 changed files with 674 additions and 488 deletions
|
|
@ -31,6 +31,7 @@ const {
|
|||
messageError,
|
||||
date2Thai,
|
||||
dialogRemove,
|
||||
onSearchDataTable
|
||||
} = mixin;
|
||||
|
||||
const dataRecevice = ref<ResponseData[]>([]); //ข้อมูลรายการรับโอน
|
||||
|
|
@ -52,7 +53,9 @@ const type = ref<string | null>(null);
|
|||
|
||||
//Table
|
||||
const rows = ref<ResponseRow[]>([]); //รายการรับโอน
|
||||
const rowsData = ref<ResponseRow[]>([]); //รายการรับโอน
|
||||
const rows2 = ref<ResponseRow[]>([]); //รายการออกคำสั่ง
|
||||
const rows2Data = ref<ResponseRow[]>([]); //รายการออกคำสั่ง
|
||||
const filterKeyword = ref<string>(""); //คำค้นหารายการรับโอน
|
||||
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
||||
const visibleColumns = ref<string[]>([
|
||||
|
|
@ -157,6 +160,7 @@ async function fecthlistRecevice() {
|
|||
const data = await res.data.result;
|
||||
dataRecevice.value = data;
|
||||
rows.value = data;
|
||||
rowsData.value = data;
|
||||
filters.value = data;
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -227,7 +231,6 @@ function openModalTree(id: string, data: any) {
|
|||
dataRows.value = data;
|
||||
modalTree.value = true;
|
||||
type.value = null;
|
||||
dataRows.value = data;
|
||||
posType.value = data.posTypeOldId;
|
||||
posLevel.value = data.posLevelOldId;
|
||||
position.value = data.positionOld;
|
||||
|
|
@ -292,6 +295,7 @@ function openModalOrder() {
|
|||
);
|
||||
|
||||
rows2.value = row;
|
||||
rows2Data.value = row;
|
||||
modal.value = true;
|
||||
}
|
||||
|
||||
|
|
@ -328,6 +332,15 @@ async function onSave(data: any) {
|
|||
});
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
rows.value = onSearchDataTable(
|
||||
filterKeyword.value,
|
||||
rowsData.value,
|
||||
columns.value ? columns.value : []
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ทำงานเมื่อมีการเรียกใช้ Components
|
||||
*/
|
||||
|
|
@ -372,6 +385,7 @@ onMounted(() => {
|
|||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter="onSearch"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
|
|
@ -403,7 +417,6 @@ onMounted(() => {
|
|||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns"
|
||||
>
|
||||
|
|
@ -610,7 +623,8 @@ onMounted(() => {
|
|||
v-model:modal="modal"
|
||||
v-model:filter-keyword2="filterKeyword2"
|
||||
:click-close="clickClose"
|
||||
:rows2="rows2"
|
||||
v-model:rows="rows2"
|
||||
v-model:rowsData="rows2Data"
|
||||
:fecthlist-recevice="fecthlistRecevice"
|
||||
:next-page="nextPage"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue