123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <!DOCTYPE html>
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title>index</title>
- </head>
- <body>
- <div class="layui-fluid">
- <input type="hidden" id="order_id" name="order_id" value="{$order_id}"/>
- <div class="layui-row layui-col-space15">
- <div class="layui-col-md12">
- <div class="layui-card" id="print_content" style="height: 580px;">
- {$kdn_info.print_template}
- </div>
- </div>
- <div class="layui-input-inline" style="text-align:center;">
- <button class="layui-btn layui-btn-sm print_kdn_order"> 打印</button>
- <button class="layui-btn layui-btn-sm cancel_btn"> 取消</button>
- </div>
- </div>
- </div>
- <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
- <script type="text/javascript" src="/static/js/jquery.PrintArea.min.js"></script>
- <script>
- $(function(){
- $('.print_kdn_order').click(function(){
- var extraHead = '<meta charset="utf-8" />,<meta http-equiv="X-UA-Compatible" content="IE=edge"/>';
- var op = {
- mode : "popup",
- popTitle : '打印面单', //打印窗口标题
- popClose : true
- };
- $("#print_content").printArea(op);
- var order_id = $('#order_id').val();
- $.post("{:U('order/kdn_send')}", {id:order_id}, function(data){
- console.log(data);
- });
- var go_url = location.href;
- location.href = go_url;
- layer.closeAll();
- })
- $('.cancel_btn').click(function(){
- layer.closeAll();
- })
- })
- </script>
- </body>
- </html>
-
|