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.

157 lines
4.4 KiB

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