From a0d38325a97957b37dd755bf732b63f6f7e2a5ff Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 24 十二月 2024 08:40:48 +0800
Subject: [PATCH] 修改外协付款

---
 CY_ECommercePlatform/CY.WebForm/Pages/business/Waixiefukuanshenqing.aspx.cs |   54 ++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 36 insertions(+), 18 deletions(-)

diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/Waixiefukuanshenqing.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/business/Waixiefukuanshenqing.aspx.cs
index 2ddde12..4d6fe82 100644
--- a/CY_ECommercePlatform/CY.WebForm/Pages/business/Waixiefukuanshenqing.aspx.cs
+++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/Waixiefukuanshenqing.aspx.cs
@@ -78,10 +78,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 +89,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.getSupplierTable(CurrentUser.MemberId).Select("Name = '"+ corporateClients.OutVendorName + "'");
+                        if (sss.Length > 0)
+                        {
+                            this.txtHuming.Value = sss[0]["Huming"].ToString();
+                            this.txtBank.Value = sss[0]["Bank"].ToString();
+                            this.txtAccountID.Value = sss[0]["AccountID"].ToString();
+                        }
+                    }
+
 
                     total = models.Sum(x => x.SumPrice) ?? 0;
 
@@ -99,6 +114,7 @@
 
 
                     ordernjine.InnerText = total.ToString("0.00");
+                    this.txtZengjianmoney.Value = total.ToString("0.00");
                     //khname.InnerText = name;
                     //Dingdanshu.InnerText = orderIdStr.Split(',').Length +"涓�";
                 }
@@ -141,11 +157,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 +194,7 @@
 
 
                         oA_Fukuanshenqing.FirmId = CurrentUser.MemberId;
-                        oA_Fukuanshenqing.SupplierId = this.selSuppliers.Value;
+                        oA_Fukuanshenqing.SupplierId = this.selSuppliersss.Value;
                         oA_Fukuanshenqing.Fukuanshenqingstatus = 0;
                         oA_Fukuanshenqing.ApprovalStatus = 0;
                         oA_Fukuanshenqing.Fukuanmoney = this.txtZengjianmoney.Value.ToDecimal2();
@@ -200,12 +216,14 @@
                         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 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);
 

--
Gitblit v1.9.1