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.
169 lines
4.8 KiB
169 lines
4.8 KiB
using NFine.Application.WMS;
|
|
using NFine.Code;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
|
|
namespace NFine.Web.Areas.WMS.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 红字采购入库(委外)
|
|
/// </summary>
|
|
public class ICSOutsourcingReceiveController : ControllerBase
|
|
{
|
|
ICSOutsourcingReceiveApp App = new ICSOutsourcingReceiveApp();
|
|
// GET: WMS/ICSOutsourcingReceive
|
|
public ActionResult ICSOutsourcingReceiveApplyNeg()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult ICSOutsourcingReceiveApplyNegAdd()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult ICSOutsourcingReceiveApplyNegUpdate()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult SeachICSOutsourcingReceive()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult SeachInventory()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetOutsourcingReceiveApplyNegDetail(string ApplyNegCode, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetOutsourcingReceiveApplyNegDetail(ApplyNegCode, 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 DeleteICSOutsourcingReceiveApplyNeg(string keyValue)
|
|
{
|
|
string msg = App.DeleteICSOutsourcingReceiveApplyNeg(keyValue);
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 汇总
|
|
/// </summary>
|
|
/// <param name="pagination"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public ActionResult GetOutsourcingReceiveApplyNeg(Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetOutsourcingReceiveApplyNeg(ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
/// <summary>
|
|
/// 修改弹出框的数据来源
|
|
/// </summary>
|
|
/// <param name="RCVCode"></param>
|
|
/// <param name="pagination"></param>
|
|
/// <returns></returns>
|
|
public ActionResult GetICSOutsourcingReceiveReturnTemporary(string RCVCode, Pagination pagination)
|
|
{
|
|
DataTable table = App.GetICSOutsourcingReceiveReturnTemporary(RCVCode);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = table
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
|
|
}
|
|
public ActionResult GetOOCode(string WorkPoint)
|
|
{
|
|
try
|
|
{
|
|
string Code = App.GetCode(WorkPoint);
|
|
var JsonData = new
|
|
{
|
|
Code = Code,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex.Message);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 新增
|
|
/// </summary>
|
|
/// <param name="ICSASN"></param>
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult SaveICSOutsourcingReceiveApplyNeg(string ICSASN)
|
|
{
|
|
|
|
string msg = App.SaveICSOutsourcingReceiveApplyNeg(ICSASN);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("添加成功!");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 修改
|
|
/// </summary>
|
|
/// <param name="ICSASN"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult UpdateICSOutsourcingReceiveApplyNeg(string ICSASN)
|
|
{
|
|
|
|
string msg = App.UpdateICSOutsourcingReceiveApplyNeg(ICSASN);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("修改成功!");
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|