Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m25s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m25s
This commit is contained in:
commit
f12d999bbc
1 changed files with 27 additions and 6 deletions
|
|
@ -269,6 +269,7 @@ async function fetchLeaveday(
|
||||||
* @param data ข้อมูลบัญชีวันลา
|
* @param data ข้อมูลบัญชีวันลา
|
||||||
*/
|
*/
|
||||||
async function fetchDocumentTemplate(data: any) {
|
async function fetchDocumentTemplate(data: any) {
|
||||||
|
if (typeReport.value === 4) return;
|
||||||
await axios
|
await axios
|
||||||
.post(`${config.API.reportTemplate}/xlsx`, data, {
|
.post(`${config.API.reportTemplate}/xlsx`, data, {
|
||||||
headers: {
|
headers: {
|
||||||
|
|
@ -352,7 +353,7 @@ function clearData() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSearch() {
|
async function onSearch() {
|
||||||
isReport.value = false;
|
isReport.value = false;
|
||||||
isLoadPDF.value = true;
|
isLoadPDF.value = true;
|
||||||
pdfSrc.value = undefined;
|
pdfSrc.value = undefined;
|
||||||
|
|
@ -467,6 +468,19 @@ const reportName = () => {
|
||||||
return reportNameVal + employeeClassName;
|
return reportNameVal + employeeClassName;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
async function handleDownload() {
|
||||||
|
updateLeaveday();
|
||||||
|
await fetchLeaveday(
|
||||||
|
employeeClass.value,
|
||||||
|
typeReport.value == 3 || typeReport.value == 4
|
||||||
|
? leaveType.value
|
||||||
|
: yearType.value,
|
||||||
|
dateStart.value,
|
||||||
|
dateEnd.value
|
||||||
|
);
|
||||||
|
await genReportXLSX(detailReport.value, `${reportName()}`);
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchDataTree();
|
fetchDataTree();
|
||||||
});
|
});
|
||||||
|
|
@ -512,7 +526,11 @@ onMounted(() => {
|
||||||
round
|
round
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="download"
|
icon="download"
|
||||||
v-if="checkPermission($route)?.attrIsGet && typeReport !== 3"
|
v-if="
|
||||||
|
checkPermission($route)?.attrIsGet &&
|
||||||
|
typeReport !== 3 &&
|
||||||
|
typeReport !== 4
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<q-menu>
|
<q-menu>
|
||||||
<q-list style="min-width: 150px">
|
<q-list style="min-width: 150px">
|
||||||
|
|
@ -547,8 +565,11 @@ onMounted(() => {
|
||||||
round
|
round
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="download"
|
icon="download"
|
||||||
v-if="checkPermission($route)?.attrIsGet && typeReport == 3"
|
v-if="
|
||||||
@click="getReport()"
|
checkPermission($route)?.attrIsGet &&
|
||||||
|
(typeReport == 3 || typeReport == 4)
|
||||||
|
"
|
||||||
|
@click="typeReport == 3 ? getReport() : handleDownload()"
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -957,7 +978,7 @@ onMounted(() => {
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-actions align="right">
|
<q-card-actions align="right">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="typeReport !== 3"
|
v-if="typeReport !== 3 && typeReport !== 4"
|
||||||
dense
|
dense
|
||||||
class="q-px-md"
|
class="q-px-md"
|
||||||
label="ค้นหา"
|
label="ค้นหา"
|
||||||
|
|
@ -976,7 +997,7 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12 col-xs-12 flex">
|
<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12 col-xs-12 flex">
|
||||||
<q-splitter
|
<q-splitter
|
||||||
v-if="typeReport !== 3"
|
v-if="typeReport !== 3 && typeReport !== 4"
|
||||||
disable
|
disable
|
||||||
v-model="splitterModel"
|
v-model="splitterModel"
|
||||||
horizontal
|
horizontal
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue