bklLiudl
2024-07-23 277bbae216debe7e6c04e8cc6ee6e1ba9763e14b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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();
        }
    }
}