作者 sgj
1 个管道 的构建 失败 耗费 0 秒

志愿者修改

... ... @@ -59,6 +59,7 @@ class TeamModel extends Model
$info=$this->where($map1)->select();
foreach ($info as $k=>$v){
$info[$k]['pic']=cmf_get_image_url($v['pic']);
}
return $info;
... ...
... ... @@ -67,6 +67,11 @@ class JoinModel extends Model
->group('a.id')
->select()
->toArray();
foreach ($info as $k=>$v){
$info[$k]['start_time_text']=date('Y-m-d',$v['start_time']);
$info[$k]['end_time_text']=date('Y-m-d',$v['end_time']);
}
// echo $this->getLastSql();
return $info;
}
... ...
... ... @@ -235,7 +235,35 @@ class VolunteerController extends AdminBaseController
public function excels()
{
// $where = [];
// $param = $this->request->param();
// $startTime = empty($param['start_time']) ? 0 : strtotime($param['start_time']);
// $endTime = empty($param['end_time']) ? 0 : strtotime($param['end_time']);
// if (!empty($startTime) && !empty($endTime)) {
// $where['create_time'] = [['>= time', $startTime], ['<= time', $endTime]];
// } else {
// if (!empty($startTime)) {
// $where['create_time'] = ['>= time', $startTime];
// }
// if (!empty($endTime)) {
// $where['create_time'] = ['<= time', $endTime];
// }
// }
// $category = empty($param['category']) ? '' : $param['category'];
// if (!empty($category)) {
// $where['status'] = ['eq', "$category"];
// }
// $type = empty($param['type']) ? '' : $param['type'];
// if (!empty($type)) {
// $where['type'] = ['eq', "$type"];
// }
// $keyword = empty($param['keyword']) ? '' : $param['keyword'];
// if (!empty($keyword)) {
// $where['name|province|city|county|email|move_phone|fixed_phone|card_number|school|postcode|nation|politics|sex|urgency_phone|qq'] = ['like', "%$keyword%"];
// }
$where = [];
$where1 = [];
$param = $this->request->param();
$startTime = empty($param['start_time']) ? 0 : strtotime($param['start_time']);
$endTime = empty($param['end_time']) ? 0 : strtotime($param['end_time']);
... ... @@ -257,14 +285,31 @@ class VolunteerController extends AdminBaseController
if (!empty($type)) {
$where['type'] = ['eq', "$type"];
}
$sex = empty($param['sex']) ? '' : $param['sex'];
if (!empty($sex)) {
$where['sex'] = ['eq', "$sex"];
}
$level = empty($param['level']) ? '' : $param['level'];
if (!empty($level)) {
$level_map['level'] = ['eq', "$level"];
$level=\db('level')->where('level',$level)->find();
$where['work_time']=['>=',$level['min']];
$where1['work_time']=['<',$level['max']];
}
$keyword = empty($param['keyword']) ? '' : $param['keyword'];
if (!empty($keyword)) {
$where['name|province|city|county|email|move_phone|fixed_phone|card_number|school|postcode|nation|politics|sex|urgency_phone|qq'] = ['like', "%$keyword%"];
}
$addr = empty($param['addr']) ? '' : $param['addr'];
if (!empty($addr)) {
$where['addr'] = ['like', "%$addr%"];
}
$data = Db::name('volunteer')
->where('delete_time', 0)
->where($where)
->where($where1)
->order('create_time asc')
->select()->toArray();
... ...
... ... @@ -140,8 +140,8 @@
<td>
<a href='{:url("volunteer/edit",array("id"=>$vo["id"]))}'>查看详情</a>|
<!--<a class="js-ajax-delete" href="{:url('volunteer/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>-->
<a class="js-ajax-delete" href="{:url('volunteer/pass',array('id'=>$vo['id']))}">通过</a>|
<a class="js-ajax-delete" href="{:url('volunteer/unpass',array('id'=>$vo['id']))}">拒绝</a>
<a class="js-ajax-dialog-btn" data-msg="确定通过吗?" href="{:url('volunteer/pass',array('id'=>$vo['id']))}">通过</a>|
<a class="js-ajax-dialog-btn" data-msg="确定拒绝吗?" href="{:url('volunteer/unpass',array('id'=>$vo['id']))}">拒绝</a>
<if condition="getUserType($vo['user_id'])== 1">
<a href="{:url('user/adminIndex/is_admin',array('id'=>$vo['user_id']))}"
... ...