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/OrderDeatil.aspx.cs | 74 +++++++++++++++++++++++++++++++++++--
1 files changed, 70 insertions(+), 4 deletions(-)
diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/OrderDeatil.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/business/OrderDeatil.aspx.cs
index e95fd01..1e34a65 100644
--- a/CY_ECommercePlatform/CY.WebForm/Pages/business/OrderDeatil.aspx.cs
+++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/OrderDeatil.aspx.cs
@@ -30,6 +30,8 @@
using CY.BLL;
using CY.Model.Inquiry;
using CY.BLL.Sys;
+using CY.SQLDAL;
+using System.Data.SqlClient;
namespace CY.WebForm.Pages.business
{
@@ -39,7 +41,11 @@
public partial class OrderDeatil : BasePage
{
EC_OrderBasicBLL _eC_OrderBasicBLL = new EC_OrderBasicBLL();
-
+ Sys_DictionaryBLL _sys_DictionaryBLL = new Sys_DictionaryBLL();//瀛楀吀涓氬姟閫昏緫鎿嶄綔绫诲璞�
+ public int ContractCount = 0;
+ public string BuyerId = "";
+ public int OrderId = 0;
+ public string shejidingdanid = "";
/// <summary>
/// 椤甸潰鍔犺浇浜嬩欢
/// </summary>
@@ -56,6 +62,10 @@
case "print":
int orderId = Request["orderIdStr"].ToString().ToInt32().Value;
UpdatePrintState(orderId);
+ break;
+ case "Printfengqian":
+ int orderIds = Request["orderIdStr"].ToString().ToInt32().Value;
+ UpdatePrintfengqianState(orderIds);
break;
default:
Page_Load_Default();
@@ -104,11 +114,18 @@
CY.WebForm.BasePage.JavaScript.MessageBox("鏁版嵁涓嶅瓨鍦紒", this);
return false;
}
- if (CurrentUser.MemberId!=Guid.Parse(UtilConst.AdminFirmId)&&_eC_OrderBasic.BuyerId != CurrentUser.MemberId && _eC_OrderBasic.SellerId != CurrentUser.MemberId)
+ EC_OrderBasic shejiorder = _eC_OrderBasicBLL.SelectModelByxiadanId(orderId.Value);
+
+ if (shejiorder != null)
{
- CY.WebForm.BasePage.JavaScript.MessageBox("鏁版嵁涓嶅瓨鍦紒", this);
- return false;
+ shejidingdanid = shejiorder.Keyid.ToString();
}
+
+ //if (CurrentUser.MemberId!=Guid.Parse(UtilConst.AdminFirmId)&&_eC_OrderBasic.BuyerId != CurrentUser.MemberId && _eC_OrderBasic.SellerId != CurrentUser.MemberId)
+ //{
+ // CY.WebForm.BasePage.JavaScript.MessageBox("鏁版嵁涓嶅瓨鍦紒", this);
+ // return false;
+ //}
EC_AcceptWayByOrderBLL _eC_AcceptWayByOrderBLL = new EC_AcceptWayByOrderBLL();
EC_AcceptWayByOrder _eC_AcceptWayByOrder = _eC_AcceptWayByOrderBLL.GetModelByTargetId(orderId.Value);
if (null == _eC_AcceptWayByOrder)
@@ -116,6 +133,12 @@
CY.WebForm.BasePage.JavaScript.MessageBox("鏁版嵁涓嶅瓨鍦紒", this);
return false;
}
+ if(_eC_OrderBasic.OrderExtend.NumPerBag == "NaN")
+ {
+ _eC_OrderBasic.OrderExtend.NumPerBag = "";
+ }
+ _eC_AcceptWayByOrder.NumPerBag = _eC_OrderBasic.OrderExtend.NumPerBag;
+ _eC_AcceptWayByOrder.BagNum = _eC_OrderBasic.OrderExtend.BagNum;
EC_OrderPrintParameterBLL _eC_OrderPrintParameterBLL = new EC_OrderPrintParameterBLL();
EC_OrderPrintParameter _eC_OrderPrintParameter = _eC_OrderPrintParameterBLL.GetModel(orderId.Value);
@@ -136,6 +159,34 @@
{
_inquiryCommonModel.PrintDemand = _inquiryCommonModel.PrintCountName + "锛�" + _inquiryCommonModel.PrintDemand;
}
+ var sys_Dictionarie = _sys_DictionaryBLL.GetDataByType("鍗板埛鍗曚綅").FirstOrDefault(x=>x.MeanValue == _inquiryCommonModel.Unit);
+ if (sys_Dictionarie != null)
+ {
+ _eC_OrderBasic.UnitName = sys_Dictionarie.Name;
+ }
+ BuyerId = _eC_OrderBasic.BuyerId.ToString();
+ OrderId = _eC_OrderBasic.Keyid.Value;
+ //鏌ヨ瀹㈡埛鏄惁鏈夊悎鍚�
+ Database DC = new Database();
+ try
+ {
+
+ string sqlStr = string.Format("select count(*) from [dbo].[OA_CorporateClientContract] where CorporateClientsid='{0}'", _eC_OrderBasic.BuyerId);
+ SqlCommand myCmd = new SqlCommand(sqlStr, DC.Connection);
+ ContractCount = (int)myCmd.ExecuteScalar();
+ }
+ catch (Exception)
+ {
+
+ ContractCount = 0;
+ }
+ finally
+ {
+ if (DC.Connection.State != System.Data.ConnectionState.Closed)
+ DC.Connection.Close();
+ }
+
+
rptOrder.DataSource = new List<EC_OrderBasic>() { _eC_OrderBasic };
rptOrder.DataBind();
rptAccpteWay.DataSource = "鑷彁".Equals(_inquiryCommonModel.DeliveryModeName) ? null : new List<EC_AcceptWayByOrder>() { _eC_AcceptWayByOrder };
@@ -163,5 +214,20 @@
}
}
}
+
+
+ /// <summary>
+ /// 鏀瑰彉鎵撳嵃灏佺鐘舵��
+ /// </summary>
+ private void UpdatePrintfengqianState(int orderId)
+ {
+
+ if (CurrentUser != null)
+ {
+
+ _eC_OrderBasicBLL.UpdatePrintfengqianState(orderId);
+
+ }
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.1