upload เอกสารหลักฐาน
This commit is contained in:
parent
01fe8f97f4
commit
518884d548
10 changed files with 387 additions and 137 deletions
|
|
@ -10,6 +10,7 @@ const placemenRelocation = `${placement}/relocation`;
|
||||||
const placemenOther = `${env.API_URI}/retirement/other`;
|
const placemenOther = `${env.API_URI}/retirement/other`;
|
||||||
const placemenAppointment = `${placement}/appointment`;
|
const placemenAppointment = `${placement}/appointment`;
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
MainDetail: (year: number) => `${placement}/exam/${year}`,
|
MainDetail: (year: number) => `${placement}/exam/${year}`,
|
||||||
yearOptions: () => `${placement}/fiscal`,
|
yearOptions: () => `${placement}/fiscal`,
|
||||||
|
|
@ -59,6 +60,10 @@ export default {
|
||||||
// clear Position
|
// clear Position
|
||||||
clearPosition: (personalId: string) =>
|
clearPosition: (personalId: string) =>
|
||||||
`${placement}/position/clear/${personalId}`,
|
`${placement}/position/clear/${personalId}`,
|
||||||
|
// Document
|
||||||
|
documentByid: (personalId: string) => `${placement}/doc/${personalId}`,
|
||||||
|
documentDelid: (personalId: string, docid: string) => `${placement}/doc/${personalId}/${docid}`,
|
||||||
|
|
||||||
|
|
||||||
// order
|
// order
|
||||||
organizationsOrder: () => `${order}/order/organizations`,
|
organizationsOrder: () => `${order}/order/organizations`,
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ import { useQuasar } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
import { usePersonalDataStore } from "@/modules/05_placement/storePersona";
|
||||||
|
|
||||||
import Informationvue from "@/modules/05_placement/components/PersonalDetail/Information/Information.vue";
|
import Informationvue from "@/modules/05_placement/components/PersonalDetail/Information/Information.vue";
|
||||||
import Addressvue from "@/modules/05_placement/components/PersonalDetail/Information/Address.vue";
|
import Addressvue from "@/modules/05_placement/components/PersonalDetail/Information/Address.vue";
|
||||||
import EducationVue from "@/modules/05_placement/components/PersonalDetail/Education.vue";
|
import EducationVue from "@/modules/05_placement/components/PersonalDetail/Education.vue";
|
||||||
|
|
@ -16,7 +18,7 @@ import Certicate from "@/modules/05_placement/components/PersonalDetail/Informat
|
||||||
import ExamResult from "@/modules/05_placement/components/PersonalDetail/ExamResult.vue";
|
import ExamResult from "@/modules/05_placement/components/PersonalDetail/ExamResult.vue";
|
||||||
import Qualification from "@/modules/05_placement/components/PersonalDetail/Qualification.vue";
|
import Qualification from "@/modules/05_placement/components/PersonalDetail/Qualification.vue";
|
||||||
import Familyvue from "@/modules/05_placement/components/PersonalDetail/Information/Family.vue";
|
import Familyvue from "@/modules/05_placement/components/PersonalDetail/Information/Family.vue";
|
||||||
// import Document from "@/modules/05_placement/components/PersonalDetail/Information/Document.vue";
|
import Document from "@/modules/05_placement/components/PersonalDetail/Information/Document.vue";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AddressDataDefualt,
|
AddressDataDefualt,
|
||||||
|
|
@ -38,6 +40,7 @@ const $q = useQuasar(); // show dialog
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const store = useDataStore();
|
const store = useDataStore();
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
|
const storePersonal = usePersonalDataStore();
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
const { changeTab } = store;
|
const { changeTab } = store;
|
||||||
const statusEdit = ref<boolean>(false);
|
const statusEdit = ref<boolean>(false);
|
||||||
|
|
@ -115,7 +118,7 @@ const fetchData = async () => {
|
||||||
.get(config.API.placementPersonalId(examId.value))
|
.get(config.API.placementPersonalId(examId.value))
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
storePersonal.fecthDataInformation(data);
|
||||||
personalData.value.fullName = data.fullName;
|
personalData.value.fullName = data.fullName;
|
||||||
personalData.value.id = data.personalId;
|
personalData.value.id = data.personalId;
|
||||||
|
|
||||||
|
|
@ -253,7 +256,7 @@ const fetchData = async () => {
|
||||||
รายละเอียดของ {{ personalData.fullName }}
|
รายละเอียดของ {{ personalData.fullName }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="q-pb-lg">
|
<div class="q-pb-lg" v-if="storePersonal.loading">
|
||||||
<q-card class="row q-pb-lg">
|
<q-card class="row q-pb-lg">
|
||||||
<div id="information" name="1" class="col-12 q-pa-sm">
|
<div id="information" name="1" class="col-12 q-pa-sm">
|
||||||
<Informationvue
|
<Informationvue
|
||||||
|
|
@ -316,7 +319,11 @@ const fetchData = async () => {
|
||||||
<q-separator size="4px" />
|
<q-separator size="4px" />
|
||||||
</div>
|
</div>
|
||||||
<!-- v-model:data="QualificationData" -->
|
<!-- v-model:data="QualificationData" -->
|
||||||
<Document v-model:statusEdit="statusEdit" :fetch="fetchData" />
|
<Document
|
||||||
|
v-model:statusEdit="statusEdit"
|
||||||
|
:fetch="fetchData"
|
||||||
|
:datainformation="storePersonal.dataMain"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -284,7 +284,7 @@ watch(visibleColumns, async (count: String[], prevCount: String[]) => {
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchLevel();
|
await fetchLevel();
|
||||||
await fetchPositionPath();
|
await fetchPositionPath();
|
||||||
await props.fetch();
|
// await props.fetch();
|
||||||
rows.value = props.data;
|
rows.value = props.data;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,17 +67,17 @@ const registAddress = reactive<AddressData>({
|
||||||
zipCode: "",
|
zipCode: "",
|
||||||
districtId: "",
|
districtId: "",
|
||||||
provinceId: "",
|
provinceId: "",
|
||||||
})
|
});
|
||||||
|
|
||||||
const currentAddress = reactive<AddressData>({
|
const currentAddress = reactive<AddressData>({
|
||||||
subDistrictId: "",
|
subDistrictId: "",
|
||||||
zipCode: "",
|
zipCode: "",
|
||||||
districtId: "",
|
districtId: "",
|
||||||
provinceId: "",
|
provinceId: "",
|
||||||
})
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getNewData();
|
// await getNewData();
|
||||||
emit("update:statusEdit", false);
|
emit("update:statusEdit", false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -126,7 +126,9 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
||||||
|
|
||||||
const refreshData = async () => {
|
const refreshData = async () => {
|
||||||
myform.value.reset();
|
myform.value.reset();
|
||||||
await getNewData();
|
await props.fetch();
|
||||||
|
await fetchProvince();
|
||||||
|
// await getNewData();
|
||||||
};
|
};
|
||||||
|
|
||||||
const getNewData = async () => {
|
const getNewData = async () => {
|
||||||
|
|
@ -179,7 +181,9 @@ const editData = async () => {
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
emit("update:statusEdit", false);
|
emit("update:statusEdit", false);
|
||||||
await getNewData();
|
// await getNewData();
|
||||||
|
await props.fetch();
|
||||||
|
await fetchProvince();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -196,13 +200,13 @@ const saveData = async () => {
|
||||||
const selectProvince = async (e: string | null, name: string) => {
|
const selectProvince = async (e: string | null, name: string) => {
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
if (name == "1") {
|
if (name == "1") {
|
||||||
registAddress.subDistrictId = ""
|
registAddress.subDistrictId = "";
|
||||||
registAddress.zipCode = ""
|
registAddress.zipCode = "";
|
||||||
registAddress.districtId = ""
|
registAddress.districtId = "";
|
||||||
} else {
|
} else {
|
||||||
currentAddress.subDistrictId = ""
|
currentAddress.subDistrictId = "";
|
||||||
currentAddress.zipCode = ""
|
currentAddress.zipCode = "";
|
||||||
currentAddress.districtId = ""
|
currentAddress.districtId = "";
|
||||||
}
|
}
|
||||||
myform.value.resetValidation();
|
myform.value.resetValidation();
|
||||||
await fetchDistrict(e, name);
|
await fetchDistrict(e, name);
|
||||||
|
|
@ -253,36 +257,58 @@ const fetchProvince = async () => {
|
||||||
Ops.value.provinceOps = option;
|
Ops.value.provinceOps = option;
|
||||||
OpsFilter.value.provinceOps = option;
|
OpsFilter.value.provinceOps = option;
|
||||||
|
|
||||||
const checkRegistProvinceId = await option.find((e: any) => e.id === addressData.value.registProvinceId)
|
const checkRegistProvinceId = await option.find(
|
||||||
|
(e: any) => e.id === addressData.value.registProvinceId
|
||||||
|
);
|
||||||
|
|
||||||
// ที่อยู่ถ้า id จังหวัดว่างไม่ดึงค่าอำเภอ ตำบล และรหัสไปรษณีย์
|
// ที่อยู่ถ้า id จังหวัดว่างไม่ดึงค่าอำเภอ ตำบล และรหัสไปรษณีย์
|
||||||
if (addressData.value.registProvinceId == '' || addressData.value.registProvinceId == '00000000-0000-0000-0000-000000000000' || !checkRegistProvinceId) {
|
if (
|
||||||
registAddress.subDistrictId = ""
|
addressData.value.registProvinceId == "" ||
|
||||||
registAddress.zipCode = ""
|
addressData.value.registProvinceId ==
|
||||||
registAddress.districtId = ""
|
"00000000-0000-0000-0000-000000000000" ||
|
||||||
|
!checkRegistProvinceId
|
||||||
|
) {
|
||||||
|
registAddress.subDistrictId = "";
|
||||||
|
registAddress.zipCode = "";
|
||||||
|
registAddress.districtId = "";
|
||||||
} else {
|
} else {
|
||||||
registAddress.provinceId = await addressData.value.registProvinceId
|
registAddress.provinceId = await addressData.value.registProvinceId;
|
||||||
registAddress.zipCode = await addressData.value.registZipCode
|
registAddress.zipCode = await addressData.value.registZipCode;
|
||||||
|
|
||||||
await fetchDistrict(addressData.value.registProvinceId, "1");
|
await fetchDistrict(addressData.value.registProvinceId, "1");
|
||||||
if (addressData.value.registDistrictId != null && addressData.value.registDistrictId != '00000000-0000-0000-0000-000000000000') {
|
if (
|
||||||
|
addressData.value.registDistrictId != null &&
|
||||||
|
addressData.value.registDistrictId !=
|
||||||
|
"00000000-0000-0000-0000-000000000000"
|
||||||
|
) {
|
||||||
await fetchSubDistrict(addressData.value.registDistrictId, "1");
|
await fetchSubDistrict(addressData.value.registDistrictId, "1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const checkCurrentProvinceId = await option.find((e: any) => e.id === addressData.value.currentProvinceId)
|
const checkCurrentProvinceId = await option.find(
|
||||||
|
(e: any) => e.id === addressData.value.currentProvinceId
|
||||||
|
);
|
||||||
|
|
||||||
// ที่อยู่ปัจจุบันถ้า id จังหวัดว่างไม่ดึงค่าอำเภอ ตำบล และรหัสไปรษณีย์
|
// ที่อยู่ปัจจุบันถ้า id จังหวัดว่างไม่ดึงค่าอำเภอ ตำบล และรหัสไปรษณีย์
|
||||||
if (addressData.value.currentProvinceId == '' || addressData.value.currentProvinceId == '00000000-0000-0000-0000-000000000000' || !checkCurrentProvinceId) {
|
if (
|
||||||
currentAddress.subDistrictId = ""
|
addressData.value.currentProvinceId == "" ||
|
||||||
currentAddress.zipCode = ""
|
addressData.value.currentProvinceId ==
|
||||||
currentAddress.districtId = ""
|
"00000000-0000-0000-0000-000000000000" ||
|
||||||
|
!checkCurrentProvinceId
|
||||||
|
) {
|
||||||
|
currentAddress.subDistrictId = "";
|
||||||
|
currentAddress.zipCode = "";
|
||||||
|
currentAddress.districtId = "";
|
||||||
} else {
|
} else {
|
||||||
currentAddress.provinceId = addressData.value.currentProvinceId
|
currentAddress.provinceId = addressData.value.currentProvinceId;
|
||||||
currentAddress.zipCode = addressData.value.currentZipCode
|
currentAddress.zipCode = addressData.value.currentZipCode;
|
||||||
|
|
||||||
await fetchDistrict(addressData.value.currentProvinceId, "2");
|
await fetchDistrict(addressData.value.currentProvinceId, "2");
|
||||||
if (addressData.value.currentDistrictId != null && addressData.value.currentDistrictId != '00000000-0000-0000-0000-000000000000') {
|
if (
|
||||||
|
addressData.value.currentDistrictId != null &&
|
||||||
|
addressData.value.currentDistrictId !=
|
||||||
|
"00000000-0000-0000-0000-000000000000"
|
||||||
|
) {
|
||||||
await fetchSubDistrict(addressData.value.currentDistrictId, "2");
|
await fetchSubDistrict(addressData.value.currentDistrictId, "2");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -312,19 +338,23 @@ const fetchDistrict = async (id: string | null, position: string) => {
|
||||||
OpsFilter.value.districtOps = option;
|
OpsFilter.value.districtOps = option;
|
||||||
|
|
||||||
// ที่อยู่ เช็คอำเภอว่ามี id ใน array ไหม ถ้ามีค่อยกำหนดค่าไปในตัวแปรใหม่เพิ่มแสดงผล
|
// ที่อยู่ เช็คอำเภอว่ามี id ใน array ไหม ถ้ามีค่อยกำหนดค่าไปในตัวแปรใหม่เพิ่มแสดงผล
|
||||||
const checkRegistDistrictId = option.find((e: any) => e.id === addressData.value.registDistrictId)
|
const checkRegistDistrictId = option.find(
|
||||||
|
(e: any) => e.id === addressData.value.registDistrictId
|
||||||
|
);
|
||||||
|
|
||||||
if (checkRegistDistrictId) {
|
if (checkRegistDistrictId) {
|
||||||
registAddress.districtId = addressData.value.registDistrictId
|
registAddress.districtId = addressData.value.registDistrictId;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Ops.value.districtCOps = option;
|
Ops.value.districtCOps = option;
|
||||||
OpsFilter.value.districtCOps = option;
|
OpsFilter.value.districtCOps = option;
|
||||||
|
|
||||||
// ที่อยู่ปัจจุบัน เช็คอำเภอว่ามี id ใน array ไหม ถ้ามีค่อยกำหนดค่าไปในตัวแปรใหม่เพิ่มแสดงผล
|
// ที่อยู่ปัจจุบัน เช็คอำเภอว่ามี id ใน array ไหม ถ้ามีค่อยกำหนดค่าไปในตัวแปรใหม่เพิ่มแสดงผล
|
||||||
const checkCurrentDistrictId = await option.find((e: any) => e.id === addressData.value.currentDistrictId)
|
const checkCurrentDistrictId = await option.find(
|
||||||
|
(e: any) => e.id === addressData.value.currentDistrictId
|
||||||
|
);
|
||||||
if (checkCurrentDistrictId) {
|
if (checkCurrentDistrictId) {
|
||||||
currentAddress.districtId = addressData.value.currentDistrictId
|
currentAddress.districtId = addressData.value.currentDistrictId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -358,18 +388,23 @@ const fetchSubDistrict = async (id: string | null, position: string) => {
|
||||||
OpsFilter.value.subdistrictOps = option;
|
OpsFilter.value.subdistrictOps = option;
|
||||||
|
|
||||||
// ที่อยู่ เช็คตำบลว่ามี id ใน array ไหม ถ้ามีค่อยกำหนดค่าไปในตัวแปรใหม่เพิ่มแสดงผล
|
// ที่อยู่ เช็คตำบลว่ามี id ใน array ไหม ถ้ามีค่อยกำหนดค่าไปในตัวแปรใหม่เพิ่มแสดงผล
|
||||||
const checkRegistSubDistrictId = await option.find((e: any) => e.id === addressData.value.registSubDistrictId)
|
const checkRegistSubDistrictId = await option.find(
|
||||||
|
(e: any) => e.id === addressData.value.registSubDistrictId
|
||||||
|
);
|
||||||
if (checkRegistSubDistrictId) {
|
if (checkRegistSubDistrictId) {
|
||||||
registAddress.subDistrictId = addressData.value.registSubDistrictId
|
registAddress.subDistrictId = addressData.value.registSubDistrictId;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Ops.value.subdistrictCOps = option;
|
Ops.value.subdistrictCOps = option;
|
||||||
OpsFilter.value.subdistrictCOps = option;
|
OpsFilter.value.subdistrictCOps = option;
|
||||||
|
|
||||||
// ที่อยู่ปัจจุบัน เช็คตำบลว่ามี id ใน array ไหม ถ้ามีค่อยกำหนดค่าไปในตัวแปรใหม่เพิ่มแสดงผล
|
// ที่อยู่ปัจจุบัน เช็คตำบลว่ามี id ใน array ไหม ถ้ามีค่อยกำหนดค่าไปในตัวแปรใหม่เพิ่มแสดงผล
|
||||||
const checkCurrentSubDistrictId = await option.find((e: any) => e.id === addressData.value.currentSubDistrictId)
|
const checkCurrentSubDistrictId = await option.find(
|
||||||
|
(e: any) => e.id === addressData.value.currentSubDistrictId
|
||||||
|
);
|
||||||
if (checkCurrentSubDistrictId) {
|
if (checkCurrentSubDistrictId) {
|
||||||
currentAddress.subDistrictId = addressData.value.currentSubDistrictId
|
currentAddress.subDistrictId =
|
||||||
|
addressData.value.currentSubDistrictId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -405,91 +440,268 @@ const getClass = (val: boolean) => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-card class="col-12 q-px-lg q-py-md q-mt-md no-border">
|
<q-card class="col-12 q-px-lg q-py-md q-mt-md no-border">
|
||||||
<HeaderTop v-model:edit="edit" header="ข้อมูลที่อยู่" icon="mdi-map-marker" :save="saveData" :history="false"
|
<HeaderTop
|
||||||
:changeBtn="changeBtn" :disable="statusEdit" :cancel="refreshData" />
|
v-model:edit="edit"
|
||||||
|
header="ข้อมูลที่อยู่"
|
||||||
|
icon="mdi-map-marker"
|
||||||
|
:save="saveData"
|
||||||
|
:history="false"
|
||||||
|
:changeBtn="changeBtn"
|
||||||
|
:disable="statusEdit"
|
||||||
|
:cancel="refreshData"
|
||||||
|
/>
|
||||||
<q-form ref="myform">
|
<q-form ref="myform">
|
||||||
<div class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs">
|
<div class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<q-input :class="getClass(edit)" hide-bottom-space :outlined="edit" dense lazy-rules type="textarea" autogrow
|
<q-input
|
||||||
:readonly="!edit" :borderless="!edit" v-model="addressData.registAddress"
|
:class="getClass(edit)"
|
||||||
|
hide-bottom-space
|
||||||
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
type="textarea"
|
||||||
|
autogrow
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="addressData.registAddress"
|
||||||
:rules="[(val: string) => !!val || `${'กรุณากรอก ที่อยู่ตามทะเบียนบ้าน'}`]"
|
:rules="[(val: string) => !!val || `${'กรุณากรอก ที่อยู่ตามทะเบียนบ้าน'}`]"
|
||||||
:label="`${'ที่อยู่ตามทะเบียนบ้าน'}`" />
|
:label="`${'ที่อยู่ตามทะเบียนบ้าน'}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||||
<selector :hide-dropdown-icon="!edit" hide-bottom-space :class="getClass(edit)" :readonly="!edit"
|
<selector
|
||||||
:borderless="!edit" :rules="[(val: string) => !!val || `${'กรุณาเลือก จังหวัด'}`]" :outlined="edit" dense
|
:hide-dropdown-icon="!edit"
|
||||||
lazy-rules v-model="registAddress.provinceId" emit-value map-options option-label="name"
|
hide-bottom-space
|
||||||
:options="Ops.provinceOps" option-value="id" :label="`${'จังหวัด'}`"
|
:class="getClass(edit)"
|
||||||
@update:model-value="(value: string) => selectProvince(value, '1')" use-input input-debounce="0" @filter="(inputValue: string,
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
:rules="[(val: string) => !!val || `${'กรุณาเลือก จังหวัด'}`]"
|
||||||
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
v-model="registAddress.provinceId"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="name"
|
||||||
|
:options="Ops.provinceOps"
|
||||||
|
option-value="id"
|
||||||
|
:label="`${'จังหวัด'}`"
|
||||||
|
@update:model-value="(value: string) => selectProvince(value, '1')"
|
||||||
|
use-input
|
||||||
|
input-debounce="0"
|
||||||
|
@filter="(inputValue: string,
|
||||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'provinceOps'
|
doneFn: Function) => filterSelector(inputValue, doneFn, 'provinceOps'
|
||||||
)" />
|
)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||||
<selector :hide-dropdown-icon="!edit" hide-bottom-space :class="getClass(edit)" :readonly="!edit"
|
<selector
|
||||||
:borderless="!edit" :rules="[(val: string) => !!val || `${'กรุณาเลือก เขต / อำเภอ'}`]" :outlined="edit" dense
|
:hide-dropdown-icon="!edit"
|
||||||
lazy-rules v-model="registAddress.districtId" emit-value map-options option-label="name"
|
hide-bottom-space
|
||||||
:options="Ops.districtOps" option-value="id" :label="`${'เขต / อำเภอ'}`"
|
:class="getClass(edit)"
|
||||||
@update:model-value="(value: string) => selectDistrict(value, '1')" use-input input-debounce="0" @filter="(inputValue: string,
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
:rules="[(val: string) => !!val || `${'กรุณาเลือก เขต / อำเภอ'}`]"
|
||||||
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
v-model="registAddress.districtId"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="name"
|
||||||
|
:options="Ops.districtOps"
|
||||||
|
option-value="id"
|
||||||
|
:label="`${'เขต / อำเภอ'}`"
|
||||||
|
@update:model-value="(value: string) => selectDistrict(value, '1')"
|
||||||
|
use-input
|
||||||
|
input-debounce="0"
|
||||||
|
@filter="(inputValue: string,
|
||||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'districtOps'
|
doneFn: Function) => filterSelector(inputValue, doneFn, 'districtOps'
|
||||||
)" />
|
)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||||
<selector :hide-dropdown-icon="!edit" hide-bottom-space :class="getClass(edit)" :readonly="!edit"
|
<selector
|
||||||
:borderless="!edit" :rules="[(val: string) => !!val || `${'กรุณาเลือก แขวง / ตำบล '}`]" :outlined="edit" dense
|
:hide-dropdown-icon="!edit"
|
||||||
lazy-rules v-model="registAddress.subDistrictId" emit-value map-options option-label="name"
|
hide-bottom-space
|
||||||
:options="Ops.subdistrictOps" option-value="id" :label="`${'แขวง / ตำบล '}`"
|
:class="getClass(edit)"
|
||||||
@update:model-value="(value: string) => selectSubDistrict(value, '1')" use-input input-debounce="0" @filter="(inputValue: string,
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
:rules="[(val: string) => !!val || `${'กรุณาเลือก แขวง / ตำบล '}`]"
|
||||||
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
v-model="registAddress.subDistrictId"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="name"
|
||||||
|
:options="Ops.subdistrictOps"
|
||||||
|
option-value="id"
|
||||||
|
:label="`${'แขวง / ตำบล '}`"
|
||||||
|
@update:model-value="(value: string) => selectSubDistrict(value, '1')"
|
||||||
|
use-input
|
||||||
|
input-debounce="0"
|
||||||
|
@filter="(inputValue: string,
|
||||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'subdistrictOps'
|
doneFn: Function) => filterSelector(inputValue, doneFn, 'subdistrictOps'
|
||||||
)" />
|
)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||||
<q-input :class="getClass(edit)" hide-bottom-space dense lazy-rules readonly borderless
|
<q-input
|
||||||
v-model="registAddress.zipCode" :style="!edit ? '' : 'padding:0 12px;'" :label="`${'รหัสไปรษณีย์'}`" />
|
:class="getClass(edit)"
|
||||||
|
hide-bottom-space
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
readonly
|
||||||
|
borderless
|
||||||
|
v-model="registAddress.zipCode"
|
||||||
|
:style="!edit ? '' : 'padding:0 12px;'"
|
||||||
|
:label="`${'รหัสไปรษณีย์'}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 q-pt-lg"><q-separator /></div>
|
<div class="col-12 q-pt-lg"><q-separator /></div>
|
||||||
<div class="col-xs-12 q-gutter-sm items-center flex q-my-sm">
|
<div class="col-xs-12 q-gutter-sm items-center flex q-my-sm">
|
||||||
<label class="text-bold">ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้าน</label>
|
<label class="text-bold"
|
||||||
<q-radio v-model="addressData.registSame" checked-icon="task_alt" unchecked-icon="panorama_fish_eye" val="1"
|
>ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้าน</label
|
||||||
label="ใช่" dense :disable="!edit" />
|
>
|
||||||
<q-radio v-model="addressData.registSame" checked-icon="task_alt" unchecked-icon="panorama_fish_eye" val="0"
|
<q-radio
|
||||||
label="ไม่" dense :disable="!edit" />
|
v-model="addressData.registSame"
|
||||||
|
checked-icon="task_alt"
|
||||||
|
unchecked-icon="panorama_fish_eye"
|
||||||
|
val="1"
|
||||||
|
label="ใช่"
|
||||||
|
dense
|
||||||
|
:disable="!edit"
|
||||||
|
/>
|
||||||
|
<q-radio
|
||||||
|
v-model="addressData.registSame"
|
||||||
|
checked-icon="task_alt"
|
||||||
|
unchecked-icon="panorama_fish_eye"
|
||||||
|
val="0"
|
||||||
|
label="ไม่"
|
||||||
|
dense
|
||||||
|
:disable="!edit"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12" v-if="addressData.registSame == '0'">
|
<div class="col-xs-12" v-if="addressData.registSame == '0'">
|
||||||
<q-input :class="getClass(edit)" hide-bottom-space :outlined="edit" dense lazy-rules type="textarea" autogrow
|
<q-input
|
||||||
:readonly="!edit" :borderless="!edit" v-model="addressData.currentAddress"
|
:class="getClass(edit)"
|
||||||
:rules="[(val: string) => !!val || `${'กรุณากรอก ที่อยู่ปัจจุบัน'}`]" :label="`${'ที่อยู่ปัจจุบัน'}`" />
|
hide-bottom-space
|
||||||
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
type="textarea"
|
||||||
|
autogrow
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="addressData.currentAddress"
|
||||||
|
:rules="[(val: string) => !!val || `${'กรุณากรอก ที่อยู่ปัจจุบัน'}`]"
|
||||||
|
:label="`${'ที่อยู่ปัจจุบัน'}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 col-md-3" v-if="addressData.registSame == '0'">
|
<div
|
||||||
<selector :hide-dropdown-icon="!edit" hide-bottom-space :class="getClass(edit)" :readonly="!edit"
|
class="col-xs-6 col-sm-3 col-md-3"
|
||||||
:borderless="!edit" :rules="[(val: string) => !!val || `${'กรุณาเลือก จังหวัด'}`]" :outlined="edit" dense
|
v-if="addressData.registSame == '0'"
|
||||||
lazy-rules v-model="currentAddress.provinceId" emit-value map-options option-label="name"
|
>
|
||||||
:options="Ops.provinceOps" option-value="id" :label="`${'จังหวัด'}`"
|
<selector
|
||||||
@update:model-value="(value: string) => selectProvince(value, '2')" use-input input-debounce="0" @filter="(inputValue: string,
|
:hide-dropdown-icon="!edit"
|
||||||
|
hide-bottom-space
|
||||||
|
:class="getClass(edit)"
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
:rules="[(val: string) => !!val || `${'กรุณาเลือก จังหวัด'}`]"
|
||||||
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
v-model="currentAddress.provinceId"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="name"
|
||||||
|
:options="Ops.provinceOps"
|
||||||
|
option-value="id"
|
||||||
|
:label="`${'จังหวัด'}`"
|
||||||
|
@update:model-value="(value: string) => selectProvince(value, '2')"
|
||||||
|
use-input
|
||||||
|
input-debounce="0"
|
||||||
|
@filter="(inputValue: string,
|
||||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'provinceOps'
|
doneFn: Function) => filterSelector(inputValue, doneFn, 'provinceOps'
|
||||||
)" />
|
)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 col-md-3" v-if="addressData.registSame == '0'">
|
<div
|
||||||
<selector :hide-dropdown-icon="!edit" hide-bottom-space :class="getClass(edit)" :readonly="!edit"
|
class="col-xs-6 col-sm-3 col-md-3"
|
||||||
:borderless="!edit" :rules="[(val: string) => !!val || `${'กรุณาเลือก เขต / อำเภอ'}`]" :outlined="edit" dense
|
v-if="addressData.registSame == '0'"
|
||||||
lazy-rules v-model="currentAddress.districtId" emit-value map-options option-label="name"
|
>
|
||||||
:options="Ops.districtCOps" option-value="id" :label="`${'เขต / อำเภอ'}`"
|
<selector
|
||||||
@update:model-value="(value: string) => selectDistrict(value, '2')" use-input input-debounce="0" @filter="(inputValue: string,
|
:hide-dropdown-icon="!edit"
|
||||||
|
hide-bottom-space
|
||||||
|
:class="getClass(edit)"
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
:rules="[(val: string) => !!val || `${'กรุณาเลือก เขต / อำเภอ'}`]"
|
||||||
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
v-model="currentAddress.districtId"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="name"
|
||||||
|
:options="Ops.districtCOps"
|
||||||
|
option-value="id"
|
||||||
|
:label="`${'เขต / อำเภอ'}`"
|
||||||
|
@update:model-value="(value: string) => selectDistrict(value, '2')"
|
||||||
|
use-input
|
||||||
|
input-debounce="0"
|
||||||
|
@filter="(inputValue: string,
|
||||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'districtCOps'
|
doneFn: Function) => filterSelector(inputValue, doneFn, 'districtCOps'
|
||||||
)" />
|
)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 col-md-3" v-if="addressData.registSame == '0'">
|
<div
|
||||||
<selector :hide-dropdown-icon="!edit" hide-bottom-space :class="getClass(edit)" :readonly="!edit"
|
class="col-xs-6 col-sm-3 col-md-3"
|
||||||
:borderless="!edit" :rules="[(val: string) => !!val || `${'กรุณาเลือก แขวง / ตำบล '}`]" :outlined="edit" dense
|
v-if="addressData.registSame == '0'"
|
||||||
lazy-rules v-model="currentAddress.subDistrictId" emit-value map-options option-label="name"
|
>
|
||||||
:options="Ops.subdistrictCOps" option-value="id" :label="`${'แขวง / ตำบล '}`"
|
<selector
|
||||||
@update:model-value="(value: string) => selectSubDistrict(value, '2')" use-input input-debounce="0" @filter="(inputValue: string,
|
:hide-dropdown-icon="!edit"
|
||||||
|
hide-bottom-space
|
||||||
|
:class="getClass(edit)"
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
:rules="[(val: string) => !!val || `${'กรุณาเลือก แขวง / ตำบล '}`]"
|
||||||
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
v-model="currentAddress.subDistrictId"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="name"
|
||||||
|
:options="Ops.subdistrictCOps"
|
||||||
|
option-value="id"
|
||||||
|
:label="`${'แขวง / ตำบล '}`"
|
||||||
|
@update:model-value="(value: string) => selectSubDistrict(value, '2')"
|
||||||
|
use-input
|
||||||
|
input-debounce="0"
|
||||||
|
@filter="(inputValue: string,
|
||||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'subdistrictCOps'
|
doneFn: Function) => filterSelector(inputValue, doneFn, 'subdistrictCOps'
|
||||||
)" />
|
)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 col-md-3" v-if="addressData.registSame == '0'">
|
<div
|
||||||
<q-input :class="getClass(edit)" hide-bottom-space dense lazy-rules readonly borderless
|
class="col-xs-6 col-sm-3 col-md-3"
|
||||||
v-model="currentAddress.zipCode" :style="!edit ? '' : 'padding:0 12px;'" :label="`${'รหัสไปรษณีย์'}`" />
|
v-if="addressData.registSame == '0'"
|
||||||
|
>
|
||||||
|
<q-input
|
||||||
|
:class="getClass(edit)"
|
||||||
|
hide-bottom-space
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
readonly
|
||||||
|
borderless
|
||||||
|
v-model="currentAddress.zipCode"
|
||||||
|
:style="!edit ? '' : 'padding:0 12px;'"
|
||||||
|
:label="`${'รหัสไปรษณีย์'}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-form>
|
</q-form>
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,7 @@ onMounted(async () => {
|
||||||
if (route.params.id) {
|
if (route.params.id) {
|
||||||
profileId.value = route.params.personalId.toString();
|
profileId.value = route.params.personalId.toString();
|
||||||
}
|
}
|
||||||
await props.fetch();
|
// await props.fetch();
|
||||||
rows.value = props.data;
|
rows.value = props.data;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -159,6 +159,9 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
},
|
},
|
||||||
|
datainformation: {
|
||||||
|
type: Array,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const emit = defineEmits(["update:statusEdit"]);
|
const emit = defineEmits(["update:statusEdit"]);
|
||||||
|
|
||||||
|
|
@ -167,49 +170,53 @@ const mixin = useCounterMixin();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { success, messageError, showLoader, hideLoader } = mixin;
|
const { success, messageError, showLoader, hideLoader } = mixin;
|
||||||
const profileId = ref<string>(
|
const profileId = ref<string>(
|
||||||
route.params.id ? route.params.id.toString() : ""
|
route.params.personalId ? route.params.personalId.toString() : ""
|
||||||
);
|
);
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
const uploader = ref<any>();
|
const uploader = ref<any>();
|
||||||
const files = ref<any>([]);
|
const files = ref<any>([]);
|
||||||
const file = ref<any>([]);
|
const file = ref<any>([]);
|
||||||
const name = ref<string>("");
|
const name = ref<string>("");
|
||||||
|
const dataMain = ref<any>([]);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getData();
|
await getData();
|
||||||
// props.fetch()
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
if (profileId.value) {
|
if (props.datainformation) {
|
||||||
showLoader();
|
dataMain.value = props.datainformation;
|
||||||
await http
|
files.value = dataMain.value.docs;
|
||||||
.get(config.API.profilePaperId(profileId.value))
|
|
||||||
.then((res) => {
|
|
||||||
const data = res.data.result;
|
|
||||||
files.value = data;
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
// if (profileId.value) {
|
||||||
|
// showLoader();
|
||||||
|
// await http
|
||||||
|
// .get(config.API.profilePaperId(profileId.value))
|
||||||
|
// .then((res) => {
|
||||||
|
// const data = res.data.result;
|
||||||
|
// files.value = data;
|
||||||
|
// })
|
||||||
|
// .catch((e) => {
|
||||||
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
|
// }
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteData = async (id: string) => {
|
const deleteData = async (id: string) => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profilePaperId(id))
|
.delete(config.API.documentDelid(profileId.value, id))
|
||||||
.then((res) => {
|
.then(() => {
|
||||||
const data = res.data.result;
|
success($q, "ลบไฟล์เอกสารสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
await getData();
|
await props.fetch();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -221,13 +228,12 @@ const uploadData = async () => {
|
||||||
type: file.value[0].type,
|
type: file.value[0].type,
|
||||||
});
|
});
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("avatar", newFile);
|
formData.append("docs", newFile);
|
||||||
formData.append("moss", "newFile");
|
// formData.append("moss", "newFile");
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profilePaperId(profileId.value), formData)
|
.put(config.API.documentByid(profileId.value), formData)
|
||||||
.then((res) => {
|
.then(() => {
|
||||||
const data = res.data.result;
|
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -238,15 +244,15 @@ const uploadData = async () => {
|
||||||
name.value = "";
|
name.value = "";
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
emit("update:statusEdit", false);
|
emit("update:statusEdit", false);
|
||||||
await getData();
|
await props.fetch();
|
||||||
});
|
});
|
||||||
} else {
|
// } else {
|
||||||
// modalError(
|
// // modalError(
|
||||||
// $q,
|
// // $q,
|
||||||
// "ไม่สามารถอัปโหลดไฟล์ได้",
|
// // "ไม่สามารถอัปโหลดไฟล์ได้",
|
||||||
// "กรุณาเลือกไฟล์ที่ต้องการอัปโหลด"
|
// // "กรุณาเลือกไฟล์ที่ต้องการอัปโหลด"
|
||||||
// );
|
// // );
|
||||||
getData();
|
// getData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ const editData = async () => {
|
||||||
};
|
};
|
||||||
await http
|
await http
|
||||||
.put(config.API.placementFamilyId(route.params.personalId.toString()), body)
|
.put(config.API.placementFamilyId(route.params.personalId.toString()), body)
|
||||||
.then((res) => {
|
.then(() => {
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ const fetchPlacementData = async () => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.push(`/placement`)"
|
@click="router.push(`/placement`)"
|
||||||
/>
|
/>
|
||||||
รายชื่อผู้สอบในรอบs {{ title }} ครั้งที่ {{ round }} ปี {{ year }}
|
รายชื่อผู้สอบในรอบ {{ title }} ครั้งที่ {{ round }} ปี {{ year }}
|
||||||
</div>
|
</div>
|
||||||
<q-card bordered class="q-py-sm row col-12">
|
<q-card bordered class="q-py-sm row col-12">
|
||||||
<div class="col-12 row bg-white">
|
<div class="col-12 row bg-white">
|
||||||
|
|
|
||||||
22
src/modules/05_placement/storePersona.ts
Normal file
22
src/modules/05_placement/storePersona.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
import { defineStore } from "pinia";
|
||||||
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
import type { Information } from "@/modules/05_placement/components/PersonalDetail/profileType";
|
||||||
|
|
||||||
|
export const usePersonalDataStore = defineStore("personal-detail", () => {
|
||||||
|
const dataMain = ref<any>([])
|
||||||
|
const loading = ref<boolean>(false)
|
||||||
|
|
||||||
|
|
||||||
|
function fecthDataInformation(data: Information) {
|
||||||
|
dataMain.value = data
|
||||||
|
dataMain.value.length !== 0 ? loading.value = true : loading.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
fecthDataInformation,
|
||||||
|
dataMain,
|
||||||
|
loading,
|
||||||
|
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
@ -194,7 +194,7 @@ const dialogDeleteData = async (id: string) => {
|
||||||
const deleteData = async (id: string) => {
|
const deleteData = async (id: string) => {
|
||||||
await http
|
await http
|
||||||
.delete(config.API.personsOrder(id))
|
.delete(config.API.personsOrder(id))
|
||||||
.then((res) => {
|
.then(() => {
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
success($q, "ลบข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -271,8 +271,6 @@ const fetchSalary = async (personalId: string) => {
|
||||||
.get(config.API.salaryOrder(personalId))
|
.get(config.API.salaryOrder(personalId))
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
modalData.value = {
|
modalData.value = {
|
||||||
salaryAmount:
|
salaryAmount:
|
||||||
data.salaryAmount === 0 &&
|
data.salaryAmount === 0 &&
|
||||||
|
|
@ -318,7 +316,7 @@ const putSalary = async (salary: any) => {
|
||||||
}
|
}
|
||||||
await http
|
await http
|
||||||
.put(config.API.salaryOrder(personalId.value), modalData.value)
|
.put(config.API.salaryOrder(personalId.value), modalData.value)
|
||||||
.then((any) => {
|
.then(() => {
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue