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.

179 lines
4.8 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 ICSOutsourcingOrderController : ControllerBase
  12. {
  13. ICSOutsourcingOrderApp App = new ICSOutsourcingOrderApp();
  14. // GET: WMS/ProductionIssue
  15. public ActionResult ICSOutsourcingOrderApplyNeg()
  16. {
  17. return View();
  18. }
  19. public ActionResult ICSOutsourcingOrderApplyNegAdd()
  20. {
  21. return View();
  22. }
  23. public ActionResult SeachICSOutsourcingOrder()
  24. {
  25. return View();
  26. }
  27. public ActionResult SeachInventory()
  28. {
  29. return View();
  30. }
  31. public ActionResult ICSOutsourcingOrderApplyNegUpdate()
  32. {
  33. return View();
  34. }
  35. public ActionResult DeleteMopick(string json)
  36. {
  37. return Content(App.DeleteMopick(json));
  38. }
  39. [HttpPost]
  40. [HandlerAjaxOnly]
  41. [ValidateAntiForgeryToken]
  42. public ActionResult DeleteOutsourcingOrderApplyNeg(string keyValue)
  43. {
  44. string msg = App.DeleteOutsourcingOrderApplyNeg(keyValue);
  45. if (string.IsNullOrEmpty(msg))
  46. {
  47. return Success("删除成功!");
  48. }
  49. else
  50. {
  51. return Error(msg);
  52. }
  53. }
  54. public void ClearTemp()
  55. {
  56. App.ClearTemp();
  57. }
  58. [HttpGet]
  59. public ActionResult GetOutsourcingOrderApplyNeg(Pagination pagination)
  60. {
  61. DataTable ListData = App.GetOutsourcingOrderApplyNeg(ref pagination);
  62. var JsonData = new
  63. {
  64. total = pagination.total,
  65. page = pagination.page,
  66. records = pagination.records,
  67. rows = ListData,
  68. };
  69. return Content(JsonData.ToJson());
  70. }
  71. [HttpGet]
  72. [HandlerAjaxOnly]
  73. public ActionResult GetOutsourcingOrderApplyNegDetail(string ApplyNegCode, Pagination pagination)
  74. {
  75. DataTable ListData = App.GetOutsourcingOrderApplyNegDetail(ApplyNegCode, 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. [HttpPost]
  86. [HandlerAjaxOnly]
  87. public ActionResult SaveICSOutsourcingOrderApplyNeg(string ICSASN)
  88. {
  89. string msg = App.SaveICSOutsourcingOrderApplyNeg(ICSASN);
  90. if (!string.IsNullOrEmpty(msg))
  91. {
  92. return Error(msg);
  93. }
  94. else
  95. {
  96. return Success("添加成功!");
  97. }
  98. }
  99. //部门
  100. [HttpGet]
  101. public ActionResult GetSelectICSDepCode()
  102. {
  103. var data = App.GetSelectICSDepCode();
  104. return Content(data.ToJson());
  105. }
  106. //供应商
  107. [HttpGet]
  108. public ActionResult GetSelectICSVenCode()
  109. {
  110. var data = App.GetSelectICSVenCode();
  111. return Content(data.ToJson());
  112. }
  113. [HttpPost]
  114. [HandlerAjaxOnly]
  115. public ActionResult UpdateICSOutsourcingOrderApplyNeg(string ICSASN)
  116. {
  117. string msg = App.UpdateICSOutsourcingOrderApplyNeg(ICSASN);
  118. if (!string.IsNullOrEmpty(msg))
  119. {
  120. return Error(msg);
  121. }
  122. else
  123. {
  124. return Success("修改成功!");
  125. }
  126. }
  127. public ActionResult GetICSOutsourcingOrderReturnTemporary(string rfqno, Pagination pagination)
  128. {
  129. DataTable table = App.GetICSOutsourcingOrderReturnTemporary(rfqno);
  130. var JsonData = new
  131. {
  132. total = pagination.total,
  133. page = pagination.page,
  134. records = pagination.records,
  135. rows = table
  136. };
  137. return Content(JsonData.ToJson());
  138. }
  139. public ActionResult GetOOCode(string WorkPoint)
  140. {
  141. try
  142. {
  143. string Code = App.GetOOCode(WorkPoint);
  144. var JsonData = new
  145. {
  146. Code = Code,
  147. };
  148. return Content(JsonData.ToJson());
  149. }
  150. catch (Exception ex)
  151. {
  152. return Error(ex.Message);
  153. }
  154. }
  155. public void UpdateMOApplyNegTemp(string json)
  156. {
  157. App.UpdateOutsourcingOrderApplyNegTemp(json);
  158. }
  159. }
  160. }