|
|
@@ -1,28 +1,17 @@
|
|
|
<template>
|
|
|
- <Drawer :title="'提现'"
|
|
|
- :placement="'right'"
|
|
|
- :visible="visible"
|
|
|
- class="delistingBottom height486"
|
|
|
- @cancel="cancel">
|
|
|
+ <Drawer :title="'提现'" :placement="'right'" :visible="visible" class="delistingBottom height486" @cancel="cancel">
|
|
|
<div class="listed">
|
|
|
- <a-form class="inlineForm dialogForm"
|
|
|
- ref="formRef"
|
|
|
- :model="formState"
|
|
|
- :rules="rules">
|
|
|
+ <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
|
|
|
<div class="formBar">
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="24">
|
|
|
- <a-form-item label="提现金额"
|
|
|
- name="price">
|
|
|
- <a-input-number class="commonInput"
|
|
|
- v-model:value="formState.price"
|
|
|
- style="width: 100%" />
|
|
|
+ <a-form-item label="提现金额" name="price">
|
|
|
+ <a-input-number class="commonInput" v-model:value="formState.price" style="width: 100%" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
|
<a-form-item label="可提现金额">
|
|
|
- <span class="white ml8"> {{canUseMoney}} <span class="blue"
|
|
|
- @click="chooseAll">全部</span></span>
|
|
|
+ <span class="white ml8"> {{canUseMoney}} <span class="blue" @click="chooseAll">全部</span></span>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
|
@@ -51,17 +40,11 @@
|
|
|
</a-row>
|
|
|
</div>
|
|
|
<a-row :gutter="24">
|
|
|
- <a-col :span="24"
|
|
|
- class="fixedBtns">
|
|
|
+ <a-col :span="24" class="fixedBtns">
|
|
|
<a-form-item class="btnCenter">
|
|
|
- <a-button class="listedBtn"
|
|
|
- :loading="loading"
|
|
|
- :disabled="loading"
|
|
|
- @click="submit">提交
|
|
|
+ <a-button class="listedBtn" :loading="loading" :disabled="loading" @click="submit">提交
|
|
|
</a-button>
|
|
|
- <a-button key="submit"
|
|
|
- class="ml10 cancelBtn"
|
|
|
- @click="cancel">取消</a-button>
|
|
|
+ <a-button key="submit" class="ml10 cancelBtn" @click="cancel">取消</a-button>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
@@ -73,12 +56,9 @@
|
|
|
<script lang="ts">
|
|
|
import Drawer from '@/common/components/drawer/index.vue';
|
|
|
import UploadImg from '@/common/components/uploadImg/index.vue';
|
|
|
-import { ModalEnum } from '@/common/constants/modalNameEnum';
|
|
|
import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
import { validateAction } from '@/common/setup/form';
|
|
|
import { _closeModal } from '@/common/setup/modal/modal';
|
|
|
-import { getUploadImg } from '@/common/setup/upload';
|
|
|
-import { QueryBankAccountSignQsp } from '@/services/go/ermcp/qhj/interface';
|
|
|
import { Taaccount } from '@/services/go/TaAccount/interface';
|
|
|
import { buildOutMoney } from '@/services/socket/bank';
|
|
|
import { buildOutMoneyReqParam } from '@/services/socket/bank/interface';
|
|
|
@@ -90,73 +70,73 @@ import { handleForm } from './setup';
|
|
|
import Bus from '@/utils/eventBus/index';
|
|
|
|
|
|
export default defineComponent({
|
|
|
- name: 'funding_information_funding_summary_withdraw',
|
|
|
- components: { Drawer, UploadImg },
|
|
|
- emits: ['cancel', 'update'],
|
|
|
- props: {
|
|
|
- selectedRow: {
|
|
|
- type: Object as PropType<Taaccount>,
|
|
|
- default: {},
|
|
|
- },
|
|
|
- canUseMoney: {
|
|
|
- type: Number,
|
|
|
- default: 0,
|
|
|
- },
|
|
|
+ name: 'funding_information_funding_summary_withdraw',
|
|
|
+ components: { Drawer, UploadImg },
|
|
|
+ emits: ['cancel', 'update'],
|
|
|
+ props: {
|
|
|
+ selectedRow: {
|
|
|
+ type: Object as PropType<Taaccount>,
|
|
|
+ default: {},
|
|
|
},
|
|
|
- setup(props, context) {
|
|
|
- const { visible, cancel } = _closeModal(context);
|
|
|
- const loading = ref<boolean>(false);
|
|
|
- const { rules, formState, formRef } = handleForm();
|
|
|
- // 签约银行
|
|
|
- const { hasSignBank, getSignBank, getItemSignBankValue } = useSignBank();
|
|
|
- function chooseAll() {
|
|
|
- formState.price = props.canUseMoney;
|
|
|
- }
|
|
|
- function submit() {
|
|
|
- if (!hasSignBank()) {
|
|
|
- message.error('请先签约银行!');
|
|
|
- return;
|
|
|
- }
|
|
|
- const max = props.canUseMoney;
|
|
|
- if (max) {
|
|
|
- if (formState.price && formState.price > max) {
|
|
|
- message.error(`提现金额不能超过${max}`);
|
|
|
- return;
|
|
|
- }
|
|
|
- } else {
|
|
|
- message.error('没有余额可提现');
|
|
|
- return;
|
|
|
- }
|
|
|
- validateAction<FormState>(formRef, formState).then((res) => {
|
|
|
- const signBank = getSignBank()!;
|
|
|
- const param: buildOutMoneyReqParam = {
|
|
|
- AccountCode: signBank.accountcode,
|
|
|
- Currency: signBank.currency,
|
|
|
- CusBankID: signBank.cusbankid,
|
|
|
- BankAccoutNum: signBank.bankaccountno2,
|
|
|
- BankAccoutName: signBank.bankaccountname2,
|
|
|
- Amount: res.price!,
|
|
|
- extend_info: '',
|
|
|
- };
|
|
|
- requestResultLoadingAndInfo(buildOutMoney, param, loading, ['提现成功', '提现失败:']).then(() => {
|
|
|
- cancel(true);
|
|
|
- Bus.$emit('applyInOrOut', true);
|
|
|
- });
|
|
|
- });
|
|
|
+ canUseMoney: {
|
|
|
+ type: Number,
|
|
|
+ default: 0,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ setup(props, context) {
|
|
|
+ const { visible, cancel } = _closeModal(context);
|
|
|
+ const loading = ref<boolean>(false);
|
|
|
+ const { rules, formState, formRef } = handleForm();
|
|
|
+ // 签约银行
|
|
|
+ const { hasSignBank, getSignBank, getItemSignBankValue } = useSignBank();
|
|
|
+ function chooseAll() {
|
|
|
+ formState.price = props.canUseMoney;
|
|
|
+ }
|
|
|
+ function submit() {
|
|
|
+ if (!hasSignBank()) {
|
|
|
+ message.error('请先签约银行!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const max = props.canUseMoney;
|
|
|
+ if (max) {
|
|
|
+ if (formState.price && formState.price > max) {
|
|
|
+ message.error(`提现金额不能超过${max}`);
|
|
|
+ return;
|
|
|
}
|
|
|
- return {
|
|
|
- visible,
|
|
|
- cancel,
|
|
|
- submit,
|
|
|
- loading,
|
|
|
- rules,
|
|
|
- formState,
|
|
|
- formRef,
|
|
|
- getApplyInOrOutTime,
|
|
|
- getItemSignBankValue,
|
|
|
- chooseAll,
|
|
|
+ } else {
|
|
|
+ message.error('没有余额可提现');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ validateAction<FormState>(formRef, formState).then((res) => {
|
|
|
+ const signBank = getSignBank()!;
|
|
|
+ const param: buildOutMoneyReqParam = {
|
|
|
+ AccountCode: signBank.accountcode,
|
|
|
+ Currency: signBank.currency,
|
|
|
+ CusBankID: signBank.cusbankid,
|
|
|
+ BankAccoutNum: signBank.bankaccountno2,
|
|
|
+ BankAccoutName: signBank.bankaccountname2,
|
|
|
+ Amount: Number(res.price!),
|
|
|
+ extend_info: '',
|
|
|
};
|
|
|
- },
|
|
|
+ requestResultLoadingAndInfo(buildOutMoney, param, loading, ['提现成功', '提现失败:']).then(() => {
|
|
|
+ cancel(true);
|
|
|
+ Bus.$emit('applyInOrOut', true);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ visible,
|
|
|
+ cancel,
|
|
|
+ submit,
|
|
|
+ loading,
|
|
|
+ rules,
|
|
|
+ formState,
|
|
|
+ formRef,
|
|
|
+ getApplyInOrOutTime,
|
|
|
+ getItemSignBankValue,
|
|
|
+ chooseAll,
|
|
|
+ };
|
|
|
+ },
|
|
|
});
|
|
|
</script>
|
|
|
|