From c4867cf5e5f78cfb924a3048bd0c4232d4a1e986 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期四, 19 十二月 2024 08:33:44 +0800
Subject: [PATCH] 新增审批  付款申请   再付款申请中操作其他付款付款   生产管理里边点采购的供应商修改

---
 CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingConfirm.aspx.cs |  150 +++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 141 insertions(+), 9 deletions(-)

diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingConfirm.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingConfirm.aspx.cs
index 1b70e3c..11a0de3 100644
--- a/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingConfirm.aspx.cs
+++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingConfirm.aspx.cs
@@ -39,6 +39,7 @@
         LF_OrderFileBLL _lF_OrderFileBLL = null;
         EC_OrderBLL _eC_OrderBLL = null;
         OA_KaipiaoshenqingBLL oA_KaipiaoshenqingBLL = null;
+
         /// <summary>
         /// 鍒濆鍖栨瀯閫�
         /// </summary>
@@ -259,19 +260,123 @@
         private void Accept()
         {
             Response.Clear();
-            PayAbout payAbout = new PayAbout();
-            payAbout.LoadNewestPaymentAccount(true);
-            double? commission = MyConvert.ConvertToDouble(CY.Config.WebInfo.Instance.FirmOrderAgencyFee);
-            int? orderId = string.IsNullOrEmpty(Request["id"]) ? null : MyConvert.ConvertToInt32(Request["id"]);
-            if (!orderId.HasValue || !commission.HasValue)
+
+
+            var orderId = string.IsNullOrEmpty(Request["id"]) ? Guid.Empty : MyConvert.ConvertToGuid(Request["id"]);
+            if ( orderId == Guid.Empty)
             {
                 Response.Write("-2");
                 return;
             }
+            
+
+
+           var a_Kaipiaoshenqing  = oA_KaipiaoshenqingBLL.GetModelByKeyid(orderId);
+
+            if (a_Kaipiaoshenqing !=null  )
+            {
+                if(a_Kaipiaoshenqing.Kaipiaoshenqing == 3)
+                {
+                    Response.Write("宸插紑绁紝鏃犳硶鎾ゅ洖锛�");
+                    return;
+                }
+                if(a_Kaipiaoshenqing.Shenqingleixing == "璁㈠崟寮�绁�")
+                {
+                    Dictionary<int, object> searchParam = new Dictionary<int, object>();
+
+                    SetParamValue(searchParam, 1, CurrentUser.MemberId);
+                    SetParamValue(searchParam, 2, "");
+                    SetParamValue(searchParam, 3, "");
+                    SetParamValue(searchParam, 4, "");
+                    SetParamValue(searchParam, 5, "");
+                    SetParamValue(searchParam, 6, "");
+                    SetParamValue(searchParam, 7, "");
+                    SetParamValue(searchParam, 8, "");
+                    SetParamValue(searchParam, 9, "");
+                    SetParamValue(searchParam, 10, "");
+                    SetParamValue(searchParam, 11, "");
+                    SetParamValue(searchParam, 12, "");
+                    SetParamValue(searchParam, 13, "");
+                    SetParamValue(searchParam, 14, "");
+                    SetParamValue(searchParam, 15, "");
+                    SetParamValue(searchParam, 16, "");
+                    SetParamValue(searchParam, 18, 0);
+                    SetParamValue(searchParam, 19, CurrentUser.TrueMemberId);
+                    SetParamValue(searchParam, 20, CurrentUser.StaffId);
+                    SetParamValue(searchParam, 21, CurrentUser.TrueName);
+                    SetParamValue(searchParam, 22, "");
+                    SetParamValue(searchParam, 23, "");
+                    SetParamValue(searchParam, 24, "");
+                    SetParamValue(searchParam, 25, "");
+                    SetParamValue(searchParam, 26, a_Kaipiaoshenqing.Keyid);
+                    SetParamValue(searchParam, 29, "");
+
+
+
+                    SearchParam = searchParam;
+
+
+                   
+                    Infrastructure.Query.Pagination pagination = new Infrastructure.Query.Pagination()
+                    {
+                        PageSize = 1000, 
+                        PageIndex = 1 
+                    };
+                    IEnumerable<EC_OrderBasic> result = _eC_OrderBasicBLL.SelectModelPage_Seller(pagination, SearchParam);
+
+                    var PayedMoney =  result.Sum(x => x.TradingSingle.PayedMoney);
+                    if (PayedMoney.HasValue &&  PayedMoney > 0)
+                    {
+                        Response.Write("宸茬粡鏈夊洖娆捐褰曪紝鏃犳硶鎾ゅ洖锛�");
+                        return;
+                    }
+
+                }
+                else
+                {
+                    if (a_Kaipiaoshenqing.Kehumoney.HasValue && a_Kaipiaoshenqing.Kehumoney.Value > 0)
+                    {
+                        Response.Write("宸茬粡鏈夊洖娆捐褰曪紝鏃犳硶鎾ゅ洖锛�");
+                        return;
+                    }
+                       
+                }
+                var sss = oA_KaipiaoshenqingBLL.DeleteModel(a_Kaipiaoshenqing);
+                if (!sss)
+                {
+                    Response.Write("鎾ゅ洖澶辫触锛�");
+                    return;
+                }
+                if (a_Kaipiaoshenqing.Shenqingleixing == "璁㈠崟寮�绁�")
+                {
+                    EC_OrderExtend model = new EC_OrderExtend();
+                    model.KaipiaoshenqingId = a_Kaipiaoshenqing.Keyid;
+                    model.KaipiaoshenqingTime = null;
+                    model.Kaipiaoshenqing = 2;
+                    model.KaipiaoshenqingCreater = Guid.Empty;
+
+                    sss = _eC_OrderBLL.NewUpdateKaipiaoshenqings(model);
+
+                    if (!sss)
+                    {
+                        Response.Write("鎾ゅ洖澶辫触锛�");
+                        return;
+                    }
+                }
+
+
+
+            }
             else
             {
+                Response.Write("鎾ゅ洖澶辫触锛�");
+                return;
             }
-            Response.Write(_eC_OrderBasicBLL.AcceptOrder(orderId.Value, commission.Value) ? "1" : "0");
+         
+           
+
+
+            Response.Write( "1");
         }
 
         /// <summary>
