diff --git a/src/modules/02_organizationalNew/components/DialogAddPosition.vue b/src/modules/02_organizationalNew/components/DialogAddPosition.vue index 192f4e602..4860a9e3e 100644 --- a/src/modules/02_organizationalNew/components/DialogAddPosition.vue +++ b/src/modules/02_organizationalNew/components/DialogAddPosition.vue @@ -92,23 +92,23 @@ const objectPositionSelectRef: FormPositionSelectRef = { /** ฟังก์ชั่นตรวจสอบความถูกต้องของข้อมูลในฟอร์ม */ function validateFormPositionEdit() { isDisValidate.value = false; - const hasError = []; - for (const key in objectPositionSelectRef) { - if (Object.prototype.hasOwnProperty.call(objectPositionSelectRef, key)) { - const property = objectPositionSelectRef[key]; - if (property.value && typeof property.value.validate === "function") { - const isValid = property.value.validate(); - hasError.push(isValid); - } - } - } - if (hasError.every((result) => result === true)) { - if (isEditCheck.value == true) { - saveSelectEdit(); - } else { - onSubmitSelectEdit(); - } + // const hasError = []; + // for (const key in objectPositionSelectRef) { + // if (Object.prototype.hasOwnProperty.call(objectPositionSelectRef, key)) { + // const property = objectPositionSelectRef[key]; + // if (property.value && typeof property.value.validate === "function") { + // const isValid = property.value.validate(); + // hasError.push(isValid); + // } + // } + // } + // if (hasError.every((result) => result === true)) { + if (isEditCheck.value == true) { + saveSelectEdit(); + } else { + onSubmitSelectEdit(); } + // } } function saveSelectEdit() { @@ -313,6 +313,7 @@ watch( if (modal.value === true) { await fetchType(); await fetchExecutive(); + if (props.data) { const dataList = props.data; console.log(dataList); @@ -342,7 +343,12 @@ watch( -
+ +
- + diff --git a/src/modules/02_organizationalNew/components/DialogFormAgency.vue b/src/modules/02_organizationalNew/components/DialogFormAgency.vue index 7e4935ded..402f1f118 100644 --- a/src/modules/02_organizationalNew/components/DialogFormAgency.vue +++ b/src/modules/02_organizationalNew/components/DialogFormAgency.vue @@ -150,7 +150,6 @@ function onSubmit() { level.value !== 0 ? formData.orgLevelSub : undefined, [nameId]: rootId, }; - console.log(body); if (actionType.value === "ADD") { await http @@ -375,7 +374,6 @@ function selectOrgLevele(val: string, status: boolean = true) { for="#ocNo" :label="level == 0 ? 'รหัสหน่วยงาน' : 'รหัสส่วนราชการ'" hide-bottom-space - class="inputNumber" :rules="[ (val) => !!val || @@ -482,14 +480,4 @@ function selectOrgLevele(val: string, status: boolean = true) { - + diff --git a/src/modules/02_organizationalNew/components/DialogFormPosition.vue b/src/modules/02_organizationalNew/components/DialogFormPosition.vue index f7c3860f7..859053e83 100644 --- a/src/modules/02_organizationalNew/components/DialogFormPosition.vue +++ b/src/modules/02_organizationalNew/components/DialogFormPosition.vue @@ -544,8 +544,6 @@ watch( ); async function addPosition(data: RowDetailPositions) { - console.log(data); - const isIdExist = await rows.value.some( (item: any) => item.posExecutiveId == data.posExecutiveId && @@ -817,7 +815,7 @@ async function emitSearch(keyword: string, typeSelect: string) { flat round color="teal" - @click="() => (modalAdd = true)" + @click="() => ((modalAdd = true), (dataCopy = null))" >สร้างตำแหน่ง
diff --git a/src/modules/05_placement/components/PersonalDetail/Information/Document.vue b/src/modules/05_placement/components/PersonalDetail/Information/Document.vue index 7c6151a85..aa1b157f8 100644 --- a/src/modules/05_placement/components/PersonalDetail/Information/Document.vue +++ b/src/modules/05_placement/components/PersonalDetail/Information/Document.vue @@ -10,9 +10,9 @@ import http from "@/plugins/http"; import config from "@/app.config"; interface ArrayFileList { - id:string - pathName:string - fileName:string + id: string; + pathName: string; + fileName: string; } const props = defineProps({ @@ -40,7 +40,14 @@ const fileList = ref([]); const $q = useQuasar(); // show dialog const mixin = useCounterMixin(); const route = useRoute(); -const { success, messageError, showLoader, dialogConfirm, hideLoader,dialogRemove } = mixin; +const { + success, + messageError, + showLoader, + dialogConfirm, + hideLoader, + dialogRemove, +} = mixin; const profileId = ref( route.params.personalId ? route.params.personalId.toString() : "" ); @@ -51,30 +58,28 @@ const file = ref([]); const name = ref(""); const dataMain = ref([]); - - // const getData = async () => { // if (props.datainformation) { // dataMain.value = props.datainformation; // files.value = dataMain.value.docs; // } - // โค้ดเก่ายังไม่ได้ใช้ - // 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(); - // }); - // } +// โค้ดเก่ายังไม่ได้ใช้ +// 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) => { @@ -229,7 +234,7 @@ async function uploadFileDoc(uploadUrl: string, file: any) { * ดาวน์โหลดลิงค์ไฟล์ * @param fileName file name */ - function downloadFile(fileName: string) { +function downloadFile(fileName: string) { showLoader(); http .get( @@ -269,7 +274,6 @@ function deleteFile(fileName: string) { ) ) .then((res) => { - setTimeout(() => { getData(); success($q, `ลบไฟล์สำเร็จ`); @@ -286,7 +290,7 @@ function deleteFile(fileName: string) { } async function getData() { - showLoader() + showLoader(); await http .get( config.API.file("ระบบบรรจุ แต่งตั้ง", "เอกสารหลักฐาน", profileId.value) @@ -298,17 +302,16 @@ async function getData() { messageError($q, e); }) .finally(() => { - hideLoader() + hideLoader(); }); } onMounted(async () => { await getData(); }); -