0
0
Files
Babyclass/app/Admin/Views/users/index.blade.php
2020-08-04 10:09:42 +08:00

137 lines
7.4 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="pageHeader">
<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="{{ url()->current() }}" method="post">
<div class="searchBar">
<table class="searchContent">
<tr>
<td> 用户id
<input type="text" name="user_id" size="6" value="{{ Request::input('user_id') }}"/>
</td>
<td> 推荐人ID
<input type="text" name="parent_id" size="6" value="{{ Request::input('parent_id') }}"/>
</td>
<td>
<select class="combox" name="identity">
<option value="">身份</option>
<option value="0" @if(Request::get('identity') ===0) selected @endif>注册用户</option>
@foreach($identitys as $identity)
<option value="{{ $identity->id }}" @if(Request::get('identity') == $identity->id) selected @endif>{{ $identity->title }}</option>
@endforeach
</select>
</td>
<td>
手机号:
<input type="text" name="mobile" size="12" value="{{ Request::input('mobile') }}"/>
</td>
<td>
昵称:
<input type="text" name="nickname" size="12" value="{{ Request::input('nickname') }}"/>
</td>
<td>
起:
<input type="text" name="start" value="{{ Request::get('start') }}" class="date textInput readonly valid" datefmt="yyyy-MM-dd HH:mm:ss" defaulttime="23:59:59" readonly="true">
</td>
<td>
止:
<input type="text" name="end" value="{{ Request::get('end') }}" class="date textInput readonly valid" datefmt="yyyy-MM-dd HH:mm:ss" defaulttime="23:59:59" readonly="true">
</td>
<td>
<select class="combox" name="is_salesman">
<option value="">业务员</option>
<option value="1" @if(Request::get('is_salesman') == '1') selected @endif></option>
<option value="0" @if(Request::get('is_salesman') === '0') selected @endif></option>
</select>
</td>
<td><div class="buttonActive"><div class="buttonContent"><button type="submit">检索结果</button></div></div></td>
<td><div class="buttonActive"><div class="buttonContent"><button type="button" class="export-data">导出数据</button></div></div></td>
</tr>
</table>
</div>
</form>
</div>
<div class="pageContent">
<table class="table" width="100%" layoutH="85">
<thead>
<tr>
<th width="50" orderField="id" @if (Request::input('orderField') == 'id') class="{{ Request::input('orderDirection') }}" @endif>编号</th>
<th width="100">手机号</th>
<th width="150">昵称</th>
<th width="70">当前身份</th>
<th width="70">业务员</th>
<th width="50">机构</th>
<th width="100">上级</th>
<th width="100">直推</th>
<th width="70">登录次数</th>
<th width="130">激活时间</th>
<th width="130" orderField="created_at" @if (Request::input('orderField') == 'created_at') class="{{ Request::input('orderDirection') }}" @endif>注册时间</th>
<th width=""></th>
</tr>
</thead>
<tbody>
@foreach ($users as $user)
<tr>
<td>{{ $user->id }}</td>
<td>{{ $user->mobile }}</td>
<td>{{ $user->info->nickname }}</td>
<td>{{ $user->identity_text }}</td>
<td>
{{ $user->salesman_text }}
@if($user->is_salesman)
<a title="取消业务员" target="ajaxTodo" href="{{ route('Admin.users.salesman', ['user'=>$user,'value'=>0]) }}" >取消</a>
@else
<a title="设置业务员" target="ajaxTodo" href="{{ route('Admin.users.salesman', ['user'=>$user,'value'=>1]) }}" >设置</a>
@endif
</td>
<td>{{ $user->organ->name }}</td>
<td>{{ $user->parent->info->nickname ?? '无' }}({{ $user->parent['id'] ?: '' }})</td>
<td>
{{ $user->identity->relation_count }}
[<a title="血缘视图" target="dialog" mask="true" width="600" height="800" href="{{ route('Admin.users.bloodview', $user) }}" rel="dialog{{ time() }}" >血缘视图</a>]
</td>
<td>{{ $user->logins_count }}</td>
<td>{{ $user->identity->created_at??'' }}</td>
<td>{{ $user->created_at }}</td>
<td>
<a title="开通身份" target="dialog" href="{{ route('Admin.users.identity', $user) }}" rel="dialog{{ time() }}" class="btnAssign">开通身份</a>
<a title="编辑用户" target="dialog" href="{{ route('Admin.users.edit', $user) }}" rel="dialog{{ time() }}" class="btnEdit">编辑</a>
@if($user->relation->parent_id==1 || $user->identity->identity_id==0)
<a title="改变上级" target="dialog" el="dialog{{ time() }}" href="{{ route('Admin.users.parent', $user) }}" class="btnSelect">改变上级</a>
@endif
<a title="改变组织" target="navTab" el="navTab_{{ time() }}" href="{{ route('Admin.users.seller', $user) }}" class="btnView">改变组织</a>
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="panelBar">
<form id="pagerForm" method="post" action="#rel#">
<input type="hidden" name="page" value="{{ $users->currentPage() }}" />
<input type="hidden" name="numPerPage" value="{{ $users->perPage() }}" />
<input type="hidden" name="orderField" value="{{ Request::input('orderField') }}" />
<input type="hidden" name="orderDirection" value="{{ Request::input('orderDirection') }}" />
</form>
<div class="pages">
<span>显示</span>
<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
<option @if ($users->perPage() == 30) selected @endif value="30">30</option>
<option @if ($users->perPage() == 100) selected @endif value="100">100</option>
<option @if ($users->perPage() == 200) selected @endif value="200">200</option>
</select>
<span>条,共 {{ $users->total() }} </span>
</div>
<div class="pagination" targetType="navTab" totalCount="{{ $users->total() }}" numPerPage="{{ $users->perPage() }}" pageNumShown="10" currentPage="{{ $users->currentPage() }}"></div>
</div>
</div>
<script type="text/javascript">
//点击导出
$('.export-data').click(function (event) {
location.href = "{{ route('Admin.export.user') }}?" + $(this).parents('form').serialize();
});
</script>