ฟิลเตอร์ระบบ บรรจุ
This commit is contained in:
parent
7ab17d378f
commit
992541eded
20 changed files with 674 additions and 488 deletions
|
|
@ -14,16 +14,17 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
|
|||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { statusText } = useTransferDataStore();
|
||||
const { dialogConfirm, date2Thai } = mixin;
|
||||
const { dialogConfirm, date2Thai,onSearchDataTable } = mixin;
|
||||
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
/** props */
|
||||
const props = defineProps({
|
||||
closeModal: Function,
|
||||
fetchData: Function,
|
||||
rows: Array,
|
||||
});
|
||||
|
||||
const rows = defineModel<any[]>('rows',{required:true})
|
||||
const rowsData = defineModel<any[]>('rowsData',{required:true})
|
||||
const modalCommand = ref<boolean>(false); //เปิด-ปิด modal สร้างคำสั่ง
|
||||
//Table
|
||||
const selected = ref<ResponseData[]>([]); //รายชื่อที่เลือก
|
||||
|
|
@ -140,6 +141,14 @@ function saveOrder() {
|
|||
);
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
rows.value = onSearchDataTable(
|
||||
filter.value,
|
||||
rowsData.value,
|
||||
columns2.value ? columns2.value : []
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* เมื่อ props.modal เป็น true
|
||||
* กำหนดให้ selected เป็นค่าว่าง
|
||||
|
|
@ -170,6 +179,7 @@ watch(
|
|||
debounce="300"
|
||||
v-model="filter"
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter="onSearch"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
|
|
@ -201,7 +211,6 @@ watch(
|
|||
<d-table
|
||||
:columns="columns2"
|
||||
:rows="rows"
|
||||
:filter="filter"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns2"
|
||||
selection="multiple"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue