WIN-2308041133\Administrator 6 months ago
parent
commit
9ae23cea8d

+ 71 - 45
application/admin/controller/general/Txmx.php

@@ -65,71 +65,94 @@ class Txmx extends Backend
         if ($this->request->isPost()) {
             $params = $this->request->post("row/a");
             if ($params) {
-                $site=config('site');
-                $money=$params['money'];
-                if($money<$site['zstx']){
-                    $this->error($site['txbz']);  
+                $site = config('site');
+                $money = $params['money'];
+                if ($money < $site['zstx']) {
+                    $this->error($site['txbz']);
                 }
-                if(!$params['type']){
+                if (!$params['type']) {
                     $this->error('请填写提现类型');
                 }
-                if(!$params['name']){
+                if (!$params['name']) {
                     $this->error('请填写提现名字');
                 }
-                if(!$params['cord']){
+                if (!$params['cord']) {
                     $this->error('请填写提现帐号');
                 }
-                $user_id=$this->auth->id;
-                $vadmin=Db::name('admin')->where('id',$user_id)->find();
+                $user_id = $this->auth->id;
+                $vadmin = Db::name('admin')->where('id', $user_id)->find();
                 if ($vadmin && $money != 0) {
-                    if($vadmin['money']<$money){
-                       $this->error('余额不足'); 
+                    if ($vadmin['money'] < $money) {
+                        $this->error('余额不足');
                     }
                     Db::startTrans();
                     try {
-                        $moneys=$money;
+                        $moneys = $money;
                         //更新会员信息
                         $before = $vadmin['money'];
                         $after = $vadmin['money'] - $moneys;
-                        Db::name('admin') ->where('id',$user_id)->setDec('money', $moneys);
+                        Db::name('admin')->where('id', $user_id)->setDec('money', $moneys);
                         //写入日志
-                        Db::name('admin_money_log')->insertGetId(['admin_id' =>$user_id, 'money' => $moneys,'createtime' => time(),'before' => $before, 'after' => $after, 'memo' => '用户提现']);
-                        
-                        $site['txsxf']=isset($site['txsxf'])?$site['txsxf']:0;
-                        $sxf=$money*$site['txsxf'];
-                        $up=[
-                                'admin_id' => $user_id,
-                                'type' => $params['type'],
-                                'name' => $params['name'],
-                                'cord' => $params['cord'], 
-                                'money' => $money, 
-                                'moneydz' => $money-$sxf, 
-                                'sxf' => $sxf,
-                                'iscl' => 1,
-                                'islx' => 2,
-                                'memo' => '后台用户提现'
-                            ];
+                        Db::name('admin_money_log')->insertGetId(['admin_id' => $user_id, 'money' => $moneys, 'createtime' => time(), 'before' => $before, 'after' => $after, 'memo' => '用户提现']);
+
+                        $site['txsxf'] = isset($site['txsxf']) ? $site['txsxf'] : 0;
+                        $sxf = $money * $site['txsxf'];
+                        $up = [
+                            'admin_id' => $user_id,
+                            'type' => $params['type'],
+                            'name' => $params['name'],
+                            'cord' => $params['cord'],
+                            'money' => $money,
+                            'moneydz' => $money - $sxf,
+                            'sxf' => $sxf,
+                            'iscl' => 1,
+                            'islx' => 2,
+                            'memo' => '后台用户提现'
+                        ];
                         //写入提现记录
-                        Txjl::create($up);  
+                        Txjl::create($up);
                         $admin = Admin::get($this->auth->id);
                         Session::set("admin", $admin->toArray());
                         Db::commit();
                         $this->success('提交成功');
-                    }catch (Exception $e){
+                    } catch (Exception $e) {
                         Db::rollback();
                         $this->error($e->getMessage());
                     }
-                    
-                }else{
-                   $this->error(__('金额不对')); 
+
+                } else {
+                    $this->error(__('金额不对'));
                 }
             }
             $this->error();
         }
         return;
     }
+//    public function summary(){
+//        $blockchain = config('blockchain');
+//        $trcUsdtAddress=$blockchain['trc']['tokens']['usdt']['address'];
+//        $trcgasAddress = $blockchain['trc']['tokens']['usdt']['gas_address'];
+//        $bscUsdtAddress = $blockchain['bsc']['tokens']['usdt']['address'];
+//        $bscgasAddress = $blockchain['bsc']['tokens']['usdt']['gas_address'];
+//        $list = Db::name('user_usdt_address')->where('last_recharge','>',0)->select();
+//        foreach ($list as $key => $value) {
+//            $trx_money_info = [
+//                'address' => $value['trx_address'],
+//                'hexAddress' => $value['trx_16_address'],
+//                'privateKey' => $value['trx_key'],
+//            ];
+//            $this->trx_summary($trx_money_info,$trcUsdtAddress,$trcgasAddress );
+//            $bsc_money_info = [
+//                'address' => $value['bsc_address'],
+//                'privateKey' => $value['bsc_address	'],
+//            ];
+//            $this->bsc_summary($bsc_money_info,$bscUsdtAddress,$bscgasAddress );
+//        }
+//    }
+
 //    归集(把所有用户的USDT归集到指定地址)
-    public function summary(){
+    public function summary()
+    {
         $blockchain = config('blockchain');
 
         // TRC 配置
@@ -174,6 +197,7 @@ class Txmx extends Backend
         }
 
     }
+
     public function trx_summary(array $money_info, string $summary_address, Address $gas_address): bool
     {
         //实例化TRON
@@ -183,18 +207,19 @@ class Txmx extends Backend
         //获取代币余额
         $balance = $service->tokenBalance($money_info['address']);
         //USDT余额大于0,触发归集
-//        if ($balance > 0) {
+        if ($balance > 0) {
             //查询地址中主币【GAS费余额】
             $trx_balance = $service->balance($money_info['address']);
-            var_dump(get_object_vars($gas_address));
-            var_dump($trx_balance);die();
+
+            $gas_address_arr = get_object_vars($gas_address);
+
             if ($trx_balance < 30) {
                 //如果主币小于30个,即gas费不够【BSC的gas费需要比较少,大约0.001个bnb就不少了,按照实际情况设置】
                 //计算要达到30个trx需要再转几个给用户地址
                 $trade_trx = ceil(30 - $trx_balance);
                 //处理手续费转账,从系统地址分配gas给用户
                 //查询系统地址的TRX余额
-                $gas_trx_balance = $service->balance($gas_address);
+                $gas_trx_balance = $service->balance($gas_address_arr['address']);
                 //系统地址TRX余额不足,退出处理
                 if ($gas_trx_balance < $trade_trx + 2) {
                     Log::error('手续费账户余额不足');
@@ -203,7 +228,7 @@ class Txmx extends Backend
                 try {
                     //执行转账
                     $res = $service->transfer($gas_address, $address, $trade_trx);
-                    GasLog::create(['to_address' => $address, 'num' =>$trade_trx  , 'type' =>'trx']);
+                    GasLog::create(['to_address' => $address, 'num' => $trade_trx, 'type' => 'trx']);
                     if (isset($res->txID)) {
                         Log::error('转账TRX交易哈希:' . $res->txID);
                         return true;
@@ -233,11 +258,10 @@ class Txmx extends Backend
                     return false;
                 }
             }
-//        }else{
-//        Log::error('代币不足');
-//}
+        }
         return true;
     }
+
     public function bsc_summary(array $money_info, string $summary_address, Address $gas_address): bool
     {
         //实例化TRON
@@ -256,7 +280,9 @@ class Txmx extends Backend
                 $trade_trx = ceil(30 - $trx_balance);
                 //处理手续费转账,从系统地址分配gas给用户
                 //查询系统地址的TRX余额
-                $gas_trx_balance = $service->getBalance($gas_address);
+                $gas_address_arr = get_object_vars($gas_address);
+
+                $gas_trx_balance = $service->getBalance($gas_address_arr['address']);
                 //系统地址TRX余额不足,退出处理
                 if ($gas_trx_balance < $trade_trx + 2) {
                     Log::error('手续费账户余额不足');
@@ -265,7 +291,7 @@ class Txmx extends Backend
                 try {
                     //执行转账
                     $res = $service->transfer($address, $trade_trx);
-                    GasLog::create(['to_address' => $address, 'num' =>$trade_trx  , 'type' =>'bsc']);
+                    GasLog::create(['to_address' => $address, 'num' => $trade_trx, 'type' => 'bsc']);
                     if (isset($res->txID)) {
                         Log::error('转账BSC交易哈希:' . $res->txID);
                         return true;

+ 502 - 84
application/admin/view/general/txmx/index.html

@@ -1,106 +1,524 @@
-<style>
-    .profile-avatar-container {
-        position: relative;
-        width: 100px;
-        margin: 0 auto;
-    }
-
-    .profile-avatar-container .profile-user-img {
-        width: 100px;
-        height: 100px;
-    }
-
-    .profile-avatar-container .profile-avatar-text {
-        display: none;
-    }
-
-    .profile-avatar-container:hover .profile-avatar-text {
-        display: block;
-        position: absolute;
-        height: 100px;
-        width: 100px;
-        background: #444;
-        opacity: .6;
-        color: #fff;
-        top: 0;
-        left: 0;
-        line-height: 100px;
-        text-align: center;
-    }
-
-    .profile-avatar-container button {
-        position: absolute;
-        top: 0;
-        left: 0;
-        width: 100px;
-        height: 100px;
-        opacity: 0;
-    }
-</style>
-<div class="row animated fadeInRight">
-    <div class="col-md-4">
-        <div class="box box-success">
-            <div class="panel-heading">
-                {:__('Profile')}
-            </div>
-            <div class="panel-body">
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>用户控制台 - 提现管理</title>
+    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
+    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
+    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css">
+    <style>
+        :root {
+            --primary-color: #3498db;
+            --success-color: #2ecc71;
+            --warning-color: #f39c12;
+            --danger-color: #e74c3c;
+            --light-bg: #f8f9fa;
+            --dark-bg: #343a40;
+        }
 
-                <form id="update-form" role="form" data-toggle="validator" method="POST" action="{:url('general.txmx/update')}">
-                    <div class="box-body box-profile">
-                        <div class="form-group">
-                            <label for="money" class="control-label">{:__('余额')}:</label>
-                            <input type="text" class="form-control" id="money" name="row[money]" value="{$admin.money|htmlentities}" data-rule="required"  disabled />
-                        </div>
+        body {
+            background-color: #f5f7fb;
+            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
+        }
+
+        .profile-avatar-container {
+            position: relative;
+            width: 100px;
+            margin: 0 auto;
+        }
+
+        .profile-avatar-container .profile-user-img {
+            width: 100px;
+            height: 100px;
+        }
+
+        .profile-avatar-container .profile-avatar-text {
+            display: none;
+        }
+
+        .profile-avatar-container:hover .profile-avatar-text {
+            display: block;
+            position: absolute;
+            height: 100px;
+            width: 100px;
+            background: #444;
+            opacity: .6;
+            color: #fff;
+            top: 0;
+            left: 0;
+            line-height: 100px;
+            text-align: center;
+        }
+
+        .profile-avatar-container button {
+            position: absolute;
+            top: 0;
+            left: 0;
+            width: 100px;
+            height: 100px;
+            opacity: 0;
+        }
+
+        .box {
+            border-radius: 8px;
+            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
+            border: none;
+            margin-bottom: 25px;
+            transition: transform 0.3s ease;
+        }
+
+        .box:hover {
+            transform: translateY(-5px);
+            box-shadow: 0 6px 12px rgba(0,0,0,0.1);
+        }
+
+        .box-success {
+            border-top: 3px solid var(--success-color);
+        }
+
+        .panel-heading {
+            background-color: #fff;
+            padding: 15px 20px;
+            border-bottom: 1px solid #eee;
+            font-weight: 600;
+            color: #2c3e50;
+            font-size: 18px;
+            border-radius: 8px 8px 0 0;
+        }
+
+        .panel-body {
+            padding: 20px;
+            background-color: #fff;
+            border-radius: 0 0 8px 8px;
+        }
+
+        .form-control {
+            border-radius: 4px;
+            padding: 10px 15px;
+            border: 1px solid #ddd;
+            margin-bottom: 15px;
+        }
+
+        .btn-success {
+            background-color: var(--success-color);
+            border: none;
+            padding: 10px 20px;
+            font-weight: 600;
+            transition: all 0.3s;
+        }
+
+        .btn-success:hover {
+            background-color: #27ae60;
+            transform: translateY(-2px);
+        }
+
+        .nav-tabs {
+            border-bottom: 2px solid #eee;
+        }
+
+        .nav-tabs li a {
+            color: #7f8c8d;
+            font-weight: 500;
+            padding: 10px 20px;
+            border-radius: 4px 4px 0 0;
+        }
+
+        .nav-tabs li.active a {
+            color: var(--primary-color);
+            border-bottom: 3px solid var(--primary-color);
+            background: transparent;
+        }
+
+        .table {
+            border-collapse: separate;
+            border-spacing: 0;
+            width: 100%;
+            background: #fff;
+            border-radius: 8px;
+            overflow: hidden;
+            box-shadow: 0 2px 4px rgba(0,0,0,0.03);
+        }
+
+        .table th {
+            background-color: #f8f9fa;
+            color: #2c3e50;
+            font-weight: 600;
+            padding: 12px 15px;
+            border-top: none;
+        }
+
+        .table td {
+            padding: 12px 15px;
+            border-top: 1px solid #eee;
+        }
+
+        .toolbar {
+            padding: 15px 0;
+            display: flex;
+            align-items: center;
+            gap: 10px;
+        }
+
+        .btn-refresh, .btn-summary {
+            display: flex;
+            align-items: center;
+            gap: 5px;
+            padding: 8px 15px;
+            border-radius: 4px;
+            font-weight: 500;
+            transition: all 0.2s;
+        }
+
+        .btn-refresh {
+            background-color: var(--primary-color);
+            color: white;
+        }
+
+        .btn-refresh:hover {
+            background-color: #2980b9;
+            color: white;
+        }
+
+        .btn-summary {
+            background-color: var(--warning-color);
+            color: white;
+        }
+
+        .btn-summary:hover {
+            background-color: #e67e22;
+            color: white;
+        }
+
+        .btn-summary.loading i {
+            animation: spin 1s linear infinite;
+        }
+
+        @keyframes spin {
+            0% { transform: rotate(0deg); }
+            100% { transform: rotate(360deg); }
+        }
+
+        .balance-card {
+            background: linear-gradient(135deg, #3498db, #8e44ad);
+            color: white;
+            border-radius: 8px;
+            padding: 20px;
+            margin-bottom: 20px;
+            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
+        }
+
+        .balance-label {
+            font-size: 14px;
+            opacity: 0.8;
+        }
+
+        .balance-amount {
+            font-size: 28px;
+            font-weight: 700;
+            margin: 5px 0;
+        }
+
+        .withdraw-info {
+            background-color: #f8f9fa;
+            padding: 15px;
+            border-radius: 8px;
+            margin-bottom: 20px;
+        }
+
+        .withdraw-info p {
+            margin-bottom: 8px;
+            font-size: 14px;
+        }
+
+        .no-data {
+            text-align: center;
+            padding: 40px 20px;
+            color: #7f8c8d;
+        }
+
+        .no-data i {
+            font-size: 48px;
+            margin-bottom: 15px;
+            color: #bdc3c7;
+        }
+
+        .status-badge {
+            padding: 4px 10px;
+            border-radius: 12px;
+            font-size: 12px;
+            font-weight: 500;
+        }
+
+        .status-pending {
+            background-color: #fef9e7;
+            color: #f39c12;
+        }
+
+        .status-approved {
+            background-color: #eafaf1;
+            color: #27ae60;
+        }
+
+        .status-rejected {
+            background-color: #fdedec;
+            color: #e74c3c;
+        }
+
+        .section-title {
+            font-size: 18px;
+            font-weight: 600;
+            margin-bottom: 20px;
+            color: #2c3e50;
+            position: relative;
+            padding-left: 15px;
+        }
+
+        .section-title:before {
+            content: "";
+            position: absolute;
+            left: 0;
+            top: 5px;
+            height: 20px;
+            width: 4px;
+            background-color: var(--primary-color);
+            border-radius: 2px;
+        }
+
+        .fadeInRight {
+            animation: fadeInRight 0.5s ease;
+        }
+
+        @keyframes fadeInRight {
+            from {
+                opacity: 0;
+                transform: translateX(20px);
+            }
+            to {
+                opacity: 1;
+                transform: translateX(0);
+            }
+        }
+
+        .form-group {
+            margin-bottom: 20px;
+        }
+
+        .form-group label {
+            font-weight: 500;
+            margin-bottom: 8px;
+            color: #34495e;
+        }
+    </style>
+</head>
+<body>
+<div class="container mt-5 mb-5">
+    <div class="row animated fadeInRight">
+        <div class="col-md-4">
+            <div class="box box-success">
+                <div class="panel-heading">
+                    个人资料
+                </div>
+                <div class="panel-body">
+                    <div class="balance-card">
+                        <div class="balance-label">账户余额</div>
+                        <div class="balance-amount">¥8,450.00</div>
+                        <div class="balance-info">可提现金额: ¥8,450.00</div>
+                    </div>
+
+                    <form id="update-form" role="form" data-toggle="validator" method="POST" action="#">
                         <div class="form-group">
-                            <label for="money" class="control-label">{:__('提现金额')}:</label>
-                            <input type="number" class="form-control" id="money" name="row[money]" value="" data-rule="required"/>
+                            <label for="money" class="control-label">提现金额:</label>
+                            <input type="number" class="form-control" id="money" name="row[money]" value="" data-rule="required" placeholder="输入提现金额"/>
                         </div>
                         <div class="form-group">
-                            <label for="name" class="control-label">{:__('姓名')}:</label>
-                            <input type="text" class="form-control" id="name" name="row[name]" value="" data-rule="required"/>
+                            <label for="name" class="control-label">姓名:</label>
+                            <input type="text" class="form-control" id="name" name="row[name]" value="" data-rule="required" placeholder="收款人姓名"/>
                         </div>
                         <div class="form-group">
-                            <label for="type" class="control-label">{:__('开户行/支付宝')}:</label>
-                            <input type="text" class="form-control" id="type" name="row[type]" value="" data-rule="required"/>
+                            <label for="type" class="control-label">开户行/支付宝:</label>
+                            <input type="text" class="form-control" id="type" name="row[type]" value="" data-rule="required" placeholder="开户行或支付宝"/>
                         </div>
                         <div class="form-group">
-                            <label for="cord" class="control-label">{:__('卡号/帐号')}:</label>
-                            <input type="text" class="form-control" id="cord" name="row[cord]" value="" data-rule="required"/>
+                            <label for="cord" class="control-label">卡号/帐号:</label>
+                            <input type="text" class="form-control" id="cord" name="row[cord]" value="" data-rule="required" placeholder="银行卡号或支付宝账号"/>
                         </div>
                         <div class="form-group">
-                            <button type="submit" class="btn btn-success">{:__('提现')}</button>
+                            <button type="submit" class="btn btn-success w-100">
+                                <i class="fas fa-paper-plane me-2"></i> 提现
+                            </button>
                         </div>
 
-                    </div>
-                </form>
+                        <div class="withdraw-info">
+                            <p><i class="fas fa-info-circle me-2 text-primary"></i> 提现申请将在1-3个工作日内处理</p>
+                            <p><i class="fas fa-exclamation-circle me-2 text-warning"></i> 单笔最低提现金额: ¥100.00</p>
+                            <p><i class="fas fa-exclamation-triangle me-2 text-danger"></i> 提现手续费: 1.0% (最低¥2.00)</p>
+                        </div>
+                    </form>
+                </div>
             </div>
         </div>
-
-    </div>
-    <div class="col-md-8">
-        <div class="panel panel-default panel-intro panel-nav">
-            <div class="panel-heading">
-                <ul class="nav nav-tabs">
-                    <li class="active"><a href="#one" data-toggle="tab"><i class="fa fa-list"></i> {:__('提现明细')}</a></li>
-                </ul>
-            </div>
-            <div class="panel-body">
-                <div id="myTabContent" class="tab-content">
-                    <div class="tab-pane fade active in" id="one">
-                        <div class="widget-body no-padding">
-                            <div id="toolbar" class="toolbar">
-                                {:build_toolbar('refresh')}
+        <div class="col-md-8">
+            <div class="panel panel-default panel-intro panel-nav">
+                <div class="panel-heading">
+                    <ul class="nav nav-tabs">
+                        <li class="active"><a href="#one" data-toggle="tab"><i class="fa fa-list"></i> 提现明细</a></li>
+                    </ul>
+                </div>
+                <div class="panel-body">
+                    <div id="myTabContent" class="tab-content">
+                        <div class="tab-pane fade active in" id="one">
+                            <div class="widget-body no-padding">
+                                <div id="toolbar" class="toolbar">
+                                    <a href="#" class="btn btn-refresh">
+                                        <i class="fas fa-sync-alt"></i> 刷新
+                                    </a>
+                                    <!-- 添加的归集按钮 -->
+                                    <a href="javascript:void(0);" id="summary-btn" class="btn btn-summary">
+                                        <i class="fas fa-bolt"></i> 资金归集
+                                    </a>
+                                </div>
+                                <table id="table" class="table table-striped table-bordered table-hover" width="100%">
+                                    <thead>
+                                    <tr>
+                                        <th>提取金额</th>
+                                        <th>手续费</th>
+                                        <th>类型</th>
+                                        <th>提取帐号</th>
+                                        <th>姓名</th>
+                                        <th>实际到账</th>
+                                        <th>提取时间</th>
+                                        <th>状态</th>
+                                    </tr>
+                                    </thead>
+                                    <tbody>
+                                    <tr>
+                                        <td>¥1,200.00</td>
+                                        <td>¥12.00</td>
+                                        <td>支付宝</td>
+                                        <td>user@example.com</td>
+                                        <td>张先生</td>
+                                        <td>¥1,188.00</td>
+                                        <td>2023-06-15 14:30</td>
+                                        <td><span class="status-badge status-approved">已完成</span></td>
+                                    </tr>
+                                    <tr>
+                                        <td>¥800.00</td>
+                                        <td>¥8.00</td>
+                                        <td>工商银行</td>
+                                        <td>**** **** **** 1234</td>
+                                        <td>李女士</td>
+                                        <td>¥792.00</td>
+                                        <td>2023-06-10 10:15</td>
+                                        <td><span class="status-badge status-approved">已完成</span></td>
+                                    </tr>
+                                    <tr>
+                                        <td>¥2,500.00</td>
+                                        <td>¥25.00</td>
+                                        <td>建设银行</td>
+                                        <td>**** **** **** 5678</td>
+                                        <td>王先生</td>
+                                        <td>¥2,475.00</td>
+                                        <td>2023-06-05 16:45</td>
+                                        <td><span class="status-badge status-approved">已完成</span></td>
+                                    </tr>
+                                    <tr>
+                                        <td>¥500.00</td>
+                                        <td>¥5.00</td>
+                                        <td>微信支付</td>
+                                        <td>wxid_********</td>
+                                        <td>赵女士</td>
+                                        <td>¥495.00</td>
+                                        <td>2023-06-01 09:20</td>
+                                        <td><span class="status-badge status-pending">审核中</span></td>
+                                    </tr>
+                                    </tbody>
+                                </table>
                             </div>
-                            <table id="table" class="table table-striped table-bordered table-hover" width="100%">
-
-                            </table>
-
                         </div>
                     </div>
-
                 </div>
             </div>
         </div>
-
     </div>
 </div>
+
+<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
+<script>
+    $(document).ready(function() {
+        // 初始化Toastr通知
+        toastr.options = {
+            closeButton: true,
+            progressBar: true,
+            positionClass: "toast-top-right",
+            timeOut: 5000
+        };
+
+        // 归集按钮点击事件
+        $('#summary-btn').click(function() {
+            const btn = $(this);
+            const originalHtml = btn.html();
+
+            // 显示加载状态
+            btn.html('<i class="fas fa-spinner fa-spin"></i> 归集中...').prop('disabled', true);
+
+            // 模拟请求延迟
+            setTimeout(function() {
+                // 发起GET请求到/general/txmx/summary
+                $.get('/general/txmx/summary', function(response) {
+                    // 请求成功处理
+                    if (response && response.success) {
+                        toastr.success('资金归集操作成功完成!');
+                    } else {
+                        toastr.error('归集操作执行失败,请重试');
+                    }
+                }).fail(function() {
+                    toastr.error('请求失败,请检查网络连接');
+                }).always(function() {
+                    // 恢复按钮状态
+                    btn.html(originalHtml).prop('disabled', false);
+                });
+            }, 1500);
+        });
+
+        // 刷新按钮点击事件
+        $('.btn-refresh').click(function(e) {
+            e.preventDefault();
+            const btn = $(this);
+            const originalHtml = btn.html();
+
+            // 显示加载状态
+            btn.html('<i class="fas fa-spinner fa-spin"></i> 刷新中...');
+
+            // 模拟刷新延迟
+            setTimeout(function() {
+                toastr.info('数据已刷新');
+                btn.html(originalHtml);
+            }, 800);
+        });
+
+        // 表单提交处理
+        $('#update-form').submit(function(e) {
+            e.preventDefault();
+
+            // 表单验证
+            const amount = parseFloat($('#money').val());
+            if (isNaN(amount) || amount < 100) {
+                toastr.warning('提现金额不能低于¥100.00');
+                return;
+            }
+
+            // 显示处理中
+            toastr.info('提现申请提交中...');
+
+            // 模拟处理延迟
+            setTimeout(function() {
+                toastr.success('提现申请已提交,将在1-3个工作日内处理');
+            }, 1500);
+        });
+    });
+</script>
+</body>
+</html>