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.
207 lines
5.5 KiB
207 lines
5.5 KiB
using NFine.Application.WMS;
|
|
using System.Data;
|
|
using System.Web.Mvc;
|
|
using NFine.Code;
|
|
using System;
|
|
|
|
namespace NFine.Web.Areas.WMS.Controllers
|
|
{
|
|
public class WareHouseReserveController : ControllerBase
|
|
{
|
|
WareHouseReserveApp App = new WareHouseReserveApp();
|
|
public ActionResult WareHouseReserve()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult WareHouseReserveAdd()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult WareHouseReserveUpdate()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult SeachInvInfo()
|
|
{
|
|
return View();
|
|
}
|
|
[HttpGet]
|
|
public ActionResult GetICSReserve(Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetICSReserve(ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult ICSInspectDetail(string InspectCode, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetICSMOApplyNegDetail(InspectCode, 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 DeleteICSReserve(string keyValue)
|
|
{
|
|
string msg = App.DeleteICSReserve(keyValue);
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
|
|
public ActionResult GetICSReserveTemporary(string ID, Pagination pagination)
|
|
{
|
|
DataTable table = App.GetICSReserveTemporary(ID);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = table
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetInspectDocType(string ID)
|
|
{
|
|
DataTable dt = App.GetInspectDocType(ID);
|
|
return Content(dt.ToJson());
|
|
}
|
|
public void ClearTemp()
|
|
{
|
|
App.ClearTemp();
|
|
}
|
|
|
|
[HttpGet]
|
|
public ActionResult GetReserveInv(string invcode, string WHCode, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetReserveInv(invcode, WHCode, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
public void AddMOApplyNegTemp(string json)
|
|
{
|
|
App.AddMOApplyNegTemp(json);
|
|
}
|
|
|
|
public void UpdateMOApplyNegTemp(string json)
|
|
{
|
|
App.UpdateMOApplyNegTemp(json);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 保存预留信息
|
|
/// </summary>
|
|
/// <param name="keyValue"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult SaveReserve(string ReserveInfo)
|
|
{
|
|
try
|
|
{
|
|
string msg = App.SaveReserve(ReserveInfo);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("添加成功!");
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex.Message);
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 更新预留状态
|
|
/// </summary>
|
|
/// <param name="keyValue"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult UpdateReserveStatus(string IDList, string Status)
|
|
{
|
|
string msg = App.UpdateReserveStatus(IDList.TrimEnd(','), Status);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("添加成功!");
|
|
}
|
|
}
|
|
|
|
public ActionResult GetICSMOApplyNegDetailTemp(string ApplyNegCode, Pagination pagination)
|
|
{
|
|
DataTable table = App.GetICSMOApplyNegDetailTemp(ApplyNegCode);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = table
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
|
|
}
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult UpdateICSMOApplyNeg(string ICSASN)
|
|
{
|
|
|
|
string msg = App.UpdateICSMOApplyNeg(ICSASN);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("修改成功!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|