截流自动化的商城平台
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

withdrawal.html 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  1. {layout name="layout1" /}
  2. <style>
  3. .layui-table-cell {
  4. height:auto;
  5. }
  6. .goods-content>div:not(:last-of-type) {
  7. bcommission-bottom:1px solid #DCDCDC;
  8. }
  9. .goods-data::after{
  10. display: block;
  11. content: '';
  12. clear: both;
  13. }
  14. .goods_name_hide{
  15. overflow:hidden;
  16. white-space:nowrap;
  17. text-overflow: ellipsis;
  18. }
  19. .operation-btn {
  20. margin: 5px;
  21. }
  22. .table-operate{
  23. text-align: left;
  24. font-size:14px;
  25. padding:0 5px;
  26. height:auto;
  27. overflow:visible;
  28. text-overflow:inherit;
  29. white-space:normal;
  30. word-break: break-all;
  31. }
  32. </style>
  33. <div class="wrapper">
  34. <div class="layui-card">
  35. <div class="layui-card-body">
  36. <div class="layui-collapse like-layui-collapse" lay-accordion="" style="bcommission:1px dashed #c4c4c4">
  37. <div class="layui-colla-item">
  38. <h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
  39. <div class="layui-colla-content layui-show">
  40. <p>*审核会员的佣金提现申请。</p>
  41. <p>*佣金提现支持微信、支付宝转账。提现失败会退回全部金额。</p>
  42. </div>
  43. </div>
  44. </div>
  45. <!-- 提现汇总-->
  46. <div class="layui-form-item div-flex">
  47. <fieldset class="layui-elem-field layui-field-title">
  48. <legend>提现汇总</legend>
  49. </fieldset>
  50. </div>
  51. <div class="layui-row layui-col-space15">
  52. <div class="layui-col-sm6 layui-col-md3" >
  53. <div class="layui-card" >
  54. <div class="layui-card-header" >
  55. 已提现佣金金额
  56. </div>
  57. <div class="layui-card-body layuiadmin-card-list" >
  58. <p class="layuiadmin-big-font">¥{$summary.successWithdraw}</p>
  59. </div>
  60. </div>
  61. </div>
  62. <div class="layui-col-sm6 layui-col-md3">
  63. <div class="layui-card">
  64. <div class="layui-card-header">
  65. 提现中佣金金额
  66. </div>
  67. <div class="layui-card-body layuiadmin-card-list">
  68. <p class="layuiadmin-big-font">¥{$summary.handleWithdraw}</p>
  69. </div>
  70. </div>
  71. </div>
  72. <div class="layui-col-sm6 layui-col-md3">
  73. <div class="layui-card">
  74. <div class="layui-card-header">
  75. 可提现佣金金额
  76. </div>
  77. <div class="layui-card-body layuiadmin-card-list">
  78. <p class="layuiadmin-big-font" >¥{$summary.totalEarnings}</p>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. <div class="layui-tab layui-tab-card" lay-filter="tab-all">
  85. <div class="layui-card-body layui-form">
  86. <div class="layui-form-item">
  87. <div class="layui-row">
  88. <div class="layui-inline">
  89. <label class="layui-form-label">会员信息:</label>
  90. <div class="layui-input-block">
  91. <select name="search_key">
  92. <option value="user_sn">会员编号</option>
  93. <option value="nickname">会员昵称</option>
  94. </select>
  95. </div>
  96. </div>
  97. <div class="layui-inline">
  98. <input type="text" name="keyword" id="keyword" placeholder="请输入搜索内容"
  99. autocomplete="off" class="layui-input">
  100. </div>
  101. <div class="layui-inline">
  102. <label class="layui-form-label">提现单号:</label>
  103. <div class="layui-input-block">
  104. <input type="text" name="withdraw_sn" id="withdraw_sn" placeholder="请输入提现单号"
  105. autocomplete="off" class="layui-input">
  106. </div>
  107. </div>
  108. <div class="layui-inline">
  109. <label class="layui-form-label">提现方式:</label>
  110. <div class="layui-input-block">
  111. <select name="type" id="type">
  112. <option value="">全部</option>
  113. <option value="1">钱包余额</option>
  114. <option value="2">微信零钱</option>
  115. <option value="3">微信收款码</option>
  116. <option value="4">支付宝收款码</option>
  117. <option value="5">银行卡</option>
  118. </select>
  119. </div>
  120. </div>
  121. <div class="layui-inline">
  122. <label class="layui-form-label">提现时间:</label>
  123. <div class="layui-input-inline">
  124. <div class="layui-input-inline">
  125. <input type="text" name="start_time" class="layui-input" id="start_time"
  126. placeholder="" autocomplete="off">
  127. </div>
  128. </div>
  129. <div class="layui-input-inline" style="margin-right: 5px;width: 20px;">
  130. <label class="layui-form-mid">至</label>
  131. </div>
  132. <div class="layui-input-inline">
  133. <input type="text" name="end_time" class="layui-input" id="end_time"
  134. placeholder="" autocomplete="off">
  135. </div>
  136. </div>
  137. <div class="layui-inline">
  138. <div class="layui-btn-group">
  139. <button type="button" id="today" day="1" class="layui-btn layui-btn-sm layui-btn-normal day">今天</button>
  140. <button type="button" day="-1" class="layui-btn layui-btn-sm layui-btn-primary day">昨天</button>
  141. <button type="button" day="7" class="layui-btn layui-btn-sm layui-btn-primary day">近7天</button>
  142. <button type="button" day="30" class="layui-btn layui-btn-sm layui-btn-primary day">近30天</button>
  143. </div>
  144. </div>
  145. <div class="layui-inline">
  146. <button class="layui-btn layui-btn-sm layuiadmin-btn-ad {$view_theme_color}" lay-submit
  147. lay-filter="commission-search">查询
  148. </button>
  149. <button class="layui-btn layui-btn-sm layuiadmin-btn-ad layui-btn-primary " lay-submit
  150. lay-filter="commission-clear-search">重置
  151. </button>
  152. <button class="layui-btn layui-btn-sm layuiadmin-btn-ad layui-btn-primary " lay-submit
  153. lay-filter="data-export">导出
  154. </button>
  155. </div>
  156. </div>
  157. </div>
  158. </div>
  159. <div class="layui-tab-item layui-show">
  160. <div class="layui-card">
  161. <ul class="layui-tab-title">
  162. <li data-status='' class="layui-this">全部</li>
  163. <li data-status='1'>待提现</li>
  164. <li data-status="2">提现中</li>
  165. <li data-status="3">提现成功</li>
  166. <li data-status="4">提现失败</li>
  167. </ul>
  168. <div class="layui-card-body">
  169. <table id="commission-lists" lay-filter="commission-lists"></table>
  170. <!--会员信息-->
  171. <script type="text/html" id="user">
  172. <img src="{{d.user.avatar}}" style="height:60px;width: 60px" class="image-show">
  173. <div class="layui-input-inline" style="text-align: left;">
  174. <p>会员编号:{{d.user.sn}}</p>
  175. <p>会员昵称:{{d.user.nickname}}</p>
  176. <p>用户等级:{{d.user.user_level_name}}</p>
  177. </div>
  178. </script>
  179. <!--操作-->
  180. <script type="text/html" id="withdraw-operation">
  181. <a class="layui-btn layui-btn-primary layui-btn-sm" lay-event="detail">详情</a>
  182. <!-- 待提现的才能审核 -->
  183. {{# if(d.status == 1){ }}
  184. <a class="layui-btn layui-btn-primary layui-btn-sm" lay-event="review">审核</a>
  185. {{# } }}
  186. <!-- 提现中的微信零钱申请单才能查询结果 -->
  187. {{# if(d.status == 2 && d.type == 2){ }}
  188. <a class="layui-btn layui-btn-primary layui-btn-sm" lay-event="search">查询结果</a>
  189. <a class="layui-btn layui-btn-primary layui-btn-sm" lay-event="withdraw_failed">提现失败</a>
  190. {{# } }}
  191. <!-- 提现中的收款码申请单才能转账操作 -->
  192. {{# if(d.status == 2 && (d.type == 3 || d.type == 4 || d.type == 5)){ }}
  193. <a class="layui-btn layui-btn-primary layui-btn-sm" lay-event="transfer">转账</a>
  194. {{# } }}
  195. </script>
  196. </div>
  197. </div>
  198. </div>
  199. </div>
  200. </div>
  201. </div>
  202. <script>
  203. layui.config({
  204. version:"{$front_version}",
  205. base: '/static/lib/' //静态资源所在路径
  206. }).use(['form'], function(){
  207. var $ = layui.$
  208. , form = layui.form
  209. , table = layui.table
  210. , element = layui.element
  211. , laydate = layui.laydate;
  212. //图片放大
  213. $(document).on('click', '.image-show', function () {
  214. var src = $(this).attr('src');
  215. like.showImg(src,400);
  216. });
  217. //监听搜索
  218. form.on('submit(commission-search)', function (data) {
  219. var field = data.field;
  220. //执行重载
  221. table.reload('commission-lists', {
  222. where: field,
  223. page: {
  224. curr: 1
  225. }
  226. });
  227. });
  228. //清空查询
  229. form.on('submit(commission-clear-search)', function () {
  230. $('#withdraw_sn').val('');
  231. $('#type').val('');
  232. $('#keyword').val('');
  233. $('#start_time').val('{$today[0]}');
  234. $('#end_time').val('{$today[1]}');
  235. $('#today').trigger("click");
  236. form.render('select');
  237. //刷新列表
  238. table.reload('commission-lists', {
  239. where: [],
  240. page: {
  241. curr: 1
  242. }
  243. });
  244. });
  245. // 导出
  246. form.on('submit(data-export)', function (data) {
  247. var field = data.field;
  248. field.status = $(".layui-tab-title li.layui-this").attr("data-status")
  249. like.ajax({
  250. url: '{:url("finance.User/withdrawalExport")}'
  251. , data: field
  252. , type: 'get'
  253. , success: function (res) {
  254. if (res.code == 1) {
  255. window.location.href = res.data.url;
  256. }
  257. }
  258. });
  259. });
  260. //日期时间范围
  261. laydate.render({
  262. elem: '#start_time'
  263. , type: 'datetime'
  264. ,theme: '#1E9FFF'
  265. , value: "{$today[0]}"
  266. });
  267. laydate.render({
  268. elem: '#end_time'
  269. , type: 'datetime'
  270. ,theme: '#1E9FFF'
  271. ,value: "{$today[1]}"
  272. });
  273. //获取列表
  274. getList('');
  275. //切换列表
  276. element.on('tab(tab-all)', function (data) {
  277. $('#keyword').val('');
  278. $('#commission_status').val('');
  279. $('#goods_name').val('');
  280. $('#pay_way').val('');
  281. $('#pay_status').val('');
  282. $('#commission_type').val('');
  283. $('#start_time').val('{$today[0]}');
  284. $('#end_time').val('{$today[1]}');
  285. $('#today').trigger("click");
  286. $('#delivery_type').val('');
  287. form.render('select');
  288. var type = $(this).attr('data-status');
  289. getList(type);
  290. if (type !== ''){
  291. $('.commission_status').hide();
  292. }else {
  293. $('.commission_status').show();
  294. }
  295. });
  296. function getList(type) {
  297. table.render({
  298. elem: '#commission-lists'
  299. , url: '{:url("finance.User/withdrawal")}?status=' + type
  300. , cols: [[
  301. {field: 'sn', title: '提现单号', align: 'center',width:180}
  302. , {field: 'user', title: '会员信息', align: 'center',templet:'#user',width:300}
  303. , {field: 'mobile', title: '手机号码', align: 'center',width:160}
  304. , {field: 'left_money', title: '提现金额', align: 'center',width:110}
  305. , {field: 'type_text', title: '提现方式', align: 'center',width:110}
  306. , {field: 'status_text', title: '提现状态', align: 'center',width:110}
  307. , {field: 'remark', title: '提现说明', align: 'center',width:180}
  308. , {field: 'create_time', title: '提现时间', align: 'center',width:220}
  309. ,{fixed: 'right' ,title: '操作', align: 'center',width:250, toolbar: '#withdraw-operation'}
  310. ]]
  311. , page: true
  312. , text: {none: '暂无数据!'}
  313. ,response: {
  314. statusCode: 1
  315. }
  316. , parseData: function (res) {
  317. return {
  318. "code": res.code,
  319. "msg": res.msg,
  320. "count": res.data.count,
  321. "data": res.data.lists,
  322. };
  323. }
  324. ,done: function(res, curr, count){
  325. // 解决操作栏因为内容过多换行问题
  326. $(".layui-table-main tr").each(function (index, val) {
  327. $($(".layui-table-fixed-l .layui-table-body tbody tr")[index]).height($(val).height());
  328. $($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height());
  329. });
  330. }
  331. });
  332. }
  333. //监听工具条
  334. table.on('tool(commission-lists)', function (obj) {
  335. var id = obj.data.id;
  336. // 详情
  337. if(obj.event === 'detail') {
  338. layer.open({
  339. type: 2
  340. , title: '提现详情'
  341. , content: '{:url("finance.User/withdraw_detail")}?id=' + id
  342. , area: ['90%', '90%']
  343. });
  344. }
  345. // 审核
  346. if(obj.event === 'review') {
  347. layer.open({
  348. type: 2
  349. , title: '提现审核'
  350. , content: '{:url("finance.User/withdraw_review")}?id=' + id
  351. , area: ['60%', '60%']
  352. });
  353. }
  354. // 查询结果
  355. if(obj.event === 'search') {
  356. like.ajax({
  357. url:'{:url("finance.User/search")}',
  358. data:{'id':id},
  359. type:"post",
  360. success:function(res)
  361. {
  362. if(res.code == 1)
  363. {
  364. layui.layer.msg(res.msg, {offset: '15px', icon: 1, time: 1000}, function(){
  365. location.reload();
  366. });
  367. }
  368. }
  369. });
  370. }
  371. // 提现失败
  372. if(obj.event === 'withdraw_failed') {
  373. layer.confirm('提现失败将退回佣金,确定要操作吗?', {icon: 3, title:'提示'}, function(index){
  374. like.ajax({
  375. url:'{:url("finance.User/withdrawFailed")}',
  376. data:{'id':id},
  377. type:"post",
  378. success:function(res)
  379. {
  380. if(res.code == 1)
  381. {
  382. layui.layer.msg('提现失败退回佣金', {offset: '15px', icon: 1, time: 1000},function(){
  383. // 关闭对话框
  384. layer.close(index);
  385. location.reload();
  386. });
  387. }
  388. }
  389. });
  390. });
  391. }
  392. // 转账
  393. if(obj.event === 'transfer') {
  394. layer.open({
  395. type: 2
  396. , title: '转账'
  397. , content: '{:url("finance.User/transfer")}?id=' + id
  398. , area: ['90%', '90%']
  399. });
  400. }
  401. });
  402. $('.day').click(function(){
  403. $('.day').removeClass('layui-btn-normal');
  404. $('.day').removeClass('layui-btn-primary');
  405. $('.day').addClass('layui-btn-primary');
  406. $(this).removeClass('layui-btn-primary');
  407. $(this).addClass('layui-btn-normal');
  408. var day = $(this).attr('day');
  409. switch (day) {
  410. case '-1':
  411. $('#start_time').val('{$yesterday[0]}');
  412. $('#end_time').val('{$yesterday[1]}');
  413. break;
  414. case '1':
  415. $('#start_time').val('{$today[0]}');
  416. $('#end_time').val('{$today[1]}');
  417. break;
  418. case '7':
  419. $('#start_time').val('{$days_ago7[0]}');
  420. $('#end_time').val('{$days_ago7[1]}');
  421. break;
  422. case '30':
  423. $('#start_time').val('{$days_ago30[0]}');
  424. $('#end_time').val('{$days_ago30[1]}');
  425. break;
  426. }
  427. });
  428. });
  429. </script>