123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245 |
- {include file="public/layout" /}
-
- <body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
- <div id="append_parent"></div>
- <div id="ajaxwaitid"></div>
- <div class="page" style="box-shadow:none;">
- <div class="flexigrid">
- <div class="mDiv">
- <div class="ftitle">
- {eq name='$main_lang' value='$admin_lang'}
- {eq name="$Think.const.CONTROLLER_NAME.'@attribute_add'|is_check_access" value="1"}
- <div class="fbutton">
- <a href="javascript:void(0);" data-href="{:url('Product/attribute_add', array('typeid'=>$Request.param.typeid))}" onclick="openFullframe(this, '新增产品参数', '80%', '80%');">
- <div class="add" title="新增参数">
- <span><i class="layui-icon layui-icon-addition"></i>新增参数</span>
- </div>
- </a>
- </div>
- {/eq}
- {/eq}
- </div>
- <form id="searchForm" class="navbar-form form-inline" action="{:url('Product/attribute_index')}" method="get" onsubmit="layer_loading('正在处理');">
- {$searchform.hidden|default=''}
- <div class="sDiv">
- <div class="sDiv2">
- <select name="typeid" class="select" style="margin:0px 5px;">
- {$select_html|default=''}
- </select>
- </div>
- <div class="sDiv2">
- <input type="text" size="30" name="keywords" value="{$Request.param.keywords}" class="qsbox" placeholder="名称搜索...">
- <input type="submit" class="btn" value="搜索">
- <i class="iconfont e-sousuo"></i>
- </div>
- </div>
- </form>
- </div>
- <div class="hDiv">
- <div class="hDivBox">
- <table cellspacing="0" cellpadding="0" style="width: 100%">
- <thead>
- <tr>
- {eq name='$main_lang' value='$admin_lang'}
- <th class="sign w40" axis="col0">
- <div class="tc"><input type="checkbox" autocomplete="off" class="checkAll"></div>
- </th>
- {/eq}
- <th abbr="article_title" axis="col3" class="w40">
- <div class="tc">ID</div>
- </th>
- <th abbr="article_title" axis="col3">
- <div style="padding-left: 10px;" class="tl">参数名称</div>
- </th>
- <th abbr="article_time" axis="col6" class="w120">
- <div class="tc">字段名称</div>
- </th>
- <th abbr="article_time" axis="col6" class="w120">
- <div class="tc">表单类型</div>
- </th>
- <th abbr="article_time" axis="col6" class="w120">
- <div class="tc">所属栏目</div>
- </th>
- <th abbr="article_time" axis="col6" class="w100">
- <div class="tc">更新时间</div>
- </th>
- <th axis="col1" class="w120">
- <div class="tc">操作</div>
- </th>
- <th abbr="article_time" axis="col6" class="w60">
- <div class="tc">排序</div>
- </th>
-
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <div class="bDiv" style="height: auto;">
- <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
- <table style="width: 100%;">
- <tbody>
- {empty name="list"}
- <tr>
- <td class="no-data" align="center" axis="col0" colspan="50">
- <div class="no_row">
- <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
- </div>
- </td>
- </tr>
- {else/}
- {volist name="list" id="vo" key="k"}
- <tr>
- {eq name='$main_lang' value='$admin_lang'}
- <td class="sign">
- <div class="tc w40"><input type="checkbox" autocomplete="off" name="ids[]" value="{$vo.attr_id}"></div>
- </td>
- {/eq}
- <td class="sort">
- <div class="tc w40">
- {eq name='$main_lang' value='$admin_lang'}
- {$vo.attr_id}
- {else /}
- {$main_attribute_list[$vo['attr_id']]['id']|default=$vo['attr_id']}
- {/eq}
- </div>
- </td>
- <td align="left" style="width: 100%">
- <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}>
- {eq name="$Think.const.CONTROLLER_NAME.'@attribute_edit'|is_check_access" value="1"}
- <a href="{:url('Product/attribute_edit',array('id'=>$vo['attr_id']))}">{$vo.attr_name}</a>
- {else /}
- {$vo.attr_name}
- {/eq}
- </div>
- </td>
- <td>
- <div class="w120 tc" style="white-space: nowrap;">{$vo.fieldname|default=''}</div>
- </td>
- <td>
- <div class="w120 tc" style="white-space: nowrap;">
- {$attrInputTypeArr[$vo['attr_input_type']]|default=''}
- </div>
- </td>
- <td>
- <div class="w120 tc" style="white-space: nowrap;">{$vo.typename|default='<i class="red">数据出错!</i>'}</div>
- </td>
- <td>
- <div class="w100 tc">
- {$vo.update_time|date='Y-m-d',###}
- </div>
- </td>
- <td class="operation">
- <div class="w120 tc">
- {eq name="$Think.const.CONTROLLER_NAME.'@attribute_edit'|is_check_access" value="1"}
- <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>
- {/eq}
- {eq name="$Think.const.CONTROLLER_NAME.'@attribute_del'|is_check_access" value="1"}
- {eq name='$main_lang' value='$admin_lang'}
- <i></i>
- <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>
- {/eq}
- {/eq}
- <!-- <a class="btn blue" href="javascript:void(0);" onclick="copyToClipBoard('{$vo.fieldname}', '{$vo.attr_id}', {$vo.attr_input_type|default='0'})">标签调用</a> -->
- </div>
- </td>
- <td class="sort">
- <div class="w60 tc">
- {eq name="$Think.const.CONTROLLER_NAME.'@attribute_edit'|is_check_access" value="1"}
- <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}" />
- {else /}
- {$vo.sort_order}
- {/eq}
- </div>
- </td>
-
- </tr>
- {/volist}
- {/empty}
- </tbody>
- </table>
- </div>
- <div class="iDiv" style="display: none;"></div>
- </div>
- <div class="tDiv">
- <div class="tDiv2">
- {eq name='$main_lang' value='$admin_lang'}
- <div class="fbutton checkboxall">
- <input type="checkbox" autocomplete="off" class="checkAll">
- </div>
- {eq name="$Think.const.CONTROLLER_NAME.'@attribute_del'|is_check_access" value="1"}
- <div class="fbutton">
- <a onclick="batch_del(this, 'ids');" data-url="{:url('Product/attribute_del')}" data-deltype="pseudo">
- <div class="add" title="批量删除">
- <span>批量删除</span>
- </div>
- </a>
- </div>
- {/eq}
- {/eq}
- </div>
- <div style="clear:both"></div>
- </div>
- <!--分页位置-->
- {$page}
- </div>
- </div>
- <script type="text/javascript">
- $(function(){
- $('input[name*=ids]').click(function(){
- if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
- $('.checkAll').prop('checked','checked');
- } else {
- $('.checkAll').prop('checked', false);
- }
- });
- $('input[type=checkbox].checkAll').click(function(){
- $('input[type=checkbox]').prop('checked',this.checked);
- });
- });
-
- $(document).ready(function(){
-
- // 表格行点击选中切换
- $('#flexigrid > table>tbody >tr').click(function(){
- $(this).toggleClass('trSelected');
- });
-
- // 点击刷新数据
- $('.fa-refresh').click(function(){
- location.href = location.href;
- });
-
- $('#searchForm select[name=typeid]').change(function(){
- $('#searchForm').submit();
- });
- });
-
- /**
- * 代码调用js
- * @param id id
- * @param limit 条数
- */
- function copyToClipBoard(fieldname, attr_id, attr_input_type) {
- var contentdiv = '<div class="dialog_content" style="margin: 0px; padding: 0px;"><dl style="padding:10px 30px;line-height:30px;">';
- var liststr = "eyou:attr name='name_"+attr_id+" /";
- contentdiv += '<dd>list标签/arclist标签/内容页:</dd>';
- contentdiv += '<dd><input type="text" style=" width:400px;margin-bottom:10px;" value="{'+liststr+'}"></dd>';
-
- var otherstr = "eyou:attr aid='文档ID' name='name_"+attr_id+" /";
- contentdiv += '<dd>其他调法:</dd>';
- contentdiv += '<dd><input type="text" style=" width:400px;margin-bottom:10px;" value="{'+otherstr+'}"></dd>';
-
- contentdiv += '<dd style="border-top: dotted 1px #E7E7E7; color: #F60;">请将相应标签复制并粘贴到对应模板文件中!</dd></dl></div>'
- layer.open({
- shade: layer_shade,
- title: '标签调用',
- type: 1,
- skin: 'layui-layer-demo',
- area: ['480px', '330px'], //宽高
- content: contentdiv
- });
- }
- </script>
-
- {include file="public/footer" /}
|