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.
253 lines
6.2 KiB
253 lines
6.2 KiB
using NFine.Application.WMS;
|
|
using System.Data;
|
|
using System.Web.Mvc;
|
|
using NFine.Code;
|
|
|
|
|
|
namespace NFine.Web.Areas.WMS.Controllers
|
|
{
|
|
public class PurOrderController : ControllerBase
|
|
{
|
|
|
|
PurOrderApp App = new PurOrderApp();
|
|
// GET: WMS/ProductionIssue
|
|
public ActionResult ICSPurOrder()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
|
|
public ActionResult ICSPurOrderAdd()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
public ActionResult SeachICSPurOrder()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult SeachInventory()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
public ActionResult ICSPurOrderUpdate()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
public ActionResult GetICSMOApplyNeg(Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetICSMOApplyNeg(ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetICSMOApplyNegDetail(string POCode, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetICSMOApplyNegDetail(POCode, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
public ActionResult GetINV(string invcode, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetINV(invcode, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
public ActionResult GetICSMOPickLog(string invcode, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetICSMOPickLog(invcode, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
|
|
public ActionResult GetICSReturnTemporary(string rfqno, Pagination pagination)
|
|
{
|
|
DataTable table = App.GetICSReturnTemporary(rfqno);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = table
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
|
|
}
|
|
|
|
|
|
//[httpget]
|
|
//[handlerajaxonly]
|
|
//public actionresult getwhcode()
|
|
//{
|
|
// datatable dt = app.getwhcode();
|
|
// return content(dt.tojson());
|
|
//}
|
|
|
|
public void AddPurOrderTemp(string json)
|
|
{
|
|
App.AddPurOrderTemp(json);
|
|
}
|
|
|
|
public ActionResult DeleteMopick(string json)
|
|
{
|
|
|
|
return Content(App.DeleteMopick(json));
|
|
|
|
}
|
|
|
|
|
|
public void ClearTemp()
|
|
{
|
|
App.ClearTemp();
|
|
}
|
|
|
|
//[HttpPost]
|
|
//[HandlerAjaxOnly]
|
|
public ActionResult SaveICSPurOrder(string ICSASN)
|
|
{
|
|
|
|
string msg = App.SaveICSPurOrder(ICSASN);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("添加成功!");
|
|
}
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult UpdateICSPurOrder(string ICSASN)
|
|
{
|
|
|
|
string msg = App.UpdateICSPurOrder(ICSASN);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("修改成功!");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取文本框值
|
|
/// </summary>
|
|
/// <param name="POCode"></param>
|
|
/// <param name="PORow"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetInputValue(string ID)
|
|
{
|
|
DataTable ListData = App.GetInputValue(ID);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
public ActionResult GetICSMOApplyNegDetailTemp(string PoCode, Pagination pagination)
|
|
{
|
|
DataTable table = App.GetICSMOApplyNegDetailTemp(PoCode);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = table
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
|
|
}
|
|
|
|
public void UpdateMOApplyNegTemp(string json)
|
|
{
|
|
App.UpdateMOApplyNegTemp(json);
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult AuditICSPurOrder(string ICSASN)
|
|
{
|
|
|
|
string msg = App.AuditICSPurOrder(ICSASN);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("操作成功!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult DeleteICSPurchaseOrder(string keyValue)
|
|
{
|
|
string msg = App.DeleteICSPurchaseOrder(keyValue);
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|