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/statistics/non-work.php

99 lines
5.3 KiB

5 years ago
<?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/datepicker/WdatePicker.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(){
$("#search-btn").click(function(){
$('#page').val(0);
var params = $('#searchForm').serialize();
window.location.href = "/statistics/non-work?" + params;
});
//导出
$("#output-btn").click(function(){
$('#page').val(0);
var params = $('#searchForm').serialize();
// window.location.href = "/statistics/work-output?" + params;
});
});
</script>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<form id="searchForm">
<tr>
<td class="td_bg">
提单日期:从<input name="date_begin" type="text" value="<?=$date_begin?>" style="width:100px;" onclick="WdatePicker()"><input name="date_end" type="text" value="<?=$date_end?>" style="width:100px;" onclick="WdatePicker()">截止
正本日期:从<input name="date2_begin" type="text" value="<?=$date2_begin?>" style="width:100px;" onclick="WdatePicker()"><input name="date2_end" type="text" value="<?=$date2_end?>" style="width:100px;" onclick="WdatePicker()">截止
工号:<input name="username" type="text" value="<?=$username?>">
级别:<select name="group_id">
<option value="0">全部</option>
<?php
foreach($group_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $group_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
<select name="company_id">
<option value="0">全部</option>
<?php
foreach($company_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $company_id)
echo ' selected ';
echo '">'.$item->name.'</option>';
}
?>
</select>
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索">
<input type="button" class="act_btn" id="output-btn" name="output-btn" value="导出">
<a href="/statistics/non-work?date_begin=<?=date('Y-m-d')?>&date_end=<?=date('Y-m-d')?>">当天</a>&nbsp;&nbsp;
<a href="/statistics/non-work?date_begin=<?=date('Y-m-d',strtotime("-7 day"))?>&date_end=<?=date('Y-m-d')?>">7天</a>&nbsp;&nbsp;
<a href="/statistics/non-work?date_begin=<?=date('Y-m-d',strtotime("-1 month"))?>&date_end=<?=date('Y-m-d')?>">1个月</a>&nbsp;&nbsp;
<a href="/statistics/non-work?date_begin=<?=date('Y-m-d',strtotime("-3 month"))?>&date_end=<?=date('Y-m-d')?>">3个月</a>&nbsp;&nbsp;
</td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="50" align="center" class="bg_tr" nowrap>工号</td>
<td width="60" align="center" class="bg_tr" nowrap>真实姓名</td>
<td align="center" class="bg_tr" nowrap>提单总数</td>
<td align="center" class="bg_tr" nowrap>保险费用</td>
<td align="center" class="bg_tr" nowrap>投保份数</td>
<td align="center" class="bg_tr" nowrap>详情</td>
</tr>
<?php
foreach($user_rows as $row) {
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" class="td_bg" nowrap><?=$row['username']?></td>
<td align="center" class="td_bg" nowrap><?=$row['truename']?></td>
<td align="center" class="td_bg" nowrap><?=$row['total'][1]>0?$row['total'][1]:''?></td>
<td align="center" class="td_bg" nowrap><?=$row['total'][2]>0?'¥'.number_format($row['total'][2],2):''?></td>
<td align="center" class="td_bg" nowrap><?=$row['total'][3]>0?$row['total'][3]:''?></td>
<td align="center" class="td_bg" nowrap>[<a href="/statistics/non-work-info?user_id=<?=$row['id']?>&date_begin=<?=$date_begin?>&date_end=<?=$date_end?>&date2_begin=<?=$date2_begin?>&date2_end=<?=$date2_end?>&username=<?=$username?>">详情</a>]</td>
</tr>
<?php
}
?>
<tr>
<td width="50" align="center" class="bg_tr" nowrap>汇总</td>
<td width="60" align="center" class="bg_tr" nowrap></td>
<td align="center" class="bg_tr" nowrap><?=$sum_total[1]?$sum_total[1]:''?></td>
<td align="center" class="bg_tr" nowrap><?=$sum_total[2]?'¥'.number_format($sum_total[2],2):''?></td>
<td align="center" class="bg_tr" nowrap><?=$sum_total[3]?$sum_total[3]:''?></td>
<td align="center" class="bg_tr" nowrap></td>
</tr>
</table>