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

194 lines
5.1 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 WeiWaiProductionIssueController : ControllerBase
  18. {
  19. // GET: WMS/WeiWaiProductionIssue
  20. WeiWaiProductionIssueApp App = new WeiWaiProductionIssueApp();
  21. public ActionResult ICSOApplyNeg()
  22. {
  23. return View();
  24. }
  25. public ActionResult ICSOApplyNegAdd()
  26. {
  27. return View();
  28. }
  29. public ActionResult SeachMaterial()
  30. {
  31. return View();
  32. }
  33. public ActionResult ICSOApplyNegUpdate()
  34. {
  35. return View();
  36. }
  37. [HttpGet]
  38. public ActionResult GetICSOApplyNeg(Pagination pagination)
  39. {
  40. DataTable ListData = App.GetICSOApplyNeg(ref pagination);
  41. var JsonData = new
  42. {
  43. total = pagination.total,
  44. page = pagination.page,
  45. records = pagination.records,
  46. rows = ListData,
  47. };
  48. return Content(JsonData.ToJson());
  49. }
  50. //子表
  51. [HttpGet]
  52. [HandlerAjaxOnly]
  53. public ActionResult GetICSOApplyNegDetail(string OApplyNegCode, Pagination pagination)
  54. {
  55. DataTable ListData = App.GetICSOApplyNegDetail(OApplyNegCode, ref pagination);
  56. var JsonData = new
  57. {
  58. total = pagination.total,
  59. page = pagination.page,
  60. records = pagination.records,
  61. rows = ListData,
  62. };
  63. return Content(JsonData.ToJson());
  64. }
  65. public ActionResult GetICSReturnTemporary(string rfqno, Pagination pagination)
  66. {
  67. DataTable table = App.GetICSReturnTemporary(rfqno);
  68. var JsonData = new
  69. {
  70. total = pagination.total,
  71. page = pagination.page,
  72. records = pagination.records,
  73. rows = table
  74. };
  75. return Content(JsonData.ToJson());
  76. }
  77. [HttpGet]
  78. public ActionResult GetINV(string invcode, Pagination pagination)
  79. {
  80. DataTable ListData = App.GetINV(invcode, ref pagination);
  81. var JsonData = new
  82. {
  83. total = pagination.total,
  84. page = pagination.page,
  85. records = pagination.records,
  86. rows = ListData,
  87. };
  88. return Content(JsonData.ToJson());
  89. }
  90. public void UpdateMOApplyNegTemp(string json)
  91. {
  92. App.UpdateMOApplyNegTemp(json);
  93. }
  94. public void AddMOApplyNegTemp(string json)
  95. {
  96. App.AddMOApplyNegTemp(json);
  97. }
  98. public ActionResult GetICSMOApplyNegDetailTemp(string OApplyNegCode, Pagination pagination)
  99. {
  100. DataTable table = App.GetICSMOApplyNegDetailTemp(OApplyNegCode);
  101. var JsonData = new
  102. {
  103. total = pagination.total,
  104. page = pagination.page,
  105. records = pagination.records,
  106. rows = table
  107. };
  108. return Content(JsonData.ToJson());
  109. }
  110. [HttpPost]
  111. [HandlerAjaxOnly]
  112. [ValidateAntiForgeryToken]
  113. public ActionResult DeleteICSMOApplyNeg(string keyValue)
  114. {
  115. string msg = App.DeleteICSMOApplyNeg(keyValue);
  116. if (string.IsNullOrEmpty(msg))
  117. {
  118. return Success("删除成功!");
  119. }
  120. else
  121. {
  122. return Error(msg);
  123. }
  124. }
  125. [HttpPost]
  126. [HandlerAjaxOnly]
  127. public ActionResult SaveICSMOApplyNeg(string ICSASN)
  128. {
  129. string msg = App.SaveICSMOApplyNeg(ICSASN);
  130. if (!string.IsNullOrEmpty(msg))
  131. {
  132. return Error(msg);
  133. }
  134. else
  135. {
  136. return Success("添加成功!");
  137. }
  138. }
  139. public void ClearTemp()
  140. {
  141. App.ClearTemp();
  142. }
  143. [HttpPost]
  144. [HandlerAjaxOnly]
  145. public ActionResult UpdateICSMOApplyNeg(string ICSASN)
  146. {
  147. string msg = App.UpdateICSMOApplyNeg(ICSASN);
  148. if (!string.IsNullOrEmpty(msg))
  149. {
  150. return Error(msg);
  151. }
  152. else
  153. {
  154. return Success("添加成功!");
  155. }
  156. }
  157. [HttpPost]
  158. [HandlerAjaxOnly]
  159. public ActionResult AuditICSMOApplyNeg(string ICSASN)
  160. {
  161. string msg = App.AuditICSMOApplyNeg(ICSASN);
  162. if (!string.IsNullOrEmpty(msg))
  163. {
  164. return Error(msg);
  165. }
  166. else
  167. {
  168. return Success("审核成功!");
  169. }
  170. }
  171. }
  172. }