This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-01-13 13:07:15 +07:00
parent bdb578e71f
commit a33b3ae340
2 changed files with 14 additions and 39 deletions

View file

@ -305,9 +305,15 @@ function onClickOpenDialog(statusEdit: boolean = false, data: any = []) {
formDataSalary.positionPathSide = statusEdit ? data.positionPathSide : "";
formDataSalary.positionExecutive = statusEdit ? data.positionExecutive : "";
formDataSalary.salaryCompensation = statusEdit ? data.mouthSalaryAmount : "";
formDataSalary.salary = statusEdit ? data.amount.toLocaleString() : "";
formDataSalary.salary = statusEdit
? data.amount
? data.amount.toLocaleString()
: ""
: "";
formDataSalary.salaryPos = statusEdit
? data.positionSalaryAmount.toLocaleString()
? data.positionSalaryAmount
? data.positionSalaryAmount.toLocaleString()
: ""
: "";
formDataSalary.refCommandNo = statusEdit ? data.refCommandNo : "";
formDataSalary.templateDoc = "";
@ -712,9 +718,10 @@ onMounted(() => {
<q-btn
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
flat
:disable="props.row.commandId !== ''"
:color="props.row.commandId !== '' ? 'grey' : 'edit'"
dense
round
color="edit"
icon="edit"
clickable
@click="onClickOpenDialog(true, props.row)"
@ -1144,8 +1151,8 @@ onMounted(() => {
v-model="formDataSalary.refCommandNo"
hide-bottom-space
:label="`${'เลขที่คำสั่ง'}`"
mask="#####################"
>
<!-- mask="#####################" -->
<!-- :rules="[(val: string) => !!val || `${'กรุณากรอกเลขที่คำสั่ง'}`]" -->
</q-input>
</div>

View file

@ -125,18 +125,6 @@ async function fetchDataCommand(type: string) {
.finally(() => {
hideLoader();
});
// await http
// .get(config.API.commandRegisterByType(commandId.value, type))
// .then(async (res) => {
// const dataMain = await res.data.result;
// if (type === "cover") {
// dataCover.value = dataMain;
// issue.value = await res.data.result.data.commandTitle;
// await fetchPDF(dataCover.value);
// } else {
// dataAttachment.value = dataMain;
// }
// });
}
/** ฟังชั่นกำหนดค่าของ PDF*/
@ -165,29 +153,6 @@ async function fetchPDF(data: any, type: string = "docx?folder=command") {
messageError($q, err);
isLoadView.value = true;
});
// await axios
// .post(config.API.reportTemplate + `/${type}`, data, {
// headers: {
// accept: "application/pdf",
// "content-Type": "application/json",
// },
// responseType: "blob",
// })
// .then(async (res) => {
// const blob = new Blob([res.data]);
// const objectUrl = URL.createObjectURL(blob);
// const pdfData = usePDF(`${objectUrl}`);
// setTimeout(() => {
// pdfSrc.value = pdfData.pdf.value;
// numOfPages.value = pdfData.pages.value;
// isLoadView.value = true;
// }, 1500);
// })
// .catch(async (e) => {
// messageError($q, e);
// isLoadView.value = true;
// });
}
watch(
@ -205,6 +170,9 @@ watch(
.finally(() => {
hideLoader();
});
} else {
tab.value = "main";
pdfSrc.value = undefined;
}
}
);