<form method="post">功能无效求高手帮忙
代码语言:javascript复制{layout name="layout"/}
<div class="tpl-content-wrapper">
<div class="tpl-portlet-components">
<div class="portlet-title">
<div class="caption font-green bold">
<span class="am-icon-code"></span> 分类管理
</div>
<form method="post">
<div class="tpl-portlet-input tpl-fz-ml">
<div class="portlet-input input-small input-inline">
<div class="input-icon right">
<input type="text" class="form-control form-control-solid" placeholder="分类名称" name="nt"></div>
</div>
<button class="am-btn am-btn-primary am-btn-xs am-radius">添加分类</button>
</div>
</form>
</div>
<div class="tpl-block">
<div class="am-g">
<div class="am-u-sm-12">
<table class="am-table am-table-striped am-table-hover table-main">
<thead>
<tr>
<th class="table-title">排序</th>
<th class="table-title">分类标题</th>
<th class="table-set">状态(点击修改)</th>
<th class="table-set">操作</th>
</tr>
</thead>
<tbody>
{foreach $types as $v}
<tr>
<td>{$v['or']}</td>
<td>{$v['name']}</td>
<td><span onclick="sx(this,{$v['id']})" class="am-badge am-badge-{$v['s']==1 ? 'danger' : 'secondary'}">{$v['s']==1 ? '上架' : '下架'}</span></td>
<td>
<div class="am-btn-toolbar">
<div class="am-btn-group am-btn-group-xs">
<button onclick="tedit('{$v['id']}','{$v['or']}','{$v['name']}')" class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
<a type="button" class="am-btn am-btn-success" href="sp?tid={$v['id']}">查看商品</a>
<a href="?dt={$v['id']}" class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</a>
</div>
</div>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
<div class="am-cf">
<div class="am-fr">
{$types->render()}
</div>
</div>
</div>
<div class="tpl-alert"></div>
</div>
</div>
<!--预设-->
<div class="am-modal am-modal-alert" tabindex="-1" id="tip">
<div class="am-modal-dialog">
<div class="am-modal-hd">分类编辑</div>
<div id="tips" class="am-modal-bd">
<form class="am-form tpl-form-line-form" method="post">
<input type="hidden" id="eid" name="eid">
<div class="am-form-group">
<label for="user-name" class="am-u-sm-3 am-form-label">分类排序(越大越前可相同)</label>
<div class="am-u-sm-9">
<input type="text" class="tpl-form-input" id="id" name="id">
</div>
</div>
<div class="am-form-group">
<label for="user-name" class="am-u-sm-3 am-form-label">分类标题</label>
<div class="am-u-sm-9">
<input type="text" class="tpl-form-input" id="name" name="name">
</div>
</div>
<div class="am-form-group">
<div class="am-u-sm-9 am-u-sm-push-3">
<input type="submit" value="修改" name="edit" class="am-btn am-btn-warning am-btn-block">
</div>
</div>
</form>
</div>
</div>
</div>