ฟิลเตอร์ระบบ บรรจุ
This commit is contained in:
parent
7ab17d378f
commit
992541eded
20 changed files with 674 additions and 488 deletions
|
|
@ -40,6 +40,7 @@ const {
|
|||
hideLoader,
|
||||
date2Thai,
|
||||
dialogMessageNotify,
|
||||
onSearchDataTable
|
||||
} = mixin;
|
||||
|
||||
const route = useRoute();
|
||||
|
|
@ -57,6 +58,7 @@ const isAll = ref<boolean>(false);
|
|||
const isBlank = ref<boolean>(false);
|
||||
const posMasterMain = ref<any[]>([]);
|
||||
const positionNo = ref<DataPositionNo[]>([]);
|
||||
const rowsData = ref<DataPositionNo[]>([]);
|
||||
const itemTaps = ref<string[]>();
|
||||
const filters = ref<string>("");
|
||||
const positionId = ref<string>("");
|
||||
|
|
@ -278,6 +280,7 @@ async function getDataTable(id: string, level: number = 0) {
|
|||
}));
|
||||
|
||||
positionNo.value = listPosNo;
|
||||
rowsData.value = listPosNo;
|
||||
// positionData.value = listPosNo;
|
||||
|
||||
if (props.dataRows?.posmasterId) {
|
||||
|
|
@ -485,6 +488,15 @@ function onSubmit() {
|
|||
}
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
positionNo.value = onSearchDataTable(
|
||||
filters.value,
|
||||
rowsData.value,
|
||||
columns.value ? columns.value : []
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
fetchTree();
|
||||
});
|
||||
|
|
@ -492,7 +504,6 @@ onMounted(() => {
|
|||
<template>
|
||||
<q-dialog v-model="modal" persistent full-width>
|
||||
<q-card class="no-scroll">
|
||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||
<DialogHeader :tittle="title" :close="close" />
|
||||
<q-separator />
|
||||
<q-card-section style="max-height: 80vh" class="scroll">
|
||||
|
|
@ -612,6 +623,7 @@ onMounted(() => {
|
|||
dense
|
||||
v-model="filters"
|
||||
label="ค้นหา"
|
||||
@keydown.enter="onSearch"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" color="grey-5" />
|
||||
|
|
@ -639,7 +651,6 @@ onMounted(() => {
|
|||
ref="table"
|
||||
:columns="columns"
|
||||
:rows="positionNo.length !== 0 ? positionNo : []"
|
||||
:filter="filters"
|
||||
row-key="id"
|
||||
flat
|
||||
bordered
|
||||
|
|
@ -862,11 +873,10 @@ onMounted(() => {
|
|||
<q-separator />
|
||||
|
||||
<q-card-actions align="right" class="bg-white text-teal">
|
||||
<q-btn label="บันทึก" color="secondary" type="submit"
|
||||
<q-btn label="บันทึก" color="secondary" type="submit" @click="onSubmit"
|
||||
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
</q-card-actions>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue