Merge branch 'develop' into devTee
This commit is contained in:
commit
ebee37a888
26 changed files with 2633 additions and 2503 deletions
|
|
@ -128,7 +128,7 @@ watch(
|
|||
:rules="[(val: string) => !!val || `${'กรุณากรอก คำนำหน้าชื่อ'}`]"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-3">
|
||||
<!-- <div class="col-xs-6 col-sm-6 col-md-3">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -137,7 +137,7 @@ watch(
|
|||
class="inputgreen"
|
||||
:label="dataLabel.rank"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="col-xs-6 col-sm-6 col-md-3">
|
||||
<q-input
|
||||
dense
|
||||
|
|
@ -247,7 +247,7 @@ watch(
|
|||
:label="dataLabel.nationality"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-3">
|
||||
<!-- <div class="col-xs-6 col-sm-6 col-md-3">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -267,8 +267,8 @@ watch(
|
|||
class="inputgreen"
|
||||
:label="dataLabel.religion"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-3">
|
||||
</div> -->
|
||||
<!-- <div class="col-xs-6 col-sm-6 col-md-3">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -277,6 +277,6 @@ watch(
|
|||
class="inputgreen"
|
||||
:label="dataLabel.bloodGroup"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import { useLinkageStore } from "@/stores/linkage";
|
|||
import { useDataLinkCenter } from "@/modules/04_registryPerson/stores/LinkCenter";
|
||||
import { useRequestEditStore } from "@/modules/04_registryPerson/stores/RequestEdit";
|
||||
|
||||
import type { DataOption } from "@/modules/04_registryPerson/interface/index/Main";
|
||||
import type { RequestregistrationAddressObject } from "@/modules/04_registryPerson/interface/request/Address";
|
||||
import type { RequestObject } from "@/modules/04_registryPerson/interface/request/Profile";
|
||||
import type {
|
||||
|
|
@ -159,12 +160,12 @@ function onSubmit() {
|
|||
registrationProvinceId: formDataAddress.registrationProvinceId,
|
||||
registrationAddress: formDataAddress.registrationAddress,
|
||||
|
||||
bloodGroup: formInformations.bloodGroup,
|
||||
// bloodGroup: formInformations.bloodGroup,
|
||||
relationship: formInformations.relationship,
|
||||
gender: formInformations.gender,
|
||||
religion: formInformations.religion,
|
||||
// religion: formInformations.religion,
|
||||
nationality: formInformations.nationality,
|
||||
ethnicity: formInformations.ethnicity,
|
||||
// ethnicity: formInformations.ethnicity,
|
||||
birthDate: formInformations.birthDate,
|
||||
lastName: formInformations.lastName,
|
||||
firstName: formInformations.firstName,
|
||||
|
|
@ -174,7 +175,10 @@ function onSubmit() {
|
|||
showLoader();
|
||||
http
|
||||
.patch(
|
||||
config.API.requestInformationbyType("myprofile", storeRequestEdit.profileId),
|
||||
config.API.requestInformationbyType(
|
||||
"myprofile",
|
||||
storeRequestEdit.profileId
|
||||
),
|
||||
body
|
||||
)
|
||||
.then(async (res) => {
|
||||
|
|
@ -195,51 +199,55 @@ async function amiRequest() {
|
|||
data.value = profile;
|
||||
} else {
|
||||
data.value = {
|
||||
titleCode: 3,
|
||||
titleDesc: "นาย",
|
||||
titleName: "นาย",
|
||||
titleSex: 1,
|
||||
firstName: "ชัยชนะ",
|
||||
middleName: "",
|
||||
lastName: "เรืองโรจน์",
|
||||
genderCode: 1,
|
||||
genderDesc: "ชาย",
|
||||
dateOfBirth: 25211228,
|
||||
nationalityCode: 99,
|
||||
nationalityDesc: "ไทย",
|
||||
ownerStatusDesc: "เจ้าบ้าน",
|
||||
statusOfPersonCode: 0,
|
||||
statusOfPersonDesc: "บุคคลนี้มีภูมิลำเนาอยู่ในบ้านนี้",
|
||||
dateOfMoveIn: 25580728,
|
||||
age: 45,
|
||||
|
||||
fatherPersonalID: 3102100621479,
|
||||
fatherName: "บุญเชิด",
|
||||
fatherNationalityCode: 99,
|
||||
fatherNationalityDesc: "ไทย",
|
||||
|
||||
motherPersonalID: 3102100621487,
|
||||
motherName: "พยอม",
|
||||
motherNationalityCode: 99,
|
||||
motherNationalityDesc: "ไทย",
|
||||
|
||||
fullnameAndRank: "นายสุพลชัย พูลสวัสดิ์",
|
||||
englishTitleDesc: "MR.",
|
||||
englishFirstName: "SUPHONCHAI",
|
||||
englishMiddleName: "",
|
||||
englishLastName: "PHOONSAWAT",
|
||||
|
||||
registrationAddress: "1220-1222 ถนนเพชรบุรี",
|
||||
registrationProvinceId: "24bf701c-33d6-436e-ad49-6f82bb3ae017",
|
||||
registrationDistrictId: "34bf701c-33d6-436e-ad49-6f82bb3b0586",
|
||||
registrationSubDistrictId: "44bf701c-33d6-436e-ad49-6f82bb3b5649",
|
||||
registrationZipCode: "10400",
|
||||
currentAddress: "1220-1222 ถนนเพชรบุรี",
|
||||
currentProvinceId: "24bf701c-33d6-436e-ad49-6f82bb3ae017",
|
||||
currentDistrictId: "34bf701c-33d6-436e-ad49-6f82bb3b0586",
|
||||
currentSubDistrictId: "44bf701c-33d6-436e-ad49-6f82bb3b5649",
|
||||
currentZipCode: "10400",
|
||||
// titleCode: 3,
|
||||
// titleDesc: "นาย",
|
||||
titleName: "นาย", // use
|
||||
// titleSex: 1,
|
||||
firstName: "ชัยชนะ", // use
|
||||
middleName: "", // use
|
||||
lastName: "เรืองโรจน์", // use
|
||||
// genderCode: 1,
|
||||
genderDesc: "ชาย", // use
|
||||
dateOfBirth: 25211228, // use
|
||||
// nationalityCode: 99,
|
||||
nationalityDesc: "ไทย", // use
|
||||
// ownerStatusDesc: "เจ้าบ้าน",
|
||||
// statusOfPersonCode: 0,
|
||||
// statusOfPersonDesc: "บุคคลนี้มีภูมิลำเนาอยู่ในบ้านนี้",
|
||||
// dateOfMoveIn: 25580728,
|
||||
// age: 45,
|
||||
};
|
||||
|
||||
const address = {
|
||||
// houseID: 12020203651,
|
||||
houseNo: "62/25", // use
|
||||
// houseType: 1,
|
||||
// houseTypeDesc: "บ้าน",
|
||||
villageNo: 5, // use
|
||||
// alleyWayCode: 0,
|
||||
alleyWayDesc: null, // use
|
||||
// alleyCode: 0,
|
||||
alleyDesc: null, // use
|
||||
// roadCode: 3,
|
||||
roadDesc: "เทอดพระเกียรติ", // use
|
||||
// subdistrictCode: 1,
|
||||
subdistrictDesc: "วัดชลอ", // use
|
||||
// districtCode: 2,
|
||||
districtDesc: "บางกรวย", // use
|
||||
// provinceCode: 12,
|
||||
provinceDesc: "นนทบุรี", // use
|
||||
// rcodeCode: "1296",
|
||||
// rcodeDesc: "ท้องถิ่นเทศบาลเมืองบางกรวย",
|
||||
// dateOfTerminate: 0,
|
||||
// alleyWayEnglishDesc: null,
|
||||
// alleyEnglishDesc: null,
|
||||
// roadEnglishDesc: "Terdpragied",
|
||||
// subdistrictEnglishDesc: "Wat Chalo",
|
||||
// districtEnglishDesc: "Bang Kruai",
|
||||
// provinceEnglishDesc: "Nonthaburi",
|
||||
};
|
||||
|
||||
data.value = { ...data.value, ...address };
|
||||
}
|
||||
formInformations.citizenId = idCard.value;
|
||||
formInformations.prefix = data.value.titleName;
|
||||
|
|
@ -247,16 +255,94 @@ async function amiRequest() {
|
|||
formInformations.firstName = data.value.firstName;
|
||||
formInformations.lastName = data.value.lastName;
|
||||
formInformations.nationality = data.value.nationalityDesc;
|
||||
formInformations.birthDate = data.value.dateOfBirth;
|
||||
|
||||
// แปลง dateOfBirth เป็น format 1989-01-01
|
||||
formInformations.birthDate = conventDateOfBirth(`${data.value.dateOfBirth}`);
|
||||
age.value = storeLinkCenter.calculateAge(data.value.age);
|
||||
formInformations.gender = data.value.genderDesc;
|
||||
|
||||
formDataAddress.registrationAddress = data.value.registrationAddress;
|
||||
formDataAddress.registrationProvinceId = data.value.registrationProvinceId;
|
||||
formDataAddress.registrationDistrictId = data.value.registrationDistrictId;
|
||||
formDataAddress.registrationSubDistrictId =
|
||||
data.value.registrationSubDistrictId;
|
||||
formDataAddress.registrationZipCode = data.value.registrationZipCode;
|
||||
let registrationAddress = data.value.houseNo ? data.value.houseNo : "";
|
||||
registrationAddress += data.value.villageNo
|
||||
? ` หมู่ ${data.value.villageNo}`
|
||||
: "";
|
||||
registrationAddress += data.value.alleyWayDesc
|
||||
? ` ${data.value.alleyWayDesc}`
|
||||
: "";
|
||||
registrationAddress += data.value.roadDesc
|
||||
? `ถนน ${data.value.roadDesc}`
|
||||
: "";
|
||||
formDataAddress.registrationAddress = registrationAddress;
|
||||
|
||||
// ค้นหา จังหวัด อำเภอ ตำบล และรหัสไปรษณื
|
||||
formDataAddress.registrationProvinceId = await convertProvince(
|
||||
data.value.provinceDesc
|
||||
);
|
||||
formDataAddress.registrationDistrictId = await convertDistrict(
|
||||
data.value.districtDesc
|
||||
);
|
||||
formDataAddress.registrationSubDistrictId = await convertSubdistrict(
|
||||
data.value.subdistrictDesc
|
||||
);
|
||||
// formDataAddress.registrationZipCode = data.value.registrationZipCode;
|
||||
|
||||
// console.log("province===>", data.value.provinceDesc);
|
||||
// console.log("district===>", data.value.districtDesc);
|
||||
// console.log("subdistrict===>", data.value.subdistrictDesc);
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันแปลง dateOfBirth เป็น format 1989-01-01
|
||||
* @param val dateOfBirth '25211228'
|
||||
*/
|
||||
function conventDateOfBirth(val: string) {
|
||||
// Extract year, month, and day
|
||||
const year = parseInt(val.slice(0, 4), 10) - 543;
|
||||
const month = val.slice(4, 6);
|
||||
const day = val.slice(6, 8);
|
||||
|
||||
// Format as YYYY-MM-DD
|
||||
return `${year}-${month}-${day}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันแปลงชื่อจังหวัดเป็น ID
|
||||
* @param val ชื่อจังหวัด
|
||||
*/
|
||||
async function convertProvince(val: string) {
|
||||
const id = storeLinkCenter.OpsAddress.provinceOps.find(
|
||||
(e: DataOption) => e.name === val
|
||||
)?.id;
|
||||
|
||||
// เรียกฟังก์ชันดึงข้อมูล เขต / อำเภอ
|
||||
await storeLinkCenter.fetchDistrict(id ? id : null, "1", false);
|
||||
|
||||
return id ? id : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันแปลงชื่อเขต / อำเภอ เป็น ID
|
||||
* @param val ชื่อเขต / อำเภอ
|
||||
*/
|
||||
async function convertDistrict(val: string) {
|
||||
const id = storeLinkCenter.OpsAddress.districtOps.find(
|
||||
(e: DataOption) => e.name === val
|
||||
)?.id;
|
||||
// เรียกฟังก์ชันดึงข้อมูล แขวง / ตำบล
|
||||
await storeLinkCenter.fetchSubDistrict(id ? id : null, "1", false);
|
||||
|
||||
return id ? id : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันแปลงชื่อแขวง / ตำบล เป็น ID
|
||||
* @param val ชื่อแขวง / ตำบล
|
||||
*/
|
||||
async function convertSubdistrict(val: string) {
|
||||
const result = storeLinkCenter.OpsAddress.subdistrictOps.find(
|
||||
(e: DataOption) => e.name === val
|
||||
);
|
||||
formDataAddress.registrationZipCode = result ? result.zipCode : null;
|
||||
return result ? result.id : null;
|
||||
}
|
||||
|
||||
watch(
|
||||
|
|
@ -266,29 +352,37 @@ watch(
|
|||
showLoader();
|
||||
count.value = 0;
|
||||
await storeLinkCenter.fetchPerson();
|
||||
await storeLinkCenter.fetchProvince(false);
|
||||
await amiRequest();
|
||||
presentAddress.value = formDataAddress.registrationZipCode ? "0" : "1";
|
||||
if (
|
||||
storeLinkCenter.OpsAddress.provinceOps.length === 0 ||
|
||||
storeLinkCenter.OpsAddress.districtOps.length === 0 ||
|
||||
storeLinkCenter.OpsAddress.districtCOps.length === 0 ||
|
||||
storeLinkCenter.OpsAddress.subdistrictOps.length === 0 ||
|
||||
storeLinkCenter.OpsAddress.subdistrictCOps.length === 0
|
||||
) {
|
||||
await storeLinkCenter.fetchProvince(false);
|
||||
storeLinkCenter.fetchDistrict(
|
||||
formDataAddress.registrationProvinceId,
|
||||
"1",
|
||||
false
|
||||
);
|
||||
storeLinkCenter.fetchSubDistrict(
|
||||
formDataAddress.registrationDistrictId,
|
||||
"1",
|
||||
false
|
||||
);
|
||||
}
|
||||
// if (
|
||||
// storeLinkCenter.OpsAddress.provinceOps.length === 0 ||
|
||||
// storeLinkCenter.OpsAddress.districtOps.length === 0 ||
|
||||
// storeLinkCenter.OpsAddress.districtCOps.length === 0 ||
|
||||
// storeLinkCenter.OpsAddress.subdistrictOps.length === 0 ||
|
||||
// storeLinkCenter.OpsAddress.subdistrictCOps.length === 0
|
||||
// ) {
|
||||
// await storeLinkCenter.fetchProvince(false);
|
||||
// storeLinkCenter.fetchDistrict(
|
||||
// formDataAddress.registrationProvinceId,
|
||||
// "1",
|
||||
// false
|
||||
// );
|
||||
// storeLinkCenter.fetchSubDistrict(
|
||||
// formDataAddress.registrationDistrictId,
|
||||
// "1",
|
||||
// false
|
||||
// );
|
||||
// }
|
||||
|
||||
hideLoader();
|
||||
} else {
|
||||
age.value = "";
|
||||
formDataAddress.registrationAddress = "";
|
||||
formDataAddress.registrationProvinceId = null;
|
||||
formDataAddress.registrationDistrictId = null;
|
||||
formDataAddress.registrationSubDistrictId = null;
|
||||
formDataAddress.registrationZipCode = null;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
@ -300,7 +394,6 @@ watch(
|
|||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||
<Header tittle="ขอปรับปรุงข้อมูลจากกรมการปกครอง" :close="closeDialog" />
|
||||
<q-separator />
|
||||
|
||||
<q-card-section class="scroll" style="max-height: 80vh">
|
||||
<div class="row q-col-gutter-sm">
|
||||
<div class="col-12">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
interface RequestObject {
|
||||
birthDate: Date | null;
|
||||
birthDate: Date | null | string;
|
||||
bloodGroup: string | null;
|
||||
citizenId: string;
|
||||
// email: string | null;
|
||||
|
|
@ -11,10 +11,10 @@ interface RequestObject {
|
|||
// posLevelId: string;
|
||||
// posTypeId: string;
|
||||
prefix: string;
|
||||
rank: string | null;
|
||||
relationship: string | null;
|
||||
religion: string | null;
|
||||
phone: string | null;
|
||||
rank?: string | null;
|
||||
relationship?: string | null;
|
||||
religion?: string | null;
|
||||
phone?: string | null;
|
||||
// telephoneNumber: string | null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,6 @@ const isCheckData = computed(() => {
|
|||
positionTypeOld.value !== "" &&
|
||||
positionLevelOld.value !== "" &&
|
||||
posNo.value !== "" &&
|
||||
salary.value !== 0 &&
|
||||
organization.value !== "" &&
|
||||
date.value !== null
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,6 @@ const isCheckData = computed(() => {
|
|||
positionTypeOld.value !== "" &&
|
||||
positionLevelOld.value !== "" &&
|
||||
posNo.value !== "" &&
|
||||
salary.value !== 0 &&
|
||||
date.value !== null &&
|
||||
dataDetail.value.commanderReject !== null &&
|
||||
dataDetail.value.oligarchReject !== null
|
||||
|
|
|
|||
|
|
@ -92,7 +92,6 @@ const isCheckData = computed(() => {
|
|||
positionTypeOld.value !== "" &&
|
||||
positionLevelOld.value !== "" &&
|
||||
posNo.value !== "" &&
|
||||
salary.value !== 0 &&
|
||||
date.value !== null &&
|
||||
dataDetail.value.commanderReject !== null &&
|
||||
dataDetail.value.oligarchReject !== null
|
||||
|
|
|
|||
|
|
@ -95,7 +95,6 @@ const isCheckData = computed(() => {
|
|||
positionTypeOld.value !== "" &&
|
||||
positionLevelOld.value !== "" &&
|
||||
posNo.value !== "" &&
|
||||
salary.value !== 0 &&
|
||||
date.value !== null &&
|
||||
dataDetail.value.commanderReject !== null &&
|
||||
dataDetail.value.oligarchReject !== null
|
||||
|
|
|
|||
|
|
@ -92,7 +92,6 @@ const isCheckData = computed(() => {
|
|||
positionTypeOld.value !== "" &&
|
||||
positionLevelOld.value !== "" &&
|
||||
posNo.value !== "" &&
|
||||
salary.value !== 0 &&
|
||||
date.value !== null &&
|
||||
dataDetail.value.commanderReject !== null &&
|
||||
dataDetail.value.oligarchReject !== null
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
|
||||
{
|
||||
name: "citizenId",
|
||||
align: "left",
|
||||
|
|
@ -103,6 +104,15 @@ const columns = ref<QTableProps["columns"]>([
|
|||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "position",
|
||||
align: "left",
|
||||
label: "ตำแหน่ง",
|
||||
field: "position",
|
||||
sortable: true,
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "employeeType",
|
||||
align: "left",
|
||||
|
|
@ -219,6 +229,7 @@ const visibleColumns = ref<String[]>([
|
|||
"status",
|
||||
"citizenId",
|
||||
"name",
|
||||
"position",
|
||||
"type",
|
||||
"dateReceive",
|
||||
"date",
|
||||
|
|
|
|||
|
|
@ -167,8 +167,7 @@ async function fetchDetailLeave(paramsId: string) {
|
|||
formData.leaveDraftDocument = data.leaveDraftDocument;
|
||||
formData.leaveLastStart =
|
||||
data.leaveLastStart && date2Thai(data.leaveLastStart);
|
||||
formData.leaveLastEnd =
|
||||
data.leaveLastStart && date2Thai(data.leaveLastEnd);
|
||||
formData.leaveLastEnd = data.leaveLastEnd && date2Thai(data.leaveLastEnd);
|
||||
formData.leaveTotal = data.leaveTotal ? data.leaveTotal : "0";
|
||||
formData.leavebirthDate =
|
||||
data.leaveBirthDate && date2Thai(data.leaveBirthDate);
|
||||
|
|
@ -263,7 +262,7 @@ async function fetchDetailLeave(paramsId: string) {
|
|||
formData.coupleDaySumTotalHistory = data.coupleDaySumTotalHistory
|
||||
? data.coupleDaySumTotalHistory
|
||||
: "-";
|
||||
formData.approveStep = data.approveStep;
|
||||
formData.approveStep = data.approveStep ? data.approveStep : "-";
|
||||
formData.dear = data.dear ? data.dear : "-";
|
||||
|
||||
/** ส่งประเภทของการลาไป Function เช็คประเภทการลา*/
|
||||
|
|
|
|||
|
|
@ -36,7 +36,13 @@ const props = defineProps({
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-grey-8">ลงวันที่</div>
|
||||
<div class="col">{{ props.data.absentDayRegistorDate }}</div>
|
||||
<div class="col">
|
||||
{{
|
||||
props.data.absentDayRegistorDate
|
||||
? props.data.absentDayRegistorDate
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-grey-8">ให้เข้ารับการ</div>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ const props = defineProps({
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-grey-8">วันที่คลอด</div>
|
||||
<div class="col">{{ props.data.wifeDayDateBorn }}</div>
|
||||
<div class="col">
|
||||
{{ props.data.wifeDayDateBorn ? props.data.wifeDayDateBorn : "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-grey-8">หมายเลขที่ติดต่อขณะลา</div>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,9 @@ const props = defineProps({
|
|||
<div class="col text-grey-8">
|
||||
ลาครั้งสุดท้ายในประเภทนั้น ๆ เมื่อวันที่
|
||||
</div>
|
||||
<div class="col">{{ props.data.leaveLastStart }}</div>
|
||||
<div class="col">
|
||||
{{ props.data.leaveLastStart ? props.data.leaveLastStart : "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-grey-8">หมายเลขที่ติดต่อขณะลา</div>
|
||||
|
|
|
|||
|
|
@ -71,7 +71,13 @@ function convertDateToEng(dataThia: string) {
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-grey-8">วันที่เข้ารับราชการ</div>
|
||||
<div class="col">{{ props.data.leavegovernmentDate }}</div>
|
||||
<div class="col">
|
||||
{{
|
||||
props.data.leavegovernmentDate
|
||||
? props.data.leavegovernmentDate
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-grey-8">เงินเดือนปัจจุบัน</div>
|
||||
|
|
|
|||
|
|
@ -67,11 +67,19 @@ function convertDateToEng(dataThia: string) {
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-grey-8">วันเดือนปีเกิด</div>
|
||||
<div class="col">{{ props.data.leavebirthDate }}</div>
|
||||
<div class="col">
|
||||
{{ props.data.leavebirthDate ? props.data.leavebirthDate : "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-grey-8">วันที่เข้ารับราชการ</div>
|
||||
<div class="col">{{ props.data.leavegovernmentDate }}</div>
|
||||
<div class="col">
|
||||
{{
|
||||
props.data.leavegovernmentDate
|
||||
? props.data.leavegovernmentDate
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-grey-8">เงินเดือนปัจจุบัน</div>
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@ const props = defineProps({
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-grey-8">ลาตั้งแต่วันที่</div>
|
||||
<div class="col">{{ props.data.leaveLastStart }}</div>
|
||||
<div class="col">{{ props.data.leaveDateStart }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-grey-8">ลาถึงวันที่</div>
|
||||
<div class="col">{{ props.data.leaveLastEnd }}</div>
|
||||
<div class="col">{{ props.data.leaveDateEnd }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-grey-8">จำนวนวันที่ลา</div>
|
||||
|
|
@ -28,11 +28,19 @@ const props = defineProps({
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-grey-8">วันเดือนปีเกิด</div>
|
||||
<div class="col">{{ props.data.leavebirthDate }}</div>
|
||||
<div class="col">
|
||||
{{ props.data.leavebirthDate ? props.data.leavebirthDate : "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-grey-8">วันที่เข้ารับราชการ</div>
|
||||
<div class="col">{{ props.data.leavegovernmentDate }}</div>
|
||||
<div class="col">
|
||||
{{
|
||||
props.data.leavegovernmentDate
|
||||
? props.data.leavegovernmentDate
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-grey-8">เคย/ไม่เคยบวช</div>
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ function fetchDataQuota(id: string) {
|
|||
* function เรียกข้อมูลรายชื่อ
|
||||
* @param id กลุ่ม
|
||||
*/
|
||||
function fetchDataPeriod(id: string) {
|
||||
async function fetchDataPeriod(id: string) {
|
||||
showLoader();
|
||||
rows.value = [];
|
||||
let formData = {
|
||||
|
|
@ -267,7 +267,7 @@ function fetchDataPeriod(id: string) {
|
|||
: "0",
|
||||
};
|
||||
|
||||
http
|
||||
await http
|
||||
.put(config.API.salaryListPeriodORG(id), formData)
|
||||
.then((res) => {
|
||||
rows.value = res.data.result.data;
|
||||
|
|
@ -278,9 +278,7 @@ function fetchDataPeriod(id: string) {
|
|||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
setTimeout(() => {
|
||||
hideLoader();
|
||||
}, 1000);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -121,11 +121,9 @@ async function getRound() {
|
|||
store.isClosedRound = roundFilter.value.isClose;
|
||||
salaryPeriodId.value = roundFilter.value.id;
|
||||
|
||||
await Promise.all([
|
||||
getSnap(roundFilter.value.shortCode),
|
||||
getAgency(roundFilter.value.revisionId),
|
||||
getAgencyPosition(roundFilter.value.revisionId),
|
||||
]);
|
||||
await getSnap(roundFilter.value.shortCode);
|
||||
await getAgency(roundFilter.value.revisionId);
|
||||
await getAgencyPosition(roundFilter.value.revisionId);
|
||||
} else {
|
||||
isLoad.value = false;
|
||||
roundFilter.value = "ไม่มีข้อมูล";
|
||||
|
|
@ -143,7 +141,7 @@ async function getRound() {
|
|||
/**
|
||||
* function เรียกรอบ
|
||||
*/
|
||||
function getSnap(code: string) {
|
||||
async function getSnap(code: string) {
|
||||
snapOptions.value =
|
||||
code == "OCT"
|
||||
? [
|
||||
|
|
@ -232,7 +230,7 @@ async function getAgencyPosition(id: string) {
|
|||
|
||||
agencyFilter.value = position ? position.id : "ALL";
|
||||
if (agencyFilter.value && roundFilter.value.id && snapFilter.value) {
|
||||
fetchSalalyPeriod(
|
||||
await fetchSalalyPeriod(
|
||||
agencyFilter.value,
|
||||
roundFilter.value.id,
|
||||
snapFilter.value
|
||||
|
|
@ -257,7 +255,6 @@ async function fetchSalalyPeriod(
|
|||
snap: string
|
||||
) {
|
||||
if (rootId) {
|
||||
showLoader();
|
||||
isLoad.value = false;
|
||||
const body = {
|
||||
rootId: rootId,
|
||||
|
|
@ -286,11 +283,6 @@ async function fetchSalalyPeriod(
|
|||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
setTimeout(() => {
|
||||
hideLoader();
|
||||
}, 800);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,11 +112,9 @@ async function getRound() {
|
|||
store.roundMainCode = roundFilter.value.shortCode;
|
||||
store.isClosedRound = roundFilter.value.isClose;
|
||||
|
||||
await Promise.all([
|
||||
getSnap(roundFilter.value.shortCode),
|
||||
getAgency(roundFilter.value.revisionId),
|
||||
getAgencyPosition(roundFilter.value.revisionId),
|
||||
]);
|
||||
await getSnap(roundFilter.value.shortCode);
|
||||
await getAgency(roundFilter.value.revisionId);
|
||||
await getAgencyPosition(roundFilter.value.revisionId);
|
||||
} else {
|
||||
isLoad.value = false;
|
||||
roundFilter.value = "ไม่มีข้อมูล";
|
||||
|
|
@ -220,7 +218,7 @@ async function getAgencyPosition(id: string) {
|
|||
agencyFilter.value = position ? position.id : "ALL";
|
||||
|
||||
if (agencyFilter.value && roundFilter.value.id && snapFilter.value) {
|
||||
fetchSalalyPeriod(
|
||||
await fetchSalalyPeriod(
|
||||
agencyFilter.value,
|
||||
roundFilter.value.id,
|
||||
snapFilter.value
|
||||
|
|
@ -245,7 +243,6 @@ async function fetchSalalyPeriod(
|
|||
snap: string
|
||||
) {
|
||||
if (rootId) {
|
||||
showLoader();
|
||||
isLoad.value = false;
|
||||
const body = {
|
||||
rootId: rootId,
|
||||
|
|
@ -263,11 +260,6 @@ async function fetchSalalyPeriod(
|
|||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
setTimeout(() => {
|
||||
hideLoader();
|
||||
}, 1500);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,9 +60,9 @@ function getClass() {
|
|||
}
|
||||
|
||||
/** ดึงข้อมูล */
|
||||
function fetchData() {
|
||||
async function fetchData() {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.get(config.API.developmentHistoryListByid("officer", id.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
|
|
@ -104,9 +104,9 @@ function fetchData() {
|
|||
}
|
||||
|
||||
/** ดึงข้อมูลเมื่อคอมโพเนนต์โหลดเสร็จสมบูรณ์ */
|
||||
onMounted(() => {
|
||||
onMounted(async () => {
|
||||
if (id.value) {
|
||||
fetchData();
|
||||
await fetchData();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
@ -232,7 +232,11 @@ onMounted(() => {
|
|||
</div>
|
||||
|
||||
<div class="col-12 col-sm-12 col-md-7">
|
||||
{{ Number(formMainProject.year) + 543 ?? "-" }}
|
||||
{{
|
||||
formMainProject.year
|
||||
? Number(formMainProject.year) + 543
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row col-12">
|
||||
|
|
|
|||
|
|
@ -254,7 +254,6 @@ watch(
|
|||
:options="govOp"
|
||||
map-options
|
||||
emit-value
|
||||
:class="getClass()"
|
||||
@update:model-value="inputSearch = ''"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -264,7 +263,6 @@ watch(
|
|||
outlined
|
||||
label="ค้นหา"
|
||||
v-model="inputSearch"
|
||||
:class="getClass()"
|
||||
:mask="search === 'citizenId' ? '#############' : undefined"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -274,7 +272,7 @@ watch(
|
|||
class="full-width full-height"
|
||||
unelevated
|
||||
color="teal"
|
||||
@click="searchFilter()"
|
||||
@click="(formFilter.page = 1), searchFilter()"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -235,7 +235,11 @@ onMounted(() => {
|
|||
</div>
|
||||
|
||||
<div class="col-12 col-sm-12 col-md-7">
|
||||
{{ Number(formMainProject.year) + 543 ?? "-" }}
|
||||
{{
|
||||
formMainProject.year
|
||||
? Number(formMainProject.year) + 543
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row col-12">
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -134,12 +134,13 @@ const columns = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
|
||||
/** ดึงข้อมูลหน่วยงาน เเละ เรียกใช้ฟังชั่น ดึงข้อมูล */
|
||||
function fetchListOrg() {
|
||||
async function fetchListOrg() {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.get(config.API.developmentHistoryListOrg("employee", formFilter.year))
|
||||
.then(async (res) => {
|
||||
formFilter.root = null;
|
||||
formFilter.page = 1;
|
||||
rows.value = [];
|
||||
const option = [{ name: "ทั้งหมด", id: null }];
|
||||
const optionNew = await res.data.result.map((e: string) => ({
|
||||
|
|
@ -192,9 +193,9 @@ function onEdit(id: string) {
|
|||
}
|
||||
|
||||
/** ดึงข้อมูล */
|
||||
function getData() {
|
||||
async function getData() {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.post(config.API.developmentHistoryList("employee"), formFilter)
|
||||
.then((res) => {
|
||||
const data = res.data.result.data;
|
||||
|
|
@ -241,8 +242,8 @@ watch(
|
|||
);
|
||||
|
||||
/** ดึงข้อมูลเมื่อโหลดหน้าเสร็จสิ้น */
|
||||
onMounted(() => {
|
||||
fetchListOrg();
|
||||
onMounted(async () => {
|
||||
await fetchListOrg();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -387,7 +388,6 @@ onMounted(() => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -167,10 +167,12 @@ function fetchListOrg() {
|
|||
}));
|
||||
option.push(...optionNew);
|
||||
agencyOp.value = option;
|
||||
getData();
|
||||
await getData();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
|
@ -178,9 +180,9 @@ function fetchListOrg() {
|
|||
/**
|
||||
* function เรียกข้อมูลรายการประวัติการฝึกอบรม/ดูงานของข้าราชการกรุงเทพมหานครสามัญ
|
||||
*/
|
||||
function getData() {
|
||||
async function getData() {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.post(config.API.developmentHistoryList("officer"), formFilter)
|
||||
.then((res) => {
|
||||
const data = res.data.result.data;
|
||||
|
|
@ -217,10 +219,9 @@ function onDownload(type: string) {
|
|||
year: formFilter.year,
|
||||
root: formFilter.root,
|
||||
})
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
|
||||
genReportXLSX(
|
||||
.then(async (res) => {
|
||||
const dataList = await res.data.result;
|
||||
await genReportXLSX(
|
||||
dataList,
|
||||
"รายการประวัติการฝึกอบรม/ดูงานของข้าราชการกรุงเทพมหานครสามัญ",
|
||||
type
|
||||
|
|
@ -408,7 +409,6 @@ onMounted(() => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import genReportXLSX from "@/plugins/genreportxlsx";
|
|||
|
||||
import type {
|
||||
DataOption,
|
||||
ItemsDownload,
|
||||
NewPagination,
|
||||
} from "@/modules/15_development/interface/index/Main";
|
||||
import type { ListSholarship } from "@/modules/15_development/interface/response/Scholarship";
|
||||
|
|
@ -327,7 +326,6 @@ onMounted(() => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue