index.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. {extend name="public/container"}
  2. {block name="content"}
  3. <style>
  4. .logout{
  5. float: right;
  6. margin-right: 100px;
  7. }
  8. .logout span{
  9. margin-right: 20px;
  10. }
  11. </style>
  12. <div class="layui-fluid">
  13. <div class="layui-row layui-col-space15" id="app">
  14. <div class="layui-col-md12">
  15. <div class="layui-card">
  16. <div class="layui-card-header">
  17. 搜索条件
  18. <div class="layui-inline logout">
  19. <span class="">账号:{$sms_account}</span>
  20. <a type="button" class="layui-btn layui-btn-sm" href="{:Url('sms.SmsConfig/logout')}">退 出</a>
  21. </div>
  22. </div>
  23. <div class="layui-card-body">
  24. <form class="layui-form layui-form-pane" action="">
  25. <div class="layui-form-item">
  26. <div class="layui-inline">
  27. <label class="layui-form-label">模板状态</label>
  28. <div class="layui-input-block">
  29. <select name="status">
  30. <option value="">状态</option>
  31. <option value="1">正常</option>
  32. <option value="0">锁定</option>
  33. </select>
  34. </div>
  35. </div>
  36. <div class="layui-inline">
  37. <label class="layui-form-label">模板名称</label>
  38. <div class="layui-input-block">
  39. <input type="text" name="title" class="layui-input" placeholder="请输入模板名称">
  40. </div>
  41. </div>
  42. <div class="layui-inline">
  43. <div class="layui-input-inline">
  44. <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
  45. <i class="layui-icon layui-icon-search"></i>搜索</button>
  46. </div>
  47. </div>
  48. </div>
  49. </form>
  50. </div>
  51. </div>
  52. </div>
  53. <!--产品列表-->
  54. <div class="layui-col-md12">
  55. <div class="layui-card">
  56. <div class="layui-card-header">模板列表</div>
  57. <div class="layui-card-body">
  58. <div class="layui-btn-container">
  59. <button type="button" class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}')">申请模板</button>
  60. <button type="button" class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('sms.smsPublicTemp/index')}',{'w':1500})">公共短信模板</button>
  61. </div>
  62. <table class="layui-hide" id="List" lay-filter="List"></table>
  63. <script type="text/html" id="status">
  64. {{# if(d.status == 1){ }}可用
  65. {{# }else if(d.status == 0){ }}待审核
  66. {{# }else if(d.status == 2){ }}禁用
  67. {{# }else{ }}
  68. 审核未通过<br>
  69. {{ d.mark }}
  70. {{# }; }}
  71. </script>
  72. <script type="text/html" id="type">
  73. {{# if(d.type == 1){ }}验证码
  74. {{# }else if(d.type == 2){ }}通知
  75. {{# }else if(d.type == 3){ }}推广
  76. {{# }; }}
  77. </script>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. <script src="{__ADMIN_PATH}js/layuiList.js"></script>
  84. {/block}
  85. {block name="script"}
  86. <script>
  87. //实例化form
  88. layList.form.render();
  89. //加载列表
  90. layList.tableList('List',"{:Url('lst')}",function (){
  91. return [
  92. {field: 'id', title: 'ID', sort: true,event:'id',width:'6%',align:'center'},
  93. {field: 'templateid', title: '模板ID',align:'center',width:'6%'},
  94. {field: 'title', title: '模板名称',align:'center',width:'12%'},
  95. {field: 'content', title: '模板内容',align:'center'},
  96. {field: 'type', title: '模板类型',templet:'#type',align:'center',width:'6%'},
  97. {field: 'status', title: '模板状态',templet:'#status',align:'center',width:'6%'},
  98. {field: 'add_time', title: '添加时间',align:'center',width:'10%'}
  99. ];
  100. });
  101. //查询
  102. layList.search('search',function(where){
  103. layList.reload(where);
  104. });
  105. </script>
  106. {/block}