|
|
|
<?php
|
|
|
|
use \common\libs\MyLib;
|
|
|
|
?>
|
|
|
|
<?php $this->beginBlock('header_css'); ?>
|
|
|
|
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
|
|
|
|
<?php $this->endBlock(); ?>
|
|
|
|
|
|
|
|
<div class="wrapper wrapper-content animated fadeInRight">
|
|
|
|
<div class="ibox float-e-margins">
|
|
|
|
<div class="ibox-title">
|
|
|
|
<h5>工资管理</h5>
|
|
|
|
<div class="ibox-tools">
|
|
|
|
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
|
|
|
|
<i class="fa fa-refresh"></i> 刷新
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-content">
|
|
|
|
<form role="form" class="form-horizontal" onsubmit="return search();">
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-1 control-label">工号</label>
|
|
|
|
<div class="col-sm-2">
|
|
|
|
<input type="text" name="username" id="username" class="form-control">
|
|
|
|
</div>
|
|
|
|
<label class="col-sm-1 control-label">真实姓名</label>
|
|
|
|
<div class="col-sm-2">
|
|
|
|
<input type="text" name="name" id="name" class="form-control">
|
|
|
|
</div>
|
|
|
|
<label class="col-sm-1 control-label">工资月份</label>
|
|
|
|
<div class="col-sm-2">
|
|
|
|
<div class="input-group date">
|
|
|
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
|
|
<input type="text" name="pay_date" id="pay_date" class="form-control" autocomplete="off" value="<?=$pay_date?>">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-2">
|
|
|
|
<div class="checkbox checkbox-inline">
|
|
|
|
<input type="checkbox" id="is_leave" name="is_leave" value="1">
|
|
|
|
<label for="is_leave"> 是否离职 </label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-1 control-label">分组</label>
|
|
|
|
<div class="col-sm-2">
|
|
|
|
<select name="group_id" id="group_id" class="form-control">
|
|
|
|
<option value="">全部</option>
|
|
|
|
<?php
|
|
|
|
foreach($group_items as $item) {
|
|
|
|
echo '<option value="'.$item->id.'">'.$item->name.'</option>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-3">
|
|
|
|
<button type="submit" class="btn btn-primary">搜索</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<table id="listTable">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th data-field="state" data-checkbox="true"></th>
|
|
|
|
<th width="50" data-field="id">ID</th>
|
|
|
|
<th data-field="username">工号</th>
|
|
|
|
<th data-field="name">真实姓名</th>
|
|
|
|
<th data-field="pay_date">工资月份</th>
|
|
|
|
<th data-field="group_path">所属岗位</th>
|
|
|
|
<th data-field="real_pay">工资</th>
|
|
|
|
<th data-field="is_leave">是否离职</th>
|
|
|
|
<th data-formatter="opFormatter">操作</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<?php $this->beginBlock('footer_js'); ?>
|
|
|
|
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
|
|
|
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
|
|
|
|
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
|
|
|
<script>
|
|
|
|
var o = {};
|
|
|
|
function opFormatter(value, row, index) {
|
|
|
|
var opStr = [];
|
|
|
|
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">');
|
|
|
|
opStr.push('<i class="fa fa-edit" title="维护"></i>');
|
|
|
|
opStr.push('</a>');
|
|
|
|
return opStr.join(' ');
|
|
|
|
}
|
|
|
|
function edit(id) {
|
|
|
|
var title = '编辑工资';
|
|
|
|
layer_show(title, '/personnel/pay-info?id=' + id);
|
|
|
|
}
|
|
|
|
|
|
|
|
function refreshList() {
|
|
|
|
$('#listTable').bootstrapTable('refresh');
|
|
|
|
}
|
|
|
|
|
|
|
|
function search() {
|
|
|
|
$('.input-group.date').datepicker({
|
|
|
|
minViewMode: 1,
|
|
|
|
keyboardNavigation: false,
|
|
|
|
forceParse: false,
|
|
|
|
autoclose: true,
|
|
|
|
todayHighlight: true,
|
|
|
|
format: "yyyy-mm"
|
|
|
|
});
|
|
|
|
$('#listTable').bootstrapTable('destroy');
|
|
|
|
$('#listTable').bootstrapTable({
|
|
|
|
url: "/personnel/pay-list-json",
|
|
|
|
pagination: true,
|
|
|
|
sidePagination: 'server',
|
|
|
|
multipleSelectRow: true,
|
|
|
|
queryParams: function(params) {
|
|
|
|
o['username'] = $('#username').val();
|
|
|
|
o['name'] = $('#name').val();
|
|
|
|
o['pay_date'] = $('#pay_date').val();
|
|
|
|
o['is_leave'] = $('#is_leave').prop("checked");
|
|
|
|
o['group_id'] = $('#group_id').val();
|
|
|
|
o['limit'] = params['limit'];
|
|
|
|
o['offset'] = params['offset'];
|
|
|
|
return o;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
search();
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<?php $this->endBlock(); ?>
|