ฟิลเตอร์ระบบ บรรจุ
This commit is contained in:
parent
7ab17d378f
commit
992541eded
20 changed files with 674 additions and 488 deletions
|
|
@ -34,6 +34,7 @@ const {
|
|||
dialogRemove,
|
||||
findOrgNameOld,
|
||||
findPosMasterNoOld,
|
||||
onSearchDataTable
|
||||
} = mixin;
|
||||
|
||||
/**
|
||||
|
|
@ -44,7 +45,9 @@ const modal = ref<boolean>(false); //แสดง popup ส่งไปออก
|
|||
const filterKeyword = ref<string>(""); //คำค้นหารายการช่วยราชการ
|
||||
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
||||
const rows = ref<officerType[]>([]); //รายการช่วยราชการ
|
||||
const rowsData = ref<officerType[]>([]); //รายการช่วยราชการ
|
||||
const rows2 = ref<officerType[]>([]); //รายการออกคำสั่ง
|
||||
const rows2Data = ref<officerType[]>([]); //รายการออกคำสั่ง
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
|
|
@ -192,6 +195,7 @@ async function getData() {
|
|||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
rows.value = data;
|
||||
rowsData.value = data;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -246,6 +250,7 @@ function openModalOrder() {
|
|||
item.dateEnd
|
||||
);
|
||||
rows2.value = row;
|
||||
rows2Data.value = row;
|
||||
modal.value = true;
|
||||
}
|
||||
|
||||
|
|
@ -265,6 +270,14 @@ function resetFilter() {
|
|||
filterKeyword2.value = "";
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
rows.value = onSearchDataTable(
|
||||
filterKeyword.value,
|
||||
rowsData.value,
|
||||
columns.value ? columns.value : []
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ทำงานเมื่อมีการเรียกใช้ Components
|
||||
*/
|
||||
|
|
@ -300,6 +313,7 @@ onMounted(() => {
|
|||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter="onSearch"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
|
|
@ -326,7 +340,6 @@ onMounted(() => {
|
|||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns"
|
||||
>
|
||||
|
|
@ -406,7 +419,8 @@ onMounted(() => {
|
|||
v-model:filter-keyword2="filterKeyword2"
|
||||
:get-data="getData"
|
||||
:close-modal="closeModal"
|
||||
:rows2="rows2"
|
||||
v-model:rows2="rows2"
|
||||
v-model:rows2Data="rows2Data"
|
||||
/>
|
||||
</template>
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue