From 259584df9c06ade70f1f351affb35d4922e1263d Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 07 十一月 2025 16:23:13 +0800
Subject: [PATCH] 这个打印送货单,你们给我做两种,做一张打印没得数量的,做一张打印有数量的。送货单格式就是32开,就哎就是A4排一半。你们打了测试,注意,美观。 把那个把它做出来,下一批就用这个自动打。 不是不是打印的要数量都是有数量,要没得数量都没得数量。就是点打印的时候就两个按钮嘛,一个是有数量打印,或者或者或者空白送货单打印。 现在这个现在的送货单都是没有数量噻。现在那个要的,比如你那里再打你那个打印关闭的按钮,要把搞成两个打印嘛,就是打印空白送货单和打印送货单。 好点打印空白送货单的,就是现在这样子。点打印送货单,打印的就是那个跟有有就是有数据的送货单。作业本送货统计查询,状态查询需要修改逻辑

---
 CY_ECommercePlatform/CY.WebForm/Pages/business/DeliverOrderPrint.aspx.cs |   71 ++++++++++++++++++++++++-----------
 1 files changed, 48 insertions(+), 23 deletions(-)

diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/DeliverOrderPrint.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/business/DeliverOrderPrint.aspx.cs
index 3833296..7fbcf55 100644
--- a/CY_ECommercePlatform/CY.WebForm/Pages/business/DeliverOrderPrint.aspx.cs
+++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/DeliverOrderPrint.aspx.cs
@@ -24,7 +24,7 @@
 using System.Text;
 using CY.BLL.Sys;
 using System.Transactions;
-
+using CY.Model.Inquiry;
 
 namespace CY.WebForm.Pages.business
 {
@@ -36,6 +36,8 @@
         OA_StaffBLL oA_StaffBLL = null;
         OA_DeliverPlanBLL _OA_DeliverPlanBLL = null;
         OA_DeliverPlanBLL oA_DeliverPlanBLL = null;
+        EC_OrderPrintParameterBLL eC_OrderPrintParameterBLL = null;
+        Sys_DictionaryBLL dictionaryBLL = null;
         /// <summary>
         /// 鍒濆鍖栨瀯閫�
         /// </summary>
@@ -47,6 +49,8 @@
             oA_StaffBLL = new OA_StaffBLL();
             _OA_DeliverPlanBLL = new OA_DeliverPlanBLL();
             oA_DeliverPlanBLL = new OA_DeliverPlanBLL();
+            eC_OrderPrintParameterBLL = new EC_OrderPrintParameterBLL();
+            dictionaryBLL = new Sys_DictionaryBLL();
         }
 
         /// <summary>
@@ -71,20 +75,23 @@
         
 
             List<EC_AcceptWayByOrder> eC_AcceptWayByOrders = null;
