SIT ระบบพัฒนาบุคลากร>>ทุนการศึกษา/ฝึกอบรม (ฟอร์มรายงานตัวกลับเข้ารับราชการ รูปแบบไฟล์ pdf หรือ xlsx)

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-01-20 11:07:53 +07:00
parent b6ea5ee476
commit e4fcc797ad

View file

@ -271,13 +271,13 @@ function onOpenReturn() {
dialogReturn.value = true;
}
function onDownload() {
function onDownload(type: string) {
showLoader();
http
.get(config.API.developmentScholarshipReport + `/${id.value}`)
.then((res) => {
const dataList = res.data.result;
genReport(dataList, "ฟอร์มรายงานตัวกลับเข้ารับราชการ(ต้นแบบ)");
genReport(dataList, "ฟอร์มรายงานตัวกลับเข้ารับราชการ(ต้นแบบ)", type);
})
.catch((e) => {
messageError($q, e);
@ -543,11 +543,27 @@ onMounted(async () => {
</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="onDownload">
<q-item clickable v-close-popup @click="onDownload('docx')">
<q-item-section>
<q-item-label>
<q-icon name="download" color="primary" size="18px" />
ดาวนโหลดฟอรมตนแบบ
<q-icon
name="mdi-file-word"
color="blue"
size="18px"
/>
ดาวนโหลดฟอรมตนแบบ .docx
</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="onDownload('pdf')">
<q-item-section>
<q-item-label>
<q-icon
name="mdi-file-pdf-box"
color="red"
size="18px"
/>
ดาวนโหลดฟอรมตนแบบ .pdf
</q-item-label>
</q-item-section>
</q-item>