bztang-admin/plugins/team-dividend/views/admin/storeManager/index.blade.php

155 lines
6.9 KiB
PHP
Raw 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.

<script src="{!!resource_absolute('static/js/xlsx.full.min.js')!!}"></script>
@extends('layouts.base')
<style>
.user{
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: flex-start;
overflow: hidden;
height: 80px;
}
.user .user-avatar{
height: 50px;
width: 50px;
margin-right: 5px;
border-radius: 50%;
overflow: hidden;
}
.user .user-avatar .avatar-image{
width: 100% !important;
height: 100% !important;
}
.user .user-info{
height: 50px;
text-align: left;
}
.user .user-info .user-nickname{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.user .user-info .user-status{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
@section('content')
<div class="w1200 m0a" id="storeManagerIndex">
{{--顶部搜索--}}
<div class="panel panel-info">
<div class="panel-body">
<form action="" method="post" class="form-horizontal" role="form" id="form1">
<div class="form-group">
<div class="col-sm-11 col-xs-12">
<div class="row row-fix tpl-category-container" >
<div class="col-xs-12 col-sm-8 col-lg-3">
<input class="form-control" name="search[uid]" id="" type="text" value="{{ $search['uid'] }}" placeholder="用户ID">
</div>
<div class="col-xs-12 col-sm-8 col-lg-3">
<input class="form-control" name="search[nickname]" id="" type="text" value="{{ $search['nickname'] }}" placeholder="用户昵称|真实姓名">
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="col-xs-12 col-sm-6 col-lg-6">
<button type="button" class="btn btn-primary" onclick="addStoreManager()"><i class="fa fa-plus"></i> 添加</button>
<button class="btn btn-success" id="search"><i class="fa fa-search"></i> 搜索</button>
</div>
</div>
</form>
</div>
</div>
{{--信息列表--}}
<div class="panel panel-default">
<div class="panel-body" style="padding-top: 0;margin-bottom: 30px;overflow: auto;padding-right: 30px;">
<table class="table" style="min-width:1500px;overflow: auto;">
<thead>
<tr>
<th style="text-align:center;width: 80px;">ID</th>
<th style="text-align:center;">店长信息</th>
<th style="text-align:center;">业绩(总)</th>
<th style="text-align:center;">店补(总)</th>
<th style="text-align:center;">添加时间</th>
<th style="text-align:center;">状态</th>
<th style="text-align:center;">操作</th>
</tr>
</thead>
<tbody>
@foreach ($list as $item)
<tr style="height: 50px;">
<td style="text-align:center;">{{ $item['id'] }}</td>
<td style="text-align:center;" >
<div class="user">
<div class="user-avatar">
<img class="avatar-image" src="{{$item['member']['avatar_image']}}" />
</div>
<div class="user-info">
<div class="user-nickname">{{ $item['member']['username'] ? : $item['member']['nickname'] }}</div>
<div class="user-status">ID{{ $item['member']['uid'] }}</div>
</div>
</div>
</td>
<td style="text-align:center;">{{ $item['sum_total_money'] ?? '0.00' }}</td>
<td style="text-align:center;">{{ $item['sum_amount'] ?? '0.00'}}</td>
<td style="text-align:center;">{{ $item['created_at'] ?? '0.00' }}</td>
<td style="text-align:center;">
@if($item['status'] == 1)
<span class="label label-success">正常</span>
@else
<span class="label label-danger">冻结</span>
@endif
</td>
<td style="text-align:center;">
<button onclick="seeInfo({{$item['uid']}})" type="button" class="btn btn-info btn-sm">结算记录</button>
@if($item['status'] == 1)
<button onclick="changeStatus({{$item['id']}},'freeze')" type="button" class="btn btn-danger btn-sm">冻结</button>
@else
<button onclick="changeStatus({{$item['id']}},'thaw')" type="button" class="btn btn-warning btn-sm">解冻</button>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
{!! $pager !!}
</div>
</div>
</div>
<script type="text/javascript">
// 点击添加店长
function addStoreManager(){
window.location.href = "{!! yzWebUrl('plugin.team-dividend.admin.store-manager.addInfo') !!}";
}
// 店长身份状态改变
function changeStatus(id,type){
let link = "{{yzWebUrl('plugin.team-dividend.admin.store-manager.change-status')}}" + '&type='+type+'&id=' + id;
let tips = type === 'freeze' ? '确认冻结当前店长吗?冻结后当前用户的店长身份将失效!' : '确认解除当前店长的冻结状态吗?解除后当前用户将恢复店长身份!';
// 提示
let popup = util.confirm(tips,{
confirm:function () {
// 加载动画
loadShow();
// 关闭弹框
popup.modal('hide');
window.location.href = link;
}
});
}
// 查看店长业绩及补助信息
function seeInfo(uid){
let link = "{{yzWebUrl('plugin.team-dividend.admin.store-manager.see-info')}}" + `&uid=${uid}`;
let popup = util.ajaxshow(link,'查看店补信息',{
width: $(window).width() * 0.8 > 1200 ? $(window).width() * 0.8 : 1200,
height: $(window).height() * 0.8 > 1200 ? $(window).height() * 0.8 : 1200,
});
}
</script>
@endsection