|
@@ -29,7 +29,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view v-if="step3" class="reselect-btn">
|
|
<view v-if="step3" class="reselect-btn">
|
|
|
<button class="s-btn reselect" type="primary" @click="showTable">{{ t('Custom.Deposit.Reselect')
|
|
<button class="s-btn reselect" type="primary" @click="showTable">{{ t('Custom.Deposit.Reselect')
|
|
|
- }}</button>
|
|
|
|
|
|
|
+ }}</button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -52,7 +52,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 表单 -->
|
|
<!-- 表单 -->
|
|
|
- <uni-forms ref="formRef" :model="form" :rules="rules" labelWidth="200" label-position="top" v-if="isStep3"
|
|
|
|
|
|
|
+ <uni-forms ref="formRef" :model="form" :rules="rules" labelWidth="200" label-position="top" v-show="isStep3"
|
|
|
class="base-info-form" validate-trigger="submit">
|
|
class="base-info-form" validate-trigger="submit">
|
|
|
<uni-row class="demo-uni-row uni-row1">
|
|
<uni-row class="demo-uni-row uni-row1">
|
|
|
<!-- 银行选择(针对有银行列表的通道) -->
|
|
<!-- 银行选择(针对有银行列表的通道) -->
|
|
@@ -121,7 +121,7 @@
|
|
|
<text>{{ t('Custom.Withdraw.addBank') }}</text>
|
|
<text>{{ t('Custom.Withdraw.addBank') }}</text>
|
|
|
<text class="add-btn crm-cursor" @click="openAddBankCard('add_bankCard')">{{
|
|
<text class="add-btn crm-cursor" @click="openAddBankCard('add_bankCard')">{{
|
|
|
t('Custom.Withdraw.addBank1')
|
|
t('Custom.Withdraw.addBank1')
|
|
|
- }}</text>
|
|
|
|
|
|
|
+ }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="add-back" v-else-if="channelData.type === 'CHANNEL_TYPE_CARD'">
|
|
<view class="add-back" v-else-if="channelData.type === 'CHANNEL_TYPE_CARD'">
|
|
|
<text>{{ t('PersonalManagement.Label.addCreditCard') }}</text>
|
|
<text>{{ t('PersonalManagement.Label.addCreditCard') }}</text>
|
|
@@ -129,7 +129,7 @@
|
|
|
t('Custom.Withdraw.addBank1') }}</text>
|
|
t('Custom.Withdraw.addBank1') }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <uni-forms-item :label="t('placeholder.choose')">
|
|
|
|
|
|
|
+ <uni-forms-item :label="t('Custom.Withdraw.Title4')">
|
|
|
<cwg-combox :clearable="false" v-model:value="myId" :options="bankCardOptions" @change="chooseBank"
|
|
<cwg-combox :clearable="false" v-model:value="myId" :options="bankCardOptions" @change="chooseBank"
|
|
|
:placeholder="t('placeholder.choose')" />
|
|
:placeholder="t('placeholder.choose')" />
|
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
@@ -243,7 +243,7 @@
|
|
|
<!-- 提示弹窗 -->
|
|
<!-- 提示弹窗 -->
|
|
|
<cwg-tips-popup v-model:visible="dialogTips" content="Custom.Withdraw.item2" @confirm="closeTipsConfirm" />
|
|
<cwg-tips-popup v-model:visible="dialogTips" content="Custom.Withdraw.item2" @confirm="closeTipsConfirm" />
|
|
|
<!-- 弹窗:确认信息 -->
|
|
<!-- 弹窗:确认信息 -->
|
|
|
- <cwg-check-confirm-popup v-model:visible="dialogCheckConfirm" :title="t('Home.page_customer.item2')"
|
|
|
|
|
|
|
+ <cwg-check-confirm-popup v-model:visible="dialogCheckConfirm" :title="t('Home.page_customer.item3')"
|
|
|
:channelData="channelData" :code="code" :selectCodes="selectCodes" :params="form" :FreeNumber="FreeNumber"
|
|
:channelData="channelData" :code="code" :selectCodes="selectCodes" :params="form" :FreeNumber="FreeNumber"
|
|
|
:userName="userName" :dialogCheckConfirm_form="dialogCheckConfirm_form" :login="loginValue" @confirm="submit" />
|
|
:userName="userName" :dialogCheckConfirm_form="dialogCheckConfirm_form" :login="loginValue" @confirm="submit" />
|
|
|
<!-- 协议弹窗 -->
|
|
<!-- 协议弹窗 -->
|
|
@@ -267,7 +267,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { ref, reactive, computed, onMounted, onUnmounted, watch, getCurrentInstance } from 'vue'
|
|
|
|
|
|
|
+import { ref, reactive, computed, onMounted, nextTick, watch, getCurrentInstance } from 'vue'
|
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
|
import { showToast } from "@/utils/toast";
|
|
import { showToast } from "@/utils/toast";
|
|
|
import { isAfterJuly28 } from '@/utils/dateUtils'
|
|
import { isAfterJuly28 } from '@/utils/dateUtils'
|
|
@@ -357,6 +357,25 @@ const form = reactive({
|
|
|
agree3: false // 协议勾选3(当dialogTipsIsShow为true时显示)
|
|
agree3: false // 协议勾选3(当dialogTipsIsShow为true时显示)
|
|
|
})
|
|
})
|
|
|
const formRef = ref(null)
|
|
const formRef = ref(null)
|
|
|
|
|
+const resetForm = () => {
|
|
|
|
|
+ //表单重置后,需要手动重置一些状态
|
|
|
|
|
+ form.amount = ""
|
|
|
|
|
+ form.amount1 = ""
|
|
|
|
|
+ form.bankCode = ""
|
|
|
|
|
+ form.address = ""
|
|
|
|
|
+ form.addressName = ""
|
|
|
|
|
+ form.addressProve = ""
|
|
|
|
|
+ form.bankUname = ""
|
|
|
|
|
+ form.bankCardNum = ""
|
|
|
|
|
+ form.swiftCode = ""
|
|
|
|
|
+ form.customBankCode = ""
|
|
|
|
|
+ form.bankAddr = ""
|
|
|
|
|
+ form.agencyNo = ""
|
|
|
|
|
+ form.cpf = ""
|
|
|
|
|
+ form.agree2 = false
|
|
|
|
|
+ form.agree3 = false
|
|
|
|
|
+ amountErrorMessage.value = ""
|
|
|
|
|
+}
|
|
|
//数量区间
|
|
//数量区间
|
|
|
const mAmount = reactive({
|
|
const mAmount = reactive({
|
|
|
minAmount: "",
|
|
minAmount: "",
|
|
@@ -512,7 +531,6 @@ const rules = computed(() => ({
|
|
|
rules: [
|
|
rules: [
|
|
|
{
|
|
{
|
|
|
validateFunction: (rule, value, data, callback) => {
|
|
validateFunction: (rule, value, data, callback) => {
|
|
|
- console.log(form.agree3, value, data, 121212);
|
|
|
|
|
|
|
|
|
|
if (form.agree3) {
|
|
if (form.agree3) {
|
|
|
return true;
|
|
return true;
|
|
@@ -615,7 +633,8 @@ const bankOptions = computed(() => {
|
|
|
const digitalOptions = computed(() => {
|
|
const digitalOptions = computed(() => {
|
|
|
return ruleForm.bankBlockchain.map((item, index) => ({
|
|
return ruleForm.bankBlockchain.map((item, index) => ({
|
|
|
text: `${item.addressName}-${item.address}`,
|
|
text: `${item.addressName}-${item.address}`,
|
|
|
- value: item.id
|
|
|
|
|
|
|
+ value: item.id,
|
|
|
|
|
+ disable: item.authStatus == 0,
|
|
|
}))
|
|
}))
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -637,6 +656,7 @@ const bankList = computed(() => {
|
|
|
if (channelData.value.type === 'BANK') return ruleForm.bankInfo
|
|
if (channelData.value.type === 'BANK') return ruleForm.bankInfo
|
|
|
if (channelData.value.type === 'BANK_TELEGRAPHIC') return ruleForm.bankWrit
|
|
if (channelData.value.type === 'BANK_TELEGRAPHIC') return ruleForm.bankWrit
|
|
|
if (channelData.value.type === 'CHANNEL_TYPE_CARD') return ruleForm.xykInfo
|
|
if (channelData.value.type === 'CHANNEL_TYPE_CARD') return ruleForm.xykInfo
|
|
|
|
|
+ if (channelData.value.type === 'DIGITAL_CURRENCY') return ruleForm.bankBlockchain
|
|
|
return []
|
|
return []
|
|
|
})
|
|
})
|
|
|
const isFree = computed(() => {
|
|
const isFree = computed(() => {
|
|
@@ -809,7 +829,6 @@ function openAddUnionpay() {
|
|
|
}
|
|
}
|
|
|
function openAddBank() {
|
|
function openAddBank() {
|
|
|
const wallets = bankCardOptions.value || []
|
|
const wallets = bankCardOptions.value || []
|
|
|
- console.log(wallets, 121212)
|
|
|
|
|
if (wallets.length === 0) {
|
|
if (wallets.length === 0) {
|
|
|
addBankDialogRef.value?.open(2);
|
|
addBankDialogRef.value?.open(2);
|
|
|
return;
|
|
return;
|
|
@@ -899,7 +918,7 @@ const onDigitalCurrencyChange = (val) => {
|
|
|
chooseBank(item)
|
|
chooseBank(item)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function chooseBank(id) {
|
|
|
|
|
|
|
+function chooseBank({ id }) {
|
|
|
const item = bankList.value.find(b => b.id === id)
|
|
const item = bankList.value.find(b => b.id === id)
|
|
|
if (!item) {
|
|
if (!item) {
|
|
|
showToast(t("Msg.item11"));
|
|
showToast(t("Msg.item11"));
|
|
@@ -911,6 +930,7 @@ function chooseBank(id) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
let codeTmp = "";
|
|
let codeTmp = "";
|
|
|
if (form.bankCode) {
|
|
if (form.bankCode) {
|
|
|
codeTmp = form.bankCode;
|
|
codeTmp = form.bankCode;
|
|
@@ -944,22 +964,13 @@ function selectCode(codeVal) {
|
|
|
|
|
|
|
|
//关闭提交后的弹出框
|
|
//关闭提交后的弹出框
|
|
|
function closeDia() {
|
|
function closeDia() {
|
|
|
|
|
+ resetForm()
|
|
|
isStep3.value = false;
|
|
isStep3.value = false;
|
|
|
step2.value = false;
|
|
step2.value = false;
|
|
|
showTable();
|
|
showTable();
|
|
|
loginValue.value = "";
|
|
loginValue.value = "";
|
|
|
dialogCheck.value = false;
|
|
dialogCheck.value = false;
|
|
|
dialogVisible.value = false;
|
|
dialogVisible.value = false;
|
|
|
- form.amount = ''
|
|
|
|
|
- form.addressName = ''
|
|
|
|
|
- form.address = ''
|
|
|
|
|
- form.addressProve = ''
|
|
|
|
|
- form.bankCode = ''
|
|
|
|
|
- form.currency = ''
|
|
|
|
|
- form.agree2 = false;
|
|
|
|
|
- form.agree3 = false;
|
|
|
|
|
-
|
|
|
|
|
- console.log(dialogCheck.value, dialogVisible.value, dialogSuccess.value);
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1323,7 +1334,9 @@ function toShop() {
|
|
|
//选择支付方式
|
|
//选择支付方式
|
|
|
function isShowStep3(row) {
|
|
function isShowStep3(row) {
|
|
|
console.log(row, 222);
|
|
console.log(row, 222);
|
|
|
-
|
|
|
|
|
|
|
+ dialogCheckWait.value = false;
|
|
|
|
|
+ dialogVisible.value = false;
|
|
|
|
|
+ flag.value = false;
|
|
|
//判断是否有bank
|
|
//判断是否有bank
|
|
|
if (row.bankValid && isChannel.value) {
|
|
if (row.bankValid && isChannel.value) {
|
|
|
getBankList(row);
|
|
getBankList(row);
|
|
@@ -1365,18 +1378,24 @@ function isShowStep3(row) {
|
|
|
if (row.type === 'CHANNEL_TYPE_ALI_WALLET') tableData.CHANNEL_TYPE_ALI_WALLET = [row]
|
|
if (row.type === 'CHANNEL_TYPE_ALI_WALLET') tableData.CHANNEL_TYPE_ALI_WALLET = [row]
|
|
|
introduce.introduce = row.introduce
|
|
introduce.introduce = row.introduce
|
|
|
introduce.enIntroduce = row.enIntroduce
|
|
introduce.enIntroduce = row.enIntroduce
|
|
|
|
|
+
|
|
|
|
|
+ // 重置表单并清除校验结果
|
|
|
|
|
+ resetForm();
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
//更换支付方式
|
|
//更换支付方式
|
|
|
function showTable() {
|
|
function showTable() {
|
|
|
|
|
+ resetForm()
|
|
|
myId.value = null;
|
|
myId.value = null;
|
|
|
step3.value = false;
|
|
step3.value = false;
|
|
|
isStep3.value = false;
|
|
isStep3.value = false;
|
|
|
isChannel.value = true;
|
|
isChannel.value = true;
|
|
|
|
|
+
|
|
|
getDepositList();
|
|
getDepositList();
|
|
|
|
|
|
|
|
- if (formRef.value) formRef.value.clearValidate()
|
|
|
|
|
|
|
+
|
|
|
form.currency = "USD";
|
|
form.currency = "USD";
|
|
|
- // 注意:原代码中 form.amount 和 form.amount1 没有重置,但 resetFields 应该做了
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//获取账户信息
|
|
//获取账户信息
|
|
@@ -1569,6 +1588,15 @@ watch(loginValue, (newVal) => {
|
|
|
showTable();
|
|
showTable();
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+watch(isStep3, async (newVal) => {
|
|
|
|
|
+ if (newVal) {
|
|
|
|
|
+ await nextTick();
|
|
|
|
|
+ formRef.value?.clearValidate(); // 先清除旧错误
|
|
|
|
|
+ resetForm(); // 再重置数据(重置数据可能触发新校验)
|
|
|
|
|
+ await nextTick();
|
|
|
|
|
+ formRef.value?.clearValidate(); // 再次清除可能因数据重置产生的新错误
|
|
|
|
|
+ }
|
|
|
|
|
+});
|
|
|
|
|
|
|
|
watch(() => form.amount, (newVal) => {
|
|
watch(() => form.amount, (newVal) => {
|
|
|
if (newVal && channelData.value.rate) {
|
|
if (newVal && channelData.value.rate) {
|