bztang-admin/plugins/weight-value/views/index/index.blade.php

356 lines
17 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;
}
.margin-bottom-15{
margin-bottom: 15px;
}
.select-user-btn{
height: 34px!important;
}
select{
width: calc((100% - 20px) / 3) !important;
height: 34px;
border-color: #ccc!important;
color: #555 !important;
background-color: #fff!important;
}
select:not(:last-child){
margin-right: 10px!important;
}
.apply_image{
max-height: 80px;
max-width: 80px;
}
.image_a{
padding: 0!important;
height: 80px;
width: 80px;
display: inline-flex!important;
flex-direction: row;
justify-content: center;
align-items: flex-end;
flex-wrap: nowrap;
border: unset!important;
}
</style>
@section('content')
<div class="w1200 m0a" id="terminalMerchantsIndex">
{{--顶部搜索--}}
<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[team_dividend_agency_uid]" id="" type="text" value="{{ $search['team_dividend_agency_uid'] }}" placeholder="引荐人用户ID">
</div>
<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[title]" id="" type="text" value="{{ $search['title'] }}" placeholder="店铺名称">
</div>
</div>
</div>
</div>
<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[member_name]" id="" type="text" value="{{ $search['member_name'] }}" placeholder="引荐人昵称或者真实姓名">
</div>
<div class="col-xs-12 col-sm-8 col-lg-3">
<input class="form-control" name="search[contacts]" id="" type="text" value="{{ $search['contacts'] }}" placeholder="注册人姓名">
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-11 col-xs-12">
<div class="row row-fix tpl-category-container" >
<input type="hidden" id="province_id" value="{{ $search['province_id']?:0 }}"/>
<input type="hidden" id="city_id" value="{{ $search['city_id']?:0 }}"/>
<input type="hidden" id="area_id" value="{{ $search['area_id']?:0 }}"/>
<div class="col-xs-12 col-sm-8 col-lg-6">
{!! app\common\helpers\AddressHelper::tplLinkedAddress(['search[province_id]','search[city_id]','search[area_id]'], []) !!}
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="col-xs-12 col-sm-6 col-lg-6">
<input type="hidden" name="is_apply" value="{{$is_apply}}"/>
<button type="button" name="export" value="1" id="export" class="btn btn-default excel back ">导出 Excel</button>
@if (!$is_apply)
<button type="button" class="btn btn-primary editInfoBtn"><i class="fa fa-plus"></i> 添加</button>
@endif
<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:left;">终端商信息</th>
<th style="text-align:left;">引荐人信息</th>
<th style="text-align:left;">注册人信息</th>
<th style="text-align:center;width: 100px;">营业执照</th>
<th style="text-align:center;width: 100px;">门头照片</th>
<th style="text-align:center;width: 100px;">内部照片</th>
<th style="text-align:center;width: 200px;">
@if($is_apply)
申请时间
@else
审核时间
@endif
</th>
<th style="text-align:center;width: 350px;">操作</th>
</tr>
</thead>
<tbody>
@foreach ($list as $item)
<tr style="height: 50px;">
<td style="text-align:center;">{{ $item['id'] }}</td>
<td style="text-align:left;">
<div class="user">
<div class="user-avatar">
<img class="avatar-image" src="{{$item['header_image']}}" />
</div>
<div class="user-info">
<div class="user-nickname">{{ $item['title'] }}</div>
<div class="user-nickname">
{{ $item['province_info']['areaname'] }}{{ $item['city_info']['areaname'] }}{{ $item['area_info']['areaname'] }}
</div>
<div class="user-status">
{{--状态0=待审核,1=使用中,2=驳回--}}
@if ($item['status'] == 0)
<label class="label label-default">待审核</label>
@elseif ($item['status'] == 1)
<label class="label label-success">使用中</label>
@elseif ($item['status'] == 2)
<label class="label label-danger">已驳回</label>
@endif
</div>
</div>
</div>
</td>
<td style="text-align:left;" >
<div class="user">
<div class="user-avatar">
<img class="avatar-image" src="{{$item['team_dividend_member']['avatar_image']}}" />
</div>
<div class="user-info">
<div class="user-nickname">昵称:{{ $item['team_dividend_member']['nickname'] }}</div>
<div class="user-status">ID{{ $item['team_dividend_member']['uid'] }}</div>
</div>
</div>
</td>
<td style="text-align:left;">
<div class="contacts">
注册人:{{ $item['contacts'] }}<br />
联系电话:{{ $item['contacts_phone'] }}<br />
</div>
</td>
<td style="text-align:center;">
<a target="_blank" href="{{tomedia($item['business_license_image'])}}" class="image_a">
<img class="apply_image" src='{{tomedia($item['business_license_image'])}}' /><br/>
</a>
</td>
<td style="text-align:center;">
<a target="_blank" href="{{tomedia($item['header_image'])}}" class="image_a">
<img class="apply_image" src='{{tomedia($item['header_image'])}}' /><br/>
</a>
</td>
<td style="text-align:center;">
<a target="_blank" href="{{tomedia($item['internal_image'])}}" class="image_a">
<img class="apply_image" src='{{tomedia($item['internal_image'])}}' /><br/>
</a>
</td>
<td style="text-align:center;">
@if($is_apply)
{{ $item['created_at'] }}
@else
{{ $item['to_examine_time'] }}
@endif
</td>
<td style="text-align:center;">
@if ($is_apply)
{{--审核内容--}}
@if ($item['status'] == 0)
<button onclick="pass({{$item['id']}})" type="button" class="btn btn-success btn-sm">审核通过</button>
<button type="button" onclick="popupRejectReason({{$item['id']}})" class="btn btn-danger btn-sm">驳回申请</button>
@endif
<a href="{{yzWebUrl('plugin.weight-value.admin.index.editInfo', ['id' => $item['id'], 'is_see' => TRUE])}}">
<button type="button" class="btn btn-primary btn-sm">详情</button>
</a>
@else
{{--使用中内容--}}
<a href="{{yzWebUrl('plugin.weight-value.admin.index.editInfo', ['id' => $item['id']])}}">
<button type="button" class="btn btn-success btn-sm">编辑</button>
</a>
<button onclick="del({{$item['id']}})" type="button" class="btn btn-danger btn-sm">删除</button>
<button onclick="seeSalesInfo({{$item['id']}})" type="button" class="btn btn-info btn-sm">销售统计</button>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
{!! $pager !!}
</div>
</div>
{{--驳回弹框--}}
<div id="reject-popup" class="modal fade">
<div class="modal-dialog" style='width: 920px;'>
<div class="modal-content">
<div class="modal-header">
<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
<h3>驳回申请</h3>
</div>
<div class="modal-body">
<div class="row">
<div class="input-group">
<textarea name="reject_reason" maxlength="200" cols="120" rows="15" placeholder="请输入驳回原因(200字以内)"></textarea>
</div>
</div>
<div id="module-menus-goods" style="padding-top:5px;"></div>
</div>
<div class="modal-footer">
<input type="button" value="确认" onclick="submitReject()" class="btn btn-primary"/>
<a href="#" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</a>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="{{static_url('js/area/cascade_street.js')}}"></script>
<script type="text/javascript">
var apply_id = 0;// 终端商信息id
window.history.replaceState(null, null, window.location.href);
// 地区初始化
var province_id = $('#province_id').val();
var city_id = $('#city_id').val();
var area_id = $('#area_id').val();
cascdeInit(province_id, city_id, area_id);
$(function () {
// 编辑终端商
$("#terminalMerchantsIndex").on('click','.editInfoBtn',function () {
let id = $(this).data('id') || 0;
window.location.href = "{!! yzWebUrl('plugin.weight-value.admin.index.editInfo') !!}" + '&id=' + id;
});
// 点击导出
$('#export').click(function(){
@if (!$is_apply)
$('#form1').get(0).action = "{!! yzWebUrl('plugin.weight-value.admin.index.export') !!}";
$('#form1').submit();
$('#form1').get(0).action= "{!! yzWebUrl('plugin.weight-value.admin.index.index') !!}";
@else
$('#form1').get(0).action = "{!! yzWebUrl('plugin.weight-value.admin.index.apply_export') !!}";
$('#form1').submit();
$('#form1').get(0).action= "{!! yzWebUrl('plugin.weight-value.admin.index.apply') !!}";
@endif
});
});
// 填写驳回原因
function popupRejectReason(id){
apply_id = id;
$('#reject-popup').modal();//填写驳回理由
}
// 提交驳回
function submitReject(){
var reject_reason = $("textarea[name='reject_reason']").val();
var link = "{{yzWebUrl('plugin.weight-value.admin.index.reject')}}" + '&id=' + apply_id + '&reject_reason=' + reject_reason;
// 判断:是否存在驳回原因
if(reject_reason.length <= 0){
alert('请输入驳回原因');
return false;
}
window.location.href = link;
}
// 审核通过
var is_click_button = false;
function pass(id){
// 防止重复点击
loadShow();
if(is_click_button) return false;
is_click_button = true;
// 通过审核
window.location.href = "{{yzWebUrl('plugin.weight-value.admin.index.pass')}}" + '&id=' + id;
}
// 删除终端商
function del(id){
let link = "{{yzWebUrl('plugin.weight-value.admin.index.del')}}" + '&id=' + id;
// 通过审核
let popup = util.confirm('确认删除当前终端商信息吗?',{
confirm:function () {
// 加载动画
loadShow();
// 关闭弹框
popup.modal('hide');
window.location.href = link;
}
});
}
// 查看销售信息统计
function seeSalesInfo(id){
let link = "{{yzWebUrl('plugin.weight-value.admin.sales.index')}}" + `&id=${id}`;
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