|  |  |  | 
|---|
|  |  |  | <div id="template-container" style="margin: 20px;text-align: center"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 预览图 1 --> | 
|---|
|  |  |  | <div id="template-preview-1" class="template-preview" style="display: none"> | 
|---|
|  |  |  | <div id="template-preview-1" class="template-preview" style="display: inline-block"> | 
|---|
|  |  |  | <table class="contain" height="217" width="317" style="overflow: hidden;font-size: xx-small"> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <td colspan="1" align="center" scope="col">条码</td> | 
|---|
|  |  |  | <td class="barcode" colspan="3" align="center" scope="col"> | 
|---|
|  |  |  | <img class="template-qrcode" src="" width="80%"> | 
|---|
|  |  |  | <img class="template-code template-barcode" src="" width="80%"> | 
|---|
|  |  |  | <div style="letter-spacing: 2px;margin-top: 3px; text-align: center"> | 
|---|
|  |  |  | <span>xxxxxx</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <td align="center" colspan="6" style="border: none"> | 
|---|
|  |  |  | <img class="template-qrcode" src="" width="80%"> | 
|---|
|  |  |  | <img class="template-code template-barcode" src="" width="80%"> | 
|---|
|  |  |  | <div style="letter-spacing: 2px;margin-top: 3px; text-align: center"> | 
|---|
|  |  |  | <span>xxxxxx</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 预览图 3 --> | 
|---|
|  |  |  | <div id="template-preview-3" class="template-preview" style="display: inline-block"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div id="template-preview-3" class="template-preview" style="display: none"> | 
|---|
|  |  |  | <table class="contain" height="217" width="317" style="overflow: hidden;font-size: xx-small"> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <td align="center" scope="col" width="50%" colspan="3">物料编码</td> | 
|---|
|  |  |  | <td align="center" scope="col" width="50%" colspan="3">xxxxxx-xx/xx</td> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <td align="center" colspan="3">物料名称</td> | 
|---|
|  |  |  | <td align="center" colspan="3">xxxxxxx</td> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <td align="center" width="50%" rowspan="1" colspan="3">物料规格</td> | 
|---|
|  |  |  | <td align="center" width="50%" colspan="3" rowspan="4"> | 
|---|
|  |  |  | <img class="template-code template-qrcode" src=""> | 
|---|
|  |  |  | </td> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <td align="center" colspan="3" rowspan="1">xxxxxx</td> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <td align="center" colspan="3" rowspan="1">物料单位</td> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <td align="center" colspan="3" rowspan="1">xxxxxxxx</td> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | </table> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 初始化打印模板的条形码 --> | 
|---|
|  |  |  | <script type="text/javascript"> | 
|---|
|  |  |  | $('.template-qrcode').attr("src", baseUrl+"/macCode/barcode/auth?param=123"); | 
|---|
|  |  |  | $('.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" height="217" width="317" style="overflow: hidden;font-size: xx-small"> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <td align="center" colspan="1" scope="col">条码</td> | 
|---|
|  |  |  | <td align="center" class="barcode" colspan="3" scope="col"> | 
|---|
|  |  |  | <img class="qrcode" src="{{this.barcodeUrl}}" width="80%"> | 
|---|
|  |  |  | <img class="template-code" src="{{this.barcodeUrl}}" width="80%"> | 
|---|
|  |  |  | <div style="letter-spacing: 2px;margin-top: 3px; text-align: center"> | 
|---|
|  |  |  | <span>{{this.barcode}}</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | {{/each}} | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  | <!-- 模板2 --> | 
|---|
|  |  |  | <script type="text/template" id="templatePreview2"> | 
|---|
|  |  |  | <script type="text/template" id="templatePreview2" class="template-barcode"> | 
|---|
|  |  |  | {{#each data}} | 
|---|
|  |  |  | <table class="contain" height="217" width="317" style="overflow: hidden;font-size: xx-small"> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <td align="center" colspan="6" style="border: none"> | 
|---|
|  |  |  | <img class="template-qrcode" src="{{this.barcodeUrl}}" width="80%"> | 
|---|
|  |  |  | <img class="template-code" src="{{this.barcodeUrl}}" width="80%"> | 
|---|
|  |  |  | <div style="letter-spacing: 2px;margin-top: 3px; text-align: center"> | 
|---|
|  |  |  | <span>{{this.matNo}}</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | {{/each}} | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  | <!-- 模板3 --> | 
|---|
|  |  |  | <script type="text/template" id="templatePreview3"> | 
|---|
|  |  |  | <script type="text/template" id="templatePreview3" class="template-qrcode"> | 
|---|
|  |  |  | {{#each data}} | 
|---|
|  |  |  | <table class="contain" height="217" width="317" style="overflow: hidden;font-size: xx-small"> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <td align="center" scope="col" width="50%" colspan="3">物料编码</td> | 
|---|
|  |  |  | <td align="center" scope="col" width="50%" colspan="3">{{this.matNo}}</td> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <td align="center" colspan="3">物料名称</td> | 
|---|
|  |  |  | <td align="center" colspan="3">{{this.matName}}</td> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <td align="center" width="50%" rowspan="1" colspan="3">物料单位</td> | 
|---|
|  |  |  | <td align="center" width="50%" colspan="3" rowspan="4"> | 
|---|
|  |  |  | <img class="template-code template-qrcode" src="{{this.barcodeUrl}}"> | 
|---|
|  |  |  | </td> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <td align="center" colspan="3" rowspan="1">{{this.str1}}</td> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <td align="center" colspan="3" rowspan="1">物料规格</td> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <td align="center" colspan="3" rowspan="1">{{this.str2}}</td> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | </table> | 
|---|
|  |  |  | {{/each}} | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </body> | 
|---|