using BLL;
|
using Common;
|
using Lib;
|
using Model;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Web.Mvc;
|
|
namespace wms.Areas.Business.Controllers
|
{
|
public class PalletOutController : MasterPage
|
{
|
// GET: Business/PalletOut
|
[LoginFilter]
|
public ActionResult Index()
|
{
|
ViewBag.Title = "空托盘出库";
|
ViewBag.StatuList = LocalHelper.GetDictionaryCodeHtml("CDStatu");
|
ViewBag.AccessCode = LocalHelper.GetDictionaryCodeHtml("Access", this.LoginAccessCode);
|
return View();
|
}
|
|
[LoginFilter]
|
public ActionResult AddPallet()
|
{
|
string OrdNo = Request.QueryString.Get("OrdNo");
|
Session["TEMPDATA_CACHE_ERPOUTPRODUCT"] = null;
|
if (string.IsNullOrEmpty(OrdNo))
|
{
|
ViewBag.Admin = new ErpOut();
|
ViewBag.OrdTypeList = LocalHelper.GetOrdTypeList(string.Empty);
|
}
|
else
|
{
|
DALPalletOut provider = new DALPalletOut();
|
IList<StorePalno> erpMats = new List<StorePalno>();
|
ErpOut entity = provider.GetModel(OrdNo, ref erpMats);
|
Session["TEMPDATA_CACHE_ERPOUTPRODUCT"] = erpMats;
|
entity = entity == null ? new ErpOut() : entity;
|
ViewBag.OrdTypeList = LocalHelper.GetOrdTypeList(entity.OrdType);
|
ViewBag.Admin = entity;
|
}
|
|
return View();
|
}
|
|
[LoginFilter]
|
public ActionResult AddProduct()
|
{
|
|
string palno = Request.QueryString.Get("palno");
|
if (palno.IsEmpty())
|
{
|
ViewBag.Admin = new StorePalno();
|
}
|
else
|
{
|
List<StorePalno> list = Session["TEMPDATA_CACHE_ERPOUTPRODUCT"] as List<StorePalno>;
|
List<StorePalno> list1 = new List<StorePalno>();
|
if (palno != "" && palno != null)
|
{
|
list1 = list.Where(a => a.Palno == palno && a.Palno == palno).ToList<StorePalno>();
|
}
|
DALErpOut provider = new DALErpOut();
|
list1[0].Quant = provider.GetLogStore("", palno, "");
|
ViewBag.Admin = list1[0];
|
}
|
return View();
|
}
|
|
[LoginFilter]
|
public ActionResult AddPalletZ()
|
{
|
//string OrdNo = Request.QueryString.Get("OrdNo");
|
//Session["TEMPDATA_CACHE_ERPOUTPRODUCT"] = null;
|
//if (string.IsNullOrEmpty(OrdNo))
|
//{
|
// ViewBag.Admin = new ErpOut();
|
// ViewBag.OrdTypeList = LocalHelper.GetOrdTypeList(string.Empty);
|
//}
|
//else
|
//{
|
// DALPalletOut provider = new DALPalletOut();
|
// IList<StorePalno> erpMats = new List<StorePalno>();
|
// ErpOut entity = provider.GetModel(OrdNo, ref erpMats);
|
// Session["TEMPDATA_CACHE_ERPOUTPRODUCT"] = erpMats;
|
// entity = entity == null ? new ErpOut() : entity;
|
// ViewBag.OrdTypeList = LocalHelper.GetOrdTypeList(entity.OrdType);
|
// ViewBag.Admin = entity;
|
//}
|
|
return View();
|
}
|
}
|
}
|