Commit 7c34758d authored by 吴贤德's avatar 吴贤德

酒店片库页面简单美化

parent 2e545bd2
......@@ -35,7 +35,7 @@ class HotelMediaMapModel extends RelationModel{
//返回列表(limit分页)
if($queryType=="list"){
$where .= $sort." ".$limit;
$fields = " A.*,B.title media_name,C.`name` hotel_name,case A.`status` when 1 then '<font color=green>上线</font>' when 2 then '<font color=red>下线</font>' when 0 then '<font color=red>删除</font>' end as `status` ";
$fields = " A.*,B.url_pic,B.title,C.`name` hotel_name,case A.`status` when 1 then '<font color=green>上线</font>' when 2 then '<font color=red>下线</font>' when 0 then '<font color=red>删除</font>' end as `status` ";
}
$sql = "select ".$fields." from ".$this->tableName." A join sh_media_wasu B on A.media_id = B.id join sh_hotel C on A.hotel_id = C.id and C.sp_id = $searchSp where 1=1 ".$where.";";
// echo $sql;
......
......@@ -71,8 +71,10 @@ onRowContextMenu : onRowContextMenu
">
<thead>
<tr>
<th data-options="field:'hotel_name',width:30">酒店名称</th>
<th data-options="field:'media_name',width:20" sortable="true">媒资名称</th>
<th field="url_pic" align="center" formatter="imageFormat">媒资海报</th>
<th data-options="field:'title',width:60" sortable="true">媒资标题</th>
<th data-options="field:'hotel_name',width:30">酒店名称</th>
<th data-options="field:'addtime',width:30" sortable="true">创建时间</th>
<th data-options="field:'updatetime',width:30" sortable="true">更新时间</th>
<th data-options="field:'status'" sortable="true" align="center">播控状态</th>
......@@ -97,7 +99,12 @@ onRowContextMenu : onRowContextMenu
<div iconCls="icon-stop" id="menuStart" onclick="enable(2)" {:buttonAuth('Media','Hotel','updateStatusAjaxHandle')}>下线</div>
</div>
<script>
$().ready(function(){
function imageFormat(value, row, index) {
return "<a target='_blank' href='"+row.url_pic+"' title='点击查看'> <image src="+row.url_pic+" height='70px' width='100px'/></a>";
}
$().ready(function(){
$("select[name='searchSp']").bind("change",function(){
var sp_id = $(this).val();
if(sp_id){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment