Commit a8df5e03 authored by wangjiangze's avatar wangjiangze

酒店片库功能更新

parent 6a098c7b
......@@ -32,7 +32,7 @@ class HotelMediaMapModel extends RelationModel{
//返回列表(limit分页)
if($queryType=="list"){
$where .= $sort." ".$limit;
$fields = " *,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>删除</font>' end as `status` ";
$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>删除</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;
......
......@@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>酒店管理</title>
<title>酒店片库</title>
<link href="__PUBLIC__/css/style_frame.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/js/jquery-easyui-1.3.4/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/js/jquery-easyui-1.3.4/themes/icon.css">
......@@ -27,7 +27,7 @@
<select class="select" name="searchSp">
<option value="0">请选择合作方</option>
<volist name="sp_lists" id="item">
<option value="{$item.id}">{$item.name}</option>
<option value="{$item.id}" <if condition="$key eq 0">selected="selected"</if> >{$item.name}</option>
</volist>
</select>
<select class="select" name="searchHotel">
......@@ -75,7 +75,8 @@ onRowContextMenu : onRowContextMenu
<th data-options="field:'media_name',width:20" sortable="true">媒资名称</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>
<th data-options="field:'status'" sortable="true" align="center">播控状态</th>
<th data-options="field:'status_inject'" sortable="true" align="center" formatter="StatusInjectAction">注入状态</th>
<th field="action" align="center" formatter="InputAction">操作</th>
</tr>
</thead>
......@@ -128,7 +129,15 @@ function onRowContextMenu(e, rowIndex, rowData){
function InputAction(value, row, index) {
return'<a href="javascript:void(0)" id="mb' + index + '" class="easyui-menubutton" menu="#mm1" iconCls="icon-list" onmouseover="setSelectRow(' + index + ')">'+this.title+'</a>';
}
function StatusInjectAction(value, row, index){
if(value==0){
return "未注入";
}else if(value==1){
return "<font color=green>已注入</font>";
}else if(value==2){
return "<font color=red>注入失败</font>";
}
}
function setSelectRow(index) {
$('#dg').datagrid('unselectAll');
$('#dg').datagrid('selectRow', index);
......
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