From a7e05ebe00fdcb649c012e5afc4a42a8d631e824 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期三, 02 四月 2025 08:38:24 +0800
Subject: [PATCH] 删除客户管理查询条件中的“客户编号” 完成  新增订单---黑白印件  的后道工序最右边增加一个“口 竖式”,同前面套号、压痕一样,默认不勾选,是竖式的业务经理自己下单时勾选  完成提交外协付款申请时,增加上传审批证明的上传图片功能,可以添加多张图片;查询列表中增加“付款状态:全部、已付款、未付款”查询条件,默认全部;“完工状态”改为默认未完工   完成请示批复----付款申请  中也要向上面的需求一样,增加上传审批证明的上传图片功能,可以添加多张图片   完成在“请示批复”中进行“批复”操作的时候要能查看上传的审批图片  完成包装要求”要显示在打印的订单中 完成包装要求”要显示在打印的订单中 完成收据联单的新增订单中,纸张选无碳纸时,不显示“品牌”、“克重”,在联数的后面增加颜色选择:“颜色:上白下红”(匹配联数)订单管理中的“订单状态”删除,删除后新增两个状态:“完工状态:全部、未完工、已完工”和“送货状态:全部、已送货、未送货”  完成请示批复中默认“未批复”   完成请示批复中默认“未批复”   完成

---
 CY_ECommercePlatform/CY.WebForm/Pages/procurement/SuppliersEdit.aspx.cs |  161 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 159 insertions(+), 2 deletions(-)

diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/procurement/SuppliersEdit.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/procurement/SuppliersEdit.aspx.cs
index 73fcd00..00f3b7f 100644
--- a/CY_ECommercePlatform/CY.WebForm/Pages/procurement/SuppliersEdit.aspx.cs
+++ b/CY_ECommercePlatform/CY.WebForm/Pages/procurement/SuppliersEdit.aspx.cs
@@ -23,6 +23,7 @@
         OA_SuppliersBLL _OA_SuppliersBLL = null;
         OA_BrandBLL _OA_BrandBLL = null;
         OA_SuppliersOtherQualificationBLL _OA_SuppliersOtherQualificationBLL = null;
+        OA_CorporateClientsBLL bll_OA_CorporateClientsBLL = null;
         public string[] Fileds;
 
         public SuppliersEdit()
@@ -32,6 +33,7 @@
             _Sys_DictionaryBLL = new Sys_DictionaryBLL();
             supplier = new OA_Suppliers();
             _OA_SuppliersBLL = new OA_SuppliersBLL();
+            bll_OA_CorporateClientsBLL = new OA_CorporateClientsBLL();
 
         }
 
@@ -54,7 +56,7 @@
             selCooperativeStateId.DataBind();
             selSuppliersLevelId.DataSource = _Sys_DictionaryBLL.GetDataByType("渚涘簲鍟嗙骇鍒�");
             selSuppliersLevelId.DataBind();
-            selSuppliersTypeId.DataSource = _Sys_DictionaryBLL.GetDataByType("渚涘簲鍟嗙被鍒� ");
+            selSuppliersTypeId.DataSource = _Sys_DictionaryBLL.GetDataByType("渚涘簲鍟嗙被鍒� ").OrderBy(x=>x.LastUpdateTime);
             selSuppliersTypeId.DataBind();
         }
 
@@ -83,6 +85,7 @@
             this.txtOfficersMobile.Value = supplier.OfficersMobile;
             this.txtOfficersQQ.Value = supplier.OfficersQQ;
             this.txtBank.Value = supplier.Bank;
+            this.txtHuming.Value = supplier.Huming;
             this.txtAccountID.Value = supplier.AccountID;
             this.txtPostcode.Value = supplier.Postcode;
             this.txtQQ.Value = supplier.QQ;
