205fd7cca0b451ab3d519b39c42d35612d606314.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <?php $__env->startSection('panel_content'); ?>
  2. <section class="py-5">
  3. <div class="container" style="max-width: 100%;">
  4. <div class="d-flex align-items-start">
  5. <div class="aiz-user-panel">
  6. <div class="row gutters-10">
  7. <div class="col-md-4 mx-auto mb-3" >
  8. <div class="bg-grad-1 text-white rounded-lg overflow-hidden">
  9. <span class="size-30px rounded-circle mx-auto bg-soft-primary d-flex align-items-center justify-content-center mt-3">
  10. <i class="las la-dollar-sign la-2x text-white"></i>
  11. </span>
  12. <div class="px-3 pt-3 pb-3">
  13. <div class="h4 fw-700 text-center"><?php echo e(single_price(Auth::user()->balance)); ?></div>
  14. <div class="opacity-50 text-center"><?php echo e(translate('Affiliate Balance')); ?></div>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="row">
  20. <?php
  21. $referral_code_url = $url;
  22. ?>
  23. <div class="col">
  24. <div class="card">
  25. <div class="form-box-content p-3">
  26. <div class="form-group">
  27. <textarea id="referral_code_url" class="form-control" readonly type="text" ><?php echo e($referral_code_url); ?></textarea>
  28. </div>
  29. <button type=button id="ref-cpurl-btn" class="btn btn-primary float-right" data-attrcpy="<?php echo e(translate('Copied')); ?>" onclick="copyToClipboard('url')" ><?php echo e(translate('Copy Url')); ?></button>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. <br>
  35. <div class="card">
  36. <form class="" id="sort_blogs" action="" method="GET">
  37. <div class="card-header row">
  38. <div class="col text-center text-md-left">
  39. <h5 class="mb-md-0 h6"><?php echo e(translate('Affiliate Stats')); ?></h5>
  40. </div>
  41. <div class="col-md-5 col-xl-4">
  42. <div class="input-group mb-0">
  43. <select class="form-control aiz-selectpicker" name="type" data-live-search="true">
  44. <option value="">Choose</option>
  45. <option value="Today" <?php if($type == 'Today'): ?> selected <?php endif; ?>>Today</option>
  46. <option value="7" <?php if($type == '7'): ?> selected <?php endif; ?>>Last 7 Days</option>
  47. <option value="30" <?php if($type == '30'): ?> selected <?php endif; ?>>Last 30 Days</option>
  48. </select>
  49. <button class="btn btn-primary input-group-append" type="submit"><?php echo e(translate('Filter')); ?></button>
  50. </div>
  51. </div>
  52. </div>
  53. </form>
  54. <div class="card-body">
  55. <div class="row gutters-10">
  56. <div class="col-md-3 mx-auto mb-3">
  57. <a href="#">
  58. <div class="p-3 rounded mb-3 c-pointer text-center bg-white shadow-sm hov-shadow-lg has-transition">
  59. <span class="size-60px mx-auto d-flex align-items-center justify-content-center mb-3">
  60. <span class="la-3x text-white" style="color: #007bff !important;">
  61. <?php echo e($statistics['total_seller']); ?>
  62. </span>
  63. </span>
  64. <div class="fs-18 text-primary"><?php echo e(translate('total seller')); ?></div>
  65. </div>
  66. </a>
  67. </div>
  68. <div class="col-md-3 mx-auto mb-3" >
  69. <a href="#">
  70. <div class="p-3 rounded mb-3 c-pointer text-center bg-white shadow-sm hov-shadow-lg has-transition">
  71. <span class="size-60px mx-auto d-flex align-items-center justify-content-center mb-3">
  72. <span class="la-3x text-white" style="color: #007bff !important;">
  73. <?php echo e($statistics['total_orders']); ?>
  74. </span>
  75. </span>
  76. <div class="fs-18 text-primary"><?php echo e(translate('total orders')); ?></div>
  77. </div>
  78. </a>
  79. </div>
  80. <div class="col-md-3 mx-auto mb-3" >
  81. <a href="#">
  82. <div class="p-3 rounded mb-3 c-pointer text-center bg-white shadow-sm hov-shadow-lg has-transition">
  83. <span class="size-60px mx-auto d-flex align-items-center justify-content-center mb-3">
  84. <span class="la-3x text-white" style="color: #007bff !important;">
  85. <?php echo e(single_price($statistics['total_amount'])); ?>
  86. </span>
  87. </span>
  88. <div class="fs-18 text-primary"><?php echo e(translate('total amount')); ?></div>
  89. </div>
  90. </a>
  91. </div>
  92. <div class="col-md-3 mx-auto mb-3" >
  93. <a href="#">
  94. <div class="p-3 rounded mb-3 c-pointer text-center bg-white shadow-sm hov-shadow-lg has-transition">
  95. <span class="size-60px mx-auto d-flex align-items-center justify-content-center mb-3">
  96. <span class="la-3x text-white" style="color: #007bff !important;">
  97. <?php echo e(single_price($statistics['total_brokerage'])); ?>
  98. </span>
  99. </span>
  100. <div class="fs-18 text-primary"><?php echo e(translate('total brokerage')); ?></div>
  101. </div>
  102. </a>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. <div class="card">
  108. <div class="card-body">
  109. <table class="table aiz-table mb-0">
  110. <thead>
  111. <tr>
  112. <th>#</th>
  113. <th><?php echo e(translate('shop name')); ?></th>
  114. <th data-breakpoints="lg"><?php echo e(translate('Order number')); ?></th>
  115. <th data-breakpoints="lg"><?php echo e(translate('brokerage amount')); ?></th>
  116. <th data-breakpoints="lg"><?php echo e(translate('level')); ?></th>
  117. </tr>
  118. </thead>
  119. <tbody>
  120. <?php $__currentLoopData = $shops; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $shop): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  121. <tr>
  122. <td><?php echo e(($key+1)); ?></td>
  123. <td>
  124. <?php echo e($shop['shop_name']); ?>
  125. </td>
  126. <td><?php echo e($shop['order_number']); ?></td>
  127. <td>
  128. <?php echo e(single_price($shop['brokerage'])); ?>
  129. </td>
  130. <td><?php echo e($shop['level']); ?></td>
  131. </tr>
  132. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  133. </tbody>
  134. </table>
  135. </div>
  136. </div>
  137. <div class="card">
  138. <div class="card-header">
  139. <h5 class="mb-0 h6"><?php echo e(translate('Affiliate Earning History')); ?></h5>
  140. </div>
  141. <div class="card-body">
  142. <table class="table aiz-table mb-0">
  143. <thead>
  144. <tr>
  145. <th>#</th>
  146. <th><?php echo e(translate('Referral User')); ?></th>
  147. <th><?php echo e(translate('Amount')); ?></th>
  148. <th data-breakpoints="lg"><?php echo e(translate('Order Id')); ?></th>
  149. <th data-breakpoints="lg"><?php echo e(translate('Referral Type')); ?></th>
  150. <th data-breakpoints="lg"><?php echo e(translate('Product')); ?></th>
  151. <th data-breakpoints="lg"><?php echo e(translate('Date')); ?></th>
  152. </thead>
  153. <tbody>
  154. <?php $__currentLoopData = $affiliate_logs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $affiliate_log): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  155. <tr>
  156. <td><?php echo e(($key+1) + ($affiliate_logs->currentPage() - 1)*$affiliate_logs->perPage()); ?></td>
  157. <td>
  158. <?php if($affiliate_log->user_id !== null): ?>
  159. <?php echo e($affiliate_log->user->name); ?>
  160. <?php else: ?>
  161. <?php echo e(translate('Guest').' ('. $affiliate_log->guest_id.')'); ?>
  162. <?php endif; ?>
  163. </td>
  164. <td><?php echo e(single_price($affiliate_log->amount)); ?></td>
  165. <td>
  166. <?php if($affiliate_log->order_id != null): ?>
  167. <?php echo e($affiliate_log->order->code); ?>
  168. <?php else: ?>
  169. <?php echo e($affiliate_log->order_detail->order->code); ?>
  170. <?php endif; ?>
  171. </td>
  172. <td> <?php echo e(ucwords(str_replace('_',' ', $affiliate_log->affiliate_type))); ?></td>
  173. <td>
  174. <?php if($affiliate_log->order_detail_id != null): ?>
  175. <?php echo e($affiliate_log->order_detail->product->name); ?>
  176. <?php endif; ?>
  177. <?php $__currentLoopData = $affiliate_log->order->details; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $orderDetail): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  178. <div>
  179. <?php echo e($orderDetail->product->name); ?>
  180. </div>
  181. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  182. </td>
  183. <td><?php echo e($affiliate_log->created_at->format('d, F Y')); ?> </td>
  184. </tr>
  185. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  186. </tbody>
  187. </table>
  188. <div class="aiz-pagination">
  189. <?php echo e($affiliate_logs->links()); ?>
  190. </div>
  191. </div>
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. </section>
  197. <?php $__env->stopSection(); ?>
  198. <?php $__env->startSection('modal'); ?>
  199. <div class="modal fade" id="affiliate_withdraw_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  200. <div class="modal-dialog modal-dialog-centered" role="document">
  201. <div class="modal-content">
  202. <div class="modal-header">
  203. <h5 class="modal-title" id="exampleModalLabel"><?php echo e(translate('Affiliate Withdraw Request')); ?></h5>
  204. <button type="button" class="close" data-dismiss="modal" aria-label="Close"></button>
  205. </div>
  206. <form class="" action="<?php echo e(route('affiliate.withdraw_request.store')); ?>" method="post">
  207. <?php echo csrf_field(); ?>
  208. <div class="modal-body gry-bg px-3 pt-3">
  209. <div class="row">
  210. <div class="col-md-3">
  211. <label><?php echo e(translate('Amount')); ?> <span class="text-danger">*</span></label>
  212. </div>
  213. </div>
  214. <div class="form-group text-right">
  215. <button type="submit" class="btn btn-sm btn-primary transition-3d-hover mr-1"><?php echo e(translate('Confirm')); ?></button>
  216. </div>
  217. </div>
  218. </form>
  219. </div>
  220. </div>
  221. </div>
  222. <?php $__env->stopSection(); ?>
  223. <?php $__env->startSection('script'); ?>
  224. <script>
  225. function copyToClipboard(btn){
  226. // var el_code = document.getElementById('referral_code');
  227. var el_url = document.getElementById('referral_code_url');
  228. // var c_b = document.getElementById('ref-cp-btn');
  229. var c_u_b = document.getElementById('ref-cpurl-btn');
  230. // if(btn == 'code'){
  231. // if(el_code != null && c_b != null){
  232. // el_code.select();
  233. // document.execCommand('copy');
  234. // c_b .innerHTML = c_b.dataset.attrcpy;
  235. // }
  236. // }
  237. if(btn == 'url'){
  238. if(el_url != null && c_u_b != null){
  239. el_url.select();
  240. document.execCommand('copy');
  241. c_u_b .innerHTML = c_u_b.dataset.attrcpy;
  242. }
  243. }
  244. }
  245. function show_affiliate_withdraw_modal(){
  246. $('#affiliate_withdraw_modal').modal('show');
  247. }
  248. </script>
  249. <?php $__env->stopSection(); ?>
  250. <?php echo $__env->make('seller.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Users/shaoguo/Desktop/公司资料/小梦/商城/ebayShop/resources/views/affiliate/seller/index.blade.php ENDPATH**/ ?>