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.
204 lines
5.7 KiB
204 lines
5.7 KiB
using NFine.Application.WMS;
|
|
using System.Data;
|
|
using System.Web.Mvc;
|
|
using NFine.Code;
|
|
|
|
namespace NFine.Web.Areas.WMS.Controllers
|
|
{
|
|
public class WareHouseLotinspectionController : ControllerBase
|
|
{
|
|
WareHouseLotinspectionApp App = new WareHouseLotinspectionApp();
|
|
private string result;
|
|
|
|
public ActionResult WareHouseLotinspection()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult WareHouseLotinspectionAdd()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult WareHouseLotinspectionUpdate()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult SeachInspectLot()
|
|
{
|
|
return View();
|
|
}
|
|
[HttpGet]
|
|
public ActionResult GetICSInspect(Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetICSInspect(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 DeleteICSInspect(string keyValue)
|
|
{
|
|
string msg = App.DeleteICSInspect(keyValue);
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
|
|
public ActionResult GetICSInspectTemporary(string InspectCode, Pagination pagination)
|
|
{
|
|
DataTable table = App.GetICSInspectTemporary(InspectCode);
|
|
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());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetInspectDept(string ID)
|
|
{
|
|
DataTable dt = App.GetInspectDept(ID);
|
|
return Content(dt.ToJson());
|
|
}
|
|
public void ClearTemp()
|
|
{
|
|
App.ClearTemp();
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult SeachInspectLotcheck(string lotNo)
|
|
{
|
|
string dtl = App.SeachInspectLotcheck(lotNo);
|
|
return Content(result);
|
|
}
|
|
|
|
|
|
|
|
[HttpGet]
|
|
public ActionResult GetInspectLot(string invcode, string WHCode, string InspectType, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetInspectLot(invcode, WHCode, InspectType, 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);
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult SaveInspect(string LotNOList, string DocType, string DeptCode, string Memo)
|
|
{
|
|
|
|
string msg = App.SaveInspect(LotNOList, DocType, DeptCode, Memo);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("添加成功!");
|
|
}
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult UpdateInspect(string InspectCode, string LotNOList, string DeptCode, string Memo)
|
|
{
|
|
|
|
string msg = App.UpdateInspect(InspectCode, LotNOList, DeptCode, Memo);
|
|
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("修改成功!");
|
|
}
|
|
}
|
|
}
|
|
}
|