เพิ่มประเภททุน ปรับ ui

This commit is contained in:
Warunee Tamkoo 2024-04-18 11:42:01 +07:00
parent 12c255e82f
commit 43f4cecf7f
2 changed files with 85 additions and 66 deletions

View file

@ -103,15 +103,19 @@ const scholarshipTypeOp = ref<DataOptions[]>([
{ id: "DOMESTICE", name: "การศึกษาในประเทศ" },
{
id: "NOABROAD",
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)",
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)",
},
{
id: "ABROAD",
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)",
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)",
},
{
id: "EXECUTIVE",
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรประเภทนักบริหาร)",
name: " ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรประเภทนักบริหาร)",
},
{
id: "RESEARCH",
name: "ศึกษา ฝึกอบรม ประชุม ดูงาน และปฏิบัติการวิจัย ณ ต่างประเทศ",
},
]);
@ -288,8 +292,8 @@ async function clickUpload(file: any) {
await http
.post(
config.API.developmentSalaryFile(
"ระบบพัฒนาบุคคล",
"ฟอร์มรายงานตัวกลับเข้ารับราชการ",
"พัฒนาบุคคล",
"ฟอร์มรายงานตัวกลับ",
id.value
),
{
@ -346,17 +350,16 @@ function getFile() {
http
.get(
config.API.developmentSalaryFile(
"ระบบพัฒนาบุคคล",
"ฟอร์มรายงานตัวกลับเข้ารับราชการ",
"พัฒนาบุคคล",
"ฟอร์มรายงานตัวกลับ",
id.value
)
)
.then((res) => {
const dataFile = res.data;
fileList.value = dataFile[0];
})
.catch((e) => {
messageError($q, e);
if (res) {
const dataFile = res.data;
fileList.value = dataFile[0];
}
})
.finally(() => {});
}
@ -409,26 +412,41 @@ onMounted(async () => {
<div class="row q-col-gutter-x-sm full-width">
<div class="col-2 q-pa-none">
<q-btn
class="full-width"
flat
icon="mdi-dots-vertical"
color="grey-8"
for="#cancel"
dense
round
unelevated
color="edit"
label="แก้ไขข้อมูลรายงานตัวกลับเข้ารับราชการ"
@click="onOpenReturn"
>
<q-tooltip>แกไขขอมลรายงานตวกลบเขารบราชการ</q-tooltip>
</q-btn>
</div>
<div class="col-2">
<q-btn
class="full-width"
unelevated
color="primary"
label="ดาวน์โหลดฟอร์มต้นแบบ"
@click="onDownload"
>
<q-tooltip>ดาวนโหลดฟอรมตนแบบ</q-tooltip>
<q-menu>
<q-list>
<q-item clickable v-close-popup @click="onOpenReturn">
<q-item-section>
<q-item-label>
<q-icon name="edit" color="edit" size="18px" />
แกไขขอมลรายงานตวกลบเขารบราชการ
</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="onDownload">
<q-item-section>
<q-item-label>
<q-icon
name="download"
color="primary"
size="18px"
/>
ดาวนโหลดฟอรมตนแบบ
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</div>
<q-space />
<div v-if="fileList == null" class="col-3">
<q-file
@ -460,16 +478,18 @@ onMounted(async () => {
</template>
</q-file>
</div>
<div v-else class="col-2">
<div v-else class="col-2 text-right">
<q-btn
color="primary"
class="full-width"
label="ดาวน์โหลดไฟล์เอกสาร"
unelevated
size="12px"
flat
round
dense
color="blue"
icon="mdi-download"
@click="downloadFile(fileList)"
>
<q-tooltip>ดาวนโหลดไฟลเอกสาร</q-tooltip>
</q-btn>
<q-tooltip>ดาวนโหลดไฟล</q-tooltip></q-btn
>
</div>
</div>
</q-toolbar>