index.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. {extend name="public/container"}
  2. {block name="head_top"}
  3. <link rel="stylesheet" href="{__PLUG_PATH}daterangepicker/daterangepicker.css">
  4. <script src="{__PLUG_PATH}moment.js"></script>
  5. <script src="{__PLUG_PATH}daterangepicker/daterangepicker.js"></script>
  6. {/block}
  7. {block name="content"}
  8. <div class="row">
  9. <div class="col-sm-12">
  10. <div class="ibox">
  11. <div class="ibox-content">
  12. <div class="row">
  13. <div class="m-b m-l">
  14. <form action="" class="form-inline">
  15. <div class="search-item" data-name="date">
  16. <span>选择时间:</span>
  17. <button type="button" class="btn btn-outline btn-link" data-value="">全部</button>
  18. <button type="button" class="btn btn-outline btn-link" data-value="{$limitTimeList.today}">今天</button>
  19. <button type="button" class="btn btn-outline btn-link" data-value="{$limitTimeList.week}">本周</button>
  20. <button type="button" class="btn btn-outline btn-link" data-value="{$limitTimeList.month}">本月</button>
  21. <button type="button" class="btn btn-outline btn-link" data-value="{$limitTimeList.quarter}">本季度</button>
  22. <button type="button" class="btn btn-outline btn-link" data-value="{$limitTimeList.year}">本年</button>
  23. <div class="datepicker" style="display: inline-block;">
  24. <button type="button" class="btn btn-outline btn-link" data-value="{$where.date?:'no'}">自定义时间</button>
  25. </div>
  26. <input class="search-item-value" type="hidden" name="date" value="{$where.date}" />
  27. </div>
  28. <select name="status" aria-controls="editable" class="form-control input-sm">
  29. <option value="">提现状态</option>
  30. <option value="-1" {eq name="where.status" value="-1"}selected="selected"{/eq}>未通过</option>
  31. <option value="0" {eq name="where.status" value="0"}selected="selected"{/eq}>未提现</option>
  32. <option value="1" {eq name="where.status" value="1"}selected="selected"{/eq}>已通过</option>
  33. </select>
  34. <select name="extract_type" class="form-control input-sm">
  35. <option value="">提现方式</option>
  36. <option value="alipay" {eq name="where.extract_type" value="alipay" }selected="selected"{/eq}>支付宝</option>
  37. <option value="bank" {eq name="where.extract_type" value="bank"}selected="selected"{/eq}>银行卡</option>
  38. <option value="weixin" {eq name="where.extract_type" value="weixin"}selected="selected"{/eq}>微信</option>
  39. </select>
  40. <div class="input-group">
  41. <span class="input-group-btn">
  42. <input type="text" name="nireid" value="{$where.nireid}" placeholder="微信昵称/姓名/支付宝账号/银行卡号" class="input-sm form-control" size="38"/>
  43. <button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
  44. </span>
  45. </div>
  46. </form>
  47. </div>
  48. <div class="col-sm-3 ui-sortable">
  49. <div class="ibox float-e-margins">
  50. <div class="ibox-title">
  51. <span class="label label-success pull-right">¥</span>
  52. <h5>已提现金额</h5>
  53. </div>
  54. <div class="ibox-content">
  55. <h1 class="no-margins">{$data.priced}</h1>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="col-sm-3 ui-sortable">
  60. <div class="ibox float-e-margins">
  61. <div class="ibox-title">
  62. <span class="label label-danger pull-right">急</span>
  63. <h5>待提现金额</h5>
  64. </div>
  65. <div class="ibox-content">
  66. <h1 class="no-margins">{$data.price}</h1>
  67. </div>
  68. </div>
  69. </div>
  70. <div class="col-sm-3 ui-sortable">
  71. <div class="ibox float-e-margins">
  72. <div class="ibox-title">
  73. <span class="label label-success pull-right">待</span>
  74. <h5>佣金总金额</h5>
  75. </div>
  76. <div class="ibox-content">
  77. <h1 class="no-margins">{$data.brokerage_count}</h1>
  78. </div>
  79. </div>
  80. </div>
  81. <div class="col-sm-3 ui-sortable">
  82. <div class="ibox float-e-margins">
  83. <div class="ibox-title">
  84. <span class="label label-success pull-right">待</span>
  85. <h5>未提现金额</h5>
  86. </div>
  87. <div class="ibox-content">
  88. <h1 class="no-margins">{$data.brokerage_not}</h1>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="table-responsive">
  94. <table class="table table-striped table-bordered">
  95. <thead>
  96. <tr>
  97. <th class="text-center">编号</th>
  98. <th class="text-center">用户信息</th>
  99. <th class="text-center">提现金额</th>
  100. <th class="text-center">提现方式</th>
  101. <th class="text-center">添加时间</th>
  102. <th class="text-center">备注</th>
  103. <th class="text-center">审核状态</th>
  104. <th class="text-center">操作</th>
  105. </tr>
  106. </thead>
  107. <tbody class="">
  108. {volist name="list" id="vo"}
  109. <tr>
  110. <td class="text-center">
  111. {$vo.id}
  112. </td>
  113. <td class="text-center">
  114. 用户昵称: {$vo.nickname}/用户id:{$vo.uid}
  115. </td>
  116. <td class="text-center" style="color: #00aa00;">
  117. {$vo.extract_price}
  118. </td>
  119. <td class="text-left">
  120. {if condition="$vo['extract_type'] eq 'bank'"}
  121. 姓名:{$vo.real_name}<br>
  122. 银行卡号:{$vo.bank_code}
  123. <br/>
  124. 银行开户地址:{$vo.bank_address}
  125. {elseif condition="$vo['extract_type'] eq 'weixin'"/}
  126. 昵称:{$vo.nickname}<br>
  127. 微信号:{$vo.wechat}
  128. {else/}
  129. 姓名:{$vo.real_name}<br>
  130. 支付宝号:{$vo.alipay_code}
  131. {/if}
  132. </td>
  133. <td class="text-center">
  134. {$vo.add_time|date='Y-m-d H:i:s'}
  135. </td>
  136. <td class="text-center">
  137. {$vo.mark}
  138. </td>
  139. <td class="text-center">
  140. {if condition="$vo['status'] eq 1"}
  141. 提现通过<br/>
  142. {elseif condition="$vo['status'] eq -1"/}
  143. 提现未通过<br/>
  144. 未通过原因:{$vo.fail_msg}
  145. <br>
  146. 未通过时间:{$vo.fail_time|date='Y-m-d H:i:s'}
  147. {else/}
  148. 未提现<br/>
  149. <button data-url="{:url('fail',['id'=>$vo['id']])}" class="j-fail btn btn-danger btn-xs" type="button"><i class="fa fa-close"></i> 无效</button>
  150. <button data-url="{:url('succ',['id'=>$vo['id']])}" class="j-success btn btn-primary btn-xs" type="button"><i class="fa fa-check"></i> 通过</button>
  151. {/if}
  152. </td>
  153. <td class="text-center">
  154. <button class="btn btn-info btn-xs" type="button" onclick="$eb.createModalFrame('编辑','{:Url('edit',array('id'=>$vo['id']))}')"><i class="fa fa-edit"></i> 编辑</button>
  155. </td>
  156. </tr>
  157. {/volist}
  158. </tbody>
  159. </table>
  160. </div>
  161. {include file="public/inner_page"}
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. {/block}
  167. {block name="script"}
  168. <script>
  169. $(function init() {
  170. $('.search-item>.btn').on('click', function () {
  171. var that = $(this), value = that.data('value'), p = that.parent(), name = p.data('name'), form = p.parents();
  172. form.find('input[name="' + name + '"]').val(value);
  173. $('input[name=export]').val(0);
  174. form.submit();
  175. });
  176. $('.tag-item>.btn').on('click', function () {
  177. var that = $(this), value = that.data('value'), p = that.parent(), name = p.data('name'), form = p.parents(),list = $('input[name="' + name + '"]').val().split(',');
  178. var bool = 0;
  179. $.each(list,function (index,item) {
  180. if(item == value){
  181. bool = 1
  182. list.splice(index,1);
  183. }
  184. })
  185. if(!bool) list.push(''+value+'');
  186. form.find('input[name="' + name + '"]').val(list.join(','));
  187. $('input[name=export]').val(0);
  188. form.submit();
  189. });
  190. $('.search-item>li').on('click', function () {
  191. var that = $(this), value = that.data('value'), p = that.parent(), name = p.data('name'), form = $('#form');
  192. form.find('input[name="' + name + '"]').val(value);
  193. $('input[name=export]').val(0);
  194. form.submit();
  195. });
  196. $('.search-item>li').each(function () {
  197. var that = $(this), value = that.data('value'), p = that.parent(), name = p.data('name');
  198. if($where[name]) $('.'+name).css('color','#1ab394');
  199. });
  200. $('.search-item-value').each(function () {
  201. var that = $(this), name = that.attr('name'), value = that.val(), dom = $('.search-item[data-name="' + name + '"] .btn[data-value="' + value + '"]');
  202. dom.eq(0).removeClass('btn-outline btn-link').addClass('btn-primary btn-sm')
  203. .siblings().addClass('btn-outline btn-link').removeClass('btn-primary btn-sm')
  204. });
  205. })
  206. $('.j-fail').on('click',function(){
  207. var url = $(this).data('url');
  208. $eb.$alert('textarea',{
  209. title:'请输入未通过原因',
  210. value:'输入信息不完整或有误!',
  211. },function(value){
  212. $eb.axios.post(url,{message:value}).then(function(res){
  213. if(res.data.code == 200) {
  214. $eb.$swal('success', res.data.msg);
  215. setTimeout(function () {
  216. window.location.reload();
  217. },1000);
  218. }else
  219. $eb.$swal('error',res.data.msg||'操作失败!');
  220. });
  221. });
  222. });
  223. $('.j-success').on('click',function(){
  224. var url = $(this).data('url');
  225. $eb.$swal('delete',function(){
  226. $eb.axios.post(url).then(function(res){
  227. if(res.data.code == 200) {
  228. setTimeout(function () {
  229. window.location.reload();
  230. },1000);
  231. $eb.$swal('success', res.data.msg);
  232. }else
  233. $eb.$swal('error',res.data.msg||'操作失败!');
  234. });
  235. },{
  236. title:'确定审核通过?',
  237. text:'通过后无法撤销,请谨慎操作!',
  238. confirm:'审核通过'
  239. });
  240. });
  241. $('.btn-warning').on('click',function(){
  242. window.t = $(this);
  243. var _this = $(this),url =_this.data('url');
  244. $eb.$swal('delete',function(){
  245. $eb.axios.get(url).then(function(res){
  246. if(res.status == 200 && res.data.code == 200) {
  247. $eb.$swal('success',res.data.msg);
  248. _this.parents('tr').remove();
  249. }else
  250. return Promise.reject(res.data.msg || '删除失败')
  251. }).catch(function(err){
  252. $eb.$swal('error',err);
  253. });
  254. })
  255. });
  256. $(".open_image").on('click',function (e) {
  257. var image = $(this).data('image');
  258. $eb.openImage(image);
  259. })
  260. var dateInput = $('.datepicker');
  261. dateInput.daterangepicker({
  262. autoUpdateInput: false,
  263. "opens": "center",
  264. "drops": "down",
  265. "ranges": {
  266. '今天': [moment(), moment().add(1, 'days')],
  267. '昨天': [moment().subtract(1, 'days'), moment()],
  268. '上周': [moment().subtract(6, 'days'), moment()],
  269. '前30天': [moment().subtract(29, 'days'), moment()],
  270. '本月': [moment().startOf('month'), moment().endOf('month')],
  271. '上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
  272. },
  273. "locale" : {
  274. applyLabel : '确定',
  275. cancelLabel : '取消',
  276. fromLabel : '起始时间',
  277. toLabel : '结束时间',
  278. format : 'YYYY/MM/DD',
  279. customRangeLabel : '自定义',
  280. daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
  281. monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月',
  282. '七月', '八月', '九月', '十月', '十一月', '十二月' ],
  283. firstDay : 1
  284. }
  285. });
  286. dateInput.on('apply.daterangepicker', function(ev, picker) {
  287. $("input[name=date]").val(picker.startDate.format('YYYY/MM/DD') + ' - ' + picker.endDate.format('YYYY/MM/DD'));
  288. $('form').submit();
  289. });
  290. </script>
  291. {/block}