From 79d6bea61cd6f48fbb284e98f4714f722bfee5fe Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 17 六月 2025 14:55:54 +0800
Subject: [PATCH] 提交

---
 CY_ECommercePlatform/CY.WebForm/Pages/business/Waixiefukuanshenqing.aspx.cs |  102 ++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 77 insertions(+), 25 deletions(-)

diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/Waixiefukuanshenqing.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/business/Waixiefukuanshenqing.aspx.cs
index df70e11..6dfd5ad 100644
--- a/CY_ECommercePlatform/CY.WebForm/Pages/business/Waixiefukuanshenqing.aspx.cs
+++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/Waixiefukuanshenqing.aspx.cs
@@ -26,6 +26,7 @@
         OA_StaffBLL bll_OA_StaffBLL = null;
         OA_WorkPlanBll oA_WorkReminderBll = null;
         OA_SuppliersBLL _OA_SuppliersBLL = null;
+        OA_WorkPlan_attachmentBLL oA_WorkPlan_AttachmentBLL = null;
 
 
         //鍒濆鍖�
@@ -38,6 +39,7 @@
             bll_OA_StaffBLL = new OA_StaffBLL();
             oA_WorkReminderBll = new OA_WorkPlanBll();
             _OA_SuppliersBLL = new OA_SuppliersBLL();
+            oA_WorkPlan_AttachmentBLL = new OA_WorkPlan_attachmentBLL();
         }
 
         //椤甸潰鍔犺浇
