fix(scholarship)delete codeComment
This commit is contained in:
parent
df91679357
commit
c0065d618f
1 changed files with 6 additions and 48 deletions
|
|
@ -1,7 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import axios from "axios";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -15,7 +14,6 @@ import type {
|
|||
} from "@/modules/09_scholarship/interface/request/index";
|
||||
|
||||
import DialogReturn from "@/modules/09_scholarship/components/Dialog/DialogReturn.vue";
|
||||
import genReport from "@/plugins/genreport";
|
||||
|
||||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
|
|
@ -27,8 +25,6 @@ const {
|
|||
messageError,
|
||||
date2Thai,
|
||||
calculateDurationYmd,
|
||||
dialogConfirm,
|
||||
success,
|
||||
} = mixin;
|
||||
|
||||
const isLoad = ref<boolean>(false);
|
||||
|
|
@ -39,7 +35,6 @@ const fileList = ref<any[]>();
|
|||
|
||||
const dialogReturn = ref<boolean>(false);
|
||||
|
||||
const documentFile = ref<any>(null);
|
||||
const id = ref<string>(route.params.id.toLocaleString());
|
||||
const budgetSourceOp = ref<DataOptions[]>([
|
||||
{ id: "BKK", name: "งบประมาณ กทม." },
|
||||
|
|
@ -190,40 +185,6 @@ const fundTypeOp = ref<DataOptions[]>([
|
|||
{ id: "FUND5", name: "ทุนส่วนตัว" },
|
||||
]);
|
||||
|
||||
const convertStudyPlace = () => {
|
||||
switch (formBody.studyTopic) {
|
||||
case "ศึกษา":
|
||||
return "สถานที่ไปศึกษา (เมือง/ประเทศ)";
|
||||
case "ฝึกอบรม":
|
||||
return "สถานที่เข้ารับการฝึกอบรม (เมือง/ประเทศ)";
|
||||
case "ดูงาน":
|
||||
return "สถานที่ไปดูงาน";
|
||||
case "ประชุม":
|
||||
return "สถานที่จัดประชุม (เมือง/ประเทศ)";
|
||||
case "ปฏิบัติการวิจัย":
|
||||
return "สถานที่ไปปฏิบัติการวิจัย (เมือง/ประเทศ)";
|
||||
default:
|
||||
return "สถานที่ (เมือง/ประเทศ)";
|
||||
}
|
||||
};
|
||||
|
||||
const convertCourse = () => {
|
||||
switch (formBody.studyTopic) {
|
||||
case "ศึกษา":
|
||||
return "หลักสูตรการศึกษา";
|
||||
case "ฝึกอบรม":
|
||||
return "หลักสูตรการฝึกอบรม";
|
||||
case "ดูงาน":
|
||||
return "หัวข้อการไปดูงาน";
|
||||
case "ประชุม":
|
||||
return "ชื่อการประชุม";
|
||||
case "ปฏิบัติการวิจัย":
|
||||
return "หลักสูตร";
|
||||
default:
|
||||
return "หลักสูตร";
|
||||
}
|
||||
};
|
||||
|
||||
function updateTotalPeriod(
|
||||
startDate: any,
|
||||
endDate: any,
|
||||
|
|
@ -288,8 +249,8 @@ function changeStartDate(type: string) {
|
|||
}
|
||||
}
|
||||
|
||||
function getFile() {
|
||||
http
|
||||
async function getFile() {
|
||||
await http
|
||||
.get(
|
||||
config.API.developmentSalaryFile(
|
||||
"ระบบพัฒนาบุคคล",
|
||||
|
|
@ -302,8 +263,7 @@ function getFile() {
|
|||
const dataFile = res.data;
|
||||
fileList.value = dataFile[0];
|
||||
}
|
||||
})
|
||||
.finally(() => {});
|
||||
});
|
||||
}
|
||||
|
||||
function downloadFile(file: any) {
|
||||
|
|
@ -328,9 +288,9 @@ function downloadFile(file: any) {
|
|||
});
|
||||
}
|
||||
|
||||
function fetchDataDetail(id: string) {
|
||||
async function fetchDataDetail(id: string) {
|
||||
isLoad.value = true;
|
||||
http
|
||||
await http
|
||||
.get(config.API.developmentScholarship + `/${id}`)
|
||||
.then((res) => {
|
||||
const data: DataSholarship = res.data.result;
|
||||
|
|
@ -423,7 +383,6 @@ function fetchDataDetail(id: string) {
|
|||
dataGuarantor.org = data.guarantorOrg ? data.guarantorOrg : "-";
|
||||
isStatus.value = data.status;
|
||||
isGuarantor.value = data.guarantorCitizenId ? true : false;
|
||||
isLoad.value = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -434,8 +393,7 @@ function fetchDataDetail(id: string) {
|
|||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchDataDetail(id.value);
|
||||
await getFile();
|
||||
await Promise.all([fetchDataDetail(id.value), getFile()]);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue