添加wcs任务下发测试
修改入库功能 重新生成material页面
This commit is contained in:
1 parent
541fb5df6e
commit
2b01cc7584
20 files changed
+518
-60
No files matched your search
@@ -2,8 +2,12 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using HHWMS.Web.Models;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace HHWMS.Web.Controllers
|
||||
namespace HHWMS.Web.Areas.Receipt.Controllers
|
||||
{
|
||||
[Area("receipt")]
|
||||
[ActionDescription("入库操作")]
|
||||
@@ -85,6 +89,37 @@ namespace HHWMS.Web.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 搜索物料
|
||||
/// </summary>
|
||||
[HttpPost]
|
||||
public IActionResult SearchMaterials(string keyword)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(keyword))
|
||||
{
|
||||
return Json(new { Code = 200, Data = new object[] { } });
|
||||
}
|
||||
|
||||
var materials = _unitWork.Find<Material>
|
||||
(m => m.MaterialCode.Contains(keyword) || m.MaterialName.Contains(keyword))
|
||||
.Select(m => new
|
||||
{
|
||||
MaterialCode = m.MaterialCode,
|
||||
MaterialName = m.MaterialName
|
||||
})
|
||||
.Take(10)
|
||||
.ToList();
|
||||
|
||||
return Json(new { Code = 200, Data = materials });
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
return Json(new { Code = 500, Msg = $"搜索物料失败:{ex.Message}" });
|
||||
}
|
||||
}
|
||||
|
||||
#endregion API Methods
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user