diff --git a/app/service/systems/order_export.js b/app/service/systems/order_export.js index 4ecde2f..b036e18 100644 --- a/app/service/systems/order_export.js +++ b/app/service/systems/order_export.js @@ -52,8 +52,8 @@ const ORDER_EXPORT_COLUMNS = Object.freeze([ { header: '包材编码', key: 'package_material_code', width: 20 }, { header: '包材名称', key: 'package_material_name', width: 20 }, { header: '分配时间', key: 'waybill_allocated_at', width: 20 }, - { header: '商品种数', key: 'items_count', width: 12 }, - { header: '商品件数', key: 'items_total', width: 12 }, + { header: '订单商品总类数', key: 'items_count', width: 16 }, + { header: '订单商品总数', key: 'items_total', width: 16 }, { header: '商品重量', key: 'items_weight', width: 12 }, { header: '称重重量(g)', key: 'weighing_weight', width: 14 }, { header: '订单金额', key: 'total_amount', width: 14 }, @@ -103,8 +103,8 @@ const ORDER_EXPORT_ITEM_COLUMNS = Object.freeze([ { header: '包材编码', key: 'package_material_code', width: 20 }, { header: '包材名称', key: 'package_material_name', width: 20 }, { header: '分配时间', key: 'waybill_allocated_at', width: 20 }, - { header: '商品种数', key: 'items_count', width: 12 }, - { header: '商品件数', key: 'items_total', width: 12 }, + { header: '订单商品总类数', key: 'items_count', width: 16 }, + { header: '订单商品总数', key: 'items_total', width: 16 }, { header: '商品重量', key: 'items_weight', width: 12 }, { header: '称重重量(g)', key: 'weighing_weight', width: 14 }, { header: '订单金额', key: 'total_amount', width: 14 }, @@ -379,7 +379,7 @@ class OrderExportService extends OrderBaseService { /** * 映射订单导出数据行。 - * - waybill 模式:按运单号展开,每个运单一组;商品种数/件数仅主单号行体现,子单号行置 0。 + * - waybill 模式:按运单号展开,每个运单一组;商品总类数/商品总数仅主单号行体现,子单号行置 0。 * - item 模式:按商品明细展开,每个商品一行;运单信息汇总填充。 * @param {Object} orderRow 订单行。 * @param {Object} [context] 导出上下文,包含批量查询的辅助数据。 @@ -562,7 +562,7 @@ class OrderExportService extends OrderBaseService { return { ...commonFields, items_detail: this.normalizeExportCellValue(itemsDetail), - // 商品种数/件数为订单级数据,仅主单号行体现;子单号行置 0,避免与主单号重复 + // 商品总类数/商品总数为订单级数据,仅主单号行体现;子单号行置 0,避免与主单号重复 items_count: isMainWaybill ? commonFields.items_count : 0, items_total: isMainWaybill ? commonFields.items_total : 0, waybill_code: exp.waybill_code || '', diff --git a/app/service/systems/report/queries/interceptOrder.js b/app/service/systems/report/queries/interceptOrder.js index ff162ae..1ba77be 100644 --- a/app/service/systems/report/queries/interceptOrder.js +++ b/app/service/systems/report/queries/interceptOrder.js @@ -47,8 +47,8 @@ const FIELDS = Object.freeze([ { key: 'package_material_code', label: '包材编码', type: 'string' }, { key: 'package_material_name', label: '包材名称', type: 'string' }, { key: 'waybill_allocated_at', label: '分配时间', type: 'string' }, - { key: 'items_count', label: '商品种数', type: 'string' }, - { key: 'items_total', label: '商品件数', type: 'string' }, + { key: 'items_count', label: '订单商品总类数', type: 'string' }, + { key: 'items_total', label: '订单商品总数', type: 'string' }, { key: 'items_weight', label: '商品重量', type: 'string' }, { key: 'weighing_weight', label: '称重重量(g)', type: 'string' }, { key: 'total_amount', label: '订单金额', type: 'string' }, diff --git a/docs/report-config-guide.md b/docs/report-config-guide.md index bb986f8..94c551b 100644 --- a/docs/report-config-guide.md +++ b/docs/report-config-guide.md @@ -172,8 +172,8 @@ report.generate(method 层,异步任务,入参 report_id) | `package_material_code` | 包材编码 | | `package_material_name` | 包材名称 | | `waybill_allocated_at` | 分配时间 | -| `items_count` | 商品种数 | -| `items_total` | 商品件数 | +| `items_count` | 订单商品总类数 | +| `items_total` | 订单商品总数 | | `items_weight` | 商品重量 | | `weighing_weight` | 称重重量(g) | | `total_amount` | 订单金额 | diff --git a/methods/system.json b/methods/system.json index efb737c..364dec5 100644 --- a/methods/system.json +++ b/methods/system.json @@ -3309,7 +3309,7 @@ "type": "array", "required": false, "source": "body", - "description": "导出表头字段白名单(中文表头字符串数组,如 [\"系统订单号\",\"外部订单号\"]);不传或空数组时输出全部列。枚举(共 52 个,校验不区分导出模式):系统订单号、外部订单号、平台单号、订单ID、订单号、外部单号、订单状态、抓取波次号、波次号、波次序号、货主、平台、来源、店铺昵称、收件人、收件人电话、省、市、区、镇、详细地址、商品明细、仓库商品名称、商品条码、商品图片、数量、物流公司、运单号、业务类型、运单接口、包材ID、包材编码、包材名称、分配时间、商品种数、商品件数、商品重量、称重重量(g)、订单金额、实收金额、创建时间、支付时间、发货时间、出库状态、复核状态、复核完成状态、配货状态、打包状态、备注、买家留言、卖家留言、归档时间。其中仅 waybill 模式输出:系统订单号、外部订单号、平台单号、抓取波次号、商品明细;仅 item 模式输出:订单ID、订单号、外部单号、波次号、仓库商品名称、商品条码、商品图片、数量;其余为两种模式通用(选了当前模式不存在的表头时该列自动忽略)。来源列(字段 create_channel,中文取值:手工单/接口/奇门/出库转单)位于平台列之后,waybill/item 两种模式均输出。传入非法表头会报错(错误信息列出非法值);支持 export_columns 与 exportColumns 两种写法" + "description": "导出表头字段白名单(中文表头字符串数组,如 [\"系统订单号\",\"外部订单号\"]);不传或空数组时输出全部列。枚举(共 52 个,校验不区分导出模式):系统订单号、外部订单号、平台单号、订单ID、订单号、外部单号、订单状态、抓取波次号、波次号、波次序号、货主、平台、来源、店铺昵称、收件人、收件人电话、省、市、区、镇、详细地址、商品明细、仓库商品名称、商品条码、商品图片、数量、物流公司、运单号、业务类型、运单接口、包材ID、包材编码、包材名称、分配时间、订单商品总类数、订单商品总数、商品重量、称重重量(g)、订单金额、实收金额、创建时间、支付时间、发货时间、出库状态、复核状态、复核完成状态、配货状态、打包状态、备注、买家留言、卖家留言、归档时间。其中仅 waybill 模式输出:系统订单号、外部订单号、平台单号、抓取波次号、商品明细;仅 item 模式输出:订单ID、订单号、外部单号、波次号、仓库商品名称、商品条码、商品图片、数量;其余为两种模式通用(选了当前模式不存在的表头时该列自动忽略)。来源列(字段 create_channel,中文取值:手工单/接口/奇门/出库转单)位于平台列之后,waybill/item 两种模式均输出。传入非法表头会报错(错误信息列出非法值);支持 export_columns 与 exportColumns 两种写法" } ], "response": [