不属于任务单的物料也可签收

This commit is contained in:
2023-11-07 10:31:43 +08:00
parent eb3037385e
commit 4029614a87
2 changed files with 7 additions and 2 deletions

View File

@@ -60,5 +60,10 @@ namespace Tnb.ProductionMgr.Entities.Dto
public string? mbom_process_id { get; set; } public string? mbom_process_id { get; set; }
public List<Dictionary<string, object>>? details { get; set; } public List<Dictionary<string, object>>? details { get; set; }
/// <summary>
/// 存在不属于该任务单的原材料也要签收
/// </summary>
public bool sure { get; set; } = false;
} }
} }

View File

@@ -170,9 +170,9 @@ namespace Tnb.ProductionMgr
{ {
foreach (Dictionary<string, object> item in input.details) foreach (Dictionary<string, object> item in input.details)
{ {
if (!inputMaterials.Contains(item["material_id"])) if (!inputMaterials.Contains(item["material_id"]) && !input.sure)
{ {
throw new Exception("该物料不是生产bom投入物料不能签收"); throw new Exception("存在不属于生产bom投入物料,确认签收");
} }
list.Add(new PrdMaterialReceiptD list.Add(new PrdMaterialReceiptD