username@email.com
5 天以前 a1e963756360f8bd3938aa560b661d0400165c06
CY_ECommercePlatform/CY.WebForm/Pages/business/AgSpecialOrderEdit.aspx.cs
@@ -48,6 +48,10 @@
        public string shukuanhuaceneiye5 = "";
        public string PrintTypeId = "";
        AfterParameterInfoBLL _afterParameterInfoBLL = null;
        OA_ShebeiManageBLL bll_oA_ShebeiManageBLL = null;
        OA_StaffBLL bll_OA_StaffBLL = null;
        public string shebeilist = "";
        public List<OA_ShebeiManage> oA_ShebeiManages = new List<OA_ShebeiManage>();
        //初始化
        public AgSpecialOrderEdit()
        {
@@ -57,6 +61,8 @@
            bll_OA_OutOfStorageBLL = new OA_OutOfStorageBLL();
            bll_EC_CuttingPaperSpecBLL = new EC_CuttingPaperSpecBLL();
            _afterParameterInfoBLL = new AfterParameterInfoBLL();
            bll_oA_ShebeiManageBLL = new OA_ShebeiManageBLL();
            bll_OA_StaffBLL = new OA_StaffBLL();
        }
        //页面加载
@@ -80,6 +86,14 @@
            List<EC_MemberDictionary> m_EC_MemberDictionaryList_paperSpec = bll_EC_MemberDictionaryBLL.SelectListByMemberIdAndParType(CurrentUser.MemberId, "自带纸规格") as List<EC_MemberDictionary>;
            List<EC_MemberDictionary> m_EC_MemberDictionaryList_filmSpec = bll_EC_MemberDictionaryBLL.SelectListByMemberIdAndParType(CurrentUser.MemberId, "自带菲林规格") as List<EC_MemberDictionary>;
            List<EC_MemberDictionary> m_EC_MemberDictionaryList_ctpSpec = bll_EC_MemberDictionaryBLL.SelectListByMemberIdAndParType(CurrentUser.MemberId, "自带CTP规格") as List<EC_MemberDictionary>;
            //初始化设备列表
            var a_ShebeiCate = bll_oA_ShebeiManageBLL.GetDataByType(CurrentUser.MemberId).Where(x => x.Name == "生产设备" || x.Name == "印刷设备" || x.Name == "装订设备").ToList();
            if (a_ShebeiCate != null && a_ShebeiCate.Count > 0)
            {
                oA_ShebeiManages = bll_oA_ShebeiManageBLL.GetDataByCate(CurrentUser.MemberId, a_ShebeiCate[0].Keyid + "," + a_ShebeiCate[1].Keyid + "," + a_ShebeiCate[2].Keyid, true, 2).ToList();
                shebeilist = JsonHelper.GetJsonStringByObject(oA_ShebeiManages);
            }
            Pagination pa = new Pagination();
            pa.PageSize = 15;
