diff --git a/backend/app/utils/exportDefs.js b/backend/app/utils/exportDefs.js index e1ba7a2..ff91bcf 100644 --- a/backend/app/utils/exportDefs.js +++ b/backend/app/utils/exportDefs.js @@ -751,6 +751,19 @@ const EXPORT_TYPES = { { key: 'remark', label: '备注', type: 'text' }, { key: 'shop_id', label: '店铺', type: 'shop' }, { key: 'warehouse_id', label: '仓库', type: 'warehouse' }, + { + key: 'external_send_status', + label: '回传平台状态', + type: 'select', + options: [ + { label: '待同步外部', value: '0' }, + { label: '已同步外部', value: '1' }, + { label: '同步失败待重试', value: '2' }, + { label: '同步异常', value: '3' }, + ], + multiple: true, + placeholder: '配送视图用;配送异常=2,3', + }, { key: 'created_from', label: '创建时间起', type: 'date' }, { key: 'created_to', label: '创建时间止', type: 'date' }, { key: 'archived_from', label: '归档时间起', type: 'date' }, @@ -791,6 +804,11 @@ const EXPORT_TYPES = { // 电商平台(多选)与平台单号(多个精确匹配),与列表接口同口径 whereIn(wh, 't.source_platform_code', csvValues(f.platform_codes, 50).map(code => code.toUpperCase())); whereIn(wh, 't.oaid_order_source_code', csvValues(f.platform_order_nos, 200)); + // 外部发货同步状态(配送视图/配送异常视图用:0待同步 1已同步 2待重试 3异常,支持逗号多选) + const sendStatuses = csvValues(f.external_send_status, 10) + .map(value => Number(value)) + .filter(value => Number.isInteger(value)); + if (sendStatuses.length) whereIn(wh, 't.external_send_status', sendStatuses); if (String(f.exclude_unbound) === '1') { wh.raw( 'NOT EXISTS (SELECT 1 FROM order_status_items oi WHERE oi.order_id = t.id ' + diff --git a/frontend/src/views/Order/Status.vue b/frontend/src/views/Order/Status.vue index 2110106..2d052d8 100644 --- a/frontend/src/views/Order/Status.vue +++ b/frontend/src/views/Order/Status.vue @@ -1,7 +1,8 @@