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.
101 lines
2.8 KiB
101 lines
2.8 KiB
using NFine.Application;
|
|
using NFine.Application.ProductManage;
|
|
using NFine.Code;
|
|
using NFine.Domain.Entity.ProductManage;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Web.Mvc;
|
|
|
|
namespace NFine.Web.Areas.SRM.Controllers
|
|
{
|
|
public class CartonNoSelectController : ControllerBase
|
|
{
|
|
private CartonNoManageApp App = new CartonNoManageApp();
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetInfoBySelectItemCode(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetInfoBySelectItemCode(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();
|
|
}
|
|
|
|
//[HttpGet]
|
|
//[HandlerAjaxOnly]
|
|
//public ActionResult GetFormJson(string keyValue)
|
|
//{
|
|
// //var data = maintainAppApp.GetForm(keyValue);
|
|
// //return Content(data.ToJson());
|
|
//}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitForm(string POCode, string PORow,string keyValue)
|
|
{
|
|
int i = App.CreateItemLotNo(POCode, PORow, keyValue);
|
|
if (i > 0)
|
|
{
|
|
return Success("发布成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("发布失败!");
|
|
}
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonByCreate(string POCode, string PORow)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonByCreate(POCode, PORow);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetVendorLotNo(string VenCode, string WorkPoint)
|
|
{
|
|
DataTable ListData = App.GetVendorLotNo(VenCode, WorkPoint);
|
|
var JsonData = new
|
|
{
|
|
VendorLotNo = ListData.Rows[0][0].ToString(),
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult DeleteCartonNo( string keyValue,string Work)
|
|
{
|
|
string msg = App.DeleteCartonNo(keyValue, Work);
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|