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.

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