@@ -127,6 +130,151 @@
             if (Request["Keyid"].ToInt32() > 0)
             {
                 supplier = _OA_SuppliersBLL.getSingleSupplier(Request["Keyid"].ToString2());
+
+                var sss = _OA_SuppliersBLL.getSupplierByFirmId(CurrentUser.MemberId, this.txtName.Value.Trim()).ToList();
+                if (sss.Count > 0)
+                {
+                    if(sss.Count(x => x.Keyid != supplier.Keyid) > 0)
+                    {
+                        JavaScript.MessageBox("宸叉湁鍚屽悕渚涘簲鍟嗭紒", this);
+                        return;
+                    }
+                }
+            }
+            else
+            {
+                var sss = _OA_SuppliersBLL.getSupplierByFirmId(CurrentUser.MemberId, this.txtName.Value.Trim()).ToList();
+                if (sss.Count > 0)
+                {
+                    JavaScript.MessageBox("宸叉湁鍚屽悕渚涘簲鍟嗭紒", this);
+                    return;
+                }
+                var suptypeid = this.selSuppliersTypeId.Value.ToInt32();
+               var sys_Dictionary  = _Sys_DictionaryBLL.GetDataByType("渚涘簲鍟嗙被鍒� ").Where(x=>x.Keyid == suptypeid).FirstOrDefault();
+                if (sys_Dictionary!=null && sys_Dictionary.Name == "澶栧崗鍔犲伐")
+                {
+                    Pagination pa = new Pagination();
+                    pa.PageSize = 500;
+                    pa.PageIndex = 1;
+                    //鏌ヨ鏄惁鏈夊悓鍚嶇殑澶栧崗
+                    var ss = bll_OA_CorporateClientsBLL.SelectModelPage(pa, CurrentUser.MemberId, "").Where(x=>x.OutVendorName == this.txtName.Value.Trim()).ToList();
+                    if (ss.Count == 0)
+                    {
+                        //鏂板澶栧崗鍘傚晢
+                        OA_CorporateClients m_OA_CorporateClients = new OA_CorporateClients();
+                        OA_CustomerCommunications m_OA_CustomerCommunications = new OA_CustomerCommunications();
+                        EC_AcceptWayByCustomers m_EC_AcceptWayByCustomers = new EC_AcceptWayByCustomers();
+                        EC_MemberBasic m_EC_MemberBasic = new EC_MemberBasic();
+                        Guid NewGuid = Guid.NewGuid();
+                        #region 鍒濆鍚堜綔瀹㈡埛鍩虹淇℃伅
+                        m_OA_CorporateClients.CompanyName = CurrentUser.Name;
+                        m_OA_CorporateClients.CustomerIndustriesId = 0;
+                        m_OA_CorporateClients.CustomerTypeId = 0;
+                        m_OA_CorporateClients.SourcesInfoId = 0;
+                        m_OA_CorporateClients.DegreeImportanId = 0;
+                        m_OA_CorporateClients.AccountManagerId = 0;
+                        m_OA_CorporateClients.BusinessManagerId = 0;
+
+                        m_OA_CorporateClients.CreditId = 0;
+                        m_OA_CorporateClients.LoginPhone = "";
+                        m_OA_CorporateClients.CorporateWebsite = "";
+                        m_OA_CorporateClients.BusinessAnalysisId = 0;
+                        m_OA_CorporateClients.IsLoginCorporateWeb = false;
+                        m_OA_CorporateClients.Credit = 0;
+                        m_OA_CorporateClients.Bank = "";
+                        m_OA_CorporateClients.TaxID = "";
+                        m_OA_CorporateClients.AccountID = "";
+                        m_OA_CorporateClients.OrderCount = 0;
+                        m_OA_CorporateClients.OrderMoney = 0;
+
+                        m_OA_CorporateClients.Prepayments = 0;
+                        m_OA_CorporateClients.IsOutsourcing = true;
+                        m_OA_CorporateClients.OutVendorName = this.txtName.Value.Trim();
+                        m_OA_CorporateClients.IsPriority = false;
+                        m_OA_CorporateClients.CumulativePrepayments = 0;
+                        m_OA_CorporateClients.LastUpdateTime = DateTime.Now;
+                        m_OA_CorporateClients.Operator = CurrentUser.ShortName;
+                        m_OA_CorporateClients.Remark = "";
+                        m_OA_CorporateClients.OutRate = 1;
+                        m_OA_CorporateClients.LoginPwd = "";
+
+                        #endregion
+
+                        #region 鍒濆鍚堜綔瀹㈡埛閫氳淇℃伅
+                        m_OA_CustomerCommunications.Province = CurrentUser.Province;
+                        m_OA_CustomerCommunications.City = CurrentUser.City;
+                        m_OA_CustomerCommunications.County = CurrentUser.County;
+                        m_OA_CustomerCommunications.DetailedAddress = CurrentMemberExtend.DetailedAddress;
+                        m_OA_CustomerCommunications.CompanyPhone = CurrentMemberExtend.PhoneNum;
+                        m_OA_CustomerCommunications.Postcode = CurrentMemberExtend.Postcode;
+                        m_OA_CustomerCommunications.Mobile = CurrentMemberExtend.MobileNum;
+                        m_OA_CustomerCommunications.Fax = CurrentMemberExtend.Fax;
+                        m_OA_CustomerCommunications.Email = CurrentMemberExtend.Email;
+                        m_OA_CustomerCommunications.QQ = CurrentMemberExtend.QQ;
+                        m_OA_CustomerCommunications.LegalRepresentative = "";
+                        m_OA_CustomerCommunications.LegalMobile = "";
+                        m_OA_CustomerCommunications.LegalQQ = "";
+                        m_OA_CustomerCommunications.BusinessManagers = "";
+                        m_OA_CustomerCommunications.ManagersMobile = "";
+                        m_OA_CustomerCommunications.ManagersQQ = "";
+                        m_OA_CustomerCommunications.FinancialOfficers = "";
+                        m_OA_CustomerCommunications.OfficersMobile = "";
+                        m_OA_CustomerCommunications.OfficersQQ = "";
+                        m_OA_CustomerCommunications.Remark = "";
+                        m_OA_CustomerCommunications.LastUpdateTime = DateTime.Now;
+                        m_OA_CustomerCommunications.Operator = CurrentUser.ShortName;
+                        #endregion
+
+                        #region 鍒濆鍚堜綔瀹㈡埛鏀惰揣鍦板潃
+                        m_EC_AcceptWayByCustomers.AcceptTypeId = 0;
+                        m_EC_AcceptWayByCustomers.InvoiceDemand = "";
+                        m_EC_AcceptWayByCustomers.Remark = "";
+                        m_EC_AcceptWayByCustomers.LastUpdateTime = DateTime.Now;
+                        m_EC_AcceptWayByCustomers.Operator = CurrentUser.ShortName;
+
+                        m_EC_AcceptWayByCustomers.City = "";
+                        m_EC_AcceptWayByCustomers.Accepter = "";
+                        m_EC_AcceptWayByCustomers.AccepterPhone = "";
+                        m_EC_AcceptWayByCustomers.AppointCourierCompany = "";
+                        m_EC_AcceptWayByCustomers.AccepterAddress = "";
+                        m_EC_AcceptWayByCustomers.AccepterPhoneNum = "";
+                        m_EC_AcceptWayByCustomers.AcceptContacts = "";
+                        m_EC_AcceptWayByCustomers.FetchAddress = "";
+                        m_EC_AcceptWayByCustomers.FetchPhoneNum = "";
+                        m_EC_AcceptWayByCustomers.FetchContacts = "";
+
+                        #endregion
+
+                        m_OA_CorporateClients.Keyid = NewGuid;
+                        m_OA_CorporateClients.CreateTime = DateTime.Now;
+                        m_OA_CorporateClients.MemberId = CurrentUser.MemberId;
+                        m_OA_CorporateClients.FirmId = NewGuid;
+                        m_OA_CorporateClients.InquiryId = AdminAccount.MemberId;
+                        m_OA_CorporateClients.CustomerId = bll_OA_CorporateClientsBLL.GetLastIdByFirmId(m_OA_CorporateClients.FirmId) + 1;
+
+                        m_OA_CustomerCommunications.Keyid = NewGuid;
+                        m_EC_AcceptWayByCustomers.TargetId = NewGuid;
+                        m_OA_CorporateClients.Paytime = 0;
+                        m_OA_CorporateClients.Paydays = 0;
+                        m_OA_CorporateClients.Biddingcompany = 0;
+                        m_OA_CorporateClients.Contracttype = 0;
+                        m_OA_CorporateClients.Contractmoney = 0;
+                        m_OA_CorporateClients.Jigoudaima = "";
+                        m_OA_CorporateClients.Piaoju = 0;
+                        m_OA_CorporateClients.Kaipiaoziliao = "";
+                        m_OA_CorporateClients.Expiretype = 0;
+                        m_OA_CorporateClients.Shifouwanjie = 2;
+                        m_OA_CorporateClients.Note = "";
+                        bool result = bll_OA_CorporateClientsBLL.InsertModel(m_OA_CorporateClients, m_OA_CustomerCommunications, m_EC_AcceptWayByCustomers);//娣诲姞淇℃伅
+                        if (!result)
+                        {
+                            JavaScript.MessageBox("娣诲姞澶辫触", this);
+                            return;
+                        }
+                         
+                            
+                    }
+                }
             }
 
 
@@ -220,9 +368,18 @@
             supplier.LegalRepresentative = this.txtLegalRepresentative.Value;
             supplier.ManagersMobile = this.txtManagersMobile.Value;
             supplier.ManagersQQ = this.txtManagersQQ.Value;
-            supplier.Name = this.txtName.Value;
+            supplier.Name = this.txtName.Value.Trim();
             supplier.OfficersMobile = this.txtOfficersMobile.Value;
             supplier.OfficersQQ = this.txtOfficersQQ.Value;
+            if (!string.IsNullOrEmpty(this.txtHuming.Value))
+            {
+                supplier.Huming = this.txtHuming.Value;
+            }
+            else
+            {
+                supplier.Huming = this.txtName.Value;
+            }
+           
             supplier.Bank = this.txtBank.Value;
             supplier.AccountID = this.txtAccountID.Value;
             supplier.Postcode = this.txtPostcode.Value;

--
Gitblit v1.9.1