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

152 lines
4.1 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 BlitemController : ControllerBase
  18. {
  19. BlitemApp App = new BlitemApp();
  20. // GET: WMS/Blitem
  21. public ActionResult BlitemList()
  22. {
  23. return View();
  24. }
  25. public ActionResult ICSCheckAdd()
  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 CheckCode, string Sequence, Pagination pagination)
  46. {
  47. DataTable ListData = App.GetSubGridJson(CheckCode, Sequence, ref pagination);
  48. var JsonData = new
  49. {
  50. total = pagination.total,
  51. page = pagination.page,
  52. records = pagination.records,
  53. rows = ListData,
  54. };
  55. return Content(JsonData.ToJson());
  56. }
  57. public ActionResult DeleteICSCheckDetail(string ID)
  58. {
  59. //keyValue = keyValue.Substring(1, keyValue.Length - 2);
  60. //WorkPoint = WorkPoint.Substring(1, WorkPoint.Length - 2);
  61. string msg = App.DeleteICSCheckDetail(ID);
  62. if (string.IsNullOrWhiteSpace(msg))
  63. {
  64. return Success("删除成功!");
  65. }
  66. else
  67. {
  68. return Error(msg);
  69. }
  70. }
  71. //获取仓库
  72. public ActionResult GetWHCode()
  73. {
  74. DataTable dt = App.GetWHCode();
  75. return Content(dt.ToJson());
  76. }
  77. public ActionResult GetQU(string WHCodeID)
  78. {
  79. DataTable dt = App.GetQU(WHCodeID);
  80. return Content(dt.ToJson());
  81. }
  82. public ActionResult GetPai(string WHCodeID,string Qu)
  83. {
  84. DataTable dt = App.GetPai(WHCodeID,Qu);
  85. return Content(dt.ToJson());
  86. }
  87. public ActionResult GetHuoJia(string WHCodeID, string Qu,string Pai)
  88. {
  89. DataTable dt = App.GetHuoJia(WHCodeID, Qu, Pai);
  90. return Content(dt.ToJson());
  91. }
  92. public ActionResult GetCeng(string WHCodeID, string Qu, string Pai,string HuoJia)
  93. {
  94. DataTable dt = App.GetCeng(WHCodeID, Qu, Pai, HuoJia);
  95. return Content(dt.ToJson());
  96. }
  97. public ActionResult GetGe(string WHCodeID, string Qu, string Pai, string HuoJia, string Ceng)
  98. {
  99. DataTable dt = App.GetGe(WHCodeID, Qu, Pai, HuoJia,Ceng);
  100. return Content(dt.ToJson());
  101. }
  102. [HttpPost]
  103. [HandlerAjaxOnly]
  104. public ActionResult AddICSCheck(string Parameter)
  105. {
  106. string msg = App.AddICSCheck(Parameter);
  107. if (!string.IsNullOrEmpty(msg))
  108. {
  109. return Error(msg);
  110. }
  111. else
  112. {
  113. return Success("添加成功!");
  114. }
  115. }
  116. [HttpPost]
  117. [HandlerAjaxOnly]
  118. [ValidateAntiForgeryToken]
  119. public ActionResult DeleteICSCheck(string keyValue)
  120. {
  121. string msg = App.DeleteICSCheck(keyValue);
  122. if (string.IsNullOrEmpty(msg))
  123. {
  124. return Success("删除成功!");
  125. }
  126. else
  127. {
  128. return Error(msg);
  129. }
  130. }
  131. }
  132. }