using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Web.UI;
|
using System.Web.UI.WebControls;
|
using CY.BLL;
|
using CY.Model;
|
using CY.Infrastructure.Query;
|
using CY.Infrastructure.Common;
|
using CY.BLL.OA;
|
using CY.BLL.EC;
|
|
|
namespace CY.WebForm.Pages.business
|
{
|
//吴辉
|
//商业信函
|
public partial class AgSealPrint : BasePage
|
{
|
OA_CorporateClientsBLL bll_OA_CorporateClientsBLL = null;
|
OA_IntentionCustomerBLL bll_OA_IntentionCustomerBLL = null;
|
EC_ExSingleTemBLL bll_EC_ExSingleTemBLL = null;
|
public int PrintWidth = 0;
|
public int PrintHeight = 0;
|
public string PrintType = "";
|
|
EC_OrderBasicBLL bll_EC_OrderBLL = null;
|
|
//初始化
|
public AgSealPrint()
|
{
|
bll_OA_CorporateClientsBLL = new OA_CorporateClientsBLL();
|
bll_OA_IntentionCustomerBLL = new OA_IntentionCustomerBLL();
|
bll_EC_ExSingleTemBLL = new EC_ExSingleTemBLL();
|
bll_EC_OrderBLL = new EC_OrderBasicBLL();
|
}
|
|
//页面加载
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
if (!IsPostBack)
|
{
|
string orderIdStr = Request["orderid"];
|
DataBindCorporate(orderIdStr);
|
|
}
|
}
|
|
/// <summary>
|
/// 绑定打印数据
|
/// </summary>
|
/// <param name="Keyid"></param>
|
public void DataBindCorporate(string Keyid)
|
{
|
//PrintWidth = 2970;
|
//PrintHeight = 2100;
|
PrintWidth = 2100;
|
PrintHeight = 2970;
|
PrintType = "A4";
|
EC_OrderBasic _eC_OrderBasic = bll_EC_OrderBLL.SelectModelById(Convert.ToInt32(Keyid));
|
int iBagNum = 0;
|
iBagNum = Convert.ToInt32(_eC_OrderBasic.OrderExtend.BagNum);
|
string sdate = _eC_OrderBasic.DeliveryTime.Value.ToString("yyyy-MM-dd");
|
OA_CorporateClients oA_CorporateClients = null;
|
OA_CustomerCommunications oA_CustomerCommunications = null;
|
oA_CorporateClients = bll_OA_CorporateClientsBLL.SelectModelByFirmIdandMemberId(CurrentUser.MemberId, _eC_OrderBasic.BuyerId);
|
oA_CustomerCommunications = bll_OA_CorporateClientsBLL.GetModel_CustomerCommunications(oA_CorporateClients.Keyid);
|
string Printhtml = "";
|
for (int i = 0; i < iBagNum; i++)
|
{
|
|
if (i % 2 == 0)
|
{
|
Printhtml = Printhtml + "<div style='float:left;width: 850px;border:0px solid #ccc; float: left; display:block; height: 156;'>";
|
}
|
Printhtml = Printhtml + "<div style='float:left;width: 400px; float: " + (i % 2 == 0 ? "left" : "right") + "; display:block; height: 380px;'> "
|
+"<table>"
|
+"<tr>"
|
+ "<td align='center' style='padding-left:50px; width:400px;'>"
|
+ "<font style='font-size:20px;font-weight:bold'>" + _eC_OrderBasic.SellerName+ "封签</font>"
|
+"</td>"
|
+"</tr>"
|
+ "</table>"
|
+ "<table>"
|
+ "<tr>"
|
+"<td width='100px'>"
|
+"订单编号:"
|
+"</td>"
|
+ "<td align='left'>"
|
+ ""+_eC_OrderBasic.SellerOrderId+""
|
+"</td>"
|
+"</tr>"
|
+"</table>"
|
+ "<table border='1' cellpadding='0' cellspacing='0' bordercolorlight='#000000' bordercolordark='#FFFFFF' width='100%'> "
|
+ "<tr style=' height:45px; width:350px'>"
|
+ "<td align='center'>"
|
+ "印件名称"
|
+ "</td>"
|
+ "<td align='center' colspan='5'>"
|
+ "" + _eC_OrderBasic.DocumentName + "</td>"
|
+ "</tr>"
|
+ "<tr style=' height:45px; width:350px'>"
|
+ "<td align='center'>"
|
+ "委印单位"
|
+ "</td>"
|
+ "<td align='center' height='23px' colspan='3'>" + _eC_OrderBasic .SellerName+ ""
|
+ "</td>"
|
+ "<td align='center'>"
|
+ "印刷数量"
|
+ "</td>"
|
+ "<td align='center' height='23px'>" + _eC_OrderBasic.OrderExtend.PrintNum+ ""
|
+ "</td>"
|
+ "</tr>"
|
+ "<tr style=' height:45px; width:350px;display:" + (_eC_OrderBasic.PrintTypeId == 6 ? "block" : "none") + ";'>"
|
+ "<td align='center'>"
|
+ "书号"
|
+ "</td> "
|
+ "<td align='center' height='23px' colspan='3'>" + _eC_OrderBasic .OrderExtend.BookNum+ ""
|
+ "</td>"
|
+ "<td align='center'>"
|
+ "定价"
|
+ "</td>"
|
+ "<td align='center' height='23px'>" + _eC_OrderBasic .OrderExtend.BookPrice+ ""
|
+ "</td>"
|
+ "</tr>"
|
+ "<tr style=' height:45px; width:350px'>"
|
+ "<td align='center'>"
|
+ "每包数量"
|
+ "</td>"
|
+ "<td align='center' height='23px' width='60px'>"+_eC_OrderBasic.OrderExtend.NumPerBag+""
|
+ "</td>"
|
+ "<td align='center'>"
|
+ "总包数"
|
+ "</td>"
|
+ "<td align='center' width='60px'>" + _eC_OrderBasic.OrderExtend.BagNum + ""
|
+ "</td>"
|
+ "<td align='center' >"
|
+ "本包号"
|
+ "</td>"
|
+ "<td align='center' height='23px'>"+ (i+1) +""
|
+ "</td>"
|
+ "</tr>"
|
+ "<tr style=' height:45px; width:350px'>"
|
+ "<td align='center' >"
|
+ "包装"
|
+ "</td>"
|
+ "<td align='center' height='23px'>"
|
+ "</td>"
|
+ "<td align='center' >"
|
+ "质检"
|
+ "</td>"
|
+ "<td align='center' height='23px'>"
|
+ "</td>"
|
+ "<td align='center' >"
|
+ "出厂日期"
|
+ "</td>"
|
+ "<td align='center' height='23px'>" + sdate + ""
|
+ "</td>"
|
+ "</tr>"
|
|
+ "</table>"
|
+ "<table>"
|
+ "<tr>"
|
+ "<td>地址:</td>"
|
+ "<td>"
|
+ "" + oA_CustomerCommunications.DetailedAddress + ""
|
+ "</td>"
|
|
+ "<td>"
|
+ " 电话:"
|
+ "</td>"
|
+ "<td>"
|
+ "" + oA_CustomerCommunications.CompanyPhone + ""
|
+ "</td>"
|
+ "</tr>"
|
//+ "<tr style='height:80px'>"
|
//+ "</tr>"
|
|
+ "</table>"
|
+ "</div>";
|
if (i % 2 != 0)
|
{
|
Printhtml = Printhtml + "</div>";
|
}
|
|
}
|
this.divPrintHtml.InnerHtml = Printhtml;
|
}
|
|
|
}
|
}
|