4335ff601f2d06a10227e3da0b46a4df82718041.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <?php $__env->startSection('content'); ?>
  2. <div class="card">
  3. <form class="" action="" method="GET">
  4. <div class="card-header row gutters-5">
  5. <div class="col text-center text-md-left">
  6. <h5 class="mb-md-0 h6"><?php echo e(translate('Seller Orders')); ?></h5>
  7. </div>
  8. <div class="col-lg-2">
  9. <div class="form-group mb-0">
  10. <input type="text" class="aiz-date-range form-control" value="<?php echo e($date); ?>" name="date" placeholder="<?php echo e(translate('Filter by date')); ?>" data-format="DD-MM-Y" data-separator=" to " data-advanced-range="true" autocomplete="off">
  11. </div>
  12. </div>
  13. <div class="col-lg-2">
  14. <div class="form-group mb-0">
  15. <select class="form-control form-control-sm aiz-selectpicker mb-2 mb-md-0" id="seller_id" name="seller_id">
  16. <option value=""><?php echo e(translate('All Sellers')); ?></option>
  17. <?php $__currentLoopData = App\Models\User::where('user_type', '=', 'seller')->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $seller): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  18. <option value="<?php echo e($seller->id); ?>" <?php if($seller->id == $seller_id): ?> selected <?php endif; ?>>
  19. <?php echo e($seller->shop->name); ?> (<?php echo e($seller->name); ?>)
  20. </option>
  21. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  22. </select>
  23. </div>
  24. </div>
  25. <div class="col-lg-3">
  26. <div class="form-group mb-0">
  27. <input type="text" class="form-control" id="search" name="search"<?php if(isset($sort_search)): ?> value="<?php echo e($sort_search); ?>" <?php endif; ?> placeholder="<?php echo e(translate('Order Code')); ?> <?php echo e(translate('Or')); ?> <?php echo e(translate('Email')); ?>">
  28. </div>
  29. </div>
  30. <div class="col-auto">
  31. <div class="form-group mb-0">
  32. <button type="submit" class="btn btn-primary"><?php echo e(translate('Filter')); ?></button>
  33. </div>
  34. </div>
  35. </div>
  36. </form>
  37. <div class="card-body">
  38. <table class="table aiz-table mb-0">
  39. <thead>
  40. <tr>
  41. <th data-breakpoints="lg">#</th>
  42. <th width="20%"><?php echo e(translate('Order Code')); ?></th>
  43. <th width="20%"><?php echo e(translate('Shop')); ?></th>
  44. <th data-breakpoints="lg"><?php echo e(translate('Num. of Products')); ?></th>
  45. <th data-breakpoints="lg"><?php echo e(translate('Customer')); ?></th>
  46. <th><?php echo e(translate('Seller')); ?></th>
  47. <th data-breakpoints="lg"><?php echo e(translate('Amount')); ?></th>
  48. <th data-breakpoints="md"><?php echo e(translate('Profit')); ?></th>
  49. <th data-breakpoints="md"><?php echo e(translate('Pick Up Status')); ?></th>
  50. <th data-breakpoints="lg"><?php echo e(translate('Delivery Status')); ?></th>
  51. <th data-breakpoints="lg"><?php echo e(translate('Payment Method')); ?></th>
  52. <th data-breakpoints="lg"><?php echo e(translate('Payment Status')); ?></th>
  53. <?php if(addon_is_activated('refund_request')): ?>
  54. <th><?php echo e(translate('Refund')); ?></th>
  55. <?php endif; ?>
  56. <th class="text-right" width="15%"><?php echo e(translate('Options')); ?></th>
  57. </tr>
  58. </thead>
  59. <tbody>
  60. <?php $__currentLoopData = $orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  61. <tr>
  62. <td>
  63. <?php echo e(($key+1) + ($orders->currentPage() - 1)*$orders->perPage()); ?>
  64. </td>
  65. <td>
  66. <?php echo e($order->code); ?><?php if($order->viewed == 0): ?> <span class="badge badge-inline badge-info"><?php echo e(translate('New')); ?></span><?php endif; ?>
  67. </td>
  68. <td>
  69. <?php
  70. $shop = App\Models\User::where('id',$order->seller_id)->first();
  71. echo $shop['email'];
  72. ?>
  73. </td>
  74. <td>
  75. <?php echo e(count($order->orderDetails->where('seller_id', '!=', $admin_user_id))); ?>
  76. </td>
  77. <td>
  78. <?php if($order->user != null): ?>
  79. <?php echo e($order->user->name); ?>
  80. <?php else: ?>
  81. Guest (<?php echo e($order->guest_id); ?>)
  82. <?php endif; ?>
  83. </td>
  84. <td>
  85. <?php if($order->shop): ?>
  86. <?php echo e($order->shop->name); ?>
  87. <?php endif; ?>
  88. </td>
  89. <td>
  90. <?php echo e(single_price($order->grand_total)); ?>
  91. </td>
  92. <td>
  93. <?php if($order->product_storehouse_total > 0): ?>
  94. <?php echo e(single_price($order->grand_total - $order->product_storehouse_total)); ?>
  95. <?php else: ?>
  96. <?php echo e(translate('None')); ?>
  97. <?php endif; ?>
  98. </td>
  99. <td>
  100. <?php if($order->product_storehouse_status): ?>
  101. <span class="badge badge-inline badge-success"><?php echo e(translate('Picked Up')); ?></span>
  102. <?php else: ?>
  103. <span class="badge badge-inline badge-danger"><?php echo e(translate('Unpicked Up')); ?></span>
  104. <?php endif; ?>
  105. </td>
  106. <td>
  107. <?php
  108. $status = $order->delivery_status;
  109. ?>
  110. <?php echo e(translate(ucfirst(str_replace('_', ' ', $status)))); ?>
  111. </td>
  112. <td>
  113. <?php echo e(translate(ucfirst(str_replace('_', ' ', $order->payment_type)))); ?>
  114. </td>
  115. <td>
  116. <?php if($order->payment_status == 'paid'): ?>
  117. <span class="badge badge-inline badge-success"><?php echo e(translate('Paid')); ?></span>
  118. <?php else: ?>
  119. <span class="badge badge-inline badge-danger"><?php echo e(translate('Unpaid')); ?></span>
  120. <?php endif; ?>
  121. </td>
  122. <?php if(addon_is_activated('refund_request')): ?>
  123. <td>
  124. <?php if(count($order->refund_requests) > 0): ?>
  125. <?php echo e(count($order->refund_requests)); ?> <?php echo e(translate('Refund')); ?>
  126. <?php else: ?>
  127. <?php echo e(translate('No Refund')); ?>
  128. <?php endif; ?>
  129. </td>
  130. <?php endif; ?>
  131. <td class="text-right">
  132. <a class="btn btn-soft-primary btn-icon btn-circle btn-sm" href="<?php echo e(route('all_orders.show', encrypt($order->id))); ?>" title="<?php echo e(translate('View')); ?>">
  133. <i class="las la-edit"></i>
  134. </a>
  135. <a class="btn btn-soft-primary btn-icon btn-circle btn-sm" href="<?php echo e(route('seller_orders.show', encrypt($order->id))); ?>" title="<?php echo e(translate('View')); ?>">
  136. <i class="las la-eye"></i>
  137. </a>
  138. <a class="btn btn-soft-info btn-icon btn-circle btn-sm" href="<?php echo e(route('invoice.download', $order->id)); ?>" title="<?php echo e(translate('Download Invoice')); ?>">
  139. <i class="las la-download"></i>
  140. </a>
  141. <a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="<?php echo e(route('orders.destroy', $order->id)); ?>" title="<?php echo e(translate('Delete')); ?>">
  142. <i class="las la-trash"></i>
  143. </a>
  144. </td>
  145. </tr>
  146. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  147. </tbody>
  148. </table>
  149. <div class="aiz-pagination">
  150. <?php echo e($orders->appends(request()->input())->links()); ?>
  151. </div>
  152. </div>
  153. </div>
  154. <?php $__env->stopSection(); ?>
  155. <?php $__env->startSection('modal'); ?>
  156. <?php echo $__env->make('modals.delete_modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
  157. <?php $__env->stopSection(); ?>
  158. <?php $__env->startSection('script'); ?>
  159. <script type="text/javascript">
  160. function sort_orders(el){
  161. $('#sort_orders').submit();
  162. }
  163. </script>
  164. <?php $__env->stopSection(); ?>
  165. <?php echo $__env->make('backend.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Users/shaoguo/Desktop/公司资料/小梦/商城/ebayShop/resources/views/backend/sales/seller_orders/index.blade.php ENDPATH**/ ?>