bztang-admin/plugins/team-dividend/views/admin/dividend-list.blade.php

209 lines
10 KiB
PHP

@extends('layouts.base')
@section('content')
@section('title', trans('经销商提成明细'))
<div class="right-titpos">
<ul class="add-snav">
<li class="active"><a href="#">经销商提成明细</a></li>
</ul>
</div>
<div class='panel panel-default'>
<form action="" method="post" class="form-horizontal" id="form1">
<div class="panel panel-info">
<div class="panel-body">
<div class="form-group col-xs-12 col-sm-2">
<input class="form-control" name="search[member_id]" id="" type="text"
value="{{$search['member_id']}}" placeholder="会员ID">
</div>
<div class="form-group col-xs-12 col-sm-2">
<!--<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">会员信息</label>-->
<!--<div class="col-xs-12 col-sm-8 col-lg-9">-->
<input class="form-control" name="search[member]" id="" type="text"
value="{{$search['member']}}" placeholder="昵称/姓名/手机">
<!--</div>-->
</div>
<div class="form-group col-xs-12 col-sm-2">
<input class="form-control" name="search[order_sn]" id="" type="text"
value="{{$search['order_sn']}}" placeholder="请输入订单编号">
</div>
<div class="form-group col-xs-12 col-sm-2">
<select name='search[agent_level]' class='form-control'>
<option value=''>经销商等级</option>
@foreach($levels as $level)
<option value='{{$level->id}}'
@if($search['agent_level'] ==$level->id) selected @endif>{{$level->level_name}}</option>
@endforeach
</select>
</div>
<div class="form-group col-xs-12 col-sm-2">
<select name='search[status]' class='form-control'>
<option value=''>提成状态</option>
<option value='0' @if($search['status'] == '0') selected @endif>未结算</option>
<option value='1' @if($search['status'] == '1') selected @endif>已结算</option>
<option value='-1' @if($search['status'] == '-1') selected @endif>已失效</option>
</select>
</div>
<div class="form-group col-xs-12 col-sm-2">
<select name='search[type]' class='form-control'>
<option value=''>提成类型</option>
<option value='0' @if($search['type'] == '0') selected @endif>分红佣金</option>
<option value='1' @if($search['type'] == '1') selected @endif>平级奖励</option>
<option value='2' @if($search['type'] == '2') selected @endif>感恩奖励</option>
<option value='3' @if($search['type'] == '3') selected @endif>额外分红</option>
<option value='4' @if($search['type'] == '4') selected @endif>生态建设</option>
<option value='5' @if($search['type'] == '5') selected @endif>生态贡献</option>
<option value='5' @if($search['type'] == '6') selected @endif>生态服务</option>
</select>
</div>
<div class="form-group col-xs-12 col-sm-2">
<select name='search[statistics]' class='form-control'>
<option value='2' @if($search['statistics'] == '2') selected @endif>不统计</option>
<option value='1' @if($search['statistics'] == '1') selected @endif>统计</option>
</select>
</div>
<div class="form-group col-xs-12 col-sm-2">
<select name='search[is_pay]' class='form-control'>
<option value='0' @if($search['is_pay'] == '0') selected @endif>全部</option>
<option value='1' @if($search['is_pay'] == '1') selected @endif>已支付</option>
<option value='2' @if($search['is_pay'] == '2') selected @endif>未支付</option>
</select>
</div>
<div class="form-group col-xs-12 col-sm-6">
<div class="col-sm-3">
<label class='radio-inline'>
<input type='radio' value='0' name='search[is_time]'
@if($search['is_time'] == '0') checked @endif>不搜索
</label>
<label class='radio-inline'>
<input type='radio' value='1' name='search[is_time]'
@if($search['is_time'] == '1') checked @endif>搜索
</label>
</div>
{!! app\common\helpers\DateRange::tplFormFieldDateRange('search[time]', ['starttime'=>$search['time']['start'],
'endtime'=>$search['time']['end'],
'start'=>$search['time']['start'],
'end'=>$search['time']['end']
], true) !!}
</div>
<div class="form-group col-xs-12 col-sm-4">
<input type="button" class="btn btn-success" id="export" value="导出">
<input type="button" class="btn btn-success pull-right" id="scan_repetition" value="检测重复记录">
<input type="button" class="btn btn-success pull-right" id="search" value="搜索">
</div>
</div>
</div>
</form>
</div>
<div class='panel panel-default'>
<div class='panel-heading' @if ($search['statistics'] != 1) hidden="hidden" @endif>
提成统计 未结算提成:{{$statisti['unsettled']}} 已结算提成:{{$statisti['settled']}} 提成总金额:{{$statisti['total']}}
</div>
<div class='panel-body'>
<table class="table table-hover" style="overflow:visible;">
<thead>
<tr>
<th style='width:70px;text-align: center;'>ID</th>
<th style='width:160px;text-align: center;'>提成时间</th>
<th style='width:80px;text-align: center;'>会员ID</th>
<th style='width:180px;text-align: center;'>订单号</th>
<th style='width:120px;text-align: center;'>经销商</th>
<th style='width:230px;text-align: center;'>经销商等级 <br> 分红类型 / 分红比例</th>
<th style='width:8%;text-align: center;'>订单金额</th>
<th style='width:10%;text-align: center;'>提成结算金额</th>
<th style='width:10%;text-align: center;'>下级经销商提成</th>
<th style='width:8%;text-align: center;'>提成金额</th>
<th style='width:8%;text-align: center;'>提成状态</th>
<th style='width:8%;text-align: center;'>操作</th>
</tr>
</thead>
<tbody>
@foreach($list['data'] as $row)
<tr>
<td style='text-align: center;'>{{$row['id']}}</td>
<td style='text-align: center;'>{{$row['created_at']}}</td>
<td style='text-align: center;'>{{$row['member_id']}}</td>
<td style='text-align: center;'>
<a target="_blank"
href="{{yzWebUrl('order.detail.vue-index',['id' => $row['has_one_order']['id']])}}">
{{$row['order_sn']}}
</a>
</td>
<td style='text-align: center;'>
<a target="_blank"
href="{{yzWebUrl('member.member.detail',['id'=>$row['has_one_member']['uid']])}}">
<img src="{{tomedia($row['has_one_member']['avatar'])}}"
style="width: 30px; height: 30px;border:1px solid #ccc;padding:1px;">
</br>
{{$row['has_one_member']['nickname']}}
</a>
</td>
<td style='text-align: center;'>
{{$row['level_name']}}
<br>
{{ $row['type_name'] }} - 比例:{{$row['dividend_rate']}}%</td>
<td style='text-align: center;'>{{$row['order_amount']}}</td>
<td style='text-align: center;'>{{$row['amount']}}</td>
<td style='text-align: center;'>{{$row['lower_level_rate']}}%</td>
<td style='text-align: center;'>{{$row['dividend_amount']}}</td>
<td style='text-align: center;'>{{$row['status_name']}}</td>
<td style='text-align: center;'>
<a class="btn btn-primary" href="{{ yzWebUrl('plugin.team-dividend.admin.team-dividend.details',['id' => $row['id']]) }}">查看详情</a>
</td>
</tr>
@endforeach
</tbody>
</table>
{!! $pager !!}
</div>
</div>
<div style="width:100%;height:150px;"></div>
<script language='javascript'>
$(function () {
$('#export').click(function () {
$('#form1').attr('action', '{!! yzWebUrl('plugin.team-dividend.admin.team-dividend.export') !!}');
$('#form1').submit();
});
$('#search').click(function () {
$('#form1').attr('action', '{!! yzWebUrl('plugin.team-dividend.admin.team-dividend.get-list') !!}');
$('#form1').submit();
});
$('#scan_repetition').click(function () {
$('#form1').attr('action', '{!! yzWebUrl('plugin.team-dividend.admin.team-dividend.get-list',['scan_repetition'=>1]) !!}');
$('#form1').submit();
});
//禁用“确认重新提交表单”
window.history.replaceState(null, null, window.location.href);
});
</script>
@endsection