You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
simple-yewu/frontend/views/gift/gift3-list.php

78 lines
3.6 KiB

<?php
use \common\libs\MyLib;
?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script>
<script type="text/javascript" language="javascript" src="/js/func.js"></script>
<script type="text/javascript" language="javascript">
//详情
function edit(id) {
window.location.href = '/gift/gift3-edit?id=' + id;
}
$(function(){
$("#search-btn").click(function(){
$('#page').val(0);
var params = $('#searchForm').serialize();
window.location.href = "/gift/gift3-list?" + params;
});
$('#add-btn').click(function(){
edit(0);
});
});
</script>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<form id="searchForm">
<input type="hidden" id="page" name="page" value="<?=$page?>">
<tr>
<td class="td_bg">
礼券编号:<input name="code" type="text" value="<?=$code?>">
名称:<input name="name" type="text" value="<?=$name?>">
电话:<input name="phone" type="text" value="<?=$phone?>">
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索">
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加">
</td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="30" align="center" class="bg_tr" nowrap>序号</td>
<td width="50" align="center" class="bg_tr" nowrap>礼券编号</td>
<td width="60" align="center" class="bg_tr" nowrap>名称</td>
<td width="60" align="center" class="bg_tr" nowrap>车牌号</td>
<td width="60" align="center" class="bg_tr" nowrap>入库时间</td>
<td width="60" align="center" class="bg_tr" nowrap>出库时间</td>
<td width="60" align="center" class="bg_tr" nowrap>回收时间</td>
<td width="60" align="center" class="bg_tr" nowrap>状态</td>
<td width="60" align="center" class="bg_tr" nowrap>操作员</td>
<td width="60" align="center" class="bg_tr" nowrap>操作时间</td>
<td width="30" align="center" class="bg_tr" nowrap>操作</td>
</tr>
<?php
foreach($items as $index => $item) {
$start_index = ($page - 1) * 20 + $index;
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" class="td_bg"n owrap ><?=$start_index + 1?></td>
<td class="td_bg" nowrap><?=$item->code?></td>
<td class="td_bg" nowrap><?=$item->name?></td>
<td class="td_bg" nowrap><?=$item->car_no?></td>
<td class="td_bg" nowrap><?=$item->input_time?></td>
<td class="td_bg" nowrap><?=$item->output_time?></td>
<td class="td_bg" nowrap><?=$item->return_time?></td>
<td class="td_bg" ><?=$item->getStatus()?>&nbsp;</td>
<td class="td_bg" ><?=$item->user?$item->user->getShowName():''?></td>
<td class="td_bg" ><?=$item->updated_at?></td>
<td align="center" class="td_bg" nowrap>
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">详情</a>]
</td>
</tr>
<?php
}
?>
<tr >
<td height="25" colspan="14" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>