截流自动化的商城平台
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. {layout name="layout1" /}
  2. <style>
  3. .tips {
  4. color: red;
  5. }
  6. .layui-form-label {
  7. width: 100px;
  8. }
  9. </style>
  10. <div class="wrapper">
  11. <div class="layui-card">
  12. <!--操作提示-->
  13. <div class="layui-card-body">
  14. <div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
  15. <div class="layui-colla-item">
  16. <h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
  17. <div class="layui-colla-content layui-show">
  18. <p>*设置小票打印模板</p>
  19. </div>
  20. </div>
  21. </div>
  22. </div>
  23. <!--表单-->
  24. <div class="layui-card-body">
  25. <div class="layui-form" lay-filter="">
  26. <input type="hidden" name="type" value="1">
  27. <!--小票标题-->
  28. <div class="layui-form-item">
  29. <label class="layui-form-label">小票标题:</label>
  30. <div class="layui-input-inline">
  31. <input type="text" name="title" lay-verify="required" lay-verType="tips" placeholder="请输入标题"
  32. autocomplete="off" class="layui-input" value="{$detail.title | default = ''}">
  33. </div>
  34. </div>
  35. <!--二维码链接-->
  36. <div class="layui-form-item">
  37. <label class="layui-form-label">二维码链接:</label>
  38. <div class="layui-input-inline">
  39. <input type="text" name="qr_code_link" lay-verify="required" lay-verType="tips"
  40. placeholder="请输入二维码链接" autocomplete="off" class="layui-input" value="{$detail.qr_code_link | default = ''}">
  41. </div>
  42. </div>
  43. <div class="layui-form-item">
  44. <label class="layui-form-label"></label>
  45. <span style="color: #a3a3a3;">生成二维码的链接</span>
  46. </div>
  47. <!--小票说明-->
  48. <div class="layui-form-item">
  49. <label class="layui-form-label">小票说明:</label>
  50. <div class="layui-col-md4">
  51. <textarea name="remark" placeholder="请输入小票说明" class="layui-textarea">{$detail.remark | default = ''}</textarea>
  52. </div>
  53. </div>
  54. <div class="layui-form-item">
  55. <label class="layui-form-label"></label>
  56. <span style="color: #a3a3a3;">小票尾部文字</span>
  57. </div>
  58. <div class="layui-form-item">
  59. <div class="layui-input-block">
  60. <button class="layui-btn layui-btn-normal {$view_theme_color}" lay-submit lay-filter="addSublime">确定</button>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. <script>
  68. layui.use(['table', 'form'], function () {
  69. var form = layui.form;
  70. like.delUpload();
  71. $(document).on("click", ".logo", function () {
  72. like.imageUpload({
  73. limit: 1,
  74. field: "logo",
  75. that: $(this)
  76. });
  77. });
  78. // 监听提交
  79. form.on('submit(addSublime)', function (data) {
  80. like.ajax({
  81. url: '{:url("printer.template/edit")}'
  82. , data: data.field
  83. , type: 'post'
  84. , success: function (res) {
  85. if (res.code === 1) {
  86. layer.msg(res.msg, {
  87. offset: '15px'
  88. , icon: 1
  89. , time: 1000
  90. },function () {
  91. location.href = location.href;
  92. });
  93. }
  94. }
  95. });
  96. return false;
  97. });
  98. });
  99. </script>