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">
|
<script setup lang="ts">
|
||||||
import { onMounted, reactive, ref } from "vue";
|
import { onMounted, reactive, ref } from "vue";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import axios from "axios";
|
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
@ -15,7 +14,6 @@ import type {
|
||||||
} from "@/modules/09_scholarship/interface/request/index";
|
} from "@/modules/09_scholarship/interface/request/index";
|
||||||
|
|
||||||
import DialogReturn from "@/modules/09_scholarship/components/Dialog/DialogReturn.vue";
|
import DialogReturn from "@/modules/09_scholarship/components/Dialog/DialogReturn.vue";
|
||||||
import genReport from "@/plugins/genreport";
|
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
@ -27,8 +25,6 @@ const {
|
||||||
messageError,
|
messageError,
|
||||||
date2Thai,
|
date2Thai,
|
||||||
calculateDurationYmd,
|
calculateDurationYmd,
|
||||||
dialogConfirm,
|
|
||||||
success,
|
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const isLoad = ref<boolean>(false);
|
const isLoad = ref<boolean>(false);
|
||||||
|
|
@ -39,7 +35,6 @@ const fileList = ref<any[]>();
|
||||||
|
|
||||||
const dialogReturn = ref<boolean>(false);
|
const dialogReturn = ref<boolean>(false);
|
||||||
|
|
||||||
const documentFile = ref<any>(null);
|
|
||||||
const id = ref<string>(route.params.id.toLocaleString());
|
const id = ref<string>(route.params.id.toLocaleString());
|
||||||
const budgetSourceOp = ref<DataOptions[]>([
|
const budgetSourceOp = ref<DataOptions[]>([
|
||||||
{ id: "BKK", name: "งบประมาณ กทม." },
|
{ id: "BKK", name: "งบประมาณ กทม." },
|
||||||
|
|
@ -190,40 +185,6 @@ const fundTypeOp = ref<DataOptions[]>([
|
||||||
{ id: "FUND5", name: "ทุนส่วนตัว" },
|
{ 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(
|
function updateTotalPeriod(
|
||||||
startDate: any,
|
startDate: any,
|
||||||
endDate: any,
|
endDate: any,
|
||||||
|
|
@ -288,8 +249,8 @@ function changeStartDate(type: string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFile() {
|
async function getFile() {
|
||||||
http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.developmentSalaryFile(
|
config.API.developmentSalaryFile(
|
||||||
"ระบบพัฒนาบุคคล",
|
"ระบบพัฒนาบุคคล",
|
||||||
|
|
@ -302,8 +263,7 @@ function getFile() {
|
||||||
const dataFile = res.data;
|
const dataFile = res.data;
|
||||||
fileList.value = dataFile[0];
|
fileList.value = dataFile[0];
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
.finally(() => {});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadFile(file: any) {
|
function downloadFile(file: any) {
|
||||||
|
|
@ -328,9 +288,9 @@ function downloadFile(file: any) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function fetchDataDetail(id: string) {
|
async function fetchDataDetail(id: string) {
|
||||||
isLoad.value = true;
|
isLoad.value = true;
|
||||||
http
|
await http
|
||||||
.get(config.API.developmentScholarship + `/${id}`)
|
.get(config.API.developmentScholarship + `/${id}`)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data: DataSholarship = res.data.result;
|
const data: DataSholarship = res.data.result;
|
||||||
|
|
@ -423,7 +383,6 @@ function fetchDataDetail(id: string) {
|
||||||
dataGuarantor.org = data.guarantorOrg ? data.guarantorOrg : "-";
|
dataGuarantor.org = data.guarantorOrg ? data.guarantorOrg : "-";
|
||||||
isStatus.value = data.status;
|
isStatus.value = data.status;
|
||||||
isGuarantor.value = data.guarantorCitizenId ? true : false;
|
isGuarantor.value = data.guarantorCitizenId ? true : false;
|
||||||
isLoad.value = false;
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -434,8 +393,7 @@ function fetchDataDetail(id: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchDataDetail(id.value);
|
await Promise.all([fetchDataDetail(id.value), getFile()]);
|
||||||
await getFile();
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue