updated
This commit is contained in:
parent
cd3ceaae97
commit
c43f09a784
4 changed files with 40 additions and 18 deletions
|
|
@ -307,6 +307,7 @@ function closeDialog() {
|
|||
color="primary"
|
||||
icon="mdi-magnify"
|
||||
label="ค้นหา"
|
||||
outlined
|
||||
@click="clickSearch(employeeClass)"
|
||||
/>
|
||||
</q-toolbar>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
|
|||
|
||||
/** TableHisoty*/
|
||||
const visibleColumns = ref<String[]>([
|
||||
"statusMarital",
|
||||
"citizenId",
|
||||
"prefix",
|
||||
"firstName",
|
||||
|
|
@ -56,6 +57,15 @@ const visibleColumns = ref<String[]>([
|
|||
"lastUpdatedAt",
|
||||
]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "statusMarital",
|
||||
align: "left",
|
||||
label: "สถานภาพการสมรส",
|
||||
sortable: true,
|
||||
field: "statusMarital",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "citizenId",
|
||||
align: "left",
|
||||
|
|
@ -65,7 +75,6 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
||||
{
|
||||
name: "prefix",
|
||||
align: "left",
|
||||
|
|
@ -392,7 +401,6 @@ function onOpenDialogForm(
|
|||
fromData.job = motherData.job;
|
||||
} else if (type === "couple") {
|
||||
titleForm.value = "คู่สมรส";
|
||||
|
||||
fromData.isLive = 1;
|
||||
} else if (type === "children") {
|
||||
titleForm.value = "บุตร";
|
||||
|
|
@ -471,9 +479,15 @@ async function fetchHistory(id: string, type: string) {
|
|||
lastName: e[`${type}LastName`],
|
||||
job: e[`${type}Career`],
|
||||
isLive: e[`${type}Live`],
|
||||
lastNameOld: type === "couple" ? e.coupleLastNameOld : undefined,
|
||||
lastNameOld:
|
||||
type === "couple"
|
||||
? e.coupleLastNameOld
|
||||
: type === "mother"
|
||||
? e.motherLastNameOld
|
||||
: undefined,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
statusMarital: type === "couple" ? e.relationship : undefined,
|
||||
}));
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -1104,6 +1118,7 @@ onMounted(async () => {
|
|||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<d-table
|
||||
ref="table"
|
||||
flat
|
||||
|
|
@ -1112,7 +1127,11 @@ onMounted(async () => {
|
|||
:columns="
|
||||
typeForm === 'couple'
|
||||
? columns
|
||||
: columns?.filter((e) => e.name !== 'lastNameOld')
|
||||
: typeForm === 'mother'
|
||||
? columns?.filter((e) => e.name !== 'statusMarital')
|
||||
: columns?.filter(
|
||||
(e) => e.name !== 'lastNameOld' && e.name !== 'statusMarital'
|
||||
)
|
||||
"
|
||||
:rows="rows"
|
||||
:paging="true"
|
||||
|
|
|
|||
|
|
@ -329,6 +329,7 @@ watch(
|
|||
icon="search"
|
||||
label="ค้นหา"
|
||||
class="full-width q-py-sm q-px-md"
|
||||
outline
|
||||
@click="searchInput()"
|
||||
>
|
||||
</q-btn>
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ onMounted(async () => {
|
|||
<q-card-section>
|
||||
<div class="row col-12 q-col-gutter-md">
|
||||
<div class="col-12 q-col-gutter-y-sm" v-if="data === null">
|
||||
<div class="row q-col-gutter-md items-start">
|
||||
<div class="row q-col-gutter-sm items-start">
|
||||
<div class="col-12 col-sm-6 col-md-3">
|
||||
<q-select
|
||||
label="ค้นหาจาก"
|
||||
|
|
@ -288,28 +288,29 @@ onMounted(async () => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-6">
|
||||
<div class="col-12 col-sm-6 col-md-9">
|
||||
<q-input
|
||||
ref="searchRef"
|
||||
v-model="search"
|
||||
outlined
|
||||
clearable
|
||||
@clear="search = ''"
|
||||
hide-bottom-space
|
||||
dense
|
||||
label="คำค้น"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-3">
|
||||
<q-btn
|
||||
color="primary"
|
||||
icon="search"
|
||||
label="ค้นหา"
|
||||
class="full-width q-pa-sm"
|
||||
@click="searchInput()"
|
||||
:rules="[(val:string) => !!val || `กรุณากรอกคำค้น`]"
|
||||
>
|
||||
</q-btn>
|
||||
<template v-slot:after>
|
||||
<q-btn
|
||||
color="primary"
|
||||
icon="search"
|
||||
label="ค้นหา"
|
||||
class="full-width q-py-sm q-px-md"
|
||||
outline
|
||||
@click="searchInput()"
|
||||
>
|
||||
</q-btn>
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue