You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

70 lines
2.2 KiB

  1. @using Learun.Application.TwoDevelopment.AssetManagementSystem
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta name="viewport" content="width=device-width" />
  6. <title>CardPrint</title>
  7. @Html.AppendJsFile("/Content/jquery/jquery-1.10.2.min.js", "/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js")
  8. <script src="/Content/js/qrcode.min.js"></script>
  9. <link href="~/Content/cardprint/CardPrint.css" rel="stylesheet" />
  10. <script>
  11. function request(d) {
  12. for (var c = location.search.slice(1).split("&"), a = 0; a < c.length; a++) {
  13. var b = c[a].split("=");
  14. if (b[0] == d)
  15. if ("undefined" == unescape(b[1])) break;
  16. else return unescape(b[1])
  17. }
  18. return ""
  19. };
  20. </script>
  21. </head>
  22. <body style="">
  23. <div id="qrcodeBox" style="text-align:center;margin-top:20px;">
  24. @*<div class="qrcodeBox" style="display:inline-block">
  25. <div id="qrcode" style="margin:0 auto 5px;"></div>
  26. <div class="qrcodeTxt" style="font-size:12px;"></div>
  27. </div>*@
  28. @foreach (Ass_AssetsInfoItemEntity item in ViewBag.Lists)
  29. {
  30. <div style="margin-bottom:20px;">
  31. <img src="@item.ImgBase64String"/>
  32. <div style="font-size:12px;">@item.AIASSName@item.AICode</div>
  33. </div>
  34. }
  35. </div>
  36. <div id="btnprint" type="button" class="btns" value="打印">打印</div>
  37. <script>
  38. //标签打印
  39. //var qrcode = new QRCode(document.getElementById("qrcode"), {
  40. // width: 142,
  41. // height: 142
  42. //});
  43. //var keyValue = request('keyValue');//二维码
  44. //var aName = request('aName');
  45. //$('.qrcodeTxt').html(unescape(aName));
  46. $(function () {
  47. //qrcode.makeCode(keyValue);
  48. $("#btnprint").on("click", function () {
  49. AddPrintContent3()
  50. });
  51. });
  52. // 打印表单
  53. function AddPrintContent3() {
  54. $('#btnprint').css('display', 'none')
  55. window.print();
  56. $('#btnprint').css('display', 'block')
  57. }
  58. </script>
  59. </body>
  60. </html>