|
@@ -4,7 +4,8 @@
|
|
|
<div class="gradient flex-center-between li" v-for="(item, index) in 2" :key="index">
|
|
<div class="gradient flex-center-between li" v-for="(item, index) in 2" :key="index">
|
|
|
<div class="wallet-list-li-left">
|
|
<div class="wallet-list-li-left">
|
|
|
<div class="">{{ index == 0 ? $t('common.mibi') : $t('common.baomibi') }} {{ $t('personalCenter.yue') }}</div>
|
|
<div class="">{{ index == 0 ? $t('common.mibi') : $t('common.baomibi') }} {{ $t('personalCenter.yue') }}</div>
|
|
|
- <div class="">{{ index == 0 ? userInfo?.pointsBalance || 0 || 0 : userInfo?.baoMiBalance || 0 }}</div>
|
|
|
|
|
|
|
+ <div class="">{{ index == 0 ? appStore?.userInfo?.pointsBalance || 0 || 0 : appStore?.userInfo?.baoMiBalance
|
|
|
|
|
+ || 0 }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="wallet-list-li-right flex-align-center">
|
|
<div class="wallet-list-li-right flex-align-center">
|
|
|
<div @click="show = true" class="flex-align-center btn" v-if="index == 1">
|
|
<div @click="show = true" class="flex-align-center btn" v-if="index == 1">
|
|
@@ -32,13 +33,18 @@
|
|
|
<div class="lis" v-for="(item, index) in list" :key="index">
|
|
<div class="lis" v-for="(item, index) in list" :key="index">
|
|
|
<div class="flex-center-between">
|
|
<div class="flex-center-between">
|
|
|
<div class="">{{ item.applyStatus == 0 ? '待审核' : item.applyStatus == 1 ? '已通过' : '未通过' }}</div>
|
|
<div class="">{{ item.applyStatus == 0 ? '待审核' : item.applyStatus == 1 ? '已通过' : '未通过' }}</div>
|
|
|
- <div class="">¥{{ item.applyAmount }}</div>
|
|
|
|
|
|
|
+ <div class="price">¥{{ item.applyAmount }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<div class="flex-center-between">
|
|
<div class="flex-center-between">
|
|
|
<div class="">订单号:{{ item.applyNo }}</div>
|
|
<div class="">订单号:{{ item.applyNo }}</div>
|
|
|
<div class="">手续费:{{ item.feeAmount }}</div>
|
|
<div class="">手续费:{{ item.feeAmount }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="flex-center-between">
|
|
|
|
|
+ <div class="">提现方式:{{ item.settleType == 'alipay' ? '支付宝' : item.settleType == 'wechat' ? '微信' : '银行卡'
|
|
|
|
|
+ }}</div>
|
|
|
|
|
+ <div class="">提现账号:{{ item.receiveAccount }}</div>
|
|
|
|
|
+ </div>
|
|
|
<div class="">申请时间:{{ item.createTime }}</div>
|
|
<div class="">申请时间:{{ item.createTime }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -67,20 +73,22 @@
|
|
|
<el-dialog v-model="dialogVisible"
|
|
<el-dialog v-model="dialogVisible"
|
|
|
:title="`${transformationIndex == 0 ? $t('personalCenter.zhuanhuanbaomibi') : $t('personalCenter.zhuanghuanmibi')}`"
|
|
:title="`${transformationIndex == 0 ? $t('personalCenter.zhuanhuanbaomibi') : $t('personalCenter.zhuanghuanmibi')}`"
|
|
|
width="523">
|
|
width="523">
|
|
|
- <el-form :model="walletForm" label-width="auto" label-position="top">
|
|
|
|
|
|
|
+ <el-form :model="walletForm" label-width="auto" label-position="top" :rules="rules" ref="ruleFormRefs">
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
<div class="input">
|
|
<div class="input">
|
|
|
- <el-form-item :label="$t('common.use') + $t('common.baomibi')" v-if="transformationIndex">
|
|
|
|
|
- <el-input-number v-model="walletForm.orderAmt" :min="1" controls-position="right" size="large"
|
|
|
|
|
- @change="handleChange" style="width: 100%;" placeholder="请输入" align="left"
|
|
|
|
|
- :input-style="{ fontSize: '28px' }" class="inputStyle" />
|
|
|
|
|
|
|
+ <el-form-item :label="$t('common.use') + $t('common.baomibi')" v-if="transformationIndex" prop="orderAmt">
|
|
|
|
|
+ <el-input-number v-model="walletForm.orderAmt" :min="1" :max="appStore?.userInfo?.baoMiBalance"
|
|
|
|
|
+ controls-position="right" size="large" @change="handleChange" style="width: 100%;"
|
|
|
|
|
+ :placeholder="$t('common.placeholderInput')" align="left" :input-style="{ fontSize: '28px' }"
|
|
|
|
|
+ class="inputStyle" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item :label="$t('common.use') + $t('common.mibi')" v-else>
|
|
|
|
|
- <el-input-number v-model="walletForm.orderAmt" :min="configTxt.configValue"
|
|
|
|
|
- :step="configTxt.configValue" controls-position="right" size="large" @change="handleChange"
|
|
|
|
|
- style="width: 100%;" placeholder="请输入" align="left" :input-style="{ fontSize: '28px' }"
|
|
|
|
|
|
|
+ <el-form-item :label="$t('common.use') + $t('common.mibi')" v-else prop="orderAmt">
|
|
|
|
|
+ <el-input-number v-model="walletForm.orderAmt" :min="Number(configTxt.configValue)"
|
|
|
|
|
+ :max="appStore?.userInfo?.pointsBalance" :step="Number(configTxt.configValue)"
|
|
|
|
|
+ controls-position="right" size="large" @change="handleChange" style="width: 100%;"
|
|
|
|
|
+ :placeholder="$t('common.placeholderInput')" align="left" :input-style="{ fontSize: '28px' }"
|
|
|
class="inputStyle" />
|
|
class="inputStyle" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</div>
|
|
</div>
|
|
@@ -94,12 +102,12 @@
|
|
|
<div class="input">
|
|
<div class="input">
|
|
|
<el-form-item v-if="transformationIndex"
|
|
<el-form-item v-if="transformationIndex"
|
|
|
:label="$t('common.available') + $t('common.mibi') + `(手续费率:${walletForm.feeRate})`">
|
|
:label="$t('common.available') + $t('common.mibi') + `(手续费率:${walletForm.feeRate})`">
|
|
|
- <el-input v-model="walletForm.targetAmount" placeholder="请输入" readonly disabled
|
|
|
|
|
- :input-style="{ fontSize: '28px' }" class="inputStyle" />
|
|
|
|
|
|
|
+ <el-input v-model="walletForm.targetAmount" :placeholder="$t('common.placeholderInput')" readonly
|
|
|
|
|
+ disabled :input-style="{ fontSize: '28px' }" class="inputStyle" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item v-else :label="$t('common.available') + $t('common.baomibi')">
|
|
<el-form-item v-else :label="$t('common.available') + $t('common.baomibi')">
|
|
|
- <el-input v-model="walletForm.targetAmount" placeholder="请输入" readonly disabled
|
|
|
|
|
- :input-style="{ fontSize: '28px' }" class="inputStyle" />
|
|
|
|
|
|
|
+ <el-input v-model="walletForm.targetAmount" :placeholder="$t('common.placeholderInput')" readonly
|
|
|
|
|
+ disabled :input-style="{ fontSize: '28px' }" class="inputStyle" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -111,18 +119,19 @@
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="dialog-footer flex-center">
|
|
<div class="dialog-footer flex-center">
|
|
|
<el-button @click="dialogVisible = false">{{ $t('common.cancel') }}</el-button>
|
|
<el-button @click="dialogVisible = false">{{ $t('common.cancel') }}</el-button>
|
|
|
- <el-button class="gradient" type="primary" @click="confirmTransformation">
|
|
|
|
|
|
|
+ <el-button class="gradient" type="primary" @click="confirmTransformation(ruleFormRefs)">
|
|
|
{{ $t('common.confirm') }}
|
|
{{ $t('common.confirm') }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
- <el-dialog v-model="show" title="提现申请" width="500">
|
|
|
|
|
|
|
+ <el-dialog v-model="show" :title="$t('personalCenter.shenqingtixian')" width="500">
|
|
|
<el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="auto">
|
|
<el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="auto">
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
<el-form-item label="提现金额" prop="applyAmount">
|
|
<el-form-item label="提现金额" prop="applyAmount">
|
|
|
- <el-input v-model="ruleForm.applyAmount" :placeholder="$t('common.placeholderInput')" />
|
|
|
|
|
|
|
+ <el-input type="number" :min="1" :max="appStore?.userInfo?.baoMiBalance" v-model="ruleForm.applyAmount"
|
|
|
|
|
+ :placeholder="$t('common.placeholderInput')" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -139,7 +148,7 @@
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="名称" prop="withdrawPerson">
|
|
|
|
|
|
|
+ <el-form-item label="姓名" prop="withdrawPerson">
|
|
|
<el-input v-model="ruleForm.withdrawPerson" :placeholder="$t('common.placeholderInput')" />
|
|
<el-input v-model="ruleForm.withdrawPerson" :placeholder="$t('common.placeholderInput')" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -200,6 +209,8 @@ const form = ref({
|
|
|
total: 0,
|
|
total: 0,
|
|
|
balanceType: 1,//1-米币 2-暴米币
|
|
balanceType: 1,//1-米币 2-暴米币
|
|
|
changeType: 1,//1-增加 2-减少
|
|
changeType: 1,//1-增加 2-减少
|
|
|
|
|
+ orderByColumn: 'create_time',
|
|
|
|
|
+ isAsc: 'desc'
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const walletForm = ref({
|
|
const walletForm = ref({
|
|
@@ -211,6 +222,9 @@ const walletForm = ref({
|
|
|
feeRate: 0,
|
|
feeRate: 0,
|
|
|
targetAmount: 0
|
|
targetAmount: 0
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
|
|
+const ruleFormRef = ref()
|
|
|
|
|
+
|
|
|
const configTxt = ref({})
|
|
const configTxt = ref({})
|
|
|
|
|
|
|
|
const userInfo = ref({})//用户信息
|
|
const userInfo = ref({})//用户信息
|
|
@@ -228,23 +242,49 @@ const ruleForm = ref({
|
|
|
receiveAccount: ""
|
|
receiveAccount: ""
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-const ruleFormRef = ref()
|
|
|
|
|
|
|
+const ruleFormRefs = ref()
|
|
|
|
|
+
|
|
|
|
|
+const validatePass = (rule: any, value: any, callback: any) => {
|
|
|
|
|
+ if (!value) {
|
|
|
|
|
+ callback(new Error(t('common.placeholderInput')))
|
|
|
|
|
+ } else if (Number(value) % Number(configTxt.value.configValue) !== 0 && transformationIndex.value == 0) {
|
|
|
|
|
+ callback(new Error(`米币数量必须为${configTxt.value.configValue}的整倍数`))
|
|
|
|
|
+ } else {
|
|
|
|
|
+ callback()
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const validatePass1 = (rule: any, value: any, callback: any) => {
|
|
|
|
|
+ if (!value) {
|
|
|
|
|
+ callback(new Error(t('common.placeholderInput')))
|
|
|
|
|
+ return
|
|
|
|
|
+ } else if (Number(value) > appStore.userInfo.baoMiBalance) {
|
|
|
|
|
+ callback(new Error(`余额不足`))
|
|
|
|
|
+ } else {
|
|
|
|
|
+ callback()
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const rules = ref({
|
|
const rules = ref({
|
|
|
applyAmount: [
|
|
applyAmount: [
|
|
|
- { required: true, message: 'Please input Activity name', trigger: 'blur' }
|
|
|
|
|
|
|
+ { required: true, validator: validatePass1, trigger: 'blur' }
|
|
|
],
|
|
],
|
|
|
settleType: [
|
|
settleType: [
|
|
|
- { required: true, message: 'Please input Activity name', trigger: 'blur' }
|
|
|
|
|
|
|
+ { required: true, message: t('common.qingxuanze'), trigger: 'blur' }
|
|
|
],
|
|
],
|
|
|
withdrawPerson: [
|
|
withdrawPerson: [
|
|
|
- { required: true, message: 'Please input Activity name', trigger: 'blur' }
|
|
|
|
|
|
|
+ { required: true, message: t('common.placeholderInput'), trigger: 'blur' }
|
|
|
],
|
|
],
|
|
|
receiveAccount: [
|
|
receiveAccount: [
|
|
|
- { required: true, message: 'Please input Activity name', trigger: 'blur' }
|
|
|
|
|
|
|
+ { required: true, message: t('common.placeholderInput'), trigger: 'blur' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ orderAmt: [
|
|
|
|
|
+ { required: true, trigger: 'blur', validator: validatePass },
|
|
|
],
|
|
],
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const submitForm = async (formEl) => {
|
|
const submitForm = async (formEl) => {
|
|
|
|
|
+ console.log(formEl)
|
|
|
if (!formEl) return
|
|
if (!formEl) return
|
|
|
await formEl.validate(async (valid, fields) => {
|
|
await formEl.validate(async (valid, fields) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
@@ -252,31 +292,37 @@ const submitForm = async (formEl) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
show.value = false;
|
|
show.value = false;
|
|
|
appStore.USERINFO();
|
|
appStore.USERINFO();
|
|
|
|
|
+ getList()
|
|
|
DGTMessage.success(t('common.success'));
|
|
DGTMessage.success(t('common.success'));
|
|
|
}
|
|
}
|
|
|
- } else {
|
|
|
|
|
- console.log('error submit!', fields)
|
|
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 确认转换
|
|
// 确认转换
|
|
|
-const confirmTransformation = async () => {
|
|
|
|
|
- let res = await createOrder({
|
|
|
|
|
- payMethod: walletForm.value.payMethod,
|
|
|
|
|
- orderType: walletForm.value.orderType,
|
|
|
|
|
- productId: '',
|
|
|
|
|
- orderNum: walletForm.value.targetAmount,
|
|
|
|
|
- orderAmt: walletForm.value.orderAmt
|
|
|
|
|
- })
|
|
|
|
|
- console.log(res);
|
|
|
|
|
- if (res.code === 200) {
|
|
|
|
|
- if (res.data.paySuccess) {
|
|
|
|
|
- dialogVisible.value = false;
|
|
|
|
|
- appStore.USERINFO();
|
|
|
|
|
- DGTMessage.success(` ${transformationIndex.value ? t('common.zhuanhuanbaomibi') : t('common.zhuanghuanmibi')}${t('common.success')}`)
|
|
|
|
|
|
|
+const confirmTransformation = async (formEl) => {
|
|
|
|
|
+
|
|
|
|
|
+ if (!formEl) return
|
|
|
|
|
+ await formEl.validate(async (valid, fields) => {
|
|
|
|
|
+ if (valid) {
|
|
|
|
|
+ let res = await createOrder({
|
|
|
|
|
+ payMethod: walletForm.value.payMethod,
|
|
|
|
|
+ orderType: walletForm.value.orderType,
|
|
|
|
|
+ productId: '',
|
|
|
|
|
+ orderNum: walletForm.value.targetAmount,
|
|
|
|
|
+ orderAmt: walletForm.value.orderAmt
|
|
|
|
|
+ })
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ if (res.data.paySuccess) {
|
|
|
|
|
+ dialogVisible.value = false;
|
|
|
|
|
+ appStore.USERINFO();
|
|
|
|
|
+ DGTMessage.success(`${transformationIndex.value ? t('personalCenter.zhuanhuanbaomibi') : t('personalCenter.zhuanghuanmibi')}${t('common.success')}`)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 米币暴米币转换
|
|
// 米币暴米币转换
|
|
@@ -290,20 +336,24 @@ const changeTransformation = async (index: any) => {
|
|
|
if (result.length) {
|
|
if (result.length) {
|
|
|
configTxt.value = result[0]
|
|
configTxt.value = result[0]
|
|
|
}
|
|
}
|
|
|
- walletForm.value.orderAmt = index == 0 ? configTxt.value.configValue : 1
|
|
|
|
|
|
|
+ walletForm.value.orderAmt = index == 0 ? Number(configTxt.value.configValue) : 1
|
|
|
handleChange()
|
|
handleChange()
|
|
|
dialogVisible.value = true;
|
|
dialogVisible.value = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const handleChange = async () => {
|
|
const handleChange = async () => {
|
|
|
- let res = await calRate({
|
|
|
|
|
- orderType: walletForm.value.orderType,
|
|
|
|
|
- orderNum: walletForm.value.orderAmt
|
|
|
|
|
- });
|
|
|
|
|
- if (res.code === 200) {
|
|
|
|
|
- walletForm.value.feeRate = res.data.feeRate
|
|
|
|
|
- walletForm.value.targetAmount = res.data.targetAmount
|
|
|
|
|
|
|
+ if (walletForm.value.orderAmt) {
|
|
|
|
|
+ if (transformationIndex.value == 0 && Number(walletForm.value.orderAmt) % Number(configTxt.value.configValue) !== 0) return
|
|
|
|
|
+ let res = await calRate({
|
|
|
|
|
+ orderType: walletForm.value.orderType,
|
|
|
|
|
+ orderNum: walletForm.value.orderAmt
|
|
|
|
|
+ });
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ walletForm.value.feeRate = res.data.feeRate
|
|
|
|
|
+ walletForm.value.targetAmount = res.data.targetAmount
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
// 米币暴米币切换
|
|
// 米币暴米币切换
|
|
|
const changeType = (index) => {
|
|
const changeType = (index) => {
|
|
@@ -333,7 +383,6 @@ const handlePageChange = (newPage: number) => {
|
|
|
const getInfo = async () => {
|
|
const getInfo = async () => {
|
|
|
let res = await getUserInfo();
|
|
let res = await getUserInfo();
|
|
|
userInfo.value = res.user;
|
|
userInfo.value = res.user;
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
@@ -444,16 +493,19 @@ onMounted(() => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .price {
|
|
|
|
|
- font-size: 16px;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- color: #F52929;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- .green {
|
|
|
|
|
- color: #1FB362;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .price {
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #F52929;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .green {
|
|
|
|
|
+ color: #1FB362;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.lis {
|
|
.lis {
|
|
|
padding: 16px;
|
|
padding: 16px;
|
|
|
border-radius: 16px;
|
|
border-radius: 16px;
|
|
@@ -491,7 +543,7 @@ onMounted(() => {
|
|
|
|
|
|
|
|
:deep(.el-input__wrapper) {
|
|
:deep(.el-input__wrapper) {
|
|
|
background-color: transparent;
|
|
background-color: transparent;
|
|
|
- box-shadow: none;
|
|
|
|
|
|
|
+ box-shadow: none !important;
|
|
|
padding: 0;
|
|
padding: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -500,7 +552,7 @@ onMounted(() => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
:deep(.el-input-number__increase),
|
|
:deep(.el-input-number__increase),
|
|
|
- :deep(.el-input-number__decrease) {
|
|
|
|
|
|
|
+ :deep(.el-input-number__decrease) {
|
|
|
display: none;
|
|
display: none;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|