lyh 3 лет назад
Родитель
Сommit
a2e1a3ad38

+ 5 - 1
README.md

@@ -1 +1,5 @@
-hou'duan后端php1
+### 数据表修改记录
+
+```mysql
+alter table db_money_log add withdraw_log_id int(11) null COMMENT 'type = 14 退回手续费记录ID' AFTER uid2;
+```

+ 16 - 2
app/admin/controller/user/User.php

@@ -700,7 +700,7 @@ class User extends AdminController
             $this->success('成功');
         }
         $user              = $this->model->findOrEmpty(['id' => $this->request['id']]);
-        $user['type_map']   = ScoreLogLogic::getTypeMap();
+        $user['type_map']  = ScoreLogLogic::getTypeMap();
         $user['state_map'] = ScoreLogLogic::getStateMap();
         $this->assign('info', $user);
 
@@ -732,12 +732,26 @@ class User extends AdminController
             $this->success('成功');
         }
         $user              = $this->model->findOrEmpty(['id' => $this->request['id']]);
-        $user['type_map']   = MoneyLogLogic::getTypeMap();
+        $user['type_map']  = MoneyLogLogic::getTypeMap();
         $user['state_map'] = MoneyLogLogic::getStateMap();
         $this->assign('info', $user);
 
         return $this->fetch();
     }
 
+    /**
+     * 注销用户
+     * @param $id
+     */
+    public function deluser($id)
+    {
+        if ($this->request->isAjax()) {
+            $userLogic = new UserLogic();
+            $flag      = $userLogic->delUser($id);
+
+            $flag === true ? $this->success('删除成功') : $this->success('删除失败');
+        }
+    }
+
 
 }

+ 98 - 59
app/admin/controller/withdraw/Withdraw.php

@@ -4,17 +4,22 @@
  */
 
 namespace app\admin\controller\withdraw;
+
 use alipay\AopCertClient;
 use alipay\request\AlipayFundTransUniTransferRequest;
+use app\admin\logic\WithdrawLogLogic;
+use app\admin\model\dao\WithdrawLog;
 use app\admin\traits\Curd;
 use app\api\services\AliPayServices;
 use app\api\services\ThirdPayServices;
+use app\validate\admin\withdraw\withdraw\ReturnServiceMoney;
 use EasyAdmin\annotation\ControllerAnnotation;
 use EasyAdmin\annotation\NodeAnotation;
 use app\common\controller\AdminController;
 use app\common\model\WithDrawLogModel;
 use think\App;
 use think\Exception;
