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

104 lines
5.8 KiB
PHP

<div class="pageHeader">
<form id="searchForm_{{ uniqid() }}" rel="pagerForm" onsubmit="return navTabSearch(this);" action="{{ url()->current() }}" method="post">
<div class="searchBar">
<table class="searchContent">
<tr>
<td>
订单编号:
<input type="hidden" name="windup_report_id" value="{{ Request::get('windup_report_id') }}"/>
<input type="text" name="orderid" value="{{ Request::input('orderid') }}"/>
</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>
<tr>
</tr>
</table>
</div>
</form>
</div>
<div class="pageContent">
<table class="table" width="100%" layoutH="85">
<thead>
<tr>
<th width="180">订单编号</th>
<th width="80">商户名称</th>
<th width="80">手机号</th>
<th width="80">用户名</th>
<th width="200">商品信息</th>
<th width="60">成本金额</th>
<th width="60">结算运费</th>
<th width="100">商家结算</th>
<th width="100">状态</th>
<th width="120" orderField="created_at" @if (Request::input('orderField') == 'created_at') class="{{ Request::input('orderDirection') }}" @endif>创建时间</th>
<th width="120" orderField="paid_at" @if (Request::input('orderField') == 'paid_at') class="{{ Request::input('orderDirection') }}" @endif>支付时间</th>
</tr>
</thead>
<tbody>
@foreach ($orders as $order)
<tr target="sid" rel="{{ $order->id }}">
<td>@switch($order->item_type)
@case('GOODS')
<span style="font-size: .6rem;padding: 0 .2rem;border:.05rem solid #39a6ad;color: #39a6ad;line-height: .9rem;margin-top: .05rem;border-radius: .2rem;margin-right: .05rem">商品</span>
@break
@case('ACTIVITY_GIFT')
<span style="font-size: .6rem;padding: 0 .2rem;border:.05rem solid #ec6d64;color: #ec6d64;line-height: .9rem;margin-top: .05rem;border-radius: .2rem;margin-right: .05rem">活动</span>
@break
@case('VIP_GIFT')
<span style="font-size: .6rem;padding: 0 .2rem;border:.05rem solid #ec6d64;color: #ec6d64;line-height: .9rem;margin-top: .05rem;border-radius: .2rem;margin-right: .05rem">会员</span>
@break
@case('FULL_GIFT')
<span style="font-size: .6rem;padding: 0 .2rem;border:.05rem solid #ec6d64;color: #ec6d64;line-height: .9rem;margin-top: .05rem;border-radius: .2rem;margin-right: .05rem">满仓</span>
@break
@endswitch{{ $order->orderid }}</td>
<td>{{ $order->seller->name }}</td>
<td>{{ $order->user->mobile }}</td>
<td>{{ $order->user->info->nickname }}</td>
<td>@foreach ($order->details as $detail)
@if($detail->item){{ $detail->item->getTitle() ?? '未知'}} @endif <span style="color: red;font-size: 12px"><b>{{ number_format($detail->seller_price,2) }}</b> * {{ $detail->number }}</span>
@endforeach
</td>
<td>{{ number_format($order->seller_amount,2) }}</td>
<td>{{ number_format($order->seller_freight, 2)}}</td>
<td>{{ number_format($order->seller_amount + $order->seller_freight, 2) }}</td>
<td>{{ $order->status_text }}</td>
<td>{{ $order->created_at }}</td>
<td>{{ $order->paid_at }}</td>
</tr>
@endforeach
<tr>
<td colspan="8" style="text-align: right">订单数量:{{ $orders->count() }} &nbsp;&nbsp;&nbsp;&nbsp;合计金额:{{ number_format($orders->sum('seller_freight') + $orders->sum('seller_amount'),2) }}</td>
<td colspan="3" style="text-align: right"></td>
</tr>
</tbody>
</table>
<div class="panelBar">
<form id="pagerForm" method="post" action="#rel#">
<input type="hidden" name="page" order="{{ $orders->currentPage() }}" />
<input type="hidden" name="numPerPage" order="{{ $orders->perPage() }}" />
<input type="hidden" name="orderField" order="{{ Request::input('orderField') }}" />
<input type="hidden" name="orderDirection" order="{{ Request::input('orderDirection') }}" />
</form>
<div class="pages">
<span>显示</span>
<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
<option @if ($orders->perPage() == 30) selected @endif value="30">30</option>
<option @if ($orders->perPage() == 100) selected @endif value="100">100</option>
<option @if ($orders->perPage() == 200) selected @endif value="200">200</option>
</select>
<span>条,共 {{ $orders->total() }} </span>
</div>
<div class="pagination" targetType="navTab" totalCount="{{ $orders->total() }}" numPerPage="{{ $orders->perPage() }}" pageNumShown="10" currentPage="{{ $orders->currentPage() }}"></div>
</div>
</div>
<script type="text/javascript">
//点击导出
$('.export-data').click(function (event) {
location.href = "{{ route('Admin.export.windup_orders') }}?" + $(this).parents('form').serialize();
});
</script>