@@ -474,7 +579,7 @@
                 //this.selKaipiaoshenqing.Value = "1";
 
                 //this.selPayStates.Value = "1";
-                //this.selHuikuanStates.Value = "1";
+                this.selHuikuanStates.Value = "1";
                 
 
 
@@ -485,8 +590,8 @@
                 this.selBusinessManager.Items.Insert(0, new ListItem("鍏ㄩ儴", ""));
                 //this.selBusinessManager.Items.Insert(1, new ListItem(CurrentUser.ShortName, CurrentUser.ShortName));
 
-                this.txtSQBeginDate.Value = DateTime.Now.AddDays(-14).ToString("yyyy-MM-dd");
-                this.txtSQEndDate.Value = DateTime.Now.ToString("yyyy-MM-dd");
+                //this.txtSQBeginDate.Value = DateTime.Now.AddDays(-14).ToString("yyyy-MM-dd");
+                //this.txtSQEndDate.Value = DateTime.Now.ToString("yyyy-MM-dd");
 
                 //鍒濇鏁版嵁鍔犺浇
                 btn_Search_Click(btn_Search, new EventArgs());
@@ -585,6 +690,33 @@
             rptData.DataSource = result;
             rptData.DataBind();
 
+            if (pagination.heji1.HasValue)
+            {
+                this.AllMoney.InnerText = pagination.heji1.Value.ToString("0.00");
+            }
+            else
+            {
+                this.AllMoney.InnerText = 0.ToString("0.00");
+            }
+
+            if (pagination.heji2.HasValue)
+            {
+                this.ZengMoney.InnerText = pagination.heji2.Value.ToString("0.00");
+            }
+            else
+            {
+                this.ZengMoney.InnerText = 0.ToString("0.00");
+            }
+
+            if (pagination.heji3.HasValue)
+            {
+                this.HuiMoney.InnerText = pagination.heji3.Value.ToString("0.00");
+            }
+            else
+            {
+                this.HuiMoney.InnerText = 0.ToString("0.00");
+            }
+
             UCPager1.AspNetPager.RecordCount = pagination.RecordCount;
         }
 

--
Gitblit v1.9.1