fix ประเมิน
This commit is contained in:
parent
0989c8b3c2
commit
17a6eabedb
4 changed files with 94 additions and 79 deletions
|
|
@ -207,9 +207,9 @@ function getStep() {
|
|||
? 5
|
||||
: data.step === "PREPARE_DOC_V2"
|
||||
? 6
|
||||
: data.step === "CHECK_DOC_V2"
|
||||
? 7
|
||||
: data.step === "WAIT_CHECK_DOC_V2"
|
||||
? 7
|
||||
: data.step === "CHECK_DOC_V2"
|
||||
? 8
|
||||
: data.step === "DONE"
|
||||
? 9
|
||||
|
|
|
|||
|
|
@ -111,7 +111,6 @@ async function onClickDowloadFile(
|
|||
|
||||
/** ติดต่อผู้ขอประเมิน */
|
||||
function openPopUp() {
|
||||
console.log("12");
|
||||
modalEvaluation.value = true;
|
||||
}
|
||||
|
||||
|
|
@ -192,9 +191,9 @@ function getStep() {
|
|||
? 5
|
||||
: data.step === "PREPARE_DOC_V2"
|
||||
? 6
|
||||
: data.step === "CHECK_DOC_V2"
|
||||
? 7
|
||||
: data.step === "WAIT_CHECK_DOC_V2"
|
||||
? 7
|
||||
: data.step === "CHECK_DOC_V2"
|
||||
? 8
|
||||
: data.step === "DONE"
|
||||
? 9
|
||||
|
|
@ -255,27 +254,30 @@ function fileUpLoad(url: string) {
|
|||
});
|
||||
}
|
||||
|
||||
const myForm = ref<any>();
|
||||
function sentMessenger() {
|
||||
// dialogConfirm($q, () => {
|
||||
showLoader();
|
||||
http
|
||||
.put(config.API.evaluationSentToContact(id.value), {
|
||||
subject: title.value,
|
||||
body: messenger.value,
|
||||
})
|
||||
.then((res) => {
|
||||
title.value = "";
|
||||
messenger.value = "";
|
||||
success($q, "ส่งข้อความสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
modalEvaluation.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
// });
|
||||
myForm.value.validate().then(async (result: boolean) => {
|
||||
if (result) {
|
||||
showLoader();
|
||||
http
|
||||
.put(config.API.evaluationSentToContact(id.value), {
|
||||
subject: title.value,
|
||||
body: messenger.value,
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "ส่งข้อความสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
modalEvaluation.value = false;
|
||||
title.value = "";
|
||||
messenger.value = "";
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const download10Url = ref<string>("");
|
||||
|
|
@ -466,27 +468,31 @@ onMounted(() => {
|
|||
</q-toolbar>
|
||||
<q-separator />
|
||||
<q-card-section class="q-pa-md bg-grey-1">
|
||||
<div class="row q-col-gutter-sm">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="title"
|
||||
label="หัวข้อ"
|
||||
outlined
|
||||
dense
|
||||
bg-color="white"
|
||||
/>
|
||||
<q-form ref="myForm">
|
||||
<div class="row q-col-gutter-sm">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="title"
|
||||
label="หัวข้อ"
|
||||
outlined
|
||||
dense
|
||||
bg-color="white"
|
||||
:rules="[(val) => !!val || 'กรุณากรอกหัวข้อ']"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="messenger"
|
||||
label="ข้อความ"
|
||||
type="textarea"
|
||||
outlined
|
||||
dense
|
||||
bg-color="white"
|
||||
:rules="[(val) => !!val || 'กรุณากรอกข้อความ']"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="messenger"
|
||||
label="ข้อความ"
|
||||
type="textarea"
|
||||
outlined
|
||||
dense
|
||||
bg-color="white"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,14 @@ const fullName = ref<string>(
|
|||
);
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, showLoader, hideLoader, messageError, success } = mixin;
|
||||
const {
|
||||
date2Thai,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
success,
|
||||
dialogConfirm,
|
||||
} = mixin;
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
|
|
@ -29,7 +36,6 @@ const pdfSrc = ref<any>();
|
|||
const nameOfWork = ref<string>("");
|
||||
const nameOfOwner = ref<string>("");
|
||||
const position = ref<string>("");
|
||||
const status = ref<string>("WAIT_CHECK_DOC_V2");
|
||||
const fileEvaluation81 = ref<any>();
|
||||
const fileEvaluation82 = ref<any>();
|
||||
const fileEvaluation83 = ref<any>();
|
||||
|
|
@ -178,34 +184,37 @@ function fileUpLoad(url: string, file: any) {
|
|||
// }
|
||||
|
||||
function confirmApprove() {
|
||||
const data = {
|
||||
metadata: {
|
||||
additionalProp1: nameOfWork.value,
|
||||
additionalProp2: nameOfOwner.value,
|
||||
additionalProp3: position.value,
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
const data = {
|
||||
metadata: {
|
||||
additionalProp1: nameOfWork.value,
|
||||
additionalProp2: nameOfOwner.value,
|
||||
additionalProp3: position.value,
|
||||
},
|
||||
};
|
||||
showLoader();
|
||||
http
|
||||
.patch(
|
||||
config.API.evaluationPatchData("เล่ม 2", id.value, "1-เอกสารเล่ม 2"),
|
||||
data
|
||||
)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
nextStep();
|
||||
modalConfirm.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
},
|
||||
};
|
||||
showLoader();
|
||||
http
|
||||
.patch(
|
||||
config.API.evaluationPatchData(
|
||||
"เล่ม 2",
|
||||
id.value,
|
||||
"2-เอกสารเล่ม 2 (ฉบับแก้ไข)"
|
||||
),
|
||||
data
|
||||
)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
nextStep();
|
||||
modalConfirm.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
"ยืนยันผลการพิจารณา",
|
||||
"ต้องการยืนยันผลการพิจารณาใช่หรือไม่?"
|
||||
);
|
||||
}
|
||||
|
||||
function nextStep() {
|
||||
|
|
|
|||
|
|
@ -13,19 +13,19 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
|
|||
case "CHECK_SPEC":
|
||||
return "ตรวจสอบคุณสมบัติด้วยตนเอง";
|
||||
case "PREPARE_DOC_V1":
|
||||
return "จัดเตรียมเอกสารเล่ม";
|
||||
return "จัดเตรียมเอกสารเล่ม 1";
|
||||
case "CHECK_DOC_V1":
|
||||
return "ตรวจสอบความถูกต้องของเอกสารเล่ม";
|
||||
return "ตรวจสอบความถูกต้องของเอกสารเล่ม 1";
|
||||
case "WAIT_CHECK_DOC_V1":
|
||||
return "รอตรวจสอบคุณสมบัติ";
|
||||
case "ANNOUNCE_WEB":
|
||||
return "ประกาศบนเว็บไซต์";
|
||||
case "PREPARE_DOC_V2":
|
||||
return "จัดเตรียมเอกสารเล่ม";
|
||||
return "จัดเตรียมเอกสารเล่ม 2";
|
||||
case "WAIT_CHECK_DOC_V2":
|
||||
return "รอพิจารณาผลการประเมิน";
|
||||
return "ตรวจสอบความถูกต้องของเอกสารเล่ม 2";
|
||||
case "CHECK_DOC_V2":
|
||||
return "ตรวจสอบความถูกต้องของเอกสารเล่ม";
|
||||
return "รอพิจารณาผลการประเมิน";
|
||||
case "DONE":
|
||||
return "เสร็จสิ้น";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue