sms_temp.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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>
  19. <div class="layui-card-body">
  20. <form class="layui-form layui-form-pane" action="">
  21. <div class="layui-form-item">
  22. <div class="layui-inline">
  23. <label class="layui-form-label">模板类型</label>
  24. <div class="layui-input-block">
  25. <select name="temp_type">
  26. <option value="">全部</option>
  27. <option value="1">验证码</option>
  28. <option value="2">通知</option>
  29. <option value="3">推广</option>
  30. </select>
  31. </div>
  32. </div>
  33. <!-- <div class="layui-inline">-->
  34. <!-- <label class="layui-form-label">模板名称</label>-->
  35. <!-- <div class="layui-input-block">-->
  36. <!-- <input type="text" name="title" class="layui-input" placeholder="请输入模板名称">-->
  37. <!-- </div>-->
  38. <!-- </div>-->
  39. <div class="layui-inline">
  40. <div class="layui-input-inline">
  41. <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
  42. <i class="layui-icon layui-icon-search"></i>搜索</button>
  43. </div>
  44. </div>
  45. </div>
  46. </form>
  47. </div>
  48. </div>
  49. </div>
  50. <!--产品列表-->
  51. <div class="layui-col-md12">
  52. <div class="layui-card">
  53. <div class="layui-card-header"><?php if($type == 'temps'){ echo '模板列表';}else{echo '申请记录';}?></div>
  54. <div class="layui-card-body">
  55. <div class="layui-btn-container">
  56. <?php if($type != 'apply'){?>
  57. <button type="button" class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}')">申请模板</button>
  58. <a href="javascript:void(0);" onclick="$eb.createModalFrame('申请记录','{:Url('setting.systemPlat/sms_temp?type=apply')}',{w:1300,h:760})"><button type="button" class="layui-btn layui-btn-sm" >模板列表</button></a>
  59. <?php } ?>
  60. </div>
  61. <table class="layui-hide" id="List" lay-filter="List"></table>
  62. <script type="text/html" id="status">
  63. {{# if(d.status == 1){ }}可用
  64. {{# }else if(d.status == 0){ }}待审核
  65. {{# }else if(d.status == 2){ }}禁用
  66. {{# }else{ }}
  67. 审核未通过<br>
  68. {{ d.mark }}
  69. {{# }; }}
  70. </script>
  71. <script type="text/html" id="type">
  72. {{# if(d.temp_type == 1){ }}验证码
  73. {{# }else if(d.temp_type == 2){ }}通知
  74. {{# }else if(d.temp_type == 3){ }}推广
  75. {{# }; }}
  76. </script>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <script src="{__ADMIN_PATH}js/layuiList.js"></script>
  83. {/block}
  84. {block name="script"}
  85. <script>
  86. var type = "<?php echo $type;?>";
  87. if(type == 'temps'){
  88. var url = "{:Url('get_sms_temps')}";
  89. layList.tableList('List',url,function (){
  90. return [
  91. {field: 'id', title: 'ID', sort: true,width:'6%',align:'center'},
  92. {field: 'temp_id', title: '模板ID',align:'center',width:'6%'},
  93. {field: 'title', title: '模板名称',align:'center',width:'12%'},
  94. {field: 'content', title: '模板内容',align:'center'},
  95. {field: 'type', title: '模板类型',templet:'#type',align:'center',width:'6%'},
  96. {field: 'status', title: '模板状态',templet:'#status',align:'center',width:'6%'},
  97. ];
  98. });
  99. }else{
  100. var url = "{:Url('get_sms_appls')}";
  101. layList.tableList('List',url,function (){
  102. return [
  103. {field: 'id', title: 'ID', sort: true,width:'6%',align:'center'},
  104. {field: 'title', title: '模板名称',align:'center',width:'12%'},
  105. {field: 'content', title: '模板内容',align:'center'},
  106. {field: 'type', title: '模板类型',templet:'#type',align:'center',width:'8%'},
  107. {field: 'status', title: '模板状态',templet:'#status',align:'center',width:'8%'},
  108. {field: 'add_time', title: '添加时间',align:'center',width:'15%'}
  109. ];
  110. });
  111. }
  112. //实例化form
  113. layList.form.render();
  114. //加载列表
  115. //查询
  116. layList.search('search',function(where){
  117. layList.reload(where);
  118. });
  119. </script>
  120. {/block}