|
@@ -0,0 +1,90 @@
|
|
|
+<head>
|
|
|
+ <style>
|
|
|
+ /*标签纸打印宽度*/
|
|
|
+ .print-page-label{width:100mm;margin: 0;}
|
|
|
+ /*分页命令*/
|
|
|
+ .change-page{page-break-after: always;font: 12px 'Microsoft Yahei';color: #000;}
|
|
|
+ </style>
|
|
|
+ <link rel="stylesheet" href="/ui/css/print.css" />
|
|
|
+</head>
|
|
|
+
|
|
|
+<!-- print-page-label 限制了页面宽度100mm -->
|
|
|
+<body class="print-page-label" style="width:105mm;">
|
|
|
+</body>
|
|
|
+
|
|
|
+<script type="text/javascript" >
|
|
|
+$(function () {
|
|
|
+ var orderIds = getParam('orderIds');
|
|
|
+ if(orderIds == null || orderIds ==''){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: "/outstock/printWaybill/customsHtml",
|
|
|
+ contentType:"application/json",
|
|
|
+ data:orderIds,
|
|
|
+ success: function(msg){
|
|
|
+ console.log(msg);
|
|
|
+ if(msg.code!=0){
|
|
|
+ alert("加载数据失败,"+msg.msg);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //填充数据
|
|
|
+ var html = baidu.template('printBody',msg);
|
|
|
+ $("body").html(html);
|
|
|
+ hideLoad();
|
|
|
+ },
|
|
|
+ error: function () {
|
|
|
+ $.iMessager.alert('注意', '网络断开或服务器已停止运行', 'messager-warning');
|
|
|
+ }
|
|
|
+ },"json");
|
|
|
+
|
|
|
+ function hideLoad(){
|
|
|
+ //进度条隐藏
|
|
|
+ Pace.on('hide', function(){
|
|
|
+ console.info('加载完毕');
|
|
|
+ });
|
|
|
+ };
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<script id="printBody" type="text/html">
|
|
|
+ <%if(data != null){%>
|
|
|
+ <%for(var i=0; i<data.length; i++){%>
|
|
|
+ <div style="border:1px solid #000;width: 92mm;height: 72mm;padding-left: 1mm;padding-top: 1mm;">
|
|
|
+ <div style="height:16mm;width:100%; text-align: center; border-bottom:1px solid #000;">
|
|
|
+ <img style="margin-top:1mm;" src="data:image/png;base64,<%=data.orderNoBarcodeData%>">
|
|
|
+ <div style="font-size: 4mm; margin-left: 1mm;margin-top: 0mm;"><%=data[i].orderNo1%></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="height:17mm;width:100%; text-align: center; border-bottom:1px solid #000000;">
|
|
|
+ <img style="margin-top:1mm;" src="data:image/png;base64,<%=data.trackingNoBarcodeData%>">
|
|
|
+ <div style="font-size: 12px; margin-left: 1mm"><%=data[i].trackingNo1%></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="height:20mm;width:100%;text-align: left;">
|
|
|
+ <span style="margin-left: 5px;margin-top: 5px;">
|
|
|
+ 报关信息:
|
|
|
+ <%if(data[i].allocationList != null){%>
|
|
|
+ <table style="width: 100%;" border="1px solid #ccc" cellspacing="0" cellpadding="0">
|
|
|
+ <tr>
|
|
|
+ <th>商品条码</th>
|
|
|
+ <th>品名</th>
|
|
|
+ <th>数量</th>
|
|
|
+ </tr>
|
|
|
+ <%for(var j=0; j<data[i].allocationList.length; j++){%>
|
|
|
+ <tr>
|
|
|
+ <td><%=data[i].allocationList[j].barcode%></td>
|
|
|
+ <td><%=data[i].allocationList[j].customsName%></td>
|
|
|
+ <td><%=data[i].allocationList[j].quantity%></td>
|
|
|
+ </tr>
|
|
|
+ <%}%>
|
|
|
+ </table>
|
|
|
+ <%}%>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <%}%>
|
|
|
+ <%}%>
|
|
|
+</script>
|