From 6bb722be12f95d3f55a141555be2c79b8fcaeca9 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期五, 07 二月 2025 08:35:44 +0800 Subject: [PATCH] 订单打印能查看合同 --- CY_ECommercePlatform/CY.WebForm/Pages/business/OrderDeatil.aspx | 18 ++++++++++++++++++ CY_ECommercePlatform/CY.WebForm/Pages/business/OrderDeatil.aspx.cs | 26 ++++++++++++++++++++++++++ CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsContractShow.aspx | 2 +- 3 files changed, 45 insertions(+), 1 deletions(-) diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsContractShow.aspx b/CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsContractShow.aspx index 0642d2e..373d7b6 100644 --- a/CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsContractShow.aspx +++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsContractShow.aspx @@ -26,7 +26,7 @@ <asp:Repeater id="RepClientList" runat="server"> <ItemTemplate> <div class="textcenter horizontal" width="100" > - <a class="spotlight" href="<%#Eval("FilePath").ToString() %>"> + <a <%--class="spotlight"--%> title="鐐瑰嚮鏌ョ湅鍘熷浘" href="<%#Eval("FilePath").ToString() %>" target="view_window" > <img src="<%#Eval("FilePath").ToString() %>" width="100" height="200" > diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/OrderDeatil.aspx b/CY_ECommercePlatform/CY.WebForm/Pages/business/OrderDeatil.aspx index 03753bb..0d2c641 100644 --- a/CY_ECommercePlatform/CY.WebForm/Pages/business/OrderDeatil.aspx +++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/OrderDeatil.aspx @@ -24,10 +24,20 @@ <script type="text/javascript"> window.printBeginCallBack = function () { document.getElementById('fram_operate').style.display = 'none'; + document.getElementById('hetongchakan').style.display = 'none'; }; window.printOverCallBack = function () { document.getElementById('fram_operate').style.display = ''; + document.getElementById('hetongchakan').style.display = ''; }; + + //缁存姢 + function onViewuplod(keyid) { + var l = (screen.availWidth - 500) / 2; + var t = (screen.availHeight - 300) / 2; + // window.open({ URL: "/Pages/business/CorporateClientsUpLoadContract.aspx?Keyid=" + keyid, Title: "鏌ョ湅鍚堝悓", Width: 900, Height: 750 }); + window.open('/Pages/business/CorporateClientsContractShow.aspx?Keyid=' + keyid, '_blank', 'height=750,width=900,top=' + t + ',left=' + l +',toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no'); + } $(function () { $("#btnPrint").click(function () { @@ -48,6 +58,14 @@ <body style='padding: 0; margin: 0;' onbeforeprint="OnPrint()" onafterprint="OnPrintOver()"> <form id="form1" runat="server"> <input type="hidden" runat="server" id="hideOrderId" /> + <table border="1" cellpadding="0" cellspacing="0" style="border: 0;" id='hetongchakan' > + <tr> + <td > +<%-- <span onclick="onViewuplod('<%=BuyerId %>')" <%=ContractCount.ToString() == "0" ? "style=\"display:none;\"" : ""%> >鏌ョ湅鍚堝悓 </span>--%> + <input type="button" id="btnPrint" <%=ContractCount.ToString() == "0" ? "style=\"display:none;\"" : ""%> value="鏌ョ湅鍚堝悓" onclick="onViewuplod('<%=BuyerId %>')"> + </td> + </tr> + </table> <div class='dbody'> <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width="0" height="0"> <embed id="LODOP_EM" type="application/x-print-lodop" width="0" height="0" pluginspage="/Pages/common/install_lodop32.exe"></embed> diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/OrderDeatil.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/business/OrderDeatil.aspx.cs index dcc717a..0ae4a99 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 { @@ -40,6 +42,8 @@ { EC_OrderBasicBLL _eC_OrderBasicBLL = new EC_OrderBasicBLL(); Sys_DictionaryBLL _sys_DictionaryBLL = new Sys_DictionaryBLL();//瀛楀吀涓氬姟閫昏緫鎿嶄綔绫诲璞� + public int ContractCount = 0; + public string BuyerId = ""; /// <summary> /// 椤甸潰鍔犺浇浜嬩欢 /// </summary> @@ -145,6 +149,28 @@ { _eC_OrderBasic.UnitName = sys_Dictionarie.Name; } + BuyerId = _eC_OrderBasic.BuyerId.ToString(); + //鏌ヨ瀹㈡埛鏄惁鏈夊悎鍚� + 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 }; -- Gitblit v1.9.1