update order items

This commit is contained in:
2026-03-20 09:09:41 +08:00
parent 419778a53b
commit c56698f843
4 changed files with 167 additions and 106 deletions
+3 -24
View File
@@ -1,29 +1,8 @@
import { api } from '@/utils/request'
import type { PaginatedData } from '@/types/api'
import type { PaginatedData, OrderItemFilters } from '@/types/api'
import type { OrderItemRecord } from '@/stores/order'
/** 父订单摘要(详情接口嵌套返回) */
export interface ParentOrderSummary {
id: number
platform_order_id: string
order_status_id: number
total_amount: string
total_paid: string
created_date: string | null
paid_date: string | null
}
/** 订单项详情(含父订单摘要) */
export interface OrderItemDetail extends OrderItemRecord {
parent_order: ParentOrderSummary
}
export interface OrderItemFilters {
platform_order_id: string
platform_product_id: string
product_sku: string
created_date_range: [string, string] | null
}
export type { OrderItemRecord }
/** 名称映射用的查找表 */
interface LookupItem {
@@ -32,7 +11,7 @@ interface LookupItem {
label?: string
}
export const useOrderItemStore = defineStore('order-item', () => {
export const useOrderItemStore = defineStore('orderItem', () => {
const orderItems = ref<OrderItemRecord[]>([])
const loading = ref(false)
const pagination = reactive({