| <!DOCTYPE HTML> | 
| <html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml"> | 
| <head> | 
|     <meta charset="utf-8"> | 
|     <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> | 
|     <meta name="renderer" content="webkit|ie-comp|ie-stand"> | 
|     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | 
|     <meta name="viewport" | 
|           content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/> | 
|     <meta http-equiv="Cache-Control" content="no-siteapp"/> | 
|     <!-- 本框架基本脚本和样式 --> | 
|     <script type="text/javascript" | 
|             th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> | 
|     <script type="text/javascript" | 
|             th:src="@{/js/systools/MBase.js}"></script> | 
| </head> | 
| <body class=" container-fluid"> | 
|   | 
| <div class="pd-10"> | 
|     <!-- 搜索框部分start --> | 
|     <div class="row form-head"> | 
|         <form class="form-inline" id="serchform"> | 
|             <div class="input-group"> | 
|                 <div class="btn-group search-list " data-for="search-text"> | 
|                     <button type="button" | 
|                             class="btn btn-default dropdown-toggle searchlist" | 
|                             data-toggle="dropdown"> | 
|                         店铺名称 <span class="caret "></span> | 
|                     </button> | 
|                     <ul class="dropdown-menu" role="menu"> | 
|                         <li data-field="applyNo"><a>订单号 </a></li> | 
|                     </ul> | 
|                 </div> | 
|                 <div class="form-group mr-20 ml-20"> | 
|                     <input autocomplete="off"   id="search-text" name="shopName" placeholder="输入查询关键词" | 
|                            type="text" class="form-control"> | 
|                 </div> | 
|   | 
|                 <div class="form-group mr-20"> | 
|                     <label>日期</label> | 
|                     <input autocomplete="off"   name="startTime" type="text" class="form-control datetimepicker" id="beginTime">- | 
|                     <input autocomplete="off"   name="endTime"  type="text" class="form-control datetimepicker" id="endTime"> | 
|                 </div> | 
|   | 
|                 <div class="form-group mr-20"> | 
|                     <label>订单状态:</label> | 
|                     <select class="form-control autoFull select2" dataType="*" name="applyStatus"> | 
|                         <option value=''>请选择</option> | 
|                         <option value=1>申请中</option> | 
|                         <option value=2>通过</option> | 
|                         <option value=3>驳回</option> | 
|                     </select> | 
|                 </div> | 
|   | 
|                 <div class="form-group"> | 
|                     <button onclick="myGrid.serchData()" type="button" | 
|                             class="btn btn-info"> | 
|                         <i class="fa fa-search "></i> 搜索 | 
|                     </button> | 
|                     <button type="reset" class="btn btn-info "> | 
|                         <i class="fa fa-refresh "></i> 重置 | 
|                     </button> | 
|                 </div> | 
|             </div> | 
|         </form> | 
|     </div> | 
|   | 
|     <div class="row"> | 
|         <div class="col-sm-12"> | 
|             <table id="mgrid"> | 
|                 <thead> | 
|                 <tr> | 
|                     <th data-checkbox="true"></th> | 
|                     <th data-formatter="MGrid.indexfn" data-align="center" data-width="30px">序号</th> | 
|                     <th data-align="center" data-width="195px" data-field="id" data-formatter="buidOperate">操作</th> | 
|                     <th data-field="shopName">店铺名称</th> | 
|                     <th data-field="applyNo">申请单号</th> | 
|                     <th data-field="applyMoney">提现金额</th> | 
|                     <th data-field="applyStatus" data-formatter="buildApplyStatus">订单状态</th> | 
|                     <th data-field="createTime" data-formatter="MGrid.getTime">申请时间</th> | 
|                     <th data-field="bankNo">银行卡号</th> | 
|                     <th data-field="bankName">开户行</th> | 
|                     <th data-field="bankOwnerName">开户人姓名</th> | 
|                     <th data-field="cmmsAnt">手续费</th> | 
|                     <th data-field="userName" >审批人</th> | 
|                     <th data-field="withdrawTime" data-formatter="MGrid.getTime">审批时间</th> | 
|                     <th data-field="isHasPay" data-formatter="isHasPayFormat">是否已打款</th> | 
|                 </tr> | 
|                 </thead> | 
|             </table> | 
|         </div> | 
|     </div> | 
| </div> | 
| <script type="text/javascript" | 
|         th:src="@{/js/systools/MJsBase.js}"></script> | 
| <script type="text/javascript"> | 
|     // MTools.autoFullSelect(); | 
|     // $(".select2").select2(); | 
|     var myGrid; | 
|     $(function () { | 
|         MTools.ininDatetimepicker(".datetimepicker"); | 
|         myGrid = MGrid.initGrid({ | 
|             url: basePath + "/admin/withdramApply/showList", | 
|         }); | 
|   | 
|     }); | 
|   | 
|   | 
|     var btns = []; | 
|     btns[0] = "", btns[1] = "", btns[2] = "", btns[3] = ""; | 
|   | 
|     function buidOperate(value, row, index) { | 
|         var html = ""; | 
|         html += '<div class="btn-group">' | 
|             + '<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">' | 
|             + '操作 <span class="caret"></span>' + '</button>' | 
|             + '<ul class="dropdown-menu" role="menu">' | 
|             + btns[0].replace('VALUE', value) | 
|         if (row.applyStatus == 1) { | 
|             html += btns[1].replace('VALUE', value) | 
|             html += btns[2].replace('VALUE', value) | 
|         } | 
|   | 
|         if (row.applyStatus === 2 && row.isHasPay === 0) { | 
|             html += btns[3].replace('VALUE', value) | 
|         } | 
|         html += '</ul>' + '</div>'; | 
|         return html; | 
|     } | 
|   | 
|     function buildApplyStatus(value) { | 
|         if (value == 1) { | 
|             return "申请中"; | 
|         } else if (value == 2) { | 
|             return "通过"; | 
|         } else { | 
|             return "驳回"; | 
|         } | 
|     } | 
|   | 
|     //查看提现申请关联的订单 | 
|     function readOrder(id) { | 
|         layer.full( | 
|             layer.open({ | 
|                 type: 2, | 
|                 title: "查看订单", | 
|                 area: [MUI.SIZE_L, '400px'], | 
|                 maxmin: true, | 
|                 content: [basePath + '/admin/withdramApply/toOrderList?id=' + id] | 
|             }) | 
|         ) | 
|     } | 
|   | 
|     //同意提现申请 | 
|     function applyAgree(id) { | 
|         MTools.handleItem(basePath + "/admin/withdramApply/agreeApply/" + id, "确定同意该提现申请吗?", | 
|             function () { | 
|                 myGrid.serchData(); | 
|             }); | 
|     } | 
|   | 
|     //驳回提现申请 | 
|     function applyDisagree(id) { | 
|         MTools.handleItem(basePath + "/admin/withdramApply/disagreeApply/" + id, "确定驳回该提现申请吗?", | 
|             function () { | 
|                 myGrid.serchData(); | 
|             }); | 
|     } | 
|   | 
|     function isHasPayFormat(value) { | 
|         if (value == 0) { | 
|             return "否"; | 
|         } else if(value == 1) { | 
|             return "是"; | 
|         } else { | 
|             return "-"; | 
|         } | 
|     } | 
|   | 
|     function hasPay(id) { | 
|         MTools.handleItem(basePath + "/admin/withdramApply/hasPay?id=" + id, "确定已线下打款成功?", | 
|             function () { | 
|                 myGrid.serchData(); | 
|             }); | 
|     } | 
| </script> | 
| <script> | 
|     btns[0] = '<li><a href="javascript:void(0)" onClick="readOrder(\'VALUE\')" title="编辑">查看</a></li>' | 
| </script> | 
| <script matrix:btn="wxWithdrawApply-applyCheck"> | 
|     btns[1] = '<li><a href="javascript:void(0)"  onClick="applyAgree(\'VALUE\')" title="通过">通过</a></li>' | 
|     btns[2] = '<li><a href="javascript:void(0)"  onClick="applyDisagree(\'VALUE\')" title="驳回">驳回</a></li>' | 
|     btns[3] = '<li><a href="javascript:void(0)"  onClick="hasPay(\'VALUE\')" title="确认打款">确认打款</a></li>' | 
| </script> | 
|   | 
| </body> | 
| </html> |