<div class="breadcrumbs" id="breadcrumbs">
	<ul class="breadcrumb">
		<li>
			<i class="home-icon fa fa-home"></i>
			<a href="#">会员</a>
		</li>
		<li>
			<a href="#">商户管理</a>
		</li>
		<li class="active">商户消息</li>
	</ul>
</div>
<form action="{url:/comment/seller_message_del}" method="post" name="seller_message_list" onsubmit="return checkboxCheck('check[]','尚未选中任何记录！')">
<div class="content">
	<table class="table list-table">
		<colgroup>
			<col width="35px" />
			<col  />
			<col width="170px" />
			<col width="300px" />
			<col width="100px" />
		</colgroup>
		<caption>
            <a class="btn btn-default" onclick="sendMessage()">
                <i class="fa fa-send"></i>发送
            </a>
            <a class="btn btn-default" onclick="selectAll('check[]')">
                <i class="fa fa-check"></i>全选
            </a>
            <a class="btn btn-default" onclick="delModel({'form':'seller_message_list',msg:'确定要删除选中的记录吗？'})">
                <i class="fa fa-close"></i>批量删除
            </a>
		</caption>
		<thead>
			<tr>
				<th></th>
				<th>标题</th>
				<th>时间</th>
				<th>接收条件</th>
				<th>操作</th>
			</tr>
		</thead>

		<tbody>
			{set:$queryObj=Api::run('getListBySellerMessage');$resultData=$queryObj->find()}
            {foreach:items=$resultData}
			<tr>
				<td><input name="check[]" type="checkbox" value="{$item['id']}" /></td>
				<td>{$item['title']}</td>
				<td>{$item['time']}</td>
				<td>{$item['rev_info']}</td>
				<td>
					<a href="{url:/comment/seller_message_show/id/$item['id']}"><i class='operator fa fa-eye'></i></a>
					<a onclick="delModel({link:'{url:/comment/seller_message_del/check/$item['id']}'})"><i class='operator fa fa-close'></i></a>
				</td>
			</tr>
			{/foreach}
		</tbody>
	</table>
</div>
{$queryObj->getPageBar()}
</form>

<script language="javascript">
//发送短消息
function sendMessage()
{
	art.dialog.open('{url:/comment/seller_message_send}',{
		'id':'sendWindow',
		'title':'商户消息',
		'width':'790px',
		'ok':function(iframeWin, topWin)
		{
			var iframeObj = $(iframeWin.document);
			iframeWin.kindEditorObj.sync();
			iframeObj.find('form').submit();
			return false;
		}
	});
}

//发送短消息后回调
function startMessageCallback(msg)
{
	if(msg == 'success')
	{
		tips('发送消息成功');
		setTimeout(function(){
			window.location.reload();
		},1200);
	}
	else
	{
		alert(msg);
	}
	art.dialog({'id':'sendWindow'}).close();
}
</script>