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.

102 lines
2.5 KiB

  1. using NFine.Application.OMAY;
  2. using NFine.Code;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Web;
  8. using System.Web.Mvc;
  9. namespace NFine.Web.Areas.OMAY.Controllers
  10. {
  11. public class OMAYMoOutboundController : ControllerBase
  12. {
  13. OMAYMoOutboundApp App = new OMAYMoOutboundApp();
  14. // GET: OMAY/OMAYMoOutbound
  15. public ActionResult OMAYMoOutbound()
  16. {
  17. return View();
  18. }
  19. public ActionResult SeachMoInfo()
  20. {
  21. return View();
  22. }
  23. [HttpGet]
  24. public ActionResult GetMoInfo(string Code, Pagination pagination)
  25. {
  26. DataTable ListData = App.GetMoInfo( Code, ref pagination);
  27. var JsonData = new
  28. {
  29. total = pagination.total,
  30. page = pagination.page,
  31. records = pagination.records,
  32. rows = ListData,
  33. };
  34. return Content(JsonData.ToJson());
  35. }
  36. [HttpGet]
  37. [HandlerAjaxOnly]
  38. public ActionResult GetMosByCode(Pagination pagination, string queryJson)
  39. {
  40. DataTable ListData = App.GetMosByCode(queryJson, ref pagination);
  41. var JsonData = new
  42. {
  43. total = pagination.total,
  44. page = pagination.page,
  45. records = pagination.records,
  46. rows = ListData,
  47. };
  48. return Content(JsonData.ToJson());
  49. }
  50. [HttpGet]
  51. [HandlerAjaxOnly]
  52. public ActionResult GetMoPicksByCode(Pagination pagination, string queryJson)
  53. {
  54. DataTable ListData = App.GetMoPicksByCode(queryJson, ref pagination);
  55. var JsonData = new
  56. {
  57. total = pagination.total,
  58. page = pagination.page,
  59. records = pagination.records,
  60. rows = ListData,
  61. };
  62. return Content(JsonData.ToJson());
  63. }
  64. public ActionResult GetLotNotInfo(string keyValue)
  65. {
  66. var ListData = App.GetLotNotInfo(keyValue);
  67. return Content(ListData.ToJson());
  68. }
  69. [HttpPost]
  70. [HandlerAjaxOnly]
  71. public ActionResult OutboundShipments(string ICSASN)
  72. {
  73. string msg = App.OutboundShipments(ICSASN);
  74. if (!string.IsNullOrEmpty(msg))
  75. {
  76. return Error(msg);
  77. }
  78. else
  79. {
  80. return Success("添加成功!");
  81. }
  82. }
  83. }
  84. }