151 lines
5.3 KiB
PHP
151 lines
5.3 KiB
PHP
@extends('layouts.app')
|
|
@section('footer')
|
|
@endsection
|
|
@section('content')
|
|
<section class="padding_btm" >
|
|
<!--待付款-->
|
|
<div class="state1">
|
|
<div class="state-i"><i class="icon-credit"></i></div>
|
|
<h5>{{ $order->state_text }}</h5>
|
|
<h6> </h6>
|
|
</div>
|
|
<!--end 待付款-->
|
|
|
|
<!--
|
|
<div class="state1">
|
|
<div class="state-i"><i class="icon-cube-alt"></i></div>
|
|
<h5>待发货</h5>
|
|
<h6>等待商家发货</h6>
|
|
</div>
|
|
-->
|
|
|
|
<!--
|
|
<div class="state1">
|
|
<div class="state-i"><i class="icon-stack"></i></div>
|
|
<h5>待使用</h5>
|
|
<h6>等待买家使用</h6>
|
|
</div>
|
|
-->
|
|
@if($order->express)
|
|
<!-- 收货信息 Start -->
|
|
<div class="delivery" style="padding-right: .75rem;">
|
|
<div class="delivery_top">
|
|
<div class="delivery_name text-nowrap">
|
|
<span>收货人:</span>{{ $order->express->name }}
|
|
</div>
|
|
<div class="delivery_phone utext-nowrap">
|
|
{{ $order->express->mobile }}
|
|
</div>
|
|
</div>
|
|
<div class="delivery_btm">
|
|
<span class="delivery_address">收货地址:</span>{{ $order->express->address }}
|
|
</div>
|
|
</div>
|
|
<!-- 收货信息 End -->
|
|
@endif
|
|
|
|
|
|
<!-- 课程信息 Start -->
|
|
<ul class="enroll_pay_lesson" style="margin-top: .75rem;border-top: 1px solid #eee;">
|
|
@foreach($order->details as $detail)
|
|
<li data-href="">
|
|
<div class="shop_lesson_img img-bg">
|
|
<span style="background-image:url({{ $detail->item->getStorage()->path }})"></span>
|
|
</div>
|
|
<div class="shop_lesson_list">
|
|
<div class="shop_lesson_name text-nowrap">{{ $detail->item->getTitle() }}</div>
|
|
<div class="shop_lesson_price"><span class="price_span">¥</span>{{ $detail->item->getPrice() }}</div>
|
|
</div>
|
|
</li>
|
|
@endforeach
|
|
</ul>
|
|
<!-- 课程信息 End -->
|
|
<!-- 订单创建时间 Start -->
|
|
<ul class="user_container" style="margin-top: .75rem;border-top: 1px solid #eee;">
|
|
<li>
|
|
<div class="user_name">订单类型:</div>
|
|
<div class="user_detail">{{ $order->type_text }}</div>
|
|
</li>
|
|
<li>
|
|
<div class="user_name">订单编号:</div>
|
|
<div class="user_detail">{{ $order->orderid }}</div>
|
|
</li>
|
|
<li>
|
|
<div class="user_name">创建时间:</div>
|
|
<div class="user_detail">{{ $order->created_at }}</div>
|
|
</li>
|
|
|
|
</ul>
|
|
<!-- 订单创建时间 End -->
|
|
@if($order->item_type =='LESSON')
|
|
<!-- 报名信息 Start -->
|
|
<ul class="user_container" style="margin-top: .75rem;border-top: 1px solid #eee;">
|
|
<li>
|
|
<div class="user_name">宝宝姓名:</div>
|
|
<div class="user_detail">{{ $order->lessonlogs()->first()->name }}</div>
|
|
</li>
|
|
<li>
|
|
<div class="user_name">宝宝年龄:</div>
|
|
<div class="user_detail">{{ $order->lessonlogs()->first()->age }}岁</div>
|
|
</li>
|
|
<li>
|
|
<div class="user_name">联系电话:</div>
|
|
<div class="user_detail">{{ $order->lessonlogs()->first()->mobile }}</div>
|
|
</li>
|
|
</ul>
|
|
<!-- 报名信息 End -->
|
|
@endif
|
|
|
|
@if(!$order->item_type=='GIFT')
|
|
<!-- 金额 Start -->
|
|
<div class="enroll_pay_price">总计<div class="enroll_pay_num"><span class="price_span">¥{{ number_format($order->amount,2) }}</span></div></div>
|
|
<div class="buy_hurry" style="margin-bottom: .75rem">
|
|
<div class="buy_hurry_left">运费</div>
|
|
<div class="buy_hurry_right"><span class="price_span">¥</span>{{ number_format($order->freight,2) }}</div>
|
|
</div>
|
|
<!-- 金额 End -->
|
|
@endif
|
|
|
|
</div>
|
|
</section>
|
|
<div class="button_btm_white">
|
|
@if ($order->canPay())
|
|
|
|
<button type="button" @if($order->item_type == 'LESSON') data-href="{{ route('pay.lesson', $order) }}" @else data-href="{{ route('pay.order', $order->orderid) }}" @endif class="btn btn_btm_small red_bg">立即付款</button>
|
|
|
|
@endif
|
|
|
|
@if ($order->canAddress())
|
|
<button type="button" data-href="{{ route('gifts.address',['order'=>$order,'callback'=>route('gifts.unpay')]) }}" class="btn order-list-btn">设收货地址</button>
|
|
@endif
|
|
|
|
@if ($order->canCancel())
|
|
<button type="button" class="btn btn_btm_small2" onclick="orderDelete('{{ route('orders.delete', $order->orderid) }}')">取消订单</button>
|
|
@endif
|
|
</div>
|
|
@endsection
|
|
|
|
@section('script')
|
|
<script type="text/javascript">
|
|
function orderDelete (url) {
|
|
layer.open({
|
|
content: '确定要取消订单吗?'
|
|
,btn: ['确认', '不取消']
|
|
,skin: 'footer'
|
|
,yes: function(index){
|
|
$.post(url + '?_token={{ csrf_token() }}', function(data){
|
|
if (data.status == 'SUCCESS') {
|
|
updateAlert(data.message, 'success');
|
|
setTimeout(function(){
|
|
location.reload();
|
|
},500);
|
|
}else{
|
|
updateAlert(data.message, 'error');
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
@endsection
|