新增:订单导出功能
This commit is contained in:
@@ -86,14 +86,11 @@
|
||||
/>
|
||||
<a-button @click="reset">重置</a-button>
|
||||
<a-button @click="setHasInvoice" :disabled="!selection?.length"
|
||||
>设置已开票</a-button
|
||||
>
|
||||
<!-- <a-button class="ele-btn-icon" :disabled="loading" @click="handleExport">-->
|
||||
<!-- <template #icon>-->
|
||||
<!-- <download-outlined />-->
|
||||
<!-- </template>-->
|
||||
<!-- <span>导出订单</span>-->
|
||||
<!-- </a-button>-->
|
||||
>设置已开票
|
||||
</a-button>
|
||||
<a-button class="ele-btn-icon" @click="handleExport">
|
||||
<span>导出订单</span>
|
||||
</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
|
||||
@@ -126,6 +123,7 @@
|
||||
(e: 'add'): void;
|
||||
(e: 'remove'): void;
|
||||
(e: 'advanced'): void;
|
||||
(e: 'export'): void;
|
||||
}>();
|
||||
|
||||
// 表单数据
|
||||
@@ -175,8 +173,21 @@
|
||||
search();
|
||||
};
|
||||
|
||||
const handleExport = () => {
|
||||
const [d1, d2] = dateRange.value ?? [];
|
||||
xlsFileName.value = `${d1}至${d2}`;
|
||||
where.forAdmin = true;
|
||||
where.limit = 5000;
|
||||
where.page = 1;
|
||||
where.timeStart = d1 ? dayjs(d1).valueOf() / 1000 : undefined;
|
||||
where.timeEnd = d2 ? dayjs(d2).valueOf() / 1000 : undefined;
|
||||
emit('export', {
|
||||
...where
|
||||
});
|
||||
};
|
||||
|
||||
// 导出
|
||||
const handleExport = async () => {
|
||||
const handleExport2 = async () => {
|
||||
loading.value = true;
|
||||
const array: (string | number)[][] = [
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user