+use think\exception\ValidateException;
 use think\facade\Db;
 
 /**
@@ -24,17 +29,18 @@ use think\facade\Db;
  */
 class Withdraw extends AdminController
 {
-    public function __construct (App $app, WithDrawLogModel $model)
+    public function __construct(App $app, WithDrawLogModel $model)
     {
         parent::__construct($app);
         $this->model = $model;
     }
 
     use Curd;
+
     /**
      * @NodeAnotation(title="列表")
      */
-    public function index ()
+    public function index()
     {
         if ($this->request->isAjax()) {
             if (input('selectFields')) {
@@ -42,8 +48,8 @@ class Withdraw extends AdminController
             }
             list($page, $limit, $where) = $this->buildTableParames();
 
-            foreach ($where as $key=>&$val){
-                if ($val[0] == 'status'){
+            foreach ($where as $key => &$val) {
+                if ($val[0] == 'status') {
                     $where[$key][0] = 'w.status';
                 }
 
@@ -55,7 +61,7 @@ class Withdraw extends AdminController
                 ->where($this->user_map)
                 ->where($where)
                 ->count();
-            $list = $this->model
+            $list  = $this->model
                 ->alias('w')
                 ->leftJoin('user u', 'u.id = w.uid')
 //                ->withJoin('user', 'INNER')
@@ -66,7 +72,9 @@ class Withdraw extends AdminController
                 ->order($this->sort)
                 ->select();
 
-            foreach ($list as $key=>&$val){
+            $withdrawLog = new WithdrawLogLogic();
+
+            foreach ($list as $key => &$val) {
 
 //                老刘下级  13824334135  uid    5344367
 //                郑跃兵   17888779318     uid 5344369,13866400965 uid 5344368
@@ -93,32 +101,31 @@ class Withdraw extends AdminController
 //                }
 
 
-
-
 //                if (strpos($val['path'], '7493433') !== false){
 //                    $val['tips_text'] = '心态下级';
 //                }
 //
-                if (strpos($val['path'], '7493466') !== false){
+                if (strpos($val['path'], '7493466') !== false) {
                     $val['tips_text'] = '郑下级';
                 }
 
-                if ($val['luzi_money'] > 0){
+                if ($val['luzi_money'] > 0) {
                     $val['tips_text'] = '撸子标记,不要提现';
-                }else{
+                } else {
                     $val['tips_text'] = '';
                 }
 
+                $val['is_show'] = $withdrawLog->isShowReturnServiceMoney($val['id']);
 
 
             }
 
 //            tips_text
             $data = [
-                'code' => 0,
-                'msg' => '',
+                'code'  => 0,
+                'msg'   => '',
                 'count' => $count,
-                'data' => $list,
+                'data'  => $list,
             ];
             return json($data);
         }
@@ -146,23 +153,23 @@ class Withdraw extends AdminController
     /**
      * @NodeAnotation(title="提现失败")
      */
-    public function withdrawerror ($id)
+    public function withdrawerror($id)
     {
-        if ($this->request->isPost()){
+        if ($this->request->isPost()) {
             $post = $this->request->post();
-            $row = $this->model->where('id', $id)->where('status', 'in', '0')->find();
+            $row  = $this->model->where('id', $id)->where('status', 'in', '0')->find();
             empty($row) && $this->error('取消失败');
 
-            $row->status = 3;
-            $row->fail_log = $post['error_text'];
-            $is_backsx = $post['is_backsx'];
+            $row->status    = 3;
+            $row->fail_log  = $post['error_text'];
+            $is_backsx      = $post['is_backsx'];
             $row->is_backsx = $is_backsx;
 
             Db::startTrans();
             try {
-                if ($is_backsx == 1){
+                if ($is_backsx == 1) {
                     edit_user_money(10, $row['uid'], $row['apply_money']);
-                }else{
+                } else {
                     edit_user_money(10, $row['uid'], $row['practical_money']);
                 }
 
@@ -173,7 +180,7 @@ class Withdraw extends AdminController
                 Db::commit();
             } catch (\Exception $e) {
                 Db::rollback();
-                $this->error('取消失败'.$e->getMessage());
+                $this->error('取消失败' . $e->getMessage());
             }
             $this->success('取消成功');
         }
@@ -212,7 +219,7 @@ class Withdraw extends AdminController
     /**
      * @NodeAnotation(title="执行提现")
      */
-    public function tx ($id)
+    public function tx($id)
     {
 
 
@@ -226,7 +233,7 @@ class Withdraw extends AdminController
         if (empty($user) || $user['status'] != 1)
             $this->error('用户不存在或已被禁用');
 
-        if ($user['luzi_money'] > 0){
+        if ($user['luzi_money'] > 0) {
             $this->error('撸子账号 联系技术处理');
         }
 
@@ -235,54 +242,53 @@ class Withdraw extends AdminController
 //            $this->error('该用户还未实名认证');
 
 
-
         Db::name('user')->whereIn('id', $user['path'])->inc('total_team_withdraw', $info['apply_money'])->update();
         Db::name('user')->whereIn('id', $user['id'])->inc('total_team_withdraw', $info['apply_money'])->update();
 
         // 支付宝提现
-        if ($info['channel'] == 1){
+        if ($info['channel'] == 1) {
 
             // 电科支付宝提现代付
-            if(false){
+            if (false) {
                 Db::startTrans();
                 try {
 
                     $interface_url = 'http://1.14.197.47/proxy/pay/fetch'; //正式
-                    $out_trade_no = createdOrderWithdrawSn($info['uid']);
-                    $params = [
-                        'appId'=>'diankef',
-                        'version'=>'1.0',
-                        'nonceStr'=>nonce_str(15),
-                        'amount'=>intval($info['practical_money']*100),
-                        'orderId'=>$out_trade_no,
-                        'accountName'=>$info['zfb_name'],
-                        'accountNo'=>$info['zfb_number'],
-                        'bankName'=>'网商银行',
-                        'asyncNotifyUrl'=>env('PAYSQZ.PAYBACK_DAIFU_ZFB_NEWURL'),
-                        'quick'=>1,
-                        'subject'=>'余额提现'
+                    $out_trade_no  = createdOrderWithdrawSn($info['uid']);
+                    $params        = [
+                        'appId'          => 'diankef',
+                        'version'        => '1.0',
+                        'nonceStr'       => nonce_str(15),
+                        'amount'         => intval($info['practical_money'] * 100),
+                        'orderId'        => $out_trade_no,
+                        'accountName'    => $info['zfb_name'],
+                        'accountNo'      => $info['zfb_number'],
+                        'bankName'       => '网商银行',
+                        'asyncNotifyUrl' => env('PAYSQZ.PAYBACK_DAIFU_ZFB_NEWURL'),
+                        'quick'          => 1,
+                        'subject'        => '余额提现'
                     ];
 
                     ksort($params);
-                    $services = new ThirdPayServices();
+                    $services       = new ThirdPayServices();
                     $params['sign'] = $services->diankesigndf($params);
 
 
                     //        提交确定支付
-                    sr_log('确认提交提现'.json_encode($params));
+                    sr_log('确认提交提现' . json_encode($params));
                     $result = curlPost($interface_url, $params);
-                    sr_log('result:'.$result);
+                    sr_log('result:' . $result);
 
                     $res = json_decode($result);
-                    if (isset($res->status) && $res->status==9){
+                    if (isset($res->status) && $res->status == 9) {
                         Db::name('withdraw_log')->where('id', $id)->update(['status' => 4, 'out_biz_no' => $out_trade_no, 'update_at' => date('Y-m-d H:i:s', time()), 'final_transfer_type' => 1]);
 
-                    }else{
+                    } else {
                         sr_throw('支付错误,请联系客服');
                     }
 
                     Db::commit();
-                }catch (\Exception $e){
+                } catch (\Exception $e) {
                     Db::rollback();
 
                     $this->error($e->getMessage());
@@ -294,7 +300,6 @@ class Withdraw extends AdminController
             $this->success('提现成功');
 
 
-
 //            try {
 ////
 //                /** 初始化 **/
@@ -403,9 +408,9 @@ class Withdraw extends AdminController
 //                sr_log($e->getMessage());
 //                $this->error('提现失败');
 //            }
-        }else{
-            $info->status = 1;
-            $info->update_at = date('Y-m-d H:i:s', time());
+        } else {
+            $info->status              = 1;
+            $info->update_at           = date('Y-m-d H:i:s', time());
             $info->final_transfer_type = 3;
 
             $info->save();
@@ -429,24 +434,25 @@ class Withdraw extends AdminController
 //        }
         $this->success('提现成功');
     }
+
     /**
      * @NodeAnotation(title="导出")
      */
-    public function export ()
+    public function export()
     {
         list($page, $limit, $where) = $this->buildTableParames();
         $tableName = $this->model->getName();
         $tableName = CommonTool::humpToLine(lcfirst($tableName));
-        $prefix = config('database.connections.mysql.prefix');
-        $dbList = Db::query("show full columns from {$prefix}{$tableName}");
-        $header = [];
+        $prefix    = config('database.connections.mysql.prefix');
+        $dbList    = Db::query("show full columns from {$prefix}{$tableName}");
+        $header    = [];
         foreach ($dbList as $vo) {
             $comment = !empty($vo['Comment']) ? $vo['Comment'] : $vo['Field'];
             if (!in_array($vo['Field'], $this->noExportFields)) {
                 $header[] = [$comment, $vo['Field']];
             }
         }
-        $list = $this->model
+        $list     = $this->model
             ->where($where)
             ->withJoin('user', 'INNER')
             ->where($where)
@@ -457,17 +463,50 @@ class Withdraw extends AdminController
         $fileName = time();
         return Excel::exportData($list, $header, $fileName, 'xlsx');
     }
+
     /**
      * @NodeAnotation(title="提现数据")
      */
-    public function withdrawdata(){
+    public function withdrawdata()
+    {
 
-        $tx_success =  Db::name('withdraw_log')->where('status', 1)->sum('practical_money');
+        $tx_success = Db::name('withdraw_log')->where('status', 1)->sum('practical_money');
         $this->assign('tx_success', $tx_success);
 
-        $tx =  Db::name('withdraw_log')->where('status', 0)->sum('practical_money');
+        $tx = Db::name('withdraw_log')->where('status', 0)->sum('practical_money');
         $this->assign('tx', $tx);
 
         return $this->fetch();
     }
+
+    /**
+     * 退还手续费
+     * @return mixed
+     */
+    public function returnservicemoney()
+    {
+        $id = $this->request['id'];
+
+        $withdrawLog = new WithdrawLogLogic();
+        if ($this->request->isPost()) {
+            $post = $this->request->post();
+
+            try {
+                validate(ReturnServiceMoney::class)->check($post);
+            } catch (ValidateException $e) {
+                $this->error($e->getMessage());
+            }
+
+            $result = $withdrawLog->returnServiceMoney($post);
+            if ($result !== true) {
+                $this->error($result);
+            }
+
+            $this->success('成功');
+        }
+        $withdrawLog->getWithdrawLog($id);
+        $this->assign('info', $withdrawLog);
+
+        return $this->fetch();
+    }
 }

+ 2 - 1
app/admin/logic/MoneyLogLogic.php

@@ -14,7 +14,7 @@ use think\facade\Db;
 class MoneyLogLogic
 {
 
-    // 1.积分兑换  2.提现  3.购买商品  4.积分兑换  5.广告任务包分红,6-团队收益,8-利润结算兑换,10-提现失败退还,12-平台充补,13-平台扣除',
+    // 1.积分兑换  2.提现  3.购买商品  4.积分兑换  5.广告任务包分红,6-团队收益,8-利润结算兑换,10-提现失败退还,12-平台充补,13-平台扣除 14-提现失败退还手续费',
     private static $typeMap = [
         ['id' => 0, 'name' => '其他'],
         ['id' => 1, 'name' => '积分兑换'],
@@ -27,6 +27,7 @@ class MoneyLogLogic
         ['id' => 10, 'name' => '提现失败退还'],
         ['id' => 12, 'name' => '平台充补'],
         ['id' => 13, 'name' => '平台扣除'],
+        ['id' => 14, 'name' => '提现失败退还手续费'],
     ];
 
     private static $stateMap = [

+ 2 - 2
app/admin/logic/ShopOrderLogic.php

@@ -13,9 +13,9 @@ class ShopOrderLogic
     private static $statusMap = [
         ['id' => 0, 'name' => '待付款'],
         ['id' => 1, 'name' => '待发货'],
-        ['id' => 2, 'name' => '已发货'],
+//        ['id' => 2, 'name' => '已发货'],
         ['id' => 3, 'name' => '取消订单'],
-        ['id' => 4, 'name' => '已完成']
+//        ['id' => 4, 'name' => '已完成']
     ];
 
     /**

+ 16 - 0
app/admin/logic/UserLogic.php

@@ -305,4 +305,20 @@ class UserLogic
 
         return true;
     }
+
+    /**
+     * 删除用户
+     * @param $id
+     */
+    public function delUser($id)
+    {
+        $user = User::getUserById($id);
+        if (empty($user)) {
+            return "用户不存在";
+        }
+        if (User::updateState($id, 3) !== 1) {
+            return false;
+        }
+        return true;
+    }
 }

+ 90 - 0
app/admin/logic/WithdrawLogLogic.php

@@ -0,0 +1,90 @@
+<?php
+
+
+namespace app\admin\logic;
+
+
+use app\admin\model\dao\MoneyLog;
+use app\admin\model\dao\ScoreLog;
+use app\admin\model\dao\ShopOrder;
+use app\admin\model\dao\User;
+use app\admin\model\dao\WithdrawLog;
+use think\facade\Cache;
+use think\facade\Db;
+
+class WithdrawLogLogic
+{
+
+    public function returnServiceMoney($post)
+    {
+        $withdrawLog = WithdrawLog::getWithdrawLogById($post['id']);
+        if (empty($withdrawLog)) {
+            return "记录不存在";
+        }
+
+        if ($withdrawLog['status'] != 3) {
+            return "该提现记录不可以退还服务费";
+        }
+
+        if ($withdrawLog['service_money'] < $post['service_money']) {
+            return "提现金额不可以大于服务费";
+        }
+
+        $moneyLog = MoneyLog::getMoneyLogByFromId($post['id']);
+        if ($moneyLog) {
+            return "当前提现记录已退还服务费";
+        }
+
+        Db::startTrans();
+        try {
+            $afterMoney   = $withdrawLog['service_money'] + $post['service_money'];
+            $moneyLog     = [
+                'uid'             => $withdrawLog['uid'],
+                'type'            => 14,
+                'money'           => $post['service_money'],
+                'create_at'       => date('Y-m-d H:i:s'),
+                'state'           => 1,
+                'from_id'         => '0',
+                'before_money'    => $withdrawLog['service_money'],
+                'after_money'     => $afterMoney,
+                'uid2'            => 0,
+                'free_type'       => '',
+                'remark'          => $post['remark'],
+                'withdraw_log_id' => $withdrawLog['id'],
+            ];
+            $serviceMoney = $withdrawLog['service_money'] - $post['service_money'];
+            WithdrawLog::updateServiceMoney($withdrawLog['id'], $serviceMoney);
+            MoneyLog::AddMoneyLog($moneyLog);
+            User::UpdateUserMoney($withdrawLog['uid'], $afterMoney);
+            Db::commit();
+        } catch (\Exception $exception) {
+            Db::rollback();
+            return "失败:" . $exception->getMessage();
+        }
+
+        return true;
+    }
+
+    public function getWithdrawLog($id)
+    {
+        $withdrawLog = WithdrawLog::getWithdrawLogById($id);
+
+
+        return $withdrawLog;
+    }
+
+    public function isShowReturnServiceMoney($id)
+    {
+        $key = 'WITHDRAWLOGRETURNSERVICEMONEY_' . $id;
+        if (Cache::has($key) && 1 == 2) {
+            return Cache::get($key);
+        }
+
+        $moneyLog = MoneyLog::getMoneyLogByFromId($id);
+
+        $isShow = $moneyLog ? 1 : 0;
+        Cache::set($key, $isShow, 5 * 60);
+        return $isShow;
+
+    }
+}

+ 11 - 0
app/admin/model/dao/MoneyLog.php

@@ -19,4 +19,15 @@ class MoneyLog extends BaseDao
     {
         Db::table(self::$table)->insert($moneyLog);
     }
+
+    public static function getMoneyLogByFromId($id)
+    {
+        return Db::table(self::$table)
+            ->where([
+                'type'            => 14,
+                'state'           => 1,
+                'withdraw_log_id' => $id,
+            ])
+            ->find();
+    }
 }

+ 10 - 0
app/admin/model/dao/User.php

@@ -81,6 +81,16 @@ class User extends BaseDao
             ]);
     }
 
+    public static function updateState($id, int $status)
+    {
+        return Db::table(self::$table)
+            ->where(['id' => $id])
+            ->update([
+                'status'      => $status,
+                'update_time' => date('Y-m-d H:i:s')
+            ]);
+    }
+
     public function getCount($where, $userMap)
     {
         return $this->model

+ 37 - 0
app/admin/model/dao/WithdrawLog.php

@@ -0,0 +1,37 @@
+<?php
+
+
+namespace app\admin\model\dao;
+
+
+use app\common\model\UserModel;
+use think\facade\Db;
+
+class WithdrawLog extends BaseDao
+{
+
+
+    protected $model;
+
+    public static $table = "db_withdraw_log";
+
+    public function __construct()
+    {
+        $this->model = new UserModel();
+    }
+
+    public static function getWithdrawLogById($id)
+    {
+        return Db::table(self::$table)->where(['id' => $id])->find();
+    }
+
+    public static function updateServiceMoney($id, $serviceMoney)
+    {
+        return Db::table(self::$table)->where(['id' => $id])
+            ->update([
+                'service_money' => $serviceMoney,
+                'update_at'   => date('Y-m-d H:i:s')
+            ]);
+    }
+
+}

+ 82 - 0
app/admin/view/withdraw/withdraw/returnservicemoney.html

@@ -0,0 +1,82 @@
+<style>
+    .layui-iconpicker-body.layui-iconpicker-body-page .hide {
+        display: none;
+    }
+</style>
+<link rel="stylesheet" href="__STATIC__/plugs/lay-module/autocomplete/autocomplete.css?v={$version}" media="all">
+<div class="layuimini-container">
+    <form id="app-form" class="layui-form layuimini-form">
+
+        <div class="layui-form-item  layui-row layui-col-xs12">
+            <label class="layui-form-label required">退还服务费</label>
+            <div class="layui-input-block">
+                <input type="text" name="service_money" id="service_money" class="layui-input" lay-verify="required"
+                       lay-reqtext="请输入退还服务费金额"
+                       placeholder="请输入退还服务费金额" value="">
+            </div>
+        </div>
+
+        <div class="layui-form-item  layui-row layui-col-xs12">
+            <label class="layui-form-label required">备注</label>
+            <div class="layui-input-block">
+                <textarea name="remark" required lay-verify="required" placeholder="请输入备注" class="layui-textarea"></textarea>
+            </div>
+        </div>
+
+        <input type="hidden" name="id" value="{$Request.param.id}">
+        <div class="hr-line"></div>
+        <div class="layui-form-item text-center">
+            <button type="button" data-id="{$Request.param.id}"
+                    class="layui-btn layui-btn-normal layui-btn-sm" lay-filter="returnservicemoney" lay-submit
+                    data-refresh="true">确认
+            </button>
+            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
+        </div>
+    </form>
+</div>
+
+<script>
+    layui.use('form', function () {
+        var form = layui.form;
+        form.render();
+    })
+</script>
+
+
+<script>
+    layui.use(['jquery', 'layer'], function () {
+        var $ = layui.$ //重点处
+            , layer = layui.layer
+            , form = layui.form;
+
+        form.on('submit(returnservicemoney)', function(data){
+            layer.load(1);
+            layer.confirm('确定要退还服务费吗?', {
+                btn: ['确定', '取消'] //按钮
+            }, function () {
+                layer.load(1);
+                $.post("{:url('withdraw.withdraw/returnservicemoney')}", data.field, function (result) {
+                    console.log(result)
+                    if (result.code == 1) {
+                        layer.closeAll();
+                        layer.alert(result.msg, {
+                            yes: function () {
+                                window.location.reload();
+                            }, cancel: function () {
+                                window.location.reload();
+                            }
+                        });
+                    } else {
+                        layer.alert(result.msg, function(index){
+                            window.location.reload();
+                            layer.close(index);
+                        });
+
+                    }
+                });
+            });
+            //return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
+        });
+    });
+
+</script>

+ 3 - 3
app/validate/admin/user/user/ModifyMoney.php

@@ -9,18 +9,18 @@ class ModifyMoney extends Validate
 {
     protected $rule = [
         'uid'     => 'require|integer',
-        'money'   => 'require|number|between:0,1000000',
+        'money'   => 'require|float|between:0,1000000',
         'state'   => 'require|in:1,2',
         'type'    => 'require|between:0,100',
         'from_id' => 'integer',
-        'remark'  => 'length:0,25',
+        'remark'  => 'length:0,50',
     ];
 
     protected $message = [
         'uid.require'     => 'UID不能为空',
         'uid.integer'     => 'UID格式错误',
         'money.require'   => '余额不能为空',
-        'money.number'    => '余额格式错误',
+        'money.float'    => '余额格式错误',
         'money.between'   => '余额变更数量超出范围',
         'state.require'   => '变动类型不能为空',
         'state.integer'   => '变动类型格式错误',

+ 24 - 0
app/validate/admin/withdraw/withdraw/ReturnServiceMoney.php

@@ -0,0 +1,24 @@
+<?php
+declare (strict_types=1);
+
+namespace app\validate\admin\withdraw\withdraw;
+
+use think\Validate;
+
+class ReturnServiceMoney extends Validate
+{
+    protected $rule = [
+        'id'            => 'require|integer',
+        'service_money' => 'require|float|between:0,1000000',
+        'remark'        => 'length:0,50',
+    ];
+
+    protected $message = [
+        'id.require'            => 'id不能为空',
+        'id.integer'            => 'id格式错误',
+        'service_money.require' => '退还手续费不能为空',
+        'service_money.float'   => '退还手续费格式错误',
+        'remark.require'        => '备注不能为空',
+        'remark.length'         => '备注长度不能超过50个字符',
+    ];
+}

+ 1 - 1
config/app.php

@@ -42,7 +42,7 @@ return [
     // 错误显示信息,非调试模式有效
     'error_message'    => '页面错误!请稍后再试~',
     // 显示错误信息
-    'show_error_msg'   => true,
+    'show_error_msg'   => false,
     // 静态资源上传到OSS前缀
     'oss_static_prefix'   => Env::get('easyadmin.oss_static_prefix', 'static_easyadmin'),
 ];

+ 3 - 0
public/static/admin/js/user/user.js

@@ -128,6 +128,9 @@ define(["jquery", "easy-admin"], function ($, ea) {
                             if (ea.checkAuth('modifypid', init.table_elem)) {
                                 button += '<button class="layui-btn layui-btn-xs layui-btn-normal" data-open="user.user/modifypid?id=' + d.id + '" data-title="修改上级">修改上级</button>';
                             }
+                            if (ea.checkAuth('userdel', init.table_elem)) {
+                                button += '<button class="layui-btn layui-btn-xs layui-btn-danger" data-request="user.user/deluser?id=' + d.id + '" data-title="确认执行注销?" data-full="true">注销</button>';
+                            }
 
                             // if (ea.checkAuth('lookpidlevel', init.table_elem)) {
                             //     button += '<button class="layui-btn layui-btn-xs layui-btn-normal" data-open="user.user/teamincome?id=' + d.id + '" data-title="团队下级充值记录">团队充值</button>';

+ 11 - 7
public/static/admin/js/withdraw/withdraw.js

@@ -15,7 +15,7 @@ define(["jquery", "easy-admin"], function ($, ea) {
                 toolbar: ['refresh', 'export'],
                 cols: [[
                     {type: "checkbox"},
-                    {field: 'id', width: 100, title: 'ID', search:false},
+                    {field: 'id', width: 100, title: 'ID', search: false},
                     {field: 'w_ordersn', minWidth: 180, title: '提现商户订单号(我的内部)'},
                     {
                         field: 'status', minWidth: 120, title: '提现状态', templet: function (d) {
@@ -35,7 +35,7 @@ define(["jquery", "easy-admin"], function ($, ea) {
                                 return '<span class="layui-btn layui-btn-xs layui-btn-disabled">已经提交</span>';
                             }
                         },
-                     selectList: {0: '提现中', 1: '提现成功', 2:'提现失败', 3:'已取消'}
+                        selectList: {0: '提现中', 1: '提现成功', 2: '提现失败', 3: '已取消'}
                     },
                     {field: 'uid', width: 120, title: '用户UID'},
 
@@ -54,9 +54,11 @@ define(["jquery", "easy-admin"], function ($, ea) {
                     {field: 'zfb_number', minWidth: 150, title: '支付宝账号'},
                     {field: 'zfb_name', minWidth: 120, title: '支付宝真实姓名'},
                     {field: 'real_name', minWidth: 120, title: '银行卡真实姓名'},
-                    {field: 'bank_no', minWidth: 180, title: '银行卡账号', templet:function (d){
-                        return '银行卡 '+ d.bank_no;
-                        }},
+                    {
+                        field: 'bank_no', minWidth: 180, title: '银行卡账号', templet: function (d) {
+                            return '银行卡 ' + d.bank_no;
+                        }
+                    },
                     {field: 'bank_name', minWidth: 150, title: '银行卡名字'},
                     {field: 'mchid', minWidth: 120, title: '提现商户'},
                     {field: 'transfer_type', minWidth: 120, title: '申请提现方式', selectList: {1: '自动', 2: '手动', 3: '线下'}},
@@ -82,9 +84,11 @@ define(["jquery", "easy-admin"], function ($, ea) {
                             // if (ea.checkAuth('cancel', init.table_elem) && (d.status == 0)) {
                             if ((d.status == 0)) {
                                 // if (d.channel != 1){
-                                    button += '<button class="layui-btn layui-btn-xs layui-btn-danger" data-open="withdraw.withdraw/withdrawerror?id=' + d.id + '" data-title="充值失败">提现失败</button>';
+                                button += '<button class="layui-btn layui-btn-xs layui-btn-danger" data-open="withdraw.withdraw/withdrawerror?id=' + d.id + '" data-title="充值失败">提现失败</button>';
                                 // }
-
+                            }
+                            if ((d.status == 3) && (d.is_show == 0)) {
+                                button += '<button class="layui-btn layui-btn-xs layui-btn-normal" data-open="withdraw.withdraw/returnservicemoney?id=' + d.id + '" data-title="退还手续费">退还手续费</button>';
                             }
                             return button;
                         },

+ 1 - 1
runtime/admin/cache/8c/6565319d3230091141e6ef012b4567.php

@@ -1,4 +1,4 @@
 <?php
 //000000003600
  exit();?>
-s:9:"填你的";
+s:0:"";

+ 1 - 1
runtime/admin/cache/90/e939771e274fbf5126a2eef67c167e.php

@@ -1,4 +1,4 @@
 <?php
 //000000003600
  exit();?>
-s:9:"填你的";
+s:6:"多宝";