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