feat(order): 订单导出新增"来源"列
This commit is contained in:
parent
7b0004a7e3
commit
ebaf5d0051
@ -34,6 +34,7 @@ const ORDER_EXPORT_COLUMNS = Object.freeze([
|
||||
{ header: '波次序号', key: 'wave_index', width: 12 },
|
||||
{ header: '货主', key: 'store_id', width: 20 },
|
||||
{ header: '平台', key: 'sys_platform_name', width: 16 },
|
||||
{ header: '来源', key: 'create_channel', width: 12 },
|
||||
{ header: '店铺昵称', key: 'shop_nick', width: 20 },
|
||||
{ header: '收件人', key: 'receiver_name', width: 16 },
|
||||
{ header: '收件人电话', key: 'receiver_mobile', width: 18 },
|
||||
@ -81,6 +82,7 @@ const ORDER_EXPORT_ITEM_COLUMNS = Object.freeze([
|
||||
{ header: '波次序号', key: 'wave_index', width: 12 },
|
||||
{ header: '货主', key: 'store_id', width: 20 },
|
||||
{ header: '平台', key: 'sys_platform_name', width: 16 },
|
||||
{ header: '来源', key: 'create_channel', width: 12 },
|
||||
{ header: '店铺昵称', key: 'shop_nick', width: 20 },
|
||||
{ header: '收件人', key: 'receiver_name', width: 16 },
|
||||
{ header: '收件人电话', key: 'receiver_mobile', width: 18 },
|
||||
@ -281,6 +283,8 @@ class OrderExportService extends OrderBaseService {
|
||||
|
||||
/**
|
||||
* 校验并规范导出表头字段入参(中文表头数组)。
|
||||
* 白名单基于 ORDER_EXPORT_ALL_COLUMN_HEADERS(两模式列头并集),
|
||||
* 新增列(如“来源”)在列配置中登记后即自动可用。
|
||||
* 不传/空数组返回空数组(表示输出全部列);存在非法表头时抛错。
|
||||
* @param {Array<string>|*} rawColumns 原始入参。
|
||||
* @return {Array<string>} 去重后的表头数组。
|
||||
@ -452,6 +456,7 @@ class OrderExportService extends OrderBaseService {
|
||||
wave_index: this.normalizeExportCellValue(safeOrderRow.wave_index ?? 0),
|
||||
store_id: this.normalizeExportCellValue(storeRemark || safeOrderRow.store_name || safeOrderRow.store_id),
|
||||
sys_platform_name: this.normalizeExportCellValue(safeOrderRow.sys_platform_name),
|
||||
create_channel: this.formatCreateChannelLabel(String(safeOrderRow.create_channel || '')),
|
||||
shop_nick: this.normalizeExportCellValue(safeOrderRow.shop_nick),
|
||||
receiver_name: this.normalizeExportCellValue(safeOrderRow.name || ''),
|
||||
receiver_mobile: this.normalizeExportCellValue(safeOrderRow.mobile || safeOrderRow.tel || ''),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user