|
|
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 SORRFQController : Controller {
// GET: SRM/SORRFQ
RFQManagerApp app = new RFQManagerApp(); public ActionResult Index() { return View(); } /// <summary>
/// 过程查询
/// </summary>
/// <returns></returns>
public ActionResult RFQProcessSearch() { return View(); } public ActionResult RFQProcessSearchDetail() { return View(); }
public ActionResult SORRFQSearchItem() { return View(); }
public ActionResult GetGridJson(Pagination pagination, String JSON) { DataTable table = app.GetGridJson(JSON, ref pagination); var JsonData = new { total = pagination.total, page = pagination.page, records = pagination.records, rows = table }; return Content(JsonData.ToJson());
} public ActionResult Publish(string json) { return Content(app.Publish(json));
} public ActionResult Close(string json) { return Content(app.Close(json));
} public ActionResult DELETE(string json) { return Content(app.delete(json));
} /// <summary>
/// 获取动态列
/// </summary>
/// <param name="BidCode"></param>
/// <returns></returns>
public ActionResult SelectSORRFQColumnName(string rfqcode, string workpoint) { var data = app.SelectSORRFQColumnName(rfqcode, workpoint); return Content(data.ToJson()); } /// <summary>
/// 总查询
/// </summary>
/// <param name="pagination"></param>
/// <param name="BidCode"></param>
/// <returns></returns>
[HttpGet] public ActionResult GetListSORRFQGridJsonTOZSUM(Pagination pagination, string rfqcode, string workpoint) { DataTable ListData = app.GetListSORRFQGridJsonTOZSUM(rfqcode, workpoint, ref pagination); var JsonData = new { total = pagination.total, page = pagination.page, records = pagination.records, rows = ListData, }; return Content(JsonData.ToJson()); } [HttpGet] [HandlerAjaxOnly] public ActionResult GetSubGridJsonCourseInfoSORRFQ(Pagination pagination, string rfqcode, string workpoint, string ITEMCODE) { DataTable ListData = app.GetSubGridJsonCourseInfoSORRFQ(rfqcode, workpoint,ITEMCODE ,ref pagination); var JsonData = new { total = pagination.total, page = pagination.page, records = pagination.records, rows = ListData, }; return Content(JsonData.ToJson()); } [HttpGet] [HandlerAjaxOnly] public ActionResult SORRFQHistoryInfo(Pagination pagination, string rfqcode, string workpoint, string ITEMCODE, string VENDORCODE) { DataTable ListData = app.SORRFQHistoryInfo(rfqcode, workpoint, ITEMCODE,VENDORCODE, ref pagination); var JsonData = new { total = pagination.total, page = pagination.page, records = pagination.records, rows = ListData, }; return Content(JsonData.ToJson()); } [HttpGet] [HandlerAjaxOnly] public ActionResult SORRFQCourseHistoryInfoCahrs(string rfqcode, string workpoint, string ITEMCODE) { DataTable ListData = app.SORRFQCourseHistoryInfoCahrs(rfqcode, workpoint, ITEMCODE); string ss = ListData.ToJson(); return Content(ListData.ToJson());
} [HttpPost] public void Export(string rfqcode, string workpoint, Pagination pagination) { //var data = maintainApp.GetList2(ids); //preselldetailApp.GetList2(keyValue, keyword);
DataTable dt = app.GetPOListExport(rfqcode, workpoint, ref pagination); AsposeCell.Export(dt); //NPOIExcel helper = new NPOIExcel();
//string title= DateTime.Now.ToString("yyyyMMddHHmmss");
//string path= Server.MapPath("/File/");
//helper.ToExcel(dt, title, "sheet1", path);
} /// <summary>
/// 获取供应商-生效价格
/// </summary>
/// <param name="rfqno"></param>
/// <param name="workpoint"></param>
/// <returns></returns>
[HttpGet] [HandlerAjaxOnly] public ActionResult GettPerson(string rfqno, string workpoint) { DataTable dt = app.GettPerson(rfqno, workpoint); return Content(dt.ToJson()); }
[HttpGet] [HandlerAjaxOnly] public ActionResult GetSubGridJson(string RFQCODE, Pagination pagination, string WorkPoint) { DataTable ListData = app.GetSubGridJson(RFQCODE, ref pagination, WorkPoint); var JsonData = new { total = pagination.total, page = pagination.page, records = pagination.records, rows = ListData, }; return Content(JsonData.ToJson()); }
} }
|