@@ -321,12 +335,22 @@
            {
                m_EC_SpecialHoudaosList = new List<EC_SpecialHoudaos>();
                EC_SpecialHoudaos m_EC_SpecialHoudaos = new EC_SpecialHoudaos();
                m_EC_SpecialHoudaos.PSF_Shuliang = _eC_OrderBasic.OrderExtend.SurplusPrintNum.ToString2();
                m_EC_SpecialHoudaos.PSF_Beishu = "1";
                m_EC_SpecialHoudaosList.Add(m_EC_SpecialHoudaos);
                
            }
            var ssssss = _inquiryCommonModel.AfterWorkList;
            var inquiryInsideModels = _inquiryCommonModel.InquiryInsideList;
            List<string> houdaosssss = new List<string>();
            houdaosssss.Add("折页");
            houdaosssss.Add("骑马钉");
            houdaosssss.Add("胶装");
            houdaosssss.Add("压痕");
            houdaosssss.Add("烫金");
            houdaosssss.Add("粘信封");
            houdaosssss.Add("粘页");
            foreach (var c_SpecialHoudaos in m_EC_SpecialHoudaosList)
            {
                List<int> houdaolist = new List<int>();
@@ -385,7 +409,45 @@
                       
                }
                foreach (var houdao in houdaosssss)
                {
                    if (sysInquiry_Afters.Count(x => x.ParameterName == houdao) <= 0)
                    {
                        if (houdao == c_SpecialHoudaos.PSF_Houdaogongxu)
                        {
                            select += "<option value='" + houdao + "' selected=\"selected\" >" + houdao + "</option>";
                        }
                        else
                        {
                            select += "<option value='" + houdao + "' >" + houdao + "</option>";
                        }
                    }
                }
                string houdaoduibi = c_SpecialHoudaos.PSF_Houdaogongxu;
                c_SpecialHoudaos.PSF_Houdaogongxu = select;
                //机长选项
                string selectjizhang = "<option value='0'>请选择</option>";
                if (!string.IsNullOrEmpty(houdaoduibi))
                {
                    var oA_ShebeiManageshoudao = oA_ShebeiManages.Where(x => x.Name.Contains(houdaoduibi));
                    foreach (var a_ShebeiManage in oA_ShebeiManageshoudao)
                    {
                        if (a_ShebeiManage.Zerenren == c_SpecialHoudaos.PSF_JichangId)
                        {
                            selectjizhang += "<option value='" + a_ShebeiManage.Zerenren.Value.ToString() + "' selected=\"selected\" >" + a_ShebeiManage.ZerenrenName + "</option>";
                        }
                        else
                        {
                            selectjizhang += "<option value='" + a_ShebeiManage.Zerenren.Value.ToString() + "' >" + a_ShebeiManage.ZerenrenName + "</option>";
                        }
                    }
                }
                c_SpecialHoudaos.PSF_Jichang = selectjizhang;
            }
            this.RepeaterHoudaoList.DataSource = m_EC_SpecialHoudaosList;
@@ -550,7 +612,7 @@
                string[] selHoudaogongxu = Request["selHoudaogongxu"].ToString2().Split(',');
                string[] txtShuliang = Request["txtShuliang"].ToString2().Split(',');
                string[] txtBeishu = Request["txtBeishu"].ToString2().Split(',');
                string[] txtJichang = Request["txtJichang"].ToString2().Split(',');
                string[] selJichang = Request["selJichang"].ToString2().Split(',');
                string[] txtYaoqiu = Request["txtYaoqiu"].ToString2().Split(',');
                //if (PSF_Forumsid.Length != PSF_Component.Length || PSF_Forumsid.Length != PSF_PNum.Length || PSF_Forumsid.Length != PSF_PressesDesk.Length || PSF_Forumsid.Length != PSF_PrintedColorPositive.Length || PSF_Forumsid.Length != PSF_PrintedColorRear.Length || PSF_Forumsid.Length != PSF_Typesetting.Length || PSF_Forumsid.Length != PSF_PrintedCount.Length || PSF_Forumsid.Length != PSF_PrintedPositive.Length || PSF_Forumsid.Length != PSF_LastNum.Length || PSF_Forumsid.Length != PSF_SheetSource.Length || PSF_Forumsid.Length != PSF_SpecificationsSheet.Length || PSF_Forumsid.Length != PSF_EditionCount.Length || PSF_Forumsid.Length != PSF_PaperSource.Length || PSF_Forumsid.Length != PSF_PaperId.Length || PSF_Forumsid.Length != PSF_PaperName.Length || PSF_Forumsid.Length != PSF_MaterialSpecifications.Length || PSF_Forumsid.Length != PSF_BigPaperCount.Length || PSF_Forumsid.Length != PSF_OpenSpecifications.Length || PSF_Forumsid.Length != PSF_OpenWidth.Length || PSF_Forumsid.Length != PSF_OpenLength.Length || PSF_Forumsid.Length != PSF_Note.Length)
