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/financial/OrderMoneyBatchReceive.aspx.cs | 142 +++++++++++++++++++++++++++++++---------------
1 files changed, 95 insertions(+), 47 deletions(-)
diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/financial/OrderMoneyBatchReceive.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/financial/OrderMoneyBatchReceive.aspx.cs
index 811bc01..8037d7c 100644
--- a/CY_ECommercePlatform/CY.WebForm/Pages/financial/OrderMoneyBatchReceive.aspx.cs
+++ b/CY_ECommercePlatform/CY.WebForm/Pages/financial/OrderMoneyBatchReceive.aspx.cs
@@ -47,9 +47,12 @@
protected void Page_Load(object sender, EventArgs e)
{
_eC_OrderBasicBLL = new EC_OrderBasicBLL();
- btnSubmit.ServerClick += new EventHandler(btnSubmit_ServerClick);
-
- LoadOrder();
+ //btnSubmit.ServerClick += new EventHandler(btnSubmit_ServerClick);
+ if (!IsPostBack)
+ {
+ LoadOrder();
+ }
+
if (IsPostBack || IsCallback)
return;
InitPage();
@@ -61,62 +64,106 @@
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
- void btnSubmit_ServerClick(object sender, EventArgs e)
+ protected void btn_Submit_form(object sender, EventArgs e)
{
- string[] orderIds = Request["ids"].Split(',');
+ var ids = Request["ids"];
+ //string[] orderIds = Request["ids"].Split(',');
string receiveWay = Request["rdoReceiveWay"];
bool isWin = false;
- using (var scope = new TransactionScope())
+
+
+
+ using (var scope = new TransactionScope(TransactionScopeOption.Required,
+ new TransactionOptions
+ {
+ IsolationLevel = IsolationLevel.ReadCommitted,
+ Timeout = TransactionManager.MaximumTimeout
+ }
+ ))
{
- foreach (string orderId in orderIds)
+
+ try
{
- EC_OrderBasic _orderBasic = _eC_OrderBasicBLL.SelectModelById(orderId.ToInt32().Value);
- OA_CorporateClients m_OA_CorporateClients = bll_OA_CorporateClientsBLL.SelectModelByFirmIdandMemberId(CurrentUser.MemberId, _orderBasic.BuyerId);
- if (receiveWay == "0" && m_OA_CorporateClients != null)
- {
- if (this.txtReceiveMoney.Value.ToInt32() > (m_OA_CorporateClients.Prepayments + m_OA_CorporateClients.Credit))
- {
- JavaScript.MessageBox("棰勪粯娆句笉瓒筹紒", this, "window.location='/Pages/financial/OrderMoneyBatchReceive.aspx?id=" + Request["ids"] + "'");
- //Response.Redirect("/Pages/financial/OrderMoneyReceive.aspx?id=" + orderId);
- return;
- }
- }
- if (string.IsNullOrEmpty(orderId) || string.IsNullOrEmpty(receiveWay))
+ var _orderBasicmodes = _eC_OrderBasicBLL.GetOrderByIds(ids);
+ if (string.IsNullOrEmpty(ids) || string.IsNullOrEmpty(receiveWay))
{
JavaScript.MessageBox("浼犲叆鍙傛暟閿欒锛�", this);
return;
}
- if (null == _orderBasic)
+ if (null == _orderBasicmodes)
{
JavaScript.MessageBox("璁㈠崟涓嶅瓨鍦ㄦ垨宸插垹闄わ紒", this);
return;
}
- isWin = "0".Equals(receiveWay) ? UsePrepare(_orderBasic) : ToAccount(_orderBasic.Keyid.Value, _orderBasic.BuyerName, _orderBasic.UnPayedMoney);
- if (!isWin)
- {
- break;
- }
+ int i = 0;
+ foreach (var _orderBasic in _orderBasicmodes)
+ {
+
+ //EC_OrderBasic _orderBasic = _eC_OrderBasicBLL.SelectModelById(orderId.ToInt32().Value);
+
+ if (receiveWay == "0" && i == 0)
+ {
+ OA_CorporateClients m_OA_CorporateClients = bll_OA_CorporateClientsBLL.SelectModelByFirmIdandMemberId(CurrentUser.MemberId, _orderBasic.BuyerId);
+ if (m_OA_CorporateClients != null)
+ {
+ if (this.txtReceiveMoney.Value.ToInt32() > (m_OA_CorporateClients.Prepayments + m_OA_CorporateClients.Credit))
+ {
+ JavaScript.MessageBox("棰勪粯娆句笉瓒筹紒", this, "window.location='/Pages/financial/OrderMoneyBatchReceive.aspx?id=" + Request["ids"] + "'");
+ //Response.Redirect("/Pages/financial/OrderMoneyReceive.aspx?id=" + orderId);
+ return;
+ }
+ }
+ else
+ {
+ JavaScript.MessageBox("棰勪粯娆句笉瓒筹紒", this, "window.location='/Pages/financial/OrderMoneyBatchReceive.aspx?id=" + Request["ids"] + "'");
+ }
+
+
+ }
+ i = i + 1;
+
+ isWin = "0".Equals(receiveWay) ? UsePrepare(_orderBasic) : ToAccount(_orderBasic.Keyid.Value, _orderBasic.BuyerName, _orderBasic.UnPayedMoney);
+ if (!isWin)
+ {
+ break;
+ }
+
+ }
+ scope.Complete();
}
- scope.Complete();
+ catch (Exception ex)
+ {
+ // 鍥炴粴浜嬪姟
+ }
+ finally
+ {
+ // 閲婃斁璧勬簮
+ scope.Dispose();
+ }
}
if (isWin)
{
- JavaScript.MessageBox("鎿嶄綔鎴愬姛", this, true, true);
+ JavaScript.MessageBox("鎿嶄綔鎴愬姛", this);
+
+ JavaScript.RefreshDIVOpener(this);
}
else
{
JavaScript.MessageBox("鎿嶄綔澶辫触", this);
}
+
+
+
//JavaScript.MessageBox(isWin ? "鏀舵鎴愬姛锛�" : "鏀舵澶辫触锛�", this, "top.frmright.ReLoad();top.Dialog.close();");
- Request.RequestContext.RouteData.DataTokens.Add("IsWin", isWin ? "1" : "");
- if (!isWin)
- InitPage();
- else
- ;
+ //Request.RequestContext.RouteData.DataTokens.Add("IsWin", isWin ? "1" : "");
+ //if (!isWin)
+ // InitPage();
+ //else
+ // ;
}
@@ -178,7 +225,7 @@
{
string[] orderIds = Request["id"].Split(',');
this.ids.Value = Request["id"];
- List<EC_OrderBasic> eC_OrderBasics = new List<EC_OrderBasic>();
+ //List<EC_OrderBasic> eC_OrderBasics = new List<EC_OrderBasic>();
decimal shoukuanmoney = 0;
if (orderIds==null || orderIds.Length==0)
{
@@ -187,25 +234,26 @@
try
{
- foreach (string orderId in orderIds)
+ var _orderBasicmodes = _eC_OrderBasicBLL.GetOrderByIds(this.ids.Value);
+ foreach (var _orderBasicmode in _orderBasicmodes)
{
- EC_OrderBasic _orderBasicmode = _eC_OrderBasicBLL.SelectModelById(orderId.ToInt32().Value);
- OA_CorporateClients m_OA_CorporateClients = bll_OA_CorporateClientsBLL.SelectModelByFirmIdandMemberId(CurrentUser.MemberId, _orderBasicmode.BuyerId);
- if (m_OA_CorporateClients != null)
- {
- _orderBasicmode.nowCustomMoney = "锟�" + (m_OA_CorporateClients.Prepayments ?? 0).ToString("0.00");
- _orderBasicmode.nowCredit = "锟�" + (m_OA_CorporateClients.Credit ?? 0).ToString("0.00");
- }
- else
- {
- _orderBasicmode.nowCustomMoney = "锟�0";
- _orderBasicmode.nowCredit = "锟�0";
- }
+ // EC_OrderBasic _orderBasicmode = _eC_OrderBasicBLL.SelectModelById(orderId.ToInt32().Value);
+ //OA_CorporateClients m_OA_CorporateClients = bll_OA_CorporateClientsBLL.SelectModelByFirmIdandMemberId(CurrentUser.MemberId, _orderBasicmode.BuyerId);
+ //if (m_OA_CorporateClients != null)
+ //{
+ // _orderBasicmode.nowCustomMoney = "锟�" + (m_OA_CorporateClients.Prepayments ?? 0).ToString("0.00");
+ // _orderBasicmode.nowCredit = "锟�" + (m_OA_CorporateClients.Credit ?? 0).ToString("0.00");
+ //}
+ //else
+ //{
+ // _orderBasicmode.nowCustomMoney = "锟�0";
+ // _orderBasicmode.nowCredit = "锟�0";
+ //}
shoukuanmoney += _orderBasicmode.UnPayedMoney;
- eC_OrderBasics.Add(_orderBasicmode);
+ // eC_OrderBasics.Add(_orderBasicmode);
}
this.txtReceiveMoney.Value = String.Format("{0:F}", shoukuanmoney);
//rptOrderInfo.DataSource = eC_OrderBasics;
--
Gitblit v1.9.1