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.

258 lines
6.5 KiB

1 year ago
1 year ago
  1. using NFine.Application.WMS;
  2. using System.Data;
  3. using System.Web.Mvc;
  4. using NFine.Code;
  5. namespace NFine.Web.Areas.WMS.Controllers
  6. {
  7. public class ProductionIssueController : ControllerBase
  8. {
  9. ProductionIssueApp App = new ProductionIssueApp();
  10. // GET: WMS/ProductionIssue
  11. public ActionResult ICSMOApplyNeg()
  12. {
  13. return View();
  14. }
  15. public ActionResult ICSMOApplyNegAdd()
  16. {
  17. return View();
  18. }
  19. public ActionResult SeachICSMO()
  20. {
  21. return View();
  22. }
  23. public ActionResult SeachInventory()
  24. {
  25. return View();
  26. }
  27. public ActionResult ICSMOApplyNegUpdate()
  28. {
  29. return View();
  30. }
  31. [HttpGet]
  32. public ActionResult GetICSMOApplyNeg(Pagination pagination, string queryJson)
  33. {
  34. DataTable ListData = App.GetICSMOApplyNeg(queryJson, ref pagination);
  35. var JsonData = new
  36. {
  37. total = pagination.total,
  38. page = pagination.page,
  39. records = pagination.records,
  40. rows = ListData,
  41. };
  42. return Content(JsonData.ToJson());
  43. }
  44. [HttpGet]
  45. [HandlerAjaxOnly]
  46. public ActionResult GetICSMOApplyNegDetail(string ApplyNegCode, Pagination pagination)
  47. {
  48. DataTable ListData = App.GetICSMOApplyNegDetail(ApplyNegCode, ref pagination);
  49. var JsonData = new
  50. {
  51. total = pagination.total,
  52. page = pagination.page,
  53. records = pagination.records,
  54. rows = ListData,
  55. };
  56. return Content(JsonData.ToJson());
  57. }
  58. [HttpGet]
  59. public ActionResult GetINV(string invcode,string Code,string Invstd,string EATTRIBUTE2, Pagination pagination)
  60. {
  61. DataTable ListData = App.GetINV(invcode, Code, Invstd, EATTRIBUTE2, 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. public ActionResult GetICSMOPickLog(string invcode, Pagination pagination)
  73. {
  74. DataTable ListData = App.GetICSMOPickLog(invcode, ref pagination);
  75. var JsonData = new
  76. {
  77. total = pagination.total,
  78. page = pagination.page,
  79. records = pagination.records,
  80. rows = ListData,
  81. };
  82. return Content(JsonData.ToJson());
  83. }
  84. public ActionResult GetICSReturnTemporary(string rfqno, Pagination pagination)
  85. {
  86. DataTable table = App.GetICSReturnTemporary(rfqno);
  87. var JsonData = new
  88. {
  89. total = pagination.total,
  90. page = pagination.page,
  91. records = pagination.records,
  92. rows = table
  93. };
  94. return Content(JsonData.ToJson());
  95. }
  96. [HttpGet]
  97. [HandlerAjaxOnly]
  98. public ActionResult GetWHCode()
  99. {
  100. DataTable dt = App.GetWHCode();
  101. return Content(dt.ToJson());
  102. }
  103. //[HttpGet]
  104. //[HandlerAjaxOnly]
  105. //public ActionResult GetInvCode()
  106. //{
  107. // DataTable dt = App.GetInvCode();
  108. // return Content(dt.ToJson());
  109. //}
  110. public void AddMOApplyNegTemp(string json)
  111. {
  112. App.AddMOApplyNegTemp(json);
  113. }
  114. public ActionResult DeleteMopick(string json)
  115. {
  116. return Content(App.DeleteMopick(json));
  117. }
  118. public void ClearTemp()
  119. {
  120. App.ClearTemp();
  121. }
  122. [HttpPost]
  123. [HandlerAjaxOnly]
  124. public ActionResult SaveICSMOApplyNeg(string ICSASN)
  125. {
  126. string msg = App.SaveICSMOApplyNeg(ICSASN);
  127. if (!string.IsNullOrEmpty(msg))
  128. {
  129. return Error(msg);
  130. }
  131. else
  132. {
  133. return Success("添加成功!");
  134. }
  135. }
  136. [HttpPost]
  137. [HandlerAjaxOnly]
  138. public ActionResult UpdateICSMOApplyNeg(string ICSASN)
  139. {
  140. string msg = App.UpdateICSMOApplyNeg(ICSASN);
  141. if (!string.IsNullOrEmpty(msg))
  142. {
  143. return Error(msg);
  144. }
  145. else
  146. {
  147. return Success("修改成功!");
  148. }
  149. }
  150. /// <summary>
  151. /// 获取文本框值
  152. /// </summary>
  153. /// <param name="POCode"></param>
  154. /// <param name="PORow"></param>
  155. /// <returns></returns>
  156. [HttpPost]
  157. [HandlerAjaxOnly]
  158. public ActionResult GetInputValue(string ID)
  159. {
  160. DataTable ListData = App.GetInputValue(ID);
  161. var JsonData = new
  162. {
  163. rows = ListData,
  164. };
  165. return Content(JsonData.ToJson());
  166. }
  167. public ActionResult GetICSMOApplyNegDetailTemp(string ApplyNegCode, Pagination pagination)
  168. {
  169. DataTable table = App.GetICSMOApplyNegDetailTemp(ApplyNegCode);
  170. var JsonData = new
  171. {
  172. total = pagination.total,
  173. page = pagination.page,
  174. records = pagination.records,
  175. rows = table
  176. };
  177. return Content(JsonData.ToJson());
  178. }
  179. public void UpdateMOApplyNegTemp(string json)
  180. {
  181. App.UpdateMOApplyNegTemp(json);
  182. }
  183. [HttpPost]
  184. [HandlerAjaxOnly]
  185. public ActionResult AuditICSMOApplyNeg(string ICSASN)
  186. {
  187. string msg = App.AuditICSMOApplyNeg(ICSASN);
  188. if (!string.IsNullOrEmpty(msg))
  189. {
  190. return Error(msg);
  191. }
  192. else
  193. {
  194. return Success("操作成功!");
  195. }
  196. }
  197. [HttpPost]
  198. [HandlerAjaxOnly]
  199. [ValidateAntiForgeryToken]
  200. public ActionResult DeleteICSMOApplyNeg(string keyValue)
  201. {
  202. string msg = App.DeleteICSMOApplyNeg(keyValue);
  203. if (string.IsNullOrEmpty(msg))
  204. {
  205. return Success("删除成功!");
  206. }
  207. else
  208. {
  209. return Error(msg);
  210. }
  211. }
  212. }
  213. }