| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <include file="public@header"/>
- </head>
- <body>
- <div class="wrap js-check-wrap">
- <ul class="nav nav-tabs">
- <li class="active"><a>设备列表</a></li>
- <li><a href="{:url('/shop/devices/add')}">添加设备</a></li>
- </ul>
- <form class="well form-inline margin-top-20" method="post" action="{:url('/shop/devices/index')}">
- 关键字:
- <input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"
- placeholder="设备名称/设备编号">
- <input type="submit" class="btn btn-primary" value="搜索"/>
- <a class="btn btn-default" href="{:url('/shop/devices/index')}">清空</a>
- <a class="btn btn-danger" onclick="doDelete()">批量删除</a>
- </form>
- <form method="post" class="js-ajax-form">
- <table class="table table-hover table-bordered">
- <thead>
- <tr>
- <th width="60"><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">全选</th>
- <th>设备名称</th>
- <!--<th>推广人</th>-->
- <th>序列号</th>
- <th>编号</th>
- <th>设备类型</th>
- <th>定位</th>
- <th>设备数量</th>
- <th>打印纸张数</th>
- <th>二维码</th>
- <th>{:lang('ACTIONS')}</th>
- </tr>
- </thead>
- <tbody>
- <php>
- $user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));
- </php>
- <foreach name="list" item="vo">
- <tr>
- <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}" title="ID:{$vo.id}"></td>
- <td>{$vo['name']?$vo['name']:lang('NOT_FILLED')}</td>
- <!--<td>{$vo.real_name|default=''}</td>-->
- <td>{$vo.device_code|default=''}</td>
- <td>{$vo.number|default=''}</td>
- <td><if condition="$vo.color_type == 1">黑白<elseif condition="$vo.color_type == 2"/>彩印<else/>全部</if></td>
- <td>{$vo.address|default=''}</td>
- <td>{$vo.device_num|default='0'}</td>
- <td>{$vo.pages|default='0'}</td>
- <td>
- <a title="点击放大" href="javascript:imagePreviewDialog('{:cmf_get_image_preview_url($vo.qrcode)}');">
- <img src="{:cmf_get_image_preview_url($vo.qrcode)}" alt="" width="48" height="48">
- </a>
- </td>
- <td>
- <a class="btn btn-xs btn-primary" href="{:url('/shop/devices/edit',['id'=> $vo.id])}">修改</a>
- <a class="btn btn-xs btn-warning js-ajax-dialog-btn" href="{:url('/shop/devices/del',array('id'=>$vo['id']))}" data-msg="确认删除?">删除</a>
- </td>
- </tr>
- </foreach>
- </tbody>
- </table>
- <div class="pagination">{$page}</div>
- </form>
- </div>
- <script src="__STATIC__/js/admin.js"></script>
- <script>
- function doDelete() {
- var ids = [];
- $(".js-check:checked").each(function () {
- var id = $(this).val();
- if (id > 0) {
- ids.push(id);
- }
- });
- if (ids.length <= 0) {
- showMsg('请先选择操作项');
- return false;
- }
- if(confirm('确定批量删除选择项?不可恢复')){
- $.post('/shop/devices/del',{id:ids},function(res){
- if(res.code == 1){
- showMsg(res.msg);
- setTimeout(function () {
- location.reload();
- }, 800)
- }else{
- showMsg(res.msg);
- }
- },"json")
- }
- }
- </script>
- </body>
- </html>
|