feat: order-export,generation,status
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m45s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m45s
This commit is contained in:
@@ -22,6 +22,9 @@
|
||||
<ElButton @click="showCreateDialog" v-permission="'orders:add'">{{
|
||||
'创建订单'
|
||||
}}</ElButton>
|
||||
<ElButton v-if="hasAuth('orders:export')" @click="exportDialogVisible = true">{{
|
||||
'导出'
|
||||
}}</ElButton>
|
||||
</template>
|
||||
</ArtTableHeader>
|
||||
|
||||
@@ -152,17 +155,17 @@
|
||||
</ElOption>
|
||||
</ElSelect>
|
||||
<template v-if="noSeriesId">
|
||||
<div style=" margin-top: 4px; font-size: 12px;color: var(--el-text-color-warning)">
|
||||
<div style="margin-top: 4px; font-size: 12px; color: var(--el-text-color-warning)">
|
||||
该设备未关联套餐系列,无法购买套餐
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="packagesEmptyWithSeriesId">
|
||||
<div style=" margin-top: 4px; font-size: 12px;color: var(--el-text-color-info)">
|
||||
<div style="margin-top: 4px; font-size: 12px; color: var(--el-text-color-info)">
|
||||
该系列暂无可用套餐
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="selectedPackageIsGift">
|
||||
<div style=" margin-top: 4px; font-size: 12px;color: var(--el-color-warning)">
|
||||
<div style="margin-top: 4px; font-size: 12px; color: var(--el-color-warning)">
|
||||
提示: 赠送套餐只能使用线下支付方式,且必须上传支付凭证
|
||||
</div>
|
||||
</template>
|
||||
@@ -237,13 +240,22 @@
|
||||
:file-key="paymentVoucherFileKey"
|
||||
@close="paymentVoucherFileKey = ''"
|
||||
/>
|
||||
|
||||
<!-- 导出任务对话框 -->
|
||||
<ExportTaskCreateDialog
|
||||
v-model="exportDialogVisible"
|
||||
scene="order"
|
||||
:query="exportQuery"
|
||||
confirm-permission="orders:export"
|
||||
title="导出订单"
|
||||
/>
|
||||
</ElCard>
|
||||
</div>
|
||||
</ArtTableFullScreen>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { h, nextTick } from 'vue'
|
||||
import { computed, h, nextTick } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import {
|
||||
OrderService,
|
||||
@@ -277,6 +289,7 @@
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
import { RoutesAlias } from '@/router/routesAlias'
|
||||
import PaymentVoucherDialog from '@/components/business/PaymentVoucherDialog.vue'
|
||||
import ExportTaskCreateDialog from '@/components/business/ExportTaskCreateDialog.vue'
|
||||
|
||||
defineOptions({ name: 'OrderList' })
|
||||
|
||||
@@ -293,6 +306,7 @@
|
||||
const voucherUploading = ref(false)
|
||||
const tableRef = ref()
|
||||
const createDialogVisible = ref(false)
|
||||
const exportDialogVisible = ref(false)
|
||||
const paymentVoucherFileKey = ref('')
|
||||
let activeVoucherUploadId = 0
|
||||
|
||||
@@ -1130,6 +1144,31 @@
|
||||
getTableData()
|
||||
}
|
||||
|
||||
// 导出查询参数
|
||||
const exportQuery = computed(() => {
|
||||
const query: Record<string, unknown> = {
|
||||
order_no: searchForm.order_no || undefined,
|
||||
buyer_phone: searchForm.buyer_phone || undefined,
|
||||
payment_status: searchForm.payment_status,
|
||||
payment_method: searchForm.payment_method,
|
||||
order_type: searchForm.order_type,
|
||||
purchase_role: searchForm.purchase_role,
|
||||
identifier: searchForm.identifier || undefined,
|
||||
is_expired: searchForm.is_expired === undefined ? undefined : Boolean(searchForm.is_expired),
|
||||
seller_shop_id: searchForm.seller_shop_id,
|
||||
start_time: searchForm.start_time || undefined,
|
||||
end_time: searchForm.end_time || undefined
|
||||
}
|
||||
|
||||
Object.keys(query).forEach((key) => {
|
||||
if (query[key] === undefined || query[key] === null || query[key] === '') {
|
||||
delete query[key]
|
||||
}
|
||||
})
|
||||
|
||||
return query
|
||||
})
|
||||
|
||||
// 刷新表格
|
||||
const handleRefresh = () => {
|
||||
getTableData()
|
||||
|
||||
Reference in New Issue
Block a user