แก้ไข รายงานเครื่องราช

This commit is contained in:
Thanit Konmek 2023-08-28 16:18:26 +07:00
parent aadb3927e2
commit 62f728f975
2 changed files with 14 additions and 2 deletions

View file

@ -81,13 +81,17 @@ const fecthlistRound = async () => {
});
};
const updateSelect = () => {
conditionDocument("show");
};
const conditionDocument = (type: string) => {
myForm.value?.validate().then(async (success: boolean) => {
if (success) {
if (type == "show") {
await downloadReport("pdf", false);
} else {
await downloadReport("pdf", false);
// await downloadReport("pdf", false);
await downloadReport(type, true);
}
}
@ -183,6 +187,7 @@ const downloadReport = async (
option-value="id"
option-label="name"
style="width: 150px"
@update:model-value="updateSelect"
/>
<q-select
class="q-pa-none"
@ -197,6 +202,7 @@ const downloadReport = async (
option-value="id"
option-label="name"
:rules="[(val) => !!val || 'กรุณาเลือกรอบ']"
@update:model-value="updateSelect"
/>
</q-form>
<!-- style="width: 200px" -->

View file

@ -85,13 +85,17 @@ const fecthlistRound = async () => {
});
};
const updateSelect = () => {
conditionDocument("show");
};
const conditionDocument = (type: string) => {
myForm.value?.validate().then(async (success: boolean) => {
if (success) {
if (type == "show") {
await downloadReport("pdf", false);
} else {
await downloadReport("pdf", false);
// await downloadReport("pdf", false);
await downloadReport(type, true);
}
}
@ -177,6 +181,7 @@ const downloadReport = async (
option-value="id"
option-label="name"
style="width: 150px"
@update:model-value="updateSelect"
/> -->
<q-select
class="q-pa-none"
@ -191,6 +196,7 @@ const downloadReport = async (
option-value="id"
option-label="name"
:rules="[(val) => !!val || 'กรุณาเลือกรอบ']"
@update:model-value="updateSelect"
/>
</q-form>
<!-- style="width: 200px" -->