@@ -790,7 +852,7 @@
                                        m_OA_OutOfStorageOld.GoodsId = m_OA_InventoryOld.GoodsId;
                                        m_OA_OutOfStorageOld.CargoSpaceId = 0;
                                        m_OA_OutOfStorageOld.WarehouseId = m_OA_InventoryOld.WarehouseId;
                                        m_OA_OutOfStorageOld.InfoType = "确认出库";
                                        m_OA_OutOfStorageOld.InfoType = "出库";
                                        m_OA_OutOfStorageOld.SuppliersId = 0;
                                        m_OA_OutOfStorageOld.Price = 0;
                                        m_OA_OutOfStorageOld.Quantity = PMS_PaperCount1_NEW[Array.IndexOf(PSF_PaperId_NEW, item)].ToInt32() ?? 0;
@@ -802,7 +864,10 @@
                                        m_OA_OutOfStorageOld.BrandId = m_OA_InventoryOld.BrandId;
                                        m_OA_OutOfStorageOld.PaperWeightId = m_OA_InventoryOld.PaperWeightId;
                                        m_OA_OutOfStorageOld.SpecificationId = m_OA_InventoryOld.SpecificationId;
                                        m_OA_OutOfStorageOld.InventoryId = m_OA_InventoryOld.Keyid;
                                        m_OA_OutOfStorageList.Add(m_OA_OutOfStorageOld);
                                        m_OA_InventoryOld.InventoryCount = m_OA_InventoryOld.InventoryCount - m_OA_OutOfStorageOld.Quantity;
                                        m_OA_InventoryList.Add(m_OA_InventoryOld);
                                    }
                                }
                            }
@@ -816,7 +881,7 @@
                                    m_OA_OutOfStorage.GoodsId = m_OA_Inventory.GoodsId;
                                    m_OA_OutOfStorage.CargoSpaceId = 0;
                                    m_OA_OutOfStorage.WarehouseId = m_OA_Inventory.WarehouseId;
                                    m_OA_OutOfStorage.InfoType = "确认出库";
                                    m_OA_OutOfStorage.InfoType = "出库";
                                    m_OA_OutOfStorage.SuppliersId = 0;
                                    m_OA_OutOfStorage.Price = 0;
                                    if (j == 0)
