説明なし
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

attribute_index.htm 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. {include file="public/layout" /}
  2. <body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page" style="box-shadow:none;">
  6. <div class="flexigrid">
  7. <div class="mDiv">
  8. <div class="ftitle">
  9. {eq name='$main_lang' value='$admin_lang'}
  10. {eq name="$Think.const.CONTROLLER_NAME.'@attribute_add'|is_check_access" value="1"}
  11. <div class="fbutton">
  12. <a href="javascript:void(0);" data-href="{:url('Product/attribute_add', array('typeid'=>$Request.param.typeid))}" onclick="openFullframe(this, '新增产品参数', '80%', '80%');">
  13. <div class="add" title="新增参数">
  14. <span><i class="layui-icon layui-icon-addition"></i>新增参数</span>
  15. </div>
  16. </a>
  17. </div>
  18. {/eq}
  19. {/eq}
  20. </div>
  21. <form id="searchForm" class="navbar-form form-inline" action="{:url('Product/attribute_index')}" method="get" onsubmit="layer_loading('正在处理');">
  22. {$searchform.hidden|default=''}
  23. <div class="sDiv">
  24. <div class="sDiv2">
  25. <select name="typeid" class="select" style="margin:0px 5px;">
  26. {$select_html|default=''}
  27. </select>
  28. </div>
  29. <div class="sDiv2">
  30. <input type="text" size="30" name="keywords" value="{$Request.param.keywords}" class="qsbox" placeholder="名称搜索...">
  31. <input type="submit" class="btn" value="搜索">
  32. <i class="iconfont e-sousuo"></i>
  33. </div>
  34. </div>
  35. </form>
  36. </div>
  37. <div class="hDiv">
  38. <div class="hDivBox">
  39. <table cellspacing="0" cellpadding="0" style="width: 100%">
  40. <thead>
  41. <tr>
  42. {eq name='$main_lang' value='$admin_lang'}
  43. <th class="sign w40" axis="col0">
  44. <div class="tc"><input type="checkbox" autocomplete="off" class="checkAll"></div>
  45. </th>
  46. {/eq}
  47. <th abbr="article_title" axis="col3" class="w40">
  48. <div class="tc">ID</div>
  49. </th>
  50. <th abbr="article_title" axis="col3">
  51. <div style="padding-left: 10px;" class="tl">参数名称</div>
  52. </th>
  53. <th abbr="article_time" axis="col6" class="w120">
  54. <div class="tc">字段名称</div>
  55. </th>
  56. <th abbr="article_time" axis="col6" class="w120">
  57. <div class="tc">表单类型</div>
  58. </th>
  59. <th abbr="article_time" axis="col6" class="w120">
  60. <div class="tc">所属栏目</div>
  61. </th>
  62. <th abbr="article_time" axis="col6" class="w100">
  63. <div class="tc">更新时间</div>
  64. </th>
  65. <th axis="col1" class="w120">
  66. <div class="tc">操作</div>
  67. </th>
  68. <th abbr="article_time" axis="col6" class="w60">
  69. <div class="tc">排序</div>
  70. </th>
  71. </tr>
  72. </thead>
  73. </table>
  74. </div>
  75. </div>
  76. <div class="bDiv" style="height: auto;">
  77. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  78. <table style="width: 100%;">
  79. <tbody>
  80. {empty name="list"}
  81. <tr>
  82. <td class="no-data" align="center" axis="col0" colspan="50">
  83. <div class="no_row">
  84. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  85. </div>
  86. </td>
  87. </tr>
  88. {else/}
  89. {volist name="list" id="vo" key="k"}
  90. <tr>
  91. {eq name='$main_lang' value='$admin_lang'}
  92. <td class="sign">
  93. <div class="tc w40"><input type="checkbox" autocomplete="off" name="ids[]" value="{$vo.attr_id}"></div>
  94. </td>
  95. {/eq}
  96. <td class="sort">
  97. <div class="tc w40">
  98. {eq name='$main_lang' value='$admin_lang'}
  99. {$vo.attr_id}
  100. {else /}
  101. {$main_attribute_list[$vo['attr_id']]['id']|default=$vo['attr_id']}
  102. {/eq}
  103. </div>
  104. </td>
  105. <td align="left" style="width: 100%">
  106. <div class="tl" style="padding-left: 10px;" {neq name='$main_lang' value='$admin_lang'}title="{$main_attribute_list[$vo['attr_id']]['attr_name']|default=$vo['attr_name']}"{/neq}>
  107. {eq name="$Think.const.CONTROLLER_NAME.'@attribute_edit'|is_check_access" value="1"}
  108. <a href="{:url('Product/attribute_edit',array('id'=>$vo['attr_id']))}">{$vo.attr_name}</a>
  109. {else /}
  110. {$vo.attr_name}
  111. {/eq}
  112. </div>
  113. </td>
  114. <td>
  115. <div class="w120 tc" style="white-space: nowrap;">{$vo.fieldname|default=''}</div>
  116. </td>
  117. <td>
  118. <div class="w120 tc" style="white-space: nowrap;">
  119. {$attrInputTypeArr[$vo['attr_input_type']]|default=''}
  120. </div>
  121. </td>
  122. <td>
  123. <div class="w120 tc" style="white-space: nowrap;">{$vo.typename|default='<i class="red">数据出错!</i>'}</div>
  124. </td>
  125. <td>
  126. <div class="w100 tc">
  127. {$vo.update_time|date='Y-m-d',###}
  128. </div>
  129. </td>
  130. <td class="operation">
  131. <div class="w120 tc">
  132. {eq name="$Think.const.CONTROLLER_NAME.'@attribute_edit'|is_check_access" value="1"}
  133. <a href="javascript:void(0);" data-href="{:url('Product/attribute_edit',array('id'=>$vo['attr_id']))}" class="btn blue" onclick="openFullframe(this, '编辑产品参数 ', '80%', '80%');">编辑</a>
  134. {/eq}
  135. {eq name="$Think.const.CONTROLLER_NAME.'@attribute_del'|is_check_access" value="1"}
  136. {eq name='$main_lang' value='$admin_lang'}
  137. <i></i>
  138. <a class="btn red" href="javascript:void(0);" data-url="{:url('Product/attribute_del')}" data-id="{$vo.attr_id}" {eq name="$global['web_recycle_switch']" value='1'} data-deltype="del" {else /} data-deltype="pseudo" {/eq} onClick="delfun(this);">删除</a>
  139. {/eq}
  140. {/eq}
  141. <!-- <a class="btn blue" href="javascript:void(0);" onclick="copyToClipBoard('{$vo.fieldname}', '{$vo.attr_id}', {$vo.attr_input_type|default='0'})">标签调用</a> -->
  142. </div>
  143. </td>
  144. <td class="sort">
  145. <div class="w60 tc">
  146. {eq name="$Think.const.CONTROLLER_NAME.'@attribute_edit'|is_check_access" value="1"}
  147. <input style="text-align: left;" type="text" onchange="changeTableVal('product_attribute','attr_id','{$vo.attr_id}','sort_order',this);" size="4" value="{$vo.sort_order}" />
  148. {else /}
  149. {$vo.sort_order}
  150. {/eq}
  151. </div>
  152. </td>
  153. </tr>
  154. {/volist}
  155. {/empty}
  156. </tbody>
  157. </table>
  158. </div>
  159. <div class="iDiv" style="display: none;"></div>
  160. </div>
  161. <div class="tDiv">
  162. <div class="tDiv2">
  163. {eq name='$main_lang' value='$admin_lang'}
  164. <div class="fbutton checkboxall">
  165. <input type="checkbox" autocomplete="off" class="checkAll">
  166. </div>
  167. {eq name="$Think.const.CONTROLLER_NAME.'@attribute_del'|is_check_access" value="1"}
  168. <div class="fbutton">
  169. <a onclick="batch_del(this, 'ids');" data-url="{:url('Product/attribute_del')}" data-deltype="pseudo">
  170. <div class="add" title="批量删除">
  171. <span>批量删除</span>
  172. </div>
  173. </a>
  174. </div>
  175. {/eq}
  176. {/eq}
  177. </div>
  178. <div style="clear:both"></div>
  179. </div>
  180. <!--分页位置-->
  181. {$page}
  182. </div>
  183. </div>
  184. <script type="text/javascript">
  185. $(function(){
  186. $('input[name*=ids]').click(function(){
  187. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  188. $('.checkAll').prop('checked','checked');
  189. } else {
  190. $('.checkAll').prop('checked', false);
  191. }
  192. });
  193. $('input[type=checkbox].checkAll').click(function(){
  194. $('input[type=checkbox]').prop('checked',this.checked);
  195. });
  196. });
  197. $(document).ready(function(){
  198. // 表格行点击选中切换
  199. $('#flexigrid > table>tbody >tr').click(function(){
  200. $(this).toggleClass('trSelected');
  201. });
  202. // 点击刷新数据
  203. $('.fa-refresh').click(function(){
  204. location.href = location.href;
  205. });
  206. $('#searchForm select[name=typeid]').change(function(){
  207. $('#searchForm').submit();
  208. });
  209. });
  210. /**
  211. * 代码调用js
  212. * @param id id
  213. * @param limit 条数
  214. */
  215. function copyToClipBoard(fieldname, attr_id, attr_input_type) {
  216. var contentdiv = '<div class="dialog_content" style="margin: 0px; padding: 0px;"><dl style="padding:10px 30px;line-height:30px;">';
  217. var liststr = "eyou:attr name='name_"+attr_id+" /";
  218. contentdiv += '<dd>list标签/arclist标签/内容页:</dd>';
  219. contentdiv += '<dd><input type="text" style=" width:400px;margin-bottom:10px;" value="{'+liststr+'}"></dd>';
  220. var otherstr = "eyou:attr aid='文档ID' name='name_"+attr_id+" /";
  221. contentdiv += '<dd>其他调法:</dd>';
  222. contentdiv += '<dd><input type="text" style=" width:400px;margin-bottom:10px;" value="{'+otherstr+'}"></dd>';
  223. contentdiv += '<dd style="border-top: dotted 1px #E7E7E7; color: #F60;">请将相应标签复制并粘贴到对应模板文件中!</dd></dl></div>'
  224. layer.open({
  225. shade: layer_shade,
  226. title: '标签调用',
  227. type: 1,
  228. skin: 'layui-layer-demo',
  229. area: ['480px', '330px'], //宽高
  230. content: contentdiv
  231. });
  232. }
  233. </script>
  234. {include file="public/footer" /}