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.

109 lines
3.1 KiB

3 weeks ago
  1. using NFine.Code;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Data;
  5. using System.Linq;
  6. using System.Web;
  7. using System.Web.Mvc;
  8. using NFine.Application.HGWMS;
  9. namespace NFine.Web.Areas.HGWMS.Controllers
  10. {
  11. public class ICSTransferController : ControllerBase
  12. {
  13. ICSTransferApp App = new ICSTransferApp();
  14. public ActionResult ICSTransfer()
  15. {
  16. return View();
  17. }
  18. public ActionResult ICSTransferAdd()
  19. {
  20. return View();
  21. }
  22. /// <summary>
  23. /// 获取仓库库位信息
  24. /// </summary>
  25. /// <param name="pagination"></param>
  26. /// <param name="queryJson"></param>
  27. /// <returns></returns>
  28. [HttpGet]
  29. [HandlerAjaxOnly]
  30. public ActionResult GetLocationCode(Pagination pagination, string queryJson)
  31. {
  32. DataTable ListData = App.GetLocationCode(queryJson, ref pagination);
  33. var JsonData = new
  34. {
  35. total = pagination.total,
  36. page = pagination.page,
  37. records = pagination.records,
  38. rows = ListData,
  39. };
  40. return Content(JsonData.ToJson());
  41. }
  42. /// <summary>
  43. /// 详情
  44. /// </summary>
  45. /// <param name="RCVCode"></param>
  46. /// <param name="pagination"></param>
  47. /// <returns></returns>
  48. [HttpGet]
  49. [HandlerAjaxOnly]
  50. public ActionResult GetMOIssueApplyNegDetail(string RCVCode, Pagination pagination)
  51. {
  52. DataTable ListData = App.GetMOIssueApplyNegDetail(RCVCode, ref pagination);
  53. var JsonData = new
  54. {
  55. total = pagination.total,
  56. page = pagination.page,
  57. records = pagination.records,
  58. rows = ListData,
  59. };
  60. return Content(JsonData.ToJson());
  61. }
  62. public void ClearTemp()
  63. {
  64. App.ClearTemp();
  65. }
  66. /// <summary>
  67. /// 生成调拨单
  68. /// </summary>
  69. /// <param name="keyValue"></param>
  70. /// <returns></returns>
  71. [HttpPost]
  72. [HandlerAjaxOnly]
  73. public ActionResult AddICSTransfer(string keyValue)
  74. {
  75. string msg = App.AddICSTransfer(keyValue);
  76. if (!string.IsNullOrEmpty(msg))
  77. {
  78. return Error(msg);
  79. }
  80. else
  81. {
  82. return Success("操作成功!");
  83. }
  84. }
  85. /// <summary>
  86. /// 多个产成品退库单 弃核
  87. /// </summary>
  88. /// <param name="keyValue"></param>
  89. /// <returns></returns>
  90. [HttpPost]
  91. [HandlerAjaxOnly]
  92. public ActionResult ICSMOIssueSendBackAuditRollback(string keyValue)
  93. {
  94. string msg = App.ICSMOIssueSendBackAuditRollback(keyValue);
  95. if (!string.IsNullOrEmpty(msg))
  96. {
  97. return Error(msg);
  98. }
  99. else
  100. {
  101. return Success("弃审成功!");
  102. }
  103. }
  104. }
  105. }