Merge branch 'develop' into devTee
This commit is contained in:
commit
fd68ca9a3c
12 changed files with 80 additions and 58 deletions
|
|
@ -37,8 +37,8 @@ function handleItemClick(itemNumber: number) {
|
||||||
* @param volume index item
|
* @param volume index item
|
||||||
*/
|
*/
|
||||||
function getFile(volume: number) {
|
function getFile(volume: number) {
|
||||||
const fileText = numToThai(volume);
|
|
||||||
showLoader();
|
showLoader();
|
||||||
|
const fileText = numToThai(volume);
|
||||||
http
|
http
|
||||||
.get(config.API.evaluationFilebyId("เล่ม 1", id.value, fileText))
|
.get(config.API.evaluationFilebyId("เล่ม 1", id.value, fileText))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -46,10 +46,8 @@ function getFile(volume: number) {
|
||||||
const type = res.data.fileType;
|
const type = res.data.fileType;
|
||||||
getPDF(link, type);
|
getPDF(link, type);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch((e) => {
|
||||||
// messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -76,7 +74,6 @@ function getPDF(url: string, type: string) {
|
||||||
const objectUrl = URL.createObjectURL(blob);
|
const objectUrl = URL.createObjectURL(blob);
|
||||||
|
|
||||||
const pdfData = await usePDF(`${objectUrl}`);
|
const pdfData = await usePDF(`${objectUrl}`);
|
||||||
showLoader();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
store.log = 1;
|
store.log = 1;
|
||||||
store.pdfSrcStore = pdfData.pdf.value;
|
store.pdfSrcStore = pdfData.pdf.value;
|
||||||
|
|
@ -84,8 +81,8 @@ function getPDF(url: string, type: string) {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
}, 1500);
|
}, 1500);
|
||||||
})
|
})
|
||||||
.catch(async (e) => {
|
.catch(() => {
|
||||||
messageError($q, JSON.parse(await e.response.data.text()));
|
hideLoader();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
store.log = 0;
|
store.log = 0;
|
||||||
|
|
|
||||||
|
|
@ -265,9 +265,10 @@ async function upLoadFile(file: any) {
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
hideLoader();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
// hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -282,12 +283,13 @@ function fileUpLoad(url: string) {
|
||||||
headers: { "Content-Type": fileEvaluationUpload.value?.type },
|
headers: { "Content-Type": fileEvaluationUpload.value?.type },
|
||||||
onUploadProgress: (e) => console.log(e),
|
onUploadProgress: (e) => console.log(e),
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.then(() => {
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
checkDoc10();
|
checkDoc10();
|
||||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -333,6 +335,7 @@ async function checkDoc10() {
|
||||||
)
|
)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
download10Url.value = res.data.downloadUrl;
|
download10Url.value = res.data.downloadUrl;
|
||||||
|
fetchProfile();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
// messageError($q, e);
|
// messageError($q, e);
|
||||||
|
|
@ -340,12 +343,11 @@ async function checkDoc10() {
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
fetchProfile();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** function เรียกข้แมูลคุณสมบัติ*/
|
/** function เรียกข้แมูลคุณสมบัติ*/
|
||||||
async function fetchProfile() {
|
async function fetchProfile() {
|
||||||
showLoader();
|
// showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.evaluateGetDetail(id.value))
|
.get(config.API.evaluateGetDetail(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -356,7 +358,7 @@ async function fetchProfile() {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
// hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -430,14 +432,14 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10) -->
|
<!-- ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10) -->
|
||||||
<div class="col-12" >
|
<div class="col-12">
|
||||||
<q-card bordered style="border: 1px solid #d6dee1">
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
<div
|
<div
|
||||||
class="text-weight-medium row col-12 bg-grey-1 q-py-sm q-px-md items-center"
|
class="text-weight-medium row col-12 bg-grey-1 q-py-sm q-px-md items-center"
|
||||||
>
|
>
|
||||||
<div>ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10)</div>
|
<div>ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10)</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div v-if="store.currentStep == 4 ">
|
<div v-if="store.currentStep == 4">
|
||||||
<q-btn
|
<q-btn
|
||||||
icon="download"
|
icon="download"
|
||||||
color="indigo"
|
color="indigo"
|
||||||
|
|
@ -473,7 +475,12 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12" v-if="store.currentStep == 4"><q-separator /></div>
|
<div class="col-12" v-if="store.currentStep == 4"><q-separator /></div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 q-pa-sm" v-if="store.currentStep == 4 && checkPermission($route)?.attrIsUpdate">
|
<div
|
||||||
|
class="col-12 q-pa-sm"
|
||||||
|
v-if="
|
||||||
|
store.currentStep == 4 && checkPermission($route)?.attrIsUpdate
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-file
|
<q-file
|
||||||
ref="fileEvaluationUploadRef"
|
ref="fileEvaluationUploadRef"
|
||||||
v-model="fileEvaluationUpload"
|
v-model="fileEvaluationUpload"
|
||||||
|
|
@ -482,6 +489,7 @@ onMounted(async () => {
|
||||||
dense
|
dense
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
label="อัปโหลดไฟล์"
|
||||||
accept=".pdf"
|
accept=".pdf"
|
||||||
:rules="
|
:rules="
|
||||||
download10Url === '' ? [(val) => !!val || 'กรุณาเลือกไฟล์'] : []
|
download10Url === '' ? [(val) => !!val || 'กรุณาเลือกไฟล์'] : []
|
||||||
|
|
@ -508,7 +516,10 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ติดต่อผู้ขอประเมิน -->
|
<!-- ติดต่อผู้ขอประเมิน -->
|
||||||
<div class="col-12" v-if="store.currentStep == 4 && checkPermission($route)?.attrIsUpdate">
|
<div
|
||||||
|
class="col-12"
|
||||||
|
v-if="store.currentStep == 4 && checkPermission($route)?.attrIsUpdate"
|
||||||
|
>
|
||||||
<div class="q-mt-xs q-gutter-md" align="right">
|
<div class="q-mt-xs q-gutter-md" align="right">
|
||||||
<q-btn label="ติดต่อผู้ขอประเมิน" color="info" @click="openPopUp" />
|
<q-btn label="ติดต่อผู้ขอประเมิน" color="info" @click="openPopUp" />
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
|
|
@ -117,8 +117,6 @@ function upLoadFile(file: any) {
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -134,14 +132,15 @@ function fileUpLoad(url: string) {
|
||||||
headers: { "Content-Type": fileEvaluation5.value?.type },
|
headers: { "Content-Type": fileEvaluation5.value?.type },
|
||||||
onUploadProgress: (e) => console.log(e),
|
onUploadProgress: (e) => console.log(e),
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
await checkDocResult();
|
||||||
|
await success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
checkDocResult();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -197,7 +196,7 @@ async function getDate() {
|
||||||
const download10Url = ref<string>("");
|
const download10Url = ref<string>("");
|
||||||
/** function เช็คไฟล์อัปโหลด*/
|
/** function เช็คไฟล์อัปโหลด*/
|
||||||
async function checkDocResult() {
|
async function checkDocResult() {
|
||||||
showLoader();
|
// showLoader();
|
||||||
await http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.evaluationPatchData(
|
config.API.evaluationPatchData(
|
||||||
|
|
@ -213,7 +212,7 @@ async function checkDocResult() {
|
||||||
// messageError($q, e);
|
// messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
// hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,20 +113,18 @@ function upLoadFile(name: string, file: any) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
const foundKey: any = Object.keys(res.data).find(
|
const foundKey: any = Object.keys(res.data).find(
|
||||||
(key) =>
|
(key) =>
|
||||||
res.data[key]?.fileName !== undefined &&
|
res.data[key]?.fileName !== undefined &&
|
||||||
res.data[key]?.fileName !== ""
|
res.data[key]?.fileName !== ""
|
||||||
);
|
);
|
||||||
const link = res.data[foundKey]?.uploadUrl;
|
const link = res.data[foundKey]?.uploadUrl;
|
||||||
fileUpLoad(link, file);
|
await fileUpLoad(link, file);
|
||||||
|
await downloadFileList(name);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
downloadFileList(name);
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -143,11 +141,14 @@ function fileUpLoad(url: string, file: any) {
|
||||||
headers: { "Content-Type": file?.type },
|
headers: { "Content-Type": file?.type },
|
||||||
onUploadProgress: (e) => console.log(e),
|
onUploadProgress: (e) => console.log(e),
|
||||||
})
|
})
|
||||||
|
.then(() => {
|
||||||
|
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||||
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -191,6 +192,7 @@ async function confirmApprove() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
() => {
|
() => {
|
||||||
|
showLoader();
|
||||||
const data = {
|
const data = {
|
||||||
metadata: {
|
metadata: {
|
||||||
additionalProp1: nameOfWork.value,
|
additionalProp1: nameOfWork.value,
|
||||||
|
|
@ -198,7 +200,6 @@ async function confirmApprove() {
|
||||||
additionalProp3: position.value,
|
additionalProp3: position.value,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
showLoader();
|
|
||||||
http
|
http
|
||||||
.patch(
|
.patch(
|
||||||
config.API.evaluationPatchData(
|
config.API.evaluationPatchData(
|
||||||
|
|
@ -208,13 +209,14 @@ async function confirmApprove() {
|
||||||
),
|
),
|
||||||
data
|
data
|
||||||
)
|
)
|
||||||
.then(() => {})
|
.then(() => {
|
||||||
|
nextStep();
|
||||||
|
modalConfirm.value = false;
|
||||||
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
nextStep();
|
|
||||||
modalConfirm.value = false;
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -294,7 +296,7 @@ const downloadFile6 = ref<string>("");
|
||||||
* @param fileName ชื่อไฟล์
|
* @param fileName ชื่อไฟล์
|
||||||
*/
|
*/
|
||||||
async function downloadFileList(fileName: string) {
|
async function downloadFileList(fileName: string) {
|
||||||
showLoader();
|
// showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.evaluationFilebyId("เล่ม 2", id.value, fileName))
|
.get(config.API.evaluationFilebyId("เล่ม 2", id.value, fileName))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -314,10 +316,10 @@ async function downloadFileList(fileName: string) {
|
||||||
} else if (fileName === "แบบสรุปผลการประเมิน (เอกสารแบบ ง)") {
|
} else if (fileName === "แบบสรุปผลการประเมิน (เอกสารแบบ ง)") {
|
||||||
downloadFile6.value = res.data.downloadUrl;
|
downloadFile6.value = res.data.downloadUrl;
|
||||||
}
|
}
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
});
|
||||||
|
// .finally(() => {
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
const author = ref<string>("");
|
const author = ref<string>("");
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "createdAt",
|
field: "createdAt",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return date2Thai(val);
|
return date2Thai(val, false, true);
|
||||||
},
|
},
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -380,7 +380,7 @@ onMounted(() => {
|
||||||
:paging="true"
|
:paging="true"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
>
|
>
|
||||||
<template v-slot:header-selection="scope" v-if="tab === 'COMPLETE'">
|
<template v-slot:header-selection="scope" v-if="tab === 'COMPLETE'">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
v-if="tab === 'COMPLETE' && checkPermission($route)?.attrIsUpdate"
|
v-if="tab === 'COMPLETE' && checkPermission($route)?.attrIsUpdate"
|
||||||
keep-color
|
keep-color
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "createdAt",
|
field: "createdAt",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format: (v) => date2Thai(v),
|
format: (v) => date2Thai(v, false, true),
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
const { showLoader, hideLoader, messageError, success } = mixin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* props
|
* props
|
||||||
|
|
@ -93,6 +93,7 @@ function onSubmit() {
|
||||||
.then(() => {
|
.then(() => {
|
||||||
fetchData(projectId.value);
|
fetchData(projectId.value);
|
||||||
isChangeData.value = false;
|
isChangeData.value = false;
|
||||||
|
success($q, "บันทึกข้อมูลแล้ว");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
* use
|
* use
|
||||||
*/
|
*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
const { showLoader, hideLoader, messageError, success } = useCounterMixin();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -123,7 +123,9 @@ function onSubmit() {
|
||||||
: formData.budgetPay;
|
: formData.budgetPay;
|
||||||
http
|
http
|
||||||
.put(config.API.developmentMainTab("tab7", projectId.value), formData)
|
.put(config.API.developmentMainTab("tab7", projectId.value), formData)
|
||||||
.then(() => {})
|
.then(() => {
|
||||||
|
success($q, "บันทึกข้อมูลแล้ว");
|
||||||
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,9 @@ function onSubmit() {
|
||||||
progressTracking: progressTracking.value,
|
progressTracking: progressTracking.value,
|
||||||
projectEvaluation: projectEvaluation.value,
|
projectEvaluation: projectEvaluation.value,
|
||||||
})
|
})
|
||||||
.then(() => {})
|
.then(() => {
|
||||||
|
!modalDialog.value && success($q, "บันทึกข้อมูลแล้ว");
|
||||||
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
|
|
@ -199,6 +201,8 @@ function onClickAddIndicator(
|
||||||
data: DevelopmentEvaluations | null = null,
|
data: DevelopmentEvaluations | null = null,
|
||||||
type: string = ""
|
type: string = ""
|
||||||
) {
|
) {
|
||||||
|
modalDialog.value = true;
|
||||||
|
isChangeData.value && onSubmit();
|
||||||
isEdit.value = statusEdit;
|
isEdit.value = statusEdit;
|
||||||
typeAction.value = type;
|
typeAction.value = type;
|
||||||
if (statusEdit) {
|
if (statusEdit) {
|
||||||
|
|
@ -214,7 +218,6 @@ function onClickAddIndicator(
|
||||||
formIndicators.suggestions = data.suggestions;
|
formIndicators.suggestions = data.suggestions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
modalDialog.value = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,9 @@ function onSubmit() {
|
||||||
|
|
||||||
http
|
http
|
||||||
.put(config.API.developmentMainTab("tab5", projectId.value), formData)
|
.put(config.API.developmentMainTab("tab5", projectId.value), formData)
|
||||||
.then(() => {})
|
.then(() => {
|
||||||
|
!modalAcademic.value && success($q, "บันทึกข้อมูลแล้ว");
|
||||||
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
|
|
@ -207,6 +209,7 @@ function onSubmit() {
|
||||||
|
|
||||||
function onClickAddAcademic(status: boolean = false, data: any | null = null) {
|
function onClickAddAcademic(status: boolean = false, data: any | null = null) {
|
||||||
modalAcademic.value = true;
|
modalAcademic.value = true;
|
||||||
|
isChangeData.value && onSubmit();
|
||||||
isEdit.value = status;
|
isEdit.value = status;
|
||||||
if (data && status) {
|
if (data && status) {
|
||||||
academicId.value = data.id;
|
academicId.value = data.id;
|
||||||
|
|
@ -272,7 +275,7 @@ defineExpose({
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-form greedy @submit.prevent @validation-success="props.prevStep()">
|
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||||
<div class="q-pa-sm q-my-sm">
|
<div class="q-pa-sm q-my-sm">
|
||||||
<q-card bordered style="border: 1px solid #d6dee1">
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
<div
|
<div
|
||||||
|
|
@ -492,13 +495,12 @@ defineExpose({
|
||||||
color="public"
|
color="public"
|
||||||
class="q-mr-xs"
|
class="q-mr-xs"
|
||||||
style="width: 120px"
|
style="width: 120px"
|
||||||
|
@click="() => props.prevStep()"
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
disabled
|
|
||||||
rounded
|
rounded
|
||||||
label="ถัดไป"
|
label="บันทึก"
|
||||||
icon-right="mdi-chevron-right"
|
|
||||||
id="onSubmit"
|
id="onSubmit"
|
||||||
type="submit"
|
type="submit"
|
||||||
color="public"
|
color="public"
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ const $q = useQuasar();
|
||||||
const store = useDevelopmentDataStore();
|
const store = useDevelopmentDataStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const projectId = ref<string>(route.params.id.toLocaleString());
|
const projectId = ref<string>(route.params.id.toLocaleString());
|
||||||
const { showLoader, hideLoader, messageError, date2Thai, diffDay } =
|
const { showLoader, hideLoader, messageError, date2Thai, diffDay, success } =
|
||||||
useCounterMixin();
|
useCounterMixin();
|
||||||
const checkRoutePermission = ref<boolean>(
|
const checkRoutePermission = ref<boolean>(
|
||||||
route.name == "developmentDetailPage"
|
route.name == "developmentDetailPage"
|
||||||
|
|
@ -322,7 +322,9 @@ function onSubmit() {
|
||||||
reasonActual20: reasonActual20.value,
|
reasonActual20: reasonActual20.value,
|
||||||
reasonActual10: reasonActual10.value,
|
reasonActual10: reasonActual10.value,
|
||||||
})
|
})
|
||||||
.then(() => {})
|
.then(() => {
|
||||||
|
success($q, "บันทึกข้อมูลแล้ว");
|
||||||
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
hideLoader();
|
hideLoader();
|
||||||
|
|
@ -567,7 +569,7 @@ defineExpose({
|
||||||
<div
|
<div
|
||||||
class="col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-xs q-px-md"
|
class="col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-xs q-px-md"
|
||||||
>
|
>
|
||||||
เวลาและสถานที่ดำเนินการ
|
ระยะเวลาและสถานที่ดำเนินการ
|
||||||
</div>
|
</div>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,9 @@ function onSubmit() {
|
||||||
.put(config.API.developmentMainTab("tab8", projectId.value), {
|
.put(config.API.developmentMainTab("tab8", projectId.value), {
|
||||||
expect: expect.value,
|
expect: expect.value,
|
||||||
})
|
})
|
||||||
.then(() => {})
|
.then(() => {
|
||||||
|
!modalRisk.value && success($q, "บันทึกข้อมูลแล้ว");
|
||||||
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
|
|
@ -190,6 +192,7 @@ function onSubmit() {
|
||||||
*/
|
*/
|
||||||
function onClickAddRisk(status: boolean = false, data: ResRisk | null = null) {
|
function onClickAddRisk(status: boolean = false, data: ResRisk | null = null) {
|
||||||
modalRisk.value = true;
|
modalRisk.value = true;
|
||||||
|
isChangeData.value && onSubmit();
|
||||||
isEdit.value = status;
|
isEdit.value = status;
|
||||||
if (data) {
|
if (data) {
|
||||||
riskId.value = data.id;
|
riskId.value = data.id;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue