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

175 lines
9.7 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.

<div class="pageHeader">
<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="{{ url()->current() }}" method="post">
<div class="searchBar">
<table class="searchContent">
<tr>
<td>
商家名称:
<input type="text" name="seller" value="{{ Request::input('seller') }}" placeholder=""/>
</td>
<td>
商品名称:
<input type="text" name="title" value="{{ Request::input('title') }}" placeholder=""/>
</td>
<td>
<select name="is_gift" class="combox">
<option value="">按赠品检索</option>
<option value="is_seller_gift" @if(Request::get('is_gift') == 'is_seller_gift') selected @endif>开通会员赠品</option>
<option value="is_mall_gift" @if(Request::get('is_gift') == 'is_mall_gift') selected @endif>满仓赠品</option>
</select>
</td>
<td>
<select name="position" class="combox">
<option value="">首页推荐位</option>
<option value="is_seller_package" @if(Request::get('position') == 'is_seller_package') selected @endif>首页99套餐</option>
<option value="is_recommend" @if(Request::get('position') == 'is_recommend') selected @endif>首页全积分购</option>
<option value="is_hot_sell" @if(Request::get('position') == 'is_hot_sell') selected @endif>首页全现金购</option>
<option value="is_hot_changed" @if(Request::get('position') == 'is_hot_changed') 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">
<div class="panelBar">
<ul class="toolBar">
<li><a class="add" href="{{ route('Admin.goods.create') }}" mask="true" target="navTab" rel="navTab_{{ time() }}" title="添加商品"><span>添加商品</span></a></li>
</ul>
</div>
<table class="table" width="100%" layoutH="112">
<thead>
<tr>
<th width="50" orderField="id" @if (Request::input('orderField') == 'id') class="{{ Request::input('orderDirection') }}" @endif>编号</th>
<th width="80">商品类型</th>
<th>商品名称</th>
<th width="100">商户名称</th>
<th width="100">规格</th>
<th width="100">售价</th>
<th width="100">成本价</th>
<th width="100">会员赠品</th>
<th width="100">满仓赠品</th>
<th width="100">平台推荐位</th>
<th width="60">排序</th>
<th width="60">状态</th>
<th width="140" orderField="created_at" @if (Request::input('orderField') == 'created_at') class="{{ Request::input('orderDirection') }}" @endif>创建时间</th>
<th width="200"></th>
</tr>
</thead>
<tbody>
@php
$goodids = array();
@endphp
@foreach ($goods as $good)
@foreach($good->params()->where('status',1)->get() as $params)
<tr>
@if(!in_array($good->id, $goodids))
<td>{{ $good->id }}</td>
<td>{{ $good->category->title }}</td>
<td>{{ $good->title }}</td>
<td>{{ $good->seller->name }}</td>
@else
<td></td>
<td></td>
<td></td>
<td></td>
@endif
<td>{{ $params->value }}
</td>
<td>
@if($params->score == 0){{ number_format($params->price,2) }}
@else
@if($params->price - $params->score > 0){{ number_format($params->price - $params->score,2) }} + @endif
{{ number_format($params->score,2) }}积分
@endif
</td>
<td>{{ number_format($params->cost,2) }}
</td>
@if(!in_array($good->id, $goodids))
<td>@if($good->is_seller_gift == 0 && $good->status == 1)<a title="设为开通会员商品" target="ajaxTodo" href="{{ route('Admin.goods.setgift', $good) }}">设为赠品</a>@endif
@if($good->is_seller_gift == 1 && $good->status == 1)<span style="color: red">赠品</span> &nbsp; <a title="取消赠品" target="ajaxTodo" href="{{ route('Admin.goods.cancelgift', $good) }}">取消</a>@endif
</td>
<td>@if($good->is_mall_gift == 0 && $good->status == 1)<a title="设为满仓商品" target="ajaxTodo" href="{{ route('Admin.goods.setFull', $good) }}">设为满仓赠</a>@endif
@if($good->is_mall_gift == 1 && $good->status == 1)<span style="color: red">满仓</span> &nbsp; <a title="取消满仓赠品" target="ajaxTodo" href="{{ route('Admin.goods.cancelFull', $good) }}">取消</a>@endif
</td>
<td>@if($good->is_recommend == 1) 1.全积分购 @endif
@if($good->is_hot_sell == 1) 2.全现金购 @endif
@if($good->is_hot_changed == 1) 3.积分现金购 @endif
@if($good->is_seller_package == 1) 4.首页99套餐 @endif
</td>
<td>{{ $good->sort }}</td>
<td>{!! $good->status_text !!}</td>
<td>{{ $good->created_at }}</td>
<td>
@if($good->status == 1)<a title="编辑商品" target="navTab" href="{{ route('Admin.goods.edit', $good) }}" rel="navTab_{{ time() }}">编辑</a>@endif
{{--@if($good->status == 1)<a title="编辑商品" target="navTab" href="{{ route('Admin.goods.magageedit', $good) }}" rel="navTab_{{ time() }}">编辑</a>@endif--}}
@if($good->canDel())<a title="请确认要删除商品吗?" target="ajaxDelete" href="{{ route('Admin.goods.delete', $good) }}">删除</a>@endif
@if($good->canCancel())<a title="请确认要下架商品吗?" target="ajaxDelete" href="{{ route('Admin.goods.destroy', $good) }}">下架</a>@endif
<a title="推荐到首页" target="dialog" href="{{ route('Admin.goods.setting', $good) }}" rel="dialog{{ time() }}" mask="true" width="800" height="460">推荐到首页</a>
@if($good->status == 0)<a title="上架商品" target="navTab" href="{{ route('Admin.goods.putOn', $good) }}" rel="navTab_{{ time() }}">上架</a>@endif
@if($good->is_seller_gift == 1 && $good->status == 1)<a title="取消赠品" target="ajaxTodo" href="{{ route('Admin.goods.cancelgift', $good) }}">取消赠品</a> @endif
</td>
@else
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
@endif
</tr>
@php
array_push($goodids,$good->id);
@endphp
@endforeach
@endforeach
<tr><td colspan="11" height="50px">
<p style="color: red;padding: 10px;">
1》删除商品- 未产生订单的商品可删除删除操作不可逆。2》下架商品- 已产生订单的商品不可删除,只能下架,下架后不会再产生新订单,下架操作可通过上架操作恢复商品。
</p>
</td>
</tr>
</tbody>
</table>
<div class="panelBar">
<form id="pagerForm" method="post" action="#rel#">
<input type="hidden" name="page" value="{{ $goods->currentPage() }}" />
<input type="hidden" name="numPerPage" value="{{ $goods->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 ($goods->perPage() == 30) selected @endif value="30">30</option>
<option @if ($goods->perPage() == 100) selected @endif value="100">100</option>
<option @if ($goods->perPage() == 200) selected @endif value="200">200</option>
</select>
<span>条,共 {{ $goods->total() }} </span>
</div>
<div class="pagination" targetType="navTab" totalCount="{{ $goods->total() }}" numPerPage="{{ $goods->perPage() }}" pageNumShown="10" currentPage="{{ $goods->currentPage() }}"></div>
</div>
</div>
<script type="text/javascript">
//点击导出
$('.export-data').click(function (event) {
location.href = "{{ route('Admin.export.goods') }}?" + $(this).parents('form').serialize();
});
</script>