|
|
@@ -1,5 +1,22 @@
|
|
|
+<style type="text/css">
|
|
|
+ .tg {border-collapse:collapse;border-spacing:0;}
|
|
|
+ .tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
|
|
|
+ overflow:hidden;padding:10px 5px;word-break:normal;}
|
|
|
+ .tg th{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
|
|
|
+ font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;}
|
|
|
+ .tg .tg-ub5w{font-size:36px;text-align:center;vertical-align:middle;border: none}
|
|
|
+ .tg .tg-x1hj{font-size:22px;text-align:left;vertical-align:top;}
|
|
|
+ .tg .tg-kghl{font-size:22px;text-align:left;vertical-align:middle;}
|
|
|
+ .tg .tg-z7m5{font-size:22px;text-align:left;text-decoration:underline;vertical-align:top;border: none}
|
|
|
+ .tg .tg-s5vw{font-size:22px;font-weight:bold;text-align:center;vertical-align:bottom;border: none}
|
|
|
+ .tg .tg-v8dz{font-size:24px;text-align:left;vertical-align:top;border: none}
|
|
|
+ .tg .tg-svyg{font-size:22px;font-weight:bold;text-align:left;text-decoration:underline;vertical-align:bottom;border: none}
|
|
|
+ .tg .tg-4qqe{font-size:22px;font-weight:bold;text-align:center;vertical-align:top;border: none}
|
|
|
+ .tg .tg-9d8n{font-size:22px;text-align:left;vertical-align:top;}
|
|
|
+ .tg .tg-0pky{text-align:left;vertical-align:top;border: none}
|
|
|
+</style>
|
|
|
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
|
|
-
|
|
|
+ <input type="hidden" id="ids" value="{$ids}">
|
|
|
<div style="width: 40%;float:left;margin: 0px 0px 0px 0px">
|
|
|
<div class="form-group">
|
|
|
<label class="control-label col-xs-12 col-sm-5">{:__('Name')}:</label>
|
|
|
@@ -40,7 +57,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-<!--=================================================================================================-->
|
|
|
+ <!--=================================================================================================-->
|
|
|
<div class="form-group">
|
|
|
<table class="table table-striped table-bordered table-hover table-nowrap" id="table">
|
|
|
<tr>
|
|
|
@@ -65,6 +82,146 @@
|
|
|
{/foreach}
|
|
|
</table>
|
|
|
</div>
|
|
|
-
|
|
|
+ <!--===========================================================-->
|
|
|
+ <div style="display: none">
|
|
|
+ <div class="form-group" id="print_area" >
|
|
|
+ <div id="head">
|
|
|
+ <table class="tg" style="width: 800px;">
|
|
|
+ <thead>
|
|
|
+ <div id="qrcode" style="margin:0 0 -450px 500px;width: 80px;height: 80px;">
|
|
|
+ <img src="" id="myImage" alt=""/>
|
|
|
+ </div>
|
|
|
+ <tr>
|
|
|
+ <th class="tg-v8dz" colspan="6" >
|
|
|
+ <!--<p id="formula_no"></p>-->
|
|
|
+ <!--<hr style="border: 1px solid;margin-top: -5px">-->
|
|
|
+ </th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td class="tg-s5vw"></td>
|
|
|
+ <td class="tg-svyg"></td>
|
|
|
+ <td class="tg-ub5w" colspan="2" rowspan="2">作业票 </td>
|
|
|
+ <td class="tg-4qqe"></td>
|
|
|
+ <td class="tg-s5vw"></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="tg-9d8n" style="border: none">日期:{$date}</td>
|
|
|
+ <td class="tg-z7m5" id="date"></td>
|
|
|
+ <td class="tg-9d8n">开票人</td>
|
|
|
+ <td class="tg-9d8n">审核</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="tg-9d8n" style="border: none">批号:{$task.bach}</td>
|
|
|
+ <td class="tg-z7m5" id="bach"></td>
|
|
|
+ <td class="tg-kghl" style="border: none"><input type="text" id="formula" value="{$task.name}" style="width: 400px;text-align: center"></td>
|
|
|
+ <td class="tg-0pky"></td>
|
|
|
+ <td class="tg-x1hj" id="drawer_name">{$task.drawer_name}</td>
|
|
|
+ <td class="tg-x1hj" id="examine_name">{$task.examine_name}</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ <div style="height: 20px;"></div>
|
|
|
+ <div id="body">
|
|
|
+ <table class="tg" style="width: 800px;" id="print_gy">
|
|
|
+ <tr>
|
|
|
+ <th style="text-align: center">原材料</th>
|
|
|
+ <!-- <th style="text-align: center">百分比</th>-->
|
|
|
+ <th style="text-align: center">应加量(KG)</th>
|
|
|
+ <th style="text-align: center">实加量(KG)</th>
|
|
|
+ <th style="text-align: center">操作记录</th>
|
|
|
+ </tr>
|
|
|
+ {foreach name='$gyinfo' id='vo'}
|
|
|
+ <tr>
|
|
|
+ <td style="width: 100px;text-align: center">{$vo.material}</td>
|
|
|
+ <!--<td style="width: 100px">{$vo.percentage}</td>-->
|
|
|
+ <td data-id="{$vo.id}" id="text-{$vo.id}" style="width: 100px;text-align: center">{$vo.num}</td>
|
|
|
+ <td style="width: 100px;text-align: center"></td>
|
|
|
+ <td style="width: 400px;">{$vo.gy_name}</td>
|
|
|
+ </tr>
|
|
|
+ {/foreach}
|
|
|
+ <tr>
|
|
|
+ <td style="width: 100px;text-align: center">总计</td>
|
|
|
+ <td class="total" style="width: 100px;text-align: center">{$task.number}</td>
|
|
|
+ <td></td>
|
|
|
+ <td></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td colspan="5" class="remark"></td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ <div style="height: 5px;"></div>
|
|
|
+ <table class="tg" style="width: 800px;">
|
|
|
+ <tr>
|
|
|
+ <td style="border: none">
|
|
|
+ <span>包装规格:</span>
|
|
|
+ <hr style="border: 1px solid;width: 150px;margin-top: -5px;">
|
|
|
+ <div style="position: absolute;margin-left: 270px;margin-top: -36px;">KG/桶</div>
|
|
|
+ </td>
|
|
|
+ <td style="border: none">作业票回收日期:<hr style="border: 1px solid;width: 150px;margin-top: -5px;"></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="border: none">操作人员:<hr style="border: 1px solid;width: 150px;margin-top: -5px;"></td>
|
|
|
+ <td style="border: none">检验签字:<hr style="border: 1px solid;width: 150px;margin-top: -5px;"></td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group layer-footer">
|
|
|
+ <label class="control-label col-xs-12 col-sm-2"></label>
|
|
|
+ <div class="col-xs-12 col-sm-8">
|
|
|
+ <button type="button" class="btn btn-default btn-embossed print-link">打印预览</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</form>
|
|
|
-
|
|
|
+<script type='text/javascript' src='__CDN__/assets/js/jquery2.1.1.min.js'></script>
|
|
|
+<script type="text/javascript" src="__CDN__/assets/js/jquery.qrcode.min.js"></script>
|
|
|
+<script type="text/javascript" src="__CDN__/assets/js/jQuery.print.js"></script>
|
|
|
+<script >
|
|
|
+ jQuery(function($) { 'use strict';
|
|
|
+ $(".print-link").on('click', function() {
|
|
|
+ var status = 1;
|
|
|
+ var number = $('#c-number').val();
|
|
|
+ if (number == ''){
|
|
|
+ status = 2;
|
|
|
+ }
|
|
|
+ var bach = $('#c-bach').val();
|
|
|
+ if (bach == ''){
|
|
|
+ status = 2;
|
|
|
+ }
|
|
|
+ var drawer_name = $('#c-drawer_name').val();
|
|
|
+ if (drawer_name == ''){
|
|
|
+ status = 2;
|
|
|
+ }
|
|
|
+ var examine_name = $('#c-examine_name').val();
|
|
|
+ if (examine_name == ''){
|
|
|
+ status = 2;
|
|
|
+ }
|
|
|
+ if (status == 2){
|
|
|
+ layer.confirm('数据不能为空,请仔细核查');return false
|
|
|
+ }
|
|
|
+ // var ids = $('#ids').val();
|
|
|
+ // bach = bach + '-' + ids;
|
|
|
+ createQrcode(bach,80,80);
|
|
|
+ var img = document.getElementById("myImage"); /// get image element
|
|
|
+ var canvas = document.getElementsByTagName('canvas')[0];
|
|
|
+ img.src = canvas.toDataURL(); /// update image
|
|
|
+ $.print('#print_area');
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+ function createQrcode(txt,width,height) {
|
|
|
+ $("#qrcode").qrcode({
|
|
|
+ render: "canvas",//canvas和table两种渲染方式
|
|
|
+ width: width,
|
|
|
+ height: height,
|
|
|
+ correctLevel:3,//二维码纠错级别
|
|
|
+ background:"#ffffff",//背景颜色
|
|
|
+ foreground:"#000000", //二维码颜色
|
|
|
+ text:txt
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+</script>
|