添加工序配置

修改入库页面,任务完成,库存页面等
This commit is contained in:
zhougf committed 2025-08-31 15:57:46 +08:00
1 parent c2b039ea47
commit 5a04ca9d59
41 files changed
+1151 -84

No files matched your search

@@ -1,10 +1,12 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Linq;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Mvc;
using WalkingTec.Mvvm.Core.Extensions;
using HHWMS.Web;
using HHWMS.Web.Models;
namespace HHWMS.Web.Controllers
{
@@ -63,6 +65,20 @@ namespace HHWMS.Web.Controllers
}
else
{
if (!DC.Set<Material>().Any(x => x.MaterialCode == vm.Entity.MaterialCode))
{
return FFResult().Alert($"物料编码 为{vm.Entity.MaterialCode}的物料基础数据不存在!请先添加物料基础数据!");
}
if (DC.Set<MaterialProcess>().Any(x => x.MaterialCode == vm.Entity.MaterialCode
&& x.ProcessOrder == vm.Entity.ProcessOrder))
{
return FFResult().Alert($"已存在 工序顺序 为{vm.Entity.ProcessOrder}的数据!");
}
if (DC.Set<MaterialProcess>().Any(x => x.MaterialCode == vm.Entity.MaterialCode
&& x.ProcessCode == vm.Entity.ProcessCode))
{
return FFResult().Alert($"已存在 工序编码 为{vm.Entity.ProcessCode}的数据!");
}
vm.DoAdd();
if (!ModelState.IsValid)
{