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.

318 lines
8.5 KiB

3 weeks ago
  1. using NFine.Application.MFWMS;
  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.MFWMS.Controllers
  10. {
  11. public class ScrapDocumentDealWithController : ControllerBase
  12. {
  13. // GET: MFWMS/ScrapDocumentDealWith
  14. ScrapDocumentDealWithApp App = new ScrapDocumentDealWithApp();
  15. public ActionResult ScrapDocumentDealWith()
  16. {
  17. return View();
  18. }
  19. public ActionResult ScrapNumInput()
  20. {
  21. return View();
  22. }
  23. public ActionResult ScrapDocument()
  24. {
  25. return View();
  26. }
  27. public ActionResult ScrappedIssue()
  28. {
  29. return View();
  30. }
  31. public ActionResult OtherWarehousingAudit()
  32. {
  33. return View();
  34. }
  35. [HttpGet]
  36. [HandlerAjaxOnly]
  37. public ActionResult GetGridJson(Pagination pagination, string queryJson)
  38. {
  39. DataTable ListData = App.GetGridJson(queryJson, ref pagination);
  40. var JsonData = new
  41. {
  42. total = pagination.total,
  43. page = pagination.page,
  44. records = pagination.records,
  45. rows = ListData,
  46. };
  47. return Content(JsonData.ToJson());
  48. }
  49. [HttpGet]
  50. [HandlerAjaxOnly]
  51. public ActionResult GetSubGridJson(string OOCode, string Sequence, string Type, Pagination pagination)
  52. {
  53. DataTable ListData = App.GetSubGridJson(OOCode, Sequence, Type, ref pagination);
  54. var JsonData = new
  55. {
  56. total = pagination.total,
  57. page = pagination.page,
  58. records = pagination.records,
  59. rows = ListData,
  60. };
  61. return Content(JsonData.ToJson());
  62. }
  63. [HttpGet]
  64. [HandlerAjaxOnly]
  65. public ActionResult GetDocumentsByCode(string Code, string Sequence, string WorkPoint)
  66. {
  67. DataTable ListData = App.GetDocumentsByCode(Code, Sequence, WorkPoint);
  68. var JsonData = new
  69. {
  70. rows = ListData,
  71. };
  72. return Content(JsonData.ToJson());
  73. }
  74. //审核委外到货单
  75. [HttpPost]
  76. [HandlerAjaxOnly]
  77. [ValidateAntiForgeryToken]
  78. public ActionResult SubmitFormWWSHDH(string ODNCode, string Sequence, string keyValue, string WorkPoint)
  79. {
  80. string msg = App.SubmitFormWWSHDH(ODNCode, Sequence, keyValue, WorkPoint);
  81. if (!string.IsNullOrEmpty(msg))
  82. {
  83. return Error(msg);
  84. }
  85. else
  86. {
  87. return Success("报废成功!");
  88. }
  89. }
  90. //成品
  91. [HttpPost]
  92. [HandlerAjaxOnly]
  93. [ValidateAntiForgeryToken]
  94. public ActionResult SubmitFormChengPing(string MOCode, string Sequence, string keyValue, string WorkPoint, float Quantity)
  95. {
  96. string msg = App.SubmitFormChengPing(MOCode, Sequence, keyValue, WorkPoint, Quantity);
  97. if (!string.IsNullOrEmpty(msg))
  98. {
  99. return Error(msg);
  100. }
  101. else
  102. {
  103. return Success("报废成功!");
  104. }
  105. }
  106. //报废出库(其他出库)批审
  107. [HttpPost]
  108. [HandlerAjaxOnly]
  109. public ActionResult ApprovalReview(string Value)
  110. {
  111. string msg = App.ApprovalReview(Value);
  112. if (!string.IsNullOrEmpty(msg))
  113. {
  114. return Error(msg);
  115. }
  116. else
  117. {
  118. return Success("审核成功!");
  119. }
  120. }
  121. [HttpGet]
  122. [HandlerAjaxOnly]
  123. public ActionResult GetGridJsonScrappedIssue(Pagination pagination, string queryJson)
  124. {
  125. DataTable ListData = App.GetGridJsonScrappedIssue(queryJson, ref pagination);
  126. var JsonData = new
  127. {
  128. total = pagination.total,
  129. page = pagination.page,
  130. records = pagination.records,
  131. rows = ListData,
  132. };
  133. return Content(JsonData.ToJson());
  134. }
  135. [HttpGet]
  136. [HandlerAjaxOnly]
  137. public ActionResult GetSubGridJsonScrappedIssue(string Code,Pagination pagination)
  138. {
  139. DataTable ListData = App.GetSubGridJsonScrappedIssue(Code, ref pagination);
  140. var JsonData = new
  141. {
  142. total = pagination.total,
  143. page = pagination.page,
  144. records = pagination.records,
  145. rows = ListData,
  146. };
  147. return Content(JsonData.ToJson());
  148. }
  149. [HttpGet]
  150. [HandlerAjaxOnly]
  151. public ActionResult GetGridJsonScrapDocument(Pagination pagination, string queryJson)
  152. {
  153. DataTable ListData = App.GetGridJsonScrapDocument(queryJson, 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. [HttpGet]
  164. [HandlerAjaxOnly]
  165. public ActionResult GetSubGridJsonScrapDocument(string Code, Pagination pagination)
  166. {
  167. DataTable ListData = App.GetSubGridJsonScrapDocument(Code, ref pagination);
  168. var JsonData = new
  169. {
  170. total = pagination.total,
  171. page = pagination.page,
  172. records = pagination.records,
  173. rows = ListData,
  174. };
  175. return Content(JsonData.ToJson());
  176. }
  177. //委外原材报废(调拨申请单)批审
  178. [HttpPost]
  179. [HandlerAjaxOnly]
  180. public ActionResult WWApprovalReview(string Value,string LocationCode)
  181. {
  182. string msg = App.WWApprovalReview(Value, LocationCode);
  183. if (!string.IsNullOrEmpty(msg))
  184. {
  185. return Error(msg);
  186. }
  187. else
  188. {
  189. return Success("审核成功!");
  190. }
  191. }
  192. [HttpGet]
  193. [HandlerAjaxOnly]
  194. public ActionResult GetGridJsonQiTa(Pagination pagination, string queryJson)
  195. {
  196. DataTable ListData = App.GetGridJsonQiTa(queryJson, ref pagination);
  197. var JsonData = new
  198. {
  199. total = pagination.total,
  200. page = pagination.page,
  201. records = pagination.records,
  202. rows = ListData,
  203. };
  204. return Content(JsonData.ToJson());
  205. }
  206. [HttpGet]
  207. [HandlerAjaxOnly]
  208. public ActionResult GetSubGridJson(string ApplyNegCode, string Sequence, string Type, string isPrint, Pagination pagination)
  209. {
  210. DataTable ListData = App.GetSubGridJson(ApplyNegCode, Sequence, Type, isPrint, ref pagination);
  211. var JsonData = new
  212. {
  213. total = pagination.total,
  214. page = pagination.page,
  215. records = pagination.records,
  216. rows = ListData,
  217. };
  218. return Content(JsonData.ToJson());
  219. }
  220. //其他入库一键生成批审
  221. [HttpPost]
  222. [HandlerAjaxOnly]
  223. [ValidateAntiForgeryToken]
  224. public ActionResult SubmitFormQTALL(string keyValue,string Location)
  225. {
  226. string msg = App.SubmitFormQTALL( keyValue, Location);
  227. if (!string.IsNullOrEmpty(msg))
  228. {
  229. return Error(msg);
  230. }
  231. else
  232. {
  233. return Success("审核成功!");
  234. }
  235. }
  236. [HttpGet]
  237. public ActionResult GetWHCodeByLocation(string LocationCode)
  238. {
  239. var data = App.GetWHCodeByLocation(LocationCode);
  240. return Content(data.ToJson());
  241. }
  242. [HttpGet]
  243. [HandlerAjaxOnly]
  244. public ActionResult GetGridJsonChengPing(Pagination pagination, string queryJson)
  245. {
  246. DataTable ListData = App.GetGridJsonChengPing(queryJson, ref pagination);
  247. var JsonData = new
  248. {
  249. total = pagination.total,
  250. page = pagination.page,
  251. records = pagination.records,
  252. rows = ListData,
  253. };
  254. return Content(JsonData.ToJson());
  255. }
  256. }
  257. }