新增物料类型处理逻辑,确保在保存和编辑称重记录时自动设置默认物料类型。更新前端表单以支持密炼物料的选择和显示,优化用户体验。添加分类字典和数据字典的事件广播功能,增强系统的实时数据同步能力。
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
using Prism.Events;
|
||||
|
||||
namespace YY.Admin.Core.Events;
|
||||
|
||||
public class CategoryChangedPayload
|
||||
{
|
||||
public string Action { get; set; } = string.Empty;
|
||||
public string? CategoryId { get; set; }
|
||||
}
|
||||
|
||||
public class CategoryChangedEvent : PubSubEvent<CategoryChangedPayload> { }
|
||||
@@ -0,0 +1,11 @@
|
||||
using Prism.Events;
|
||||
|
||||
namespace YY.Admin.Core.Events;
|
||||
|
||||
public class DictChangedPayload
|
||||
{
|
||||
public string Action { get; set; } = string.Empty;
|
||||
public string? DictId { get; set; }
|
||||
}
|
||||
|
||||
public class DictChangedEvent : PubSubEvent<DictChangedPayload> { }
|
||||
@@ -4,6 +4,8 @@ namespace YY.Admin.Core.Services;
|
||||
|
||||
public record MixerMaterialPageResult(List<MesMixerMaterial> Records, long Total, int Current, int Size);
|
||||
|
||||
public record MaterialCategoryNode(string Id, string? Name, string? Code, List<MaterialCategoryNode> Children);
|
||||
|
||||
public interface IMixerMaterialService
|
||||
{
|
||||
Task<MixerMaterialPageResult> PageAsync(
|
||||
@@ -21,7 +23,10 @@ public interface IMixerMaterialService
|
||||
Task<bool> EditAsync(MesMixerMaterial material, CancellationToken ct = default);
|
||||
Task<bool> DeleteAsync(string id, CancellationToken ct = default);
|
||||
Task<bool> DeleteBatchAsync(string ids, CancellationToken ct = default);
|
||||
|
||||
Task<List<KeyValuePair<string, string>>> GetMajorCategoryOptionsAsync(CancellationToken ct = default);
|
||||
Task<List<KeyValuePair<string, string>>> GetMinorCategoryOptionsAsync(string majorCategoryId, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
Task<List<MaterialCategoryNode>> GetMaterialCategoryTreeAsync(CancellationToken ct = default);
|
||||
Task SyncFromRemoteAsync(CancellationToken ct = default);
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ public interface IWeightRecordService
|
||||
string? filterBillNo = null,
|
||||
string? filterPlateNumber = null,
|
||||
string? filterInoutDirection = null,
|
||||
string? filterGoodsName = null,
|
||||
string? filterDriverName = null,
|
||||
string? filterMixerMaterialName = null,
|
||||
CancellationToken ct = default);
|
||||
|
||||
Task<MesXslWeightRecord?> GetByIdAsync(string id, CancellationToken ct = default);
|
||||
|
||||
@@ -25,9 +25,6 @@ public class MesXslWeightRecord
|
||||
/// <summary>收货单位(出厂时为客户简称)</summary>
|
||||
public string? ReceiverUnit { get; set; }
|
||||
|
||||
/// <summary>货物名称</summary>
|
||||
public string? GoodsName { get; set; }
|
||||
|
||||
/// <summary>毛重(KG),实际称量</summary>
|
||||
public double? GrossWeight { get; set; }
|
||||
|
||||
@@ -46,6 +43,15 @@ public class MesXslWeightRecord
|
||||
/// <summary>单据类型:1已称毛重 2称重完成</summary>
|
||||
public string? BillType { get; set; }
|
||||
|
||||
/// <summary>密炼物料ID(分号分隔)</summary>
|
||||
public string? MixerMaterialIds { get; set; }
|
||||
|
||||
/// <summary>密炼物料名称(分号分隔)</summary>
|
||||
public string? MixerMaterialNames { get; set; }
|
||||
|
||||
/// <summary>物料类型:1自动 2手动</summary>
|
||||
public string? MaterialType { get; set; }
|
||||
|
||||
public int? TenantId { get; set; }
|
||||
public string? CreateBy { get; set; }
|
||||
public DateTime? CreateTime { get; set; }
|
||||
@@ -58,4 +64,7 @@ public class MesXslWeightRecord
|
||||
|
||||
/// <summary>单据类型显示文本(由 ViewModel 填充)</summary>
|
||||
public string BillTypeText { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>物料类型显示文本(由 ViewModel 填充)</summary>
|
||||
public string MaterialTypeText { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user