Handy_Cao před 2 roky
rodič
revize
8aa1700eaa

+ 6 - 4
src/packages/pc/views/footer/capital/summary/withdraw/index.vue

@@ -5,8 +5,8 @@
             <el-form-item label="资金账号">
                 <span>{{ accountStore.currentAccountId }}</span>
             </el-form-item>
-            <el-form-item label="可用余额">
-                <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+            <el-form-item label="可出资金">
+                <span>{{ fund.AvailableOutMoney?.toFixed(2) }}</span>
             </el-form-item>
             <el-form-item label="提现金额" prop="Amount">
                 <el-input-number placeholder="请输入提现金额" :precision="2" v-model="formData.Amount" />
@@ -28,7 +28,7 @@
 <script lang="ts" setup>
 import { ref } from 'vue'
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
-import { useDoWithdraw } from '@/business/bank'
+import { useDoWithdraw, useAccountFundInfo } from '@/business/bank'
 import { useAccountStore } from '@/stores'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 
@@ -37,13 +37,15 @@ const accountStore = useAccountStore()
 const formRef = ref<FormInstance>()
 const show = ref(true)
 const refresh = ref(false)
+/// 资金账户信息
+const { fund } = useAccountFundInfo()
 
 const formRules: FormRules = {
     Amount: [{
         required: true,
         message: '请输入金额',
         validator: (rule, value, callback) => {
-            if (value <= (accountStore.currentAccount.avaiableMoney ?? 0.0)) {
+            if (value <= (fund.value.AvailableOutMoney ?? 0.0)) {
                 callback()
             } else {
                 callback(new Error('超出可出金额'))