Quellcode durchsuchen

feat: 提现按钮移到账户概览余额卡片旁

alphah vor 1 Woche
Ursprung
Commit
81bc0e3e77

BIN
frontend/dist.zip


+ 15 - 0
frontend/src/views/module_payment/account/components/AccountOverview.vue

@@ -181,6 +181,16 @@
           <div class="stat-item">
             <div class="stat-label">账户余额</div>
             <div class="stat-value balance-value">¥{{ accountData.balance || "0.00" }}</div>
+            <el-button
+              v-hasPerm="['module_payment:account:withdraw']"
+              type="warning"
+              size="small"
+              class="mt-2"
+              :disabled="!accountData.account_book_id || (accountData.balance || 0) <= 0"
+              @click="$emit('withdraw')"
+            >
+              提现
+            </el-button>
           </div>
         </el-card>
       </el-col>
@@ -273,6 +283,7 @@ const props = defineProps<{
 const emit = defineEmits<{
   (e: "goTab", tab: string): void;
   (e: "refresh", data: any): void;
+  (e: "withdraw"): void;
 }>();
 
 const enterpriseStore = useEnterpriseStore();
@@ -462,6 +473,10 @@ defineExpose({ refresh });
   margin-top: 16px;
 }
 
+.mt-2 {
+  margin-top: 8px;
+}
+
 .stat-item {
   text-align: center;
 

+ 1 - 9
frontend/src/views/module_payment/account/index.vue

@@ -3,7 +3,7 @@
     <el-tabs v-model="activeTab" class="account-tabs" type="card">
       <el-tab-pane label="账户概览" name="overview">
         <AccountOverview ref="overviewRef" :enterprise-id="currentEnterpriseId" @refresh="handleOverviewRefresh"
-          @goTab="handleGoTab" />
+          @goTab="handleGoTab" @withdraw="withdrawVisible = true" />
       </el-tab-pane>
 
       <!-- <el-tab-pane label="转账授权签约" name="authorize">
@@ -254,14 +254,6 @@
                   :disabled="!accountInfo.account_book_id || accountInfo.balance <= 0" @click="handleTransfer">
                   发起转账
                 </el-button>
-                <el-button
-                  v-hasPerm="['module_payment:account:withdraw']"
-                  type="warning"
-                  :disabled="!accountInfo.account_book_id || accountInfo.balance <= 0"
-                  @click="withdrawVisible = true"
-                >
-                  发起提现
-                </el-button>
                 <el-button @click="handleTransferReset">重置</el-button>
                 <el-button v-hasPerm="['module_payment:account:transfer']" type="primary" @click="openBatchTransferDialog">
                     批量转账