namespace Oms.Application.Labeling; /// /// 设计器字段字典(与 PrintData camelCase 对齐)。 /// public static class LabelFieldDictionary { public static IReadOnlyList GetGroups() => [ new LabelFieldGroup { Code = "numbers", Title = "单号", Fields = [ Field("serviceNo", "运单号"), Field("clientNo", "客户单号"), Field("trackNo", "跟踪号"), Field("requestId", "请求号") ] }, new LabelFieldGroup { Code = "product", Title = "产品 / 渠道 / 仓库", Fields = [ Field("productCode", "产品编码"), Field("salesProductName", "销售产品"), Field("channelCode", "渠道编码"), Field("channelName", "渠道名称"), Field("warehouseName", "仓库"), Field("customerCode", "客户编码"), Field("customerName", "客户名称") ] }, new LabelFieldGroup { Code = "recipient", Title = "收件人", Fields = [ Field("recipientName", "收件人"), Field("recipientCompany", "收件公司"), Field("recipientPhone", "收件电话"), Field("recipientEmail", "收件邮箱"), Field("recipientZip", "邮编"), Field("recipientCountry", "国家代码"), Field("recipientCountryName", "国家名称"), Field("recipientProvince", "省/州"), Field("recipientCity", "城市"), Field("recipientStreet1", "街道1"), Field("recipientStreet2", "街道2"), Field("recipientStreet3", "街道3"), Field("recipientAddressFull", "完整地址"), Field("recipientTaxNo", "税号"), Field("vatNo", "VAT"), Field("eori", "EORI") ] }, new LabelFieldGroup { Code = "sender", Title = "发件人", Fields = [ Field("senderName", "发件人"), Field("senderCompany", "发件公司"), Field("senderPhone", "发件电话"), Field("senderEmail", "发件邮箱"), Field("senderZip", "发件邮编"), Field("senderProvince", "发件省/州"), Field("senderCity", "发件城市"), Field("senderStreet1", "发件街道1"), Field("senderAddressFull", "发件完整地址") ] }, new LabelFieldGroup { Code = "weight", Title = "重量尺寸", Fields = [ Field("actualWeight", "实重"), Field("volumetricWeight", "体积重"), Field("chargeableWeight", "计费重"), Field("length", "长"), Field("width", "宽"), Field("height", "高"), Field("weightUnit", "重量单位"), Field("dimUnit", "尺寸单位") ] }, new LabelFieldGroup { Code = "system", Title = "系统", Fields = [ Field("printTime", "打印时间"), Field("operatorName", "操作人") ] } ]; private static LabelFieldItem Field(string field, string title) => new() { Field = field, Title = title }; } public sealed class LabelFieldGroup { public string Code { get; init; } = string.Empty; public string Title { get; init; } = string.Empty; public List Fields { get; init; } = []; } public sealed class LabelFieldItem { public string Field { get; init; } = string.Empty; public string Title { get; init; } = string.Empty; }