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.

224 lines
6.1 KiB

3 weeks 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 ICSCheckConfigurationController : ControllerBase
  8. {
  9. ICSCheckConfigurationControllerApp App = new ICSCheckConfigurationControllerApp();
  10. public ActionResult ICSCheckConfiguration()
  11. {
  12. return View();
  13. }
  14. public ActionResult WareHouseReserveAdd()
  15. {
  16. return View();
  17. }
  18. public ActionResult ICSCheckConfigurationUpdate()
  19. {
  20. return View();
  21. }
  22. public ActionResult SeachInvInfo()
  23. {
  24. return View();
  25. }
  26. [HttpGet]
  27. public ActionResult GetICSReserve(Pagination pagination)
  28. {
  29. DataTable ListData = App.GetICSReserve(ref pagination);
  30. var JsonData = new
  31. {
  32. total = pagination.total,
  33. page = pagination.page,
  34. records = pagination.records,
  35. rows = ListData,
  36. };
  37. return Content(JsonData.ToJson());
  38. }
  39. [HttpGet]
  40. [HandlerAjaxOnly]
  41. public ActionResult ICSInspectDetail(string InspectCode, Pagination pagination)
  42. {
  43. DataTable ListData = App.GetICSMOApplyNegDetail(InspectCode, ref pagination);
  44. var JsonData = new
  45. {
  46. total = pagination.total,
  47. page = pagination.page,
  48. records = pagination.records,
  49. rows = ListData,
  50. };
  51. return Content(JsonData.ToJson());
  52. }
  53. [HttpPost]
  54. [HandlerAjaxOnly]
  55. [ValidateAntiForgeryToken]
  56. public ActionResult DeleteICSReserve(string keyValue)
  57. {
  58. string msg = App.DeleteICSReserve(keyValue);
  59. if (string.IsNullOrEmpty(msg))
  60. {
  61. return Success("删除成功!");
  62. }
  63. else
  64. {
  65. return Error(msg);
  66. }
  67. }
  68. public ActionResult GetICSReserveTemporary(string ID, Pagination pagination)
  69. {
  70. DataTable table = App.GetICSReserveTemporary(ID);
  71. var JsonData = new
  72. {
  73. total = pagination.total,
  74. page = pagination.page,
  75. records = pagination.records,
  76. rows = table
  77. };
  78. return Content(JsonData.ToJson());
  79. }
  80. [HttpGet]
  81. [HandlerAjaxOnly]
  82. public ActionResult GetInspectDocType(string ID)
  83. {
  84. DataTable dt = App.GetInspectDocType(ID);
  85. return Content(dt.ToJson());
  86. }
  87. public void ClearTemp()
  88. {
  89. App.ClearTemp();
  90. }
  91. [HttpGet]
  92. public ActionResult GetReserveInv(string invcode, string WHCode, Pagination pagination)
  93. {
  94. DataTable ListData = App.GetReserveInv(invcode, WHCode, ref pagination);
  95. var JsonData = new
  96. {
  97. total = pagination.total,
  98. page = pagination.page,
  99. records = pagination.records,
  100. rows = ListData,
  101. };
  102. return Content(JsonData.ToJson());
  103. }
  104. public void AddMOApplyNegTemp(string json)
  105. {
  106. App.AddMOApplyNegTemp(json);
  107. }
  108. public void UpdateMOApplyNegTemp(string json)
  109. {
  110. App.UpdateMOApplyNegTemp(json);
  111. }
  112. /// <summary>
  113. /// 保存预留信息
  114. /// </summary>
  115. /// <param name="keyValue"></param>
  116. /// <returns></returns>
  117. [HttpPost]
  118. [HandlerAjaxOnly]
  119. public ActionResult SaveReserve(string ReserveInfo)
  120. {
  121. string msg = App.SaveReserve(ReserveInfo);
  122. if (!string.IsNullOrEmpty(msg))
  123. {
  124. return Error(msg);
  125. }
  126. else
  127. {
  128. return Success("添加成功!");
  129. }
  130. }
  131. /// <summary>
  132. /// 保存预留信息
  133. /// </summary>
  134. /// <param name="keyValue"></param>
  135. /// <returns></returns>
  136. [HttpPost]
  137. [HandlerAjaxOnly]
  138. public ActionResult UpdateReserve(string ReserveInfo)
  139. {
  140. string msg = App.UpdateReserve(ReserveInfo);
  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="keyValue"></param>
  154. /// <returns></returns>
  155. [HttpPost]
  156. [HandlerAjaxOnly]
  157. public ActionResult UpdateReserveStatus(string IDList, string Status)
  158. {
  159. string msg = App.UpdateReserveStatus(IDList.TrimEnd(','), Status);
  160. if (!string.IsNullOrEmpty(msg))
  161. {
  162. return Error(msg);
  163. }
  164. else
  165. {
  166. return Success("添加成功!");
  167. }
  168. }
  169. public ActionResult GetICSMOApplyNegDetailTemp(string ApplyNegCode, Pagination pagination)
  170. {
  171. DataTable table = App.GetICSMOApplyNegDetailTemp(ApplyNegCode);
  172. var JsonData = new
  173. {
  174. total = pagination.total,
  175. page = pagination.page,
  176. records = pagination.records,
  177. rows = table
  178. };
  179. return Content(JsonData.ToJson());
  180. }
  181. [HttpPost]
  182. [HandlerAjaxOnly]
  183. public ActionResult UpdateICSMOApplyNeg(string ICSASN)
  184. {
  185. string msg = App.UpdateICSMOApplyNeg(ICSASN);
  186. if (!string.IsNullOrEmpty(msg))
  187. {
  188. return Error(msg);
  189. }
  190. else
  191. {
  192. return Success("修改成功!");
  193. }
  194. }
  195. /// <summary>
  196. /// 获取层级信息
  197. /// </summary>
  198. /// <returns></returns>
  199. public ActionResult GetSelectLevel()
  200. {
  201. DataTable dt = App.GetSelectLevel();
  202. return Content(dt.ToJson());
  203. }
  204. }
  205. }