You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1339 lines
74 KiB
Plaintext

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ApiPrint.aspx.cs" Inherits="TradeManage.SysManage.ApiPrint" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="../themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="../themes/icon.css" />
<link rel="stylesheet" type="text/css" href="../themes/New.css" />
<link rel="stylesheet" type="text/css" href="../themes/DataGrid.css" />
<script src="../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="../Scripts/jquery.min.js" type="text/javascript"></script>
<script src="../Scripts/jquery.easyui.min.js" type="text/javascript"></script>
<script src="../Scripts/DataGrid.js" type="text/javascript"></script>
<script src="../Scripts/DataPager.js" type="text/javascript"></script>
<script src="../Scripts/jquery.bgiframe.min.js" type="text/javascript"></script>
<script src="../Scripts/Global.js" type="text/javascript"></script>
<script src="../Scripts/WindowLoad.js" type="text/javascript"></script>
<script src="../Scripts/LodopFuncs.js" type="text/javascript"></script>
<script src="../Scripts/JSLINQ.js" type="text/javascript"></script>
<script type="text/javascript">
var Model = null;
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
var WindowLoadModel = new WindowLoad();
$(document).ready(function () {
WindowLoadModel.ApplicationPath = "../";
WindowLoadModel.ControlID = "WindowLoad";
WindowLoadModel.Isbgiframe = true;
WindowLoadModel.Load();
ajaxInit(WindowLoadModel);
CheckIsInstall();
CreateDataGrid();
ReadData();
$("#test").click(function () {
//LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "80mm", "CreateCustomPage");
// $(datagrid1.DataSource).each(function (i) {
var Model = this;
LODOP.PRINT_INITA(0, 0, 378, 302, "ExpressOrder");
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
LODOP.SET_PRINT_MODE("FULL_HEIGHT_FOR_OVERFLOW", true);
var Template2 = GetTemplate("OneDongOP.txt", "OneDongOP.txt");
LODOP.ADD_PRINT_HTM(0, 0, "101.323%", "100%", Template2.prop("outerHTML"));
LODOP.ADD_PRINT_LINE(33, 0, 32, 376, 0, 1);
LODOP.ADD_PRINT_LINE(124, -2, 125, 375, 0, 1);
LODOP.ADD_PRINT_LINE(166, -1, 165, 374, 0, 1);
LODOP.ADD_PRINT_LINE(32, 188, -4, 189, 0, 1);
LODOP.ADD_PRINT_LINE(143, 325, 142, 376, 0, 1);
LODOP.ADD_PRINT_LINE(142, 325, 125, 326, 0, 1);
LODOP.ADD_PRINT_RECT(0, 0, 375, 299, 0, 1);
LODOP.ADD_PRINT_BARCODE(184, 62, 287, 55, "128Auto", "123456789012");
LODOP.SET_PRINT_STYLEA(0, "ShowBarText", 0);
LODOP.ADD_PRINT_IMAGE(1, 23, 150, 30, "<img src='../PrintImage/OneLog2.jpg' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);// 1可变形缩放2不可变形缩放
LODOP.ADD_PRINT_IMAGE(251, 297, 69, 32, "<img src='../PrintImage/OneLog.jpg' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_LINE(165, 325, 139, 326, 0, 1);
LODOP.NewPage();
var Template3 = GetTemplate("jhd.txt", "jhd.txt");
LODOP.ADD_PRINT_HTM(0, 0, "101.323%", "100%", Template3.prop("outerHTML"));
//LODOP.NewPage();
//var Template = GetTemplate("OneRUP2.txt", "OneRUP2.txt");
//LODOP.ADD_PRINT_HTM(0, 0, "101.323%", "100%", Template.prop("outerHTML"));
//LODOP.ADD_PRINT_LINE(28, -3, 27, 373, 0, 1);
//LODOP.ADD_PRINT_LINE(60, -2, 59, 373, 0, 1);
//LODOP.ADD_PRINT_LINE(75, 0, 74, 374, 0, 1);
//LODOP.ADD_PRINT_LINE(98, 1, 97, 373, 0, 1);
//LODOP.ADD_PRINT_LINE(128, 1, 129, 373, 0, 1);
//LODOP.ADD_PRINT_LINE(156, 1, 155, 373, 0, 1);
//LODOP.ADD_PRINT_LINE(184, 1, 183, 373, 0, 1);
//LODOP.ADD_PRINT_LINE(197, 1, 196, 373, 0, 1);
//LODOP.ADD_PRINT_LINE(97, 113, 0, 114, 0, 1);
//LODOP.ADD_PRINT_LINE(60, 254, 0, 255, 0, 1);
//LODOP.ADD_PRINT_LINE(155, 171, 59, 172, 0, 1);
//LODOP.ADD_PRINT_LINE(197, 215, 155, 216, 0, 1);
//LODOP.ADD_PRINT_LINE(98, 33, 58, 34, 0, 1);
//LODOP.ADD_PRINT_LINE(196, 313, 96, 314, 0, 1);
//LODOP.ADD_PRINT_RECT(0, 0, 373, 300, 0, 1);
//LODOP.ADD_PRINT_LINE(33, 0, 32, 373, 0, 1);
//LODOP.ADD_PRINT_LINE(124, -2, 125, 373, 0, 1);
//LODOP.ADD_PRINT_LINE(166, -1, 165, 374, 0, 1);
//LODOP.ADD_PRINT_LINE(32, 188, -4, 189, 0, 1);
//LODOP.ADD_PRINT_LINE(143, 326, 142, 374, 0, 1);
//LODOP.ADD_PRINT_LINE(142, 325, 125, 326, 0, 1);
//LODOP.ADD_PRINT_RECT(0, 0, 375, 299, 0, 1);
//LODOP.ADD_PRINT_BARCODE(184, 62, 287, 55, "128Auto", "123456789012");
//LODOP.SET_PRINT_STYLEA(0, "ShowBarText", 0);
//LODOP.ADD_PRINT_IMAGE(1, 23, 150, 30, "<img src='../PrintImage/OneLog2.jpg' />");
//LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);// 1可变形缩放2不可变形缩放
//LODOP.ADD_PRINT_IMAGE(251, 297, 69, 32, "<img src='../PrintImage/OneLog.jpg' />");
//LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);// 1可变形缩放2不可变形缩放
//})
LODOP.PRINT_DESIGN();
})
$("#cmdPrintAll").click(function () {
LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "60mm", "30mm", "CreateCustomPage");
LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "100");
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
LODOP.SET_PRINT_MODE("FULL_HEIGHT_FOR_OVERFLOW", true);
LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Page");
$(datagrid1.DataSource).each(function (i) {
var Model = this;
if (i > 0) LODOP.NewPage();
if (Model.ExpressID == 1) {
//EUB
Print_EUB(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
LODOP.NewPage();
Print_EUB2(Model, Model.ExpressService + "_Index_1", Model.ListPrintTemplate[1]);
}
if (Model.ExpressID == 2) {
//宁波小包
Print_NB(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
}
if (Model.ExpressID == 3) {
//甬沪小包
Print_YH(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
}
if (Model.ExpressID == 4) {
//上海小包
Print_SH(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
}
if (Model.ExpressID == 5) {
//上海平邮
}
if (Model.ExpressID == 6) {
//俄邮宝
Print_eEUB(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
LODOP.NewPage();
Print_eEUB2(Model, Model.ExpressService + "_Index_1", Model.ListPrintTemplate[1]);
}
if (Model.ExpressID == 7) {
//顺风
Print_SF(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
}
if (Model.ExpressID == 8) {
//比利时邮政
Print_BLSYZ(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
}
if (Model.ExpressID == 9) {
//比利时邮政
Print_XSXB(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
}
});
LODOP.PRINT_DESIGN();
});
$("#cmdPrint2").click(function () {
LODOP.PRINT_INITA(0, 0, 227, 113, "ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, 600, 300, "CreateCustomPage");
PrintCode("GFD0001", "衬衫xl-red")
LODOP.PRINT_DESIGN();
});
$("#" + datagrid1.TableID + " input[CommandName]").live("click", function () {
var index = $(this).parentsUntil("tr").parent().attr("index");
Model = datagrid1.Get_Model(index);
var ColName = $(this).attr("CommandName");
if (ColName == "cmdPrint") {
if (Model.ExpressID == 1) {
//EUB
LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "100mm", "CreateCustomPage");
//LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Page");
Print_EUB(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
LODOP.PRINT_DESIGN();
//Print_EUB2(Model, Model.ExpressService + "_Index_1", Model.ListPrintTemplate[1]);
// LODOP.PRINT_DESIGN();
}
if (Model.ExpressID == 2) {
//宁波小包
LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "100mm", "CreateCustomPage");
Print_NB(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
LODOP.PRINT_DESIGN();
}
if (Model.ExpressID == 3) {
//甬沪小包
LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "100mm", "CreateCustomPage");
Print_YH(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
LODOP.PRINT_DESIGN();
}
if (Model.ExpressID == 4) {
//上海小包
LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "100mm", "CreateCustomPage");
Print_SH(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
LODOP.PRINT_DESIGN();
}
if (Model.ExpressID == 5) {
//上海平邮
}
if (Model.ExpressID == 6) {
//俄邮宝
LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "100mm", "CreateCustomPage");
//Print_eEUB(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
//LODOP.NewPage();
Print_eEUB2(Model, Model.ExpressService + "_Index_1", Model.ListPrintTemplate[1]);
LODOP.PRINT_DESIGN();
}
if (Model.ExpressID == 7) {
//顺风
LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "100mm", "CreateCustomPage");
Print_SF(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
LODOP.PRINT_DESIGN();
}
if (Model.ExpressID == 8) {
//比利时邮政
LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "100mm", "CreateCustomPage");
Print_BLSYZ(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
LODOP.PRINT_DESIGN();
}
if (Model.ExpressID == 9) {
//EUB缩放
LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "100mm", "CreateCustomPage");
Print_XSXB(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
LODOP.PRINT_DESIGN();
}
if (Model.ExpressID == 10) {
//宁波平邮
LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "100mm", "CreateCustomPage");
LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Page");
Print_NBPY(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
LODOP.PRINT_DESIGN();
}
if (Model.ExpressID == 11) {
//燕文上海平邮
LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "100mm", "CreateCustomPage");
LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Page");
Print_YWSHPY(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
LODOP.NewPage();
Print_YWSHPY2(Model, Model.ExpressService + "_Index_1", Model.ListPrintTemplate[1]);
LODOP.PRINT_DESIGN();
}
if (Model.ExpressID == 12) {
//燕邮宝
LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "100mm", "CreateCustomPage");
LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Page");
Print_YYB(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
LODOP.PRINT_DESIGN();
}
if (Model.ExpressID == 13) {
//燕文北京平邮
LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "100mm", "CreateCustomPage");
LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Page");
Print_YWSHPY(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
LODOP.NewPage();
Print_YWSHPY2(Model, Model.ExpressService + "_Index_1", Model.ListPrintTemplate[1]);
LODOP.PRINT_DESIGN();
}
if (Model.ExpressID == 14) {
//杭州小包
LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "100mm", "CreateCustomPage");
LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Page");
Print_HZXB(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
LODOP.PRINT_DESIGN();
}
if (Model.ExpressID == 15) {
//杭州平邮
LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "100mm", "CreateCustomPage");
LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Page");
Print_HZPY(Model, Model.ExpressService, Model.ListPrintTemplate[0]);
LODOP.PRINT_DESIGN();
}
}
});
});
function PrintCode(Code,Name)
{
LODOP.ADD_PRINT_BARCODE(20,26,176,60,"128A",Code);
LODOP.SET_PRINT_STYLEA(0, "Horient", 3);
LODOP.SET_PRINT_STYLEA(0, "Vorient", 3);
LODOP.ADD_PRINT_TEXT(85, 30, 100, 20, Name);
}
//#region 检测是否安装过打印机控件
function CheckIsInstall() {
try {
LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
if (LODOP != null) { return true; }
else { return false; }
} catch (err) {
//alert("Error:本机未安装或需要升级!");
return false;
}
}
//#endregion
//#region 读取打印模板
function ReadPrintTemplate(name,fileName) {
$.ajax({
type: "GET",
url: "../PrintTemplate/" + fileName,
contentType: "",
dataType: "",
async: false,
dataFilter: function (data, dataType) {
return data;
},
success: function (data) {
$("#DataGrid1").data(name,data);
}
});
}
//#endregion
//#region 获取模板
function GetTemplate(name, fileName) {
var Template2 = $("#DataGrid1").data(name);
if (Template2 == undefined) {
ReadPrintTemplate(name, fileName);
Template2 = $("#DataGrid1").data(name);
}
var Template = $(Template2).clone();
//ReplaceImg(Template);
return Template;
}
//#endregion
//#region 替换图片
function ReplaceImg(Template) {
//$("img", Template).each(function () {
// var src = $(this).attr("src");
// var top = $(this).css("top");
// var left = $(this).css("left");
// var width = $(this).width();
// var height = $(this).height();
// LODOP.ADD_PRINT_IMAGE(0, 0, "100%", "100%", "<img src='" + src + "' />");
// LODOP.SET_PRINT_STYLEA(0,"Stretch", 1);//缩放模式
//});
//$("img", Template).remove();
//$("span", Template).each(function () {
// var src = $(this).text()
// var top = $(this).css("top");
// var left = $(this).css("left");
// var width = $(this).width();
// var height = $(this).height();
// var fontsize = $(this).css("font-size");
// LODOP.ADD_PRINT_TEXT(top, left, width, height, src);
// LODOP.SET_PRINT_STYLE("FontSize", fontsize.replace("px",""));
//});
//$("table", Template).each(function () {
// var src = $(this).prop("outerHTML")
// var top = $(this).css("top");
// var left = $(this).css("left");
// var width = $(this).width();
// var height = $(this).height();
// LODOP.ADD_PRINT_TABLE(top, left, width, height, src);
//});
//$("span", Template).remove();
}
//#endregion
//#endregion
function Print_OneWorld(model, name, fileName) {
//LODOP.PRINT_INIT("ExpressOrder");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "80mm", "CreateCustomPage");
// $(datagrid1.DataSource).each(function (i) {
var Model = this;
var Template = GetTemplate("OneWorld.txt", "OneWorld.txt");
LODOP.PRINT_INITA(0, 0, 378, 302, "ExpressOrder");
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
LODOP.SET_PRINT_MODE("FULL_HEIGHT_FOR_OVERFLOW", true);
LODOP.ADD_PRINT_HTM(0, 0, "101.323%", "100%", Template.prop("outerHTML"));
LODOP.ADD_PRINT_LINE(30, 1, 29, 373, 0, 1);
LODOP.ADD_PRINT_LINE(92, 2, 91, 373, 0, 1);
LODOP.ADD_PRINT_LINE(108, 1, 107, 372, 0, 1);
LODOP.ADD_PRINT_LINE(212, 2, 211, 374, 0, 1);
LODOP.ADD_PRINT_LINE(164, 315, 163, 373, 0, 1);
LODOP.ADD_PRINT_LINE(199, 315, 162, 316, 0, 1);
LODOP.ADD_PRINT_LINE(199, 316, 198, 374, 0, 1);
LODOP.ADD_PRINT_LINE(28, 189, -1, 190, 0, 1);
LODOP.ADD_PRINT_RECT(0, 1, 373, 302, 0, 1);
LODOP.ADD_PRINT_LINE(182, 315, 181, 373, 0, 1);
LODOP.ADD_PRINT_BARCODE(35, 88, 216, 40, "128Auto", "123456789012");
LODOP.SET_PRINT_STYLEA(0, "ShowBarText", 0);
LODOP.ADD_PRINT_BARCODE(216, 65, 268, 50, "128Auto", "123456789012");
LODOP.SET_PRINT_STYLEA(0, "ShowBarText", 0);
LODOP.ADD_PRINT_IMAGE(1, 23, 155, 25, "<img src='../PrintImage/OneLog2.jpg' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);// 1可变形缩放2不可变形缩放
LODOP.NewPage();
var Template2 = GetTemplate("jhd.txt", "jhd.txt");
LODOP.ADD_PRINT_HTM(0, 0, "101.323%", "100%", Template2.prop("outerHTML"));
//})
LODOP.PRINT_DESIGN();
}
function Print_OneRUP() {
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "80mm", "CreateCustomPage");
// $(datagrid1.DataSource).each(function (i) {
var Model = this;
LODOP.PRINT_INITA(0, 0, 378, 302, "ExpressOrder");
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
LODOP.SET_PRINT_MODE("FULL_HEIGHT_FOR_OVERFLOW", true);
var Template2 = GetTemplate("OneRUP.txt", "OneRUP.txt");
LODOP.ADD_PRINT_HTM(0, 0, "101.323%", "100%", Template2.prop("outerHTML"));
LODOP.ADD_PRINT_LINE(33, 0, 32, 373, 0, 1);
LODOP.ADD_PRINT_LINE(124, -2, 125, 373, 0, 1);
LODOP.ADD_PRINT_LINE(166, -1, 165, 374, 0, 1);
LODOP.ADD_PRINT_LINE(32, 188, -4, 189, 0, 1);
LODOP.ADD_PRINT_LINE(143, 326, 142, 374, 0, 1);
LODOP.ADD_PRINT_LINE(142, 325, 125, 326, 0, 1);
LODOP.ADD_PRINT_RECT(0, 0, 375, 299, 0, 1);
LODOP.ADD_PRINT_BARCODE(184, 62, 287, 55, "128Auto", "123456789012");
LODOP.SET_PRINT_STYLEA(0, "ShowBarText", 0);
LODOP.ADD_PRINT_IMAGE(1, 23, 150, 30, "<img src='../PrintImage/OneLog2.jpg' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);// 1可变形缩放2不可变形缩放
LODOP.ADD_PRINT_IMAGE(251, 297, 69, 32, "<img src='../PrintImage/OneLog.jpg' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.NewPage();
var Template = GetTemplate("OneRUP2.txt", "OneRUP2.txt");
LODOP.ADD_PRINT_HTM(0, 0, "101.323%", "100%", Template.prop("outerHTML"));
LODOP.ADD_PRINT_LINE(28, -3, 27, 373, 0, 1);
LODOP.ADD_PRINT_LINE(60, -2, 59, 373, 0, 1);
LODOP.ADD_PRINT_LINE(75, 0, 74, 374, 0, 1);
LODOP.ADD_PRINT_LINE(98, 1, 97, 373, 0, 1);
LODOP.ADD_PRINT_LINE(128, 1, 129, 373, 0, 1);
LODOP.ADD_PRINT_LINE(156, 1, 155, 373, 0, 1);
LODOP.ADD_PRINT_LINE(184, 1, 183, 373, 0, 1);
LODOP.ADD_PRINT_LINE(197, 1, 196, 373, 0, 1);
LODOP.ADD_PRINT_LINE(97, 113, 0, 114, 0, 1);
LODOP.ADD_PRINT_LINE(60, 254, 0, 255, 0, 1);
LODOP.ADD_PRINT_LINE(155, 171, 59, 172, 0, 1);
LODOP.ADD_PRINT_LINE(197, 215, 155, 216, 0, 1);
LODOP.ADD_PRINT_LINE(98, 33, 58, 34, 0, 1);
LODOP.ADD_PRINT_LINE(196, 313, 96, 314, 0, 1);
LODOP.ADD_PRINT_RECT(0, 0, 373, 300, 0, 1);
LODOP.NewPage();
var Template3 = GetTemplate("jhd.txt", "jhd.txt");
LODOP.ADD_PRINT_HTM(0, 0, "101.323%", "100%", Template3.prop("outerHTML"));
//})
LODOP.PRINT_DESIGN();
}
function Print_OneDongO() {
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "80mm", "CreateCustomPage");
// $(datagrid1.DataSource).each(function (i) {
var Model = this;
LODOP.PRINT_INITA(0, 0, 378, 302, "ExpressOrder");
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
LODOP.SET_PRINT_MODE("FULL_HEIGHT_FOR_OVERFLOW", true);
var Template2 = GetTemplate("OneDongO.txt", "OneDongO.txt");
LODOP.ADD_PRINT_HTM(0, 0, "101.323%", "100%", Template2.prop("outerHTML"));
LODOP.ADD_PRINT_LINE(33, 0, 32, 376, 0, 1);
LODOP.ADD_PRINT_LINE(124, -2, 125, 375, 0, 1);
LODOP.ADD_PRINT_LINE(166, -1, 165, 374, 0, 1);
LODOP.ADD_PRINT_LINE(32, 188, -4, 189, 0, 1);
LODOP.ADD_PRINT_LINE(143, 325, 142, 376, 0, 1);
LODOP.ADD_PRINT_LINE(142, 325, 125, 326, 0, 1);
LODOP.ADD_PRINT_RECT(0, 0, 375, 299, 0, 1);
LODOP.ADD_PRINT_BARCODE(184, 62, 287, 55, "128Auto", "123456789012");
LODOP.SET_PRINT_STYLEA(0, "ShowBarText", 0);
LODOP.ADD_PRINT_IMAGE(1, 23, 150, 30, "<img src='../PrintImage/OneLog2.jpg' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);// 1可变形缩放2不可变形缩放
LODOP.ADD_PRINT_IMAGE(251, 297, 69, 32, "<img src='../PrintImage/OneLog.jpg' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_LINE(165, 325, 139, 326, 0, 1);
LODOP.NewPage();
var Template3 = GetTemplate("jhd.txt", "jhd.txt");
LODOP.ADD_PRINT_HTM(0, 0, "101.323%", "100%", Template3.prop("outerHTML"));
}
//#region OneWorld打印
//#endregion
//#region EUB2打印
//#region EUB打印
function Print_EUB(model, name, fileName) {
var Template = GetTemplate(name, fileName);
$("#txtAreaSerial", Template).html(model.AreaSerial);
$("#txtSendPerson", Template).html("FROM:" + model.SendPerson);
$("#txtSendAddress", Template).html(model.SendAddress);
$("#txtSendPhone", Template).html("PHONE:" + model.SendPhone);
$("#txtRevPerson", Template).html("SHIP TO:" + model.RevPerson);
$("#txtRevAddress", Template).html(model.RevAddress);
$("#txtRevPhone", Template).html("PHONE:" + model.RevPhone+" Tel:"+model.RevMobile);
$("#txtCountGoodsNum", Template).html(model.CountGoodsNum);
$("#txtCountGoodsWeight", Template).html(model.CountGoodsWeight);
$("#txtCountGoodsPrice", Template).html(model.CountGoodsPrice);
var html = new Sys.StringBuilder();
$(model.ListModel).each(function (ii) {
if (ii == 7) {
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:top;width:15px;'>" + (ii + 1) + "</td>");
html.append("<td style='text-align:center;vertical-align:top;width:28px;' >...</td>");
html.append("<td style='text-align:left;vertical-align:top;width:163px;' >...</td>");
html.append("<td style='text-align:center;vertical-align:top;width:32px;' >...</td>");
html.append("<td style='text-align:center;vertical-align:top;width:42px;' >...</td>");
html.append("<td style='text-align:left;vertical-align:top;width:65px;' >...</td>");
html.append("</tr>");
}
else if (ii < 7) {
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:top;width:15px;'>" + (ii + 1) + "</td>");
html.append("<td style='text-align:center;vertical-align:top;width:28px;' >" + this.GoodsNum + "</td>");
html.append("<td style='text-align:left;vertical-align:top;width:163px;' >" + this.GoodsName + "</td>");
html.append("<td style='text-align:center;vertical-align:top;width:32px;' >" + this.GoodsWeight + "</td>");
html.append("<td style='text-align:center;vertical-align:top;width:42px;' >" + this.GoodsPrice + "</td>");
html.append("<td style='text-align:left;vertical-align:top;width:65px;' >" + this.GoodsOrigin + "</td>");
html.append("</tr>");
}
});
$("#tb_Detail", Template).html(html.toString());
//$("#div1").html(Template.prop("outerHTML"));
//LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);//缩放模式
ReplaceImg(Template);
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Template.prop("outerHTML"));
LODOP.ADD_PRINT_LINE(169, 10, 170, 177, 0, 1);
LODOP.ADD_PRINT_LINE(180, 10, 181, 177, 0, 1);
LODOP.ADD_PRINT_LINE(337, 29, 190, 30, 0, 1);
LODOP.ADD_PRINT_LINE(189, 52, 336, 53, 0, 1);
LODOP.ADD_PRINT_LINE(191, 230, 336, 231, 0, 1);
LODOP.ADD_PRINT_LINE(191, 258, 336, 259, 0, 1);
LODOP.ADD_PRINT_LINE(191, 299, 336, 300, 0, 1);
LODOP.ADD_PRINT_LINE(85, 179, 86, 359, 0, 1);
LODOP.ADD_PRINT_LINE(189, 178, 84, 179, 0, 1);
LODOP.ADD_PRINT_LINE(191, 10, 190, 390, 0, 1);
LODOP.ADD_PRINT_LINE(204, 10, 205, 390, 0, 1);
LODOP.ADD_PRINT_LINE(320, 10, 319, 390, 0, 1);
LODOP.ADD_PRINT_LINE(337, 10, 336, 390, 0, 1);
LODOP.ADD_PRINT_RECT(51, 137, 29, 30, 0, 1);
LODOP.ADD_PRINT_IMAGE(6, 23, 100, 30, "<img src='../PrintImage/logo.png' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);// 1可变形缩放2不可变形缩放
LODOP.ADD_PRINT_BARCODE(11, 86, 260, 57, "128B", model.BarCode);
}
//#endregion
//#region EUB2打印
function Print_EUB2(model, name, fileName) {
var Template = GetTemplate(name, fileName);
$("#txtAreaSerial", Template).html(model.AreaSerial);
$("#txtSendPerson", Template).html(model.SendPerson);
$("#txtSendAddress", Template).html(model.SendAddress);
$("#txtRevPerson", Template).html(model.RevPerson);
$("#txtRevAddress", Template).html(model.RevAddress);
$("#txtPCode", Template).html("(420)" + model.RevZip);
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Template.prop("outerHTML"));
LODOP.ADD_PRINT_LINE(117, 26, 116, 366, 0, 1);
LODOP.ADD_PRINT_LINE(197, 26, 196, 366, 0, 1);
LODOP.ADD_PRINT_LINE(270, 26, 271, 366, 0, 1);
LODOP.ADD_PRINT_LINE(50, 118, 49, 238, 0, 1);
LODOP.ADD_PRINT_RECT(37, 264, 66, 43, 0, 1);
LODOP.ADD_PRINT_RECT(38, 25, 57, 64, 0, 1);
LODOP.ADD_PRINT_IMAGE(19, 126, 100, 30, "<img src='../PrintImage/logo.png' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_IMAGE(52, 110, 126, 38, "<img src='../PrintImage/logo2.jpg' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_IMAGE(278, 270, 15, 15, "<img src='../PrintImage/R.png' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_IMAGE(129, 221, 110, 54, "<img src='" + model.RevZipBarCode + "' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);//(可变形)扩展缩放模式
LODOP.ADD_PRINT_BARCODE(298, 38, 299, 66, "128B", model.BarCode);
}
//#endregion
//#region 宁波小包打印
function Print_NB(model, name, fileName) {
var Template = GetTemplate(name, fileName);
$("#txtAreaSerial", Template).html(model.AreaSerial);
$("#txtSendPerson", Template).html("FROM:" + model.SendPerson);
$("#txtSendAddress", Template).html(model.SendAddress);
$("#txtSendPhone", Template).html("PHONE:" + model.SendPhone);
$("#txtOrderCode", Template).html("Fancy:" + model.OrderCode);
$("#txtRevPerson", Template).html("SHIP TO:" + model.RevPerson);
$("#txtRevAddress", Template).html(model.RevAddress);
$("#txtRevPhone", Template).html("PHONE:" + model.RevPhone + " Tel:" + model.RevMobile);
$("#txtCountry", Template).html(model.CountryCode + " " + model.AreaSerial2);
$("#txtRevCountry", Template).html(model.CountryName);
$("#txtRevZip", Template).html("zip:" + model.RevZip);
$("#txtCountGoodsNum", Template).html(model.CountGoodsNum);
$("#txtCountGoodsWeight", Template).html(model.CountGoodsWeight);
$("#txtCountGoodsPrice", Template).html(model.CountGoodsPrice);
$("#txtShopName", Template).html(model.ShopName);
var html = new Sys.StringBuilder();
$(model.ListModel).each(function (ii) {
if (ii == 7) {
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:middle;width: 218px;height: 17px;' >...</td>");
html.append("<td style='text-align:center;vertical-align:middle;width: 50px;height: 17px;' >...</td>");
html.append("<td style='text-align:center;vertical-align:middle;height: 17px;' >...</td>");
html.append("</tr>");
}
else if (ii < 7) {
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:middle;width: 218px;height: 17px;' >" + this.GoodsSimpleName + "【" + this.GoodsNum + "件】</td>");
html.append("<td style='text-align:center;vertical-align:middle;width: 50px;height: 17px;' >" + this.GoodsWeight + "</td>");
html.append("<td style='text-align:center;vertical-align:middle;height: 17px;' >" + this.GoodsPrice + "</td>");
html.append("</tr>");
}
});
$("#tb_Detail", Template).html(html.toString());
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Template.prop("outerHTML"));
LODOP.ADD_PRINT_BARCODE(10, 155, 210, 60, "128Auto", model.BarCode);
LODOP.ADD_PRINT_IMAGE(5, 30, 100, 30, "<img src='../PrintImage/logo.png' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_LINE(79, 150, 78, 365, 0, 1);
LODOP.ADD_PRINT_LINE(149, 149, 78, 150, 0, 1);
LODOP.ADD_PRINT_LINE(150, 10, 149, 149, 0, 1);
LODOP.ADD_PRINT_LINE(170, 10, 169, 345, 0, 1);
LODOP.ADD_PRINT_LINE(184, 10, 183, 345, 0, 1);
LODOP.ADD_PRINT_LINE(316, 10, 315, 345, 0, 1);
LODOP.ADD_PRINT_LINE(335, 10, 334, 345, 0, 1);
LODOP.ADD_PRINT_LINE(334, 228, 169, 229, 0, 1);
LODOP.ADD_PRINT_LINE(334, 288, 169, 289, 0, 1);
LODOP.ADD_PRINT_TEXT(243, 375, 51, 30, "宁波");
LODOP.SET_PRINT_STYLEA(0, "FontName", "Arial");
LODOP.SET_PRINT_STYLEA(0, "FontSize", 15);
LODOP.SET_PRINT_STYLEA(0, "Angle", 270);
LODOP.ADD_PRINT_LINE(238, 352, 237, 377, 0, 1);
LODOP.ADD_PRINT_LINE(292, 352, 291, 377, 0, 1);
LODOP.ADD_PRINT_LINE(237, 351, 292, 352, 0, 1);
LODOP.ADD_PRINT_RECT(42, 72, 35, 20, 0, 1);
}
//#endregion
//#region 甬沪小包打印
function Print_YH(model, name, fileName) {
var Template = GetTemplate(name, fileName);
$("#txtAreaSerial", Template).html(model.AreaSerial);
$("#txtSendPerson", Template).html("FROM:" + model.SendPerson);
$("#txtSendAddress", Template).html(model.SendAddress);
$("#txtSendPhone", Template).html("PHONE:" + model.SendPhone);
$("#txtOrderCode", Template).html("Fancy:" + model.OrderCode);
$("#txtRevPerson", Template).html("SHIP TO:" + model.RevPerson);
$("#txtRevAddress", Template).html(model.RevAddress);
$("#txtRevPhone", Template).html("PHONE:" + model.RevPhone + " Tel:" + model.RevMobile);
$("#txtCountry", Template).html(model.CountryCode + " " + model.AreaSerial2);
$("#txtRevCountry", Template).html(model.CountryName);
$("#txtRevZip", Template).html("zip:" + model.RevZip);
$("#txtCountGoodsNum", Template).html(model.CountGoodsNum);
$("#txtCountGoodsWeight", Template).html(model.CountGoodsWeight);
$("#txtShopName", Template).html(model.ShopName);
$("#txtRevZip", Template).html("zip:" + model.RevZip);
var html = new Sys.StringBuilder();
$(model.ListModel).each(function (ii) {
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:middle;width: 218px;' >" + this.GoodsSimpleName + "【" + this.GoodsNum + "件】</td>");
html.append("<td style='text-align:center;vertical-align:middle;width: 50px;' >" + this.GoodsWeight + "</td>");
html.append("<td style='text-align:center;vertical-align:middle;' >" + this.GoodsPrice + "</td>");
html.append("</tr>");
});
$("#tb_Detail", Template).html(html.toString());
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Template.prop("outerHTML"));
LODOP.ADD_PRINT_BARCODE(10, 155, 210, 60, "128Auto", model.BarCode);
LODOP.ADD_PRINT_IMAGE(5, 30, 100, 30, "<img src='../PrintImage/logo.png' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_LINE(79, 150, 78, 365, 0, 1);
LODOP.ADD_PRINT_LINE(149, 149, 78, 150, 0, 1);
LODOP.ADD_PRINT_LINE(150, 10, 149, 149, 0, 1);
LODOP.ADD_PRINT_LINE(170, 10, 169, 345, 0, 1);
LODOP.ADD_PRINT_LINE(184, 10, 183, 345, 0, 1);
LODOP.ADD_PRINT_LINE(316, 10, 315, 345, 0, 1);
LODOP.ADD_PRINT_LINE(335, 10, 334, 345, 0, 1);
LODOP.ADD_PRINT_LINE(334, 228, 169, 229, 0, 1);
LODOP.ADD_PRINT_LINE(334, 288, 169, 289, 0, 1);
LODOP.ADD_PRINT_TEXT(243, 375, 51, 30, "甬沪");
LODOP.SET_PRINT_STYLEA(0, "FontName", "Arial");
LODOP.SET_PRINT_STYLEA(0, "FontSize", 15);
LODOP.SET_PRINT_STYLEA(0, "Angle", 270);
LODOP.ADD_PRINT_LINE(238, 352, 237, 377, 0, 1);
LODOP.ADD_PRINT_LINE(292, 352, 291, 377, 0, 1);
LODOP.ADD_PRINT_LINE(237, 351, 292, 352, 0, 1);
LODOP.ADD_PRINT_RECT(42, 72, 35, 20, 0, 1);
}
//#endregion
//#region 上海小包打印
function Print_SH(model, name, fileName) {
var Template = GetTemplate(name, fileName);
$("#txtAreaSerial", Template).html("");
$("#txtSendPerson", Template).html("FROM:" + model.SendAddress);
$("#txtSendAddress", Template).html("退件机构:上海市邮政公司函件广告局");
$("#txtSendPhone", Template).html("Tel:" + model.SendPhone + " " + model.SendPerson);
$("#txtOrderCode", Template).html("客户代码: Ref No:52028944");
$("#txtRevPerson", Template).html("SHIP TO:" + model.RevPerson + "<Br/>" + model.RevAddress);
$("#txtTrackCode", Template).html(model.BarCode);
$("#txtRevAddress", Template).html("");
$("#txtRevPhone", Template).html("PHONE:" + model.RevPhone + " Tel:" + model.RevMobile);
$("#txtCountry", Template).html(model.CountryCode + " " + model.AreaSerial2);
$("#txtRevCountry", Template).html(model.CountryName + " " + model.AreaSerial);
$("#txtRevZip", Template).html("zip:" + model.RevZip);
$("#txtCountGoodsNum", Template).html(model.CountGoodsNum);
$("#txtCountGoodsWeight", Template).html(model.CountGoodsWeight);
$("#txtCountGoodsPrice", Template).html("$10");
$("#txtShopName", Template).html(model.ShopName);
var html = new Sys.StringBuilder();
$(model.ListModel).each(function (ii) {
if (ii == 7) {
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:middle;width: 218px;height: 17px;' >...</td>");
html.append("<td style='text-align:center;vertical-align:middle;width: 50px;height: 17px;' >...</td>");
html.append("<td style='text-align:center;vertical-align:middle;height: 17px;' >...</td>");
html.append("</tr>");
}
else if (ii < 7) {
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:middle;width: 218px;height: 17px;' >" + this.GoodsSimpleName + "【" + this.GoodsNum + "件】</td>");
html.append("<td style='text-align:center;vertical-align:middle;width: 50px;height: 17px;' >" + this.GoodsWeight + "</td>");
html.append("<td style='text-align:center;vertical-align:middle;height: 17px;' ></td>");
html.append("</tr>");
}
});
$("#tb_Detail", Template).html(html.toString());
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Template.prop("outerHTML"));
LODOP.ADD_PRINT_BARCODE(10, 136, 222, 50, "128Auto", "LN729029398CN");
LODOP.SET_PRINT_STYLEA(0, "ShowBarText", 0);
LODOP.ADD_PRINT_IMAGE(5, 22, 100, 30, "<img src='../PrintImage/logo.png' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_LINE(79, 163, 78, 363, 0, 1);
LODOP.ADD_PRINT_LINE(149, 162, 78, 163, 0, 1);
LODOP.ADD_PRINT_LINE(150, 11, 149, 161, 0, 1);
LODOP.ADD_PRINT_LINE(170, 10, 169, 370, 0, 1);
LODOP.ADD_PRINT_LINE(184, 10, 183, 370, 0, 1);
LODOP.ADD_PRINT_LINE(316, 10, 315, 370, 0, 1);
LODOP.ADD_PRINT_LINE(335, 10, 334, 370, 0, 1);
LODOP.ADD_PRINT_LINE(198, 10, 197, 370, 0, 1);
LODOP.ADD_PRINT_LINE(197, 288, 169, 289, 0, 1);
LODOP.ADD_PRINT_TEXT(243, 375, 51, 30, "上海");
LODOP.SET_PRINT_STYLEA(0, "FontName", "Arial");
LODOP.SET_PRINT_STYLEA(0, "FontSize", 15);
LODOP.SET_PRINT_STYLEA(0, "Angle", 270);
LODOP.ADD_PRINT_LINE(238, 352, 237, 377, 0, 1);
LODOP.ADD_PRINT_LINE(292, 352, 291, 377, 0, 1);
LODOP.ADD_PRINT_LINE(237, 351, 292, 352, 0, 1);
LODOP.ADD_PRINT_RECT(44, 50, 55, 20, 0, 1);
LODOP.ADD_PRINT_LINE(197, 232, 169, 233, 0, 1);
}
function Print_XSXB(model, name, fileName) {
var Template = GetTemplate(name, fileName);
$("#txtAreaSerial", Template).html("中邮宁波仓");
$("#txtSendPerson", Template).html("FROM:TMSK");
$("#txtSendAddress", Template).html("Building3,Guangyuan Road 69,Jiangbei NingBo Zhejiang,CN,315000");
$("#txtSendPhone", Template).html("Tel:" + model.SendPhone + " " + model.SendPerson);
$("#txtOrderCode", Template).html("");
$("#txtRevPerson", Template).html("SHIP TO:" + model.RevPerson + "<Br/>" + model.RevAddress);
$("#txtTrackCode", Template).html(model.BarCode);
$("#txtRevAddress", Template).html("");
$("#txtRevPhone", Template).html("PHONE:" + model.RevPhone + " Tel:" + model.RevMobile);
$("#txtCountry", Template).html(model.CountryCode + " " + model.AreaSerial2);
$("#txtRevCountry", Template).html(model.CountryName + " " + model.AreaSerial);
$("#txtRevZip", Template).html("zip:" + model.RevZip);
$("#txtCountGoodsNum", Template).html(model.CountGoodsNum);
$("#txtCountGoodsWeight", Template).html(model.CountGoodsWeight);
$("#txtCountGoodsPrice", Template).html("$10");
$("#txtShopName", Template).html(model.ShopName);
var html = new Sys.StringBuilder();
$(model.ListModel).each(function (ii) {
if (ii == 7) {
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:middle;width: 218px;height: 17px;' >...</td>");
html.append("<td style='text-align:center;vertical-align:middle;width: 50px;height: 17px;' >...</td>");
html.append("<td style='text-align:center;vertical-align:middle;height: 17px;' >...</td>");
html.append("</tr>");
}
else if (ii < 7) {
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:middle;width: 218px;height: 17px;' >" + this.GoodsSimpleName + "【" + this.GoodsNum + "件】</td>");
html.append("<td style='text-align:center;vertical-align:middle;width: 50px;height: 17px;' >" + this.GoodsWeight + "</td>");
html.append("<td style='text-align:center;vertical-align:middle;height: 17px;' ></td>");
html.append("</tr>");
}
});
$("#tb_Detail", Template).html(html.toString());
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Template.prop("outerHTML"));
LODOP.ADD_PRINT_BARCODE(10, 152, 222, 50, "128Auto", "LN729029398CN");
LODOP.SET_PRINT_STYLEA(0, "ShowBarText", 0);
LODOP.ADD_PRINT_IMAGE(5, 34, 100, 30, "<img src='../PrintImage/logo.png' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_LINE(79, 163, 78, 363, 0, 1);
LODOP.ADD_PRINT_LINE(168, 162, 78, 163, 0, 1);
LODOP.ADD_PRINT_LINE(150, 11, 149, 161, 0, 1);
LODOP.ADD_PRINT_LINE(170, 10, 169, 370, 0, 1);
LODOP.ADD_PRINT_LINE(184, 10, 183, 370, 0, 1);
LODOP.ADD_PRINT_LINE(316, 10, 315, 370, 0, 1);
LODOP.ADD_PRINT_LINE(335, 10, 334, 370, 0, 1);
LODOP.ADD_PRINT_LINE(198, 10, 197, 370, 0, 1);
LODOP.ADD_PRINT_LINE(197, 288, 169, 289, 0, 1);
LODOP.ADD_PRINT_TEXT(243, 375, 51, 30, "线上");
LODOP.SET_PRINT_STYLEA(0, "FontName", "Arial");
LODOP.SET_PRINT_STYLEA(0, "FontSize", 15);
LODOP.SET_PRINT_STYLEA(0, "Angle", 270);
LODOP.ADD_PRINT_LINE(238, 352, 237, 377, 0, 1);
LODOP.ADD_PRINT_LINE(292, 352, 291, 377, 0, 1);
LODOP.ADD_PRINT_LINE(237, 351, 292, 352, 0, 1);
LODOP.ADD_PRINT_RECT(44, 50, 55, 20, 0, 1);
LODOP.ADD_PRINT_LINE(197, 232, 169, 233, 0, 1);
}
//#endregion
//#region 俄邮宝打印
function Print_eEUB(model, name, fileName) {
var Template = GetTemplate(name, fileName);
$("#txtAreaSerial", Template).html(model.AreaSerial);
$("#txtSendPerson", Template).html("FROM:" + model.SendPerson);
$("#txtSendAddress", Template).html(model.SendAddress);
$("#txtSendPhone", Template).html("PHONE:" + model.SendPhone);
$("#txtSendZip", Template).html("CHINA:" + model.SendZip);
$("#txtRevPerson", Template).html("SHIP TO:" + model.RevPerson);
$("#txtRevAddress", Template).html(model.RevAddress);
$("#txtRevPhone", Template).html("PHONE:" + model.RevPhone + " Tel:" + modl.RevMobile);
$("#txtRevCountry", Template).html(model.RevCountry);
$("#txtRevZip", Template).html("zip:" + model.RevZip);
$("#txtCountGoodsNum", Template).html(model.CountGoodsNum);
$("#txtCountGoodsWeight", Template).html(model.CountGoodsWeight);
$("#txtCountGoodsPrice", Template).html(model.CountGoodsPrice);
var html = new Sys.StringBuilder();
$(model.ListModel).each(function (ii) {
if (ii == 7) {
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:top;width:15px;'>" + (ii + 1) + "</td>");
html.append("<td style='text-align:center;vertical-align:top;width:28px;' >...</td>");
html.append("<td style='text-align:left;vertical-align:top;width:163px;' >...</td>");
html.append("<td style='text-align:center;vertical-align:top;width:32px;' >...</td>");
html.append("<td style='text-align:center;vertical-align:top;width:42px;' >...</td>");
html.append("<td style='text-align:left;vertical-align:top;width:65px;' >...</td>");
html.append("</tr>");
}
else if (ii < 7) {
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:top;width:15px;'>" + (ii + 1) + "</td>");
html.append("<td style='text-align:center;vertical-align:top;width:28px;' >" + this.GoodsNum + "</td>");
html.append("<td style='text-align:left;vertical-align:top;width:163px;' >" + this.GoodsName + "</td>");
html.append("<td style='text-align:center;vertical-align:top;width:32px;' >" + this.GoodsWeight + "</td>");
html.append("<td style='text-align:center;vertical-align:top;width:42px;' >" + this.GoodsPrice + "</td>");
html.append("<td style='text-align:left;vertical-align:top;width:65px;' >" + this.GoodsOrigin + "</td>");
html.append("</tr>");
}
});
$("#tb_Detail", Template).html(html.toString());
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Template.prop("outerHTML"));
LODOP.ADD_PRINT_BARCODE(9, 170, 197, 60, "128Auto", model.BarCode);
LODOP.ADD_PRINT_IMAGE(19, 30, 100, 30, "<img src='../PrintImage/logo.png' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_LINE(79, 178, 78, 368, 0, 1);
LODOP.ADD_PRINT_LINE(193, 177, 78, 178, 0, 1);
LODOP.ADD_PRINT_LINE(170, 10, 169, 177, 0, 1);
LODOP.ADD_PRINT_LINE(181, 10, 180, 177, 0, 1);
LODOP.ADD_PRINT_LINE(194, 10, 193, 370, 0, 1);
LODOP.ADD_PRINT_LINE(207, 10, 206, 370, 0, 1);
LODOP.ADD_PRINT_LINE(322, 10, 321, 370, 0, 1);
LODOP.ADD_PRINT_LINE(338, 10, 337, 370, 0, 1);
LODOP.ADD_PRINT_LINE(337, 222, 193, 223, 0, 1);
LODOP.ADD_PRINT_LINE(337, 259, 193, 260, 0, 1);
LODOP.ADD_PRINT_LINE(337, 301, 193, 302, 0, 1);
LODOP.ADD_PRINT_RECT(45, 93, 59, 23, 0, 1);
LODOP.ADD_PRINT_LINE(67, 122, 45, 123, 0, 1);
LODOP.ADD_PRINT_LINE(337, 55, 193, 56, 0, 1);
LODOP.ADD_PRINT_LINE(337, 32, 193, 33, 0, 1);
//LODOP.ADD_PRINT_TEXT(46, 96, 21, 20, "RU");
//LODOP.ADD_PRINT_TEXT(47, 123, 27, 20, "5");
}
//#endregion
//#region 俄邮宝2打印
function Print_eEUB2(model, name, fileName) {
var Template = GetTemplate(name, fileName);
$("#txtAreaSerial", Template).html(model.AreaSerial);
$("#txtSendPerson", Template).html(model.SendPerson);
$("#txtSendAddress", Template).html(model.SendAddress);
$("#txtSendZip", Template).html("CHINA:" + model.SendZip);
$("#txtRevPerson", Template).html(model.RevPerson);
$("#txtRevAddress", Template).html(model.RevAddress);
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Template.prop("outerHTML"));
LODOP.ADD_PRINT_BARCODE(298, 83, 230, 66, "128Auto", model.BarCode);
LODOP.ADD_PRINT_IMAGE(64, 153, 100, 30, "<img src='../PrintImage/logo.png' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_IMAGE(124, 292, 65, 70, "<img src='../PrintImage/logo4.jpg' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_IMAGE(297, 316, 48, 65, "<img src='../PrintImage/logo5.jpg' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_IMAGE(293, 20, 48, 70, "<img src='../PrintImage/logo6.jpg' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_RECT(24, 31, 100, 60, 0, 1);
LODOP.ADD_PRINT_LINE(119, 10, 118, 370, 0, 1);
LODOP.ADD_PRINT_LINE(201, 10, 200, 370, 0, 1);
LODOP.ADD_PRINT_LINE(277, 10, 276, 370, 0, 1);
LODOP.ADD_PRINT_LINE(62, 155, 61, 255, 0, 1);
}
function Print_NBPY(model, name, fileName) {
var Template = GetTemplate(name, fileName);
$("#txtCountry", Template).html(model.CountryCode);
$("#txtAreaSerial", Template).html(model.CountryName + " " + model.AreaSerial);
$("#txtSendPerson", Template).html("FROM:" + model.SendPerson);
$("#txtSendAddress", Template).html(model.SendAddress);
$("#txtSendPhone", Template).html("Tel:" + model.SendPhone);
$("#txtRevPerson", Template).html("PHONE:" + model.SendPhone + " Tel:" + model.RevMobile + " zip:" + model.SendZip);
$("#txtRevAddress", Template).html("SHIP TO:" + model.RevPerson);
// $("#txtRevPhone", Template).html("PHONE:" + model.RevPhone);
$("#txtCountGoodsNum", Template).html(model.CountGoodsNum);
$("#txtCountGoodsWeight", Template).html(model.CountGoodsWeight);
$("#txtCountGoodsWeight1", Template).html(model.CountGoodsWeight);
$("#txtCountGoodsPrice", Template).html(model.CountGoodsPrice);
$("#txtCountGoodsPrice1", Template).html(model.CountGoodsPrice);
var html = new Sys.StringBuilder();
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:top;width:350px;'>");
$(model.ListModel).each(function (ii) {
html.append("" + this.GoodsName + "【" + this.GoodsNum + "件】<br/>");
});
html.append("</td></tr>");
$("#tb_Detail", Template).html(html.toString());
//$("#div1").html(Template.prop("outerHTML"));
//LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);//缩放模式
ReplaceImg(Template);
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Template.prop("outerHTML"));
LODOP.ADD_PRINT_LINE(23, 145, 22, 350, 0, 1);
LODOP.ADD_PRINT_LINE(101, 143, 23, 144, 0, 1);
LODOP.ADD_PRINT_LINE(70, 10, 69, 140, 0, 1);
LODOP.ADD_PRINT_LINE(85, 10, 84, 140, 0, 1);
LODOP.ADD_PRINT_LINE(104, 10, 103, 360, 0, 1);
LODOP.ADD_PRINT_LINE(166, 10, 165, 360, 0, 1);
LODOP.ADD_PRINT_LINE(182, 10, 181, 360, 0, 1);
LODOP.ADD_PRINT_LINE(196, 10, 195, 360, 0, 1);
LODOP.ADD_PRINT_LINE(323, 10, 322, 360, 0, 1);
LODOP.ADD_PRINT_LINE(338, 10, 337, 360, 0, 1);
LODOP.ADD_PRINT_LINE(196, 232, 164, 233, 0, 1);
LODOP.ADD_PRINT_LINE(196, 278, 164, 279, 0, 1);
LODOP.ADD_PRINT_BARCODE(107, 183, 200, 55, "128Auto", model.BarCode);
LODOP.ADD_PRINT_IMAGE(6, 23, 100, 30, "<img src='../PrintImage/logo.png' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);// 1可变形缩放2不可变形缩放
//LODOP.ADD_PRINT_BARCODE(9, 170, 197, 60, "128Auto", model.BarCode);
}
function Print_HZXB(model, name, fileName) {
var Template = GetTemplate(name, fileName);
$("#txtAreaSerial", Template).html("");
$("#txtSendPerson", Template).html("FROM:" + model.SendPerson);
$("#txtSendAddress", Template).html(model.SendAddress+" Phone:");
$("#txtSendPhone", Template).html("");
$("#txtOrderCode", Template).html("untracked:" + model.OrderCode);
$("#txtRevPerson", Template).html("SHIP TO:" + model.RevPerson + "," + model.RevAddress + ", " + model.AreaSerial + " " + model.CountryName + "<br/>ZIP:" + model.RevZip + "<br/>TEL:" + model.RevPhone + "" + model.RevMobile);
$("#txtRevAddress", Template).html("");
$("#txtRevPhone", Template).html("");
$("#txtCountry", Template).html(model.CountryCode + " " + model.AreaSerial2);
$("#txtRevCountry", Template).html("");
$("#txtRevZip", Template).html("");
$("#txtCountGoodsNum", Template).html("");
$("#txtCountGoodsWeight", Template).html(model.CountGoodsWeight);
$("#txtCountGoodsPrice", Template).html(model.CountGoodsPrice);
$("#txtTrackCode", Template).html(model.OrderCode);
var html = new Sys.StringBuilder();
$(model.ListModel).each(function (ii) {
if (ii == 7) {
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:middle;width: 218px;height: 17px;' >...</td>");
html.append("<td style='text-align:center;vertical-align:middle;width: 50px;height: 17px;' >...</td>");
html.append("<td style='text-align:center;vertical-align:middle;height: 17px;' >...</td>");
html.append("</tr>");
}
else if (ii < 7) {
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:middle;width: 218px;height: 17px;' >" + this.GoodsSimpleName + "【" + this.GoodsNum + "件】</td>");
html.append("<td style='text-align:center;vertical-align:middle;width: 50px;height: 17px;' >" + this.GoodsWeight + "</td>");
html.append("<td style='text-align:center;vertical-align:middle;height: 17px;' >" + this.GoodsPrice + "</td>");
html.append("</tr>");
}
});
$("#tb_Detail", Template).html(html.toString());
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Template.prop("outerHTML"));
LODOP.ADD_PRINT_BARCODE(21, 138, 240, 40, "128Auto", "LN565717964CN");
LODOP.SET_PRINT_STYLEA(0, "ShowBarText", 0);
LODOP.SET_PRINT_STYLEA(0, "Horient", 3);
LODOP.ADD_PRINT_IMAGE(14, 13, 110, 32, "<img src='../PrintImage/logo12.png' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_LINE(83, 12, 82, 366, 0, 1);
LODOP.ADD_PRINT_LINE(202, 153, 82, 154, 0, 1);
LODOP.ADD_PRINT_LINE(182, 11, 181, 153, 0, 1);
LODOP.ADD_PRINT_LINE(218, 10, 217, 358, 0, 1);
LODOP.ADD_PRINT_LINE(204, 10, 203, 358, 0, 1);
LODOP.ADD_PRINT_LINE(307, 10, 306, 358, 0, 1);
LODOP.ADD_PRINT_LINE(322, 10, 321, 358, 0, 1);
LODOP.ADD_PRINT_LINE(321, 220, 203, 221, 0, 1);
LODOP.ADD_PRINT_RECT(62, 41, 72, 17, 0, 1);
LODOP.ADD_PRINT_LINE(159, 10, 158, 152, 0, 1);
LODOP.ADD_PRINT_LINE(344, 10, 343, 360, 0, 1);
LODOP.ADD_PRINT_LINE(204, 290, 322, 291, 0, 1);
}
function Print_HZPY(model, name, fileName) {
var Template = GetTemplate(name, fileName);
$("#txtAreaSerial", Template).html("");
$("#txtSendPerson", Template).html("FROM:"+model.SendAddress + "<br/>Phone:");
$("#txtSendAddress", Template).html("");
$("#txtSendPhone", Template).html("");
$("#txtOrderCode", Template).html("自编号:" + model.OrderCode);
$("#txtRevPerson", Template).html("SHIP TO:" + model.RevPerson + "," + model.RevAddress + ", " + model.AreaSerial + " " + model.CountryName + "<br/>ZIP:" + model.RevZip + "<br/>Phone:" + model.RevPhone + "" + model.RevMobile);
$("#txtRevAddress", Template).html("");
$("#txtRevPhone", Template).html("");
$("#txtCountry", Template).html(model.CountryCode + " " + model.AreaSerial2);
$("#txtRevCountry", Template).html("");
$("#txtRevZip", Template).html("");
$("#txtCountGoodsNum", Template).html("");
$("#txtCountGoodsWeight", Template).html(model.CountGoodsWeight);
$("#txtCountGoodsPrice", Template).html(model.CountGoodsPrice);
$("#txtTrackCode", Template).html(model.BarCode);
var html = new Sys.StringBuilder();
$(model.ListModel).each(function (ii) {
if (ii == 7) {
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:middle;width: 218px;height: 17px;' >...</td>");
html.append("<td style='text-align:center;vertical-align:middle;width: 50px;height: 17px;' >...</td>");
html.append("<td style='text-align:center;vertical-align:middle;height: 17px;' >...</td>");
html.append("</tr>");
}
else if (ii < 7) {
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:middle;width: 218px;height: 17px;' >" + this.GoodsSimpleName + "【" + this.GoodsNum + "件】</td>");
html.append("<td style='text-align:center;vertical-align:middle;width: 50px;height: 17px;' >" + this.GoodsWeight + "</td>");
html.append("<td style='text-align:center;vertical-align:middle;height: 17px;' >" + this.GoodsPrice + "</td>");
html.append("</tr>");
}
});
$("#tb_Detail", Template).html(html.toString());
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Template.prop("outerHTML"));
LODOP.ADD_PRINT_BARCODE(155, 180, 210, 32, "128Auto", "LN729029398CN");
LODOP.SET_PRINT_STYLEA(0, "ShowBarText", 0);
LODOP.SET_PRINT_STYLEA(0, "Horient", 3);
LODOP.ADD_PRINT_IMAGE(10, 16, 110, 37, "<img src='../PrintImage/logo12.png' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_LINE(49, 10, 48, 370, 0, 1);
LODOP.ADD_PRINT_LINE(147, 153, 47, 154, 0, 1);
LODOP.ADD_PRINT_LINE(149, 10, 148, 370, 0, 1);
LODOP.ADD_PRINT_LINE(201, 10, 200, 370, 0, 1);
LODOP.ADD_PRINT_LINE(216, 10, 215, 370, 0, 1);
LODOP.ADD_PRINT_LINE(312, 11, 311, 371, 0, 1);
LODOP.ADD_PRINT_LINE(327, 9, 326, 369, 0, 1);
LODOP.ADD_PRINT_LINE(328, 220, 200, 221, 0, 1);
LODOP.ADD_PRINT_LINE(129, 10, 128, 152, 0, 1);
LODOP.ADD_PRINT_LINE(349, 10, 348, 370, 0, 1);
LODOP.ADD_PRINT_LINE(327, 290, 199, 291, 0, 1);
LODOP.ADD_PRINT_LINE(106, 10, 105, 152, 0, 1);
LODOP.ADD_PRINT_LINE(48, 267, 11, 268, 0, 1);
LODOP.ADD_PRINT_LINE(48, 320, 11, 321, 0, 1);
}
//#endregion
//#region 顺丰打印
function Print_SF(model, name, fileName) {
var Template = GetTemplate(name, fileName);
$("#txtSendPerson", Template).html(model.SendPerson);
var CurrentDate = new Date();
$("#txtSendDate", Template).text(CurrentDate.localeFormat("yyyy-MM-dd"));
$("#txtCountGoodsNum", Template).html(model.CountGoodsNum);
$("#txtCountGoodsWeight", Template).html(model.CountGoodsWeight);
$("#txtCountGoodsPrice", Template).html(model.CountGoodsPrice);
$("#txtGoodsWeight", Template).html(model.ListModel[0].GoodsWeight);
$("#txtGoodsPrice", Template).html(model.ListModel[0].GoodsPrice);
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Template.prop("outerHTML"));
LODOP.ADD_PRINT_BARCODE(314, 14, 190, 49, "128Auto", model.BarCode);
LODOP.ADD_PRINT_LINE(47, 5, 46, 375, 0, 1);
LODOP.ADD_PRINT_LINE(65, 5, 64, 375, 0, 1);
LODOP.ADD_PRINT_LINE(102, 5, 101, 375, 0, 1);
LODOP.ADD_PRINT_LINE(168, 5, 167, 375, 0, 1);
LODOP.ADD_PRINT_LINE(230, 5, 229, 375, 0, 1);
LODOP.ADD_PRINT_LINE(309, 5, 308, 375, 0, 1);
LODOP.ADD_PRINT_LINE(101, 5, 64, 6, 0, 1);
LODOP.ADD_PRINT_LINE(102, 30, 64, 31, 0, 1);
LODOP.ADD_PRINT_LINE(102, 139, 64, 140, 0, 1);
LODOP.ADD_PRINT_LINE(102, 163, 64, 164, 0, 1);
LODOP.ADD_PRINT_LINE(84, 6, 83, 30, 0, 1);
LODOP.ADD_PRINT_LINE(84, 140, 83, 163, 0, 1);
LODOP.ADD_PRINT_LINE(229, 229, 102, 230, 0, 1);
LODOP.ADD_PRINT_LINE(229, 315, 102, 316, 0, 1);
LODOP.ADD_PRINT_LINE(388, 300, 308, 301, 0, 1);
}
//#endregion
//#region 比利时邮政打印
function Print_BLSYZ(model, name, fileName) {
var Template = GetTemplate(name, fileName);
$("#txtOrderCode", Template).html("Order Number:" + model.OrderCode);
$("#txtGoodsSku", Template).html("SKU:" + model.ListModel[0].GoodsSku);
$("#txtSendAddress", Template).html("FROM:" + model.SendAddress);
$("#txtRevPerson", Template).html(model.RevPerson);
$("#txtRevAddress", Template).html(model.RevAddress);
$("#txtRevPhone", Template).html(model.RevPhone+" Tel:"+model.RevMobile);
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Template.prop("outerHTML"));
LODOP.ADD_PRINT_BARCODE(252, 47, 282, 66, "128Auto", model.BarCode);
// LODOP.ADD_PRINT_BARCODE(252, 47, 282, 66, "128Auto", "LN729029398CN");
LODOP.ADD_PRINT_RECT(31, 165, 206, 80, 0, 1);
LODOP.ADD_PRINT_IMAGE(34, 174, 85, 27, "<img src='../PrintImage/logo7.png' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_IMAGE(34, 290, 80, 27, "<img src='../PrintImage/logo8.png' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
}
function Print_YWSHPY(model, name, fileName) {
var Template = GetTemplate(name, fileName);
$("#txtCountry", Template).html(model.CountryCode);
$("#txtAreaSerial", Template).html(model.CountryName + " " + model.AreaSerial);
$("#txtSendPerson", Template).html("FROM:" + model.SendPerson);
$("#txtSendAddress", Template).html(model.SendAddress);
$("#txtSendPhone", Template).html("Tel:" + model.SendPhone);
$("#txtRevPerson", Template).html("PHONE:" + model.SendPhone + " Tel:" + model.RevMobile + " zip:" + model.SendZip);
$("#txtRevAddress", Template).html("SHIP TO:" + model.RevPerson);
// $("#txtRevPhone", Template).html("PHONE:" + model.RevPhone);
$("#txtCountGoodsNum", Template).html(model.CountGoodsNum);
$("#txtCountGoodsWeight", Template).html(model.CountGoodsWeight);
$("#txtCountGoodsWeight1", Template).html(model.CountGoodsWeight);
$("#txtCountGoodsPrice", Template).html(model.CountGoodsPrice);
$("#txtCountGoodsPrice1", Template).html(model.CountGoodsPrice);
//var html = new Sys.StringBuilder();
//html.append("<tr>");
//html.append("<td style='text-align:center;vertical-align:top;width:350px;'>");
//$(model.ListModel).each(function (ii) {
// html.append("" + this.GoodsName + "【" + this.GoodsNum + "件】<br/>");
//});
//html.append("</td></tr>");
//$("#tb_Detail", Template).html(html.toString());
//$("#div1").html(Template.prop("outerHTML"));
//LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);//缩放模式
ReplaceImg(Template);
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Template.prop("outerHTML"));
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_RECT(2, 2, 373, 373, 0, 1);
LODOP.ADD_PRINT_LINE(38, 2, 37, 375, 0, 1);
LODOP.ADD_PRINT_LINE(146, 2, 145, 375, 0, 1);
LODOP.ADD_PRINT_LINE(231, 2, 230, 374, 0, 1);
LODOP.ADD_PRINT_LINE(250, 2, 251, 375, 0, 1);
LODOP.ADD_PRINT_LINE(304, 2, 303, 375, 0, 1);
LODOP.ADD_PRINT_LINE(325, 2, 324, 375, 0, 1);
LODOP.ADD_PRINT_LINE(144, 135, 37, 136, 0, 1);
LODOP.ADD_PRINT_LINE(101, 2, 100, 132, 0, 1);
LODOP.ADD_PRINT_LINE(121, 2, 120, 134, 0, 1);
LODOP.ADD_PRINT_LINE(37, 283, 2, 284, 0, 1);
LODOP.ADD_PRINT_LINE(37, 332, 2, 333, 0, 1);
LODOP.ADD_PRINT_LINE(324, 244, 230, 245, 0, 1);
LODOP.ADD_PRINT_LINE(324, 291, 230, 292, 0, 1);
LODOP.ADD_PRINT_BARCODE(155, 170, 200, 55, "128Auto", model.BarCode);
LODOP.ADD_PRINT_IMAGE(6, 23, 100, 30, "<img src='../PrintImage/logo.png' />");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);// 1可变形缩放2不可变形缩放
//LODOP.ADD_PRINT_BARCODE(9, 170, 197, 60, "128Auto", model.BarCode);
}
function Print_YWSHPY2(model, name, fileName) {
var Template = GetTemplate(name, fileName);
$("#txtOrderCode", Template).html("Order Number:"+model.OrderCode);
$("#txtTrackCode", Template).html("TrackCode:" + model.BarCode);
$("#txtError", Template).html("");
var html = new Sys.StringBuilder();
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:top;width:350px;'>");
$(model.ListModel).each(function (ii) {
html.append("" + this.GoodsName + "【" + this.GoodsNum + "件】<br/>");
});
html.append("</td></tr>");
$("#tb_Detail", Template).html(html.toString());
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Template.prop("outerHTML"));
}
function Print_YYB(model, name, fileName) {
var Template = GetTemplate(name, fileName);
$("#txtCountry", Template).html("Y-POST-" + model.CountryName);
$("#txtCountry1", Template).html(model.CountryName);
$("#txtArea", Template).html(model.AreaSerial);
$("#txtOrderCode", Template).html("OrderNo" + model.OrderCode);
$("#txtRevPerson", Template).html("PHONE:" + model.SendPhone + " Tel:" + model.RevMobile + " zip:" + model.SendZip);
$("#txtRevAddress", Template).html("SHIP TO:" + model.RevPerson);
// $("#txtRevPhone", Template).html("PHONE:" + model.RevPhone);
$("#txtCountGoodsNum", Template).html(model.CountGoodsNum);
$("#txtDate", Template).html(model.OrderDate);
$("#txtDate1", Template).html(model.OrderDate);
var html = new Sys.StringBuilder();
html.append("<tr>");
html.append("<td style='text-align:center;vertical-align:top;width:350px;'>Saler Note:");
$(model.ListModel).each(function (ii) {
html.append("" + this.GoodsName + "【" + this.GoodsNum + "件】<br/>");
});
html.append("</td></tr>");
$("#tb_Detail", Template).html(html.toString());
//$("#div1").html(Template.prop("outerHTML"));
//LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);//缩放模式
ReplaceImg(Template);
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Template.prop("outerHTML"));
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
LODOP.ADD_PRINT_BARCODE(33, 85, 200, 55, "128Auto", model.BarCode);
LODOP.ADD_PRINT_LINE(104, 1, 103, 377, 0, 2);
LODOP.ADD_PRINT_LINE(125, 1, 126, 377, 0, 2);
LODOP.ADD_PRINT_RECT(243, 242, 30, 45, 0, 1);
LODOP.ADD_PRINT_LINE(262, 242, 261, 272, 0, 1);
LODOP.ADD_PRINT_BARCODE(227, 7, 220, 60, "128Auto", model.OrderCode);
//LODOP.ADD_PRINT_BARCODE(9, 170, 197, 60, "128Auto", model.BarCode);
}
//#region 初始化DataGrid
function CreateDataGrid() {
var col = new nblf.ui.DataGridColumn();
col.HeaderText = "快递服务";
col.CellTemplate = "<span>{Bind ExpressService}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "订单号";
col.CellTemplate = "<span>{Bind OrderCode}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "收件人";
col.CellTemplate = "<span>{Bind RevPerson}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "操作";
col.Width = "180px";
col.CellTemplate = "<input CommandName='cmdPrint' class='btnClass dgbtnEdit' type='button' value='打印'></input>";
Array.add(datagrid1.Columns, col);
datagrid1.IsFixHeader = false;
datagrid1.ShowIndexColumn = false;
datagrid1.AllowPaging = true;
datagrid1.Width = "100%";
datagrid1.SelectMode = nblf.ui.SelectMode.None;
datagrid1.Init();
datagrid1.add_PageIndexChanged(function () { ReadData(); });
}
//#endregion
//#region 读取数据
function ReadData() {
$.ajax({
url: "SysManageService.asmx/GetListOrder",
success: function (data) {
datagrid1.DataBind(data.d);
}
});
}
//#endregion
</script>
</head>
<body class="headbody">
<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></embed>
</object>
<div class="title_ico">
打印演示
</div>
<table id="tb1" class="tableAll" style="width: 100%;">
<tr>
<td>
<input id="cmdPrintAll" class="btnClass btnClassSave" type="button" value="打印列表" />
<input id="cmdPrint2" class="btnClass btnClassSave" type="button" value="打印条码" />&nbsp;
<input id="test" class="btnClass btnClassSave" type="button" value="test" />
</td>
</tr>
<tr>
<td valign="top">
<div id="DataGrid1" class="DataGridStyle">
</div>
</td>
</tr>
</table>
<div id="div1">
</div>
</body>
</html>