4f00f25012d4daec27ef1059754405afe861c3b7.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <?php $__env->startSection('panel_content'); ?>
  2. <div class="aiz-titlebar mt-2 mb-4">
  3. <div class="row align-items-center">
  4. <div class="col-md-6">
  5. <h1 class="h3"><?php echo e(translate('All Sellers')); ?></h1>
  6. </div>
  7. </div>
  8. <div class="col text-right">
  9. <a href="<?php echo e(route('shops.create')); ?>" class="btn btn-circle btn-info">
  10. <span><?php echo e(translate('Add Virtual Seller')); ?></span>
  11. </a>
  12. </div>
  13. </div>
  14. <div class="card">
  15. <div class="card-header row gutters-5">
  16. <div class="col">
  17. <h5 class="mb-md-0 h6"><?php echo e(translate('Sellers')); ?></h5>
  18. </div>
  19. <div class="col-md-4">
  20. <form class="" id="sort_brands" action="" method="GET">
  21. <div class="input-group input-group-sm">
  22. <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('Type name or email & Enter')); ?>">
  23. </div>
  24. </form>
  25. </div>
  26. </div>
  27. <div class="card-body">
  28. <table class="table aiz-table mb-0">
  29. <thead>
  30. <tr>
  31. <th><?php echo e(translate('Name')); ?></th>
  32. <th data-breakpoints="lg"><?php echo e(translate('Phone')); ?></th>
  33. <th data-breakpoints="lg"><?php echo e(translate('Email Address')); ?></th>
  34. <th data-breakpoints="lg"><?php echo e(translate('Verification Info')); ?></th>
  35. <th data-breakpoints="lg"><?php echo e(translate('Approval')); ?></th>
  36. <th data-breakpoints="lg"><?php echo e(translate('Num. of Products')); ?></th>
  37. <th data-breakpoints="lg"><?php echo e(translate('Pending Balance')); ?></th>
  38. <th data-breakpoints="lg"><?php echo e(translate('Wallet Money')); ?></th>
  39. <th data-breakpoints="lg"><?php echo e(translate('Views')); ?></th>
  40. <th width="10%"><?php echo e(translate('Options')); ?></th>
  41. </tr>
  42. </thead>
  43. <tbody>
  44. <?php $__currentLoopData = $shops; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $shop): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  45. <tr>
  46. <td><?php if($shop->user->banned == 1): ?> <i class="fa fa-ban text-danger" aria-hidden="true"></i> <?php endif; ?> <?php echo e($shop->name); ?><?php if($shop->user->is_virtual == 1): ?> (<font color="red"><?php echo e(translate('Virtual')); ?></font>) <?php endif; ?></td>
  47. <td><?php echo e($shop->user->phone); ?></td>
  48. <td><?php echo e($shop->user->email); ?></td>
  49. <td>
  50. <?php if($shop->verification_info != null): ?>
  51. <a href="<?php echo e(route('sellers.show_verification_request', $shop->id)); ?>">
  52. <span class="badge badge-inline badge-info"><?php echo e(translate('Show')); ?></span>
  53. </a>
  54. <?php endif; ?>
  55. </td>
  56. <td>
  57. <label class="aiz-switch aiz-switch-success mb-0">
  58. <?php if(get_setting('salesman_reviews_switch') == 1): ?>
  59. <input onchange="update_approved(this)" value="<?php echo e($shop->id); ?>" type="checkbox" <?php if($shop->verification_status == 1) echo "checked";?> >
  60. <?php else: ?>
  61. <input disabled readonly value="<?php echo e($shop->id); ?>" type="checkbox" <?php if($shop->verification_status == 1) echo "checked";?> >
  62. <?php endif; ?>
  63. <span class="slider round"></span>
  64. </label>
  65. </td>
  66. <td><?php echo e($shop->user->products->count()); ?></td>
  67. <td>
  68. <?php if($shop->admin_to_pay >= 0): ?>
  69. <?php echo e(single_price($shop->admin_to_pay)); ?>
  70. <?php else: ?>
  71. <?php echo e(single_price(abs($shop->admin_to_pay))); ?> (<?php echo e(translate('Due to Admin')); ?>)
  72. <?php endif; ?>
  73. </td>
  74. <td >
  75. <?php echo e(single_price($shop->user->balance)); ?>
  76. </td>
  77. <td >
  78. <?php echo e(translate('base num')); ?>:<?php echo e($shop->view_base_num); ?>
  79. <br>
  80. <?php echo e(translate('inc num')); ?>:<?php echo e($shop->view_inc_num); ?>
  81. </td>
  82. <td>
  83. <div class="dropdown">
  84. <button type="button" class="btn btn-sm btn-circle btn-soft-primary btn-icon dropdown-toggle no-arrow" data-toggle="dropdown" href="javascript:void(0);" role="button" aria-haspopup="false" aria-expanded="false">
  85. <i class="las la-ellipsis-v"></i>
  86. </button>
  87. <div class="dropdown-menu dropdown-menu-right dropdown-menu-xs">
  88. <a href="#" onclick="show_seller_profile('<?php echo e($shop->id); ?>');" class="dropdown-item">
  89. <?php echo e(translate('Profile')); ?>
  90. </a>
  91. <a href="<?php echo e(route('sellers.login', encrypt($shop->id))); ?>" class="dropdown-item">
  92. <?php echo e(translate('Log in as this Seller')); ?>
  93. </a>
  94. <span onclick="show_chat_modal(<?php echo e($shop->user->id); ?>)" class="dropdown-item" style="cursor:pointer;">
  95. <?php echo e(translate('Message Seller')); ?>
  96. </span>
  97. <span onclick="show_view(<?php echo e($shop->id); ?>,<?php echo e($shop->view_inc_num); ?>,<?php echo e($shop->view_base_num); ?>)" class="dropdown-item" style="cursor:pointer;">
  98. <?php echo e(translate('Views')); ?>
  99. </span>
  100. </div>
  101. </div>
  102. </td>
  103. </tr>
  104. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  105. </tbody>
  106. </table>
  107. <div class="aiz-pagination">
  108. <?php echo e($shops->appends(request()->input())->links()); ?>
  109. </div>
  110. </div>
  111. </div>
  112. <?php $__env->stopSection(); ?>
  113. <?php $__env->startSection('modal'); ?>
  114. <!-- Seller Profile Modal -->
  115. <div class="modal fade" id="profile_modal">
  116. <div class="modal-dialog">
  117. <div class="modal-content" id="profile-modal-content">
  118. </div>
  119. </div>
  120. </div>
  121. <div class="modal fade" id="chat_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  122. <div class="modal-dialog modal-dialog-centered modal-dialog-zoom product-modal" id="modal-size" role="document">
  123. <div class="modal-content position-relative">
  124. <div class="modal-header">
  125. <h5 class="modal-title fw-600 h5"><?php echo e(translate('Any query about this seller')); ?></h5>
  126. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  127. <span aria-hidden="true">&times;</span>
  128. </button>
  129. </div>
  130. <form action="<?php echo e(route('conversations.salesman_store')); ?>" method="POST" enctype="multipart/form-data">
  131. <?php echo csrf_field(); ?>
  132. <input type="hidden" name="receiver_id" id="receiver_id" value="">
  133. <div class="modal-body gry-bg px-3 pt-3">
  134. <div class="form-group">
  135. <textarea class="form-control" rows="8" name="title" required
  136. placeholder="<?php echo e(translate('Title')); ?>"></textarea>
  137. </div>
  138. </div>
  139. <div class="modal-footer">
  140. <button type="button" class="btn btn-outline-primary fw-600"
  141. data-dismiss="modal"><?php echo e(translate('Cancel')); ?></button>
  142. <button type="submit" class="btn btn-primary fw-600"><?php echo e(translate('Send')); ?></button>
  143. </div>
  144. </form>
  145. </div>
  146. </div>
  147. </div>
  148. <?php $__env->stopSection(); ?>
  149. <?php $__env->startSection('script'); ?>
  150. <script src="https://cdn.bootcdn.net/ajax/libs/layer/3.5.1/layer.min.js"></script>
  151. <script type="text/javascript">
  152. function show_view(shop_id,view_inc_num,view_base_num) {
  153. var content = ' <div class="row" style="width: 420px; margin-left:7px; margin-top:10px;">'
  154. +'<div class="col-sm-12">'
  155. +'<div class="input-group">'
  156. +'<span class="input-group-addon"> 基础访问量:</span>'
  157. +'<input id="base_num" type="text" value="'+view_base_num+'" class="form-control" placeholder="基础访问量">'
  158. +'</div>'
  159. +'</div>'
  160. +'<div class="col-sm-12" style="margin-top:3px;">'
  161. +'<div class="input-group">'
  162. +'<span class="input-group-addon"> 每日递增量:</span>'
  163. +'<input id="inc_num" type="text" value="'+view_inc_num+'" class="form-control" placeholder="每日递增">'
  164. +'</div>'
  165. +'</div>'
  166. +'</div>';
  167. layer.open({
  168. type: 1,
  169. title:'访问量',
  170. skin:'layui-layer-rim',
  171. area:['450px', 'auto'],
  172. content: content,
  173. btn:['保存','取消'],
  174. btn1: function (index,layero) {
  175. var inc_num = $("#inc_num").val();
  176. var base_num = $("#base_num").val();
  177. $.post('<?php echo e(route('sellers.setviews')); ?>',{_token:'<?php echo e(@csrf_token()); ?>', shop_id:shop_id,inc_num:inc_num,base_num:base_num}, function(data){
  178. layer.msg(data.msg,function(){
  179. location.reload();
  180. });
  181. },'json');
  182. },
  183. btn2:function (index,layero) {
  184. layer.close(index);
  185. }
  186. });
  187. }
  188. function show_seller_profile(id){
  189. $.post('<?php echo e(route('salesman.sellers_profile_modal')); ?>',{_token:'<?php echo e(@csrf_token()); ?>', id:id}, function(data){
  190. $('#profile_modal #profile-modal-content').html(data);
  191. $('#profile_modal').modal('show', {backdrop: 'static'});
  192. });
  193. }
  194. function sort_sellers(el){
  195. $('#sort_sellers').submit();
  196. }
  197. function show_chat_modal(receiver_id) {
  198. $('#receiver_id').val(receiver_id);
  199. $('#chat_modal').modal('show');
  200. }
  201. function update_approved(el){
  202. if(el.checked){
  203. var status = 1;
  204. }
  205. else{
  206. var status = 0;
  207. }
  208. $.post('<?php echo e(route('salesman.sellers.approved')); ?>', {_token:'<?php echo e(csrf_token()); ?>', id:el.value, status:status}, function(data){
  209. if(data == 1){
  210. AIZ.plugins.notify('success', '<?php echo e(translate('Approved sellers updated successfully')); ?>');
  211. }
  212. else{
  213. AIZ.plugins.notify('danger', '<?php echo e(translate('Something went wrong')); ?>');
  214. }
  215. });
  216. }
  217. </script>
  218. <?php $__env->stopSection(); ?>
  219. <?php echo $__env->make('salesman.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /www/wwwroot/www.easybuyjp.shop/resources/views/salesman/sellers/index.blade.php ENDPATH**/ ?>