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.

202 lines
5.6 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 ICSDeliveryNoticeController : ControllerBase
  12. {
  13. ICSDeliveryNoticeApp App = new ICSDeliveryNoticeApp();
  14. // GET: WMS/ProductionIssue
  15. public ActionResult ICSDeliveryNoticeApplyNeg()
  16. {
  17. return View();
  18. }
  19. public ActionResult ICSDeliveryNoticeApplyNegAdd()
  20. {
  21. return View();
  22. }
  23. public ActionResult SeachICSDeliveryNotice()
  24. {
  25. return View();
  26. }
  27. public ActionResult SeachInventory()
  28. {
  29. return View();
  30. }
  31. public ActionResult ICSDeliveryNoticeApplyNegUpdate()
  32. {
  33. return View();
  34. }
  35. public ActionResult SeachPurOrder()
  36. {
  37. return View();
  38. }
  39. [HttpPost]
  40. [HandlerAjaxOnly]
  41. [ValidateAntiForgeryToken]
  42. public ActionResult DeleteICSDeliveryNotice(string keyValue)
  43. {
  44. string msg = App.DeleteICSDeliveryNotice(keyValue);
  45. if (string.IsNullOrEmpty(msg))
  46. {
  47. return Success("删除成功!");
  48. }
  49. else
  50. {
  51. return Error(msg);
  52. }
  53. }
  54. [HttpGet]
  55. public ActionResult GetDeliveryNoticeApplyNeg(Pagination pagination)
  56. {
  57. DataTable ListData = App.GetDeliveryNoticeApplyNeg(ref pagination);
  58. var JsonData = new
  59. {
  60. total = pagination.total,
  61. page = pagination.page,
  62. records = pagination.records,
  63. rows = ListData,
  64. };
  65. return Content(JsonData.ToJson());
  66. }
  67. /// <summary>
  68. /// 无源头到货
  69. /// </summary>
  70. /// <param name="pagination"></param>
  71. /// <returns></returns>
  72. [HttpGet]
  73. public ActionResult GetEDeliveryNoticeApplyNeg(Pagination pagination)
  74. {
  75. DataTable ListData = App.GetEDeliveryNoticeApplyNeg(ref pagination);
  76. var JsonData = new
  77. {
  78. total = pagination.total,
  79. page = pagination.page,
  80. records = pagination.records,
  81. rows = ListData,
  82. };
  83. return Content(JsonData.ToJson());
  84. }
  85. //供应商
  86. [HttpGet]
  87. public ActionResult GetSelectICSVenCode()
  88. {
  89. var data = App.GetSelectICSVenCode();
  90. return Content(data.ToJson());
  91. }
  92. [HttpGet]
  93. public ActionResult GetPurOrder(string POCode, Pagination pagination)
  94. {
  95. DataTable ListData = App.GetPurOrder(POCode, ref pagination);
  96. var JsonData = new
  97. {
  98. total = pagination.total,
  99. page = pagination.page,
  100. records = pagination.records,
  101. rows = ListData,
  102. };
  103. return Content(JsonData.ToJson());
  104. }
  105. public ActionResult GetICSDeliveryNoticeReturnTemporary(string ID, Pagination pagination)
  106. {
  107. DataTable table = App.GetICSDeliveryNoticeReturnTemporary(ID);
  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. [HttpPost]
  118. [HandlerAjaxOnly]
  119. [ValidateAntiForgeryToken]
  120. public ActionResult DeleteICSDeliveryNoticeApplyNeg(string keyValue)
  121. {
  122. string msg = App.DeleteDeliveryNoticeApplyNeg(keyValue);
  123. if (string.IsNullOrEmpty(msg))
  124. {
  125. return Success("删除成功!");
  126. }
  127. else
  128. {
  129. return Error(msg);
  130. }
  131. }
  132. public void ClearTemp()
  133. {
  134. App.ClearTemp();
  135. }
  136. /// <summary>
  137. /// 新增
  138. /// </summary>
  139. /// <param name="ICSASN"></param>
  140. /// <returns></returns>
  141. [HttpPost]
  142. [HandlerAjaxOnly]
  143. public ActionResult SaveICSDeliveryNoticeApplyNeg(string ICSASN)
  144. {
  145. string msg = App.SaveICSDeliveryNoticeAppApplyNeg(ICSASN);
  146. if (!string.IsNullOrEmpty(msg))
  147. {
  148. return Error(msg);
  149. }
  150. else
  151. {
  152. return Success("添加成功!");
  153. }
  154. }
  155. public ActionResult GetDNCode(string WorkPoint)
  156. {
  157. try
  158. {
  159. string Code = App.GetDNCode(WorkPoint);
  160. var JsonData = new
  161. {
  162. Code = Code,
  163. };
  164. return Content(JsonData.ToJson());
  165. }
  166. catch (Exception ex)
  167. {
  168. return Error(ex.Message);
  169. }
  170. }
  171. /// <summary>
  172. /// 修改
  173. /// </summary>
  174. /// <param name="ICSASN"></param>
  175. /// <returns></returns>
  176. [HttpPost]
  177. [HandlerAjaxOnly]
  178. public ActionResult UpdateICSDeliveryNoticeApplyNeg(string ICSASN)
  179. {
  180. string msg = App.UpdateICSDeliveryNoticeApplyNeg(ICSASN);
  181. if (!string.IsNullOrEmpty(msg))
  182. {
  183. return Error(msg);
  184. }
  185. else
  186. {
  187. return Success("修改成功!");
  188. }
  189. }
  190. }
  191. }