refactor: export product
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
This commit is contained in:
parent
d53eb15a88
commit
d2acd6ba4c
3 changed files with 82 additions and 3 deletions
|
|
@ -102,6 +102,8 @@ const {
|
|||
deleteWork,
|
||||
|
||||
importProduct,
|
||||
|
||||
productExport,
|
||||
} = productServiceStore;
|
||||
|
||||
const { workNameItems } = storeToRefs(productServiceStore);
|
||||
|
|
@ -1896,6 +1898,25 @@ async function submitWorkName(
|
|||
else await editWork(workId, data);
|
||||
}
|
||||
|
||||
async function triggerExport() {
|
||||
productExport({
|
||||
pageSize: 100_000,
|
||||
productGroupId: currentIdGroup.value,
|
||||
query: !!inputSearchProductAndService.value
|
||||
? inputSearchProductAndService.value
|
||||
: undefined,
|
||||
status:
|
||||
currentStatus.value === 'INACTIVE'
|
||||
? 'INACTIVE'
|
||||
: currentStatus.value === 'ACTIVE'
|
||||
? 'ACTIVE'
|
||||
: undefined,
|
||||
|
||||
startDate: new Date(searchDate.value[0]),
|
||||
endDate: new Date(searchDate.value[1]),
|
||||
});
|
||||
}
|
||||
|
||||
watch(
|
||||
() => formService.value.attributes.workflowId,
|
||||
async (a, b) => {
|
||||
|
|
@ -2229,7 +2250,6 @@ watch(
|
|||
</AdvanceSearch>
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<div class="row col-md-6" style="white-space: nowrap">
|
||||
<q-select
|
||||
v-show="$q.screen.gt.sm"
|
||||
|
|
@ -2780,6 +2800,13 @@ watch(
|
|||
}
|
||||
"
|
||||
/>
|
||||
|
||||
<SaveButton
|
||||
icon-only
|
||||
:icon="'material-symbols:download'"
|
||||
color="var(--info-bg)"
|
||||
@click.stop="triggerExport()"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="row col-md-6" style="white-space: nowrap">
|
||||
|
|
@ -3632,7 +3659,7 @@ watch(
|
|||
:delete-data="() => deleteGroupById()"
|
||||
:close="
|
||||
() => {
|
||||
(drawerInfo = false), (currentIdGroupType = '');
|
||||
((drawerInfo = false), (currentIdGroupType = ''));
|
||||
}
|
||||
"
|
||||
hide-action
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue