no message

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-13 19:03:43 +07:00
parent 32b8d8ca92
commit 39e045225f
2 changed files with 47 additions and 5 deletions

View file

@ -130,7 +130,9 @@ const fetchReportCover = async (type: string, orderId: string) => {
const blob = new Blob([res.data]);
const objectUrl = URL.createObjectURL(blob);
orderCoverPdf.value = objectUrl;
viewPDF(orderCoverPdf.value);
if (tab.value == "main") {
viewPDF(orderCoverPdf.value);
}
})
.catch((e) => {
messageError($q, e);
@ -287,14 +289,33 @@ const saveUpload = () => {
};
const saveDetail = () => {
console.log(tab.value);
if (myForm.value !== null) {
myForm.value!.validate().then((success: Boolean) => {
if (success) {
dialogConfirm($q, async () => {
showLoader();
await putOrderData();
await fetchReportCover("pdf", orderId.value);
if (tab.value == "main") {
await fetchReportCover("pdf", orderId.value);
} else {
if (
code.value != "c-pm-10" &&
code.value != "c-pm-11" &&
code.value != "c-pm-12" &&
code.value != "c-pm-16" &&
code.value != "c-pm-18" &&
code.value != "c-pm-19" &&
code.value != "c-pm-20" &&
code.value != "c-pm-21"
) {
await fetchReportAttachment("pdf", orderId.value);
await viewPDF(orderAttachmentPdf.value);
}
}
await fecthstatusOrder();
hideLoader();
});
}