Web中 C-Lodop 打印常用表单前端排版自定义设置;

本文介绍了如何使用C-Lodop插件在Web中实现订货单和调拨单的前端排版自定义打印功能。详细阐述了三联、二联及A4纸张的打印设置,包括纸张大小和对应的尺寸参数。读者需下载Lodop打印插件以进行实际操作。
摘要由CSDN通过智能技术生成

常用的打印设置:使用C-Lodop插件实现常用单据打印功能;以常用订货单和调拨单为例设置打印功能;

需要下载Lodop 打印的插件:http://www.lodop.net/download.html

1、常用订货单设置:

//引入:
<link rel="stylesheet" href="/layui/css/layui.css" media="all" />
<script src="/js/jquery.js"></script>
<script charset="utf-8" async="true" src="/js/LodopFuncs.js"></script>
//html:
 <p class="mt-3 text-center">
     <button type="button" onclick="print_preview2('0','201mm','93mm')" class="layui-btn layui-btn-sm layui-btn-primary">三等分纸打印</button>
     <button type="button" onclick="print_preview2('0','201mm','140mm')" class="layui-btn layui-btn-sm layui-btn-primary">二等分纸打印</button>
    <button type="button" onclick="print_preview2('20','190mm','277mm')" class="layui-btn layui-btn-sm layui-btn-primary">A4纸打印</button>
      <button type="button" onclick="CheckIsInstall()" class="layui-btn layui-btn-sm">验证控件</button> 
</p>  
 <div class="print-content" id="print-content2" style="margin:10px auto;width:730px;">
  <table id="print-table2" style="width:100%;" cellspacing="0" cellpadding="0"> 
      <thead>
              <tr>
                 <th colspan="8" bgcolor="#ccc" style="text-align: center;font-size: 18px;font-weight: bold;background-color:#ccc;border:1px solid #333;height: 30px;line-height: 30px;">  <?=$top_name?>订货单 </th>
             </tr>
	<tr>
	    <td style="text-align: left; font-size: 14px;border:1px solid #333;height: 30px;line-height: 30px;" colspan="4">订单编号:<?=$data['order_sn']?> </td>
	    <td style="text-align: left; font-size: 14px;border:1px solid #333;height: 30px;line-height: 30px;" colspan="4">下单日期:<?=$data['created_time']?></td>
	</tr>  
	<tr>
	    <td width="8%" style="font-size: 14px;border:1px solid #333;height: 30px;line-height: 30px;">序号</td>
	    <td width="12%" style="font-size: 14px;border:1px solid #333;height: 30px;line-height: 30px;">商品编码</td>
	    <td width="23%" style="font-size: 14px;border:1px solid #333;height: 30px;line-height: 30px;">商品名称</td>
	    <td width="15%" style="font-size: 14px;border:1px solid #333;height: 30px;line-height: 30px;">商品规格</td>
	    <td width="8%" style="font-size: 14px;border:1px solid #333;height: 30px;line-height: 30px;">计量单位</td>
	    <td width="10%" style="font-size: 14px;border:1px solid #333;height: 30px;line-height: 30px;">数量</td>
	    <td width="10%" style="font-size: 14px;border:1px solid #333;height: 30px;line-height: 30px;">单价价(元)</td>
	    <td width="16%" style="font-size: 14px;border:1px solid #333;height: 30px;line-height: 30px;">小计(元)</td>
	</tr> 
	</thead>                       
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值