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