@@ -78,10 +80,10 @@
             if (!string.IsNullOrEmpty(orderIdStr))
             {
                 this.ordernos.InnerText = orderNoStr.Trim(',');
-                //渚涘簲鍟�
-                this.selSuppliers.DataSource = _OA_SuppliersBLL.getSupplierTable(CurrentUser.MemberId);
-                this.selSuppliers.DataBind();
-                this.selSuppliers.Items.Insert(0, new ListItem("鍏ㄩ儴", ""));
+                ////渚涘簲鍟�
+                //this.selSuppliers.DataSource = _OA_SuppliersBLL.getSupplierTable(CurrentUser.MemberId);
+                //this.selSuppliers.DataBind();
+                //this.selSuppliers.Items.Insert(0, new ListItem("鍏ㄩ儴", ""));
 
                 decimal total = 0;
 
@@ -89,9 +91,24 @@
                 string[] idsArray = orderIdStr.Split(',');
                 if (idsArray != null && idsArray.Length > 0)
                 {
-
-
+                    
+                     
                     var models = _eC_OrderBLL.GetOrderByIds(orderIdStr).ToList();
+                    if (models.Count > 0)
+                    {
+                      var  corporateClients = _oA_CorporateClientsBLL.GetModel(models[0].SellerId);
+                        this.txtSupplierName.Value = corporateClients.OutVendorName;
+                        this.selSuppliersss.Value = corporateClients.Keyid.ToString(); 
+
+                     var sss =   _OA_SuppliersBLL.getSupplierByFirmId(CurrentUser.MemberId, corporateClients.OutVendorName.Trim()).ToList();
+                        if (sss.Count > 0)
+                        {
+                            this.txtHuming.Value = sss[0].Huming;//  ["Huming"].ToString();
+                            this.txtBank.Value = sss[0].Bank; //["Bank"].ToString();
+                            this.txtAccountID.Value = sss[0].AccountID;//["AccountID"].ToString();
+                        }
+                    }
+
 
                     total = models.Sum(x => x.SumPrice) ?? 0;
 
@@ -99,6 +116,7 @@
 
 
                     ordernjine.InnerText = total.ToString("0.00");
+                    this.txtZengjianmoney.Value = total.ToString("0.00");
                     //khname.InnerText = name;
                     //Dingdanshu.InnerText = orderIdStr.Split(',').Length +"涓�";
                 }
@@ -141,11 +159,11 @@
         public void AcceptAll3()
         {
 
-            if (string.IsNullOrEmpty(this.selSuppliers.Value))
-            {
-                JavaScript.MessageBox("璇烽�夋嫨鏀舵鍗曚綅锛�", this);
-                return;
-            }
+            //if (string.IsNullOrEmpty(this.selSuppliers.Value))
+            //{
+            //    JavaScript.MessageBox("璇烽�夋嫨鏀舵鍗曚綅锛�", this);
+            //    return;
+            //}
 
             if (this.txtZengjianmoney.Value.ToDecimal2()<=0)
             {
@@ -178,7 +196,7 @@
 
 
                         oA_Fukuanshenqing.FirmId = CurrentUser.MemberId;
-                        oA_Fukuanshenqing.SupplierId = this.selSuppliers.Value.ToInt32().Value;
+                        oA_Fukuanshenqing.SupplierId = this.selSuppliersss.Value;
                         oA_Fukuanshenqing.Fukuanshenqingstatus = 0;
                         oA_Fukuanshenqing.ApprovalStatus = 0;
                         oA_Fukuanshenqing.Fukuanmoney = this.txtZengjianmoney.Value.ToDecimal2();
@@ -200,15 +218,18 @@
                         oA_Fukuanshenqing.CreateTime = DateTime.Now;
                         oA_Fukuanshenqing.Updater = CurrentUser.ShortName;
                         oA_Fukuanshenqing.LastUpdateTime = DateTime.Now;
+                        //var oA_Suppliers = _OA_SuppliersBLL.getSingleSupplier(this.selSuppliers.Value);
+                        //var _SupplierName = "";
+                        //if (oA_Suppliers != null)
+                        //{
+                        //    _SupplierName = oA_Suppliers.Name;
+                        //}
 
+                        var _SupplierName = this.txtSupplierName.Value;
+                        oA_Fukuanshenqing.SupplierName = _SupplierName;
                         var id = _oA_FukuanshenqingBLL.InsertModel(oA_Fukuanshenqing);
 
-                        var oA_Suppliers = _OA_SuppliersBLL.getSingleSupplier(this.selSuppliers.Value);
-                        var _SupplierName = "";
-                        if (oA_Suppliers != null)
-                        {
-                            _SupplierName = oA_Suppliers.Name;
-                        }
+                       
 
                         //闇�瑕佹坊鍔犲鎵逛俊鎭�
                         DateTime nowTime = DateTime.Now;
@@ -244,24 +265,55 @@
 
                             m_OA_WorkPlan.Operator = CurrentUser.ShortName;
                             m_OA_WorkPlan.PlanComplany = id.ToString();
-                            m_OA_WorkPlan.PlanContent = orderNoStr + " 澶栧崗浠樻鐢宠銆傝鍗曢噾棰濓細"+ this.ordernjine.InnerText + ", 鏀舵鍗曚綅锛�"+ _SupplierName;
+                            m_OA_WorkPlan.PlanContent = orderNoStr + "锛岃鍗曢噾棰濓細" + this.ordernjine.InnerText + ", 鏀舵鍗曚綅锛�"+ _SupplierName + "銆�" ;
                             m_OA_WorkPlan.PlanDataType = 14;
                             m_OA_WorkPlan.PlanMoney = oA_Fukuanshenqing.Fukuanmoney;
                             m_OA_WorkPlan.PlanRemark = oA_Fukuanshenqing.remark;
                             m_OA_WorkPlan.PlanRunTime = DateTime.Now;
-                            m_OA_WorkPlan.PlanTitle = orderNoStr + " 澶栧崗浠樻鐢宠"; 
+                            m_OA_WorkPlan.PlanTitle =  "璁㈠崟閲戦锛�" + this.ordernjine.InnerText + ", 鏀舵鍗曚綅锛�" + _SupplierName + "銆�"; 
                             m_OA_WorkPlan.PlanType = 3;
                             m_OA_WorkPlan.LastUpdateTime = nowTime;
-                        result = oA_WorkReminderBll.InsertModel(m_OA_WorkPlan);
+                        var workid = oA_WorkReminderBll.InserModelAndGetId(m_OA_WorkPlan);
+                        m_OA_WorkPlan.Keyid = workid;
+                        if (workid > 0)
+                        {
+                            var HideKeyidFapiao = Request["HideKeyidFapiao"].Split(',');
+                            var HideAttachmentFapiao = Request["HideAttachmentFapiao"].Split(',');
+                            for (int i = 0; i < HideKeyidFapiao.Length; i++)
+                            {
+                                if (HideKeyidFapiao[i] != "0")
+                                {
+                                    var a_WorkPlan_Attachment = new OA_WorkPlan_attachment();
+                                    a_WorkPlan_Attachment.OA_WorkPlanId = m_OA_WorkPlan.Keyid;
+                                    a_WorkPlan_Attachment.AttachmentType = 14;
+                                    a_WorkPlan_Attachment.PlanAttachment = HideAttachmentFapiao[i];
+                                    a_WorkPlan_Attachment.CreateTime = DateTime.Now;
+                                    a_WorkPlan_Attachment.Operator = CurrentUser.TrueName;
+                                    var sss = oA_WorkPlan_AttachmentBLL.InsertModel(a_WorkPlan_Attachment);
+                                }
+                                else
+                                {
+                                    continue;
+                                }
+                            }
+
+
+                             
+
+                          
+
+
+                           
+                        }
+                        result = true;
 
 
 
 
-                      
 
-                        
-                     
-                        
+
+
+
 
                         if (!result)
                         {

--
Gitblit v1.9.1