order-list.blade.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. @extends('views.layouts.master')
  2. <link rel="stylesheet" href="{{ csset('/themes/pro/modunawa/resources/css/orderlist.css') }}">
  3. @section('content')
  4. <!--=====================================
  5. BANNER PART START
  6. =======================================-->
  7. <section class="inner-section single-banner">
  8. <div class="container">
  9. <h2>주문내역</h2>
  10. <ol class="breadcrumb">
  11. <li class="breadcrumb-item"><a href="/">Home</a></li>
  12. <li class="breadcrumb-item active" aria-current="page">주문내역</li>
  13. </ol>
  14. </div>
  15. </section>
  16. <!--=====================================
  17. BANNER PART END
  18. =======================================-->
  19. <!--=====================================
  20. ORDERLIST PART START
  21. =======================================-->
  22. <section class="inner-section orderlist-part">
  23. <div class="container">
  24. <div class="row">
  25. <div class="col-lg-12">
  26. <form method="GET" class="orderlist-filter">
  27. <h5>총 주문수 <span>- ({{ $orderCharge['count'] }})</span></h5>
  28. <div class="filter-short">
  29. <label class="form-label">필터:</label>
  30. <select class="form-select" name="filter" onchange="$(this).closest('form').submit()">
  31. <option value="" selected>전체</option>
  32. @forelse ($codeTitle['status']['sorder'] ?? [] as $key => $status)
  33. @if ($status['Code'] >= '0' && $status['Code'] <= '4')
  34. <option value="{{ $status['Code'] }}" {{ request('filter') === $status['Code'] ? 'selected' : '' }}>
  35. {{ $status['Title'] }}
  36. </option>
  37. @endif
  38. @empty
  39. @endforelse
  40. </select>
  41. <input type="hidden" name="page" value="1">
  42. </div>
  43. </form>
  44. </div>
  45. </div>
  46. <div class="row">
  47. <div class="col-lg-12">
  48. @forelse ($hd['Page'] ?? [] as $index => $order)
  49. @php
  50. $sorderCharge['sub_total'] = collect($order['BdPage'])->sum('C8');
  51. $sorderCharge['total'] = $sorderCharge['sub_total'] + $order['D7'];
  52. $sorderCharge['count'] = collect($order['BdPage'])->count();
  53. @endphp
  54. <div class="orderlist">
  55. {{-- <div class="mt-2 d-flex align-items-center justify-content-end">--}}
  56. {{-- <button type="submit">--}}
  57. {{-- <u>배송조회</u>--}}
  58. {{-- </button>--}}
  59. {{-- </div>--}}
  60. <form class="orderlist-head tracking-form" action="//info.sweettracker.co.kr/tracking/4" method="post" target="DRMOKWindow">
  61. <h5>order#{{ $order['C1'] }}</h5>
  62. <input type="hidden" name="t_key">
  63. <input type="hidden" name="t_code">
  64. <input type="hidden" name="t_invoice">
  65. <button type="submit">
  66. <u class="value-color-green">
  67. <div class="value-color-green">{{ DataConverter::execute($order['C9'], "status('sorder')") }}</div>
  68. </u>
  69. </button>
  70. </form>
  71. <div class="orderlist-body">
  72. <div class="row">
  73. <div class="col-lg-12">
  74. <div class="order-track">
  75. <ul class="order-track-list">
  76. @forelse ($codeTitle['status']['sorder'] ?? [] as $key => $status)
  77. @if ($status['Code'] >= '1' && $status['Code'] <= '4')
  78. @if ($order['C9'] === 'F')
  79. <li class="order-track-item">
  80. <i class="icofont-close"></i>
  81. <span>{{ $status['Title'] }}</span>
  82. </li>
  83. @elseif ($status['Code'] <= $order['C9'])
  84. <li class="order-track-item active">
  85. <i class="icofont-check"></i>
  86. <span>{{ $status['Title'] }}</span>
  87. </li>
  88. @else
  89. <li class="order-track-item">
  90. <i class="icofont-close"></i>
  91. <span>{{ $status['Title'] }}</span>
  92. </li>
  93. @endif
  94. @endif
  95. @empty
  96. @endforelse
  97. {{-- <li class="order-track-item active">--}}
  98. {{-- <i class="icofont-check"></i>--}}
  99. {{-- <span>주문완료</span>--}}
  100. {{-- </li>--}}
  101. {{-- <li class="order-track-item">--}}
  102. {{-- <i class="icofont-close"></i>--}}
  103. {{-- <span>배송 준비</span>--}}
  104. {{-- </li>--}}
  105. {{-- <li class="order-track-item">--}}
  106. {{-- <i class="icofont-close"></i>--}}
  107. {{-- <span>배송 중</span>--}}
  108. {{-- </li>--}}
  109. {{-- <li class="order-track-item">--}}
  110. {{-- <i class="icofont-close"></i>--}}
  111. {{-- <span>배송 완료</span>--}}
  112. {{-- </li>--}}
  113. </ul>
  114. </div>
  115. </div>
  116. <div class="col-lg-5">
  117. <ul class="orderlist-details">
  118. <li>
  119. <h6>order no</h6>
  120. <p>{{ $order['C1'] }}</p>
  121. </li>
  122. <li>
  123. <h6>상품 갯수</h6>
  124. <p>{{ $sorderCharge['count'] }} 개</p>
  125. </li>
  126. <li>
  127. <h6>주문 시간</h6>
  128. <p>{{ DataConverter::createFromTimestamp($order['C3'], 'Y-m-d H:i:s') }}</p>
  129. </li>
  130. <li>
  131. <h6>배송 시간</h6>
  132. <p></p>
  133. </li>
  134. </ul>
  135. </div>
  136. <div class="col-lg-4">
  137. <ul class="orderlist-details">
  138. <li>
  139. <h6>합계</h6>
  140. <p>{{ number_format($sorderCharge['sub_total']) }} 원</p>
  141. </li>
  142. <li>
  143. <h6>할인</h6>
  144. <p>{{ number_format($order['D4']) }} 원</p>
  145. </li>
  146. <li>
  147. <h6>배송비</h6>
  148. <p>{{ number_format($order['D7']) }} 원</p>
  149. </li>
  150. <li>
  151. <h6>총 합계<small>(부가세 포함)</small></h6>
  152. <p>{{ number_format($sorderCharge['total']) }} 원</p>
  153. </li>
  154. </ul>
  155. </div>
  156. <div class="col-lg-3">
  157. <div class="orderlist-deliver">
  158. <h6>배송지</h6>
  159. <p>{{ $order['C6'] }}</p>
  160. </div>
  161. </div>
  162. <div class="col-lg-12">
  163. <div class="table-scroll">
  164. <table class="table-list">
  165. <thead>
  166. <tr>
  167. <th scope="col">품목코드</th>
  168. <th scope="col">상품</th>
  169. <th scope="col">상품명</th>
  170. <th scope="col">가격</th>
  171. <th scope="col">브랜드</th>
  172. <th scope="col">수량</th>
  173. </tr>
  174. </thead>
  175. <tbody>
  176. @forelse ($order['BdPage'] ?? [] as $index => $orderBd)
  177. <tr>
  178. <td class="table-serial"><h6>{{ $orderBd['C3'] }}</h6></td>
  179. <td class="table-image"><img src="{{ env('MEDIA_URL') . $orderBd['C2'] }}" alt="product"></td>
  180. <td class="table-name"><h6>{{ $orderBd['C4'] }}</h6></td>
  181. <td class="table-price"><h6>{{ number_format($orderBd['C6']) }}원</h6></td>
  182. <td class="table-brand"><h6>{{ $orderBd['C5'] }}</h6></td>
  183. <td class="table-quantity"><h6>{{ (int)$orderBd['C7'] }}</h6></td>
  184. </tr>
  185. @empty
  186. <tr>
  187. <td class="text-center" colspan="6">상품이 비어있습니다</td>
  188. </tr>
  189. @endforelse
  190. </tbody>
  191. </table>
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. @empty
  198. <div>주문내역이 비어있습니다</div>
  199. @endforelse
  200. </div>
  201. </div>
  202. <div class="row">
  203. <div class="col-lg-12">
  204. <div class="bottom-paginate d-flex justify-content-center">
  205. {{ $hd['Page']->appends(['limit' => request('limit'), 'sort' => request('sort')])->links() }}
  206. </div>
  207. </div>
  208. </div>
  209. </div>
  210. </section>
  211. <!--=====================================
  212. ORDERLIST PART END
  213. =======================================-->
  214. @endsection
  215. @push('js')
  216. <script>
  217. $('.tracking-form').on('submit', function(event) {
  218. event.preventDefault();
  219. open_window()
  220. this.submit()
  221. });
  222. function open_window() {
  223. DRMOK_window = window.open('', 'DRMOKWindow', 'width=425, height=550, resizable=0, scrollbars=no, status=0, titlebar=0, toolbar=0, left=435, top=250' );
  224. if (DRMOK_window == null) {
  225. alert("@lang('※ 윈도우 XP SP2 또는 인터넷 익스플로러 7 사용자일 경우에는 \n 화면 상단에 있는 팝업 차단 알림줄을 클릭하여 팝업을 허용해 주시기 바랍니다. \n\n※ MSN,야후,구글 팝업 차단 툴바가 설치된 경우 팝업허용을 해주시기 바랍니다.')");
  226. }
  227. }
  228. let DRMOK_window;
  229. </script>
  230. @endpush