纽威
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.

148 lines
4.0 KiB

3 years ago
  1. using NFine.Application.WMS;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Data;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Web;
  8. using System.Web.Mvc;
  9. using NFine.Code;
  10. using System.Data.SqlClient;
  11. using NFine.Data.Extensions;
  12. using System.Data.OleDb;
  13. using System.Configuration;
  14. using ICS.Application.Entity;
  15. namespace NFine.Web.Areas.WMS.Controllers
  16. {
  17. public class ICSMTDOCController : ControllerBase
  18. {
  19. ICSMTDOCApp App = new ICSMTDOCApp();
  20. // GET: WMS/ICSMTDOC
  21. public ActionResult Metamorphosis()
  22. {
  23. return View();
  24. }
  25. public ActionResult ICSMTDOCAdd()
  26. {
  27. return View();
  28. }
  29. public ActionResult GetICSInventory()
  30. {
  31. return View();
  32. }
  33. public ActionResult GetBatchCode()
  34. {
  35. return View();
  36. }
  37. [HttpGet]
  38. [HandlerAjaxOnly]
  39. public ActionResult GetGridJson(Pagination pagination, string queryJson)
  40. {
  41. DataTable ListData = App.GetGridJson(queryJson, ref pagination);
  42. var JsonData = new
  43. {
  44. total = pagination.total,
  45. page = pagination.page,
  46. records = pagination.records,
  47. rows = ListData,
  48. };
  49. return Content(JsonData.ToJson());
  50. }
  51. [HttpGet]
  52. [HandlerAjaxOnly]
  53. public ActionResult GetSubGridJson(string MTDOCCode)
  54. {
  55. DataTable ListData = App.GetSubGridJson(MTDOCCode);
  56. var JsonData = new
  57. {
  58. rows = ListData,
  59. };
  60. return Content(JsonData.ToJson());
  61. }
  62. //在库条码
  63. public ActionResult GetRepertory(string LotNo ,Pagination pagination)
  64. {
  65. DataTable ListData = App.GetRepertory(LotNo, ref pagination);
  66. var JsonData = new
  67. {
  68. total = pagination.total,
  69. page = pagination.page,
  70. records = pagination.records,
  71. rows = ListData,
  72. };
  73. return Content(JsonData.ToJson());
  74. }
  75. public ActionResult GetInvcode(string Invcode, Pagination pagination)
  76. {
  77. DataTable ListData = App.GetInvcode(Invcode, ref pagination);
  78. var JsonData = new
  79. {
  80. total = pagination.total,
  81. page = pagination.page,
  82. records = pagination.records,
  83. rows = ListData,
  84. };
  85. return Content(JsonData.ToJson());
  86. }
  87. public ActionResult GetCode(string BatchCode, Pagination pagination)
  88. {
  89. DataTable ListData = App.GetCode(BatchCode, ref pagination);
  90. var JsonData = new
  91. {
  92. total = pagination.total,
  93. page = pagination.page,
  94. records = pagination.records,
  95. rows = ListData,
  96. };
  97. return Content(JsonData.ToJson());
  98. }
  99. /// <summary>
  100. /// 创建形态转换
  101. /// </summary>
  102. /// <param name="keyValue"></param>
  103. /// <returns></returns>
  104. [HttpPost]
  105. [HandlerAjaxOnly]
  106. public ActionResult CreateICSMTDOC(string ICSMTDOC, string InvCode, string ExtensionID, string Memo)
  107. {
  108. string msg = App.CreateICSMTDOC(ICSMTDOC, InvCode, ExtensionID, Memo);
  109. if (!string.IsNullOrEmpty(msg))
  110. {
  111. return Error(msg);
  112. }
  113. else
  114. {
  115. return Success("添加成功!");
  116. }
  117. }
  118. //审核
  119. public ActionResult ICSMTDOCAudit(string MTDOCCode)
  120. {
  121. string msg = App.ICSMTDOCAudit(MTDOCCode);
  122. if (string.IsNullOrEmpty(msg))
  123. {
  124. return Success("操作成功!");
  125. }
  126. else
  127. {
  128. return Error("" + msg + "");
  129. }
  130. }
  131. }
  132. }