<template>
|
<div>
|
<div class="noticecontainer">
|
<div class="jiaoyimain">
|
<div class="notice_every">
|
<div class="twoinput">
|
<div class="tixianjine">
|
<span class="tixianwz">{{$t('hj159')}}:</span>
|
<el-input v-model="amount" :placeholder="$t('hj305')">
|
</el-input>
|
</div>
|
</div>
|
<div class="keyong">
|
<span class="keyong_left">{{$t('hj158')}}:¥{{ userData.enableAmt }}</span>
|
<span class="keyong_right" @click="amount = userData.enableAmt">{{$t('alltx')}}</span>
|
</div>
|
<div class="buysellmain">
|
<div class="btns" @click="gettixian">
|
{{$t('hj177')}}
|
</div>
|
</div>
|
</div>
|
<div class="tixianliet">
|
<el-table :data="tixianlist" style="width: 100%" border :highlight-current-row="false"
|
:header-cell-style="{ 'padding': '2px 0', 'background': 'rgb(37,38,42)', 'color': '#9d9d9d', 'font-size': '12px' }">
|
<el-table-column prop="withAmt" :label="$t('hj159')">
|
</el-table-column>
|
<el-table-column prop="withFee" :label="$t('hj44')">
|
</el-table-column>
|
<el-table-column prop="address" :label="$t('hj247')" width="160px">
|
<template slot-scope="scope">
|
{{ scope.row.bankName }}-{{ scope.row.bankAddress }}
|
</template>
|
</el-table-column>
|
<el-table-column prop="bankNo" :label="$t('hj215')" width="160px">
|
</el-table-column>
|
<el-table-column prop="withStatus" :label="$t('zt')">
|
<template slot-scope="scope">
|
<span
|
:class="scope.row.withStatus === 1 ? 'greens' : scope.row.withStatus === 2 ? 'reds' : 'reds'">
|
<!-- 1 => 成功 2 失败 3取消 4 等待 -->
|
<i v-if="scope.row.withStatus === 1"
|
class="iconfont icon-tongguo4 animated bounceIn"></i>
|
<i v-if="scope.row.withStatus == 0"
|
class="iconfont icon-dengdai animated bounceInDown"></i>
|
<i v-if="scope.row.withStatus === 2"
|
class="iconfont icon-failure animated bounceInDown"></i>
|
<i v-if="scope.row.withStatus === 3"
|
class="iconfont icon-iconfontweitongguo animated bounceInDown"></i>
|
{{ scope.row.withStatus === 1 ? $t('hjtxcg') : scope.row.withStatus ===
|
2 ? $t('hjtxsb') : scope.row.withStatus === 3 ? $t('hjqxtx') : $t('hjshz')
|
}}
|
</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="applyTime" :label="$t('sj')" width="160px">
|
<template slot-scope="scope">
|
<b v-if="scope.row.applyTime">{{ scope.row.applyTime | timeFormat }}</b>
|
<b v-else></b>
|
</template>
|
</el-table-column>
|
<el-table-column prop="isLock" :label="$t('hj106')" width="120px">
|
<template slot-scope="scope">
|
<el-button v-if="scope.row.withStatus != 3" type="info" plain size="small"
|
@click="toOption(scope.row)">{{$t('hjqxtx')}}
|
</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
<div class="paginationmain">
|
<el-pagination class="pull-right" @size-change="handleSizeChange" background
|
@current-change="handleCurrentChange" :current-page="pageNum"
|
:page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize"
|
layout="total, sizes, prev, pager, next" :total="total">
|
</el-pagination>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
<script>
|
import * as api from "@/axios/api";
|
export default {
|
data() {
|
return {
|
amount: '',
|
userData: '', // 用户信息
|
pageNum: 1,
|
pageSize: 10,
|
tixianlist: [],
|
total: 0,
|
}
|
},
|
created() {
|
this.getinit();
|
},
|
methods: {
|
getinit() {
|
this.withdrawList();
|
this.getCardDetail();
|
this.getuserSetting()
|
this.getUserInfo();
|
},
|
handleSizeChange(size) {
|
this.pageSize = size
|
this.withdrawList()
|
},
|
handleCurrentChange(page) {
|
this.pageNum = page
|
this.withdrawList()
|
},
|
async getCardDetail() {
|
// 获取银行卡信息
|
let data = await api.getBankCard();
|
if (data.status == 0) {
|
this.bankInfo = data.data;
|
} else {
|
this.$message.error(this.$t('hj179'));
|
}
|
},
|
async toOption(val) {
|
// 取消提现
|
let opt = {
|
withId: val.id
|
}
|
let data = await api.canceloutMoney(opt)
|
if (data.status == 0) {
|
this.withdrawList()
|
this.$message.success(data.msg)
|
} else {
|
this.$message.success(data.msg)
|
}
|
},
|
async withdrawList() {
|
var opt = {
|
pageNum: this.pageNum,
|
pageSize: this.pageSize,
|
};
|
let data = await api.withdrawList(opt);
|
if (data.status == 0) {
|
this.tixianlist = data.data.list;
|
this.total = data.data.total;
|
}
|
},
|
async getUserInfo() {
|
let data = await api.getUserInfo();
|
if (data.status == 0) {
|
this.userData = data.data;
|
}
|
this.$parent.getcloseLoading();
|
},
|
async gettixian() {
|
if (!this.userData.idCard) {
|
this.$message.error(this.$t('hj178'));
|
return
|
}
|
if (!this.bankInfo.bankNo) {
|
this.$message.error(this.$t('hj179'));
|
return
|
}
|
if (!this.amount) {
|
this.$message({
|
message: this.$t('hj305'),
|
type: 'warning'
|
});
|
return
|
}
|
var opt = {
|
amt: this.amount,
|
};
|
let data = await api.outMoney(opt);
|
if (data.status == 0) {
|
this.userData = data.data;
|
this.getUserInfo();
|
this.$message({
|
message: this.$t('hjtxcg'),
|
type: 'success'
|
});
|
this.withdrawList()
|
} else {
|
this.$message({
|
message: data.msg,
|
type: 'error'
|
});
|
}
|
},
|
async getuserSetting() {
|
var opt = {};
|
var data = await api.getSetting(opt);
|
this.settingdetail = data.data;
|
},
|
}
|
}
|
</script>
|
<style lang="less" scoped>
|
.greens {
|
color: #168740 !important;
|
}
|
|
.reds {
|
color: #ed3a3b !important;
|
}
|
|
.greenbg {
|
background: #168740 !important;
|
}
|
|
.redbg {
|
background: #ed3a3b !important;
|
}
|
|
/deep/ .el-form-item {
|
margin-bottom: 0 !important;
|
}
|
|
/deep/ .el-table {
|
background: #25262a !important;
|
}
|
|
.el-table::before {
|
background-color: unset !important;
|
}
|
|
/deep/ .selected {
|
float: unset !important;
|
text-align: unset !important;
|
}
|
|
.noticecontainer {
|
display: flex;
|
|
.jiaoyimain {
|
display: flex;
|
justify-content: space-between;
|
width: 100%;
|
|
|
.notice_every {
|
width: 50%;
|
height: 208px;
|
overflow-y: scroll;
|
display: flex;
|
flex-direction: column;
|
justify-content: center;
|
|
&::-webkit-scrollbar {
|
width: 8px;
|
height: 8px;
|
background-color: rgb(37, 38, 42);
|
}
|
|
&::-webkit-scrollbar-track {
|
background-color: rgb(37, 38, 42);
|
}
|
|
&::-webkit-scrollbar-thumb {
|
background-color: rgb(37, 38, 42);
|
}
|
|
&::-webkit-scrollbar-corner {
|
width: 8px;
|
height: 8px;
|
display: none;
|
}
|
|
.twoinput {
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
color: #f0be83;
|
margin-top: 20px;
|
|
.tixianwz {
|
width: 100px;
|
text-align: right;
|
}
|
}
|
|
.keyong {
|
text-align: center;
|
margin-top: 16px;
|
|
.keyong_left {
|
color: #f0be83;
|
}
|
|
.keyong_right {
|
color: #25a4bb;
|
cursor: pointer;
|
margin-left: 10px;
|
}
|
}
|
|
/deep/ .el-form-item__label {
|
color: #f0be83 !important;
|
}
|
|
/deep/ .el-input {
|
width: 200px;
|
}
|
|
/deep/ .el-input__inner {
|
height: 34px !important;
|
line-height: 34px !important;
|
width: 200px;
|
}
|
|
.buysellmain {
|
display: flex;
|
justify-content: center;
|
margin: 20px 0;
|
|
.btns {
|
padding: 10px 60px;
|
color: #fff;
|
text-align: center;
|
border-radius: 4px;
|
font-size: 14px;
|
letter-spacing: 2px;
|
background: #409EFF;
|
cursor: pointer;
|
}
|
}
|
}
|
|
.tixianliet {
|
color: #fff;
|
width: 50%;
|
overflow-y: scroll;
|
height: 208px;
|
position: relative;
|
|
&::-webkit-scrollbar {
|
width: 8px;
|
height: 8px;
|
background-color: rgb(37, 38, 42);
|
}
|
|
&::-webkit-scrollbar-track {
|
background-color: rgb(37, 38, 42);
|
}
|
|
&::-webkit-scrollbar-thumb {
|
background-color: rgb(37, 38, 42);
|
}
|
|
&::-webkit-scrollbar-corner {
|
width: 8px;
|
height: 8px;
|
display: none;
|
}
|
|
.paginationmain {
|
display: flex;
|
justify-content: center;
|
margin: 20px 0;
|
}
|
|
/deep/ .btn-next {
|
color: #000 !important;
|
}
|
|
/deep/ .btn-prev {
|
color: #000 !important;
|
}
|
}
|
}
|
}
|
</style>
|