using NFine.Application.SRM; using NFine.Code; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Web; using System.Web.Mvc; namespace NFine.Web.Areas.SRM.Controllers { public class ComparisonController : ControllerBase { private ComparisonApp App = new ComparisonApp(); // // GET: /SRM/Comparison/ public ActionResult Index() { return View(); } public ActionResult ComPricelist() { return View(); } public ActionResult CompPrice() { return View(); } public ActionResult SelectPrice() { return View(); } public ActionResult AuditComPrice() { return View(); } /// /// 获取比价管理信息 /// /// 分页 /// 传入过滤参数 /// [HttpGet] [HandlerAjaxOnly] public ActionResult GetGridJson(Pagination pagination, string queryJson) { DataTable ListData = App.GetGridJson(queryJson, ref pagination); var JsonData = new { total = pagination.total, page = pagination.page, records = pagination.records, rows = ListData, }; return Content(JsonData.ToJson()); } /// /// 获取生效价格查询 /// /// 分页 /// 传入过滤参数 /// [HttpGet] [HandlerAjaxOnly] public ActionResult GetGridPrice(Pagination pagination, string queryJson) { DataTable ListData = App.GetGridPrice(queryJson, ref pagination); var JsonData = new { total = pagination.total, page = pagination.page, records = pagination.records, rows = ListData, }; return Content(JsonData.ToJson()); } /// /// 获取询价物资比价价格查询 /// /// 分页 /// 传入过滤参数 /// [HttpGet] [HandlerAjaxOnly] public ActionResult GetGridMaterial(Pagination pagination, string ITEMCODE, string VenCode,string RFQCODE) { DataTable ListData = App.GetGridMaterial( ref pagination, ITEMCODE, VenCode, RFQCODE); var JsonData = new { total = pagination.total, page = pagination.page, records = pagination.records, rows = ListData, }; return Content(JsonData.ToJson()); } /// /// 获取税率 /// /// 分页 /// 传入过滤参数 /// //[HttpGet] //[HandlerAjaxOnly] //public ActionResult GetGridVendorTaxrate(Pagination pagination, string queryJson) //{ // DataTable ListData = App.GetGridVendorTaxrate(queryJson, ref pagination); // var JsonData = new // { // total = pagination.total, // page = pagination.page, // records = pagination.records, // rows = ListData, // }; // return Content(JsonData.ToJson()); //} //送钱 [HttpPost] [HandlerAjaxOnly] [ValidateAntiForgeryToken] public ActionResult UpdateCompareCode(string keyValue, string DeleteFlag) { string msg = App.UpdateCompareCode(keyValue); if (string.IsNullOrWhiteSpace(msg)) { return Success("送签成功!"); } else { return Success("送签成功!"); } } [HttpGet] [HandlerAjaxOnly] public ActionResult GetSelectPrice(Pagination pagination, string COMPARECODE) { DataTable ListData = App.GetSelectPrice(COMPARECODE, ref pagination); var JsonData = new { total = pagination.total, page = pagination.page, records = pagination.records, rows = ListData, }; return Content(JsonData.ToJson()); } [HttpPost] [HandlerAjaxOnly] [ValidateAntiForgeryToken] public ActionResult DeleteCOMPARECODE(string keyValue) { string msg = App.DeleteCOMPARECODE(keyValue); if (string.IsNullOrEmpty(msg)) { return Success("删除成功!"); } else { return Error(msg); } } //审核 [HttpPost] [HandlerAjaxOnly] [ValidateAntiForgeryToken] public ActionResult AuditCompareCode(string COMPARECODE, string VENDORCODE) { string msg = App.AuditCompareCode(COMPARECODE, VENDORCODE); if (string.IsNullOrWhiteSpace(msg)) { return Success("审核成功!"); } else { return Success("审核成功!"); } } } }