Commit c07d35aa authored by 吴春's avatar 吴春

取票打印样式修改

parent 2f5ada8b
......@@ -6,7 +6,6 @@ using EheMall.EntityFramework.Entities;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using EheMall.Models.Enums;
namespace EheMall.Models.Models
{
public partial class OrderDetail : AggregateRoot, ISoftDeleted
......@@ -94,5 +93,6 @@ namespace EheMall.Models.Models
/// </summary>
[NotMapped]
public MemberTypeEnum iMemberType { get; set; }
}
}
......@@ -94,5 +94,12 @@ namespace EheMall.Models.Models
/// </summary>
[NotMapped]
public OrderStateEnum OrderState { get; set; }
/// <summary>
/// 条形码
/// </summary>
[NotMapped]
public System.IO.MemoryStream mBarCode { get; set; }
}
}
......@@ -98,6 +98,10 @@ namespace EheMall.Web.Areas.TicketMall.Controllers
model.OrderDetailList = _OrderDetailServices.GetListByArticleTypeID(model.ID).ToList();
model.OrderSeatList = new List<OrderSeat>();
model.OrderSeatList = _OrderSeatService.GetListByArticleTypeID(model.ID).ToList();
foreach (var item in model.OrderSeatList)
{
item.mBarCode = GenerateBarCodeBySpire(item.ID.ToString());
}
}
return PartialView("_PrintDetails", model);
}
......@@ -138,7 +142,7 @@ namespace EheMall.Web.Areas.TicketMall.Controllers
}
#region 生成条形码
private void GenerateBarCodeBySpire(string Content)
private System.IO.MemoryStream GenerateBarCodeBySpire(string Content)
{
BarcodeSettings bs = new BarcodeSettings()
{
......@@ -150,9 +154,10 @@ namespace EheMall.Web.Areas.TicketMall.Controllers
};
BarCodeGenerator generator = new BarCodeGenerator(bs);
Image barcode = generator.GenerateImage();
//save the barcode as an image
barcode.Save(@"E:\barcode.png");
System.Drawing.Image codeImage = barcode;
System.IO.MemoryStream ms = new System.IO.MemoryStream();
codeImage.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
return ms;
}
#endregion
......
......@@ -10,13 +10,16 @@
<title>芙蓉国粹-取票</title>
<style>
.PrintPage {
width: 390px;
width: 360px;
height: 440px;
background-color: #fff;
margin: auto;
font-size: 12px;
display:inline-block;
}
.PrintPage:first-child {
margin-left:0;
}
.clearfix::after {
content: "";
height: 0;
......@@ -26,14 +29,8 @@
clear: both;
}
.Tk_left {
float: left;
height: 400px;
margin-left: 1rem;
}
.tk_jvTitle {
width: 15rem;
width: 190px;
font-size: 14px;
text-align: center;
border-bottom: 2px solid #221D1A;
......@@ -42,19 +39,19 @@
.commonBorder {
border: 1px solid #333232;
border-radius: 8px;
height: 52px;
height: 45px;
font-size: 12px;
}
.hallLeft {
float: left;
width: 103px;
width: 75px;
}
.Timeright {
width: 128px;
width: 110px;
float: left;
margin-left: 9.6px;
margin-left: 5px;
}
.tk_yingting {
......@@ -91,7 +88,7 @@
}
.tk_pianName {
width: 240px;
width: 193px;
}
.tk_yingpian {
......@@ -121,11 +118,11 @@
.tk_putong {
float: left;
width: 74px;
width: 93px;
height: 52px;
border: 1px solid #333232;
border-radius: 8px;
margin-right: 8px;
margin-right: 5px;
text-align: center;
line-height: 52px;
font-size: 12px;
......@@ -136,46 +133,46 @@
}
.tk_twoCode {
width: 240px;
width: 193px;
height: 5rem;
}
.Tk_leftquan {
float: right;
margin: 0 15px 0 10px;
float: left;
margin: 0 8px 0 6px;
}
.tk_quanList {
width: 20px;
height: 20px;
margin-bottom: 5px;
width: 15px;
height: 15px;
margin-bottom: 4px;
border: 1px solid #838280;
border-radius: 50%;
}
.tk_piaoList {
width: 85px;
height: 60px;
width: 70px;
height: 50px;
font-size: 14px;
color: #1D1918;
text-align: center;
border: 1px solid #2B2728;
border-radius: 4px;
margin-bottom: 12px;
margin-bottom: 6px;
}
.tk_pTou {
width: 100%;
height: 24px;
border-bottom: 1px solid #838280;
color: #fff;
font-size: 12px;
line-height: 24px;
}
.Tk_right {
float: right;
margin: 0.81rem 1.25rem 0 0;
float: left;
width:70px;
margin-top: 13px;
}
.tk_lastDiv {
......@@ -628,7 +625,15 @@
<script>
function doPrint(how) {
var myDoc = {
settings:{
marginLeft: 1,
marginRight: 1,
marginTop: 2,
marginBottom: 2,
pageFrom: 1,
pageTo: 2,
portrait: false
},
documents: document, // 打印页面(div)们在本文档中
copyrights: '杰创软件拥有版权 www.jatools.com' // 版权声明必须
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment