暫無描述
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.

index.htm 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. {include file="public/layout" /}
  2. <body class="bodystyle" style="cursor: default; -moz-user-select: inherit;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page min-hg-c-10">
  6. {include file="zc_position/admin_bar" /}
  7. <div class="flexigrid">
  8. <div class="mDiv">
  9. <div class="ftitle">
  10. {if condition="$main_lang == $admin_lang || !empty($global['language_split'])"}
  11. {eq name="$Think.const.CONTROLLER_NAME.'@add'|is_check_access" value="1"}
  12. <div class="fbutton" style="display:none;">
  13. <a href="javascript:void(0);" data-href="{:url('ZcwdPosition/add')}" onclick="openFullframe(this, '新增职称', '80%', '70%');">
  14. <div class="add">
  15. <span><i class="layui-icon layui-icon-addition"></i>新增职称</span>
  16. </div>
  17. </a>
  18. </div>
  19. {/eq}
  20. {/if}
  21. </div>
  22. <form id="searchForm" class="navbar-form form-inline" action="{:url('ZcwdPosition/index')}" method="get" onsubmit="layer_loading('正在处理');">
  23. {$searchform.hidden|default=''}
  24. <div class="sDiv">
  25. <div class="sDiv2" style="display: none;">
  26. <select name="type" class="select" style="margin:0px 5px;">
  27. <option value="">--选择地区--</option>
  28. {eyou:foreach name='$pro_list' item='field1'}
  29. <option value="{$field1.id}" {eq name="$Request.param.type" value="$field1.id"}selected{/eq}>{$field1.name}</option>
  30. {/eyou:foreach}
  31. </select>
  32. </div>
  33. <div class="sDiv2">
  34. <input type="text" size="30" name="keywords" value="{$Request.param.keywords}" class="qsbox" placeholder="名称搜索...">
  35. <input type="submit" class="btn" value="搜索">
  36. <i class="iconfont e-sousuo"></i>
  37. </div>
  38. </div>
  39. </form>
  40. </div>
  41. <div class="hDiv">
  42. <div class="hDivBox">
  43. <table cellspacing="0" cellpadding="0" style="width: 100%">
  44. <thead>
  45. <tr>
  46. {if condition="$main_lang == $admin_lang || !empty($global['language_split'])"}
  47. <th class="sign w40" axis="col0">
  48. <div class="tc"><input type="checkbox" class="checkAll"></div>
  49. </th>
  50. {/if}
  51. <th abbr="article_title" axis="col3" class="w60">
  52. <div class="tc">ID</div>
  53. </th>
  54. <th abbr="article_title" axis="col3">
  55. <div class="tl text-l10" style="width: 100%">条件名称</div>
  56. </th>
  57. <th abbr="article_title" axis="col3" class="w100">
  58. <div class="tc">触发规则</div>
  59. </th>
  60. <th abbr="article_title" axis="col3" class="w100">
  61. <div class="tc">是否需要前置证书</div>
  62. </th>
  63. <th abbr="article_title" axis="col3" class="w120">
  64. <div class="tc">主题图片</div>
  65. </th>
  66. <th abbr="article_time" axis="col6" class="w60">
  67. <div class="tc">启用</div>
  68. </th>
  69. <th axis="col1" class="w180">
  70. <div class="tc">操作</div>
  71. </th>
  72. </tr>
  73. </thead>
  74. </table>
  75. </div>
  76. </div>
  77. <div class="bDiv" style="height: auto;">
  78. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  79. <table style="width: 100%">
  80. <tbody>
  81. {empty name="list"}
  82. <tr>
  83. <td class="no-data" align="center" axis="col0" colspan="50">
  84. <div class="no_row">
  85. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  86. </div>
  87. </td>
  88. </tr>
  89. {else/}
  90. {foreach name="list" item="vo" key="k" }
  91. <tr>
  92. {if condition="$main_lang == $admin_lang || !empty($global['language_split'])"}
  93. <td class="sign">
  94. <div class="w40 tc"> <input type="checkbox" name="ids[]" value="{$vo.id}"> </div>
  95. </td>
  96. {/if}
  97. <td>
  98. <div class="tc w60">
  99. {eq name='$main_lang' value='$admin_lang'}
  100. {$vo.id}
  101. {else /}
  102. {$main_adv_list[$vo['id']]['id']|default=$vo['id']}
  103. {/eq}
  104. </div>
  105. </td>
  106. <td align="left" style="width:100%;">
  107. <div class="tl text-l10" style="color:{$vo.color}">
  108. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  109. <a href="javascript:void(0);" data-href="{:url('ZcwdPosition/edit',array('id'=>$vo['id']))}" data-closereload="1" onclick="openFullframe(this, '编辑广告', '100%', '100%');" style="color:{$vo.color}">{$vo.title}</a>
  110. {else /}
  111. {$vo.title}
  112. {/eq}
  113. </div>
  114. </td>
  115. <td>
  116. <div class="tc w100">
  117. </div>
  118. </td>
  119. <td>
  120. <div class="tc w100">
  121. {eyou:if condition='($vo.is_zs > 0)'}
  122. 需要 <?php echo count(json_decode($vo['zhengshu'])); ?>个
  123. {eyou:else /}
  124. 不需要
  125. {/eyou:if}
  126. </div>
  127. </td>
  128. <td>
  129. <div class="tc w120">
  130. <ul class="adpic">
  131. {volist name="$vo.ad" id="vs" length="1" }
  132. <li>
  133. <img src="{$vs.litpic}"> {eq name="$vo.type" value="1"}<span>{$vo.ad_count}</span>{/eq}
  134. </li>
  135. {/volist}
  136. </ul>
  137. </div>
  138. </td>
  139. <td>
  140. <div class="tc w60">
  141. {if condition="$vo['status'] eq 1"}
  142. <span class="yes" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}onClick="changeTableVal('zcwd_position','id','{$vo.id}','status',this);"{/eq} ><i class="fa fa-check-circle"></i>是</span>
  143. {else /}
  144. <span class="no" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}onClick="changeTableVal('zcwd_position','id','{$vo.id}','status',this);"{/eq} ><i class="fa fa-ban"></i>否</span>
  145. {/if}
  146. </div>
  147. </td>
  148. <td class="operation">
  149. <div class="w180 tc">
  150. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  151. <a href="javascript:void(0);" data-href="{:url('ZcwfPosition/edit',array('id'=>$vo['id']))}" data-closereload="1" class="btn blue" onclick="openFullframe(this, '编辑前置条件规则', '80%', '70%');">编辑</a> <i></i>
  152. {/eq}
  153. {if condition="$main_lang == $admin_lang || !empty($global['language_split'])"}
  154. {eq name="$Think.const.CONTROLLER_NAME.'@del'|is_check_access" value="1"}
  155. <a class="btn red" href="javascript:void(0);" data-url="{:url('ZcwfPosition/del')}" data-id="{$vo.id}" onClick="delfun(this);">删除</a>
  156. {/eq} <!--<i></i>-->
  157. {/if}
  158. <!-- <a class="btn blue" href="javascript:void(0);" onclick="copyToClipBoard({$main_adv_list[$vo['id']]['id']|default=$vo['id']}, 1, {$vo['type']})">标签调用</a>-->
  159. </div>
  160. </td>
  161. </tr>
  162. {/foreach}
  163. {/empty}
  164. </tbody>
  165. </table>
  166. </div>
  167. <div class="iDiv" style="display: none;"></div>
  168. </div>
  169. {notempty name="list"}
  170. <div class="tDiv">
  171. <div class="tDiv2">
  172. {if condition="$main_lang == $admin_lang || !empty($global['language_split'])"}
  173. <div class="fbutton checkboxall"> <input type="checkbox" class="checkAll"> </div>
  174. {eq name="$Think.const.CONTROLLER_NAME.'@del'|is_check_access" value="1"}
  175. <div class="fbutton">
  176. <a onclick="batch_del(this, 'ids');" data-url="{:url('ZcwdPosition/del')}" class="layui-btn layui-btn-primary">批量删除</a>
  177. </div>
  178. {/eq}
  179. {/if}
  180. <!-- 分页 -->
  181. {include file="public/page" /}
  182. </div>
  183. <div style="clear:both"></div>
  184. </div>
  185. {/notempty}
  186. </div>
  187. </div>
  188. <script type="text/javascript">
  189. $(function() {
  190. $('input[name*=ids]').click(function() {
  191. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  192. $('.checkAll').prop('checked', 'checked');
  193. } else {
  194. $('.checkAll').prop('checked', false);
  195. }
  196. });
  197. $('input[type=checkbox].checkAll').click(function() {
  198. $('input[type=checkbox]').prop('checked', this.checked);
  199. });
  200. });
  201. $(document).ready(function() {
  202. // 表格行点击选中切换
  203. $('#flexigrid > table>tbody >tr').click(function() {
  204. $(this).toggleClass('trSelected');
  205. });
  206. // 点击刷新数据
  207. $('.fa-refresh').click(function() {
  208. location.href = location.href;
  209. });
  210. $('#searchForm select[name=type]').change(function(){
  211. $('#searchForm').submit();
  212. });
  213. });
  214. /**
  215. * 代码调用js
  216. * @param id id
  217. * @param limit 条数
  218. */
  219. function copyToClipBoard(id, limit, type) {
  220. var advstr = '';
  221. if (1 == type) {
  222. advstr = "{eyou:adv pid='" + id + "'}\r\n <img src='{$"+"field.litpic}' alt='{$"+"field.title}' />\r\n{/eyou:adv";
  223. } else if (2 == type) {
  224. advstr = "{eyou:adv pid='" + id + "'}\r\n <video src='{$"+"field.litpic}' controls preload='auto' oncontextmenu='return fase'></video>\r\n{/eyou:adv";
  225. } else if (3 == type) {
  226. advstr = "{eyou:adv pid='" + id + "'}\r\n {$"+"field.intro}\r\n{/eyou:adv";
  227. }
  228. var contentdiv = '<div class="dialog_content" style="margin: 0px; padding: 0px;"><dl style="padding:10px 30px;line-height:30px"><dd>标签 adv 调用:</dd>';
  229. contentdiv += '<textarea rows="4" cols="60" style="width:400px;height:60px;">' + advstr + '}</textarea>';
  230. contentdiv += '<dd>JavaScript:</dd>';
  231. contentdiv += '<dd><input type="text" style=" width:400px;" value="<script type=&quot;text/javascript&quot; src=&quot;http://' + '{$Think.server.http_host}' + '__ROOT_DIR__/index.php?m=api&amp;c=Other&amp;a=other_show&amp;pid=' + id + '&amp;row='+limit+'&quot;><\/script>"></dd>';
  232. contentdiv += '<dd style="border-top: dotted 1px #E7E7E7; color: #F60;">请将标签adv或JavaScript代码复制并粘贴到对应模板文件中!</dd></dl></div>';
  233. layer.open({
  234. title: '代码调用',
  235. type: 1,
  236. shade: layer_shade,
  237. skin: 'layui-layer-demo',
  238. area: ['480px', '280px'], //宽高
  239. content: contentdiv
  240. });
  241. }
  242. </script>
  243. {include file="public/footer" /}