commit
f9253f9e56
|
@ -0,0 +1,6 @@
|
||||||
|
import request from "@/utils/request.js";
|
||||||
|
|
||||||
|
// 根据字典类型查询字典数据信息
|
||||||
|
export function getDicts(dictType) {
|
||||||
|
return request.get('app-api/system/dict-data/type/' + dictType);
|
||||||
|
}
|
|
@ -209,14 +209,6 @@ export function extractCash(data){
|
||||||
return request.post('extract/cash',data)
|
return request.post('extract/cash',data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 提现银行/提现最低金额
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export function extractBank(){
|
|
||||||
return request.get('extract/bank');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员等级列表
|
* 会员等级列表
|
||||||
*
|
*
|
||||||
|
|
|
@ -2,14 +2,15 @@
|
||||||
<view>
|
<view>
|
||||||
<view class='cash-withdrawal'>
|
<view class='cash-withdrawal'>
|
||||||
<view class='nav acea-row'>
|
<view class='nav acea-row'>
|
||||||
<view v-for="(item,index) in navList" :key="index" class='item font-color' @click="swichNav(index)">
|
<view v-for="(item, index) in WithdrawTypeEnum" :key="index" v-if="withdrawTypes.includes(item.type)"
|
||||||
<view class='line bg-color' :class='currentTab==index ? "on":""'></view>
|
class='item font-color' @click="switchWithdrawType(item.type)">
|
||||||
<view class='iconfont' :class='item.icon+" "+(currentTab==index ? "on":"")'></view>
|
<view class='line bg-color' :class='withdrawType === item.type ? "on":""'></view>
|
||||||
|
<view class='iconfont' :class='item.icon+" "+(withdrawType === item.type ? "on":"")'></view>
|
||||||
<view>{{item.name}}</view>
|
<view>{{item.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='wrapper'>
|
<view class='wrapper'>
|
||||||
<view :hidden='currentTab != 0' class='list'>
|
<view :hidden='withdrawType !== WithdrawTypeEnum.BANK.type' class='list'>
|
||||||
<form @submit="subCash" report-submit='true'>
|
<form @submit="subCash" report-submit='true'>
|
||||||
<view class='item acea-row row-between-wrapper'>
|
<view class='item acea-row row-between-wrapper'>
|
||||||
<view class='name'>持卡人</view>
|
<view class='name'>持卡人</view>
|
||||||
|
@ -22,8 +23,8 @@
|
||||||
<view class='item acea-row row-between-wrapper'>
|
<view class='item acea-row row-between-wrapper'>
|
||||||
<view class='name'>银行</view>
|
<view class='name'>银行</view>
|
||||||
<view class='input'>
|
<view class='input'>
|
||||||
<picker @change="bindPickerChange" :value="index" :range="array">
|
<picker @change="bindPickerChange" :value="bankIndex" range-key="label" :range="bankList">
|
||||||
<text class='Bank'>{{array[index]}}</text>
|
<text class='Bank'>{{bankList[bankIndex] && bankList[bankIndex].label}}</text>
|
||||||
<text class='iconfont icon-qiepian38'></text>
|
<text class='iconfont icon-qiepian38'></text>
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
|
@ -33,7 +34,7 @@
|
||||||
<view class='input'><input :placeholder='"最低提现金额"+minPrice' placeholder-class='placeholder' name="money" type='digit'></input></view>
|
<view class='input'><input :placeholder='"最低提现金额"+minPrice' placeholder-class='placeholder' name="money" type='digit'></input></view>
|
||||||
</view>
|
</view>
|
||||||
<view class='tip'>
|
<view class='tip'>
|
||||||
当前可提现金额: <text class="price">¥{{ fen2yuan(commission.brokeragePrice) }},</text>冻结佣金:¥{{ fen2yuan(commission.frozenBrokeragePrice) }}
|
当前可提现金额: <text class="price">¥{{ fen2yuan(commission.brokeragePrice) }},</text>冻结佣金:¥{{ fen2yuan(commission.frozenPrice) }}
|
||||||
</view>
|
</view>
|
||||||
<view class='tip'>
|
<view class='tip'>
|
||||||
说明: 每笔佣金的冻结期为{{frozenDays}}天,到期后可提现
|
说明: 每笔佣金的冻结期为{{frozenDays}}天,到期后可提现
|
||||||
|
@ -41,7 +42,7 @@
|
||||||
<button formType="submit" class='bnt bg-color'>提现</button>
|
<button formType="submit" class='bnt bg-color'>提现</button>
|
||||||
</form>
|
</form>
|
||||||
</view>
|
</view>
|
||||||
<view :hidden='currentTab != 1' class='list'>
|
<view :hidden='withdrawType !== WithdrawTypeEnum.WECHAT.type' class='list'>
|
||||||
<form @submit="subCash" report-submit='true'>
|
<form @submit="subCash" report-submit='true'>
|
||||||
<view class='item acea-row row-between-wrapper'>
|
<view class='item acea-row row-between-wrapper'>
|
||||||
<view class='name'>账号</view>
|
<view class='name'>账号</view>
|
||||||
|
@ -65,7 +66,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='tip'>
|
<view class='tip'>
|
||||||
当前可提现金额: <text class="price">¥{{ fen2yuan(commission.brokeragePrice) }},</text>冻结佣金:¥{{ fen2yuan(commission.frozenBrokeragePrice) }}
|
当前可提现金额: <text class="price">¥{{ fen2yuan(commission.brokeragePrice) }},</text>冻结佣金:¥{{ fen2yuan(commission.frozenPrice) }}
|
||||||
</view>
|
</view>
|
||||||
<view class='tip'>
|
<view class='tip'>
|
||||||
说明: 每笔佣金的冻结期为{{frozenDays}}天,到期后可提现
|
说明: 每笔佣金的冻结期为{{frozenDays}}天,到期后可提现
|
||||||
|
@ -73,7 +74,7 @@
|
||||||
<button formType="submit" class='bnt bg-color'>提现</button>
|
<button formType="submit" class='bnt bg-color'>提现</button>
|
||||||
</form>
|
</form>
|
||||||
</view>
|
</view>
|
||||||
<view :hidden='currentTab != 2' class='list'>
|
<view :hidden='withdrawType !== WithdrawTypeEnum.ALIPAY.type' class='list'>
|
||||||
<form @submit="subCash" report-submit='true'>
|
<form @submit="subCash" report-submit='true'>
|
||||||
<view class='item acea-row row-between-wrapper'>
|
<view class='item acea-row row-between-wrapper'>
|
||||||
<view class='name'>账号</view>
|
<view class='name'>账号</view>
|
||||||
|
@ -97,7 +98,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='tip'>
|
<view class='tip'>
|
||||||
当前可提现金额: <text class="price">¥{{ fen2yuan(commission.brokeragePrice) }},</text>冻结佣金:¥{{ fen2yuan(commission.frozenBrokeragePrice) }}
|
当前可提现金额: <text class="price">¥{{ fen2yuan(commission.brokeragePrice) }},</text>冻结佣金:¥{{ fen2yuan(commission.frozenPrice) }}
|
||||||
</view>
|
</view>
|
||||||
<view class='tip'>
|
<view class='tip'>
|
||||||
说明: 每笔佣金的冻结期为{{frozenDays}}天,到期后可提现
|
说明: 每笔佣金的冻结期为{{frozenDays}}天,到期后可提现
|
||||||
|
@ -110,33 +111,23 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { extractBank } from '@/api/user.js';
|
|
||||||
import { toLogin } from '@/libs/login.js';
|
import { toLogin } from '@/libs/login.js';
|
||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
import * as TradeConfigApi from '@/api/trade/config.js';
|
import * as TradeConfigApi from '@/api/trade/config.js';
|
||||||
import * as BrokerageAPI from '@/api/trade/brokerage.js'
|
import * as BrokerageAPI from '@/api/trade/brokerage.js'
|
||||||
import * as Util from '@/utils/util.js';
|
import * as Util from '@/utils/util.js';
|
||||||
|
import { getDicts } from "@/api/system/dict";
|
||||||
|
import { DICT_TYPE, BrokerageWithdrawTypeEnum } from "@/utils/dict";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
navList: [{
|
WithdrawTypeEnum: BrokerageWithdrawTypeEnum,
|
||||||
'name': '银行卡',
|
withdrawType: 0,
|
||||||
'icon': 'icon-yinhangqia'
|
bankIndex: 0,
|
||||||
},
|
bankList: [], // 提现银行
|
||||||
{
|
|
||||||
'name': '微信',
|
|
||||||
'icon': 'icon-weixin2'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'name': '支付宝',
|
|
||||||
'icon': 'icon-icon34'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
currentTab: 0,
|
|
||||||
index: 0,
|
|
||||||
array: [], // 提现银行
|
|
||||||
minPrice: 0.00, // 最低提现金额
|
minPrice: 0.00, // 最低提现金额
|
||||||
frozenDays: 0, // 佣金冻结期
|
frozenDays: 0, // 佣金冻结期
|
||||||
|
withdrawTypes: [], // 提现方式
|
||||||
isClone: false,
|
isClone: false,
|
||||||
commission: {}, // 分销信息
|
commission: {}, // 分销信息
|
||||||
qrcodeUrlW:"",
|
qrcodeUrlW:"",
|
||||||
|
@ -161,7 +152,7 @@
|
||||||
toLogin();
|
toLogin();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// this.getUserExtractBank();
|
this.getUserExtractBank();
|
||||||
this.getExtractUser();
|
this.getExtractUser();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -189,24 +180,25 @@
|
||||||
this.commission = res.data;
|
this.commission = res.data;
|
||||||
})
|
})
|
||||||
TradeConfigApi.getTradeConfig().then(res => {
|
TradeConfigApi.getTradeConfig().then(res => {
|
||||||
this.minPrice = (res.data.brokerageWithdrawMinPrice || 0) / 100.0;
|
this.minPrice = Util.fen2yuan(res.data.brokerageWithdrawMinPrice || 0);
|
||||||
this.frozenDays = res.data.brokerageWithdrawMinPrice || 0;
|
this.frozenDays = res.data.brokerageFrozenDays || 0;
|
||||||
|
this.withdrawTypes = res.data.brokerageWithdrawType || [];
|
||||||
|
this.withdrawType = this.withdrawTypes[0]; // 默认选中第一个提现方式
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getUserExtractBank: function() {
|
getUserExtractBank: function() {
|
||||||
// TODO 芋艿:这里要搞个银行的列表;通过数据字典;
|
|
||||||
let that = this;
|
let that = this;
|
||||||
extractBank().then(res => {
|
getDicts(DICT_TYPE.BROKERAGE_BANK_NAME).then(res => {
|
||||||
let array = res.data;
|
let bankList = res.data;
|
||||||
array.unshift("请选择银行");
|
bankList.unshift({ label: '请选择银行' });
|
||||||
that.$set(that, 'array', array);
|
that.$set(that, 'bankList', bankList);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
swichNav: function(current) {
|
switchWithdrawType: function(current) {
|
||||||
this.currentTab = current;
|
this.withdrawType = current;
|
||||||
},
|
},
|
||||||
bindPickerChange: function(e) {
|
bindPickerChange: function(e) {
|
||||||
this.index = e.detail.value;
|
this.bankIndex = e.detail.value;
|
||||||
},
|
},
|
||||||
moneyInput(e) {
|
moneyInput(e) {
|
||||||
//正则表达试
|
//正则表达试
|
||||||
|
@ -219,9 +211,8 @@
|
||||||
subCash: function(e) {
|
subCash: function(e) {
|
||||||
let that = this,
|
let that = this,
|
||||||
value = e.detail.value;
|
value = e.detail.value;
|
||||||
const form = {};
|
const form = { type: this.withdrawType };
|
||||||
if (this.currentTab === 0) { // 银行卡
|
if (this.withdrawType === this.WithdrawTypeEnum.BANK.type) { // 银行卡
|
||||||
form.type = 2;
|
|
||||||
if (value.name.length === 0) {
|
if (value.name.length === 0) {
|
||||||
return this.$util.Tips({
|
return this.$util.Tips({
|
||||||
title: '请填写持卡人姓名'
|
title: '请填写持卡人姓名'
|
||||||
|
@ -232,16 +223,15 @@
|
||||||
title: '请填写卡号'
|
title: '请填写卡号'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (that.index === 0) {
|
if (that.bankIndex === 0) {
|
||||||
return this.$util.Tips({
|
return this.$util.Tips({
|
||||||
title: "请选择银行"
|
title: "请选择银行"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// TODO 芋艿:整列要搞成字典;
|
|
||||||
form.name = value.name;
|
form.name = value.name;
|
||||||
form.bankName = that.array[that.index];
|
form.accountNo = value.cardum;
|
||||||
} else if (that.currentTab === 1) { // 微信
|
form.bankName = that.bankList[that.bankIndex].value;
|
||||||
form.type = 3;
|
} else if (that.withdrawType === this.WithdrawTypeEnum.WECHAT.type) { // 微信
|
||||||
if (value.name.length === 0) {
|
if (value.name.length === 0) {
|
||||||
return this.$util.Tips({
|
return this.$util.Tips({
|
||||||
title: '请填写微信号'
|
title: '请填写微信号'
|
||||||
|
@ -249,8 +239,7 @@
|
||||||
}
|
}
|
||||||
form.accountNo = value.name;
|
form.accountNo = value.name;
|
||||||
form.accountQrCodeUrl = this.qrcodeUrlW;
|
form.accountQrCodeUrl = this.qrcodeUrlW;
|
||||||
} else if (that.currentTab === 2) { // 支付宝
|
} else if (that.withdrawType === this.WithdrawTypeEnum.ALIPAY.type) { // 支付宝
|
||||||
form.type = 4;
|
|
||||||
if (value.name.length === 0) {
|
if (value.name.length === 0) {
|
||||||
return this.$util.Tips({
|
return this.$util.Tips({
|
||||||
title: '请填写账号'
|
title: '请填写账号'
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<view class='headerCon acea-row row-between-wrapper'>
|
<view class='headerCon acea-row row-between-wrapper'>
|
||||||
<view>
|
<view>
|
||||||
<view class='name'>{{name}}</view>
|
<view class='name'>{{name}}</view>
|
||||||
<view class='money' v-if="type === 1">¥<text class='num'>{{ fen2yuan(spreadInfo.withdrawBrokeragePrice, 0) }}</text></view>
|
<view class='money' v-if="type === 1">¥<text class='num'>{{ fen2yuan(spreadInfo.withdrawPrice, 0) }}</text></view>
|
||||||
<view class='money' v-else>¥<text class='num'>{{ fen2yuan(spreadInfo.brokeragePrice, 0) }}</text></view>
|
<view class='money' v-else>¥<text class='num'>{{ fen2yuan(spreadInfo.brokeragePrice, 0) }}</text></view>
|
||||||
</view>
|
</view>
|
||||||
<view class='iconfont icon-jinbi1'></view>
|
<view class='iconfont icon-jinbi1'></view>
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
type: 0, // 类型;1 - 提现;2 - 佣金
|
type: 0, // 类型;1 - 提现;2 - 佣金
|
||||||
|
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 10,
|
limit: 15,
|
||||||
recordList: [],
|
recordList: [],
|
||||||
statuss: false, // 是否到达底部
|
statuss: false, // 是否到达底部
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* Created by 芋道源码
|
||||||
|
*
|
||||||
|
* 数据字典工具类
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const DICT_TYPE = {
|
||||||
|
|
||||||
|
// ========== MALL - 交易模块 ==========
|
||||||
|
BROKERAGE_BANK_NAME: 'brokerage_bank_name', // 佣金提现银行
|
||||||
|
BROKERAGE_WITHDRAW_TYPE: 'brokerage_withdraw_type', // 佣金提现类型
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 佣金提现类型枚举
|
||||||
|
*/
|
||||||
|
export const BrokerageWithdrawTypeEnum = {
|
||||||
|
WALLET: {
|
||||||
|
type: 1,
|
||||||
|
name: '钱包',
|
||||||
|
icon: 'icon-qiandai'
|
||||||
|
},
|
||||||
|
BANK: {
|
||||||
|
type: 2,
|
||||||
|
name: '银行卡',
|
||||||
|
icon: 'icon-yinhangqia'
|
||||||
|
},
|
||||||
|
WECHAT: {
|
||||||
|
type: 3,
|
||||||
|
name: '微信',
|
||||||
|
icon: 'icon-weixin2'
|
||||||
|
},
|
||||||
|
ALIPAY: {
|
||||||
|
type: 4,
|
||||||
|
name: '支付宝',
|
||||||
|
icon: 'icon-icon34'
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue