ฟิลเตอร์ระบบ บรรจุ
This commit is contained in:
parent
7ab17d378f
commit
992541eded
20 changed files with 674 additions and 488 deletions
|
|
@ -40,6 +40,7 @@ const {
|
||||||
hideLoader,
|
hideLoader,
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dialogMessageNotify,
|
dialogMessageNotify,
|
||||||
|
onSearchDataTable,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
/** props*/
|
/** props*/
|
||||||
|
|
@ -57,6 +58,7 @@ const isAll = ref<boolean>(false);
|
||||||
const isBlank = ref<boolean>(false);
|
const isBlank = ref<boolean>(false);
|
||||||
const posMasterMain = ref<any>([]);
|
const posMasterMain = ref<any>([]);
|
||||||
const positionNo = ref<DataPositionNo[]>([]);
|
const positionNo = ref<DataPositionNo[]>([]);
|
||||||
|
const rowData = ref<DataPositionNo[]>([]);
|
||||||
const itemTaps = ref<string[]>();
|
const itemTaps = ref<string[]>();
|
||||||
const filters = ref<string>("");
|
const filters = ref<string>("");
|
||||||
const positionId = ref<string>("");
|
const positionId = ref<string>("");
|
||||||
|
|
@ -293,6 +295,7 @@ async function getDataTable(id: string, level: number = 0) {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
positionNo.value = listPosNo;
|
positionNo.value = listPosNo;
|
||||||
|
rowData.value = listPosNo;
|
||||||
// positionData.value = listPosNo;
|
// positionData.value = listPosNo;
|
||||||
|
|
||||||
if (props.dataRows?.posmasterId) {
|
if (props.dataRows?.posmasterId) {
|
||||||
|
|
@ -510,6 +513,14 @@ function onSubmit() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSearch() {
|
||||||
|
positionNo.value = onSearchDataTable(
|
||||||
|
filters.value,
|
||||||
|
rowData.value,
|
||||||
|
columns.value ? columns.value : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchTree();
|
await fetchTree();
|
||||||
});
|
});
|
||||||
|
|
@ -517,389 +528,383 @@ onMounted(async () => {
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="modal" persistent full-width>
|
<q-dialog v-model="modal" persistent full-width>
|
||||||
<q-card class="no-scroll">
|
<q-card class="no-scroll">
|
||||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
<DialogHeader :tittle="title" :close="close" />
|
||||||
<DialogHeader :tittle="title" :close="close" />
|
<q-separator />
|
||||||
<q-separator />
|
<q-card-section style="max-height: 80vh" class="scroll">
|
||||||
<q-card-section style="max-height: 80vh" class="scroll">
|
<div class="row">
|
||||||
<div class="row">
|
<q-card
|
||||||
<q-card
|
bordered
|
||||||
bordered
|
class="col-12 col-sm-3 scroll q-pa-sm"
|
||||||
class="col-12 col-sm-3 scroll q-pa-sm"
|
style="height: 75vh"
|
||||||
style="height: 75vh"
|
>
|
||||||
|
<q-toolbar style="padding: 0">
|
||||||
|
<q-toolbar-title class="text-subtitle2 text-bold"
|
||||||
|
>เลือกหน่วยงาน/ส่วนราชการ</q-toolbar-title
|
||||||
|
>
|
||||||
|
</q-toolbar>
|
||||||
|
|
||||||
|
<q-input dense outlined v-model="filter" label="ค้นหา">
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon
|
||||||
|
v-if="filter !== ''"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click="filter = ''"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
<q-tree
|
||||||
|
class="q-pa-sm q-gutter-sm"
|
||||||
|
dense
|
||||||
|
:nodes="lazy"
|
||||||
|
node-key="orgTreeId"
|
||||||
|
label-key="labelName"
|
||||||
|
:filter="filter"
|
||||||
|
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||||
|
no-nodes-label="ไม่มีข้อมูล"
|
||||||
|
v-model:expanded="expanded"
|
||||||
>
|
>
|
||||||
<q-toolbar style="padding: 0">
|
<template v-slot:default-header="prop">
|
||||||
<q-toolbar-title class="text-subtitle2 text-bold"
|
<q-item
|
||||||
>เลือกหน่วยงาน/ส่วนราชการ</q-toolbar-title
|
@click.stop="updateSelected(prop.node)"
|
||||||
|
clickable
|
||||||
|
:active="nodeId == prop.node.orgTreeId"
|
||||||
|
active-class="my-list-link text-primary text-weight-medium"
|
||||||
|
class="row col-12 items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
||||||
>
|
>
|
||||||
</q-toolbar>
|
<div>
|
||||||
|
<div class="text-weight-medium">
|
||||||
<q-input dense outlined v-model="filter" label="ค้นหา">
|
{{ prop.node.orgTreeName }}
|
||||||
<template v-slot:append>
|
|
||||||
<q-icon
|
|
||||||
v-if="filter !== ''"
|
|
||||||
name="clear"
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="filter = ''"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
<q-tree
|
|
||||||
class="q-pa-sm q-gutter-sm"
|
|
||||||
dense
|
|
||||||
:nodes="lazy"
|
|
||||||
node-key="orgTreeId"
|
|
||||||
label-key="labelName"
|
|
||||||
:filter="filter"
|
|
||||||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
|
||||||
no-nodes-label="ไม่มีข้อมูล"
|
|
||||||
v-model:expanded="expanded"
|
|
||||||
>
|
|
||||||
<template v-slot:default-header="prop">
|
|
||||||
<q-item
|
|
||||||
@click.stop="updateSelected(prop.node)"
|
|
||||||
clickable
|
|
||||||
:active="nodeId == prop.node.orgTreeId"
|
|
||||||
active-class="my-list-link text-primary text-weight-medium"
|
|
||||||
class="row col-12 items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
|
||||||
>
|
|
||||||
<div>
|
|
||||||
<div class="text-weight-medium">
|
|
||||||
{{ prop.node.orgTreeName }}
|
|
||||||
</div>
|
|
||||||
<div class="text-weight-light">
|
|
||||||
{{
|
|
||||||
prop.node.orgCode == null ? null : prop.node.orgCode
|
|
||||||
}}
|
|
||||||
{{
|
|
||||||
prop.node.orgTreeShortName == null
|
|
||||||
? null
|
|
||||||
: prop.node.orgTreeShortName
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</q-item>
|
<div class="text-weight-light">
|
||||||
</template>
|
{{ prop.node.orgCode == null ? null : prop.node.orgCode }}
|
||||||
</q-tree>
|
{{
|
||||||
</q-card>
|
prop.node.orgTreeShortName == null
|
||||||
<q-card bordered class="col-12 col-sm-9 q-pa-sm">
|
? null
|
||||||
<q-tab-panels
|
: prop.node.orgTreeShortName
|
||||||
v-model="nodeId"
|
}}
|
||||||
animated
|
|
||||||
transition-prev="jump-up"
|
|
||||||
transition-next="jump-up"
|
|
||||||
>
|
|
||||||
<q-tab-panel
|
|
||||||
v-for="(item, index) in itemTaps"
|
|
||||||
:key="index"
|
|
||||||
:name="item"
|
|
||||||
>
|
|
||||||
<div class="column q-col-gutter-sm">
|
|
||||||
<!-- เลือกตำแหน่งเลขที่ -->
|
|
||||||
<div class="col-7">
|
|
||||||
<q-card
|
|
||||||
bordered
|
|
||||||
style="height: 100%; border: 1px solid #d6dee1"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md"
|
|
||||||
>
|
|
||||||
เลือกตำแหน่งเลขที่
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="col-12 q-pa-md">
|
|
||||||
<q-toolbar style="padding: 0px">
|
|
||||||
<div class="row q-gutter-md">
|
|
||||||
<q-checkbox
|
|
||||||
keep-color
|
|
||||||
v-model="isBlank"
|
|
||||||
label="แสดงเฉพาะตำแหน่งว่าง"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<q-tooltip>แสดงเฉพาะตำแหน่งว่าง </q-tooltip>
|
|
||||||
</q-checkbox>
|
|
||||||
</div>
|
|
||||||
<q-space />
|
|
||||||
|
|
||||||
<div class="row q-gutter-md">
|
|
||||||
<q-checkbox
|
|
||||||
keep-color
|
|
||||||
v-model="isAll"
|
|
||||||
label="แสดงตำแหน่งทั้งหมด"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<q-tooltip
|
|
||||||
>แสดงตำแหน่งทั้งหมดภายใต้หน่วยงาน/ส่วนราชการที่เลือก</q-tooltip
|
|
||||||
>
|
|
||||||
</q-checkbox>
|
|
||||||
<div>
|
|
||||||
<q-input
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
v-model="filters"
|
|
||||||
label="ค้นหา"
|
|
||||||
>
|
|
||||||
<template v-slot:append>
|
|
||||||
<q-icon name="search" color="grey-5" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<q-select
|
|
||||||
v-model="visibleColumns"
|
|
||||||
multiple
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
options-dense
|
|
||||||
emit-value
|
|
||||||
:display-value="$q.lang.table.columns"
|
|
||||||
map-options
|
|
||||||
:options="columns"
|
|
||||||
option-value="name"
|
|
||||||
style="min-width: 140px"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-toolbar>
|
|
||||||
<d-table
|
|
||||||
ref="table"
|
|
||||||
:columns="columns"
|
|
||||||
:rows="positionNo"
|
|
||||||
:filter="filters"
|
|
||||||
row-key="id"
|
|
||||||
flat
|
|
||||||
bordered
|
|
||||||
:paging="true"
|
|
||||||
dense
|
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
|
||||||
class="tableTb"
|
|
||||||
:visible-columns="visibleColumns"
|
|
||||||
>
|
|
||||||
<template v-slot:header="props">
|
|
||||||
<q-tr :props="props">
|
|
||||||
<q-th
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
>
|
|
||||||
<span class="text-weight-medium">{{
|
|
||||||
col.label
|
|
||||||
}}</span>
|
|
||||||
</q-th>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
<template v-slot:body="props">
|
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
|
||||||
<q-td
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
@click="onClickSelectPos(props.row.id)"
|
|
||||||
:class="{
|
|
||||||
'text-red': props.row.isCondition === true,
|
|
||||||
'bg-blue-2': props.row.id === positionId,
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<div v-if="col.name == 'no'">
|
|
||||||
{{ props.rowIndex + 1 }}
|
|
||||||
</div>
|
|
||||||
<div v-else-if="col.name === 'posMasterNo'">
|
|
||||||
{{
|
|
||||||
props.row.isSit
|
|
||||||
? col.value + " " + "(ทับที่)"
|
|
||||||
: col.value
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<div v-else-if="col.name === 'isPosition'">
|
|
||||||
<div v-if="col.value">
|
|
||||||
<q-icon
|
|
||||||
name="done"
|
|
||||||
color="primary"
|
|
||||||
size="24px"
|
|
||||||
>
|
|
||||||
<q-tooltip>ตรงตามตำแหน่ง </q-tooltip>
|
|
||||||
</q-icon>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value ? col.value : "-" }}
|
|
||||||
</div>
|
|
||||||
</q-td>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
</div>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- เลือกตำแหน่ง -->
|
|
||||||
<div class="col-5">
|
|
||||||
<q-card
|
|
||||||
bordered
|
|
||||||
style="min-height: 30vh; border: 1px solid #d6dee1"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md"
|
|
||||||
>
|
|
||||||
เลือกตำแหน่ง
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<q-tab-panels
|
|
||||||
v-model="positionId"
|
|
||||||
animated
|
|
||||||
swipeable
|
|
||||||
vertical
|
|
||||||
transition-prev="jump-up"
|
|
||||||
transition-next="jump-up"
|
|
||||||
>
|
|
||||||
<q-tab-panel
|
|
||||||
v-for="(item, index) in positionData"
|
|
||||||
:key="index"
|
|
||||||
:name="item.id"
|
|
||||||
>
|
|
||||||
<div class="col-12">
|
|
||||||
<q-toolbar style="padding: 0px">
|
|
||||||
<datepicker
|
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="datePos"
|
|
||||||
:locale="'th'"
|
|
||||||
autoApply
|
|
||||||
borderless
|
|
||||||
:enableTimePicker="false"
|
|
||||||
week-start="0"
|
|
||||||
:min-date="datePos"
|
|
||||||
>
|
|
||||||
<template #year="{ year }">
|
|
||||||
{{ year + 543 }}
|
|
||||||
</template>
|
|
||||||
<template #year-overlay-value="{ value }">
|
|
||||||
{{ parseInt(value + 543) }}
|
|
||||||
</template>
|
|
||||||
<template #trigger>
|
|
||||||
<q-input
|
|
||||||
ref="dateRef"
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
hide-bottom-space
|
|
||||||
:model-value="
|
|
||||||
datePos != null
|
|
||||||
? date2Thai(datePos)
|
|
||||||
: null
|
|
||||||
"
|
|
||||||
label="วันที่รายงานตัว"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon
|
|
||||||
name="event"
|
|
||||||
class="cursor-pointer"
|
|
||||||
style="color: var(--q-primary)"
|
|
||||||
>
|
|
||||||
</q-icon>
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</template>
|
|
||||||
</datepicker>
|
|
||||||
</q-toolbar>
|
|
||||||
<d-table
|
|
||||||
ref="table"
|
|
||||||
:columns="columnsPostition"
|
|
||||||
:rows="rowsPosition"
|
|
||||||
row-key="id"
|
|
||||||
flat
|
|
||||||
bordered
|
|
||||||
:paging="true"
|
|
||||||
dense
|
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
|
||||||
class="tableTb"
|
|
||||||
selection="single"
|
|
||||||
v-model:selected="selectedPos"
|
|
||||||
>
|
|
||||||
<template v-slot:header-selection="scope">
|
|
||||||
<q-checkbox
|
|
||||||
keep-color
|
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
v-model="scope.checkBox"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template v-slot:header="props">
|
|
||||||
<q-tr :props="props">
|
|
||||||
<q-th auto-width />
|
|
||||||
<q-th
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
>
|
|
||||||
<span class="text-weight-medium">{{
|
|
||||||
col.label
|
|
||||||
}}</span>
|
|
||||||
</q-th>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
<template v-slot:body="props">
|
|
||||||
<q-tr :props="props">
|
|
||||||
<q-td>
|
|
||||||
<q-checkbox
|
|
||||||
keep-color
|
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
v-model="props.selected"
|
|
||||||
/>
|
|
||||||
</q-td>
|
|
||||||
<q-td
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
>
|
|
||||||
<div v-if="col.name == 'no'">
|
|
||||||
{{ props.rowIndex + 1 }}
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-else-if="col.name === 'posMasterNo'"
|
|
||||||
>
|
|
||||||
{{
|
|
||||||
props.row.isSit
|
|
||||||
? col.value + " " + "(ทับที่)"
|
|
||||||
: col.value
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-else-if="col.name === 'positionArea'"
|
|
||||||
class="table_ellipsis"
|
|
||||||
>
|
|
||||||
{{
|
|
||||||
props.row.positionArea
|
|
||||||
? props.row.positionArea
|
|
||||||
: "-"
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value ? col.value : "-" }}
|
|
||||||
</div>
|
|
||||||
</q-td>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
</div>
|
|
||||||
</q-tab-panel>
|
|
||||||
</q-tab-panels>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-tab-panel>
|
</q-item>
|
||||||
</q-tab-panels>
|
</template>
|
||||||
</q-card>
|
</q-tree>
|
||||||
</div>
|
</q-card>
|
||||||
</q-card-section>
|
<q-card bordered class="col-12 col-sm-9 q-pa-sm">
|
||||||
<q-separator />
|
<q-tab-panels
|
||||||
|
v-model="nodeId"
|
||||||
|
animated
|
||||||
|
transition-prev="jump-up"
|
||||||
|
transition-next="jump-up"
|
||||||
|
>
|
||||||
|
<q-tab-panel
|
||||||
|
v-for="(item, index) in itemTaps"
|
||||||
|
:key="index"
|
||||||
|
:name="item"
|
||||||
|
>
|
||||||
|
<div class="column q-col-gutter-sm">
|
||||||
|
<!-- เลือกตำแหน่งเลขที่ -->
|
||||||
|
<div class="col-7">
|
||||||
|
<q-card
|
||||||
|
bordered
|
||||||
|
style="height: 100%; border: 1px solid #d6dee1"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md"
|
||||||
|
>
|
||||||
|
เลือกตำแหน่งเลขที่
|
||||||
|
</div>
|
||||||
|
<div class="col-12"><q-separator /></div>
|
||||||
|
<div class="col-12 q-pa-md">
|
||||||
|
<q-toolbar style="padding: 0px">
|
||||||
|
<div class="row q-gutter-md">
|
||||||
|
<q-checkbox
|
||||||
|
keep-color
|
||||||
|
v-model="isBlank"
|
||||||
|
label="แสดงเฉพาะตำแหน่งว่าง"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
|
<q-tooltip>แสดงเฉพาะตำแหน่งว่าง </q-tooltip>
|
||||||
|
</q-checkbox>
|
||||||
|
</div>
|
||||||
|
<q-space />
|
||||||
|
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
<div class="row q-gutter-md">
|
||||||
<q-btn label="บันทึก" color="secondary" type="submit"
|
<q-checkbox
|
||||||
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
keep-color
|
||||||
>
|
v-model="isAll"
|
||||||
</q-card-actions>
|
label="แสดงตำแหน่งทั้งหมด"
|
||||||
</q-form>
|
color="primary"
|
||||||
|
>
|
||||||
|
<q-tooltip
|
||||||
|
>แสดงตำแหน่งทั้งหมดภายใต้หน่วยงาน/ส่วนราชการที่เลือก</q-tooltip
|
||||||
|
>
|
||||||
|
</q-checkbox>
|
||||||
|
<div>
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
v-model="filters"
|
||||||
|
label="ค้นหา"
|
||||||
|
@keydown.enter.prevent="onSearch"
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon name="search" color="grey-5" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<q-select
|
||||||
|
v-model="visibleColumns"
|
||||||
|
multiple
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
emit-value
|
||||||
|
:display-value="$q.lang.table.columns"
|
||||||
|
map-options
|
||||||
|
:options="columns"
|
||||||
|
option-value="name"
|
||||||
|
style="min-width: 140px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-toolbar>
|
||||||
|
<d-table
|
||||||
|
ref="table"
|
||||||
|
:columns="columns"
|
||||||
|
:rows="positionNo"
|
||||||
|
row-key="id"
|
||||||
|
flat
|
||||||
|
bordered
|
||||||
|
:paging="true"
|
||||||
|
dense
|
||||||
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
|
class="tableTb"
|
||||||
|
:visible-columns="visibleColumns"
|
||||||
|
>
|
||||||
|
<template v-slot:header="props">
|
||||||
|
<q-tr :props="props">
|
||||||
|
<q-th
|
||||||
|
v-for="col in props.cols"
|
||||||
|
:key="col.name"
|
||||||
|
:props="props"
|
||||||
|
>
|
||||||
|
<span class="text-weight-medium">{{
|
||||||
|
col.label
|
||||||
|
}}</span>
|
||||||
|
</q-th>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<template v-slot:body="props">
|
||||||
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
|
<q-td
|
||||||
|
v-for="col in props.cols"
|
||||||
|
:key="col.name"
|
||||||
|
:props="props"
|
||||||
|
@click="onClickSelectPos(props.row.id)"
|
||||||
|
:class="{
|
||||||
|
'text-red': props.row.isCondition === true,
|
||||||
|
'bg-blue-2': props.row.id === positionId,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<div v-if="col.name == 'no'">
|
||||||
|
{{ props.rowIndex + 1 }}
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.name === 'posMasterNo'">
|
||||||
|
{{
|
||||||
|
props.row.isSit
|
||||||
|
? col.value + " " + "(ทับที่)"
|
||||||
|
: col.value
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.name === 'isPosition'">
|
||||||
|
<div v-if="col.value">
|
||||||
|
<q-icon
|
||||||
|
name="done"
|
||||||
|
color="primary"
|
||||||
|
size="24px"
|
||||||
|
>
|
||||||
|
<q-tooltip>ตรงตามตำแหน่ง </q-tooltip>
|
||||||
|
</q-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else>
|
||||||
|
{{ col.value ? col.value : "-" }}
|
||||||
|
</div>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
</d-table>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- เลือกตำแหน่ง -->
|
||||||
|
<div class="col-5">
|
||||||
|
<q-card
|
||||||
|
bordered
|
||||||
|
style="min-height: 30vh; border: 1px solid #d6dee1"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md"
|
||||||
|
>
|
||||||
|
เลือกตำแหน่ง
|
||||||
|
</div>
|
||||||
|
<div class="col-12"><q-separator /></div>
|
||||||
|
<q-tab-panels
|
||||||
|
v-model="positionId"
|
||||||
|
animated
|
||||||
|
swipeable
|
||||||
|
vertical
|
||||||
|
transition-prev="jump-up"
|
||||||
|
transition-next="jump-up"
|
||||||
|
>
|
||||||
|
<q-tab-panel
|
||||||
|
v-for="(item, index) in positionData"
|
||||||
|
:key="index"
|
||||||
|
:name="item.id"
|
||||||
|
>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-toolbar style="padding: 0px">
|
||||||
|
<datepicker
|
||||||
|
menu-class-name="modalfix"
|
||||||
|
v-model="datePos"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
borderless
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
:min-date="datePos"
|
||||||
|
>
|
||||||
|
<template #year="{ year }">
|
||||||
|
{{ year + 543 }}
|
||||||
|
</template>
|
||||||
|
<template #year-overlay-value="{ value }">
|
||||||
|
{{ parseInt(value + 543) }}
|
||||||
|
</template>
|
||||||
|
<template #trigger>
|
||||||
|
<q-input
|
||||||
|
ref="dateRef"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
hide-bottom-space
|
||||||
|
:model-value="
|
||||||
|
datePos != null
|
||||||
|
? date2Thai(datePos)
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
label="วันที่รายงานตัว"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</template>
|
||||||
|
</datepicker>
|
||||||
|
</q-toolbar>
|
||||||
|
<d-table
|
||||||
|
ref="table"
|
||||||
|
:columns="columnsPostition"
|
||||||
|
:rows="rowsPosition"
|
||||||
|
row-key="id"
|
||||||
|
flat
|
||||||
|
bordered
|
||||||
|
:paging="true"
|
||||||
|
dense
|
||||||
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
|
class="tableTb"
|
||||||
|
selection="single"
|
||||||
|
v-model:selected="selectedPos"
|
||||||
|
>
|
||||||
|
<template v-slot:header-selection="scope">
|
||||||
|
<q-checkbox
|
||||||
|
keep-color
|
||||||
|
color="primary"
|
||||||
|
dense
|
||||||
|
v-model="scope.checkBox"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template v-slot:header="props">
|
||||||
|
<q-tr :props="props">
|
||||||
|
<q-th auto-width />
|
||||||
|
<q-th
|
||||||
|
v-for="col in props.cols"
|
||||||
|
:key="col.name"
|
||||||
|
:props="props"
|
||||||
|
>
|
||||||
|
<span class="text-weight-medium">{{
|
||||||
|
col.label
|
||||||
|
}}</span>
|
||||||
|
</q-th>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<template v-slot:body="props">
|
||||||
|
<q-tr :props="props">
|
||||||
|
<q-td>
|
||||||
|
<q-checkbox
|
||||||
|
keep-color
|
||||||
|
color="primary"
|
||||||
|
dense
|
||||||
|
v-model="props.selected"
|
||||||
|
/>
|
||||||
|
</q-td>
|
||||||
|
<q-td
|
||||||
|
v-for="col in props.cols"
|
||||||
|
:key="col.name"
|
||||||
|
:props="props"
|
||||||
|
>
|
||||||
|
<div v-if="col.name == 'no'">
|
||||||
|
{{ props.rowIndex + 1 }}
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.name === 'posMasterNo'">
|
||||||
|
{{
|
||||||
|
props.row.isSit
|
||||||
|
? col.value + " " + "(ทับที่)"
|
||||||
|
: col.value
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-else-if="col.name === 'positionArea'"
|
||||||
|
class="table_ellipsis"
|
||||||
|
>
|
||||||
|
{{
|
||||||
|
props.row.positionArea
|
||||||
|
? props.row.positionArea
|
||||||
|
: "-"
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else>
|
||||||
|
{{ col.value ? col.value : "-" }}
|
||||||
|
</div>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
</d-table>
|
||||||
|
</div>
|
||||||
|
</q-tab-panel>
|
||||||
|
</q-tab-panels>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-tab-panel>
|
||||||
|
</q-tab-panels>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
</q-card-section>
|
||||||
|
<q-separator />
|
||||||
|
|
||||||
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
|
<q-btn label="บันทึก" color="secondary" type="submit" @click="onSubmit"
|
||||||
|
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ const {
|
||||||
hideLoader,
|
hideLoader,
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dialogMessageNotify,
|
dialogMessageNotify,
|
||||||
|
onSearchDataTable
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
@ -57,6 +58,7 @@ const isAll = ref<boolean>(false);
|
||||||
const isBlank = ref<boolean>(false);
|
const isBlank = ref<boolean>(false);
|
||||||
const posMasterMain = ref<any[]>([]);
|
const posMasterMain = ref<any[]>([]);
|
||||||
const positionNo = ref<DataPositionNo[]>([]);
|
const positionNo = ref<DataPositionNo[]>([]);
|
||||||
|
const rowsData = ref<DataPositionNo[]>([]);
|
||||||
const itemTaps = ref<string[]>();
|
const itemTaps = ref<string[]>();
|
||||||
const filters = ref<string>("");
|
const filters = ref<string>("");
|
||||||
const positionId = ref<string>("");
|
const positionId = ref<string>("");
|
||||||
|
|
@ -278,6 +280,7 @@ async function getDataTable(id: string, level: number = 0) {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
positionNo.value = listPosNo;
|
positionNo.value = listPosNo;
|
||||||
|
rowsData.value = listPosNo;
|
||||||
// positionData.value = listPosNo;
|
// positionData.value = listPosNo;
|
||||||
|
|
||||||
if (props.dataRows?.posmasterId) {
|
if (props.dataRows?.posmasterId) {
|
||||||
|
|
@ -485,6 +488,15 @@ function onSubmit() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSearch() {
|
||||||
|
positionNo.value = onSearchDataTable(
|
||||||
|
filters.value,
|
||||||
|
rowsData.value,
|
||||||
|
columns.value ? columns.value : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchTree();
|
fetchTree();
|
||||||
});
|
});
|
||||||
|
|
@ -492,7 +504,6 @@ onMounted(() => {
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="modal" persistent full-width>
|
<q-dialog v-model="modal" persistent full-width>
|
||||||
<q-card class="no-scroll">
|
<q-card class="no-scroll">
|
||||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
|
||||||
<DialogHeader :tittle="title" :close="close" />
|
<DialogHeader :tittle="title" :close="close" />
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section style="max-height: 80vh" class="scroll">
|
<q-card-section style="max-height: 80vh" class="scroll">
|
||||||
|
|
@ -612,6 +623,7 @@ onMounted(() => {
|
||||||
dense
|
dense
|
||||||
v-model="filters"
|
v-model="filters"
|
||||||
label="ค้นหา"
|
label="ค้นหา"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" color="grey-5" />
|
<q-icon name="search" color="grey-5" />
|
||||||
|
|
@ -639,7 +651,6 @@ onMounted(() => {
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="positionNo.length !== 0 ? positionNo : []"
|
:rows="positionNo.length !== 0 ? positionNo : []"
|
||||||
:filter="filters"
|
|
||||||
row-key="id"
|
row-key="id"
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
|
|
@ -862,11 +873,10 @@ onMounted(() => {
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
<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-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-form>
|
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const storeCommand = useCommandMainStore();
|
const storeCommand = useCommandMainStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, date2Thai } = mixin;
|
const { dialogConfirm, date2Thai,onSearchDataTable } = mixin;
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
Modal: Boolean,
|
Modal: Boolean,
|
||||||
|
|
@ -23,8 +23,6 @@ const props = defineProps({
|
||||||
fetchData: Function,
|
fetchData: Function,
|
||||||
nextPage: Function,
|
nextPage: Function,
|
||||||
optionsType: Array,
|
optionsType: Array,
|
||||||
rows2: Array as PropType<PersonData[]>,
|
|
||||||
filterKeyword2: String,
|
|
||||||
type: String,
|
type: String,
|
||||||
});
|
});
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
|
|
@ -33,7 +31,10 @@ const emit = defineEmits([
|
||||||
"update:selected",
|
"update:selected",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const rows = ref<PersonData[]>([]); //ราชชื่อส่งไปออกคำสั่ง
|
const filterKeyword2 = defineModel<string>('filterKeyword2',{required:true})
|
||||||
|
const rows = defineModel<PersonData[]>('rows',{required:true})
|
||||||
|
const rowsData = defineModel<PersonData[]>('rowsData',{required:true})
|
||||||
|
|
||||||
const selected = ref<PersonData[]>([]); //ราชชื่อที่เลือกส่งไปออกคำสั่ง
|
const selected = ref<PersonData[]>([]); //ราชชื่อที่เลือกส่งไปออกคำสั่ง
|
||||||
const dataMapToSend = computed(() => {
|
const dataMapToSend = computed(() => {
|
||||||
return selected.value.map((i: any) => ({
|
return selected.value.map((i: any) => ({
|
||||||
|
|
@ -92,6 +93,11 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
field: "fullname",
|
field: "fullname",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (val, row) => {
|
||||||
|
return row.firstName
|
||||||
|
? `${row.prefix}${row.firstName} ${row.lastName}`
|
||||||
|
: "-";
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "organizationName",
|
name: "organizationName",
|
||||||
|
|
@ -154,7 +160,7 @@ function clickAddlist() {
|
||||||
|
|
||||||
/** ฟังก์ชันเลือกประเภทคำสั่ง */
|
/** ฟังก์ชันเลือกประเภทคำสั่ง */
|
||||||
function filterSelectOrder() {
|
function filterSelectOrder() {
|
||||||
const data = props.rows2 ? props.rows2 : [];
|
const data = rowsData.value ? rowsData.value : [];
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
rows.value = data.filter((v: PersonData) => {
|
rows.value = data.filter((v: PersonData) => {
|
||||||
switch (commandType.value) {
|
switch (commandType.value) {
|
||||||
|
|
@ -183,6 +189,14 @@ function filterSelector(val: string, update: Function) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSearch() {
|
||||||
|
rows.value = onSearchDataTable(
|
||||||
|
filterKeyword2.value,
|
||||||
|
rowsData.value,
|
||||||
|
columns2.value ? columns2.value : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เมื่อ props.modal เป็น true
|
* เมื่อ props.modal เป็น true
|
||||||
*
|
*
|
||||||
|
|
@ -192,7 +206,7 @@ watch(
|
||||||
() => props.Modal,
|
() => props.Modal,
|
||||||
async () => {
|
async () => {
|
||||||
if (props.Modal === true) {
|
if (props.Modal === true) {
|
||||||
rows.value = props.rows2 ? props.rows2 : [];
|
rows.value = rowsData.value ? rowsData.value : [];
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
commandType.value = "";
|
commandType.value = "";
|
||||||
const data = await storeCommand.getCommandTypes();
|
const data = await storeCommand.getCommandTypes();
|
||||||
|
|
@ -247,9 +261,9 @@ watch(
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
debounce="300"
|
debounce="300"
|
||||||
:model-value="filterKeyword2"
|
v-model="filterKeyword2"
|
||||||
@update:model-value="updateInput"
|
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -275,7 +289,6 @@ watch(
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns2"
|
:columns="columns2"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:filter="filterKeyword2"
|
|
||||||
row-key="profileId"
|
row-key="profileId"
|
||||||
flat
|
flat
|
||||||
:visible-columns="visibleColumns2"
|
:visible-columns="visibleColumns2"
|
||||||
|
|
@ -308,15 +321,6 @@ watch(
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'fullname'">
|
|
||||||
{{
|
|
||||||
props.row.firstName
|
|
||||||
? `${props.row.prefix ?? ""}${
|
|
||||||
props.row.firstName ?? ""
|
|
||||||
} ${props.row.lastName ?? ""}`
|
|
||||||
: "-"
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- <div v-else-if="col.name == 'status'">
|
<!-- <div v-else-if="col.name == 'status'">
|
||||||
{{ props.row.status ? statusText(props.row.status) : "-" }}
|
{{ props.row.status ? statusText(props.row.status) : "-" }}
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,7 @@ const $q = useQuasar();
|
||||||
const storeFn = useTransferDataStore();
|
const storeFn = useTransferDataStore();
|
||||||
const storeCommand = useCommandMainStore();
|
const storeCommand = useCommandMainStore();
|
||||||
const { statusText } = storeFn;
|
const { statusText } = storeFn;
|
||||||
const {
|
const { dialogConfirm, onSearchDataTable, date2Thai } = useCounterMixin();
|
||||||
dialogConfirm,
|
|
||||||
|
|
||||||
date2Thai,
|
|
||||||
} = useCounterMixin();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* props
|
* props
|
||||||
|
|
@ -34,8 +30,6 @@ const props = defineProps({
|
||||||
fetchData: Function,
|
fetchData: Function,
|
||||||
nextPage: Function,
|
nextPage: Function,
|
||||||
optionsType: Array,
|
optionsType: Array,
|
||||||
rows2: Array as PropType<PersonData[]>,
|
|
||||||
filterKeyword2: String,
|
|
||||||
type: String,
|
type: String,
|
||||||
});
|
});
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
|
|
@ -44,10 +38,14 @@ const emit = defineEmits([
|
||||||
"update:selected",
|
"update:selected",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const filterKeyword2 = defineModel<string>("filterKeyword2", {
|
||||||
|
required: true,
|
||||||
|
});
|
||||||
|
const rows = defineModel<PersonData[]>("rows", { required: true });
|
||||||
|
const rowsData = defineModel<PersonData[]>("rowsData", { required: true });
|
||||||
/**
|
/**
|
||||||
* table
|
* table
|
||||||
*/
|
*/
|
||||||
const rows = ref<PersonData[]>([]); //ราชชื่อส่งไปออกคำสั่ง
|
|
||||||
const selected = ref<PersonData[]>([]); //ราชชื่อที่เลือกส่งไปออกคำสั่ง
|
const selected = ref<PersonData[]>([]); //ราชชื่อที่เลือกส่งไปออกคำสั่ง
|
||||||
const dataMapToSend = computed(() => {
|
const dataMapToSend = computed(() => {
|
||||||
return selected.value.map((i: any) => ({
|
return selected.value.map((i: any) => ({
|
||||||
|
|
@ -96,6 +94,11 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
field: "fullname",
|
field: "fullname",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (val, row) => {
|
||||||
|
return row.firstName
|
||||||
|
? `${row.prefix}${row.firstName} ${row.lastName}`
|
||||||
|
: "-";
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "organizationName",
|
name: "organizationName",
|
||||||
|
|
@ -170,7 +173,7 @@ function sendToCommand() {
|
||||||
|
|
||||||
/** ฟังก์ชันเลือกประเภทคำสั่ง */
|
/** ฟังก์ชันเลือกประเภทคำสั่ง */
|
||||||
function filterSelectOrder() {
|
function filterSelectOrder() {
|
||||||
const data = props.rows2 ? props.rows2 : [];
|
const data = rowsData.value;
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
rows.value = data.filter((v: PersonData) => {
|
rows.value = data.filter((v: PersonData) => {
|
||||||
switch (commandType.value) {
|
switch (commandType.value) {
|
||||||
|
|
@ -202,6 +205,14 @@ function filterSelector(val: string, update: Function) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSearch() {
|
||||||
|
rows.value = onSearchDataTable(
|
||||||
|
filterKeyword2.value,
|
||||||
|
rowsData.value,
|
||||||
|
columns2.value ? columns2.value : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เมื่อ props.modal เป็น true
|
* เมื่อ props.modal เป็น true
|
||||||
* กำหนดให้ selected เป็นค่าว่าง
|
* กำหนดให้ selected เป็นค่าว่าง
|
||||||
|
|
@ -210,9 +221,6 @@ watch(
|
||||||
() => props.Modal,
|
() => props.Modal,
|
||||||
async () => {
|
async () => {
|
||||||
if (props.Modal === true) {
|
if (props.Modal === true) {
|
||||||
rows.value = props.rows2 ? props.rows2 : [];
|
|
||||||
console.log(rows.value);
|
|
||||||
|
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
commandType.value = "";
|
commandType.value = "";
|
||||||
const data = await storeCommand.getCommandTypes();
|
const data = await storeCommand.getCommandTypes();
|
||||||
|
|
@ -267,9 +275,9 @@ watch(
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
debounce="300"
|
debounce="300"
|
||||||
:model-value="filterKeyword2"
|
v-model="filterKeyword2"
|
||||||
@update:model-value="updateInput"
|
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -295,7 +303,6 @@ watch(
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns2"
|
:columns="columns2"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:filter="filterKeyword2"
|
|
||||||
row-key="profileId"
|
row-key="profileId"
|
||||||
flat
|
flat
|
||||||
:visible-columns="visibleColumns2"
|
:visible-columns="visibleColumns2"
|
||||||
|
|
@ -329,15 +336,6 @@ watch(
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'fullname'">
|
|
||||||
{{
|
|
||||||
props.row.firstName
|
|
||||||
? `${props.row.prefix ?? ""}${
|
|
||||||
props.row.firstName ?? ""
|
|
||||||
} ${props.row.lastName ?? ""}`
|
|
||||||
: "-"
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else-if="col.name == 'status'">
|
<div v-else-if="col.name == 'status'">
|
||||||
{{
|
{{
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
|
||||||
/** use*/
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { statusText } = useTransferDataStore();
|
const { statusText } = useTransferDataStore();
|
||||||
const { dialogConfirm, findOrgNameOld, findPosMasterNoOld, date2Thai } =
|
const { dialogConfirm, findOrgNameOld, findPosMasterNoOld, date2Thai,onSearchDataTable } =
|
||||||
useCounterMixin();
|
useCounterMixin();
|
||||||
|
|
||||||
/** props*/
|
/** props*/
|
||||||
|
|
@ -24,9 +24,12 @@ const props = defineProps({
|
||||||
Modal: Boolean,
|
Modal: Boolean,
|
||||||
closeModal: Function,
|
closeModal: Function,
|
||||||
getData: Function,
|
getData: Function,
|
||||||
rows2: Array,
|
|
||||||
filterKeyword2: String,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const rows2 = defineModel<any[]>('rows2',{required:true})
|
||||||
|
const rows2Data = defineModel<any[]>('rows2Data',{required:true})
|
||||||
|
const filterKeyword2 = defineModel<string>('filterKeyword2',{required:true})
|
||||||
|
|
||||||
const emit = defineEmits(["update:filterKeyword2", "update:selected"]);
|
const emit = defineEmits(["update:filterKeyword2", "update:selected"]);
|
||||||
|
|
||||||
/** Table*/
|
/** Table*/
|
||||||
|
|
@ -214,6 +217,14 @@ watch(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
function onSearch() {
|
||||||
|
rows2.value= onSearchDataTable(
|
||||||
|
filterKeyword2.value,
|
||||||
|
rows2Data.value,
|
||||||
|
columns2.value? columns2.value: []
|
||||||
|
);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -230,9 +241,9 @@ watch(
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
debounce="300"
|
debounce="300"
|
||||||
:model-value="filterKeyword2"
|
v-model="filterKeyword2"
|
||||||
@update:model-value="updateInput"
|
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append> <q-icon name="search" /> </template>
|
<template v-slot:append> <q-icon name="search" /> </template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -256,7 +267,6 @@ watch(
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns2"
|
:columns="columns2"
|
||||||
:rows="rows2"
|
:rows="rows2"
|
||||||
:filter="filterKeyword2"
|
|
||||||
row-key="id"
|
row-key="id"
|
||||||
class="custom-header-table"
|
class="custom-header-table"
|
||||||
:visible-columns="visibleColumns2"
|
:visible-columns="visibleColumns2"
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ const $q = useQuasar();
|
||||||
const storeCommand = useCommandMainStore();
|
const storeCommand = useCommandMainStore();
|
||||||
const storeFn = useTransferDataStore();
|
const storeFn = useTransferDataStore();
|
||||||
const { statusText } = storeFn;
|
const { statusText } = storeFn;
|
||||||
const { dialogConfirm, date2Thai } = useCounterMixin();
|
const { dialogConfirm, date2Thai, onSearchDataTable } = useCounterMixin();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* props
|
* props
|
||||||
|
|
@ -29,8 +29,6 @@ const props = defineProps({
|
||||||
resetFilter: Function,
|
resetFilter: Function,
|
||||||
fecthlistOthet: Function,
|
fecthlistOthet: Function,
|
||||||
optionsType: Array,
|
optionsType: Array,
|
||||||
rows2: Array as PropType<listMain[]>,
|
|
||||||
filterKeyword2: String,
|
|
||||||
type: String,
|
type: String,
|
||||||
});
|
});
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
|
|
@ -39,8 +37,12 @@ const emit = defineEmits([
|
||||||
"update:selected",
|
"update:selected",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const filterKeyword2 = defineModel<string>("filterKeyword2", {
|
||||||
|
required: true,
|
||||||
|
});
|
||||||
|
const rows = defineModel<listMain[]>("rows", { required: true });
|
||||||
|
const rowsData = defineModel<listMain[]>("rowsData", { required: true });
|
||||||
//Table
|
//Table
|
||||||
const rows = ref<listMain[]>([]); //ราชชื่อส่งไปออกคำสั่ง
|
|
||||||
const selected = ref<listMain[]>([]); //ราชชื่อที่เลือกส่งไปออกคำสั่ง
|
const selected = ref<listMain[]>([]); //ราชชื่อที่เลือกส่งไปออกคำสั่ง
|
||||||
const dataMapToSend = computed(() => {
|
const dataMapToSend = computed(() => {
|
||||||
return selected.value.map((i: any) => ({
|
return selected.value.map((i: any) => ({
|
||||||
|
|
@ -174,6 +176,14 @@ function filterSelector(val: string, update: Function) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSearch() {
|
||||||
|
rows.value = onSearchDataTable(
|
||||||
|
filterKeyword2.value,
|
||||||
|
rowsData.value,
|
||||||
|
columns2.value ? columns2.value : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เมื่อ props.modal เป็น tru
|
* เมื่อ props.modal เป็น tru
|
||||||
* กำหนดให้ selected เป็นค่าว่าง
|
* กำหนดให้ selected เป็นค่าว่าง
|
||||||
|
|
@ -182,7 +192,7 @@ watch(
|
||||||
() => props.Modal,
|
() => props.Modal,
|
||||||
async () => {
|
async () => {
|
||||||
if (props.Modal === true) {
|
if (props.Modal === true) {
|
||||||
rows.value = props.rows2 ? props.rows2 : [];
|
rows.value = rowsData.value ? rowsData.value : [];
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
commandType.value = "";
|
commandType.value = "";
|
||||||
const data = await storeCommand.getCommandTypes();
|
const data = await storeCommand.getCommandTypes();
|
||||||
|
|
@ -239,9 +249,9 @@ watch(
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
debounce="300"
|
debounce="300"
|
||||||
:model-value="filterKeyword2"
|
v-model="filterKeyword2"
|
||||||
@update:model-value="updateInput"
|
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -266,8 +276,7 @@ watch(
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns2"
|
:columns="columns2"
|
||||||
:rows="props.rows2"
|
:rows="rows"
|
||||||
:filter="filterKeyword2"
|
|
||||||
row-key="profileId"
|
row-key="profileId"
|
||||||
flat
|
flat
|
||||||
:visible-columns="visibleColumns2"
|
:visible-columns="visibleColumns2"
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ const mixin = useCounterMixin();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const DataStore = usePlacementDataStore();
|
const DataStore = usePlacementDataStore();
|
||||||
const storeCommand = useCommandMainStore();
|
const storeCommand = useCommandMainStore();
|
||||||
const { dialogConfirm, dateText } = mixin;
|
const { dialogConfirm, dateText,onSearchDataTable } = mixin;
|
||||||
|
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
/** props */
|
/** props */
|
||||||
|
|
@ -32,6 +32,7 @@ const props = defineProps({
|
||||||
|
|
||||||
const examId = route.params.examId;
|
const examId = route.params.examId;
|
||||||
const rows = ref<any[]>([]);
|
const rows = ref<any[]>([]);
|
||||||
|
const rowsData = ref<any[]>([]);
|
||||||
const commandType = ref<string>("");
|
const commandType = ref<string>("");
|
||||||
const commandOp = ref<ListCommand[]>([]);
|
const commandOp = ref<ListCommand[]>([]);
|
||||||
const listCommand = ref<ListCommand[]>([]); // เก็บคำสั่งทั้งหมด
|
const listCommand = ref<ListCommand[]>([]); // เก็บคำสั่งทั้งหมด
|
||||||
|
|
@ -175,6 +176,7 @@ function filterSelectOrder() {
|
||||||
const data = props.rows ? props.rows : [];
|
const data = props.rows ? props.rows : [];
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
rowsData.value = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ปิด Modal และล้างค่าที่เลือก */
|
/** ปิด Modal และล้างค่าที่เลือก */
|
||||||
|
|
@ -182,6 +184,16 @@ function closeModal() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
commandType.value = "";
|
commandType.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function onSearch() {
|
||||||
|
rows.value = onSearchDataTable(
|
||||||
|
filter.value,
|
||||||
|
rowsData.value,
|
||||||
|
columns.value ? columns.value : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เมื่อ props.modal เป็น true
|
* เมื่อ props.modal เป็น true
|
||||||
* กำหนดให้ selected เป็นค่าว่างและกำหนด filter ประเภทตำแหน่งตามประเภทการสอบ
|
* กำหนดให้ selected เป็นค่าว่างและกำหนด filter ประเภทตำแหน่งตามประเภทการสอบ
|
||||||
|
|
@ -191,6 +203,7 @@ watch(
|
||||||
async () => {
|
async () => {
|
||||||
if (modal.value === true) {
|
if (modal.value === true) {
|
||||||
rows.value = props.rows ? props.rows : [];
|
rows.value = props.rows ? props.rows : [];
|
||||||
|
rowsData.value = props.rows ? props.rows : [];
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
commandType.value = "";
|
commandType.value = "";
|
||||||
filter.value = "";
|
filter.value = "";
|
||||||
|
|
@ -259,6 +272,7 @@ watch(
|
||||||
v-model="filter"
|
v-model="filter"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
style="width: 200px; max-width: auto"
|
style="width: 200px; max-width: auto"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -289,7 +303,6 @@ watch(
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:filter="filter"
|
|
||||||
row-key="personalId"
|
row-key="personalId"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ const {
|
||||||
success,
|
success,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
date2Thai,
|
date2Thai,
|
||||||
|
onSearchDataTable
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
/** รับค่ามาจากหน้าหลัก */
|
/** รับค่ามาจากหน้าหลัก */
|
||||||
|
|
@ -63,6 +64,7 @@ const filter = ref<string>("");
|
||||||
const Name = ref<string>();
|
const Name = ref<string>();
|
||||||
const rowsAll = ref<any>([]);
|
const rowsAll = ref<any>([]);
|
||||||
const rows = ref<any[]>([]);
|
const rows = ref<any[]>([]);
|
||||||
|
const rowsData = ref<any[]>([]);
|
||||||
const rowsAwait = ref<any[]>([]);
|
const rowsAwait = ref<any[]>([]);
|
||||||
const rowsFilter = ref<any>([]);
|
const rowsFilter = ref<any>([]);
|
||||||
const rowsOrder = ref<any[]>([]);
|
const rowsOrder = ref<any[]>([]);
|
||||||
|
|
@ -828,6 +830,14 @@ function updatemodalPersonal(modal: boolean) {
|
||||||
modalPersonal.value = modal;
|
modalPersonal.value = modal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSearch() {
|
||||||
|
rows.value = onSearchDataTable(
|
||||||
|
filter.value,
|
||||||
|
rowsAwait.value,
|
||||||
|
columns.value ? columns.value : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getWorkFlow();
|
await getWorkFlow();
|
||||||
await getTable();
|
await getTable();
|
||||||
|
|
@ -840,7 +850,6 @@ onMounted(async () => {
|
||||||
:contain-status="containStatus"
|
:contain-status="containStatus"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:filter="filter"
|
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
v-model:inputfilter="filter"
|
v-model:inputfilter="filter"
|
||||||
v-model:inputvisible="visibleColumns"
|
v-model:inputvisible="visibleColumns"
|
||||||
|
|
@ -849,6 +858,7 @@ onMounted(async () => {
|
||||||
@update-modaladdlist="handleModalAddListUpdate"
|
@update-modaladdlist="handleModalAddListUpdate"
|
||||||
@update-modaladdSendPerson="openModalOrder"
|
@update-modaladdSendPerson="openModalOrder"
|
||||||
@update-new-Rows="onUpdateNewRows"
|
@update-new-Rows="onUpdateNewRows"
|
||||||
|
:onSearch="onSearch"
|
||||||
:history="true"
|
:history="true"
|
||||||
:boss="true"
|
:boss="true"
|
||||||
:saveNoDraft="true"
|
:saveNoDraft="true"
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,10 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
},
|
},
|
||||||
|
onSearch: {
|
||||||
|
type: Function,
|
||||||
|
default: () => console.log("not function"),
|
||||||
|
},
|
||||||
edit: {
|
edit: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
|
|
@ -238,6 +242,7 @@ function onUpdateNewRows() {
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
style="max-width: 200px"
|
style="max-width: 200px"
|
||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,13 @@ const dataMapToSend = computed(() => {
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, date2Thai } = mixin;
|
const { dialogConfirm, date2Thai, onSearchDataTable } = mixin;
|
||||||
|
|
||||||
|
const rows = defineModel<any[]>("rows", { required: true });
|
||||||
|
const rowsData = defineModel<any[]>("rowsData", { required: true });
|
||||||
|
const filterKeyword2 = defineModel<string>("filterKeyword2", {
|
||||||
|
required: true,
|
||||||
|
});
|
||||||
/**
|
/**
|
||||||
* props
|
* props
|
||||||
*/
|
*/
|
||||||
|
|
@ -39,8 +44,6 @@ const props = defineProps({
|
||||||
clickClose: Function,
|
clickClose: Function,
|
||||||
fecthlistRecevice: Function,
|
fecthlistRecevice: Function,
|
||||||
nextPage: Function,
|
nextPage: Function,
|
||||||
rows2: Array,
|
|
||||||
filterKeyword2: String,
|
|
||||||
});
|
});
|
||||||
const emit = defineEmits(["update:filterKeyword2", "update:selected"]);
|
const emit = defineEmits(["update:filterKeyword2", "update:selected"]);
|
||||||
|
|
||||||
|
|
@ -158,6 +161,14 @@ function onReset() {
|
||||||
emit("update:filterKeyword2", "");
|
emit("update:filterKeyword2", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSearch() {
|
||||||
|
rows.value = onSearchDataTable(
|
||||||
|
filterKeyword2.value,
|
||||||
|
rowsData.value,
|
||||||
|
columns2.value ? columns2.value : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เมื่อ props.modal เป็น true
|
* เมื่อ props.modal เป็น true
|
||||||
* กำหนดให้ selected เป็นค่าว่าง
|
* กำหนดให้ selected เป็นค่าว่าง
|
||||||
|
|
@ -186,6 +197,7 @@ watchEffect(() => {
|
||||||
:model-value="filterKeyword2"
|
:model-value="filterKeyword2"
|
||||||
@update:model-value="updateInput"
|
@update:model-value="updateInput"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -216,8 +228,7 @@ watchEffect(() => {
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns2"
|
:columns="columns2"
|
||||||
:rows="rows2"
|
:rows="rows"
|
||||||
:filter="filterKeyword2"
|
|
||||||
row-key="id"
|
row-key="id"
|
||||||
flat
|
flat
|
||||||
:visible-columns="visibleColumns2"
|
:visible-columns="visibleColumns2"
|
||||||
|
|
|
||||||
|
|
@ -16,17 +16,21 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { statusText } = useTransferDataStore();
|
const { statusText } = useTransferDataStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, findPosMasterNoOld, date2Thai } = mixin;
|
const { dialogConfirm, findPosMasterNoOld, date2Thai, onSearchDataTable } =
|
||||||
|
mixin;
|
||||||
|
|
||||||
/** props*/
|
/** props*/
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
Modal: Boolean,
|
Modal: Boolean,
|
||||||
closeModal: Function,
|
closeModal: Function,
|
||||||
getData: Function,
|
getData: Function,
|
||||||
rows2: Array,
|
|
||||||
filterKeyword2: String,
|
|
||||||
});
|
});
|
||||||
const emit = defineEmits(["update:filterKeyword2", "update:selected"]);
|
|
||||||
|
const rows = defineModel<any[]>("rows", { required: true });
|
||||||
|
const rowsData = defineModel<any[]>("rowsData", { required: true });
|
||||||
|
const filterKeyword2 = defineModel<string>("filterKeyword2", {
|
||||||
|
required: true,
|
||||||
|
});
|
||||||
|
|
||||||
//table
|
//table
|
||||||
const selected = ref<officerType[]>([]);
|
const selected = ref<officerType[]>([]);
|
||||||
|
|
@ -167,17 +171,12 @@ function saveOrder() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
function onSearch() {
|
||||||
* อัปเดทค่า filter
|
rows.value = onSearchDataTable(
|
||||||
* @param value คำค้นหา
|
filterKeyword2.value,
|
||||||
*/
|
rowsData.value,
|
||||||
function updateInput(value: string | number | null) {
|
columns2.value ? columns2.value : []
|
||||||
emit("update:filterKeyword2", value);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
/** รีเซ็ตค่าในช่องค้นหา*/
|
|
||||||
function Reset() {
|
|
||||||
emit("update:filterKeyword2", "");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
|
@ -203,9 +202,9 @@ watch(
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
debounce="300"
|
debounce="300"
|
||||||
:model-value="filterKeyword2"
|
v-model="filterKeyword2"
|
||||||
@update:model-value="updateInput"
|
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -229,8 +228,7 @@ watch(
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns2"
|
:columns="columns2"
|
||||||
:rows="rows2"
|
:rows="rows"
|
||||||
:filter="filterKeyword2"
|
|
||||||
row-key="id"
|
row-key="id"
|
||||||
class="custom-header-table"
|
class="custom-header-table"
|
||||||
:visible-columns="visibleColumns2"
|
:visible-columns="visibleColumns2"
|
||||||
|
|
|
||||||
|
|
@ -14,16 +14,17 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { statusText } = useTransferDataStore();
|
const { statusText } = useTransferDataStore();
|
||||||
const { dialogConfirm, date2Thai } = mixin;
|
const { dialogConfirm, date2Thai,onSearchDataTable } = mixin;
|
||||||
|
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
/** props */
|
/** props */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
closeModal: Function,
|
closeModal: Function,
|
||||||
fetchData: 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 สร้างคำสั่ง
|
const modalCommand = ref<boolean>(false); //เปิด-ปิด modal สร้างคำสั่ง
|
||||||
//Table
|
//Table
|
||||||
const selected = ref<ResponseData[]>([]); //รายชื่อที่เลือก
|
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
|
* เมื่อ props.modal เป็น true
|
||||||
* กำหนดให้ selected เป็นค่าว่าง
|
* กำหนดให้ selected เป็นค่าว่าง
|
||||||
|
|
@ -170,6 +179,7 @@ watch(
|
||||||
debounce="300"
|
debounce="300"
|
||||||
v-model="filter"
|
v-model="filter"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -201,7 +211,6 @@ watch(
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns2"
|
:columns="columns2"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:filter="filter"
|
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:visible-columns="visibleColumns2"
|
:visible-columns="visibleColumns2"
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import config from "@/app.config";
|
||||||
const DataStore = usePlacementDataStore();
|
const DataStore = usePlacementDataStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
const { showLoader, hideLoader, messageError, date2Thai,onSearchDataTable } = mixin;
|
||||||
|
|
||||||
const searchYear = ref();
|
const searchYear = ref();
|
||||||
const yearOptions = reactive<DataOption[]>([{ id: 0, name: "ทั้งหมด" }]);
|
const yearOptions = reactive<DataOption[]>([{ id: 0, name: "ทั้งหมด" }]);
|
||||||
|
|
@ -26,6 +26,7 @@ const yearOptionsFn = ref<any>([]);
|
||||||
|
|
||||||
/**ข้อมูลตาราง (จำลอง)*/
|
/**ข้อมูลตาราง (จำลอง)*/
|
||||||
const rows = ref<QTableProps["rows"]>([]);
|
const rows = ref<QTableProps["rows"]>([]);
|
||||||
|
const rowsData = ref<any[]>([]);
|
||||||
|
|
||||||
/** ค้นหาในตาราง */
|
/** ค้นหาในตาราง */
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
|
|
@ -164,7 +165,8 @@ async function fetchPlacementData(val: number) {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
dataPlacement.value = data;
|
dataPlacement.value = data;
|
||||||
DataStore.DataMainOrig = dataPlacement.value;
|
DataStore.DataMainOrig = dataPlacement.value;
|
||||||
rows.value = DataStore.DataMainOrig.map((e: any) => ({
|
const listData =
|
||||||
|
DataStore.DataMainOrig.map((e: any) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
examRound: e.examRound,
|
examRound: e.examRound,
|
||||||
examOrder: e.examOrder,
|
examOrder: e.examOrder,
|
||||||
|
|
@ -176,6 +178,8 @@ async function fetchPlacementData(val: number) {
|
||||||
fiscalYear: e.fiscalYear,
|
fiscalYear: e.fiscalYear,
|
||||||
numberOfCandidates: e.numberOfCandidates,
|
numberOfCandidates: e.numberOfCandidates,
|
||||||
}));
|
}));
|
||||||
|
rows.value = listData
|
||||||
|
rowsData.value = listData
|
||||||
filterKeyword.value = "";
|
filterKeyword.value = "";
|
||||||
examTime.value = "ทั้งหมด";
|
examTime.value = "ทั้งหมด";
|
||||||
examType.value = "ทั้งหมด";
|
examType.value = "ทั้งหมด";
|
||||||
|
|
@ -374,6 +378,14 @@ function paginationLabel(start: number, end: number, total: number) {
|
||||||
else return start + "-" + end + " ใน " + total;
|
else return start + "-" + end + " ใน " + total;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSearch() {
|
||||||
|
rows.value = onSearchDataTable(
|
||||||
|
filterKeyword.value,
|
||||||
|
rowsData.value,
|
||||||
|
columns.value ? columns.value : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เรียกใช้ฟังชั่น เมื่อเริ่มหน้านี้
|
* เรียกใช้ฟังชั่น เมื่อเริ่มหน้านี้
|
||||||
*/
|
*/
|
||||||
|
|
@ -428,6 +440,7 @@ onMounted(async () => {
|
||||||
outlined
|
outlined
|
||||||
debounce="300"
|
debounce="300"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -540,7 +553,6 @@ onMounted(async () => {
|
||||||
ref="table"
|
ref="table"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:filter="filterKeyword"
|
|
||||||
row-key="id"
|
row-key="id"
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ const dataTransfer = ref<ResponseData[]>([]); //ช่อมูลรายก
|
||||||
const rows = ref<ResponseData[]>([]); //รายการขอโอน
|
const rows = ref<ResponseData[]>([]); //รายการขอโอน
|
||||||
const filterMain = ref<string>(""); //คำค้นหารายการขอโอน
|
const filterMain = ref<string>(""); //คำค้นหารายการขอโอน
|
||||||
const rowsOrder = ref<ResponseData[]>([]); //รายการส่งไปออกคำสั่ง
|
const rowsOrder = ref<ResponseData[]>([]); //รายการส่งไปออกคำสั่ง
|
||||||
|
const rowsOrderData = ref<ResponseData[]>([]); //รายการส่งไปออกคำสั่ง
|
||||||
const filterOrder = ref<string>(""); //คำค้นหารายการส่งไปออกคำสั่ง
|
const filterOrder = ref<string>(""); //คำค้นหารายการส่งไปออกคำสั่ง
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
|
|
@ -154,6 +155,7 @@ function openModalOrder() {
|
||||||
r.date
|
r.date
|
||||||
);
|
);
|
||||||
rowsOrder.value = row;
|
rowsOrder.value = row;
|
||||||
|
rowsOrderData.value = row;
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -328,7 +330,8 @@ const filterAndApply = () => {
|
||||||
v-model:filter-order="filterOrder"
|
v-model:filter-order="filterOrder"
|
||||||
:fetch-data="fetchData"
|
:fetch-data="fetchData"
|
||||||
:close-modal="closeModal"
|
:close-modal="closeModal"
|
||||||
:rows="rowsOrder"
|
v-model:rows="rowsOrder"
|
||||||
|
v-model:rowsData="rowsOrderData"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ const {
|
||||||
messageError,
|
messageError,
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
|
onSearchDataTable
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const dataRecevice = ref<ResponseData[]>([]); //ข้อมูลรายการรับโอน
|
const dataRecevice = ref<ResponseData[]>([]); //ข้อมูลรายการรับโอน
|
||||||
|
|
@ -52,7 +53,9 @@ const type = ref<string | null>(null);
|
||||||
|
|
||||||
//Table
|
//Table
|
||||||
const rows = ref<ResponseRow[]>([]); //รายการรับโอน
|
const rows = ref<ResponseRow[]>([]); //รายการรับโอน
|
||||||
|
const rowsData = ref<ResponseRow[]>([]); //รายการรับโอน
|
||||||
const rows2 = ref<ResponseRow[]>([]); //รายการออกคำสั่ง
|
const rows2 = ref<ResponseRow[]>([]); //รายการออกคำสั่ง
|
||||||
|
const rows2Data = ref<ResponseRow[]>([]); //รายการออกคำสั่ง
|
||||||
const filterKeyword = ref<string>(""); //คำค้นหารายการรับโอน
|
const filterKeyword = ref<string>(""); //คำค้นหารายการรับโอน
|
||||||
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
|
|
@ -157,6 +160,7 @@ async function fecthlistRecevice() {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
dataRecevice.value = data;
|
dataRecevice.value = data;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
rowsData.value = data;
|
||||||
filters.value = data;
|
filters.value = data;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -227,7 +231,6 @@ function openModalTree(id: string, data: any) {
|
||||||
dataRows.value = data;
|
dataRows.value = data;
|
||||||
modalTree.value = true;
|
modalTree.value = true;
|
||||||
type.value = null;
|
type.value = null;
|
||||||
dataRows.value = data;
|
|
||||||
posType.value = data.posTypeOldId;
|
posType.value = data.posTypeOldId;
|
||||||
posLevel.value = data.posLevelOldId;
|
posLevel.value = data.posLevelOldId;
|
||||||
position.value = data.positionOld;
|
position.value = data.positionOld;
|
||||||
|
|
@ -292,6 +295,7 @@ function openModalOrder() {
|
||||||
);
|
);
|
||||||
|
|
||||||
rows2.value = row;
|
rows2.value = row;
|
||||||
|
rows2Data.value = row;
|
||||||
modal.value = true;
|
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
|
* ทำงานเมื่อมีการเรียกใช้ Components
|
||||||
*/
|
*/
|
||||||
|
|
@ -372,6 +385,7 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
debounce="300"
|
debounce="300"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -403,7 +417,6 @@ onMounted(() => {
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:filter="filterKeyword"
|
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
>
|
>
|
||||||
|
|
@ -610,7 +623,8 @@ onMounted(() => {
|
||||||
v-model:modal="modal"
|
v-model:modal="modal"
|
||||||
v-model:filter-keyword2="filterKeyword2"
|
v-model:filter-keyword2="filterKeyword2"
|
||||||
:click-close="clickClose"
|
:click-close="clickClose"
|
||||||
:rows2="rows2"
|
v-model:rows="rows2"
|
||||||
|
v-model:rowsData="rows2Data"
|
||||||
:fecthlist-recevice="fecthlistRecevice"
|
:fecthlist-recevice="fecthlistRecevice"
|
||||||
:next-page="nextPage"
|
:next-page="nextPage"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ const {
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
findOrgNameOld,
|
findOrgNameOld,
|
||||||
findPosMasterNoOld,
|
findPosMasterNoOld,
|
||||||
|
onSearchDataTable
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -44,7 +45,9 @@ const modal = ref<boolean>(false); //แสดง popup ส่งไปออก
|
||||||
const filterKeyword = ref<string>(""); //คำค้นหารายการช่วยราชการ
|
const filterKeyword = ref<string>(""); //คำค้นหารายการช่วยราชการ
|
||||||
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
||||||
const rows = ref<officerType[]>([]); //รายการช่วยราชการ
|
const rows = ref<officerType[]>([]); //รายการช่วยราชการ
|
||||||
|
const rowsData = ref<officerType[]>([]); //รายการช่วยราชการ
|
||||||
const rows2 = ref<officerType[]>([]); //รายการออกคำสั่ง
|
const rows2 = ref<officerType[]>([]); //รายการออกคำสั่ง
|
||||||
|
const rows2Data = ref<officerType[]>([]); //รายการออกคำสั่ง
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -192,6 +195,7 @@ async function getData() {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
rowsData.value = data;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -246,6 +250,7 @@ function openModalOrder() {
|
||||||
item.dateEnd
|
item.dateEnd
|
||||||
);
|
);
|
||||||
rows2.value = row;
|
rows2.value = row;
|
||||||
|
rows2Data.value = row;
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -265,6 +270,14 @@ function resetFilter() {
|
||||||
filterKeyword2.value = "";
|
filterKeyword2.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSearch() {
|
||||||
|
rows.value = onSearchDataTable(
|
||||||
|
filterKeyword.value,
|
||||||
|
rowsData.value,
|
||||||
|
columns.value ? columns.value : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ทำงานเมื่อมีการเรียกใช้ Components
|
* ทำงานเมื่อมีการเรียกใช้ Components
|
||||||
*/
|
*/
|
||||||
|
|
@ -300,6 +313,7 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
debounce="300"
|
debounce="300"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -326,7 +340,6 @@ onMounted(() => {
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:filter="filterKeyword"
|
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
>
|
>
|
||||||
|
|
@ -406,7 +419,8 @@ onMounted(() => {
|
||||||
v-model:filter-keyword2="filterKeyword2"
|
v-model:filter-keyword2="filterKeyword2"
|
||||||
:get-data="getData"
|
:get-data="getData"
|
||||||
:close-modal="closeModal"
|
:close-modal="closeModal"
|
||||||
:rows2="rows2"
|
v-model:rows2="rows2"
|
||||||
|
v-model:rows2Data="rows2Data"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ const {
|
||||||
success,
|
success,
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
findPosMasterNoOld,
|
findPosMasterNoOld,
|
||||||
|
onSearchDataTable
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
const modal = ref<boolean>(false); // ส่งไปออกคำสั่งส่งตัวกลับ
|
const modal = ref<boolean>(false); // ส่งไปออกคำสั่งส่งตัวกลับ
|
||||||
|
|
@ -35,7 +36,9 @@ const modal = ref<boolean>(false); // ส่งไปออกคำสั่
|
||||||
const filterKeyword = ref<string>(""); //คำค้นหารายการส่งตัวกลับ
|
const filterKeyword = ref<string>(""); //คำค้นหารายการส่งตัวกลับ
|
||||||
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
||||||
const rows = ref<officerType[]>([]); //รายการส่งตัวกลับ
|
const rows = ref<officerType[]>([]); //รายการส่งตัวกลับ
|
||||||
|
const rowsData = ref<officerType[]>([]); //รายการส่งตัวกลับ
|
||||||
const rows2 = ref<officerType[]>([]); //รายการออกคำสั่ง
|
const rows2 = ref<officerType[]>([]); //รายการออกคำสั่ง
|
||||||
|
const rows2Data = ref<officerType[]>([]); //รายการออกคำสั่ง
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -157,6 +160,7 @@ async function getData() {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
rowsData.value = data;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -206,6 +210,7 @@ function openModalOrder() {
|
||||||
);
|
);
|
||||||
|
|
||||||
rows2.value = row;
|
rows2.value = row;
|
||||||
|
rows2Data.value = row;
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -225,6 +230,14 @@ function resetFilter() {
|
||||||
filterKeyword2.value = "";
|
filterKeyword2.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSearch() {
|
||||||
|
rows.value = onSearchDataTable(
|
||||||
|
filterKeyword.value,
|
||||||
|
rowsData.value,
|
||||||
|
columns.value ? columns.value : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ทำงานเมื่อมีการเรียกใช้ Components
|
* ทำงานเมื่อมีการเรียกใช้ Components
|
||||||
*/
|
*/
|
||||||
|
|
@ -260,6 +273,7 @@ onMounted(async () => {
|
||||||
outlined
|
outlined
|
||||||
debounce="300"
|
debounce="300"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -285,7 +299,6 @@ onMounted(async () => {
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:filter="filterKeyword"
|
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
>
|
>
|
||||||
|
|
@ -362,7 +375,8 @@ onMounted(async () => {
|
||||||
v-model:filter-keyword2="filterKeyword2"
|
v-model:filter-keyword2="filterKeyword2"
|
||||||
:get-data="getData"
|
:get-data="getData"
|
||||||
:close-modal="closeModal"
|
:close-modal="closeModal"
|
||||||
:rows2="rows2"
|
v-model:rows="rows2"
|
||||||
|
v-model:rowsData="rows2Data"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ const {
|
||||||
messageError,
|
messageError,
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
|
onSearchDataTable
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
const modal = ref<boolean>(false); //แสดง popup ส่งไปออกคำสั่ง
|
const modal = ref<boolean>(false); //แสดง popup ส่งไปออกคำสั่ง
|
||||||
|
|
@ -48,7 +49,9 @@ const type = ref<string>("");
|
||||||
|
|
||||||
//table
|
//table
|
||||||
const rows = ref<PersonData[]>([]); //รายการแต่งตั้ง-เลื่อน-ย้าย
|
const rows = ref<PersonData[]>([]); //รายการแต่งตั้ง-เลื่อน-ย้าย
|
||||||
|
const rowsData = ref<PersonData[]>([]); //รายการแต่งตั้ง-เลื่อน-ย้าย
|
||||||
const rows2 = ref<PersonData[]>([]); //รายการออกคำสั่ง
|
const rows2 = ref<PersonData[]>([]); //รายการออกคำสั่ง
|
||||||
|
const rows2Data = ref<PersonData[]>([]); //รายการออกคำสั่ง
|
||||||
const filterKeyword = ref<string>(""); //คำค้นหารายการแต่งตั้ง-เลื่อน-ย้าย
|
const filterKeyword = ref<string>(""); //คำค้นหารายการแต่งตั้ง-เลื่อน-ย้าย
|
||||||
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
|
|
@ -167,8 +170,10 @@ async function fecthlistappointment() {
|
||||||
let response = res.data.result;
|
let response = res.data.result;
|
||||||
listRecevice.value = response;
|
listRecevice.value = response;
|
||||||
rows.value = response;
|
rows.value = response;
|
||||||
|
rowsData.value = response;
|
||||||
// รายชื่อ ส่งไปออกคำสั่ง
|
// รายชื่อ ส่งไปออกคำสั่ง
|
||||||
rows2.value = rows.value.filter(
|
const listData =
|
||||||
|
rows.value.filter(
|
||||||
(e: any) =>
|
(e: any) =>
|
||||||
e.root !== null &&
|
e.root !== null &&
|
||||||
e.status !== "REPORT" &&
|
e.status !== "REPORT" &&
|
||||||
|
|
@ -180,6 +185,8 @@ async function fecthlistappointment() {
|
||||||
e.positionNumberOld &&
|
e.positionNumberOld &&
|
||||||
e.positionDate
|
e.positionDate
|
||||||
);
|
);
|
||||||
|
rows2.value = listData
|
||||||
|
rows2Data.value = listData
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -277,6 +284,14 @@ function clickClose() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSearch() {
|
||||||
|
rows.value = onSearchDataTable(
|
||||||
|
filterKeyword.value,
|
||||||
|
rowsData.value,
|
||||||
|
columns.value ? columns.value : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/** ทำงานเมื่อมีการเรียกใช้ Components*/
|
/** ทำงานเมื่อมีการเรียกใช้ Components*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fecthlistappointment();
|
fecthlistappointment();
|
||||||
|
|
@ -313,6 +328,7 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
debounce="300"
|
debounce="300"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -339,7 +355,6 @@ onMounted(() => {
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:filter="filterKeyword"
|
|
||||||
row-key="citizenId"
|
row-key="citizenId"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
|
|
@ -553,7 +568,8 @@ onMounted(() => {
|
||||||
:options-type="optionsType"
|
:options-type="optionsType"
|
||||||
:next-page="nextPage"
|
:next-page="nextPage"
|
||||||
:fetch-data="fecthlistappointment"
|
:fetch-data="fecthlistappointment"
|
||||||
:rows2="rows2"
|
v-model:rows="rows2"
|
||||||
|
v-model:rowsData="rows2Data"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<DialogOrgSelect
|
<DialogOrgSelect
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ const {
|
||||||
messageError,
|
messageError,
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
|
onSearchDataTable
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const personalId = ref<string>("");
|
const personalId = ref<string>("");
|
||||||
|
|
@ -47,7 +48,9 @@ const type = ref<string>("");
|
||||||
|
|
||||||
// Table
|
// Table
|
||||||
const rows = ref<PersonData[]>([]); //รายการปรับระดับชั้นงานลูกจ้าง
|
const rows = ref<PersonData[]>([]); //รายการปรับระดับชั้นงานลูกจ้าง
|
||||||
|
const rowsData = ref<PersonData[]>([]); //รายการปรับระดับชั้นงานลูกจ้าง
|
||||||
const rows2 = ref<PersonData[]>([]); //รายการออกคำสั่ง
|
const rows2 = ref<PersonData[]>([]); //รายการออกคำสั่ง
|
||||||
|
const rows2Data = ref<PersonData[]>([]); //รายการออกคำสั่ง
|
||||||
const filterKeyword = ref<string>(""); //คำค้นหารายการปรับระดับชั้นงานลูกจ้าง
|
const filterKeyword = ref<string>(""); //คำค้นหารายการปรับระดับชั้นงานลูกจ้าง
|
||||||
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
|
|
@ -168,9 +171,11 @@ async function fecthlistappointment() {
|
||||||
let response = await res.data.result;
|
let response = await res.data.result;
|
||||||
listRecevice.value = response;
|
listRecevice.value = response;
|
||||||
rows.value = response;
|
rows.value = response;
|
||||||
|
rowsData.value = response;
|
||||||
|
|
||||||
//หารายชื่อส่งไปออกคำสั่ง
|
//หารายชื่อส่งไปออกคำสั่ง
|
||||||
rows2.value = rows.value.filter(
|
const listData =
|
||||||
|
rows.value.filter(
|
||||||
(e: any) =>
|
(e: any) =>
|
||||||
e.root !== null &&
|
e.root !== null &&
|
||||||
e.status !== "REPORT" &&
|
e.status !== "REPORT" &&
|
||||||
|
|
@ -182,6 +187,8 @@ async function fecthlistappointment() {
|
||||||
e.positionNumberOld &&
|
e.positionNumberOld &&
|
||||||
e.positionDate
|
e.positionDate
|
||||||
);
|
);
|
||||||
|
rows2.value = listData
|
||||||
|
rows2Data.value = listData
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -288,6 +295,14 @@ function onSave(data: any) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSearch() {
|
||||||
|
rows.value = onSearchDataTable(
|
||||||
|
filterKeyword.value,
|
||||||
|
rowsData.value,
|
||||||
|
columns.value ? columns.value : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fecthlistappointment();
|
fecthlistappointment();
|
||||||
});
|
});
|
||||||
|
|
@ -323,6 +338,7 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
debounce="300"
|
debounce="300"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -349,7 +365,6 @@ onMounted(() => {
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:filter="filterKeyword"
|
|
||||||
row-key="citizenId"
|
row-key="citizenId"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
|
|
@ -534,7 +549,8 @@ onMounted(() => {
|
||||||
:options-type="optionsType"
|
:options-type="optionsType"
|
||||||
:next-page="nextPage"
|
:next-page="nextPage"
|
||||||
:fetch-data="fecthlistappointment"
|
:fetch-data="fecthlistappointment"
|
||||||
:rows2="rows2"
|
v-model:rows="rows2"
|
||||||
|
v-model:rowsData="rows2Data"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<DialogOrgSelectEmployee
|
<DialogOrgSelectEmployee
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ const {
|
||||||
messageError,
|
messageError,
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
|
onSearchDataTable,
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
|
|
@ -36,7 +37,9 @@ const modal = ref<boolean>(false);
|
||||||
* Table
|
* Table
|
||||||
*/
|
*/
|
||||||
const rows = ref<listMain[]>([]); //รายการอื่นๆ
|
const rows = ref<listMain[]>([]); //รายการอื่นๆ
|
||||||
|
const rowsData = ref<listMain[]>([]); //รายการอื่นๆ
|
||||||
const rows2 = ref<listMain[]>([]); //รายการออกคำสั่ง
|
const rows2 = ref<listMain[]>([]); //รายการออกคำสั่ง
|
||||||
|
const rows2Data = ref<listMain[]>([]); //รายการออกคำสั่ง
|
||||||
const filterKeyword = ref<string>(""); //คำค้นหารายการอื่นๆ
|
const filterKeyword = ref<string>(""); //คำค้นหารายการอื่นๆ
|
||||||
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
const filterKeyword2 = ref<string>(""); //คำค้นหารายการออกคำสั่ง
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
|
|
@ -138,8 +141,9 @@ async function fecthlistOthet() {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
let response = res.data.result;
|
let response = res.data.result;
|
||||||
rows.value = response;
|
rows.value = response;
|
||||||
|
rowsData.value = response;
|
||||||
// หารายชื่อส่งไปออกคำสั่งอื่นๆ
|
// หารายชื่อส่งไปออกคำสั่งอื่นๆ
|
||||||
rows2.value = rows.value.filter(
|
const listData = rows.value.filter(
|
||||||
(e: listMain) =>
|
(e: listMain) =>
|
||||||
e.status !== "REPORT" &&
|
e.status !== "REPORT" &&
|
||||||
e.status !== "DONE" &&
|
e.status !== "DONE" &&
|
||||||
|
|
@ -150,6 +154,8 @@ async function fecthlistOthet() {
|
||||||
e.positionDate &&
|
e.positionDate &&
|
||||||
e.leaveDate !== null
|
e.leaveDate !== null
|
||||||
);
|
);
|
||||||
|
rows2.value = listData;
|
||||||
|
rows2Data.value = listData;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, 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(() => {
|
onMounted(() => {
|
||||||
fecthlistOthet();
|
fecthlistOthet();
|
||||||
});
|
});
|
||||||
|
|
@ -237,6 +251,7 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
debounce="300"
|
debounce="300"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter="onSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -262,7 +277,6 @@ onMounted(() => {
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:filter="filterKeyword"
|
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
|
|
@ -338,7 +352,8 @@ onMounted(() => {
|
||||||
v-model:Modal="modal"
|
v-model:Modal="modal"
|
||||||
v-model:filter-keyword2="filterKeyword2"
|
v-model:filter-keyword2="filterKeyword2"
|
||||||
:click-close="clickClose"
|
:click-close="clickClose"
|
||||||
:rows2="rows2"
|
v-model:rows="rows2"
|
||||||
|
v-model:rowsData="rows2Data"
|
||||||
:fecthlistOthet="fecthlistOthet"
|
:fecthlistOthet="fecthlistOthet"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue