|
@@ -33,6 +33,7 @@
|
|
|
<th>底价</th>
|
|
|
<th>预充</th>
|
|
|
<th>预占</th>
|
|
|
+ <th>更新时间</th>
|
|
|
<th>操作</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
@@ -52,8 +53,12 @@
|
|
|
<input type="checkbox" value="{$a.id}" name="is_hold" class="hold-change" lay-filter="holdChange" lay-skin="switch" lay-text="开启|关闭" {$a.is_hold?'checked':''}>
|
|
|
</td>
|
|
|
<td>
|
|
|
+ {:date('Y-m-d H:i:s',$a.update_time)}
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
<a class="layui-btn layui-btn-mini news_edit" data-id="{$a.id}"><i class="iconfont icon-edit"></i> 编辑</a>
|
|
|
- <a class="layui-btn layui-btn-danger layui-btn-mini news_del"><i class="layui-icon"></i> 删除</a>
|
|
|
+ <a class="layui-btn layui-btn-mini hold_log" data-id="{$a.id}"><i class="iconfont icon-weather"></i> 预占记录</a>
|
|
|
+ <a class="layui-btn layui-btn-danger layui-btn-mini news_del" data-id="{$a.id}"><i class="layui-icon"></i> 删除</a>
|
|
|
</td>
|
|
|
</tr>
|
|
|
{/foreach}
|
|
@@ -164,6 +169,7 @@
|
|
|
}else{
|
|
|
layer.close(index)
|
|
|
layer.msg('修改成功')
|
|
|
+ location.reload()
|
|
|
}
|
|
|
})
|
|
|
})
|
|
@@ -181,18 +187,30 @@
|
|
|
})
|
|
|
})
|
|
|
|
|
|
+ $('.hold_log').click(function () {
|
|
|
+ let id=$(this).data('id')
|
|
|
+ let index = layui.layer.open({
|
|
|
+ title : "预占记录",
|
|
|
+ type : 2,
|
|
|
+ area:['1000px','100%'],
|
|
|
+ content : '{:url("mobile/hold_log")}?id='+id,
|
|
|
+ success : function(layero, index){
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
|
|
|
$("body").on("click",".news_del",function(){ //删除
|
|
|
var _this = $(this);
|
|
|
layer.confirm('确定删除此信息?',{icon:3, title:'提示信息'},function(index){
|
|
|
- //_this.parents("tr").remove();
|
|
|
- for(var i=0;i<newsData.length;i++){
|
|
|
- if(newsData[i].newsId == _this.attr("data-id")){
|
|
|
- newsData.splice(i,1);
|
|
|
- newsList(newsData);
|
|
|
+ $.post("{:url('mobile/delete')}",{id:[_this.data('id')]},function (res){
|
|
|
+ if(res.code===1){
|
|
|
+ layer.msg('删除成功')
|
|
|
+ }else{
|
|
|
+ layer.msg(res.msg)
|
|
|
}
|
|
|
- }
|
|
|
- layer.close(index);
|
|
|
+ layer.close(index);
|
|
|
+ })
|
|
|
});
|
|
|
})
|
|
|
})
|