|
|
@@ -11,7 +11,7 @@
|
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
|
<a-form-item label="可提现金额">
|
|
|
- <span class="white ml8"> {{canUseMoney}} <span class="blue" @click="chooseAll" style="cursor:pointer;">全部</span></span>
|
|
|
+ <span class="white ml8"> {{canOutMoney}} <span class="blue" @click="chooseAll" style="cursor:pointer;">全部</span></span>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
|
@@ -68,6 +68,7 @@ import { getApplyInOrOutTime, useSignBank } from '../setup';
|
|
|
import { FormState } from './interface';
|
|
|
import { handleForm } from './setup';
|
|
|
import Bus from '@/utils/eventBus/index';
|
|
|
+import { accountFundInfo } from '@/services/proto/accountinfo';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'funding_information_funding_summary_withdraw',
|
|
|
@@ -77,27 +78,32 @@ export default defineComponent({
|
|
|
selectedRow: {
|
|
|
type: Object as PropType<Taaccount>,
|
|
|
default: {},
|
|
|
- },
|
|
|
- canUseMoney: {
|
|
|
- type: Number,
|
|
|
- default: 0,
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
setup(props, context) {
|
|
|
const { visible, cancel } = _closeModal(context);
|
|
|
- const loading = ref<boolean>(false);
|
|
|
+ const loading = ref(false);
|
|
|
+ const canOutMoney = ref(0); // 可提现金额
|
|
|
const { rules, formState, formRef } = handleForm();
|
|
|
// 签约银行
|
|
|
const { hasSignBank, getSignBank, getItemSignBankValue } = useSignBank();
|
|
|
+
|
|
|
+ accountFundInfo().then((res) => {
|
|
|
+ canOutMoney.value = res.AvailableOutMoney;
|
|
|
+ }).catch((err) => {
|
|
|
+ message.error(err);
|
|
|
+ })
|
|
|
+
|
|
|
function chooseAll() {
|
|
|
- formState.price = props.canUseMoney;
|
|
|
+ formState.price = canOutMoney.value;
|
|
|
}
|
|
|
+
|
|
|
function submit() {
|
|
|
if (!hasSignBank()) {
|
|
|
message.error('请先签约银行!');
|
|
|
return;
|
|
|
}
|
|
|
- const max = props.canUseMoney;
|
|
|
+ const max = canOutMoney.value;
|
|
|
if (max) {
|
|
|
if (formState.price && formState.price > max) {
|
|
|
message.error(`提现金额不能超过${max}`);
|
|
|
@@ -130,6 +136,7 @@ export default defineComponent({
|
|
|
submit,
|
|
|
loading,
|
|
|
rules,
|
|
|
+ canOutMoney,
|
|
|
formState,
|
|
|
formRef,
|
|
|
getApplyInOrOutTime,
|
|
|
@@ -138,7 +145,4 @@ export default defineComponent({
|
|
|
};
|
|
|
},
|
|
|
});
|
|
|
-</script>
|
|
|
-
|
|
|
-<style lang="less" scoped>
|
|
|
-</style>;
|
|
|
+</script>
|