This commit is contained in:
yin 2026-10-08 18:01:10 +08:00
parent bb80fd7130
commit 0cea3df5d5
2 changed files with 23 additions and 6 deletions

View File

@ -167,10 +167,15 @@ export type BindExpressPackageMaterialParams = {
export type OrderExportMode = 'waybill' | 'item'
export type OrderExportParams = {
/**
* 导出表类型,枚举:current / history / dispatch / outsourced;
* 兼容订单模块别名(order / revieworder / reviewOrder / pendingorder 等);支持 table_type 与 tableType 两种写法。
*/
table_type?: string
tableType?: string
module?: string
module_name?: string
/** 查询条件,语义与 order.list 的 where 一致;⚠️ 禁止传入 warehouse_id / warehouseId(服务端从登录态注入,前端须 sanitize) */
where?: Record<string, any>
sort?: OrderListParams['sort']
/** 导出模式,默认 waybill */
@ -179,6 +184,18 @@ export type OrderExportParams = {
/**
* 导出表头字段白名单(中文表头字符串数组,如 ["系统订单号","外部订单号"]);不传或空数组时输出全部列。
* 支持 export_columns 与 exportColumns 两种写法。
*
* 文档枚举共 52 个(校验不区分导出模式,选中当前模式不存在的表头时该列自动忽略;传入非法表头会报错并列出非法值):
* 系统订单号、外部订单号、平台单号、订单ID、订单号、外部单号、订单状态、抓取波次号、波次号、波次序号、
* 货主、平台、来源、店铺昵称、收件人、收件人电话、省、市、区、镇、详细地址、商品明细、仓库商品名称、
* 商品条码、商品图片、数量、物流公司、运单号、业务类型、运单接口、包材ID、包材编码、包材名称、分配时间、
* 订单商品总类数、订单商品总数、商品重量、称重重量(g)、订单金额、实收金额、创建时间、支付时间、发货时间、
* 出库状态、复核状态、复核完成状态、配货状态、打包状态、备注、买家留言、卖家留言、归档时间。
* 其中仅 waybill 输出:系统订单号、外部订单号、平台单号、抓取波次号、商品明细;
* 仅 item 输出:订单ID、订单号、外部单号、波次号、仓库商品名称、商品条码、商品图片、数量。
* ⚠️ 白名单不含「领料状态」「确认打印状态」(列表页有该状态列,但导出不支持,传入会报错)。
* ⚠️ 「复核时间」(recheck_time) 已由后端支持(2026-10-08 确认),文档枚举暂未收录,保留在可选列中。
* 前端字段清单见 views/order/orderManagement/config/order-common-config.ts 的 ORDER_EXPORT_ALL_COLUMNS。
*/
export_columns?: string[]
exportColumns?: string[]

View File

@ -364,11 +364,13 @@ export type OrderExportColumnOption = {
}
/**
* order.export 全部可导出字段(共 55 个,对齐接口枚举):
* order.export 全部可导出字段(共 53 个 = 接口文档枚举 52 个 + 「复核时间」):
* 仅 waybill 模式输出:系统订单号、外部订单号、平台单号、抓取波次号、商品明细;
* 仅 item 模式输出:订单ID、订单号、外部单号、波次号、仓库商品名称、商品条码、商品图片、数量;
* 其余为两种模式通用。
* 流程状态分组含「领料状态」(claim_status) /「确认打印状态」(confirm_print_status),中文表头须与后端 order.export 枚举一致。
* 其余为两种模式通用(选了当前模式不存在的表头时后端会自动忽略该列)。
* ⚠️ 接口白名单**不含**「领料状态」「确认打印状态」(列表页仍有这两列,但导出不支持,传入非法表头会直接报错)。
* ⚠️ 「复核时间」(recheck_time) 刚由后端支持(2026-10-08),文档 52 项的枚举暂未收录,勿以为多余而删除。
* 「来源」列(字段 create_channel)位于「平台」列之后,waybill/item 两种模式均输出。
*/
export const ORDER_EXPORT_ALL_COLUMNS: OrderExportColumnOption[] = [
// ===== 订单信息 =====
@ -386,7 +388,6 @@ export const ORDER_EXPORT_ALL_COLUMNS: OrderExportColumnOption[] = [
{ label: '平台', modes: ['waybill', 'item'], group: '订单信息' },
{ label: '来源', modes: ['waybill', 'item'], group: '订单信息' },
{ label: '店铺昵称', modes: ['waybill', 'item'], group: '订单信息' },
{ label: '业务类型', modes: ['waybill', 'item'], group: '订单信息' },
{ label: '订单金额', modes: ['waybill', 'item'], group: '订单信息' },
{ label: '实收金额', modes: ['waybill', 'item'], group: '订单信息' },
// ===== 收货信息 =====
@ -410,6 +411,7 @@ export const ORDER_EXPORT_ALL_COLUMNS: OrderExportColumnOption[] = [
// ===== 物流信息 =====
{ label: '物流公司', modes: ['waybill', 'item'], group: '物流信息' },
{ label: '运单号', modes: ['waybill', 'item'], group: '物流信息' },
{ label: '业务类型', modes: ['waybill', 'item'], group: '物流信息' },
{ label: '运单接口', modes: ['waybill', 'item'], group: '物流信息' },
{ label: '分配时间', modes: ['waybill', 'item'], group: '物流信息' },
// ===== 包材信息 =====
@ -422,8 +424,6 @@ export const ORDER_EXPORT_ALL_COLUMNS: OrderExportColumnOption[] = [
{ label: '复核完成状态', modes: ['waybill', 'item'], group: '流程状态' },
{ label: '配货状态', modes: ['waybill', 'item'], group: '流程状态' },
{ label: '打包状态', modes: ['waybill', 'item'], group: '流程状态' },
{ label: '领料状态', modes: ['waybill', 'item'], group: '流程状态' },
{ label: '确认打印状态', modes: ['waybill', 'item'], group: '流程状态' },
// ===== 时间信息 =====
{ label: '创建时间', modes: ['waybill', 'item'], group: '时间信息' },
{ label: '支付时间', modes: ['waybill', 'item'], group: '时间信息' },