front/src/views/order/orderColumnLabelsZh.ts
zzh f77c478981
Some checks failed
Build and Deploy Front / deploy (push) Failing after 8s
feat: 大包/主单管理打印面单,并优化价格表公式下拉
管理页支持选模板批量打印;标签设计增加大包/主单类型;价格表计算公式改为轻量选项菜单。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-07 17:56:13 +08:00

164 lines
5.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 运单/订单列表列中文名(表头 + 字段配置兜底)。
* 优先保证中文展示,避免出现 maxTimeliness 等英文字段名。
*/
export const ORDER_COLUMN_LABEL_ZH: Record<string, string> = {
// 常用别名
customerName: '客户名称',
customerCode: '客户编码',
waybillNo: '运单号',
customerOrderNo: '客户单号',
trackingNo: '跟踪号',
downstreamServiceNo: '服务商单号',
shippingMethod: '销售产品',
serviceChannel: '服务渠道',
consignee: '收件人',
consigneePhone: '收件电话',
consigneeCity: '收件城市',
consigneeAddress: '收件地址',
consigneePostcode: '收件邮编',
consigneeState: '收件省州',
ioss: 'IOSS',
eori: 'EORI',
// OrderOutput 标量
id: '订单ID',
clientNo: '客户单号',
trackNo: '跟踪号',
serviceNo: '运单号',
shipBagNo: '大包号',
shipMasterNo: '内部主单号',
productCode: '产品编码',
productName: '销售产品',
maxTimeliness: '最大时效(天)',
channelCode: '渠道编码',
channelName: '服务渠道',
downstreamSupplierName: '服务商名称',
downstreamSupplierCode: '服务商编码',
downstreamAppKey: '下游AppKey',
downstreamAppId: '下游AppId',
channelForecastCode: '渠道预报编码',
consigneeCountry: '收件国家',
consigneeCountryName: '收件国家名称',
cargoAttribute: '货物属性',
warehouseId: '仓库ID',
warehouse: '仓库',
customerId: '客户ID',
orderSource: '订单来源',
pickupTime: '期望揽收时间',
carrierWaybillNo: '国内快递单号',
pickupNo: '揽收单号',
inboundMethod: '到仓方式',
fulfillmentType: '履约类型',
fulfillProgress: '代发进度',
stockBindStatus: '绑定状态',
domesticTrackingNos: '国内快递单号',
stockBindQtyTotal: '绑定件数',
stockBindLineCount: '绑定行数',
primaryBinCode: '主库位',
primarySkuCodes: '绑定SKU',
fulfillmentSource: '代发来源',
customerSenderAddressId: '发件地址簿ID',
requestId: '请求标识',
exportCustomsMode: '出口报关方式',
exportQualificationId: '出口资质ID',
predeclareFailReason: '预报失败原因',
allocationPendingReason: '待排货原因',
allocationScheme: '排货方案',
hasAllocationTrace: '有排货快照',
declaredCurrency: '申报币种',
declaredSum: '申报总金额',
quantity: '包裹数量',
isCod: '是否COD',
codCurrency: 'COD币种',
codSum: 'COD金额',
orderStatus: '订单状态',
status: '状态码',
handleStatus: '处理状态码',
handleStatusName: '处理状态',
issueType: '问题类型码',
issueTypeName: '问题类型',
issueTitle: '问题标题',
issueContent: '问题内容',
issueTemplateId: '问题模板ID',
issueRemark: '问题备注',
issueTime: '问题时间',
claimType: '理赔类型码',
claimTypeName: '理赔类型',
claimAmount: '理赔金额',
claimCurrency: '理赔币种',
claimReason: '理赔原因',
claimTime: '理赔时间',
previousOrderStatus: '原订单状态',
receiveTime: '收货时间',
shipTime: '发货时间',
payTime: '支付时间',
isPaid: '是否已支付',
signTime: '签收时间',
isIntercept: '是否拦截',
isRemote: '是否偏远',
hasInsurance: '是否投保',
forecastReceivableAmount: '预报应收',
forecastPayableAmount: '预报应付',
salesProductRulesVersion: '规则版本',
salesProductPriceVersion: '价格版本',
createTime: '创建时间',
createBy: '创建人',
updateTime: '更新时间',
updateBy: '更新人',
chargeableWeight: '计费重',
receivableAmount: '应收金额',
inboundTime: '入库时间',
outboundTime: '出库时间',
pickupOrderId: '揽收单ID',
// 寄件人展平
senderName: '寄件人',
senderCompany: '寄件公司',
senderPhone: '寄件手机',
senderTelePhone: '寄件电话',
senderEmail: '寄件邮箱',
senderCountryCode: '寄件国家代码',
senderProvince: '寄件省州',
senderCity: '寄件城市',
senderZipCode: '寄件邮编',
senderStreetAddress1: '寄件地址1',
senderStreetAddress2: '寄件地址2',
senderStreetAddress3: '寄件地址3',
senderHouseNumber: '寄件门牌号',
// 收件人展平
receiverRecipientsName: '收件人',
receiverCompanyName: '收件公司',
receiverPhone: '收件手机',
receiverTelePhone: '收件电话',
receiverEmail: '收件邮箱',
receiverCountryCode: '收件国家代码',
receiverProvince: '收件省州',
receiverCity: '收件城市',
receiverStreetNumber: '收件门牌号',
receiverStreetAddress1: '收件地址1',
receiverStreetAddress2: '收件地址2',
receiverStreetAddress3: '收件地址3',
receiverZipCode: '收件邮编',
receiverTaxType: '税号类型',
receiverTaxNo: '税号',
receiverCertificateType: '证件类型',
receiverCertificateNo: '证件号码',
receiverEori: '收件EORI',
receiverVat: '收件VAT',
};
/** 按字段 key 取中文列名;未知字段做可读化,避免直接甩 camelCase。 */
export function getOrderColumnLabelZh(key: string): string {
const k = String(key || '').trim();
if (!k) return '';
if (ORDER_COLUMN_LABEL_ZH[k]) return ORDER_COLUMN_LABEL_ZH[k];
// fooBarBaz → Foo Bar Baz,再包一层中文前缀,避免纯英文 key 当表头
const spaced = k
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
.replace(/[_-]+/g, ' ')
.trim();
return spaced || k;
}