WIN-2308041133\Administrator 6 months ago
parent
commit
ad6f479dfb
1 changed files with 82 additions and 512 deletions
  1. 82 512
      application/admin/view/general/txmx/index.html

+ 82 - 512
application/admin/view/general/txmx/index.html

@@ -1,536 +1,106 @@
-<!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;
-        }
-
-        body {
-            background-color: #f5f7fb;
-            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
-            padding: 20px;
-        }
-
-        .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: 1px solid #eaeaea;
-            margin-bottom: 25px;
-        }
-
-        .box-success {
-            border-top: 3px solid var(--success-color);
-        }
-
-        .panel-heading {
-            background-color: #f8f9fa;
-            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;
-        }
-
-        .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;
-            border: 1px solid #ddd;
-            background: #fff;
-            color: #555;
-        }
-
-        .btn-refresh:hover {
-            background-color: var(--primary-color);
-            color: white;
-            border-color: var(--primary-color);
-        }
-
-        .btn-summary {
-            background-color: var(--warning-color);
-            color: white;
-            border-color: var(--warning-color);
-        }
-
-        .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); }
-        }
-
-        .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;
-        }
-
-        .form-group {
-            margin-bottom: 20px;
-        }
-
-        .form-group label {
-            font-weight: 500;
-            margin-bottom: 8px;
-            color: #34495e;
-        }
-
-        .withdraw-info {
-            background-color: #f8f9fa;
-            padding: 15px;
-            border-radius: 8px;
-            margin-top: 20px;
-            font-size: 14px;
-        }
-
-        .withdraw-info i {
-            margin-right: 8px;
-        }
-
-        .text-danger {
-            color: #e74c3c;
-        }
-
-        .text-warning {
-            color: #f39c12;
-        }
-
-        .text-primary {
-            color: #3498db;
-        }
-
-        .balance-info {
-            margin-top: 10px;
-            font-size: 14px;
-            color: #7f8c8d;
-        }
-
-        .fadeInRight {
-            animation: fadeInRight 0.5s ease;
-        }
+<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">
 
-        @keyframes fadeInRight {
-            from {
-                opacity: 0;
-                transform: translateX(20px);
-            }
-            to {
-                opacity: 1;
-                transform: translateX(0);
-            }
-        }
-    </style>
-</head>
-<body>
-<div class="container mt-3 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">
-                    <form id="update-form" role="form" data-toggle="validator" method="POST" action="#">
+                <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="0.00" data-rule="required" disabled />
+                            <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>
                         <div class="form-group">
-                            <label for="withdraw-amount" class="control-label">提现金额:</label>
-                            <input type="number" class="form-control" id="withdraw-amount" name="row[withdraw_amount]" value="" data-rule="required" placeholder="输入提现金额"/>
-                            <div class="invalid-feedback">提现金额不能为空</div>
+                            <label for="money" class="control-label">{:__('提现金额')}:</label>
+                            <input type="number" class="form-control" id="money" name="row[money]" value="" data-rule="required"/>
                         </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" placeholder="收款人姓名"/>
-                            <div class="invalid-feedback">姓名不能为空</div>
+                            <label for="name" class="control-label">{:__('姓名')}:</label>
+                            <input type="text" class="form-control" id="name" name="row[name]" value="" data-rule="required"/>
                         </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" placeholder="开户行或支付宝"/>
-                            <div class="invalid-feedback">开户行/支付宝不能为空</div>
+                            <label for="type" class="control-label">{:__('开户行/支付宝')}:</label>
+                            <input type="text" class="form-control" id="type" name="row[type]" value="" data-rule="required"/>
                         </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" placeholder="银行卡号或支付宝账号"/>
-                            <div class="invalid-feedback">卡号/帐号不能为空</div>
+                            <label for="cord" class="control-label">{:__('卡号/帐号')}:</label>
+                            <input type="text" class="form-control" id="cord" name="row[cord]" value="" data-rule="required"/>
                         </div>
                         <div class="form-group">
-                            <button type="submit" class="btn btn-success w-100">
-                                提现
-                            </button>
+                            <button type="submit" class="btn btn-success">{:__('提现')}</button>
                         </div>
 
-                        <div class="withdraw-info">
-                            <p><i class="fas fa-info-circle text-primary"></i> 提现申请将在1-3个工作日内处理</p>
-                            <p><i class="fas fa-exclamation-circle text-warning"></i> 单笔最低提现金额: ¥100.00</p>
-                            <p><i class="fas fa-exclamation-triangle text-danger"></i> 提现手续费: 1.0% (最低¥2.00)</p>
-                        </div>
-                    </form>
-                </div>
+                    </div>
+                </form>
             </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">
-                                    <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>
-                                        <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>正常提现</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>正常提现</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>正常提现</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>正常提现</td>
-                                        <td><span class="status-badge status-pending">审核中</span></td>
-                                    </tr>
-                                    </tbody>
-                                </table>
+
+    </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>
+                            <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();
-
-            let isValid = true;
-
-            // 表单验证
-            const amount = parseFloat($('#withdraw-amount').val());
-            if (isNaN(amount) || amount < 100) {
-                $('#withdraw-amount').addClass('is-invalid');
-                isValid = false;
-            } else {
-                $('#withdraw-amount').removeClass('is-invalid');
-            }
-
-            if (!$('#name').val()) {
-                $('#name').addClass('is-invalid');
-                isValid = false;
-            } else {
-                $('#name').removeClass('is-invalid');
-            }
-
-            if (!$('#type').val()) {
-                $('#type').addClass('is-invalid');
-                isValid = false;
-            } else {
-                $('#type').removeClass('is-invalid');
-            }
-
-            if (!$('#cord').val()) {
-                $('#cord').addClass('is-invalid');
-                isValid = false;
-            } else {
-                $('#cord').removeClass('is-invalid');
-            }
-
-            if (!isValid) {
-                toastr.warning('请填写所有必填字段');
-                return;
-            }
-
-            // 显示处理中
-            toastr.info('提现申请提交中...');
-
-            // 模拟处理延迟
-            setTimeout(function() {
-                toastr.success('提现申请已提交,将在1-3个工作日内处理');
-
-                // 清空表单
-                $('#update-form')[0].reset();
-            }, 1500);
-        });
-    });
-</script>
-</body>
-</html>