- fix bug generate แนบท้ายไม่ generate ใหม่
- ปิด log
This commit is contained in:
parent
eea8ce1b6d
commit
3da536acb0
7 changed files with 132 additions and 479 deletions
|
|
@ -64,7 +64,6 @@ const destroyLocalStorage = () => {
|
|||
localStorage.clear();
|
||||
};
|
||||
onMounted(() => {
|
||||
// console.log("route query===>", route.query)
|
||||
if (route.query.step) {
|
||||
step.value = Number(route.query.step);
|
||||
localStorage.setItem("currentStep", step.value.toString());
|
||||
|
|
@ -79,7 +78,6 @@ onMounted(() => {
|
|||
|
||||
if (orderId_params !== undefined) {
|
||||
orderId.value = orderId_params.toString();
|
||||
// console.log("orderId.value");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -141,7 +141,6 @@ const OriginalDataFetch = async () => {
|
|||
await http
|
||||
.get(config.API.listOrder())
|
||||
.then((res: any) => {
|
||||
// console.log("list", res);
|
||||
rows.value = res.data.result.map((e: any) => ({
|
||||
orderId: e.orderId,
|
||||
Order: e.orderName,
|
||||
|
|
@ -234,7 +233,6 @@ const fiscalyearOP = reactive<DataOption[]>([{ id: 0, name: "ทั้งหม
|
|||
const addedfiscalYearValues: number[] = [];
|
||||
const fiscalYearFilter = async () => {
|
||||
await http.get(config.API.yearOptionsOrder()).then((res) => {
|
||||
// console.log(res);
|
||||
const response = res.data.result;
|
||||
fiscalyearOP.push(...response);
|
||||
});
|
||||
|
|
@ -247,7 +245,6 @@ const OrderTypeFilter = async () => {
|
|||
await http
|
||||
.get(config.API.typeOrder())
|
||||
.then((res) => {
|
||||
// console.log(res.data);
|
||||
const response = res.data.result;
|
||||
OrderTypeOption.push(...response);
|
||||
})
|
||||
|
|
@ -275,8 +272,6 @@ const OrderStatusFilter = async () => {
|
|||
}
|
||||
|
||||
if (!addedOrderStatusValues.includes(OrderStatusValue)) {
|
||||
// console.log(OrderStatusValue);
|
||||
|
||||
OrderStatusOption.push({
|
||||
// id: OrderStatusValue,
|
||||
id: OrderStatusOption.length.toString(),
|
||||
|
|
@ -303,12 +298,6 @@ const searchFilterTable = async () => {
|
|||
if (OrderStatus.value == "ทั้งหมด") {
|
||||
OrderStatus.value = "";
|
||||
}
|
||||
console.log(
|
||||
"Input value changed:",
|
||||
OrderType.value,
|
||||
OrderStatus.value,
|
||||
fiscalyear.value
|
||||
);
|
||||
|
||||
await DataStore.DataUpdateOrder(
|
||||
OrderType.value,
|
||||
|
|
@ -316,7 +305,6 @@ const searchFilterTable = async () => {
|
|||
fiscalyear.value
|
||||
);
|
||||
UpdataData.value = DataStore.DataMainUpdateOrder;
|
||||
// console.log(UpdataData.value);
|
||||
};
|
||||
|
||||
const paging = ref<boolean>(true);
|
||||
|
|
|
|||
|
|
@ -93,13 +93,11 @@ const clickSearch = async () => {
|
|||
year: reportYear.value,
|
||||
posno: reportNo.value,
|
||||
};
|
||||
// console.log(body);
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.searchOrderprofile(), body)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
console.log(data);
|
||||
|
||||
if (data.length !== 0) {
|
||||
rows.value = data.map((e: any) => ({
|
||||
|
|
|
|||
|
|
@ -178,7 +178,6 @@ watch(byOrder, async () => {
|
|||
.get(config.API.approverOC(byOrder.value))
|
||||
.then((res: any) => {
|
||||
CommandOption.value = res.data.result;
|
||||
// console.log(CommandOption.value);
|
||||
})
|
||||
.catch((e: any) => {
|
||||
console.log(e);
|
||||
|
|
@ -220,10 +219,8 @@ const fetchdetailOrder = async () => {
|
|||
await http
|
||||
.get(config.API.detailOrder(orderIdString))
|
||||
.then((res: any) => {
|
||||
// console.log(res);
|
||||
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
typeOrder.value = typeOrderOption.value.find(
|
||||
(e) => e.id === data.orderTypeValue
|
||||
);
|
||||
|
|
@ -234,7 +231,6 @@ const fetchdetailOrder = async () => {
|
|||
byOrder.value = data.orderBy;
|
||||
nameCommand.value = data.signatoryBy;
|
||||
positionCommand.value = data.signatoryPosition;
|
||||
// console.log("nameCommand===>",nameCommand.value);
|
||||
|
||||
examRound.value = data.examRound;
|
||||
conclusionRegisterNo.value = data.conclusionRegisterNo;
|
||||
|
|
@ -309,8 +305,6 @@ const fecthCommand = async () => {
|
|||
await http
|
||||
.get(config.API.organizationsOrder())
|
||||
.then((res: any) => {
|
||||
console.log(res);
|
||||
|
||||
byOrderOption.value = res.data.result;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
|
|
@ -319,7 +313,6 @@ const fecthCommand = async () => {
|
|||
};
|
||||
|
||||
const nameOrderFilter = (selectOrder: any) => {
|
||||
console.log(selectOrder);
|
||||
switch (selectOrder) {
|
||||
case "C-PM-01":
|
||||
return "บรรจุและแต่งตั้งผู้สอบแข่งขันได้";
|
||||
|
|
@ -434,9 +427,6 @@ const fecthExamRoundOption = async (commandCode: string) => {
|
|||
};
|
||||
|
||||
const submit = async () => {
|
||||
// console.log(nameCommand.value);
|
||||
// console.log(CommandOption.value);
|
||||
|
||||
let signBy = null;
|
||||
if (!nameCommand.value.length) {
|
||||
signBy = await nameCommand.value.name;
|
||||
|
|
@ -447,9 +437,7 @@ const submit = async () => {
|
|||
(x: any) => x.name == nameCommand.value
|
||||
);
|
||||
signBy = await name2?.name;
|
||||
console.log("signBy", signBy);
|
||||
}
|
||||
console.log(signBy);
|
||||
|
||||
const orderByOrganizationName = await byOrderOption.value.find(
|
||||
(x: any) => x.id == byOrder.value
|
||||
|
|
@ -553,8 +541,6 @@ const submit = async () => {
|
|||
});
|
||||
}
|
||||
|
||||
// console.log(formdata);
|
||||
|
||||
await myForm.value!.validate().then((result: boolean) => {
|
||||
if (result) {
|
||||
dialogConfirm($q, () => {
|
||||
|
|
@ -591,8 +577,6 @@ const updateOrder = async (formData: Object, orderId: string, type: string) => {
|
|||
await http
|
||||
.put(config.API.orderCPMUpdate(type, orderId), formData)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
|
||||
next();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
|
|
|
|||
|
|
@ -118,7 +118,6 @@ const getData = async (id: string) => {
|
|||
.get(config.API.personsselectedOrder(id))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
let list: ResponseData[] = [];
|
||||
data.map((r: ResponseData) => {
|
||||
list.push({
|
||||
|
|
@ -134,7 +133,6 @@ const getData = async (id: string) => {
|
|||
monthSalaryAmount: r.monthSalaryAmount,
|
||||
});
|
||||
});
|
||||
// console.log("list", list);
|
||||
rows.value = list;
|
||||
selected.value = rows.value;
|
||||
})
|
||||
|
|
@ -182,8 +180,6 @@ const deleteData = async (id: string) => {
|
|||
await http
|
||||
.delete(config.API.personsOrder(id))
|
||||
.then((res) => {
|
||||
// const data = res.data.result;
|
||||
// console.log(res);
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -199,10 +195,6 @@ const swapUp = async (id: string) => {
|
|||
// id = personalId
|
||||
await http
|
||||
.put(config.API.swapUpOrder(id))
|
||||
.then((res) => {
|
||||
// const data = res.data.result;
|
||||
// console.log(res);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
|
|
@ -216,10 +208,6 @@ const swapDown = async (id: string) => {
|
|||
// id = personalId
|
||||
await http
|
||||
.put(config.API.swapDownOrder(id))
|
||||
.then((res) => {
|
||||
// const data = res.data.result;
|
||||
// console.log(res);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
|
|
@ -249,7 +237,6 @@ const saveModal = () => {
|
|||
};
|
||||
const personalId = ref<string>("");
|
||||
const selectModal = (e: any) => {
|
||||
// console.log(e);
|
||||
titleName.value = e.name;
|
||||
personalId.value = e.personalId;
|
||||
modalOpenClose(e.personalId);
|
||||
|
|
@ -265,12 +252,10 @@ const modalOpenClose = async (personalId: string) => {
|
|||
myForm.value?.reset();
|
||||
};
|
||||
const fetchSalary = async (personalId: string) => {
|
||||
// console.log(personalId);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.salaryOrder(personalId))
|
||||
.then((res: any) => {
|
||||
console.log(res);
|
||||
const data = res.data.result;
|
||||
modalData.value = {
|
||||
salaryAmount:
|
||||
|
|
@ -292,10 +277,8 @@ const fetchSalary = async (personalId: string) => {
|
|||
? null
|
||||
: data.monthSalaryAmount,
|
||||
};
|
||||
// console.log("data", modalData.value);
|
||||
})
|
||||
.catch((e) => {
|
||||
// console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
@ -318,11 +301,9 @@ const putSalary = async (salary: any) => {
|
|||
await http
|
||||
.put(config.API.salaryOrder(personalId.value), modalData.value)
|
||||
.then((res: any) => {
|
||||
// console.log(res);
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
// console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
|
|
@ -353,7 +334,6 @@ const fetchaddlist = async (id: string) => {
|
|||
.get(config.API.personsOrder(id))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
console.log(data);
|
||||
let list = [];
|
||||
list = data.map((r: ResponseData) => ({
|
||||
education: r.education ?? "",
|
||||
|
|
@ -408,7 +388,6 @@ const addlist = async (data: Object) => {
|
|||
success($q, "บันทึกสำเร็จ");
|
||||
})
|
||||
.catch((e: any) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
@ -418,8 +397,6 @@ const addlist = async (data: Object) => {
|
|||
};
|
||||
|
||||
const save = async () => {
|
||||
// console.log("save===>", rows.value);
|
||||
// console.log(statuscode.value);
|
||||
const check = rows.value.find((x: any) => x.salaryAmount == 0);
|
||||
if (
|
||||
(selected.value.length > 0 && !check) ||
|
||||
|
|
|
|||
|
|
@ -207,7 +207,6 @@ const getData = async (id: string) => {
|
|||
.get(config.API.copyOrderId(id))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
let list: DataCopyOrder[] = [];
|
||||
data.map((r: ResponseCopyOrder) => {
|
||||
let selectCopyOrder = [];
|
||||
|
|
@ -248,7 +247,6 @@ const getData = async (id: string) => {
|
|||
};
|
||||
|
||||
const saveData = async () => {
|
||||
// console.log("select", selectedModal.value);
|
||||
const id = route.params.orderid
|
||||
? route.params.orderid.toString()
|
||||
: localStorage.getItem("orderId")
|
||||
|
|
@ -258,10 +256,6 @@ const saveData = async () => {
|
|||
showLoader();
|
||||
await http
|
||||
.post(config.API.copyOrderPersonsId(id), selectedModal.value)
|
||||
.then((res) => {
|
||||
// const data = res.data.result;
|
||||
// console.log(res);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
|
|
@ -332,8 +326,6 @@ const deleteData = async (id: string) => {
|
|||
await http
|
||||
.delete(config.API.copyOrderId(id))
|
||||
.then((res) => {
|
||||
// const data = res.data.result;
|
||||
// console.log(res);
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ const getCommandDetail = async () => {
|
|||
code.value = orderTypeCode ?? "";
|
||||
orderName.value = res.data.result.orderTitle;
|
||||
orderStatusName.value = data.orderStatusName;
|
||||
// console.log(orderStatusName.value);
|
||||
|
||||
fetchReportCover("pdf", orderId.value);
|
||||
|
||||
|
|
@ -211,7 +210,6 @@ const viewPDFUpload = async (pdf: string) => {
|
|||
};
|
||||
|
||||
watch(tab, () => {
|
||||
// console.log(tab.value);
|
||||
if (tab.value === "main") {
|
||||
viewPDF(orderCoverPdf.value);
|
||||
}
|
||||
|
|
@ -244,7 +242,6 @@ const props = defineProps({
|
|||
const previous = () => props.previous();
|
||||
|
||||
const onchangePage = (val: any) => {
|
||||
// console.log(val);
|
||||
if (vuePDFRef !== null) {
|
||||
vuePDFRef.value.reload();
|
||||
}
|
||||
|
|
@ -260,6 +257,7 @@ const downloadFile = (response: any, filename: string) => {
|
|||
document.body.removeChild(link);
|
||||
};
|
||||
|
||||
// การอัพโหลดไฟล์คำสั่งและเอกสารแนบท้าย
|
||||
const saveUpload = () => {
|
||||
if (myFormUpload.value !== null) {
|
||||
myFormUpload.value!.validate().then((success: Boolean) => {
|
||||
|
|
@ -288,32 +286,41 @@ 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();
|
||||
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 putOrderData(); // บันทึกข้อมูลในส่วนของรายละเอียด
|
||||
await fetchReportCover("pdf", orderId.value); // ดึงรายงานคำสั่งใหม่
|
||||
|
||||
// เช็คประเภทคำสั่งถ้าไม่ใช่ type เหล่านี้จะมีแนบท้าย
|
||||
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);
|
||||
|
||||
// เช็คว่าถ้าอยู่ใน tab ของแนบท้ายไหมถ้าอยู่เข้าเงื่อนไขนี้
|
||||
if (tab.value == "second") {
|
||||
// แสดงผลส่วนของแนบท้ายใหม่
|
||||
await viewPDF(orderAttachmentPdf.value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ดึงข้อมูลสถานะการออกคำสั่ง (Y = ออกคำสั่งได้แล้ว, N = เงื่อนไขยังไม่ครบไม่สามารถกดออกคำสั่งได้)
|
||||
await fecthstatusOrder();
|
||||
|
||||
hideLoader();
|
||||
|
|
@ -323,6 +330,7 @@ const saveDetail = () => {
|
|||
}
|
||||
};
|
||||
|
||||
// ฟังก์ชั่นการบันทึกข้อมูลในส่วนของรายละเอียด
|
||||
const putOrderData = async () => {
|
||||
const orderData = {
|
||||
orderNo: order.value,
|
||||
|
|
@ -438,108 +446,61 @@ const viewFileUpload = async (url: string) => {
|
|||
<template>
|
||||
<div>
|
||||
<div style="min-height: 70vh">
|
||||
<q-splitter
|
||||
v-model="splitterModel"
|
||||
style="height: 70vh"
|
||||
@update:model-value="onchangePage"
|
||||
>
|
||||
<q-splitter v-model="splitterModel" style="height: 70vh" @update:model-value="onchangePage">
|
||||
<template v-slot:before>
|
||||
<div class="space">
|
||||
<div @click="setTab('main')" :class="getClass(tab == 'main')">
|
||||
<div class="q-pr-sm">คำสั่ง</div>
|
||||
<q-btn
|
||||
v-if="orderStatusName != 'ออกคำสั่งแล้ว'"
|
||||
size="12px"
|
||||
flat
|
||||
dense
|
||||
icon="mdi-download"
|
||||
:disable="tab !== 'main'"
|
||||
:color="tab !== 'main' ? 'grey' : 'add'"
|
||||
>
|
||||
<q-btn v-if="orderStatusName != 'ออกคำสั่งแล้ว'" size="12px" flat dense icon="mdi-download"
|
||||
:disable="tab !== 'main'" :color="tab !== 'main' ? 'grey' : 'add'">
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="downloadCover('pdf')"
|
||||
>
|
||||
<q-item clickable v-close-popup @click="downloadCover('pdf')">
|
||||
<!-- type="a"
|
||||
:href="orderCoverPdf"
|
||||
target="_blank" -->
|
||||
<q-item-section avatar
|
||||
><q-icon color="red" name="mdi-file-pdf"
|
||||
/></q-item-section>
|
||||
<q-item-section avatar><q-icon color="red" name="mdi-file-pdf" /></q-item-section>
|
||||
<q-item-section>ไฟล์ .PDF</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="downloadCover('docx')"
|
||||
>
|
||||
<q-item clickable v-close-popup @click="downloadCover('docx')">
|
||||
<!-- type="a"
|
||||
:href="orderCoverDocs"
|
||||
target="_blank" -->
|
||||
<q-item-section avatar
|
||||
><q-icon color="blue" name="mdi-file-word"
|
||||
/></q-item-section>
|
||||
<q-item-section avatar><q-icon color="blue" name="mdi-file-word" /></q-item-section>
|
||||
<q-item-section>ไฟล์ .docx</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
code != 'c-pm-10' &&
|
||||
code != 'c-pm-11' &&
|
||||
code != 'c-pm-12' &&
|
||||
code != 'c-pm-16' &&
|
||||
code != 'c-pm-18' &&
|
||||
code != 'c-pm-19' &&
|
||||
code != 'c-pm-20' &&
|
||||
code != 'c-pm-21'
|
||||
"
|
||||
@click="setTab('second')"
|
||||
:class="getClass(tab == 'second')"
|
||||
>
|
||||
<div v-if="code != 'c-pm-10' &&
|
||||
code != 'c-pm-11' &&
|
||||
code != 'c-pm-12' &&
|
||||
code != 'c-pm-16' &&
|
||||
code != 'c-pm-18' &&
|
||||
code != 'c-pm-19' &&
|
||||
code != 'c-pm-20' &&
|
||||
code != 'c-pm-21'
|
||||
" @click="setTab('second')" :class="getClass(tab == 'second')">
|
||||
<div class="q-pr-sm">เอกสารแนบท้าย</div>
|
||||
<q-btn
|
||||
v-if="orderStatusName != 'ออกคำสั่งแล้ว'"
|
||||
size="12px"
|
||||
flat
|
||||
dense
|
||||
:color="tab !== 'second' ? 'grey' : 'add'"
|
||||
icon="mdi-download"
|
||||
:disable="tab !== 'second'"
|
||||
>
|
||||
<q-btn v-if="orderStatusName != 'ออกคำสั่งแล้ว'" size="12px" flat dense
|
||||
:color="tab !== 'second' ? 'grey' : 'add'" icon="mdi-download" :disable="tab !== 'second'">
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="downloadAttachment('pdf')"
|
||||
>
|
||||
<q-item clickable v-close-popup @click="downloadAttachment('pdf')">
|
||||
<!-- type="a"
|
||||
:href="orderAttachmentPdf"
|
||||
target="_blank" -->
|
||||
<q-item-section avatar
|
||||
><q-icon color="red" name="mdi-file-pdf"
|
||||
/></q-item-section>
|
||||
<q-item-section avatar><q-icon color="red" name="mdi-file-pdf" /></q-item-section>
|
||||
<q-item-section>ไฟล์ .PDF</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="downloadAttachment('xlsx')"
|
||||
>
|
||||
<q-item clickable v-close-popup @click="downloadAttachment('xlsx')">
|
||||
<!-- type="a"
|
||||
:href="orderAttachmentXlsx"
|
||||
target="_blank" -->
|
||||
<q-item-section avatar
|
||||
><q-icon color="green-7" name="mdi-file-excel"
|
||||
/></q-item-section>
|
||||
<q-item-section avatar><q-icon color="green-7" name="mdi-file-excel" /></q-item-section>
|
||||
<q-item-section>ไฟล์ .xls</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
|
|
@ -547,24 +508,12 @@ const viewFileUpload = async (url: string) => {
|
|||
</q-btn>
|
||||
</div>
|
||||
<q-space />
|
||||
<q-btn
|
||||
class="text-dark"
|
||||
flat
|
||||
dense
|
||||
icon="mdi-fullscreen"
|
||||
color="add"
|
||||
@click="dialog = true"
|
||||
/>
|
||||
<q-btn class="text-dark" flat dense icon="mdi-fullscreen" color="add" @click="dialog = true" />
|
||||
</div>
|
||||
<q-separator style="margin-top: -1px; z-index: 1" />
|
||||
<q-card bordered class="card-pdf q-ma-md q-pa-md">
|
||||
<div class="justify-between items-center align-center q-pb-sm row">
|
||||
<q-btn
|
||||
class="text-dark bg-grey-4"
|
||||
flat
|
||||
dense
|
||||
@click="page = page > 1 ? page - 1 : page"
|
||||
>
|
||||
<q-btn class="text-dark bg-grey-4" flat dense @click="page = page > 1 ? page - 1 : page">
|
||||
<q-icon name="mdi-chevron-left" />
|
||||
</q-btn>
|
||||
|
||||
|
|
@ -572,12 +521,7 @@ const viewFileUpload = async (url: string) => {
|
|||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</span>
|
||||
|
||||
<q-btn
|
||||
class="text-dark bg-grey-4"
|
||||
flat
|
||||
dense
|
||||
@click="page = page < numOfPages ? page + 1 : page"
|
||||
>
|
||||
<q-btn class="text-dark bg-grey-4" flat dense @click="page = page < numOfPages ? page + 1 : page">
|
||||
<q-icon name="mdi-chevron-right" />
|
||||
</q-btn>
|
||||
</div>
|
||||
|
|
@ -586,12 +530,7 @@ const viewFileUpload = async (url: string) => {
|
|||
<!-- <VuePdf :key="page" :src="pdfSrc" :page="page" /> -->
|
||||
</div>
|
||||
<div class="justify-between items-center align-center q-pt-sm row">
|
||||
<q-btn
|
||||
class="text-dark bg-grey-4"
|
||||
flat
|
||||
dense
|
||||
@click="page = page > 1 ? page - 1 : page"
|
||||
>
|
||||
<q-btn class="text-dark bg-grey-4" flat dense @click="page = page > 1 ? page - 1 : page">
|
||||
<q-icon name="mdi-chevron-left" />
|
||||
</q-btn>
|
||||
|
||||
|
|
@ -599,12 +538,7 @@ const viewFileUpload = async (url: string) => {
|
|||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</span>
|
||||
|
||||
<q-btn
|
||||
class="text-dark bg-grey-4"
|
||||
flat
|
||||
dense
|
||||
@click="page = page < numOfPages ? page + 1 : page"
|
||||
>
|
||||
<q-btn class="text-dark bg-grey-4" flat dense @click="page = page < numOfPages ? page + 1 : page">
|
||||
<q-icon name="mdi-chevron-right" />
|
||||
</q-btn>
|
||||
</div>
|
||||
|
|
@ -612,12 +546,7 @@ const viewFileUpload = async (url: string) => {
|
|||
</template>
|
||||
|
||||
<template v-slot:separator>
|
||||
<q-avatar
|
||||
color="primary"
|
||||
text-color="white"
|
||||
size="30px"
|
||||
icon="drag_indicator"
|
||||
/>
|
||||
<q-avatar color="primary" text-color="white" size="30px" icon="drag_indicator" />
|
||||
</template>
|
||||
|
||||
<template v-slot:after>
|
||||
|
|
@ -629,94 +558,47 @@ const viewFileUpload = async (url: string) => {
|
|||
<div>
|
||||
<label class="text-file">คำสั่ง</label>
|
||||
<div v-if="OrderPDFUpload != ''" class="text-right">
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
dense
|
||||
color="primary"
|
||||
icon="mdi-eye"
|
||||
@click="viewFileUpload(OrderPDFUpload)"
|
||||
>
|
||||
<q-btn size="12px" flat dense color="primary" icon="mdi-eye"
|
||||
@click="viewFileUpload(OrderPDFUpload)">
|
||||
<q-tooltip>ดูไฟล์คำสั่ง</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
type="a"
|
||||
:href="OrderPDFUpload"
|
||||
size="12px"
|
||||
flat
|
||||
dense
|
||||
color="red"
|
||||
icon="mdi-download"
|
||||
target="_blank"
|
||||
>
|
||||
<q-btn type="a" :href="OrderPDFUpload" size="12px" flat dense color="red" icon="mdi-download"
|
||||
target="_blank">
|
||||
<q-tooltip>ดาวน์โหลดไฟล์คำสั่ง</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<q-file
|
||||
v-if="orderStatusName != 'ออกคำสั่งแล้ว'"
|
||||
outlined
|
||||
dense
|
||||
v-model="fileOrder"
|
||||
label="เลือกไฟล์คำสั่ง"
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
:rules="[(val) => val || 'กรุณาเลือกไฟล์ไฟล์คำสั่ง']"
|
||||
accept=".pdf"
|
||||
>
|
||||
<q-file v-if="orderStatusName != 'ออกคำสั่งแล้ว'" outlined dense v-model="fileOrder"
|
||||
label="เลือกไฟล์คำสั่ง" hide-bottom-space lazy-rules
|
||||
:rules="[(val) => val || 'กรุณาเลือกไฟล์ไฟล์คำสั่ง']" accept=".pdf">
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
</template>
|
||||
</q-file>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
code != 'c-pm-10' &&
|
||||
code != 'c-pm-11' &&
|
||||
code != 'c-pm-12' &&
|
||||
code != 'c-pm-16' &&
|
||||
code != 'c-pm-18' &&
|
||||
code != 'c-pm-19' &&
|
||||
code != 'c-pm-20' &&
|
||||
code != 'c-pm-21'
|
||||
"
|
||||
>
|
||||
<div v-if="code != 'c-pm-10' &&
|
||||
code != 'c-pm-11' &&
|
||||
code != 'c-pm-12' &&
|
||||
code != 'c-pm-16' &&
|
||||
code != 'c-pm-18' &&
|
||||
code != 'c-pm-19' &&
|
||||
code != 'c-pm-20' &&
|
||||
code != 'c-pm-21'
|
||||
">
|
||||
<label class="text-file">เอกสารแนบท้าย</label>
|
||||
<div v-if="TailerPDFUpload != ''" class="text-right">
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
dense
|
||||
color="primary"
|
||||
icon="mdi-eye"
|
||||
@click="viewFileUpload(TailerPDFUpload)"
|
||||
>
|
||||
<q-btn size="12px" flat dense color="primary" icon="mdi-eye"
|
||||
@click="viewFileUpload(TailerPDFUpload)">
|
||||
<q-tooltip>ดูเอกสารแนบท้าย</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
type="a"
|
||||
:href="TailerPDFUpload"
|
||||
size="12px"
|
||||
flat
|
||||
dense
|
||||
color="red"
|
||||
icon="mdi-download"
|
||||
target="_blank"
|
||||
>
|
||||
<q-btn type="a" :href="TailerPDFUpload" size="12px" flat dense color="red" icon="mdi-download"
|
||||
target="_blank">
|
||||
<q-tooltip>ดาวน์โหลดเอกสารแนบท้าย</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<q-file
|
||||
v-if="orderStatusName != 'ออกคำสั่งแล้ว'"
|
||||
outlined
|
||||
dense
|
||||
v-model="fileTailer"
|
||||
label="เลือกไฟล์เอกสารแนบท้าย"
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
:rules="[(val) => val || 'กรุณาเลือกไฟล์เอกสารแนบท้าย']"
|
||||
accept=".pdf"
|
||||
>
|
||||
<q-file v-if="orderStatusName != 'ออกคำสั่งแล้ว'" outlined dense v-model="fileTailer"
|
||||
label="เลือกไฟล์เอกสารแนบท้าย" hide-bottom-space lazy-rules
|
||||
:rules="[(val) => val || 'กรุณาเลือกไฟล์เอกสารแนบท้าย']" accept=".pdf">
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
</template>
|
||||
|
|
@ -724,26 +606,15 @@ const viewFileUpload = async (url: string) => {
|
|||
</div>
|
||||
|
||||
<!-- บันทึกอัพโหลดเอกสาร -->
|
||||
<div
|
||||
v-if="orderStatusName != 'ออกคำสั่งแล้ว'"
|
||||
class="row col-12 q-mt-md"
|
||||
>
|
||||
<div v-if="orderStatusName != 'ออกคำสั่งแล้ว'" class="row col-12 q-mt-md">
|
||||
<q-space></q-space>
|
||||
<q-btn
|
||||
unelevated
|
||||
label="บันทึก"
|
||||
:color="
|
||||
validateFormUpload() &&
|
||||
orderStatusName != 'ออกคำสั่งแล้ว'
|
||||
? 'public'
|
||||
: 'grey'
|
||||
"
|
||||
:disable="
|
||||
!validateFormUpload() ||
|
||||
orderStatusName == 'ออกคำสั่งแล้ว'
|
||||
"
|
||||
@click="saveUpload"
|
||||
>
|
||||
<q-btn unelevated label="บันทึก" :color="validateFormUpload() &&
|
||||
orderStatusName != 'ออกคำสั่งแล้ว'
|
||||
? 'public'
|
||||
: 'grey'
|
||||
" :disable="!validateFormUpload() ||
|
||||
orderStatusName == 'ออกคำสั่งแล้ว'
|
||||
" @click="saveUpload">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -756,54 +627,25 @@ const viewFileUpload = async (url: string) => {
|
|||
<div class="q-gutter-y-md q-mb-md">
|
||||
<div>
|
||||
<label class="text-file">เลขที่คำสั่ง</label>
|
||||
<q-input
|
||||
:outlined="true"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!true"
|
||||
:borderless="!true"
|
||||
v-model="order"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่คำสั่ง'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'เลขที่คำสั่ง'}`"
|
||||
:disable="orderStatusName == 'ออกคำสั่งแล้ว'"
|
||||
/>
|
||||
<q-input :outlined="true" dense lazy-rules :readonly="!true" :borderless="!true" v-model="order"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่คำสั่ง'}`]" hide-bottom-space
|
||||
:label="`${'เลขที่คำสั่ง'}`" :disable="orderStatusName == 'ออกคำสั่งแล้ว'" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="text-file">ปีที่ออกคำสั่ง</label>
|
||||
<datepicker
|
||||
:disabled="orderStatusName == 'ออกคำสั่งแล้ว'"
|
||||
menu-class-name="modalfix"
|
||||
v-model="years"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<datepicker :disabled="orderStatusName == 'ออกคำสั่งแล้ว'" menu-class-name="modalfix" v-model="years"
|
||||
:locale="'th'" autoApply year-picker :enableTimePicker="false" week-start="0">
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
:disable="orderStatusName == 'ออกคำสั่งแล้ว'"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
:model-value="years + 543"
|
||||
:rules="[
|
||||
<q-input :disable="orderStatusName == 'ออกคำสั่งแล้ว'" outlined dense lazy-rules
|
||||
:model-value="years + 543" :rules="[
|
||||
(val) => !!val || `${'กรุณาเลือกปีที่ออกคำสั่ง'}`,
|
||||
]"
|
||||
hide-bottom-space
|
||||
:label="`${'ปีที่ออกคำสั่ง'}`"
|
||||
>
|
||||
]" hide-bottom-space :label="`${'ปีที่ออกคำสั่ง'}`">
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-grey)"
|
||||
>
|
||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-grey)">
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
|
|
@ -812,16 +654,8 @@ const viewFileUpload = async (url: string) => {
|
|||
</div>
|
||||
<div>
|
||||
<label class="text-file">วันที่ลงนาม</label>
|
||||
<datepicker
|
||||
:disabled="orderStatusName == 'ออกคำสั่งแล้ว'"
|
||||
menu-class-name="modalfix"
|
||||
v-model="date"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<datepicker :disabled="orderStatusName == 'ออกคำสั่งแล้ว'" menu-class-name="modalfix" v-model="date"
|
||||
:locale="'th'" autoApply borderless :enableTimePicker="false" week-start="0">
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
|
|
@ -829,24 +663,13 @@ const viewFileUpload = async (url: string) => {
|
|||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
:disable="orderStatusName == 'ออกคำสั่งแล้ว'"
|
||||
outlined
|
||||
dense
|
||||
class="full-width datepicker"
|
||||
hide-bottom-space
|
||||
:model-value="date != null ? date2Thai(date) : null"
|
||||
:label="`${'วันที่ลงนาม'}`"
|
||||
:rules="[
|
||||
<q-input :disable="orderStatusName == 'ออกคำสั่งแล้ว'" outlined dense
|
||||
class="full-width datepicker" hide-bottom-space
|
||||
:model-value="date != null ? date2Thai(date) : null" :label="`${'วันที่ลงนาม'}`" :rules="[
|
||||
(val) => !!val || `${'กรุณาเลือกวันที่ลงนาม'}`,
|
||||
]"
|
||||
>
|
||||
]">
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-grey)"
|
||||
>
|
||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-grey)">
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
|
|
@ -855,24 +678,13 @@ const viewFileUpload = async (url: string) => {
|
|||
</div>
|
||||
|
||||
<!-- บันทึกรายละเอียดคำสั่ง -->
|
||||
<div
|
||||
v-if="orderStatusName != 'ออกคำสั่งแล้ว'"
|
||||
class="row col-12 q-mt-md"
|
||||
>
|
||||
<div v-if="orderStatusName != 'ออกคำสั่งแล้ว'" class="row col-12 q-mt-md">
|
||||
<q-space></q-space>
|
||||
<q-btn
|
||||
unelevated
|
||||
label="บันทึก"
|
||||
:color="
|
||||
validateForm() && orderStatusName != 'ออกคำสั่งแล้ว'
|
||||
? 'public'
|
||||
: 'grey'
|
||||
"
|
||||
:disable="
|
||||
!validateForm() || orderStatusName == 'ออกคำสั่งแล้ว'
|
||||
"
|
||||
@click="saveDetail"
|
||||
>
|
||||
<q-btn unelevated label="บันทึก" :color="validateForm() && orderStatusName != 'ออกคำสั่งแล้ว'
|
||||
? 'public'
|
||||
: 'grey'
|
||||
" :disable="!validateForm() || orderStatusName == 'ออกคำสั่งแล้ว'
|
||||
" @click="saveDetail">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -884,26 +696,13 @@ const viewFileUpload = async (url: string) => {
|
|||
</div>
|
||||
<q-separator />
|
||||
<div class="flex justify-end q-pa-sm q-gutter-sm">
|
||||
<q-btn
|
||||
v-if="orderStatusName !== 'ออกคำสั่งแล้ว'"
|
||||
dense
|
||||
outline
|
||||
color="primary"
|
||||
icon="chevron_left"
|
||||
@click="previous"
|
||||
class="q-pr-md"
|
||||
label="เลือกรายชื่อส่งสำเนา"
|
||||
>
|
||||
<q-btn v-if="orderStatusName !== 'ออกคำสั่งแล้ว'" dense outline color="primary" icon="chevron_left"
|
||||
@click="previous" class="q-pr-md" label="เลือกรายชื่อส่งสำเนา">
|
||||
</q-btn>
|
||||
|
||||
<!-- ออกคำสั่ง -->
|
||||
<q-btn
|
||||
v-if="orderStatusName !== 'ออกคำสั่งแล้ว'"
|
||||
:disable="statusOrder == 'N'"
|
||||
unelevated
|
||||
label="ออกคำสั่ง"
|
||||
:color="statusOrder == 'Y' ? 'public' : 'grey'"
|
||||
>
|
||||
<q-btn v-if="orderStatusName !== 'ออกคำสั่งแล้ว'" :disable="statusOrder == 'N'" unelevated label="ออกคำสั่ง"
|
||||
:color="statusOrder == 'Y' ? 'public' : 'grey'">
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable v-close-popup @click="clickExecute(orderId)">
|
||||
|
|
@ -916,42 +715,18 @@ const viewFileUpload = async (url: string) => {
|
|||
</q-menu>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-else
|
||||
disable
|
||||
unelevated
|
||||
label="ออกคำสั่งเสร็จสิ้น"
|
||||
color="green"
|
||||
></q-btn>
|
||||
<q-btn v-else disable unelevated label="ออกคำสั่งเสร็จสิ้น" color="green"></q-btn>
|
||||
</div>
|
||||
|
||||
<q-dialog
|
||||
v-model="dialog"
|
||||
persistent
|
||||
:maximized="true"
|
||||
transition-show="slide-up"
|
||||
transition-hide="slide-down"
|
||||
>
|
||||
<q-dialog v-model="dialog" persistent :maximized="true" transition-show="slide-up" transition-hide="slide-down">
|
||||
<q-card class="bg-white text-white">
|
||||
<div class="flex justify-end items-center align-center q-mr-md q-mt-sm">
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
size="12px"
|
||||
v-close-popup
|
||||
/>
|
||||
<q-btn icon="close" unelevated round dense style="color: #ff8080; background-color: #ffdede" size="12px"
|
||||
v-close-popup />
|
||||
</div>
|
||||
<q-card-section bordered class="card-pdf q-ma-md q-pa-md">
|
||||
<div class="justify-between items-center align-center q-pb-sm row">
|
||||
<q-btn
|
||||
class="text-dark bg-grey-4"
|
||||
flat
|
||||
dense
|
||||
@click="page = page > 1 ? page - 1 : page"
|
||||
>
|
||||
<q-btn class="text-dark bg-grey-4" flat dense @click="page = page > 1 ? page - 1 : page">
|
||||
<q-icon name="mdi-chevron-left" />
|
||||
</q-btn>
|
||||
|
||||
|
|
@ -959,32 +734,16 @@ const viewFileUpload = async (url: string) => {
|
|||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</span>
|
||||
|
||||
<q-btn
|
||||
class="text-dark bg-grey-4"
|
||||
flat
|
||||
dense
|
||||
@click="page = page < numOfPages ? page + 1 : page"
|
||||
>
|
||||
<q-btn class="text-dark bg-grey-4" flat dense @click="page = page < numOfPages ? page + 1 : page">
|
||||
<q-icon name="mdi-chevron-right" />
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="pdfWidth">
|
||||
<VuePDF
|
||||
ref="vuePDFRef"
|
||||
:pdf="pdfSrc"
|
||||
:page="page"
|
||||
fit-parent
|
||||
:scale="0.1"
|
||||
/>
|
||||
<VuePDF ref="vuePDFRef" :pdf="pdfSrc" :page="page" fit-parent :scale="0.1" />
|
||||
<!-- <VuePdf :key="page" :src="pdfSrc" :page="page" /> -->
|
||||
</div>
|
||||
<div class="justify-between items-center align-center q-pt-sm row">
|
||||
<q-btn
|
||||
class="text-dark bg-grey-4"
|
||||
flat
|
||||
dense
|
||||
@click="page = page > 1 ? page - 1 : page"
|
||||
>
|
||||
<q-btn class="text-dark bg-grey-4" flat dense @click="page = page > 1 ? page - 1 : page">
|
||||
<q-icon name="mdi-chevron-left" />
|
||||
</q-btn>
|
||||
|
||||
|
|
@ -992,12 +751,7 @@ const viewFileUpload = async (url: string) => {
|
|||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</span>
|
||||
|
||||
<q-btn
|
||||
class="text-dark bg-grey-4"
|
||||
flat
|
||||
dense
|
||||
@click="page = page < numOfPages ? page + 1 : page"
|
||||
>
|
||||
<q-btn class="text-dark bg-grey-4" flat dense @click="page = page < numOfPages ? page + 1 : page">
|
||||
<q-icon name="mdi-chevron-right" />
|
||||
</q-btn>
|
||||
</div>
|
||||
|
|
@ -1005,33 +759,16 @@ const viewFileUpload = async (url: string) => {
|
|||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<q-dialog
|
||||
v-model="dialogFileUpload"
|
||||
persistent
|
||||
:maximized="true"
|
||||
transition-show="slide-up"
|
||||
transition-hide="slide-down"
|
||||
>
|
||||
<q-dialog v-model="dialogFileUpload" persistent :maximized="true" transition-show="slide-up"
|
||||
transition-hide="slide-down">
|
||||
<q-card class="bg-white text-white">
|
||||
<div class="flex justify-end items-center align-center q-mr-md q-mt-sm">
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
size="12px"
|
||||
v-close-popup
|
||||
/>
|
||||
<q-btn icon="close" unelevated round dense style="color: #ff8080; background-color: #ffdede" size="12px"
|
||||
v-close-popup />
|
||||
</div>
|
||||
<q-card-section bordered class="card-pdf q-ma-md q-pa-md">
|
||||
<div class="justify-between items-center align-center q-pb-sm row">
|
||||
<q-btn
|
||||
class="text-dark bg-grey-4"
|
||||
flat
|
||||
dense
|
||||
@click="page = page > 1 ? page - 1 : page"
|
||||
>
|
||||
<q-btn class="text-dark bg-grey-4" flat dense @click="page = page > 1 ? page - 1 : page">
|
||||
<q-icon name="mdi-chevron-left" />
|
||||
</q-btn>
|
||||
|
||||
|
|
@ -1039,32 +776,16 @@ const viewFileUpload = async (url: string) => {
|
|||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</span>
|
||||
|
||||
<q-btn
|
||||
class="text-dark bg-grey-4"
|
||||
flat
|
||||
dense
|
||||
@click="page = page < numOfPages ? page + 1 : page"
|
||||
>
|
||||
<q-btn class="text-dark bg-grey-4" flat dense @click="page = page < numOfPages ? page + 1 : page">
|
||||
<q-icon name="mdi-chevron-right" />
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="pdfWidth">
|
||||
<VuePDF
|
||||
ref="vuePDFRef"
|
||||
:pdf="pdfFileUploadSrc"
|
||||
:page="page"
|
||||
fit-parent
|
||||
:scale="0.1"
|
||||
/>
|
||||
<VuePDF ref="vuePDFRef" :pdf="pdfFileUploadSrc" :page="page" fit-parent :scale="0.1" />
|
||||
<!-- <VuePdf :key="page" :src="pdfSrc" :page="page" /> -->
|
||||
</div>
|
||||
<div class="justify-between items-center align-center q-pt-sm row">
|
||||
<q-btn
|
||||
class="text-dark bg-grey-4"
|
||||
flat
|
||||
dense
|
||||
@click="page = page > 1 ? page - 1 : page"
|
||||
>
|
||||
<q-btn class="text-dark bg-grey-4" flat dense @click="page = page > 1 ? page - 1 : page">
|
||||
<q-icon name="mdi-chevron-left" />
|
||||
</q-btn>
|
||||
|
||||
|
|
@ -1072,12 +793,7 @@ const viewFileUpload = async (url: string) => {
|
|||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</span>
|
||||
|
||||
<q-btn
|
||||
class="text-dark bg-grey-4"
|
||||
flat
|
||||
dense
|
||||
@click="page = page < numOfPages ? page + 1 : page"
|
||||
>
|
||||
<q-btn class="text-dark bg-grey-4" flat dense @click="page = page < numOfPages ? page + 1 : page">
|
||||
<q-icon name="mdi-chevron-right" />
|
||||
</q-btn>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue