diff --git a/src/Oms.Application/Dtos/Orders/OrderPriceCheckFormOptionsOutput.cs b/src/Oms.Application/Dtos/Orders/OrderPriceCheckFormOptionsOutput.cs
new file mode 100644
index 0000000..488a32d
--- /dev/null
+++ b/src/Oms.Application/Dtos/Orders/OrderPriceCheckFormOptionsOutput.cs
@@ -0,0 +1,49 @@
+namespace Oms.Application.Dtos.Orders;
+
+///
+/// 查价表单下拉选项(国家 / 发货仓 / 货物属性),可供访客匿名加载。
+///
+public class OrderPriceCheckFormOptionsOutput
+{
+ /// 目的国家列表。
+ public List Countries { get; set; } = [];
+
+ /// 发货仓列表(仅 id + 名称,不含地址电话)。
+ public List Warehouses { get; set; } = [];
+
+ /// 货物属性(字典 cargo_attribute)。
+ public List CargoAttributes { get; set; } = [];
+}
+
+/// 查价目的国家选项。
+public class OrderPriceCheckCountryOptionOutput
+{
+ /// ISO 二字码。
+ public string CountryCode { get; set; } = string.Empty;
+
+ /// 中文名。
+ public string ChineseName { get; set; } = string.Empty;
+
+ /// 英文名。
+ public string EnglishName { get; set; } = string.Empty;
+}
+
+/// 查价发货仓选项。
+public class OrderPriceCheckWarehouseOptionOutput
+{
+ /// 仓库主键。
+ public int Id { get; set; }
+
+ /// 仓库名称。
+ public string WarehouseName { get; set; } = string.Empty;
+}
+
+/// 查价货物属性选项。
+public class OrderPriceCheckCargoOptionOutput
+{
+ /// 字典编码。
+ public string DictCode { get; set; } = string.Empty;
+
+ /// 字典名称。
+ public string DictName { get; set; } = string.Empty;
+}
diff --git a/src/Oms.Application/Services/Orders/OrderService.ParcelQuote.cs b/src/Oms.Application/Services/Orders/OrderService.ParcelQuote.cs
index 7ef6839..929f1db 100644
--- a/src/Oms.Application/Services/Orders/OrderService.ParcelQuote.cs
+++ b/src/Oms.Application/Services/Orders/OrderService.ParcelQuote.cs
@@ -19,6 +19,60 @@ public partial class OrderService
private sealed record PriceCheckCargoTarget(string Code, string DisplayName, string CargoAttribute);
+ private const string CargoAttributeDictType = "cargo_attribute";
+
+ ///
+ /// 组装查价表单下拉:国家、发货仓名称、货物属性字典。
+ ///
+ private async Task BuildPriceCheckFormOptionsAsync()
+ {
+ var countries = (await CountryRepository.GetListAsync())
+ .OrderBy(x => x.CountryCode)
+ .ThenBy(x => x.EnglishName)
+ .Select(x => new OrderPriceCheckCountryOptionOutput
+ {
+ CountryCode = (x.CountryCode ?? string.Empty).Trim().ToUpperInvariant(),
+ ChineseName = (x.ChineseName ?? string.Empty).Trim(),
+ EnglishName = (x.EnglishName ?? string.Empty).Trim(),
+ })
+ .Where(x => !string.IsNullOrWhiteSpace(x.CountryCode))
+ .ToList();
+
+ var warehouses = (await WarehouseAddressRepository.GetListAsync())
+ .OrderBy(x => x.Sort == null)
+ .ThenBy(x => x.Sort)
+ .ThenBy(x => x.Id)
+ .Select(x => new OrderPriceCheckWarehouseOptionOutput
+ {
+ Id = x.Id,
+ WarehouseName = string.IsNullOrWhiteSpace(x.WarehouseName)
+ ? x.Id.ToString()
+ : x.WarehouseName.Trim(),
+ })
+ .Where(x => x.Id > 0)
+ .ToList();
+
+ var cargoAttributes = (await DictRepository.GetListAsync(x => x.DictType == CargoAttributeDictType))
+ .OrderBy(x => x.DictSort)
+ .ThenBy(x => x.DictCode)
+ .Select(x => new OrderPriceCheckCargoOptionOutput
+ {
+ DictCode = (x.DictCode ?? string.Empty).Trim(),
+ DictName = string.IsNullOrWhiteSpace(x.DictName)
+ ? (x.DictCode ?? string.Empty).Trim()
+ : x.DictName.Trim(),
+ })
+ .Where(x => !string.IsNullOrWhiteSpace(x.DictCode))
+ .ToList();
+
+ return new OrderPriceCheckFormOptionsOutput
+ {
+ Countries = countries,
+ Warehouses = warehouses,
+ CargoAttributes = cargoAttributes,
+ };
+ }
+
private async Task BuildPriceCheckShippingOptionsAsync()
{
var products = await SalesProductRepository.GetListAsync(x => x.IsActive == EnableStatus.Enabled);
diff --git a/src/Oms.Application/Services/Orders/OrderService.cs b/src/Oms.Application/Services/Orders/OrderService.cs
index 068e567..ced7591 100644
--- a/src/Oms.Application/Services/Orders/OrderService.cs
+++ b/src/Oms.Application/Services/Orders/OrderService.cs
@@ -4,6 +4,7 @@ using Fake.Application;
using Fake.Domain.Exceptions;
using Fake.ObjectStorage;
using Fake.UnitOfWork;
+using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using MiniExcelLibs;
@@ -573,6 +574,14 @@ public partial class OrderService : ApplicationService
public Task GetPriceCheckShippingOptionsAsync() =>
BuildPriceCheckShippingOptionsAsync();
+ ///
+ /// 查价表单下拉(国家 / 发货仓 / 货物属性)。匿名可读,供 H5 访客先填条件再登录查价。
+ ///
+ [AllowAnonymous]
+ [HttpGet("/order/price-check/form-options")]
+ public Task GetPriceCheckFormOptionsAsync() =>
+ BuildPriceCheckFormOptionsAsync();
+
///
/// 执行订单运费试算。
///