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.

155 lines
4.1 KiB

3 weeks ago
  1. using NFine.Application.WMS;
  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.WMS.Controllers
  10. {
  11. public class ICSMOPickController : ControllerBase
  12. {
  13. ICSMOPickApp App = new ICSMOPickApp();
  14. // GET: WMS/ICSMOPick
  15. public ActionResult ICSMOPickQuery()
  16. {
  17. return View();
  18. }
  19. public ActionResult ICSMOPickEdit()
  20. {
  21. return View();
  22. }
  23. public ActionResult SeachICSMOPick()
  24. {
  25. return View();
  26. }
  27. public ActionResult SeachMO()
  28. {
  29. return View();
  30. }
  31. [HttpPost]
  32. [HandlerAjaxOnly]
  33. [ValidateAntiForgeryToken]
  34. public ActionResult DeleteMOPickApplyNeg(string keyValue)
  35. {
  36. string msg = App.DeleteMOPickApplyNeg(keyValue);
  37. if (string.IsNullOrEmpty(msg))
  38. {
  39. return Success("删除成功!");
  40. }
  41. else
  42. {
  43. return Error(msg);
  44. }
  45. }
  46. /// <summary>
  47. /// 详情
  48. /// </summary>
  49. /// <param name="MODetailID"></param>
  50. /// <param name="pagination"></param>
  51. /// <returns></returns>
  52. [HttpGet]
  53. [HandlerAjaxOnly]
  54. public ActionResult GetMOPickApplyNegDetail(string MODetailID, Pagination pagination)
  55. {
  56. DataTable ListData = App.GetMOPickApplyNegDetail(MODetailID, ref pagination);
  57. var JsonData = new
  58. {
  59. total = pagination.total,
  60. page = pagination.page,
  61. records = pagination.records,
  62. rows = ListData,
  63. };
  64. return Content(JsonData.ToJson());
  65. }
  66. public void ClearTemp()
  67. {
  68. App.ClearTemp();
  69. }
  70. public ActionResult GetOOCode(string WorkPoint)
  71. {
  72. try
  73. {
  74. string Code = App.GetOOCode(WorkPoint);
  75. var JsonData = new
  76. {
  77. Code = Code,
  78. };
  79. return Content(JsonData.ToJson());
  80. }
  81. catch (Exception ex)
  82. {
  83. return Error(ex.Message);
  84. }
  85. }
  86. /// <summary>
  87. /// 汇总
  88. /// </summary>
  89. /// <param name="pagination"></param>
  90. /// <returns></returns>
  91. [HttpGet]
  92. public ActionResult GetMOPickApplyNeg(Pagination pagination)
  93. {
  94. DataTable ListData = App.GetMOPickApplyNeg(ref pagination);
  95. var JsonData = new
  96. {
  97. total = pagination.total,
  98. page = pagination.page,
  99. records = pagination.records,
  100. rows = ListData,
  101. };
  102. return Content(JsonData.ToJson());
  103. }
  104. /// <summary>
  105. /// 修改弹出框的数据来源
  106. /// </summary>
  107. /// <param name="ApplyCode"></param>
  108. /// <param name="pagination"></param>
  109. /// <returns></returns>
  110. public ActionResult GetICSMOPickReturnTemporary(string MODetailID, Pagination pagination)
  111. {
  112. DataTable table = App.GetICSMOPickReturnTemporary(MODetailID);
  113. var JsonData = new
  114. {
  115. total = pagination.total,
  116. page = pagination.page,
  117. records = pagination.records,
  118. rows = table
  119. };
  120. return Content(JsonData.ToJson());
  121. }
  122. /// <summary>
  123. /// 新增和修改
  124. /// </summary>
  125. /// <param name="ICSASN"></param>
  126. /// <returns></returns>
  127. [HttpPost]
  128. [HandlerAjaxOnly]
  129. public ActionResult SaveICSMOPickApplyNeg(string keyValue, string deleteIDs)
  130. {
  131. string msg = App.SaveICSMOPickApplyNeg(keyValue, deleteIDs);
  132. if (!string.IsNullOrEmpty(msg))
  133. {
  134. return Error(msg);
  135. }
  136. else
  137. {
  138. return Success("保存成功!");
  139. }
  140. }
  141. }
  142. }