|
@@ -0,0 +1,201 @@
|
|
|
|
|
+<style type="text/css">
|
|
|
|
|
+ .xm-label-block {
|
|
|
|
|
+ background-color: #287bd2
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|
|
|
|
|
+
|
|
|
|
|
+<!-- 正文开始 -->
|
|
|
|
|
+<div class="layui-fluid">
|
|
|
|
|
+ <div class="layui-card">
|
|
|
|
|
+ <div class="layui-card-body">
|
|
|
|
|
+ <div class="layui-form toolbar" id="tbToolBar">
|
|
|
|
|
+ <div class="layui-form-item">
|
|
|
|
|
+ <div class="layui-inline">
|
|
|
|
|
+ <label class="layui-form-label w-auto">手机号:</label>
|
|
|
|
|
+ <div class="layui-input-inline mr0">
|
|
|
|
|
+ <input name="keyword" class="layui-input" type="text" placeholder="司机手机号"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="layui-inline">
|
|
|
|
|
+ <label class="layui-form-label">状 态:</label>
|
|
|
|
|
+ <div class="layui-input-inline mr0">
|
|
|
|
|
+ <select name="status">
|
|
|
|
|
+ <option value="">所有</option>
|
|
|
|
|
+ <option value="10">待审</option>
|
|
|
|
|
+ <option value="20">审核</option>
|
|
|
|
|
+ <option value="30">驳回</option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="layui-inline" style="padding-right: 110px;">
|
|
|
|
|
+ <button class="layui-btn icon-btn" lay-filter="formSubSearchWithdraw" lay-submit>
|
|
|
|
|
+ <i class="layui-icon"></i>查询
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="layui-tab layui-tab-brief">
|
|
|
|
|
+
|
|
|
|
|
+ <table id="dataTable" lay-filter="dataTable"></table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</div>
|
|
|
|
|
+
|
|
|
|
|
+<script type="text/html" id="toolBarTpl">
|
|
|
|
|
+ <div class="layui-btn-group fl">
|
|
|
|
|
+ <a table-data="{'url':'store/taxiuserwithdraw/plectron','action':'put',param:{'status': 20}}" class="layui-btn layui-btn-sm layui-icon layui-icon-play table-toolbar-btn"> 审核</a >
|
|
|
|
|
+ <a table-data="{'url':'store/taxiuserwithdraw/plectron','action':'put',param:{'status': 30}}" confirm class="layui-btn layui-btn-sm layui-icon layui-icon-pause table-toolbar-btn"> 驳回</a>
|
|
|
|
|
+ <a table-data="{'url':'store/taxiuserwithdraw/plectron','action':'delete'}" confirm class="layui-btn layui-btn-sm layui-icon layui-icon-close table-toolbar-btn"> 删除</a>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<!-- 表格操作列 -->
|
|
|
|
|
+<script type="text/html" id="tableBarWithdraw">
|
|
|
|
|
+ {{# if(d.status == 20){ }}
|
|
|
|
|
+ <a class="layui-btn layui-btn-disabled layui-btn-warm layui-btn-xs" lay-tips="禁止操作">审核</a>
|
|
|
|
|
+ <a class="layui-btn layui-btn-disabled layui-btn-xs" lay-tips="禁止操作">驳回</a>
|
|
|
|
|
+ <a class="layui-btn layui-btn-disabled layui-btn-xs" lay-tips="禁止操作">删除</a>
|
|
|
|
|
+ {{# }else if(d.status == 10){ }}
|
|
|
|
|
+ <a class="layui-btn layui-btn-xs" perm-show="put:/store/taxiuserwithdraw/<id>" lay-event="confirm">审核</a>
|
|
|
|
|
+ <a class="layui-btn layui-btn-warm layui-btn-xs" perm-show="put:/store/taxiuserwithdraw/<id>" lay-event="refuse">驳回</a>
|
|
|
|
|
+ <a class="layui-btn layui-btn-danger layui-btn-xs" perm-show="delete:/store/taxiuserwithdraw/<id>" lay-event="del">删除</a>
|
|
|
|
|
+ {{# }else{ }}
|
|
|
|
|
+ <a class="layui-btn layui-btn-disabled layui-btn-warm layui-btn-xs" lay-tips="禁止操作">审核</a>
|
|
|
|
|
+ <a class="layui-btn layui-btn-disabled layui-btn-xs" lay-tips="禁止操作">驳回</a>
|
|
|
|
|
+ <a class="layui-btn layui-btn-danger layui-btn-xs" perm-show="delete:/store/taxiuserwithdraw/<id>" lay-event="del">删除</a>
|
|
|
|
|
+ {{# } }}
|
|
|
|
|
+</script>
|
|
|
|
|
+<!-- 表格状态列 -->
|
|
|
|
|
+<script type="text/html" id="tableStateWithdraw">
|
|
|
|
|
+ {{# if(d.status == 10){ }}
|
|
|
|
|
+ <span class="layui-badge layui-badge-yellow">待审核</span>
|
|
|
|
|
+ {{# }else if(d.status == 20){ }}
|
|
|
|
|
+ <span class="layui-badge layui-badge-green">已审核</span>
|
|
|
|
|
+ {{# }else{ }}
|
|
|
|
|
+ <span class="layui-badge layui-badge-gray">驳回</span>
|
|
|
|
|
+ {{# } }}
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<!-- js部分 -->
|
|
|
|
|
+<script>
|
|
|
|
|
+ layui.use(['layer', 'form', 'table', 'util', 'notice','md5', 'admin', 'setter', 'xmSelect'], function () {
|
|
|
|
|
+ var $ = layui.jquery;
|
|
|
|
|
+ var layer = layui.layer;
|
|
|
|
|
+ var form = layui.form;
|
|
|
|
|
+ var table = layui.table;
|
|
|
|
|
+ var util = layui.util;
|
|
|
|
|
+ var admin = layui.admin;
|
|
|
|
|
+ var notice = layui.notice;
|
|
|
|
|
+ var setter = layui.setter;
|
|
|
|
|
+ var md5 = layui.md5;
|
|
|
|
|
+ var xmSelect = layui.xmSelect;
|
|
|
|
|
+
|
|
|
|
|
+ form.render('select');
|
|
|
|
|
+ // 渲染表格
|
|
|
|
|
+ var insTb = table.render({
|
|
|
|
|
+ elem: '#dataTable',
|
|
|
|
|
+ url: setter.baseServer + 'store/taxiuserwithdraw',
|
|
|
|
|
+ page: true,
|
|
|
|
|
+ // toolbar: true,
|
|
|
|
|
+ toolbar: '#toolBarTpl',
|
|
|
|
|
+ cellMinWidth: 100,
|
|
|
|
|
+ cols: [[
|
|
|
|
|
+ {type: 'checkbox'},
|
|
|
|
|
+ {field: 'order_no', title: '单号'},
|
|
|
|
|
+ {field: 'user', title: '用户',templet: function (d) {
|
|
|
|
|
+ return '<a href="javascript:;" class="taxi-user-view" style="color: #35cc98;border-bottom: 1px solid;"> '
|
|
|
|
|
+ + ( d.user ? d.user.nickname + '(' + d.taxi_user.mobile + ')' : '用户不存在') + ' </a>';
|
|
|
|
|
+ }, width: 200
|
|
|
|
|
+ },
|
|
|
|
|
+ {field: 'type', title: '收款方式',templet: function (d) {
|
|
|
|
|
+ var type = ['未知','银行卡','微信','支付宝'];
|
|
|
|
|
+ return type[d.pay_type];
|
|
|
|
|
+ }, width: 120},
|
|
|
|
|
+ {field: 'account', title: '收款账号', templet: function (d) {
|
|
|
|
|
+ if(d.pay_type == 1){
|
|
|
|
|
+ return '收款人:'+d.real_name+';'+'银行卡号:'+d.bank_card_no+';开户行:'+(d.desposit_bank||'')+' '+d.sub_branch+';';
|
|
|
|
|
+ }else if(d.pay_type == 2){
|
|
|
|
|
+ return '收款人:'+d.real_name+';微信号:'+d.wechat+'; 收款码:<a href="'+d.wechat_qrcode.url+'"><img width="80px" height="80px" src="'+d.wechat_qrcode.url+'"></a>';
|
|
|
|
|
+ }else if(d.pay_type == 3){
|
|
|
|
|
+ return '收款人:'+d.real_name+';支付宝:'+d.alipay+'; 收款码:<a href="'+d.alipay_qrcode.url+'"><img width="80px" height="80px" src="'+d.alipay_qrcode.url+'"></a>';
|
|
|
|
|
+ }
|
|
|
|
|
+ }, width: 200},
|
|
|
|
|
+ {field: 'amount', title: '提现金额',width: 120},
|
|
|
|
|
+ {
|
|
|
|
|
+ field: 'created_at', sort: true, templet: function (d) {
|
|
|
|
|
+ return util.toDateString(d.created_at * 1e3);
|
|
|
|
|
+ }, title: '创建时间', width: 180
|
|
|
|
|
+ },
|
|
|
|
|
+ {field: 'status', templet: '#tableStateWithdraw', title: '状态', width: 120},
|
|
|
|
|
+ {fixed:'right', align: 'center', toolbar: '#tableBarWithdraw', title: '操作', minWidth: 200}
|
|
|
|
|
+ ]],
|
|
|
|
|
+ done:function () {
|
|
|
|
|
+ admin.renderPerm()
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ // 搜索
|
|
|
|
|
+ form.on('submit(formSubSearchWithdraw)', function (data) {
|
|
|
|
|
+ insTb.reload({where: data.field}, 'data');
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 工具条点击事件
|
|
|
|
|
+ table.on('tool(dataTable)', function (obj) {
|
|
|
|
|
+ var data = obj.data;
|
|
|
|
|
+ var layEvent = obj.event;
|
|
|
|
|
+ if (layEvent === 'confirm') { // 审核
|
|
|
|
|
+ layer.confirm('确定要审核“' + data.order_no + '”的提现申请吗?', {
|
|
|
|
|
+ skin: 'layui-layer-admin',
|
|
|
|
|
+ shade: .1
|
|
|
|
|
+ }, function (i) {
|
|
|
|
|
+ layer.close(i);
|
|
|
|
|
+ layer.load(2);
|
|
|
|
|
+ admin.req('store/taxiuserwithdraw/' + data.id, {status: 20}, function (r) {
|
|
|
|
|
+ layer.closeAll('loading');
|
|
|
|
|
+ if (r.code === 10000) {
|
|
|
|
|
+ notice.msg(r.message, {icon: 1});
|
|
|
|
|
+ insTb.reload({}, 'data');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ notice.msg(r.message, {icon: 2});
|
|
|
|
|
+ }
|
|
|
|
|
+ }, 'PUT');
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (layEvent === 'refuse') { // 驳回
|
|
|
|
|
+ layer.confirm('确定要驳回“' + data.order_no + '”的提现申请吗?', {
|
|
|
|
|
+ skin: 'layui-layer-admin',
|
|
|
|
|
+ shade: .1
|
|
|
|
|
+ }, function (i) {
|
|
|
|
|
+ layer.close(i);
|
|
|
|
|
+ layer.load(2);
|
|
|
|
|
+ admin.req('store/taxiuserwithdraw/' + data.id, {status: 30}, function (r) {
|
|
|
|
|
+ layer.closeAll('loading');
|
|
|
|
|
+ if (r.code === 10000) {
|
|
|
|
|
+ notice.msg(r.message, {icon: 1});
|
|
|
|
|
+ insTb.reload({}, 'data');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ notice.msg(r.message, {icon: 2});
|
|
|
|
|
+ }
|
|
|
|
|
+ }, 'PUT');
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (layEvent === 'del') { // 删除
|
|
|
|
|
+ layer.confirm('确定要删除“' + data.order_no + '”的提现申请吗?', {
|
|
|
|
|
+ skin: 'layui-layer-admin',
|
|
|
|
|
+ shade: .1
|
|
|
|
|
+ }, function (i) {
|
|
|
|
|
+ layer.close(i);
|
|
|
|
|
+ layer.load(2);
|
|
|
|
|
+ admin.req('store/taxiuserwithdraw/' + data.id, function (r) {
|
|
|
|
|
+ layer.closeAll('loading');
|
|
|
|
|
+ if (r.code === 10000) {
|
|
|
|
|
+ notice.msg(r.message, {icon: 1});
|
|
|
|
|
+ insTb.reload({}, 'data');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ notice.msg(r.message, {icon: 2});
|
|
|
|
|
+ }
|
|
|
|
|
+ }, 'DELETE');
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+</script>
|