新增农户功能升级:身份证OCR/OSS上传、头像采集、同名村检测、Region热度排序及表单体验优化

- Region 表新增热度列,热门省份优先显示
- 区县下拉按地级市分组、已录区县优先、支持全省搜索
- 组选择内置一组至二十组
- 银行卡号独立行+粗体预览,开户行独立行
- 新增农户类型:农户/个体户/合作社/经营集体/公司
- 身份证正反面支持高拍仪/摄像头OCR与手机扫码上传,附件存本地/OSS
- 新增农户头像采集组件(摄像头/本地上传),预留人脸识别收购扩展
- 同名村弹窗提醒(防选错乡镇)
- 编辑窗体禁止遮罩/Esc误关,整体加宽适配高频操作
- 修复二维码局域网手机无法访问(监听0.0.0.0、局域网IP识别、Vite代理兜底)
This commit is contained in:
2026-08-13 16:07:35 +08:00
commit c377421a3e
93 changed files with 12934 additions and 0 deletions
@@ -0,0 +1,30 @@
using AgriculturalPlatform.Api.Models;
namespace AgriculturalPlatform.Api.Dtos;
public record FarmerDto(
int Id, string Name, string IdCard, string Gender, string FarmerType, string Phone,
string Province, string County, string Township, string Village, string GroupName,
string Address, string BankName, string BankAccount, int CreditScore,
string IdCardFrontUrl, string IdCardBackUrl, string AvatarUrl,
string Status, string Notes, DateTime CreatedAt);
public record FarmerSaveRequest(
string Name, string IdCard, string Gender, string Phone,
string Province, string County, string Township, string Village, string GroupName,
string Address, string BankName, string BankAccount, int CreditScore = 80,
string FarmerType = "农户",
string IdCardFrontUrl = "", string IdCardBackUrl = "", string AvatarUrl = "",
string Status = "Active", string Notes = "");
public static class FarmerMappers
{
public static FarmerDto ToDto(this Farmer f) => new(
f.Id, f.Name, f.IdCard, f.Gender, f.FarmerType, f.Phone,
f.Province, f.County, f.Township, f.Village, f.GroupName,
f.Address, f.BankName, f.BankAccount, f.CreditScore,
f.IdCardFrontUrl, f.IdCardBackUrl, f.AvatarUrl,
f.Status.ToString(), f.Notes, f.CreatedAt);
public static FarmerDto[] ToDtos(this IEnumerable<Farmer> items) => items.Select(ToDto).ToArray();
}