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.

119 lines
3.4 KiB

4 days ago
  1. using NFine.Application;
  2. using NFine.Application.ProductManage;
  3. using NFine.Application.SRM;
  4. using NFine.Code;
  5. using NFine.Domain.Entity.ProductManage;
  6. using System.Collections.Generic;
  7. using System.Data;
  8. using System.Linq;
  9. using System.Web.Mvc;
  10. namespace NFine.Web.Areas.SRM.Controllers
  11. {
  12. public class TakeEffectPriceController : ControllerBase
  13. {
  14. TakeEffApp App = new TakeEffApp();
  15. //
  16. // GET: /SRM/TakeEffectPrice/
  17. public ActionResult Index()
  18. {
  19. return View();
  20. }
  21. //返回视图
  22. public ActionResult TakeEffDetails()
  23. {
  24. return View();
  25. }
  26. public ActionResult TakeEffList()
  27. {
  28. return View();
  29. }
  30. /// <summary>
  31. /// 获取采购组织
  32. /// </summary>
  33. /// <param name="VenCode"></param>
  34. /// <param name="WorkPoint"></param>
  35. /// <returns></returns>
  36. [HttpGet]
  37. [HandlerAjaxOnly]
  38. public ActionResult GetWorkPint()
  39. {
  40. DataTable dt = App.GetWorkPint();
  41. return Content(dt.ToJson());
  42. }
  43. /// <summary>
  44. /// 获取采购组织
  45. /// </summary>
  46. /// <param name="VenCode"></param>
  47. /// <param name="WorkPoint"></param>
  48. /// <returns></returns>
  49. [HttpGet]
  50. [HandlerAjaxOnly]
  51. public ActionResult GetMaterials()
  52. {
  53. DataTable dt = App.GetMaterials();
  54. return Content(dt.ToJson());
  55. }
  56. /// <summary>
  57. /// 获取物料
  58. /// </summary>
  59. /// <param name="VenCode"></param>
  60. /// <param name="WorkPoint"></param>
  61. /// <returns></returns>
  62. [HttpGet]
  63. [HandlerAjaxOnly]
  64. public ActionResult GetInvCode()
  65. {
  66. DataTable dt = App.GetInvCode();
  67. return Content(dt.ToJson());
  68. }
  69. /// <summary>
  70. /// 获取供应商
  71. /// </summary>
  72. /// <param name="VenCode"></param>
  73. /// <param name="WorkPoint"></param>
  74. /// <returns></returns>
  75. [HttpGet]
  76. [HandlerAjaxOnly]
  77. public ActionResult GetVendor()
  78. {
  79. DataTable dt = App.GetVendor();
  80. return Content(dt.ToJson());
  81. }
  82. /// <summary>
  83. /// 获取物料名称、单位、规格型号
  84. /// </summary>
  85. /// <param name="WorkPoint"></param>
  86. /// <returns></returns>
  87. [HttpGet]
  88. [HandlerAjaxOnly]
  89. public ActionResult GetInvNameType(string InvCode)
  90. {
  91. DataTable ListData = App.GetInvNameType(InvCode);
  92. var JsonData = new
  93. {
  94. INVTYpe = ListData.Rows[0][0].ToString(),
  95. INVName = ListData.Rows[0][1].ToString(),
  96. INVUom = ListData.Rows[0][2].ToString(),
  97. };
  98. return Content(JsonData.ToJson());
  99. }
  100. /// <summary>
  101. /// 获取供应商名称
  102. /// </summary>
  103. /// <param name="WorkPoint"></param>
  104. /// <returns></returns>
  105. [HttpGet]
  106. [HandlerAjaxOnly]
  107. public ActionResult GetVenName(string VenCode)
  108. {
  109. string VenCodeName = App.GetVenName(VenCode);
  110. var JsonData = new
  111. {
  112. VenCodeName = VenCodeName,
  113. //VenCode = NFine.Code.OperatorProvider.Provider.GetCurrent().VenCode
  114. };
  115. return Content(JsonData.ToJson());
  116. }
  117. }
  118. }