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.
77 lines
2.5 KiB
77 lines
2.5 KiB
using NFine.Application;
|
|
using NFine.Application.ProductManage;
|
|
using NFine.Code;
|
|
using NFine.Code.Excel;
|
|
using NFine.Domain.Entity.ProductManage;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Web.Mvc;
|
|
|
|
namespace NFine.Web.Areas.SRM.Controllers
|
|
{
|
|
public class CAListController : ControllerBase
|
|
{
|
|
private CAManageApp App = new CAManageApp();
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetCAListGridJson(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetCAListGridJson(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 GetSubGridJson(string queryJson,Pagination pagination)
|
|
//{
|
|
// DataTable ListData = App.GetSubGridJson(queryJson, ref pagination);
|
|
// var JsonData = new
|
|
// {
|
|
// total = pagination.total,
|
|
// page = pagination.page,
|
|
// records = pagination.records,
|
|
// rows = ListData,
|
|
|
|
// };
|
|
// //获取当前登录人信息;
|
|
|
|
// return Content(JsonData.ToJson());
|
|
//}
|
|
|
|
public ActionResult Index()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
public void Export(string keyValue)
|
|
{
|
|
keyValue = keyValue.TrimEnd(',');
|
|
//var data = maintainApp.GetList2(ids); //preselldetailApp.GetList2(keyValue, keyword);
|
|
DataTable dt = App.GetASNListExport(keyValue);
|
|
AsposeCell.Export(dt);
|
|
//NPOIExcel helper = new NPOIExcel();
|
|
//string title= DateTime.Now.ToString("yyyyMMddHHmmss");
|
|
//string path= Server.MapPath("/File/");
|
|
//helper.ToExcel(dt, title, "sheet1", path);
|
|
}
|
|
|
|
[HttpPost]
|
|
public void ExportAll(string keyValue, string ORDERNO, string STNO, string BeginDate, string EndDate, string VenCode, string VenName, string VenderLotNO, string IsReceive)
|
|
{
|
|
DataTable dt = App.GetASNListExport(ORDERNO, STNO, BeginDate, EndDate, VenCode, VenName, VenderLotNO, IsReceive);
|
|
AsposeCell.Export(dt);
|
|
}
|
|
}
|
|
}
|