|
|
|
<?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>
|
|
|
|
<link rel="stylesheet" href="../Myfile/css/font.css?v=20190611">
|
|
|
|
<link rel="stylesheet" href="../Myfile/css/xadmin.css?v=20190605">
|
|
|
|
<link rel="stylesheet" href="../Myfile/css/theme274.min.css?v=20190605">
|
|
|
|
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
|
|
|
|
<script src="../Myfile/lib/layui/layui.js?v=20190611" charset="utf-8"></script>
|
|
|
|
<script type="text/javascript" src="../Myfile/js/xadmin.js?v=20190612"></script>
|
|
|
|
<script type="text/javascript" language="javascript" src="/js/ajax.js?v=2019"></script><script type="text/javascript" language="javascript" src="/js/func.js"></script>
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
//编辑
|
|
|
|
function edit(id) {
|
|
|
|
var params = $('#searchForm').serialize();
|
|
|
|
window.location.href = '/personnel/pay-info?id=' + id + '&pay_date=<?=$pay_date?>' + '&back_params=' + encodeURIComponent(params);
|
|
|
|
}
|
|
|
|
|
|
|
|
$(function(){
|
|
|
|
$("#search-btn").click(function(){
|
|
|
|
$('#page').val(0);
|
|
|
|
var params = $('#searchForm').serialize();
|
|
|
|
window.location.href = "/personnel/pay-list?" + params;
|
|
|
|
});
|
|
|
|
$("#searchForm").submit(function(){
|
|
|
|
$("#search-btn").click();
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
<!--<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">-->
|
|
|
|
<!-- <form id="theFrm">-->
|
|
|
|
<!-- <tr>-->
|
|
|
|
<!-- <td align="center" width="100" height="25" class="bg_tr">日期</td>-->
|
|
|
|
<!-- <td class="td_bg">-->
|
|
|
|
<!-- <input type="text" name="time" onclick="WdatePicker({dateFmt:'yyyy-MM'})" />-->
|
|
|
|
<!-- </td>-->
|
|
|
|
<!-- <td height="25" class="td_bg">-->
|
|
|
|
<!-- <input type="text" name="urlfile" id="urlfile" style="width: 300px;">-->
|
|
|
|
<!-- <input id="fileupload" type="file" name="file">-->
|
|
|
|
<!-- </td>-->
|
|
|
|
<!-- </tr>-->
|
|
|
|
<!-- <tr>-->
|
|
|
|
<!-- <td height="22" colspan="3" align="center" class="td_bg">-->
|
|
|
|
<!-- <input id="submit-btn" type=button class="ACT_btn" name=Submit1 value=" 提交 "/>-->
|
|
|
|
<!-- -->
|
|
|
|
<!-- <input type="button" class="ACT_btn" name="Submit3" value=" 刷新 " onclick="window.location.reload();">-->
|
|
|
|
<!-- </td>-->
|
|
|
|
<!-- </tr>-->
|
|
|
|
<!-- </form>-->
|
|
|
|
<!--</table>-->
|
|
|
|
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
|
|
|
|
<form id="searchForm">
|
|
|
|
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
|
|
|
<tr>
|
|
|
|
<td class="td_bg">
|
|
|
|
工号:<input name="username" type="text" value="<?=$username?>">
|
|
|
|
真实姓名:<input name="name" type="text" value="<?=$name?>">
|
|
|
|
工资月份:<input name="pay_date" id="pay_date" class="Wdate" type="text" value="<?=$pay_date?>" onClick="WdatePicker({dateFmt:'yyyy-MM'})">
|
|
|
|
是否离职:<select name="is_leave">
|
|
|
|
<option value="">全部</option>
|
|
|
|
<option value="1" <?= $is_leave == '1' ? 'selected' : ''?>>是</option>
|
|
|
|
<option value="0" <?= $is_leave == '0' ? 'selected' : ''?>>否</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>
|
|
|
|
分组:<select name="group_id">
|
|
|
|
<option value="0">全部</option>
|
|
|
|
<?php
|
|
|
|
foreach($group_items as $group) {
|
|
|
|
echo '<option value="'.$group->id.'"';
|
|
|
|
if($group->id == $group_id)
|
|
|
|
echo ' selected ';
|
|
|
|
echo '>'.$group->name.'</option>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
状态:<select name="status_id">
|
|
|
|
<option value="0">全部</option>
|
|
|
|
<option value="1" <?=$status_id == 1?'selected':''?>>人事✔</option>
|
|
|
|
<option value="2" <?=$status_id == 2?'selected':''?>>出纳✔</option>
|
|
|
|
<option value="3" <?=$status_id == 3?'selected':''?>>人事✔,出纳✔</option>
|
|
|
|
<option value="4" <?=$status_id == 4?'selected':''?>>财务✔</option>
|
|
|
|
<option value="5" <?=$status_id == 5?'selected':''?>>老板✔</option>
|
|
|
|
<option value="6" <?=$status_id == 6?'selected':''?>>已发放</option>
|
|
|
|
<option value="7" <?=$status_id == 7?'selected':''?>>退回</option>
|
|
|
|
|
|
|
|
</select>
|
|
|
|
<input type="submit" class="act_btn" id="search-btn" name="search-btn" value="搜索">
|
|
|
|
退回数量:<span style="color: red"><?=$return_count?></span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</form>
|
|
|
|
</table>
|
|
|
|
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
|
|
|
|
<tr>
|
|
|
|
<td width="100" align="center" align="center" class="bg_tr">工号</td>
|
|
|
|
<td align="center" class="bg_tr">真实姓名</td>
|
|
|
|
<td width="100" align="center" class="bg_tr">工资月份</td>
|
|
|
|
<td align="center" class="bg_tr">所属岗位</td>
|
|
|
|
<!-- <td width="60" align="center" class="bg_tr">角色</td>-->
|
|
|
|
<!-- <td align="left" class="bg_tr">提成公式</td>-->
|
|
|
|
<td width="60" align="center" class="bg_tr">工资</td>
|
|
|
|
<td width="60" align="center" class="bg_tr">是否离职</td>
|
|
|
|
<td width="60" align="center" class="bg_tr">状态</td>
|
|
|
|
<td width="30" align="center" class="bg_tr">操作</td>
|
|
|
|
</tr>
|
|
|
|
<form id="delFrm">
|
|
|
|
<?php
|
|
|
|
foreach($items as $index => $item) {
|
|
|
|
$pay_info = $item->getPay($pay_date);
|
|
|
|
$real_pay = 0;
|
|
|
|
$is_begin = 0;
|
|
|
|
if($pay_info) {
|
|
|
|
$is_begin = 1;
|
|
|
|
$real_pay = $pay_info->base_real_pay;
|
|
|
|
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
|
|
|
|
<td align="left" class="td_bg" nowrap ><?=$item->username?></td>
|
|
|
|
<td class="td_bg" nowrap><?=$item->name?></td>
|
|
|
|
<td class="td_bg" nowrap><?=$pay_date?></td>
|
|
|
|
<td align="left" class="td_bg" nowrap><?=$item->group?$item->group->name:''?></td>
|
|
|
|
<!-- <td class="td_bg" nowrap><//=$item->role?$item->role->name:''?></td>-->
|
|
|
|
<td align="center" class="td_bg" nowrap data="<?=$item->id?>">
|
|
|
|
<?=number_format($real_pay,2)?>元
|
|
|
|
</td>
|
|
|
|
<td align="center" class="td_bg" nowrap><?=$item->is_leave?'是':''?></td>
|
|
|
|
<td align="center" class="td_bg" nowrap data="<?=$item->id?>">
|
|
|
|
<?php if($is_begin == 0):?>
|
|
|
|
<?php else:?>
|
|
|
|
<?=$pay_info->getStatus($pay_info->status_id)?>
|
|
|
|
<?php endif;?>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
<td align="center" class="td_bg" nowrap>
|
|
|
|
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">详情</a>]
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</form>
|
|
|
|
<tr >
|
|
|
|
<td height="25" colspan="11" align="center" class="td_bg"><?=$page_info?></td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<script type="text/javascript" language="javascript" src="/js/common2.js"></script>
|
|
|
|
<script type="text/javascript" language="javascript" src="/js/fileupload/js/vendor/jquery.ui.widget.js"></script>
|
|
|
|
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.iframe-transport.js"></script>
|
|
|
|
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.fileupload.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
//上传文件
|
|
|
|
$('#fileupload').fileupload({
|
|
|
|
url: '/personnel/upload',
|
|
|
|
dataType: 'json',
|
|
|
|
done: function (e, data) {
|
|
|
|
var file_info = data.result.files[0];
|
|
|
|
$('#urlfile').val(file_info.url);
|
|
|
|
$('#submit-btn').removeAttr('disabled');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
//提交
|
|
|
|
$('#submit-btn').click(function(){
|
|
|
|
if(confirm('是否确认提交?')){
|
|
|
|
var file_path = $('#urlfile').val();
|
|
|
|
var time = $("input[name='time']").val();
|
|
|
|
|
|
|
|
if(file_path == ''){
|
|
|
|
alert('请先选择文件!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if(time == ''){
|
|
|
|
alert('请选择时间!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
var params = $('#theFrm').serialize();
|
|
|
|
|
|
|
|
$.post('/personnel/import', params, function(obj){
|
|
|
|
alert(obj.msg);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
mySearch('username', 'search-btn');
|
|
|
|
mySearch('name', 'search-btn');
|
|
|
|
</script>
|