test
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.
 
 
 
 
 
 

223 lines
10 KiB

{php include wl_template('common/header');}
<style>
#reject-reason {margin-top: 10px;}
.image-container {
position: relative;
display: inline-block;
}
.tip {
display: none;
position: absolute;
top: -30px;
left: 100%;
padding: 5px;
background-color: #fff;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
border: 1px solid #ccc;
border-radius: 4px;
}
.image-container:hover .tip {
display: block;
}
</style>
<ul class="nav nav-tabs">
<li class="active"><a href="#">学生认证</a></li>
</ul>
<div class="app-content">
<div class="app-filter">
<div class="filter-list">
<form action="" method="get" class="form-horizontal" role="form" id="form1">
<input type="hidden" name="c" value="site" />
<input type="hidden" name="a" value="entry" />
<input type="hidden" name="m" value="{MODULE_NAME}" />
<input type="hidden" name="p" value="member" />
<input type="hidden" name="ac" value="checkMember" />
<input type="hidden" name="do" value="checkStudentIndex" />
<div class="form-group form-inline">
<label class="col-sm-2 control-label">姓名</label>
<div class="col-sm-9">
<input type="text" name="username" class="form-control" value="{$_GPC['username']}" placeholder="请输入姓名"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="col-sm-9">
<button class="btn btn-primary" type="submit">筛选</button>
</div>
</div>
</form>
</div>
</div>
<div class="app-table-list">
<div class="table-responsive">
<table class="table table-responsive">
<thead>
<tr>
<th style="width: 10%;">姓名</th>
<th style="width: 10%;">学号</th>
<th style="width: 10%;">手机号</th>
<th style="width: 15%;">学校名称</th>
<th style="width: 15%;">院系名称</th>
<th style="width: 10%;">入学时间</th>
<th style="width: 10%;">学生证件</th>
<th style="width: 10%;">审核状态</th>
<th style="width: 10%;text-align: right;">操作</th>
</tr>
</thead>
<tbody>
{loop $list $row}
<tr>
<td style="overflow: visible">{php echo $row['name'];}</td>
<td style="overflow: visible">{php echo $row['code'];}</td>
<td style="overflow: visible">{php echo $row['mobile'];}</td>
<td style="overflow: visible">{php echo $row['school_name'];}</td>
<td style="overflow: visible">{php echo $row['department_name'];}</td>
<td style="overflow: visible">{php echo $row['start_date'];}</td>
<td style="overflow: visible">
<a href="{php echo tomedia($row['certificate_img'])}" target="_blank">
<div class="image-container">
<img class="img-40 image" src="{php echo tomedia($row['certificate_img'])}" style='border:1px solid #efefef;' onerror="this.src='{IMAGE_NOPIC_SMALL}'" height="40" width="40" alt="image"/>
<div class="tip"></div>
</div>
</a>
</td>
<td style="overflow: visible">
{if $row['check_status'] == '0'}
<span class="check-result{php echo $row['id'];}">未审核</span>
{elseif $row['check_status'] == '1'}
<span class="check-result{php echo $row['id'];}">审核通过</span>
{elseif $row['check_status'] == '2'}
<span class="check-result{php echo $row['id'];}">审核失败</span>
{/if}
</td>
<td style="overflow:visible;text-align: right;">
{if empty($row['check_status'])}
<a class="btn btn-primary btn-sm" href="#" id="show-audit-{php echo $row['id'];}" onclick="showAudit({php echo $row['id'];})" title="">审核</a>
{/if}
<a class="btn btn-sm btn-default" href="{php echo web_url('member/checkMember/checkStudentEdit',array('id'=>$row['id']))}">编辑</a>
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
<div class="app-table-foot clearfix">
<div class="pull-left">
</div>
<div class="pull-right">
{$pager}
</div>
</div>
<!-- 审核弹窗模板 -->
<div class="modal fade" id="audit-modal" tabindex="-1" role="dialog" aria-labelledby="audit-modal-title" aria-hidden="true">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<form id="audit-form">
<div class="modal-header">
<h5 class="modal-title" id="audit-modal-title">审核</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="result" id="result-pass" value="pass" checked>
<label class="form-check-label" for="result-pass">通过</label>
</div>
<div class="form-check form-check-inline" style="display: inline-block;">
<input class="form-check-input" type="radio" name="result" id="result-reject" value="reject">
<label class="form-check-label" for="result-reject">不通过</label>
</div>
</div>
<div class="form-group" id="reject-reason" style="display:none">
<label for="reject-reason-input">不通过原因</label>
<textarea class="form-control" id="reject-reason-input" name="reason" rows="3"></textarea>
</div>
</div>
<div class="modal-footer">
<input type="hidden" id="hidden_id" value="">
<button type="submit" class="btn btn-danger">确定</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal" onclick="resetFrom()">取消</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$(function() {
// 监听审核结果选项
$('input[name="result"]').on('change', function() {
var value = $(this).val();
if (value === 'reject') {
$('#reject-reason').show();
} else {
$('#reject-reason').hide();
}
});
// 图片放大
$('.image-container').hover(function() {
var src = $(this).find('.image').attr('src');
$(this).find('.tip').html('<img src="' + src + '" style="width: 200px;height:200px;">');
}, function() {
$(this).find('.tip').empty();
});
// 监听表单提交
$('#audit-form').on('submit', function(e) {
e.preventDefault();
var result = $('input[name="result"]:checked').val();
var reason = $('textarea[name="reason"]').val();
let data = {};
data.id = $("#hidden_id").val();
data.result = result;
if (result == 'reject' && reason.length == 0) {
tip.alert('请填写不通过的原因');
return false;
}
if (reason) {
data.reason = reason;
}
$.ajax({
url:"{php echo web_url('member/checkMember/checkStudentInfo')}",
type:"post",
data: {data:data},
dataType:"json",
async:false,
success:function(res){
if (res.status===1) {
$('#show-audit-'+data.id).css('display','none');
$('.check-result'+data.id).html(res.result.span);
} else {
tip.alert(res.result.message);
}
},
error:function(){
tip.alert("网络错误,请重试!!");
}
});
$('#audit-modal').modal('hide');
resetFrom();
});
});
// 弹出审核弹窗
function showAudit(id) {
$('#audit-modal').modal({
show: true
});
$('#hidden_id').val(id);
}
function resetFrom() {
$('#result-pass').prop('checked', true);
$('#result-reject').prop('checked', false);
$('#reject-reason').hide();
$('#reject-reason-input').val('');
}
</script>
{php include wl_template('common/footer');}