| | |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/print.css" media="all"> |
| | | <style> |
| | | #search-box { |
| | | padding: 30px 30px 10px 30px; |
| | | } |
| | | #search-box .layui-inline { |
| | | margin-right: 5px; |
| | | } |
| | | #data-search-btn { |
| | | margin-top: 10px; |
| | | } |
| | | #data-search-btn.layui-btn-container .layui-btn { |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | .btn-print { |
| | | display: none; |
| | | } |
| | |
| | | color: #333; |
| | | } |
| | | |
| | | /* ------------------------------------------------ */ |
| | | /* ------------------------- 打印表格 ----------------------- */ |
| | | .template-preview { |
| | | height: 200px; |
| | | display: inline-block; |
| | | } |
| | | |
| | | |
| | | .contain { |
| | | border: 1px solid #000; |
| | | /*width: 100%;*/ |
| | | } |
| | | .contain td { |
| | | border: 1px solid #000; |
| | | /*line-height: 46px;*/ |
| | | text-align: center; |
| | | } |
| | | /*.qrcode {*/ |
| | | /* margin: 3px;*/ |
| | | /*}*/ |
| | | </style> |
| | | </head> |
| | | <body> |
| | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">物料编码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="mat_no" placeholder="请输入" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="mat_no" placeholder="物料编码" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 日期范围 --> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="modi_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item" style="display: inline-block"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">详情</a> |
| | | <button class="layui-btn layui-btn-danger layui-btn-xs btn-print" lay-event="btnPrint">打印</button> |
| | | <!-- <a class="layui-btn layui-btn-xs btn-edit" lay-event="edit">编辑</a>--> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | |
| | | <hr> |
| | | <!--单选框--> |
| | | <div class="layui-form-item" style="display: inline-block; margin-bottom: 10px"> |
| | | <input type="radio" name="sex" value="男" title="模板一" checked=""> |
| | | <input type="radio" name="sex" value="女" title="模板二"> |
| | | <input type="radio" name="sex" value="禁" title="模板三"> |
| | | <input type="radio" name="selectTemplate" value="1" title="模板一" lay-filter="selectTemplateRadio" checked=""> |
| | | <input type="radio" name="selectTemplate" value="2" title="模板二" lay-filter="selectTemplateRadio"> |
| | | <input type="radio" name="selectTemplate" value="3" title="模板三" lay-filter="selectTemplateRadio"> |
| | | </div> |
| | | <fieldset class="layui-elem-field site-demo-button" style="margin-top: 30px;text-align: left;"> |
| | | <legend>打印预览</legend> |
| | | <div id="template-container" style="margin: 20px;text-align: center"> |
| | | |
| | | <!-- 预览图 1 --> |
| | | <div id="template-preview-1" class="template-preview"> |
| | | <table class="contain" height="317" width="317" style="overflow: hidden"> |
| | | <tr> |
| | | <td width="20%" align="right" scope="col">客户</td> |
| | | <td class="customer" width="30%" align="left" scope="col">{{this.customer}}</td> |
| | | <td width="20%" align="right" scope="col">颜色</td> |
| | | <td class="color" width="30%" align="left" scope="col">1</td> |
| | | <div id="template-preview-1" class="template-preview" style="display: inline-block"> |
| | | <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | <tr style="height: 74px"> |
| | | <td colspan="3" align="center" scope="col">物料编码</td> |
| | | <td class="barcode" colspan="9" align="center" scope="col"> |
| | | <img class="template-code template-barcode" src="" width="90%;"> |
| | | <div style="letter-spacing: 2px;margin-top: 1px; text-align: center;"> |
| | | <span>xxxxxx</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td align="right">生产日期</td> |
| | | <td class="createTime" align="left">{{this.createTime$}}</td> |
| | | <td align="right">数量</td> |
| | | <td class="amount" align="left">{{this.amount}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="right">型号打字</td> |
| | | <td class="modelType" align="left" colspan="3">{{this.modelType}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="right">产品批号</td> |
| | | <td class="seq" align="left">{{this.seq}}</td> |
| | | <td colspan="2" rowspan="3" align="right"><img class="qrcode" src="" style="width: 80%"></td> |
| | | </tr> |
| | | <tr> |
| | | <td align="right">装检验号</td> |
| | | <td class="boxCheck" align="left">{{this.boxCheck}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="right">箱号</td> |
| | | <td class="boxNumber" align="left">{{this.boxNumber}}</td> |
| | | <tr style="height: 74px"> |
| | | <td align="center" colspan="3">物料名称</td> |
| | | <td align="center" colspan="5">xxxxxx-xx/xx</td> |
| | | <td align="center" colspan="2">单位</td> |
| | | <td align="center" colspan="2">xx</td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | |
| | | <!-- 预览图 2 --> |
| | | <div class="template-preview"></div> |
| | | <div id="template-preview-2" class="template-preview" style="display: none"> |
| | | <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | <tr style="height: 30px"> |
| | | <td align="center" width="20%">物料名称</td> |
| | | <td align="center" width="80%" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">xxxxxxx</td> |
| | | </tr> |
| | | <tr style="height: 30px"> |
| | | <td align="center" width="20%">物料单位</td> |
| | | <td align="center" width="80%">xxxxxxxx</td> |
| | | </tr> |
| | | <tr style="height: 75px;"> |
| | | <td align="center" colspan="2" width="100%" style="border: none"> |
| | | <img class="template-code template-barcode" src="" width="80%"> |
| | | <div style="letter-spacing: 2px;margin-top: 1px; text-align: center"> |
| | | <span>xxxxxx</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | |
| | | <!-- 预览图 3 --> |
| | | <div class="template-preview"></div> |
| | | <div id="template-preview-3" class="template-preview" style="display: none"> |
| | | <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | <tr style="height: 74px"> |
| | | <td align="center" scope="col" colspan="1">物料名称</td> |
| | | <td align="center" scope="col" colspan="1" style="">xxxxxx-xx/xx</td> |
| | | <td align="center" scope="col" colspan="2" rowspan="2"> |
| | | <img class="template-code template-qrcode" src="" width="80%"> |
| | | <div style="letter-spacing: 1px;margin-top: 1px; text-align: center"> |
| | | <span>xxxxxx</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 74px"> |
| | | <td align="center" colspan="1">物料单位</td> |
| | | <td align="center" colspan="1" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">xxxxxxx</td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="box" style="display: block"></div> |
| | | |
| | | <!-- 初始化打印模板的条形码 --> |
| | | <script type="text/javascript"> |
| | | $('.template-barcode').attr("src", baseUrl+"/macCode/code/auth?type=1¶m=123"); |
| | | $('.template-qrcode').attr("src", baseUrl+"/macCode/code/auth?type=2¶m=123"); |
| | | </script> |
| | | |
| | | <!-- 模板引擎 --> |
| | | <!-- 模板1 --> |
| | | <script type="text/template" id="templatePreview1"> |
| | | <script type="text/template" id="templatePreview1" class="template-barcode"> |
| | | {{#each data}} |
| | | <table class="contain" width="280" style="overflow: hidden;font-size: small;table-layout: fixed;"> |
| | | <tr style="height: 74px"> |
| | | <td align="center" colspan="3" scope="col">物料编码</td> |
| | | <td align="center" class="barcode" colspan="9" scope="col"> |
| | | <img class="template-code" src="{{this.barcodeUrl}}" width="90%"> |
| | | <div style="letter-spacing: 2px;margin-top: 1px; text-align: center"> |
| | | <span>{{this.matNo}}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 74px"> |
| | | <td align="center" colspan="3">物料名称</td> |
| | | <td align="center" colspan="5" style="overflow: hidden; white-space: nowrap;text-overflow: ellipsis;">{{this.matName}}</td> |
| | | <td align="center" colspan="2">单位</td> |
| | | <td align="center" colspan="2">{{this.str1}}</td> |
| | | </tr> |
| | | </table> |
| | | {{/each}} |
| | | </script> |
| | | <!-- 模板2 --> |
| | | <script type="text/template" id="templatePreview2"> |
| | | <script type="text/template" id="templatePreview2" class="template-barcode"> |
| | | {{#each data}} |
| | | <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | <tr style="height: 35px"> |
| | | <td align="center" width="20%">物料名称</td> |
| | | <td align="center" width="80%" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">{{this.matName}}</td> |
| | | </tr> |
| | | <tr style="height: 35px"> |
| | | <td align="center" width="20%">物料单位</td> |
| | | <td align="center" width="80%">{{this.str1}}</td> |
| | | </tr> |
| | | <tr style="height: 79px;"> |
| | | <td align="center" colspan="2" width="100%" style="border: none"> |
| | | <img class="template-code" src="{{this.barcodeUrl}}" width="80%"> |
| | | <div style="letter-spacing: 2px;margin-top: 1px; text-align: center"> |
| | | <span>{{this.matNo}}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | {{/each}} |
| | | </script> |
| | | <!-- 模板3 --> |
| | | <script type="text/template" id="templatePreview3"> |
| | | <script type="text/template" id="templatePreview3" class="template-qrcode"> |
| | | {{#each data}} |
| | | <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | <tr style="height: 74px"> |
| | | <td align="center" scope="col" colspan="1">物料名称</td> |
| | | <td align="center" scope="col" colspan="1" style="">{{this.matName}}</td> |
| | | <td align="center" scope="col" colspan="2" rowspan="2"> |
| | | <img class="template-code template-qrcode" src="{{this.barcodeUrl}}" width="80%"> |
| | | <div style="letter-spacing: 1px;margin-top: 1px; text-align: center"> |
| | | <span>{{this.matNo}}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 74px"> |
| | | <td align="center" colspan="1">物料单位</td> |
| | | <td align="center" colspan="1" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">{{this.str1}}</td> |
| | | </tr> |
| | | </table> |
| | | {{/each}} |
| | | </script> |
| | | |
| | | </body> |