-            OA_CorporateClients oA_CorporateClients = null;
+            //OA_CorporateClients oA_CorporateClients = null;
             OA_CorporateClients oA_CorporateClientsBiddingcompany = null;
             OA_DeliverPlan oA_DeliverPlan = null;
 
             try
             {
                 oA_DeliverPlan = _OA_DeliverPlanBLL.GetModelByKeyid(deliverorderId, null, null);
-                oA_CorporateClients = _oA_CorporateClientsBLL.SelectModelByFirmIdandMemberId(CurrentUser.MemberId, oA_DeliverPlan.BuyerId);
-                oA_CorporateClientsBiddingcompany = _oA_CorporateClientsBLL.SelectBiddingcompanyByFirmId(CurrentUser.MemberId).Where(x => x.Keyid1 == oA_CorporateClients.Biddingcompany).FirstOrDefault();
-                if (oA_CorporateClientsBiddingcompany != null)
-                {
-                    this.spnD.InnerText = oA_CorporateClientsBiddingcompany.CompanyName;
-                }
-                OA_Staff oA_Staff = oA_StaffBLL.GetModelByKeyid(oA_CorporateClients.BusinessManagerId);
+               // oA_CorporateClients = _oA_CorporateClientsBLL.SelectModelByFirmIdandMemberId(CurrentUser.MemberId, oA_DeliverPlan.BuyerId);
+                 
+                    oA_CorporateClientsBiddingcompany = _oA_CorporateClientsBLL.SelectBiddingcompanyByFirmId(CurrentUser.MemberId).Where(x => x.Keyid1 == oA_DeliverPlan.Biddingcompany).FirstOrDefault();
+                    if (oA_CorporateClientsBiddingcompany != null)
+                    {
+                        this.spnD.InnerText = oA_CorporateClientsBiddingcompany.CompanyName;
+                    }
+                
+                   
+                OA_Staff oA_Staff = oA_StaffBLL.GetModelByKeyid(oA_DeliverPlan.BusinessManagerId);
                 if (oA_Staff != null)
                 {
                     this.spnB.InnerText = oA_Staff.Name;
@@ -94,10 +101,10 @@
                 {
                     this.spnC.InnerText = oA_Staffsss.Name;
                 }
-                this.spnBuyerName.InnerText = oA_CorporateClients.CompanyName;
+                this.spnBuyerName.InnerText = oA_DeliverPlan.CompanyName;
 
                 this.spnBuyerAddress.InnerText = oA_DeliverPlan.Dizhi;
-                this.spnNowTime.InnerText = oA_DeliverPlan.DeliverTime.Value.ToString("yyyy-Mm-dd");
+                this.spnNowTime.InnerText = oA_DeliverPlan.DeliverTime.Value.ToString("yyyy-MM-dd");
                 this.SellerOrderId.InnerText = oA_DeliverPlan.SellerOrderId;
                 this.spnBuyerPhone.InnerText = oA_DeliverPlan.Dianhua;
 
@@ -107,21 +114,19 @@
 
 
 
+                this.spnRemark.InnerText = oA_DeliverPlan.Remark;
 
-               
+
 
 
 
 
                 List<Model.EC_OrderBasic> eC_OrderBasics  = _eC_OrderBasicBLL.GetEC_OrderBasicListBydeliverorderId(deliverorderId,CurrentUser.MemberId).ToList();
-
-                rptData.DataSource = eC_OrderBasics;
-                rptData.DataBind();
                 decimal SumPrice = 0;
 
-                if (eC_OrderBasics!=null && eC_OrderBasics.Count > 0)
+                if (eC_OrderBasics != null && eC_OrderBasics.Count > 0)
                 {
-                    for(int i=0;i< eC_OrderBasics.Count; i++)
+                    for (int i = 0; i < eC_OrderBasics.Count; i++)
                     {
                         if (i == 0)
                         {
@@ -130,18 +135,38 @@
 
                             if (m_EC_AwbInfo != null)
                             {
-                                this.spnRemark.InnerText = m_EC_AwbInfo.Remark;
+                                if (string.IsNullOrWhiteSpace(this.spnRemark.InnerText))
+                                {
+                                    this.spnRemark.InnerText = m_EC_AwbInfo.Remark;
+                                }
+                                
 
                             }
-                            SumPrice += eC_OrderBasics[i].SumPrice.Value;
+                        }
+                        SumPrice += eC_OrderBasics[i].SumPrice.Value;
+                        EC_OrderPrintParameter _eC_OrderPrintParameter = eC_OrderPrintParameterBLL.GetModel(eC_OrderBasics[i].Keyid.Value);
+                        InquiryCommonModel _inquiryCommonModel = null;
+                        if (null == _eC_OrderPrintParameter)
+                        {
+                            _inquiryCommonModel = new InquiryCommonModel();
+                        }
+                        else
+                        {
+                            _inquiryCommonModel = SerializationHelper.DeSerialize(typeof(InquiryCommonModel), _eC_OrderPrintParameter.PrintParameter) as InquiryCommonModel;
+                        }
 
+                        eC_OrderBasics[i].PrintSizeName = _inquiryCommonModel.PrintSizeName;
+                        var sss = dictionaryBLL.GetDataByType("鍗板埛鍗曚綅").Where(x=>x.MeanValue == eC_OrderBasics[i].OrderExtend.printunit).FirstOrDefault();
+                        if (sss != null)
+                        {
+                            eC_OrderBasics[i].yssldw = sss.Name;
                         }
                     }
                 }
-                else
-                {
-                    this.spnRemark.InnerText = oA_DeliverPlan.Remark;
-                }
+                 
+                rptData.DataSource = eC_OrderBasics;
+                rptData.DataBind();
+               
                 this.spnSumPrice.InnerText = SumPrice.ToString("#0.00");
                 this.spnSumPriceUpper.InnerText = GetChinaMoney(SumPrice); 
 

--
Gitblit v1.9.1