@@ -839,8 +904,47 @@
                                    m_OA_OutOfStorage.BrandId = m_OA_Inventory.BrandId;
                                    m_OA_OutOfStorage.PaperWeightId = m_OA_Inventory.PaperWeightId;
                                    m_OA_OutOfStorage.SpecificationId = m_OA_Inventory.SpecificationId;
                                    m_OA_OutOfStorage.InventoryId = m_OA_Inventory.Keyid;
                                    m_OA_OutOfStorageList.Add(m_OA_OutOfStorage);
                                    m_OA_Inventory.InventoryCount = m_OA_Inventory.InventoryCount - m_OA_OutOfStorage.Quantity;
                                    m_OA_InventoryList.Add(m_OA_Inventory);
                                }
                            }
                        }
                        var CTPSpecNamei = CTPSpecName[i];
                        var CTPCounti = CTPCount[i];
                        var PSF_Fabantaoshui = PSF_Fabantaoshu[i];
                        if (!string.IsNullOrEmpty(CTPCounti))
                        {
                            OA_Inventory m_OA_InventoryOld = bll_OA_InventoryBLL.SelecetModelDetailInfoList(CurrentUser.MemberId, "", "", "板材", "", CTPSpecNamei).FirstOrDefault();
                            if (m_OA_InventoryOld != null)
                            {
                                OA_OutOfStorage m_OA_OutOfStorageOld = new OA_OutOfStorage();
                                m_OA_OutOfStorageOld.FirmId = CurrentUser.MemberId;
                                m_OA_OutOfStorageOld.GoodsId = m_OA_InventoryOld.GoodsId;
                                m_OA_OutOfStorageOld.CargoSpaceId = 0;
                                m_OA_OutOfStorageOld.WarehouseId = m_OA_InventoryOld.WarehouseId;
                                m_OA_OutOfStorageOld.InfoType = "出库";
                                m_OA_OutOfStorageOld.SuppliersId = 0;
                                m_OA_OutOfStorageOld.Price = 0;
                                m_OA_OutOfStorageOld.Quantity = CTPCounti.ToInt32() ?? 0;
                                if (!string.IsNullOrEmpty(PSF_Fabantaoshui))
                                {
                                    m_OA_OutOfStorageOld.Quantity = m_OA_OutOfStorageOld.Quantity * (PSF_Fabantaoshui.ToInt32() ?? 0);
                                }
                                m_OA_OutOfStorageOld.AllMoney = 0;
                                m_OA_OutOfStorageOld.LastUpdateTime = DateTime.Now;
                                m_OA_OutOfStorageOld.Operator = CurrentUser.ShortName;
                                m_OA_OutOfStorageOld.Remark = "";
                                m_OA_OutOfStorageOld.TanPrice = 0;
                                m_OA_OutOfStorageOld.BrandId = m_OA_InventoryOld.BrandId;
                                m_OA_OutOfStorageOld.PaperWeightId = m_OA_InventoryOld.PaperWeightId;
                                m_OA_OutOfStorageOld.SpecificationId = m_OA_InventoryOld.SpecificationId;
                                m_OA_OutOfStorageOld.InventoryId = m_OA_InventoryOld.Keyid;
                                m_OA_OutOfStorageList.Add(m_OA_OutOfStorageOld);
                                m_OA_InventoryOld.InventoryCount = m_OA_InventoryOld.InventoryCount - m_OA_OutOfStorageOld.Quantity;
                                m_OA_InventoryList.Add(m_OA_InventoryOld);
                            }
                        }
                    }
@@ -853,13 +957,22 @@
                    m_EC_SpecialHoudaos.PSF_Houdaogongxu = selHoudaogongxu[i].ToString2().Replace(",+-+,", ",");
                    m_EC_SpecialHoudaos.PSF_Shuliang = txtShuliang[i] ;
                    m_EC_SpecialHoudaos.PSF_Beishu = txtBeishu[i];
                    m_EC_SpecialHoudaos.PSF_Jichang = txtJichang[i];
                    m_EC_SpecialHoudaos.PSF_JichangId = selJichang[i].ToInt32();
                    if (m_EC_SpecialHoudaos.PSF_JichangId.HasValue && m_EC_SpecialHoudaos.PSF_JichangId.Value > 0)
                    {
                        var oA_Staff = bll_OA_StaffBLL.GetModelByKeyid(m_EC_SpecialHoudaos.PSF_JichangId);
                        if (oA_Staff != null)
                        {
                            m_EC_SpecialHoudaos.PSF_Jichang = oA_Staff.Name;
                        }
                    }
                    else
                    {
                        m_EC_SpecialHoudaos.PSF_Jichang = "";
                    }
                    m_EC_SpecialHoudaos.PSF_Yaoqiu = txtYaoqiu[i].Trim();
                    if(!string.IsNullOrEmpty(m_EC_SpecialHoudaos.PSF_Houdaogongxu)
                        || !string.IsNullOrEmpty(m_EC_SpecialHoudaos.PSF_Shuliang)
                        || !string.IsNullOrEmpty(m_EC_SpecialHoudaos.PSF_Beishu)
                        || !string.IsNullOrEmpty(m_EC_SpecialHoudaos.PSF_Jichang)
                        || !string.IsNullOrEmpty(m_EC_SpecialHoudaos.PSF_Yaoqiu)){
                    if(!string.IsNullOrEmpty(m_EC_SpecialHoudaos.PSF_Houdaogongxu)){
                        m_EC_SpecialHoudaosList.Add(m_EC_SpecialHoudaos);
                    }
                }