From f313219e333dd2956fd84af39213d07337eb155a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=9F=91=E8=9E=82?= Date: Fri, 27 Mar 2026 12:55:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BA=97=E9=93=BA=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=96=B0=E5=A2=9E=E6=9B=B4=E5=A4=9A=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增筛选条件: - 订单状态(支持下拉选择) - 实收金额范围(最小/最大) - 确认状态(已确认/未确认) - 折叠行数调整为2行 --- .../views/ecommerce/shop/overview/index.vue | 70 ++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/shop/overview/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/shop/overview/index.vue index 72b88a2f..eeca10c3 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/shop/overview/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/shop/overview/index.vue @@ -18,6 +18,8 @@ import dayjs from 'dayjs'; import { useVbenVxeGrid } from '#/adapter/vxe-table'; import { getShopOverviewStatisticsApi } from '#/api/ecommerce/shop'; import { getOrderPageApi } from '#/api/ecommerce/order'; +import { getAllOrderStatusListApi } from '#/api/ecommerce/order-status'; +import type { OrderStatusVO } from '#/api/ecommerce/order-status/types'; import { exportByPost } from '#/utils/export'; defineOptions({ name: 'ShopOverview' }); @@ -34,6 +36,9 @@ const shopId = computed(() => { // 响应式数据 const loading = ref(false); const orderLoading = ref(false); + +// 订单状态选项 +const orderStatusOptions = ref<{ label: string; value: number }[]>([]); const exportLoading = ref(false); const overviewData = ref(null); @@ -414,6 +419,9 @@ const orderSortOrderOptions = [ const orderSearchForm = ref({ platformOrderNo: '', statusId: undefined as number | undefined, + minReceivedAmount: undefined as number | undefined, + maxReceivedAmount: undefined as number | undefined, + confirm: undefined as number | undefined, sortField: 'orderTime' as string | undefined, sortOrder: 'desc' as string | undefined, }); @@ -511,6 +519,9 @@ const orderGridOptions: VxeGridProps = { shopId: shopId.value, platformOrderNo: orderSearchForm.value.platformOrderNo || undefined, statusId: orderSearchForm.value.statusId, + minReceivedAmount: orderSearchForm.value.minReceivedAmount, + maxReceivedAmount: orderSearchForm.value.maxReceivedAmount, + confirm: orderSearchForm.value.confirm, }, }; // 添加排序参数 @@ -553,6 +564,49 @@ const orderFormOptions = computed(() => ({ fieldName: 'platformOrderNo', label: '订单号', }, + { + component: 'Select', + componentProps: { + placeholder: '请选择订单状态', + options: orderStatusOptions.value, + allowClear: true, + }, + fieldName: 'statusId', + label: '订单状态', + }, + { + component: 'InputNumber', + componentProps: { + placeholder: '最小金额', + min: 0, + style: { width: '100%' }, + }, + fieldName: 'minReceivedAmount', + label: '实收金额(起)', + }, + { + component: 'InputNumber', + componentProps: { + placeholder: '最大金额', + min: 0, + style: { width: '100%' }, + }, + fieldName: 'maxReceivedAmount', + label: '实收金额(止)', + }, + { + component: 'Select', + componentProps: { + placeholder: '请选择确认状态', + options: [ + { label: '已确认', value: 1 }, + { label: '未确认', value: 0 }, + ], + allowClear: true, + }, + fieldName: 'confirm', + label: '确认状态', + }, { component: 'Select', componentProps: { @@ -576,7 +630,7 @@ const orderFormOptions = computed(() => ({ ], showDefaultActions: true, collapsed: true, - collapsedRows: 1, + collapsedRows: 2, })); // 创建订单列表 Grid 实例 @@ -593,9 +647,23 @@ function refreshOrderGrid() { } } +// 获取订单状态选项 +async function fetchOrderStatusOptions() { + try { + const data = await getAllOrderStatusListApi(); + orderStatusOptions.value = data.map((status: OrderStatusVO.Info) => ({ + label: status.statusName, + value: status.id, + })); + } catch (error) { + console.error('获取订单状态列表失败:', error); + } +} + // 初始化 onMounted(async () => { await refreshOverviewByCurrentParams(true); + await fetchOrderStatusOptions(); refreshOrderGrid(); });