//入库标识工程类
        public ActionResult RKBSGCL()
        {
            ZMMFUN_PURBS_READ node = new ZMMFUN_PURBS_READ();

            if (Session["PRINTRKBS_GCL"] != null)
            {
                node = (ZMMFUN_PURBS_READ)Session["PRINTRKBS_GCL"];
            }
            ViewBag.model = node;
            return(View());
        }
        public string AnalysePrintData(string type, int status, IList <POItemInfo> itemNodes)
        {
            string     pageSize = "";
            string     message  = "";
            HttpCookie cookie   = Request.Cookies.Get("IQCPMPageSize");

            if (type == "RKBS")
            {
                if (itemNodes.Count > 0)
                {
                    //int count = itemNodes.ToList().FindIndex(p => string.IsNullOrEmpty(p.Material));
                    //if (count != -1)
                    //{
                    //    return "采购订单" + itemNodes[count].PONumber + "/" + itemNodes[count].Number + "没有物料号无法查询入库标识";
                    //}
                    Session["RKBS_PONumber"] = itemNodes[0].PONumber;
                    Session["RKBS_Number"]   = itemNodes[0].Number;

                    if (itemNodes[0].Vendor == null)
                    {
                        AccountInfo account = (AccountInfo)Session["Account"];
                        itemNodes[0].Vendor = account.ID;
                    }
                    Session["RKBS_Vendor"]              = itemNodes[0].Vendor;
                    Session["RKBS_NeedQty"]             = itemNodes[0].DelivQty;
                    Session["RKBS_PcsInCtn"]            = itemNodes[0].PcsInCtn;
                    Session["RKBS_PcsInPal"]            = itemNodes[0].PcsInPal;
                    Session["RKBS_Material"]            = itemNodes[0].Material;
                    Session["RKBS_MaterialDescription"] = itemNodes[0].MaterialDescription;
                }
            }
            else if (type == "RKBSZH")
            {
                if (itemNodes.Count > 0)
                {
                    IList <ZSL_BCS104> PLIST = new List <ZSL_BCS104>();
                    foreach (POItemInfo pi in itemNodes)
                    {
                        ZSL_BCS104 node = new ZSL_BCS104();
                        node.Ebeln = pi.PONumber;
                        node.Ebelp = pi.Number.ToString().PadLeft(5, '0');
                        PLIST.Add(node);
                    }

                    if (itemNodes[0].Vendor == null)
                    {
                        AccountInfo account = (AccountInfo)Session["Account"];
                        itemNodes[0].Vendor = account.ID;
                    }
                    int    GLTS = 0;
                    string DYFS = "V";
                    string USER = itemNodes[0].Vendor;
                    string MODE = "Y";
                    int    FS   = 1;

                    message = models.PurchaseOrder.GenerateStorageIdentificationZH(GLTS, DYFS, USER, MODE, FS, PLIST).Trim();
                    if (message == "")
                    {
                        Session["RKBSZH_POLIST"] = models.PurchaseOrder.GetStorageIdentificationZHList(GLTS, DYFS, USER, MODE, FS, PLIST);
                    }
                }
            }
            else if (type == "RKBSGCL")
            {
                List <ZSL_BCS303_CT> nodes = new List <ZSL_BCS303_CT>();
                for (int i = 0; i < itemNodes.Count; i++)
                {
                    ZSL_BCS303_CT node = new ZSL_BCS303_CT();
                    node.Ebeln = itemNodes[i].PONumber.ToString();
                    node.Ebelp = itemNodes[i].Number.ToString();
                    nodes.Add(node);
                }


                ZMMFUN_PURBS_READ res = models.PurchaseOrder.ZMMFUN_PURBS_READ(nodes);
                if (res.MES_RETURN.TYPE.Equals("S"))
                {
                    Session["PRINTRKBS_GCL"] = models.PurchaseOrder.ZMMFUN_PURBS_READ(nodes);
                }
                else
                {
                    message = res.MES_RETURN.MESSAGE;
                }

                //Session["PRINTRKBS_GCL"] = res;
            }
            else
            {
                if (cookie != null)
                {
                    pageSize = cookie.Value;
                }
                if (itemNodes != null)
                {
                    //List<POInfoClassify> a = models.PurchaseOrder.AnalysePrintData(type, status, pageSize, itemNodes);
                    //object b = a[0].Children[0].Items[0].CustomText;
                    if (Session["Account"] != null && (type == "IQCPM" || type == "DeliveryF"))
                    {
                        AccountInfo account = (AccountInfo)Session["Account"];
                        foreach (var item in itemNodes)
                        {
                            if (string.IsNullOrEmpty(item.Vendor))
                            {
                                item.Vendor = account.ID;
                            }
                            if (string.IsNullOrEmpty(item.LNAME))
                            {
                                item.LNAME = account.Name;
                            }
                        }
                    }
                    Session["PrintData"] = models.PurchaseOrder.AnalysePrintData(type, status, pageSize, itemNodes, Session["crmtoken"] == null ? "" : Session["crmtoken"].ToString());
                }
                else
                {
                    message = "数据异常!";
                }
            }

            return(message);
        }