You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
2.6 KiB

  1. using NFine.Application.WMS;
  2. using System.Data;
  3. using System.Web.Mvc;
  4. using NFine.Code;
  5. using NFine.Data.Extensions;
  6. namespace NFine.Web.Areas.WMS.Controllers
  7. {
  8. public class YLICSMoPickController : ControllerBase
  9. {
  10. // GET: WMS/PickMaterial
  11. YLICSMoPickApp App = new YLICSMoPickApp();
  12. public ActionResult YLIcsMoPick()
  13. {
  14. return View();
  15. }
  16. //[HttpGet]
  17. //[HandlerAjaxOnly]
  18. public ActionResult GetGridJson(Pagination pagination, string queryJson, string Type)
  19. {
  20. DataTable ListData = new DataTable();
  21. if (Type == "1")//工单1
  22. {
  23. ListData = App.GetGridJson(queryJson, ref pagination);
  24. }
  25. var JsonData = new
  26. {
  27. total = pagination.total,
  28. page = pagination.page,
  29. records = pagination.records,
  30. rows = ListData,
  31. };
  32. return Content(JsonData.ToJson());
  33. }
  34. //[HttpGet]
  35. //[HandlerAjaxOnly]
  36. public ActionResult GetICSMOPickMergeTemp(Pagination pagination, string ID, string Type, string flag)
  37. {
  38. DataTable ListData = new DataTable();
  39. if (flag == "1")
  40. {
  41. ListData = App.GetICSMOPickMergeTemp(ID, Type);
  42. }
  43. var JsonData = new
  44. {
  45. total = pagination.total,
  46. page = pagination.page,
  47. records = pagination.records,
  48. rows = ListData,
  49. };
  50. return Content(JsonData.ToJson());
  51. }
  52. [HttpPost]
  53. public ActionResult CheckQty(string objArr)
  54. {
  55. string i = App.CheckQty(objArr);
  56. var JsonData = new
  57. {
  58. count = i
  59. };
  60. return Content(JsonData.ToJson());
  61. }
  62. public ActionResult GetPickingListType()
  63. {
  64. string sql = @"select b.F_ItemCode as Code ,b.F_ItemName as Name from Sys_SRM_Items a left join Sys_SRM_ItemsDetail b on a.F_Id=b.F_ItemId
  65. where a.F_EnCode='PL00001' order by cast(b.F_SortCode as int) asc";
  66. DataTable ListData = SqlHelper.GetDataTableBySql(sql);
  67. return Content(ListData.ToJson());
  68. }
  69. [HttpPost]
  70. public ActionResult SeachPickingListType(string Type)
  71. {
  72. object Falg = App.SeachPickingListType(Type);
  73. var JsonData = new
  74. {
  75. count = Falg
  76. };
  77. return Content(JsonData.ToJson());
  78. }
  79. }
  80. }