mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 06:29:20 +08:00
fix: 修复店铺订单列表请求参数问题
This commit is contained in:
@@ -498,6 +498,10 @@ const orderGridOptions: VxeGridProps<any> = {
|
||||
proxyConfig: {
|
||||
ajax: {
|
||||
query: async ({ page }) => {
|
||||
// 如果没有店铺ID,直接返回空
|
||||
if (!shopId.value) {
|
||||
return { items: [], total: 0 };
|
||||
}
|
||||
try {
|
||||
orderLoading.value = true;
|
||||
const params: PageQueryDTO<OrderDTO.Filters> = {
|
||||
@@ -507,8 +511,6 @@ const orderGridOptions: VxeGridProps<any> = {
|
||||
shopId: shopId.value,
|
||||
platformOrderNo: orderSearchForm.value.platformOrderNo || undefined,
|
||||
statusId: orderSearchForm.value.statusId,
|
||||
startOrderTime: dateRange.value[0].format('YYYY-MM-DD'),
|
||||
endOrderTime: dateRange.value[1].format('YYYY-MM-DD'),
|
||||
},
|
||||
};
|
||||
// 添加排序参数
|
||||
@@ -525,9 +527,9 @@ const orderGridOptions: VxeGridProps<any> = {
|
||||
items: data.records,
|
||||
total: data.total,
|
||||
};
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
console.error('获取订单列表失败:', error);
|
||||
message.error('获取订单列表失败');
|
||||
message.error('获取订单列表失败: ' + (error?.message || error?.response?.data?.message || '未知错误'));
|
||||
return {
|
||||
items: [],
|
||||
total: 0,
|
||||
|
||||
Reference in New Issue
Block a user