หน้ารายการประเมิน

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-01-03 17:04:45 +07:00
parent c2e0e5cb59
commit d271ff96b8
16 changed files with 386 additions and 134 deletions

View file

@ -34,6 +34,7 @@ const messenger = ref<string>("");
const title = ref<string>("");
const modalEvaluation = ref<boolean>(false);
const fileEvaluationUpload = ref<any>();
const fileEvaluationUploadRef = ref<any>();
const status = ref<string>("WAIT_CHECK_DOC_V1");
const files = [
{
@ -153,22 +154,31 @@ function getPDF(url: string, type: string, fileName: string) {
/** ส่งไปประกาศบนเว็บไซต์ */
function onWebSite() {
dialogConfirm(
$q,
() => {
showLoader();
http
.put(config.API.evaluationApproveDoc1(id.value))
.then((res) => {})
.catch((e) => {})
.finally(() => {
success($q, "ส่งไปประกาศบนเว็บไซต์สำเร็จ");
getStep();
});
},
"ยืนยันการส่งไปประกาศบนเว็บไซต์",
"ยืนยันการส่งไปประกาศบนเว็บไซต์ใช่หรือไม่?"
);
download10Url.value === ""
? (fileEvaluationUpload.value = "")
: fileEvaluationUpload.value;
fileEvaluationUploadRef.value.validate();
if (
fileEvaluationUploadRef.value.hasError === false &&
download10Url.value !== ""
) {
dialogConfirm(
$q,
() => {
showLoader();
http
.put(config.API.evaluationApproveDoc1(id.value))
.then((res) => {})
.catch((e) => {})
.finally(() => {
success($q, "ส่งไปประกาศบนเว็บไซต์สำเร็จ");
getStep();
});
},
"ยืนยันการส่งไปประกาศบนเว็บไซต์",
"ยืนยันการส่งไปประกาศบนเว็บไซต์ใช่หรือไม่?"
);
}
}
function getStep() {
@ -248,7 +258,6 @@ function fileUpLoad(url: string) {
messageError($q, e);
})
.finally(() => {
fileEvaluationUpload.value = null;
checkDoc10();
success($q, "อัปโหลดไฟล์สำเร็จ");
});
@ -408,6 +417,7 @@ onMounted(() => {
<div v-if="store.currentStep == 4" class="row col-12">
<div class="col-xs-12 col-sm-11 row">
<q-file
ref="fileEvaluationUploadRef"
v-model="fileEvaluationUpload"
class="col-12"
outlined
@ -415,6 +425,11 @@ onMounted(() => {
hide-bottom-space
lazy-rules
accept=".pdf"
:rules="
download10Url === ''
? [(val) => !!val || 'กรุณาเลือกไฟล์']
: []
"
>
<template v-slot:prepend>
<q-icon name="attach_file" />