作者 sgj
1 个管道 的构建 通过 耗费 1 秒

进修前台页面完成

... ... @@ -60,9 +60,41 @@ class ApprovalController extends AdminBaseController
public function engageDetail(){
$id=input('id');
$info=db('engage')->where('id',$id)->find();
dump($info);
$this->assign('info',$info);
return $this->fetch();
}
/**
* 删除信息
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
public function engageDelete(){
$map['id']=input('id');
$update['delete_time']=time();
$result=db('engage')->where($map)->update($update);
if ($result==1){
$this->success('删除成功!');
}else{
$this->error('删除失败!');
}
}
/**
* 编辑信息
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
public function engageEdit(){
$map['id']=input('id');
$update['state']=input('state');
$update['answer']=input('answer');
$result=db('engage')->where($map)->update($update);
if ($result==1){
$this->success('审核成功!');
}else{
$this->error('审核失败!');
}
}
}
\ No newline at end of file
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="#A" data-toggle="tab">进修信息详情</a></li>
</ul>
<form class="form-horizontal js-ajax-form margin-top-20" role="form" action="{:url('engageEdit')}" method="post">
<input type="hidden" name="id" value="{$info.id}">
<fieldset>
<div class="tabbable">
<div class="tab-content">
<div class="tab-pane active" id="A">
<div class="form-group">
<label for="input-site-name" class="col-sm-2 control-label">进修单位</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" readonly id="input-site-name"
value="{$info.hospital_name|default=''}">
</div>
</div>
<div class="form-group">
<label for="input-site-name" class="col-sm-2 control-label">姓名</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" readonly id="input-site-name"
value="{$info.user_name|default=''}">
</div>
</div>
<div class="form-group">
<label for="input-site-name" class="col-sm-2 control-label">专业</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" readonly id="input-site-name"
value="{$info.profession|default=''}">
</div>
</div>
<div class="form-group">
<label for="input-site-name" class="col-sm-2 control-label">时长</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" readonly id="input-site-name"
value="{$info.duration|default=''}">
</div>
</div>
<div class="form-group">
<label for="input-site-name" class="col-sm-2 control-label">学历</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" readonly id="input-site-name"
value="{$info.level|default=''}">
</div>
</div>
<div class="form-group">
<label for="input-site-name" class="col-sm-2 control-label">医师资格证号</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" readonly id="input-site-name"
value="{$info.card_num|default=''}">
</div>
</div>
<div class="form-group">
<label for="input-site-name" class="col-sm-2 control-label">身份证号</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" readonly id="input-site-name"
value="{$info.id_card|default=''}">
</div>
</div>
<div class="form-group">
<label for="input-site-name" class="col-sm-2 control-label">民族</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" readonly id="input-site-name"
value="{$info.nation|default=''}">
</div>
</div>
<div class="form-group">
<label for="input-site-name" class="col-sm-2 control-label">毕业院校</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" readonly id="input-site-name"
value="{$info.school|default=''}">
</div>
</div>
<div class="form-group">
<label for="input-site-name" class="col-sm-2 control-label">科室负责人</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" readonly id="input-site-name"
value="{$info.pricipal|default=''}">
</div>
</div>
<div class="form-group">
<label for="input-site-name" class="col-sm-2 control-label">科室电话</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" readonly id="input-site-name"
value="{$info.phone_num|default=''}">
</div>
</div>
<div class="form-group">
<label for="input-site-name" class="col-sm-2 control-label">单位地址</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" readonly id="input-site-name"
value="{$info.unit_address|default=''}">
</div>
</div>
<div class="form-group">
<label for="input-site-name" class="col-sm-2 control-label">进修要求</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" readonly id="input-site-name"
value="{$info.need_info|default=''}">
</div>
</div>
<div class="form-group">
<label for="input-site-name" class="col-sm-2 control-label">当前职称</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" readonly id="input-site-name"
value="{$info.job_title|default=''}">
</div>
</div>
<div class="form-group">
<label for="input-site-name" class="col-sm-2 control-label">回复信息</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" id="input-site-name" name="answer" value="{$info.answer|default=''}">
</div>
</div>
<input type="hidden" class="form-control" id="input-site-name" name="state" value="1">
<if condition="$info.state==0">
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary js-ajax-submit" data-refresh="1">审核通过
</button>
<button type="submit" class="btn btn-primary js-ajax-submit"
data-action="{:url('engageEdit',['state'=>2])}" data-refresh="1">审核驳回
</button>
</div>
</div>
</if>
</div>
</div>
</div>
</fieldset>
</form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -39,7 +39,7 @@
<td>{:date('Y-m-d H:i:s',$vo.add_time)}</td>
<td>
<a href="{:url('engageDetail',['id'=>$vo.id])}">查看详情</a>
<a href="">删除</a>
<a class="js-ajax-delete" href="{:url('engageDelete',['id'=>$vo.id])}">删除</a>
</td>
</tr>
</foreach>
... ...