แก้ไขบัค
This commit is contained in:
parent
a2ac793131
commit
f9fac262ef
10 changed files with 174 additions and 152 deletions
|
|
@ -1,6 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<Information :notiNoEdit="notiNoEdit" v-model:statusEdit="statusEdit" />
|
<Information :notiNoEdit="notiNoEdit" v-model:statusEdit="statusEdit" />
|
||||||
<Government :notiNoEdit="notiNoEdit" v-model:statusEdit="statusEdit" />
|
<Government
|
||||||
|
:notiNoEdit="notiNoEdit"
|
||||||
|
v-model:statusEdit="statusEdit"
|
||||||
|
profileType="profileType"
|
||||||
|
employeeClass="employeeClass"
|
||||||
|
/>
|
||||||
<Address :notiNoEdit="notiNoEdit" v-model:statusEdit="statusEdit" />
|
<Address :notiNoEdit="notiNoEdit" v-model:statusEdit="statusEdit" />
|
||||||
<Family :notiNoEdit="notiNoEdit" v-model:statusEdit="statusEdit" />
|
<Family :notiNoEdit="notiNoEdit" v-model:statusEdit="statusEdit" />
|
||||||
<!-- <Certicate v-model:statusEdit="statusEdit" :profileType="profileType" /> -->
|
<!-- <Certicate v-model:statusEdit="statusEdit" :profileType="profileType" /> -->
|
||||||
|
|
|
||||||
|
|
@ -135,17 +135,17 @@ const fetchPlacementData = async (val: number) => {
|
||||||
|
|
||||||
// rows.value = DataStore.DataMainOrig;
|
// rows.value = DataStore.DataMainOrig;
|
||||||
DataStore.DataMainOrig.map((e: any) => {
|
DataStore.DataMainOrig.map((e: any) => {
|
||||||
rows.value.push({
|
// rows.value.push({
|
||||||
examRound: e.examRound,
|
// examRound: e.examRound,
|
||||||
examOrder: e.examOrder,
|
// examOrder: e.examOrder,
|
||||||
examTypeName: e.examTypeName,
|
// examTypeName: e.examTypeName,
|
||||||
examTypeValue: e.examTypeValue,
|
// examTypeValue: e.examTypeValue,
|
||||||
accountEndDate: date2Thai(e.accountEndDate),
|
// accountEndDate: date2Thai(e.accountEndDate),
|
||||||
accountExpirationDate: date2Thai(e.accountExpirationDate),
|
// accountExpirationDate: date2Thai(e.accountExpirationDate),
|
||||||
accountStartDate: date2Thai(e.accountStartDate),
|
// accountStartDate: date2Thai(e.accountStartDate),
|
||||||
fiscalYear: e.fiscalYear,
|
// fiscalYear: e.fiscalYear,
|
||||||
numberOfCandidates: e.numberOfCandidates,
|
// numberOfCandidates: e.numberOfCandidates,
|
||||||
});
|
// });
|
||||||
});
|
});
|
||||||
|
|
||||||
examTypeFilter();
|
examTypeFilter();
|
||||||
|
|
@ -244,17 +244,17 @@ const searchFilterTable = async () => {
|
||||||
);
|
);
|
||||||
// rows.value = DataStore.DataMainUpdate;
|
// rows.value = DataStore.DataMainUpdate;
|
||||||
DataStore.DataMainUpdate.map((e: any) => {
|
DataStore.DataMainUpdate.map((e: any) => {
|
||||||
rows.value.push({
|
// rows.value.push({
|
||||||
examRound: e.examRound,
|
// examRound: e.examRound,
|
||||||
examOrder: e.examOrder,
|
// examOrder: e.examOrder,
|
||||||
examTypeName: e.examTypeName,
|
// examTypeName: e.examTypeName,
|
||||||
examTypeValue: e.examTypeValue,
|
// examTypeValue: e.examTypeValue,
|
||||||
accountEndDate: date2Thai(e.accountEndDate),
|
// accountEndDate: date2Thai(e.accountEndDate),
|
||||||
accountExpirationDate: date2Thai(e.accountExpirationDate),
|
// accountExpirationDate: date2Thai(e.accountExpirationDate),
|
||||||
accountStartDate: date2Thai(e.accountStartDate),
|
// accountStartDate: date2Thai(e.accountStartDate),
|
||||||
fiscalYear: e.fiscalYear,
|
// fiscalYear: e.fiscalYear,
|
||||||
numberOfCandidates: e.numberOfCandidates,
|
// numberOfCandidates: e.numberOfCandidates,
|
||||||
});
|
// });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -616,7 +616,7 @@ const fiscalYearFilter = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const OrderType = ref<string>("");
|
const OrderType = ref<string>("");
|
||||||
const OrderTypeOption = reactive<DataOption[]>([{ id: "", name: "ทั้งหมด" }]);
|
const OrderTypeOption = reactive<DataOption[]>([{ id: 0, name: "ทั้งหมด" }]);
|
||||||
const addedOrderTypeValues: string[] = [];
|
const addedOrderTypeValues: string[] = [];
|
||||||
const OrderTypeFilter = async () => {
|
const OrderTypeFilter = async () => {
|
||||||
// API
|
// API
|
||||||
|
|
@ -640,7 +640,8 @@ const OrderTypeFilter = async () => {
|
||||||
// }
|
// }
|
||||||
if (!addedOrderTypeValues.includes(OrderTypeValue)) {
|
if (!addedOrderTypeValues.includes(OrderTypeValue)) {
|
||||||
OrderTypeOption.push({
|
OrderTypeOption.push({
|
||||||
id: OrderTypeValue,
|
// id: OrderTypeValue ?? 0,
|
||||||
|
id: OrderTypeOption.length,
|
||||||
name: OrderTypeValue,
|
name: OrderTypeValue,
|
||||||
});
|
});
|
||||||
addedOrderTypeValues.push(OrderTypeValue);
|
addedOrderTypeValues.push(OrderTypeValue);
|
||||||
|
|
@ -658,7 +659,7 @@ const OrderStatus = ref<string>("");
|
||||||
const OrderStatusText = ref<FormOrderPlacementMainData[]>(
|
const OrderStatusText = ref<FormOrderPlacementMainData[]>(
|
||||||
DataStore.DataMainOrigOrder
|
DataStore.DataMainOrigOrder
|
||||||
);
|
);
|
||||||
const OrderStatusOption = reactive<DataOption[]>([{ id: "", name: "ทั้งหมด" }]);
|
const OrderStatusOption = reactive<DataOption[]>([{ id: 1, name: "ทั้งหมด" }]);
|
||||||
const addedOrderStatusValues: string[] = [];
|
const addedOrderStatusValues: string[] = [];
|
||||||
const OrderStatusFilter = async () => {
|
const OrderStatusFilter = async () => {
|
||||||
// API
|
// API
|
||||||
|
|
@ -686,7 +687,8 @@ const OrderStatusFilter = async () => {
|
||||||
|
|
||||||
if (!addedOrderStatusValues.includes(OrderStatusValue)) {
|
if (!addedOrderStatusValues.includes(OrderStatusValue)) {
|
||||||
OrderStatusOption.push({
|
OrderStatusOption.push({
|
||||||
id: OrderStatusValue,
|
// id: OrderStatusValue,
|
||||||
|
id: OrderStatusOption.length,
|
||||||
name: OrderStatusValue,
|
name: OrderStatusValue,
|
||||||
});
|
});
|
||||||
addedOrderStatusValues.push(OrderStatusValue);
|
addedOrderStatusValues.push(OrderStatusValue);
|
||||||
|
|
|
||||||
|
|
@ -449,14 +449,14 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
|
||||||
case "typeOrderOption":
|
case "typeOrderOption":
|
||||||
update(() => {
|
update(() => {
|
||||||
typeOrderOption.value = typeOrderOptionFilter.value.filter(
|
typeOrderOption.value = typeOrderOptionFilter.value.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: DataOption) => v.name!.indexOf(val) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "byOrderOption":
|
case "byOrderOption":
|
||||||
update(() => {
|
update(() => {
|
||||||
byOrderOption.value = byOrderOptionFilter.value.filter(
|
byOrderOption.value = byOrderOptionFilter.value.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: DataOption) => v.name!.indexOf(val) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -464,7 +464,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
|
||||||
case "registerOption":
|
case "registerOption":
|
||||||
update(() => {
|
update(() => {
|
||||||
registerOption.value = registerOptionFilter.value.filter(
|
registerOption.value = registerOptionFilter.value.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: DataOption) => v.name!.indexOf(val) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -472,7 +472,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
|
||||||
case "announceOption":
|
case "announceOption":
|
||||||
update(() => {
|
update(() => {
|
||||||
announceOption.value = announceOptionFilter.value.filter(
|
announceOption.value = announceOptionFilter.value.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: DataOption) => v.name!.indexOf(val) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -480,14 +480,14 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
|
||||||
case "positionOption":
|
case "positionOption":
|
||||||
update(() => {
|
update(() => {
|
||||||
positionOption.value = positionOptionFilter.value.filter(
|
positionOption.value = positionOptionFilter.value.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: DataOption) => v.name!.indexOf(val) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "testOption":
|
case "testOption":
|
||||||
update(() => {
|
update(() => {
|
||||||
testOption.value = testOptionFilter.value.filter(
|
testOption.value = testOptionFilter.value.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: DataOption) => v.name!.indexOf(val) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import type {
|
||||||
Education,
|
Education,
|
||||||
Family,
|
Family,
|
||||||
Address,
|
Address,
|
||||||
} from "@/modules/05_placement/interface/index/Main.ts";
|
} from "@/modules/05_placement/interface/index/Main";
|
||||||
|
|
||||||
import type { Information } from "@/modules/05_placement/components/PersonalDetail/profileType";
|
import type { Information } from "@/modules/05_placement/components/PersonalDetail/profileType";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ import type {
|
||||||
EduOps,
|
EduOps,
|
||||||
Education,
|
Education,
|
||||||
DataOption,
|
DataOption,
|
||||||
|
optionData,
|
||||||
} from "@/modules/05_placement/interface/index/Main";
|
} from "@/modules/05_placement/interface/index/Main";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
|
|
@ -482,8 +483,8 @@ const fetchLevel = async () => {
|
||||||
.get(config.API.educationLevel)
|
.get(config.API.educationLevel)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
let option: DataOption[] = [];
|
let option: optionData[] = [];
|
||||||
data.map((r: DataOption) => {
|
data.map((r: optionData) => {
|
||||||
option.push({ id: r.id.toString(), name: r.name.toString() });
|
option.push({ id: r.id.toString(), name: r.name.toString() });
|
||||||
});
|
});
|
||||||
Ops.value.levelOptions = option;
|
Ops.value.levelOptions = option;
|
||||||
|
|
@ -503,8 +504,8 @@ const fetchPositionPath = async () => {
|
||||||
.get(config.API.positionPath)
|
.get(config.API.positionPath)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
let option: DataOption[] = [];
|
let option: optionData[] = [];
|
||||||
data.map((r: DataOption) => {
|
data.map((r: optionData) => {
|
||||||
option.push({ id: r.id.toString(), name: r.name.toString() });
|
option.push({ id: r.id.toString(), name: r.name.toString() });
|
||||||
});
|
});
|
||||||
Ops.value.positionPathOptions = option;
|
Ops.value.positionPathOptions = option;
|
||||||
|
|
@ -523,7 +524,7 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
||||||
case "levelOptions":
|
case "levelOptions":
|
||||||
update(() => {
|
update(() => {
|
||||||
Ops.value.levelOptions = OpsFilter.value.levelOptions.filter(
|
Ops.value.levelOptions = OpsFilter.value.levelOptions.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: optionData) => v.name.indexOf(val) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -531,7 +532,7 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
||||||
update(() => {
|
update(() => {
|
||||||
Ops.value.positionPathOptions =
|
Ops.value.positionPathOptions =
|
||||||
OpsFilter.value.positionPathOptions.filter(
|
OpsFilter.value.positionPathOptions.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: optionData) => v.name.indexOf(val) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -548,27 +549,27 @@ const fetchData = async () => {
|
||||||
let data = res.data.result;
|
let data = res.data.result;
|
||||||
rows.value = [];
|
rows.value = [];
|
||||||
data.map((e: ResponseObject) => {
|
data.map((e: ResponseObject) => {
|
||||||
rows.value.push({
|
// rows.value.push({
|
||||||
id: e.id,
|
// id: e.id,
|
||||||
level: e.educationLevel,
|
// level: e.educationLevel,
|
||||||
levelId: e.educationLevelId,
|
// levelId: e.educationLevelId,
|
||||||
positionPath: e.positionPath,
|
// positionPath: e.positionPath,
|
||||||
positionPathId: e.positionPathId,
|
// positionPathId: e.positionPathId,
|
||||||
institute: e.institute,
|
// institute: e.institute,
|
||||||
degree: e.degree,
|
// degree: e.degree,
|
||||||
field: e.field,
|
// field: e.field,
|
||||||
gpa: e.gpa,
|
// gpa: e.gpa,
|
||||||
country: e.country,
|
// country: e.country,
|
||||||
duration: e.duration,
|
// duration: e.duration,
|
||||||
durationYear: e.durationYear,
|
// durationYear: e.durationYear,
|
||||||
other: e.other,
|
// other: e.other,
|
||||||
fundName: e.fundName,
|
// fundName: e.fundName,
|
||||||
finishDate: new Date(e.finishDate),
|
// finishDate: new Date(e.finishDate),
|
||||||
startDate: new Date(e.startDate).getFullYear(),
|
// startDate: new Date(e.startDate).getFullYear(),
|
||||||
endDate: new Date(e.endDate).getFullYear(),
|
// endDate: new Date(e.endDate).getFullYear(),
|
||||||
createdFullName: e.createdFullName,
|
// createdFullName: e.createdFullName,
|
||||||
createdAt: new Date(e.createdAt),
|
// createdAt: new Date(e.createdAt),
|
||||||
});
|
// });
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -603,22 +604,22 @@ const clickNext = async () => {
|
||||||
* กดดูข้อมูลต่อไป
|
* กดดูข้อมูลต่อไป
|
||||||
*/
|
*/
|
||||||
const getData = () => {
|
const getData = () => {
|
||||||
const row = rows.value[rowIndex.value];
|
// const row = rows.value[rowIndex.value];
|
||||||
levelId.value = row.levelId;
|
// levelId.value = row.levelId;
|
||||||
positionPathId.value = row.positionPathId;
|
// positionPathId.value = row.positionPathId;
|
||||||
institute.value = row.institute;
|
// institute.value = row.institute;
|
||||||
degree.value = row.degree;
|
// degree.value = row.degree;
|
||||||
field.value = row.field;
|
// field.value = row.field;
|
||||||
gpa.value = row.gpa;
|
// gpa.value = row.gpa;
|
||||||
country.value = row.country;
|
// country.value = row.country;
|
||||||
duration.value = row.duration;
|
// duration.value = row.duration;
|
||||||
durationYear.value = row.durationYear;
|
// durationYear.value = row.durationYear;
|
||||||
other.value = row.other;
|
// other.value = row.other;
|
||||||
fundName.value = row.fundName;
|
// fundName.value = row.fundName;
|
||||||
finishDate.value = row.finishDate;
|
// finishDate.value = row.finishDate;
|
||||||
startDate.value = row.startDate;
|
// startDate.value = row.startDate;
|
||||||
endDate.value = row.endDate;
|
// endDate.value = row.endDate;
|
||||||
id.value = row.id;
|
// id.value = row.id;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import type {
|
import type {
|
||||||
Address,
|
Address,
|
||||||
DataOption,
|
|
||||||
zipCodeOption,
|
zipCodeOption,
|
||||||
} from "@/modules/05_placement/components/PersonalDetail/profileType";
|
} from "@/modules/05_placement/components/PersonalDetail/profileType";
|
||||||
import { defaultAddress } from "@/modules/05_placement/components/PersonalDetail/profileType";
|
import { defaultAddress } from "@/modules/05_placement/components/PersonalDetail/profileType";
|
||||||
|
|
@ -17,12 +16,12 @@ import type { RequestItemsHistoryObject } from "@/modules//05_placement/interfac
|
||||||
import type { ResponseObject } from "@/modules//05_placement/interface/response/Address";
|
import type { ResponseObject } from "@/modules//05_placement/interface/response/Address";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
import { AddressDataDefualt } from "@/modules//05_placement/interface/index/Main";
|
import { AddressDataDefualt } from "@/modules//05_placement/interface/index/Main";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
AddressOps,
|
AddressOps,
|
||||||
Address as AddressType,
|
Address as AddressType,
|
||||||
|
optionData,
|
||||||
} from "@/modules//05_placement/interface/index/Main";
|
} from "@/modules//05_placement/interface/index/Main";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
|
|
@ -247,35 +246,35 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
||||||
case "provinceOps":
|
case "provinceOps":
|
||||||
update(() => {
|
update(() => {
|
||||||
Ops.value.provinceOps = OpsFilter.value.provinceOps.filter(
|
Ops.value.provinceOps = OpsFilter.value.provinceOps.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: optionData) => v.name.indexOf(val) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "districtOps":
|
case "districtOps":
|
||||||
update(() => {
|
update(() => {
|
||||||
Ops.value.districtOps = OpsFilter.value.districtOps.filter(
|
Ops.value.districtOps = OpsFilter.value.districtOps.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: optionData) => v.name.indexOf(val) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "districtCOps":
|
case "districtCOps":
|
||||||
update(() => {
|
update(() => {
|
||||||
Ops.value.districtCOps = OpsFilter.value.districtCOps.filter(
|
Ops.value.districtCOps = OpsFilter.value.districtCOps.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: optionData) => v.name.indexOf(val) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "subdistrictOps":
|
case "subdistrictOps":
|
||||||
update(() => {
|
update(() => {
|
||||||
Ops.value.subdistrictOps = OpsFilter.value.subdistrictOps.filter(
|
Ops.value.subdistrictOps = OpsFilter.value.subdistrictOps.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: optionData) => v.name.indexOf(val) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "subdistrictCOps":
|
case "subdistrictCOps":
|
||||||
update(() => {
|
update(() => {
|
||||||
Ops.value.subdistrictCOps = OpsFilter.value.subdistrictCOps.filter(
|
Ops.value.subdistrictCOps = OpsFilter.value.subdistrictCOps.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: optionData) => v.name.indexOf(val) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -465,7 +464,7 @@ const fetchProvince = async () => {
|
||||||
.get(config.API.province)
|
.get(config.API.province)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
let option: DataOption[] = [];
|
let option: optionData[] = [];
|
||||||
data.map((r: any) => {
|
data.map((r: any) => {
|
||||||
option.push({ id: r.id.toString(), name: r.name.toString() });
|
option.push({ id: r.id.toString(), name: r.name.toString() });
|
||||||
});
|
});
|
||||||
|
|
@ -487,17 +486,17 @@ const fetchDistrict = async (id: string | null, position: string) => {
|
||||||
.get(config.API.listDistrict(id))
|
.get(config.API.listDistrict(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
let option: DataOption[] = [];
|
let option: optionData[] = [];
|
||||||
data.map((r: any) => {
|
data.map((r: any) => {
|
||||||
option.push({ id: r.id.toString(), name: r.name.toString() });
|
option.push({ id: r.id.toString(), name: r.name.toString() });
|
||||||
});
|
});
|
||||||
if (position == "1") {
|
// if (position == "1") {
|
||||||
Ops.value.districtOps = option;
|
// Ops.value.districtOps = option;
|
||||||
OpsFilter.value.districtOps = option;
|
// OpsFilter.value.districtOps = option;
|
||||||
} else {
|
// } else {
|
||||||
Ops.value.districtCOps = option;
|
// Ops.value.districtCOps = option;
|
||||||
OpsFilter.value.districtCOps = option;
|
// OpsFilter.value.districtCOps = option;
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
|
||||||
|
|
@ -125,13 +125,13 @@ const fetchPrefix = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const addChildren = async () => {
|
const addChildren = async () => {
|
||||||
familyData.value.childrens.push({
|
// familyData.value.childrens.push({
|
||||||
id: `${familyData.value.childrens.length + 1}`,
|
// id: `${familyData.value.childrens.length + 1}`,
|
||||||
childrenPrefixId: "",
|
// childrenPrefixId: "",
|
||||||
childrenFirstName: "",
|
// childrenFirstName: "",
|
||||||
childrenLastName: "",
|
// childrenLastName: "",
|
||||||
childrenCareer: "",
|
// childrenCareer: "",
|
||||||
});
|
// });
|
||||||
|
|
||||||
familyData.value.childrens.sort(
|
familyData.value.childrens.sort(
|
||||||
(a: childrenFamily, b: childrenFamily) => Number(b.id) - Number(a.id)
|
(a: childrenFamily, b: childrenFamily) => Number(b.id) - Number(a.id)
|
||||||
|
|
@ -154,26 +154,26 @@ const fetchHistory = async () => {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data: ResponseObject[] = res.data.result;
|
const data: ResponseObject[] = res.data.result;
|
||||||
data.map((row: ResponseObject) => {
|
data.map((row: ResponseObject) => {
|
||||||
const arrayData: ResponseHistory = {
|
// const arrayData: ResponseHistory = {
|
||||||
couple: row.couple ? "1" : "0",
|
// couple: row.couple ? "1" : "0",
|
||||||
couplePrefixId: row.couplePrefixId,
|
// couplePrefixId: row.couplePrefixId,
|
||||||
coupleFirstName: row.coupleFirstName,
|
// coupleFirstName: row.coupleFirstName,
|
||||||
coupleLastName: row.coupleLastName,
|
// coupleLastName: row.coupleLastName,
|
||||||
coupleLastNameOld: row.coupleLastNameOld,
|
// coupleLastNameOld: row.coupleLastNameOld,
|
||||||
coupleCareer: row.coupleCareer,
|
// coupleCareer: row.coupleCareer,
|
||||||
fatherPrefixId: row.fatherPrefixId,
|
// fatherPrefixId: row.fatherPrefixId,
|
||||||
fatherFirstName: row.fatherFirstName,
|
// fatherFirstName: row.fatherFirstName,
|
||||||
fatherLastName: row.fatherLastName,
|
// fatherLastName: row.fatherLastName,
|
||||||
fatherCareer: row.fatherCareer,
|
// fatherCareer: row.fatherCareer,
|
||||||
motherPrefixId: row.motherPrefixId,
|
// motherPrefixId: row.motherPrefixId,
|
||||||
motherFirstName: row.motherFirstName,
|
// motherFirstName: row.motherFirstName,
|
||||||
motherLastName: row.motherLastName,
|
// motherLastName: row.motherLastName,
|
||||||
motherCareer: row.motherCareer,
|
// motherCareer: row.motherCareer,
|
||||||
childrens: row.childrens,
|
// childrens: row.childrens,
|
||||||
createdFullName: row.createdFullName,
|
// createdFullName: row.createdFullName,
|
||||||
createdAt: new Date(row.createdAt),
|
// createdAt: new Date(row.createdAt),
|
||||||
};
|
// };
|
||||||
familyDataHistory.value.push(arrayData);
|
// familyDataHistory.value.push(arrayData);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,10 @@ import type {
|
||||||
} from "@/modules/05_placement/components/PersonalDetail/profileType";
|
} from "@/modules/05_placement/components/PersonalDetail/profileType";
|
||||||
import { defaultInformation } from "@/modules/05_placement/components/PersonalDetail/profileType";
|
import { defaultInformation } from "@/modules/05_placement/components/PersonalDetail/profileType";
|
||||||
|
|
||||||
import type { InformationOps } from "@/modules/05_placement/interface/index/Main";
|
import type {
|
||||||
|
InformationOps,
|
||||||
|
optionData,
|
||||||
|
} from "@/modules/05_placement/interface/index/Main";
|
||||||
import HeaderTop from "@/modules/05_placement/components/PersonalDetail/Information/top.vue";
|
import HeaderTop from "@/modules/05_placement/components/PersonalDetail/Information/top.vue";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
@ -111,51 +114,52 @@ const fetchPerson = async () => {
|
||||||
.get(config.API.person)
|
.get(config.API.person)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
let optionbloodGroups: DataOption[] = [];
|
let optionbloodGroups: optionData[] = [];
|
||||||
|
console.log(data);
|
||||||
data.bloodGroups.map((r: any) => {
|
data.bloodGroups.map((r: any) => {
|
||||||
optionbloodGroups.push({
|
optionbloodGroups.push({
|
||||||
id: r.id.toString(),
|
id: r.id ?? "",
|
||||||
name: r.name.toString(),
|
name: r.name ?? "",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
Ops.value.bloodOps = optionbloodGroups;
|
Ops.value.bloodOps = optionbloodGroups;
|
||||||
OpsFilter.value.bloodOps = optionbloodGroups;
|
OpsFilter.value.bloodOps = optionbloodGroups;
|
||||||
|
|
||||||
let optiongenders: DataOption[] = [];
|
let optiongenders: optionData[] = [];
|
||||||
data.genders.map((r: any) => {
|
data.genders.map((r: any) => {
|
||||||
optiongenders.push({
|
optiongenders.push({
|
||||||
id: r.id.toString(),
|
id: r.id ?? "",
|
||||||
name: r.name.toString(),
|
name: r.name ?? "",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
Ops.value.genderOps = optiongenders;
|
Ops.value.genderOps = optiongenders;
|
||||||
OpsFilter.value.genderOps = optiongenders;
|
OpsFilter.value.genderOps = optiongenders;
|
||||||
|
|
||||||
let optionprefixs: DataOption[] = [];
|
let optionprefixs: optionData[] = [];
|
||||||
data.prefixs.map((r: any) => {
|
data.prefixs.map((r: any) => {
|
||||||
optionprefixs.push({
|
optionprefixs.push({
|
||||||
id: r.id.toString(),
|
id: r.id ?? "",
|
||||||
name: r.name.toString(),
|
name: r.name ?? "",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
Ops.value.prefixOps = optionprefixs;
|
Ops.value.prefixOps = optionprefixs;
|
||||||
OpsFilter.value.prefixOps = optionprefixs;
|
OpsFilter.value.prefixOps = optionprefixs;
|
||||||
|
|
||||||
let optionrelationships: DataOption[] = [];
|
let optionrelationships: optionData[] = [];
|
||||||
data.relationships.map((r: any) => {
|
data.relationships.map((r: any) => {
|
||||||
optionrelationships.push({
|
optionrelationships.push({
|
||||||
id: r.id.toString(),
|
id: r.id ?? "",
|
||||||
name: r.name.toString(),
|
name: r.name ?? "",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
Ops.value.statusOps = optionrelationships;
|
Ops.value.statusOps = optionrelationships;
|
||||||
OpsFilter.value.statusOps = optionrelationships;
|
OpsFilter.value.statusOps = optionrelationships;
|
||||||
|
|
||||||
let optionreligions: DataOption[] = [];
|
let optionreligions: optionData[] = [];
|
||||||
data.religions.map((r: any) => {
|
data.religions.map((r: any) => {
|
||||||
optionreligions.push({
|
optionreligions.push({
|
||||||
id: r.id.toString(),
|
id: r.id ?? "",
|
||||||
name: r.name.toString(),
|
name: r.name ?? "",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
Ops.value.religionOps = optionreligions;
|
Ops.value.religionOps = optionreligions;
|
||||||
|
|
@ -438,7 +442,11 @@ const getClass = (val: boolean) => {
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
:model-value="date2Thai(informaData.dateOfBirth)"
|
:model-value="
|
||||||
|
informaData.dateOfBirth
|
||||||
|
? date2Thai(informaData.dateOfBirth)
|
||||||
|
: ''
|
||||||
|
"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี เกิด'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี เกิด'}`]"
|
||||||
:label="`${'วัน/เดือน/ปี เกิด'}`"
|
:label="`${'วัน/เดือน/ปี เกิด'}`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { zipCodeOption } from "../../components/PersonalDetail/profileType";
|
import type { zipCodeOption } from "../../components/PersonalDetail/profileType";
|
||||||
interface DataOption {
|
interface DataOption {
|
||||||
id: number | null;
|
id: number;
|
||||||
name: string | null;
|
name: string;
|
||||||
disable?: boolean;
|
disable?: boolean;
|
||||||
}
|
}
|
||||||
interface DataOption1 {
|
interface DataOption1 {
|
||||||
|
|
@ -15,25 +15,30 @@ interface DataOptionInsignia {
|
||||||
typeName: string;
|
typeName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface optionData {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
interface EduOps {
|
interface EduOps {
|
||||||
levelOptions: DataOption[];
|
levelOptions: optionData[];
|
||||||
positionPathOptions: DataOption[];
|
positionPathOptions: optionData[];
|
||||||
}
|
}
|
||||||
|
|
||||||
interface InformationOps {
|
interface InformationOps {
|
||||||
prefixOps: DataOption[];
|
prefixOps: optionData[];
|
||||||
genderOps: DataOption[];
|
genderOps: optionData[];
|
||||||
bloodOps: DataOption[];
|
bloodOps: optionData[];
|
||||||
statusOps: DataOption[];
|
statusOps: optionData[];
|
||||||
religionOps: DataOption[];
|
religionOps: optionData[];
|
||||||
employeeClassOps: DataOption[];
|
employeeClassOps: optionData[];
|
||||||
employeeTypeOps: DataOption[];
|
employeeTypeOps: optionData[];
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AddressOps {
|
interface AddressOps {
|
||||||
provinceOps: DataOption[];
|
provinceOps: optionData[];
|
||||||
districtOps: DataOption[];
|
districtOps: optionData[];
|
||||||
districtCOps: DataOption[];
|
districtCOps: optionData[];
|
||||||
subdistrictOps: zipCodeOption[];
|
subdistrictOps: zipCodeOption[];
|
||||||
subdistrictCOps: zipCodeOption[];
|
subdistrictCOps: zipCodeOption[];
|
||||||
}
|
}
|
||||||
|
|
@ -167,5 +172,7 @@ export type {
|
||||||
Education,
|
Education,
|
||||||
Family,
|
Family,
|
||||||
Address,
|
Address,
|
||||||
AddressDataDefualt,
|
optionData,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export { AddressDataDefualt };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue