เพิ่ม interface ให้ any
This commit is contained in:
parent
7d3c48142c
commit
77ccaec4e3
18 changed files with 259 additions and 73 deletions
|
|
@ -12,6 +12,7 @@ import { useProfileDataStore } from "@/modules/08_registryEmployee/store";
|
|||
import type {
|
||||
Information,
|
||||
DataOption,
|
||||
DataOptioninfo
|
||||
} from "@/modules/04_registry/components/profileType";
|
||||
import type { InformationOps } from "@/modules/04_registry/interface/index/Main";
|
||||
import HeaderTop from "@/modules/08_registryEmployee/components/AddEmployee/HeaderTop.vue";
|
||||
|
|
@ -91,7 +92,7 @@ const fetchPerson = async () => {
|
|||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
let optionbloodGroups: DataOption[] = [];
|
||||
data.bloodGroups.map((r: any) => {
|
||||
data.bloodGroups.map((r: DataOptioninfo) => {
|
||||
optionbloodGroups.push({
|
||||
id: r.id.toString(),
|
||||
name: r.name.toString(),
|
||||
|
|
@ -101,7 +102,7 @@ const fetchPerson = async () => {
|
|||
OpsFilter.value.bloodOps = optionbloodGroups;
|
||||
|
||||
let optiongenders: DataOption[] = [];
|
||||
data.genders.map((r: any) => {
|
||||
data.genders.map((r: DataOptioninfo) => {
|
||||
optiongenders.push({
|
||||
id: r.id.toString(),
|
||||
name: r.name.toString(),
|
||||
|
|
@ -111,7 +112,7 @@ const fetchPerson = async () => {
|
|||
OpsFilter.value.genderOps = optiongenders;
|
||||
|
||||
let optionprefixs: DataOption[] = [];
|
||||
data.prefixs.map((r: any) => {
|
||||
data.prefixs.map((r: DataOptioninfo) => {
|
||||
optionprefixs.push({
|
||||
id: r.id.toString(),
|
||||
name: r.name.toString(),
|
||||
|
|
@ -121,7 +122,7 @@ const fetchPerson = async () => {
|
|||
OpsFilter.value.prefixOps = optionprefixs;
|
||||
|
||||
let optionrelationships: DataOption[] = [];
|
||||
data.relationships.map((r: any) => {
|
||||
data.relationships.map((r: DataOptioninfo) => {
|
||||
optionrelationships.push({
|
||||
id: r.id.toString(),
|
||||
name: r.name.toString(),
|
||||
|
|
@ -131,7 +132,7 @@ const fetchPerson = async () => {
|
|||
OpsFilter.value.statusOps = optionrelationships;
|
||||
|
||||
let optionreligions: DataOption[] = [];
|
||||
data.religions.map((r: any) => {
|
||||
data.religions.map((r: DataOptioninfo) => {
|
||||
optionreligions.push({
|
||||
id: r.id.toString(),
|
||||
name: r.name.toString(),
|
||||
|
|
@ -476,7 +477,7 @@ const clickBack = () => {
|
|||
<q-page-sticky position="top" expand class="bg-grey-2 text-white" style="z-index: 99; padding: 0% 1% 0% 1%">
|
||||
<div class="row col-12 q-gutter-sm q-pb-sm text-dark no-wrap items-center">
|
||||
<q-btn flat round class="bg-teal-1 full-height" color="primary" icon="mdi-chevron-left" dense
|
||||
@click="router.go(-1)">
|
||||
@click="router.push(`/receive`)">
|
||||
</q-btn>
|
||||
<q-avatar size="65px" rounded class="containerimage">
|
||||
<img v-if="image == null" src="@/assets/avatar_user.jpg" class="bg-grey-3" style="object-fit: cover" />
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ const saveOrder = () => {
|
|||
};
|
||||
//ส่งไปออกคำสั่ง
|
||||
const Ordersave = async () => {
|
||||
const id = selected.value.map((r: any) => r.personalId);
|
||||
const id = selected.value.map((r: ResponseRow) => r.personalId);
|
||||
const body = {
|
||||
id,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ import type { InformationOps } from "@/modules/04_registry/interface/index/Main"
|
|||
import type {
|
||||
Information,
|
||||
DataOption,
|
||||
DataOptioninfo,
|
||||
docList
|
||||
} from "@/modules/04_registry/components/profileType";
|
||||
|
||||
import { defaultInformation } from "@/modules/04_registry/components/profileType";
|
||||
|
|
@ -49,7 +51,7 @@ const status = ref<string>("");
|
|||
|
||||
const myForm = ref<QForm | null>(null);
|
||||
const edit = ref<boolean>(false);
|
||||
const rows = ref<any[]>([]);
|
||||
const rows = ref<docList[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
|
|
@ -133,7 +135,7 @@ const fetchPerson = async () => {
|
|||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
let optionbloodGroups: DataOption[] = [];
|
||||
data.bloodGroups.map((r: any) => {
|
||||
data.bloodGroups.map((r: DataOptioninfo) => {
|
||||
optionbloodGroups.push({
|
||||
id: r.id.toString(),
|
||||
name: r.name.toString(),
|
||||
|
|
@ -143,7 +145,7 @@ const fetchPerson = async () => {
|
|||
OpsFilter.value.bloodOps = optionbloodGroups;
|
||||
|
||||
let optiongenders: DataOption[] = [];
|
||||
data.genders.map((r: any) => {
|
||||
data.genders.map((r: DataOptioninfo) => {
|
||||
optiongenders.push({
|
||||
id: r.id.toString(),
|
||||
name: r.name.toString(),
|
||||
|
|
@ -153,7 +155,7 @@ const fetchPerson = async () => {
|
|||
OpsFilter.value.genderOps = optiongenders;
|
||||
|
||||
let optionprefixs: DataOption[] = [];
|
||||
data.prefixs.map((r: any) => {
|
||||
data.prefixs.map((r: DataOptioninfo) => {
|
||||
optionprefixs.push({
|
||||
id: r.id.toString(),
|
||||
name: r.name.toString(),
|
||||
|
|
@ -163,7 +165,7 @@ const fetchPerson = async () => {
|
|||
OpsFilter.value.prefixOps = optionprefixs;
|
||||
|
||||
let optionrelationships: DataOption[] = [];
|
||||
data.relationships.map((r: any) => {
|
||||
data.relationships.map((r: DataOptioninfo) => {
|
||||
optionrelationships.push({
|
||||
id: r.id.toString(),
|
||||
name: r.name.toString(),
|
||||
|
|
@ -173,7 +175,7 @@ const fetchPerson = async () => {
|
|||
OpsFilter.value.statusOps = optionrelationships;
|
||||
|
||||
let optionreligions: DataOption[] = [];
|
||||
data.religions.map((r: any) => {
|
||||
data.religions.map((r: DataOptioninfo) => {
|
||||
optionreligions.push({
|
||||
id: r.id.toString(),
|
||||
name: r.name.toString(),
|
||||
|
|
@ -192,9 +194,9 @@ const getData = async () => {
|
|||
.get(config.API.receiveDataId(paramsId.toString()))
|
||||
.then(async (res: any) => {
|
||||
const data = res.data.result;
|
||||
let list: any[] = [];
|
||||
let list: docList[] = [];
|
||||
if (data.docs.length > 0) {
|
||||
data.docs.map((doc: any) => {
|
||||
data.docs.map((doc: docList) => {
|
||||
list.push({
|
||||
pathName: doc.pathName ?? "",
|
||||
fileName: doc.fileName ?? "",
|
||||
|
|
@ -478,7 +480,7 @@ onMounted(async () => {
|
|||
flat
|
||||
color="primary"
|
||||
class="q-mr-sm"
|
||||
@click="router.go(-1)"
|
||||
@click="router.push(`/receive`)"
|
||||
/>
|
||||
รายละเอียดการรับโอนของ {{ title.fullname }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ const modal = ref<boolean>(false);
|
|||
const modalupload = ref<boolean>(false);
|
||||
const modalTree = ref<boolean>(false);
|
||||
const myForm = ref<any>();
|
||||
const personal = ref<any[]>([]);
|
||||
const personal = ref<ResponseData[]>([]);
|
||||
const personalId = ref<string>("");
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterKeyword2 = ref<string>("");
|
||||
|
|
@ -236,7 +236,7 @@ const clickCloseUpload = () => {
|
|||
// ปิดโมเดลโครงสร้าง
|
||||
const openModalTree = (id: string) => {
|
||||
personalId.value = id;
|
||||
personal.value = listRecevice.value.filter((e: any) => e.id === id);
|
||||
personal.value = listRecevice.value.filter((e: ResponseData) => e.id === id);
|
||||
modalTree.value = true;
|
||||
};
|
||||
// เปิดโมเดลไฟล์
|
||||
|
|
@ -272,9 +272,9 @@ const closeModalTree = async () => {
|
|||
};
|
||||
|
||||
// ไปหน้ารายละเอียด
|
||||
const nextPage = (row: any) => {
|
||||
const nextPage = (id: string) => {
|
||||
router.push({
|
||||
path: `/receive/${row.personalId}`,
|
||||
path: `/receive/${id}`,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -322,16 +322,16 @@ onMounted(() => {
|
|||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td key="no" :props="props" @click="nextPage(props.row)">
|
||||
<q-td key="no" :props="props" @click="nextPage(props.row.personalId)">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</q-td>
|
||||
<q-td key="citizenId" :props="props" @click="nextPage(props.row)" >
|
||||
<q-td key="citizenId" :props="props" @click="nextPage(props.row.personalId)" >
|
||||
{{ props.row.citizenId }}
|
||||
</q-td>
|
||||
<q-td key="fullname" :props="props" @click="nextPage(props.row)" >
|
||||
<q-td key="fullname" :props="props" @click="nextPage(props.row.personalId)" >
|
||||
{{ props.row.fullname }}
|
||||
</q-td>
|
||||
<q-td key="organizationName" :props="props" @click="nextPage(props.row)" >
|
||||
<q-td key="organizationName" :props="props" @click="nextPage(props.row.personalId)" >
|
||||
<div v-if=" props.row.orgName !== null || props.row.positionPath !== null " >
|
||||
<div class="col-4">
|
||||
<div class="text-weight-medium">
|
||||
|
|
@ -350,13 +350,13 @@ onMounted(() => {
|
|||
</div>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="birthday" :props="props" @click="nextPage(props.row)" >
|
||||
<q-td key="birthday" :props="props" @click="nextPage(props.row.personalId)" >
|
||||
{{ props.row.birthday }}
|
||||
</q-td>
|
||||
<q-td key="dateText" :props="props" @click="nextPage(props.row)" >
|
||||
<q-td key="dateText" :props="props" @click="nextPage(props.row.personalId)" >
|
||||
{{ props.row.dateText }}
|
||||
</q-td>
|
||||
<q-td key="statusText" :props="props" @click="nextPage(props.row)" >
|
||||
<q-td key="statusText" :props="props" @click="nextPage(props.row.personalId)" >
|
||||
{{ props.row.statusText }}
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue