Merge branch 'develop' into devTee
This commit is contained in:
commit
7ab17d378f
35 changed files with 297 additions and 148 deletions
|
|
@ -404,7 +404,6 @@ onMounted(async () => {
|
|||
v-model="formFilter.keyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
@keyup.enter="(formFilter.page = 1), fetchList()"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ const props = defineProps({
|
|||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
fetchDataTable: Function,
|
||||
});
|
||||
|
||||
const title = ref<string>("ย้ายตำแหน่งจากหน่วยงาน/ส่วนราชการปัจจุบัน"); //title Dialog
|
||||
|
|
@ -93,14 +94,6 @@ const isDisable = computed(() => {
|
|||
} else return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* function รีเช็ด filter
|
||||
*/
|
||||
function resetFilter() {
|
||||
filterTree.value = "";
|
||||
filterRef.value.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* function เลือกข้อมูลหน่วยงาน
|
||||
*/
|
||||
|
|
@ -157,6 +150,12 @@ function updatePagination(newPagination: NewPagination) {
|
|||
reqMaster.value.page = 1;
|
||||
}
|
||||
|
||||
function onSearchData() {
|
||||
reqMaster.value.page = 1;
|
||||
reqMaster.value.keyword = filterTable.value;
|
||||
props.fetchDataTable?.(store.treeId, store.level, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* ดูการเปลี่ยนแปลง modal เมื่อเป็น true
|
||||
*/
|
||||
|
|
@ -165,6 +164,7 @@ watch(
|
|||
() => {
|
||||
reqMaster.value.page = 1;
|
||||
filterTree.value = "";
|
||||
filterTable.value = "";
|
||||
pagination.value.rowsPerPage = reqMaster.value.pageSize;
|
||||
|
||||
title.value = `ย้ายตำแหน่งจากหน่วยงาน/ส่วนราชการปัจจุบัน ${props.mainTree.orgName}`;
|
||||
|
|
@ -190,7 +190,10 @@ watch(
|
|||
>
|
||||
<q-header>
|
||||
<q-toolbar>
|
||||
<HeaderDialog :tittle="title" :close="() => (modal = false)" />
|
||||
<HeaderDialog
|
||||
:tittle="title"
|
||||
:close="() => ((modal = false), (reqMaster.keyword = ''))"
|
||||
/>
|
||||
</q-toolbar>
|
||||
<q-separator color="grey-4" />
|
||||
</q-header>
|
||||
|
|
@ -206,7 +209,13 @@ watch(
|
|||
<q-space />
|
||||
|
||||
<div>
|
||||
<q-input outlined dense v-model="filterTable" label="ค้นหา">
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
v-model="filterTable"
|
||||
label="ค้นหา"
|
||||
@keydown.enter="onSearchData"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
|
|
@ -214,71 +223,72 @@ watch(
|
|||
</div>
|
||||
</q-toolbar>
|
||||
|
||||
<d-table
|
||||
flat
|
||||
bordered
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
row-key="id"
|
||||
:filter="filterTable.trim()"
|
||||
no-data-label="ไม่มีข้อมูล"
|
||||
selection="multiple"
|
||||
v-model:selected="selectedFilter"
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
v-model:pagination="pagination"
|
||||
@update:pagination="updatePagination"
|
||||
>
|
||||
<template v-slot:header-selection="scope">
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="scope.selected"
|
||||
/>
|
||||
</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>
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
flat
|
||||
bordered
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
row-key="id"
|
||||
no-data-label="ไม่มีข้อมูล"
|
||||
selection="multiple"
|
||||
v-model:selected="selectedFilter"
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
v-model:pagination="pagination"
|
||||
@update:pagination="updatePagination"
|
||||
>
|
||||
<template v-slot:header-selection="scope">
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="scope.selected"
|
||||
/>
|
||||
</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'">
|
||||
{{
|
||||
(reqMaster.page - 1) * Number(reqMaster.pageSize) +
|
||||
props.rowIndex +
|
||||
1
|
||||
}}
|
||||
</div>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
>
|
||||
<div v-if="col.name == 'no'">
|
||||
{{
|
||||
(reqMaster.page - 1) * Number(reqMaster.pageSize) +
|
||||
props.rowIndex +
|
||||
1
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
<q-pagination
|
||||
v-model="reqMaster.page"
|
||||
active-color="primary"
|
||||
color="dark"
|
||||
:max="totalPage"
|
||||
:max-pages="5"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
</d-table>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
<q-pagination
|
||||
v-model="reqMaster.page"
|
||||
active-color="primary"
|
||||
color="dark"
|
||||
:max="totalPage"
|
||||
:max-pages="5"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
<q-card
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
|
|||
: store.historyId;
|
||||
isLoad.value = true;
|
||||
}
|
||||
posMaster.value = [];
|
||||
|
||||
await http
|
||||
.post(config.API.orgPosMasterList, {
|
||||
|
|
@ -113,7 +114,6 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
|
|||
keyword: reqMaster.keyword.trim(),
|
||||
})
|
||||
.then(async (res) => {
|
||||
posMaster.value = [];
|
||||
const dataMain: PosMaster[] = [];
|
||||
totalPage.value = Math.ceil(res.data.result.total / reqMaster.pageSize);
|
||||
res.data.result.data.forEach((e: PosMaster) => {
|
||||
|
|
|
|||
|
|
@ -528,6 +528,10 @@ watch(
|
|||
if (!modalDialogMMove.value) {
|
||||
pagination.value.page = 1;
|
||||
pagination.value.rowsPerPage = reqMaster.value.pageSize;
|
||||
|
||||
if (posMaster.value.length === 0) {
|
||||
props.fetchDataTable?.(reqMaster.value.id, reqMaster.value.type, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
@ -616,7 +620,7 @@ watch(
|
|||
@keydown.enter.prevent="props.filterKeyword(reqMaster.keyword)"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" color="grey-5" />
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
|
|
@ -936,6 +940,7 @@ watch(
|
|||
:type="typeMove"
|
||||
:rowId="rowId"
|
||||
:mainTree="props.mainTree ? props.mainTree : []"
|
||||
:fetchDataTable="props.fetchDataTable"
|
||||
/>
|
||||
|
||||
<!-- ประวัติตำแหน่ง -->
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ watch(
|
|||
borderless
|
||||
outlined
|
||||
dense
|
||||
debounce="300"
|
||||
|
||||
v-model="filter"
|
||||
placeholder="ค้นหา"
|
||||
style="width: 200px; max-width: auto"
|
||||
|
|
|
|||
|
|
@ -657,7 +657,7 @@ onMounted(async () => {
|
|||
v-model="filterKeyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter.prevent="(pagination.page = 1), getPerson()"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -701,7 +701,7 @@ onMounted(async () => {
|
|||
v-model="formProbation.keyword"
|
||||
ref="filterRef2"
|
||||
outlined
|
||||
debounce="300"
|
||||
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter.prevent="filterKeyword2Fn(formProbation.page)"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -233,7 +233,6 @@ const filterAndApply = () => {
|
|||
v-model="filter"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
@keyup.enter="filterAndApply"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1267,7 +1267,6 @@ onMounted(async () => {
|
|||
borderless
|
||||
outlined
|
||||
dense
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
v-model="formFilter.searchKeyword"
|
||||
@keydown.enter="(formFilter.page = 1), fecthlistperson()"
|
||||
|
|
|
|||
|
|
@ -322,6 +322,8 @@ watch(
|
|||
lazy-rules
|
||||
emit-value
|
||||
map-options
|
||||
hide-selected
|
||||
fill-input
|
||||
hide-bottom-space
|
||||
input-debounce="0"
|
||||
option-label="name"
|
||||
|
|
@ -342,6 +344,8 @@ watch(
|
|||
outlined
|
||||
clearable
|
||||
use-input
|
||||
hide-selected
|
||||
fill-input
|
||||
lazy-rules
|
||||
emit-value
|
||||
map-options
|
||||
|
|
@ -449,6 +453,8 @@ watch(
|
|||
dense
|
||||
outlined
|
||||
use-input
|
||||
hide-selected
|
||||
fill-input
|
||||
clearable
|
||||
lazy-rules
|
||||
emit-value
|
||||
|
|
@ -471,6 +477,8 @@ watch(
|
|||
dense
|
||||
outlined
|
||||
use-input
|
||||
hide-selected
|
||||
fill-input
|
||||
clearable
|
||||
lazy-rules
|
||||
emit-value
|
||||
|
|
@ -515,6 +523,8 @@ watch(
|
|||
dense
|
||||
outlined
|
||||
use-input
|
||||
hide-selected
|
||||
fill-input
|
||||
clearable
|
||||
lazy-rules
|
||||
emit-value
|
||||
|
|
@ -537,6 +547,8 @@ watch(
|
|||
dense
|
||||
outlined
|
||||
use-input
|
||||
hide-selected
|
||||
fill-input
|
||||
clearable
|
||||
lazy-rules
|
||||
emit-value
|
||||
|
|
|
|||
|
|
@ -201,7 +201,12 @@ const visibleColumns = ref<String[]>([
|
|||
async function fetchList() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.registryNew("-temp"), { params: queryParams })
|
||||
.get(config.API.registryNew("-temp"), {
|
||||
params: {
|
||||
...queryParams,
|
||||
searchKeyword: queryParams.searchKeyword.trim(),
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
rows.value = await res.data.result.data;
|
||||
maxPage.value = Math.ceil(res.data.result.total / queryParams.pageSize);
|
||||
|
|
@ -343,11 +348,10 @@ onMounted(async () => {
|
|||
placeholder="ค้นหา"
|
||||
style="max-width: 200px"
|
||||
class="q-ml-sm"
|
||||
clearable
|
||||
@keydown.enter.prevent="(queryParams.page = 1), fetchList()"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="queryParams.searchKeyword == ''" name="search" />
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
<!-- แสดงคอลัมน์ใน table -->
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ function filterFn() {
|
|||
outlined
|
||||
v-model="keyword"
|
||||
label="ค้นหา"
|
||||
debounce="300"
|
||||
@keydown.enter.prevent="filterFn"
|
||||
>
|
||||
<template v-slot:append>
|
||||
|
|
@ -109,7 +108,6 @@ function filterFn() {
|
|||
map-options
|
||||
:options="workStore.columns"
|
||||
option-value="name"
|
||||
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -257,7 +257,11 @@ async function fetchData() {
|
|||
await http
|
||||
.get(
|
||||
config.API.specialTime() +
|
||||
`?year=${year.value}&month=${month.value}&page=${pagination.value.page}&pageSize=${pagination.value.rowsPerPage}&keyword=${filterKeyword.value.trim()}`
|
||||
`?year=${year.value}&month=${month.value}&page=${
|
||||
pagination.value.page
|
||||
}&pageSize=${
|
||||
pagination.value.rowsPerPage
|
||||
}&keyword=${filterKeyword.value.trim()}`
|
||||
)
|
||||
.then(async (res) => {
|
||||
let data = res.data.result.data;
|
||||
|
|
@ -371,7 +375,6 @@ onMounted(async () => {
|
|||
v-model="filterKeyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหาชื่อ-นามสกุล"
|
||||
@keydown.enter.prevent="getSearch()"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -175,8 +175,6 @@ watch(
|
|||
borderless
|
||||
outlined
|
||||
dense
|
||||
class="col-12 q-mb-sm"
|
||||
debounce="300"
|
||||
v-model="filterKeyword2"
|
||||
@keydown.enter.prevent="updateInput"
|
||||
placeholder="ค้นหารายชื่อ"
|
||||
|
|
|
|||
|
|
@ -211,11 +211,10 @@ onMounted(async () => {
|
|||
outlined
|
||||
v-model="filter"
|
||||
label="ค้นหา"
|
||||
debounce="300"
|
||||
@keydown.enter.prevent="filterFn"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
|
|
|
|||
|
|
@ -223,7 +223,6 @@ watch(
|
|||
<q-input
|
||||
borderless
|
||||
dense
|
||||
debounce="300"
|
||||
outlined
|
||||
placeholder="ค้นหา"
|
||||
v-model="formFilter.keyword"
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ watch(
|
|||
<q-input
|
||||
borderless
|
||||
dense
|
||||
debounce="300"
|
||||
|
||||
outlined
|
||||
v-model="formFilter.keyword"
|
||||
placeholder="ค้นหา"
|
||||
|
|
|
|||
|
|
@ -334,7 +334,6 @@ function onClickViewInfo(type: string, id: string) {
|
|||
<q-input
|
||||
borderless
|
||||
dense
|
||||
debounce="300"
|
||||
outlined
|
||||
v-model="formFilter.keyword"
|
||||
placeholder="ค้นหา"
|
||||
|
|
@ -356,7 +355,6 @@ function onClickViewInfo(type: string, id: string) {
|
|||
map-options
|
||||
:options="!checkPermission($route)?.attrIsGet ? columns?.filter((col:any) => col.name !== 'posSalary' && col.name !== 'discipline' && col.name !== 'leave' ) : columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -320,7 +320,6 @@ watch(
|
|||
<q-input
|
||||
borderless
|
||||
dense
|
||||
debounce="300"
|
||||
outlined
|
||||
v-model="formFilter.keyword"
|
||||
placeholder="ค้นหา"
|
||||
|
|
@ -348,7 +347,6 @@ watch(
|
|||
: []
|
||||
"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -348,7 +348,6 @@ watch(
|
|||
<q-input
|
||||
borderless
|
||||
dense
|
||||
debounce="300"
|
||||
outlined
|
||||
v-model="formFilter.keyword"
|
||||
placeholder="ค้นหา"
|
||||
|
|
@ -372,7 +371,6 @@ watch(
|
|||
? columns?.filter((col:any) => col.name !== 'posSalary' && col.name !== 'discipline' && col.name !== 'leave' )
|
||||
: columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -254,7 +254,6 @@ onMounted(() => {
|
|||
<q-input
|
||||
borderless
|
||||
dense
|
||||
debounce="300"
|
||||
outlined
|
||||
v-model="formQuery.keyword"
|
||||
placeholder="ค้นหา"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import type { DataOption } from "@/modules/14_KPI/interface/index/Main";
|
|||
import type {
|
||||
ResRound,
|
||||
ResDevelopment,
|
||||
} from "@/modules/14_KPI/interface/response/Index";
|
||||
} from "@/modules/14_KPI/interface/response/index";
|
||||
|
||||
/** importComponents*/
|
||||
import DialogIndividual from "@/modules/14_KPI/components/results/dialogIndividual.vue";
|
||||
|
|
|
|||
|
|
@ -358,7 +358,6 @@ onMounted(async () => {
|
|||
v-model="formFilter.keyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter.prevent="(formFilter.page = 1), getData()"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ const {
|
|||
messageError,
|
||||
dialogMessageNotify,
|
||||
success,
|
||||
onSearchDataTable,
|
||||
} = useCounterMixin();
|
||||
|
||||
/**
|
||||
|
|
@ -70,6 +69,7 @@ const props = defineProps({
|
|||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
fetchDataTable: Function,
|
||||
});
|
||||
|
||||
const title = ref<string>("ย้ายตำแหน่งจากหน่วยงาน/ส่วนราชการปัจจุบัน");
|
||||
|
|
@ -80,7 +80,14 @@ const levelTree = ref<number>(0);
|
|||
|
||||
const filterTable = ref<string>("");
|
||||
const selectedFilter = ref<PosMaster2[]>([]);
|
||||
const dataMain = ref<PosMaster2[]>([...rows.value]);
|
||||
|
||||
/**
|
||||
* function รีเช็ด filter
|
||||
*/
|
||||
function resetFilter() {
|
||||
filterTree.value = "";
|
||||
filterRef.value.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* function เลือกข้อมูลหน่วยงาน
|
||||
|
|
@ -149,12 +156,10 @@ const pagination = ref({
|
|||
rowsPerPage: reqMaster.value.pageSize,
|
||||
});
|
||||
|
||||
function onSearchTable() {
|
||||
rows.value = onSearchDataTable(
|
||||
filterTable.value,
|
||||
dataMain.value,
|
||||
columns.value ? columns.value : []
|
||||
);
|
||||
function onSearchData() {
|
||||
reqMaster.value.page = 1;
|
||||
reqMaster.value.keyword = filterTable.value;
|
||||
props.fetchDataTable?.(store.treeId, store.level, false);
|
||||
}
|
||||
|
||||
watch(
|
||||
|
|
@ -162,9 +167,8 @@ watch(
|
|||
() => {
|
||||
reqMaster.value.page = 1;
|
||||
filterTree.value = "";
|
||||
pagination.value.rowsPerPage = reqMaster.value.pageSize;
|
||||
dataMain.value = rows.value;
|
||||
filterTable.value = "";
|
||||
pagination.value.rowsPerPage = reqMaster.value.pageSize;
|
||||
|
||||
title.value = `ย้ายตำแหน่งจากหน่วยงาน/ส่วนราชการปัจจุบัน ${props.mainTree.orgName}`;
|
||||
if (modal.value && props.type === "SINGER") {
|
||||
|
|
@ -188,7 +192,10 @@ watch(
|
|||
>
|
||||
<q-header>
|
||||
<q-toolbar>
|
||||
<HeaderDialog :tittle="title" :close="() => (modal = false)" />
|
||||
<HeaderDialog
|
||||
:tittle="title"
|
||||
:close="() => ((modal = false), (reqMaster.keyword = ''))"
|
||||
/>
|
||||
</q-toolbar>
|
||||
<q-separator color="grey-4" />
|
||||
</q-header>
|
||||
|
|
@ -209,7 +216,7 @@ watch(
|
|||
dense
|
||||
v-model="filterTable"
|
||||
label="ค้นหา"
|
||||
@keydown.enter="onSearchTable"
|
||||
@keydown.enter="onSearchData"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
|
|
@ -217,6 +224,7 @@ watch(
|
|||
</q-input>
|
||||
</div>
|
||||
</q-toolbar>
|
||||
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
flat
|
||||
|
|
|
|||
|
|
@ -366,6 +366,10 @@ watch(
|
|||
if (!modalDialogMMove.value) {
|
||||
pagination.value.page = 1;
|
||||
pagination.value.rowsPerPage = reqMaster.value.pageSize;
|
||||
|
||||
if (posMaster.value.length === 0) {
|
||||
props.fetchDataTable?.(reqMaster.value.id, reqMaster.value.type, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
@ -682,6 +686,7 @@ watch(
|
|||
:type="typeMove"
|
||||
:rowId="rowId"
|
||||
:mainTree="props.mainTree ? props.mainTree : []"
|
||||
:fetchDataTable="props.fetchDataTable"
|
||||
/>
|
||||
|
||||
<!-- ประวัติตำแหน่ง -->
|
||||
|
|
|
|||
|
|
@ -94,10 +94,10 @@ function fetchDataTable(id: string, level: number, action: boolean) {
|
|||
if (action === true) {
|
||||
isLoad.value = true;
|
||||
}
|
||||
posMaster.value = [];
|
||||
http
|
||||
.post(config.API.orgPosMasterListEmp, reqMaster)
|
||||
.then(async (res) => {
|
||||
posMaster.value = [];
|
||||
const dataMain: PosMaster[] = [];
|
||||
totalPage.value = Math.ceil(res.data.result.total / reqMaster.pageSize);
|
||||
res.data.result.data.forEach((e: PosMaster) => {
|
||||
|
|
|
|||
|
|
@ -469,7 +469,6 @@ watch(
|
|||
borderless
|
||||
outlined
|
||||
dense
|
||||
debounce="300"
|
||||
v-model="filter"
|
||||
placeholder="ค้นหา"
|
||||
style="width: 200px; max-width: auto"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ const {
|
|||
showLoader,
|
||||
hideLoader,
|
||||
success,
|
||||
onSearchDataTable,
|
||||
} = useCounterMixin();
|
||||
|
||||
// const isChangeData = defineModel<boolean>("isChangeData", { required: true }); //การเปลี่ยนแปลงของข้อมูล
|
||||
|
|
@ -61,6 +62,8 @@ const position = ref<string>("");
|
|||
|
||||
const filter = ref<string>("");
|
||||
const rows = ref<PersonInfo[]>([]);
|
||||
const rowsMain = ref<PersonInfo[]>([]);
|
||||
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
|
|
@ -236,12 +239,21 @@ async function getPersonList() {
|
|||
templatePos.value = data.commandSalaryId;
|
||||
position.value = data.positionDetail;
|
||||
rows.value = data.commandRecives;
|
||||
rowsMain.value = data.commandRecives;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
});
|
||||
}
|
||||
|
||||
function onSearchData() {
|
||||
rows.value = onSearchDataTable(
|
||||
filter.value,
|
||||
rowsMain.value,
|
||||
columns.value ? columns.value : []
|
||||
);
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
const promises = [getPersonList()];
|
||||
|
||||
|
|
@ -325,8 +337,8 @@ onMounted(async () => {
|
|||
v-model="filter"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter="onSearchData()"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
|
|
@ -354,7 +366,6 @@ onMounted(async () => {
|
|||
:rows="rows"
|
||||
:columns="columns"
|
||||
:visible-columns="visibleColumns"
|
||||
:filter="filter.trim()"
|
||||
row-key="name"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ const {
|
|||
showLoader,
|
||||
hideLoader,
|
||||
success,
|
||||
onSearchDataTable,
|
||||
} = useCounterMixin();
|
||||
|
||||
const isChangeData = defineModel<boolean>("isChangeData", { required: true });
|
||||
|
|
@ -35,6 +36,7 @@ const { onCheckChangeData } = defineProps({
|
|||
|
||||
const filter = ref<string>("");
|
||||
const rows = ref<DataPerson[]>([]);
|
||||
const rowsMain = ref<DataPerson[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
|
|
@ -59,8 +61,11 @@ const columns = ref<QTableProps["columns"]>([
|
|||
name: "fullName",
|
||||
align: "left",
|
||||
label: "ชื่อ-นามสกุล",
|
||||
field: "name",
|
||||
format(val, row) {
|
||||
return `${row.prefix}${row.firstName} ${row.lastName}`;
|
||||
},
|
||||
|
||||
field: (row) => `${row.prefix}${row.firstName} ${row.lastName}`,
|
||||
sortable: true,
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
|
|
@ -119,6 +124,7 @@ async function fetchData() {
|
|||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
rows.value = data;
|
||||
rowsMain.value = data;
|
||||
isChangeData.value = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -191,6 +197,14 @@ function onSubmit() {
|
|||
});
|
||||
}
|
||||
|
||||
function onSearchData() {
|
||||
rows.value = onSearchDataTable(
|
||||
filter.value,
|
||||
rowsMain.value,
|
||||
columns.value ? columns.value : []
|
||||
);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchData();
|
||||
});
|
||||
|
|
@ -213,13 +227,12 @@ onMounted(() => {
|
|||
<div class="items-center" style="display: flex">
|
||||
<!-- ค้นหาข้อความใน table -->
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
v-model="filter"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
class="q-ml-sm"
|
||||
@keydown.enter="onSearchData()"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
|
|
@ -250,7 +263,6 @@ onMounted(() => {
|
|||
:rows="rows"
|
||||
:columns="columns"
|
||||
:visible-columns="visibleColumns"
|
||||
:filter="filter.trim()"
|
||||
row-key="id"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue