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

131 lines
3.3 KiB

3 years ago
3 years ago
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 ICSDisassemblyDocController : ControllerBase
  18. {
  19. // GET: WMS/ICSDisassemblyDoc
  20. ICSDisassemblyDocApp App = new ICSDisassemblyDocApp();
  21. public ActionResult ICSDisassem()
  22. {
  23. return View();
  24. }
  25. public ActionResult ICSDisassemblyDocAdd()
  26. {
  27. return View();
  28. }
  29. [HttpGet]
  30. [HandlerAjaxOnly]
  31. public ActionResult GetGridJson(Pagination pagination, string queryJson)
  32. {
  33. DataTable ListData = App.GetGridJson(queryJson, ref pagination);
  34. var JsonData = new
  35. {
  36. total = pagination.total,
  37. page = pagination.page,
  38. records = pagination.records,
  39. rows = ListData,
  40. };
  41. return Content(JsonData.ToJson());
  42. }
  43. [HttpGet]
  44. [HandlerAjaxOnly]
  45. public ActionResult GetSubGridJson(string Code)
  46. {
  47. DataTable ListData = App.GetSubGridJson(Code);
  48. var JsonData = new
  49. {
  50. rows = ListData,
  51. };
  52. return Content(JsonData.ToJson());
  53. }
  54. //查询符合套件的在库条码
  55. public ActionResult GetLotNoByKit(string InvCode, string WHCode, string ExtensionID, Pagination pagination)
  56. {
  57. DataTable ListData = App.GetLotNoByKit(InvCode, WHCode, ExtensionID, ref pagination);
  58. var JsonData = new
  59. {
  60. total = pagination.total,
  61. page = pagination.page,
  62. records = pagination.records,
  63. rows = ListData,
  64. };
  65. return Content(JsonData.ToJson());
  66. }
  67. //绑定套件
  68. [HttpPost]
  69. [HandlerAjaxOnly]
  70. public ActionResult CreateLogByKit(string Code, string Parameter)
  71. {
  72. string msg = App.CreateLogByKit(Code,Parameter);
  73. if (!string.IsNullOrEmpty(msg))
  74. {
  75. return Error(msg);
  76. }
  77. else
  78. {
  79. return Success("添加成功!");
  80. }
  81. }
  82. //批量生成散件条码
  83. [HttpPost]
  84. [HandlerAjaxOnly]
  85. public ActionResult CreateInventoryLot(string Code)
  86. {
  87. string msg = App.CreateInventoryLot(Code);
  88. if (!string.IsNullOrEmpty(msg))
  89. {
  90. return Error(msg);
  91. }
  92. else
  93. {
  94. return Success("生成成功!");
  95. }
  96. }
  97. //删除条码
  98. [HttpPost]
  99. [HandlerAjaxOnly]
  100. public ActionResult DeleteInventoryLot(string Code)
  101. {
  102. string msg = App.DeleteInventoryLot(Code);
  103. if (string.IsNullOrWhiteSpace(msg))
  104. {
  105. return Success("删除成功!");
  106. }
  107. else
  108. {
  109. return Error(msg);
  110. }
  111. }
  112. }
  113. }