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.

177 lines
4.7 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 ICSSDNController : ControllerBase
  15. {
  16. ICSSDNApp App = new ICSSDNApp();
  17. public ActionResult ICSSDNQuery()
  18. {
  19. return View();
  20. }
  21. public ActionResult ICSSDNEdit()
  22. {
  23. return View();
  24. }
  25. public ActionResult SeachICSSDN()
  26. {
  27. return View();
  28. }
  29. public ActionResult SeachMO()
  30. {
  31. return View();
  32. }
  33. [HttpPost]
  34. [HandlerAjaxOnly]
  35. [ValidateAntiForgeryToken]
  36. public ActionResult DeleteSDNApplyNeg(string keyValue)
  37. {
  38. string msg = App.DeleteSDNApplyNeg(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="SDNCode"></param>
  52. /// <param name="pagination"></param>
  53. /// <returns></returns>
  54. [HttpGet]
  55. [HandlerAjaxOnly]
  56. public ActionResult GetSDNApplyNegDetail(string SDNCode, Pagination pagination)
  57. {
  58. DataTable ListData = App.GetSDNApplyNegDetail(SDNCode, 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 GetSDNApplyNeg(Pagination pagination)
  95. {
  96. DataTable ListData = App.GetSDNApplyNeg(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 GetICSSDNReturnTemporary(string SDNCode, Pagination pagination)
  113. {
  114. DataTable table = App.GetICSSDNReturnTemporary(SDNCode);
  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. [HttpGet]
  125. [HandlerAjaxOnly]
  126. public ActionResult GetCusCode()
  127. {
  128. DataTable dt = App.GetCusCode();
  129. return Content(dt.ToJson());
  130. }
  131. /// <summary>
  132. /// 新增和修改
  133. /// </summary>
  134. /// <param name="ICSASN"></param>
  135. /// <returns></returns>
  136. [HttpPost]
  137. [HandlerAjaxOnly]
  138. public ActionResult SaveICSSDNApplyNeg(string keyValue, string deleteIDs)
  139. {
  140. string msg = App.SaveICSSDNApplyNeg(keyValue, deleteIDs);
  141. if (!string.IsNullOrEmpty(msg))
  142. {
  143. return Error(msg);
  144. }
  145. else
  146. {
  147. return Success("保存成功!");
  148. }
  149. }
  150. [HttpGet]
  151. public ActionResult GetSDN(string OOCode, Pagination pagination)
  152. {
  153. DataTable ListData = App.GetSDN(OOCode, ref pagination);
  154. var JsonData = new
  155. {
  156. total = pagination.total,
  157. page = pagination.page,
  158. records = pagination.records,
  159. rows = ListData,
  160. };
  161. return Content(JsonData.ToJson());
  162. }
  163. }
  164. }