Commit 2621048a authored by wxk's avatar wxk

okok

parent 6f6a2cf3
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="handle-box"> <div class="handle-box">
<div class="handle-content"> <div class="handle-content" v-loading="Loading" element-loading-text="正在刷新数据">
<div class="handle"> <div class="handle">
<span class="coin-name">{{robotDetailInfo.coin}}</span> <span class="coin-name">{{robotDetailInfo.coin}}</span>
<span class="button" @click="clickRecharge(robotDetailInfo.coin)">充币</span> <span class="button" @click="clickRecharge(robotDetailInfo.coin)">充币</span>
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<span>{{coinInfo.amount}}</span> <span>{{coinInfo.amount}}</span>
</p> </p>
</div> </div>
<div class="handle-content"> <div class="handle-content" v-loading="Loading" element-loading-text="正在刷新数据">
<div class="handle"> <div class="handle">
<span class="coin-name">{{robotDetailInfo.base}}</span> <span class="coin-name">{{robotDetailInfo.base}}</span>
<span class="button" @click="clickRecharge(robotDetailInfo.base)">充币</span> <span class="button" @click="clickRecharge(robotDetailInfo.base)">充币</span>
...@@ -245,17 +245,19 @@ ...@@ -245,17 +245,19 @@
<el-checkbox-button v-for="(option, index) in options" :label="index+''" :key="option">{{option}}</el-checkbox-button> <el-checkbox-button v-for="(option, index) in options" :label="index+''" :key="option">{{option}}</el-checkbox-button>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div class="select-bar-content status-select fl"> <!-- <div class="select-bar-content status-select fl">
<span class="title">状态</span> <span class="title">状态</span>
<el-checkbox-button :indeterminate="isIndeterminate1" v-model="checkAll1" @change="handleCheckAllChange1">全部</el-checkbox-button> <el-checkbox-button :indeterminate="isIndeterminate1" v-model="checkAll1" @change="handleCheckAllChange1">全部</el-checkbox-button>
<el-checkbox-group v-model="checkedStates" @change="handleCheckedChange1"> <el-checkbox-group v-model="checkedStates" @change="handleCheckedChange1">
<el-checkbox-button v-for="(state,index) in states" :label="index+''" :key="state">{{state}}</el-checkbox-button> <el-checkbox-button v-for="(state,index) in states" :label="index+''" :key="state">{{state}}</el-checkbox-button>
</el-checkbox-group> </el-checkbox-group>
</div> </div>-->
</div> </div>
<el-date-picker <el-date-picker
class="fr" class="fr"
v-model="transactionTime" v-model="transactionTime"
:default-time="['00:00:00', '23:59:59']"
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange" type="datetimerange"
range-separator="至" range-separator="至"
...@@ -264,6 +266,7 @@ ...@@ -264,6 +266,7 @@
</el-date-picker> </el-date-picker>
</div> </div>
<el-table <el-table
v-loading="transactionLoading"
:data="list" :data="list"
stripe stripe
style="width: 100%"> style="width: 100%">
...@@ -308,10 +311,8 @@ ...@@ -308,10 +311,8 @@
label="状态"> label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag <el-tag
:type="scope.row.status === '完全成交' ? 'success' : type="success"
(scope.row.status === '部分成交' ? 'warning' : disable-transitions>成功</el-tag>
(scope.row.status === '挂单中' ? '' : 'danger'))"
disable-transitions>{{scope.row.status}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -326,7 +327,7 @@ ...@@ -326,7 +327,7 @@
</el-pagination> </el-pagination>
</div> </div>
<!--充提记录--> <!--充提记录-->
<div class="record-box"> <div class="record-box" v-loading="Loading" element-loading-text="正在刷新数据">
<div class="title-box clearfix"> <div class="title-box clearfix">
<span class="title">充提记录</span> <span class="title">充提记录</span>
<div class="select-bar fr clearfix"> <div class="select-bar fr clearfix">
...@@ -347,7 +348,9 @@ ...@@ -347,7 +348,9 @@
</div> </div>
<el-date-picker <el-date-picker
class="fr" class="fr"
:clearable="false"
v-model="transactionTime1" v-model="transactionTime1"
:default-time="['00:00:00', '23:59:59']"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange" type="datetimerange"
range-separator="至" range-separator="至"
...@@ -356,6 +359,7 @@ ...@@ -356,6 +359,7 @@
</el-date-picker> </el-date-picker>
</div> </div>
<el-table <el-table
v-loading="recordsLoading"
:data="list1" :data="list1"
stripe stripe
style="width: 100%"> style="width: 100%">
...@@ -450,7 +454,7 @@ ...@@ -450,7 +454,7 @@
recharge_list_value: '',//充值时候选择的账户 recharge_list_value: '',//充值时候选择的账户
account_symbol: '',//充提币种 account_symbol: '',//充提币种
/*交易记录参数*/ /*交易记录参数*/
transactionTime: ['', ''],// 时间筛选 transactionTime: null,// 时间筛选
pageSize: 10, //表格每页的条数 pageSize: 10, //表格每页的条数
currentPage: 1, //分页(当前页数) currentPage: 1, //分页(当前页数)
total: 0, //记录总条数 total: 0, //记录总条数
...@@ -459,96 +463,12 @@ ...@@ -459,96 +463,12 @@
checkAll: false, checkAll: false,
checkedOptions: [], checkedOptions: [],
options: ["买入", "卖出"], options: ["买入", "卖出"],
isIndeterminate1: true, /* isIndeterminate1: true,
checkAll1: false, checkAll1: false,
checkedStates: [], checkedStates: [],
states: ["挂单中", "完全成交", "已撤单", "部分成交"], states: ["挂单中", "完全成交", "已撤单", "部分成交"],*/
/* list: [{
id: "123", //单号
platform: "zhaobi", //交易所
account: "b15a4f6c5c1163b5f80715c9bd87d5118ec4b5668cb29f148eeceec61ddeadc2",
coin: "DCR", //目标币种
base: "USDT", //基础币种
opt: "0", //操作 0为买入 1为卖出
price: 1.20000000, //单价
amount: 123.00000000, //数量
fee: 0.10000000, //手续费
sum: 124.00000000, //总价
status: "0", //状态0挂单中 1完全成交2撤单3部分成交
time: "2018-06-28 14:12:59"
},{
id: "123", //单号
platform: "zhaobi", //交易所
account: "b15a4f6c5c1163b5f80715c9bd87d5118ec4b5668cb29f148eeceec61ddeadc2",
coin: "DCR", //目标币种
base: "USDT", //基础币种
opt: "0", //操作 0为买入 1为卖出
price: 1.20000000, //单价
amount: 123.00000000, //数量
fee: 0.10000000, //手续费
sum: 124.00000000, //总价
status: "1", //状态0挂单中 1完全成交2撤单3部分成交
time: "2018-06-28 14:12:59"
},{
id: "123", //单号
platform: "zhaobi", //交易所
account: "b15a4f6c5c1163b5f80715c9bd87d5118ec4b5668cb29f148eeceec61ddeadc2",
coin: "DCR", //目标币种
base: "USDT", //基础币种
opt: "0", //操作 0为买入 1为卖出
price: 1.20000000, //单价
amount: 123.00000000, //数量
fee: 0.10000000, //手续费
sum: 124.00000000, //总价
status: "2", //状态0挂单中 1完全成交2撤单3部分成交
time: "2018-06-28 14:12:59"
},{
id: "123", //单号
platform: "zhaobi", //交易所
account: "b15a4f6c5c1163b5f80715c9bd87d5118ec4b5668cb29f148eeceec61ddeadc2",
coin: "DCR", //目标币种
base: "USDT", //基础币种
opt: "0", //操作 0为买入 1为卖出
price: 1.20000000, //单价
amount: 123.00000000, //数量
fee: 0.10000000, //手续费
sum: 124.00000000, //总价
status: "3", //状态0挂单中 1完全成交2撤单3部分成交
time: "2018-06-28 14:12:59"
}],*/
/*list1: [{
user: "wkf@33.cn",
coin: "BTC",
transfer_amount: 11.00000123,
time: "2018-06-04 12:52:36",
beforeRecharge: 0.00000123,
afterRecharge: 11.00000123,
status: "0",
fee: 0.10000000,
fromUid: "9c885ce7664ed3c3675df8e49590c141665d94add5bf72a816a8d8a78bd8fbe5",
opt: "1"},{
user: "wkf@33.cn",
coin: "BTC",
transfer_amount: 11.00000123,
time: "2018-06-04 12:52:36",
beforeRecharge: 0.00000123,
afterRecharge: 11.00000123,
status: "0",
fee: 0.10000000,
fromUid: "9c885ce7664ed3c3675df8e49590c141665d94add5bf72a816a8d8a78bd8fbe5",
opt: "1"},{
user: "wkf@33.cn",
coin: "BTC",
transfer_amount: 11.00000123,
time: "2018-06-04 12:52:36",
beforeRecharge: 0.00000123,
afterRecharge: 11.00000123,
status: "1",
fee: 0.10000000,
fromUid: "9c885ce7664ed3c3675df8e49590c141665d94add5bf72a816a8d8a78bd8fbe5",
opt: "0"}],*/
/*充提记录参数*/ /*充提记录参数*/
transactionTime1: ['', ''],// 时间筛选 transactionTime1: null,// 时间筛选
pageSize1: 10, //表格每页的条数 pageSize1: 10, //表格每页的条数
currentPage1: 1, //分页(当前页数) currentPage1: 1, //分页(当前页数)
total1: 0, //记录总条数 total1: 0, //记录总条数
...@@ -561,6 +481,9 @@ ...@@ -561,6 +481,9 @@
checkAll3: false, checkAll3: false,
checkedStates1: [], checkedStates1: [],
states1: ["成功", "失败"], states1: ["成功", "失败"],
Loading: false,//充提币后数据加载标志
transactionLoading: false, //充提记录查询加载
recordsLoading: false,//交易记录查询加载
} }
}, },
props: ['robotDetailInfo','robotBankList'], props: ['robotDetailInfo','robotBankList'],
...@@ -624,6 +547,7 @@ ...@@ -624,6 +547,7 @@
account: this.robotDetailInfo.account, account: this.robotDetailInfo.account,
coin: this.account_symbol, coin: this.account_symbol,
amount: this.amount_num, amount: this.amount_num,
symbol: this.robotDetailInfo.coin + '/' + this.robotDetailInfo.base,
opt: key opt: key
}; };
if(!Number(this.amount_num) || this.amount_num<0.00000001 || this.amount_num>1800000000){ if(!Number(this.amount_num) || this.amount_num<0.00000001 || this.amount_num>1800000000){
...@@ -636,15 +560,19 @@ ...@@ -636,15 +560,19 @@
return; return;
}else{ }else{
this.transferok = true; this.transferok = true;
this.Loading = true;
axios.post(ApiConfig.Transfer,params).then(res=>{ axios.post(ApiConfig.Transfer,params).then(res=>{
if(res.data.code === 200){ if(res.data.code === 200){
this.init();
this.$notify({ this.$notify({
title: '提示', title: '提示',
message: key === "0" ? '充值 : '+ this.amount_num +" "+ this.account_symbol + ' 成功' : '提现: ' + this.amount_num +" "+ this.account_symbol + '成功', message: key === "0" ? '充值 : '+ this.amount_num +" "+ this.account_symbol + ' 成功' : '提现: ' + this.amount_num +" "+ this.account_symbol + '成功',
type: 'success', type: 'success',
duration:'2000', duration:'2000',
}); });
setTimeout(()=>{
this.Loading = false;
this.init();
},1000);
}else{ }else{
this.$notify({ this.$notify({
title: '提示', title: '提示',
...@@ -678,6 +606,7 @@ ...@@ -678,6 +606,7 @@
}, },
//查询交易记录 //查询交易记录
getTransaction(params) { getTransaction(params) {
this.transactionLoading = true;
const baseParams = { const baseParams = {
account: this.robotDetailInfo.account, account: this.robotDetailInfo.account,
coin: this.robotDetailInfo.coin, coin: this.robotDetailInfo.coin,
...@@ -685,13 +614,13 @@ ...@@ -685,13 +614,13 @@
page: "1", page: "1",
size: this.pageSize+'', size: this.pageSize+'',
opt: this.checkedOptions, opt: this.checkedOptions,
status: this.checkedStates, min_time: this.transactionTime ? this.transactionTime[0] : '',
min_time: this.transactionTime[0], max_time: this.transactionTime ? this.transactionTime[1] : '',
max_time: this.transactionTime[1],
}; };
params = Object.assign({},baseParams,params); params = Object.assign({},baseParams,params);
axios.post(ApiConfig.Transaction, params).then( res => { axios.post(ApiConfig.Transaction, params).then( res => {
if (res.data.code === 200){ if (res.data.code === 200){
this.transactionLoading = false;
let result = res.data.data; let result = res.data.data;
this.total = result.count; this.total = result.count;
if (result.list) { if (result.list) {
...@@ -701,9 +630,6 @@ ...@@ -701,9 +630,6 @@
item.sum = item.sum + unit; item.sum = item.sum + unit;
item.fee = item.fee + unit; item.fee = item.fee + unit;
item.opt = item.opt==="0" ? "买入" : "卖出"; item.opt = item.opt==="0" ? "买入" : "卖出";
item.status = item.status==="0" ? "挂单中" :
(item.status==="1" ? "完全成交" :
(item.status==="2" ? "已撤单" : "部分成交"));
return item; return item;
}) })
}else { }else {
...@@ -714,6 +640,7 @@ ...@@ -714,6 +640,7 @@
}, },
//查询充提记录 //查询充提记录
getRecords(params) { getRecords(params) {
this.recordsLoading = true;
const baseParams = { const baseParams = {
account: this.robotDetailInfo.account, account: this.robotDetailInfo.account,
coin: [this.robotDetailInfo.coin, this.robotDetailInfo.base], coin: [this.robotDetailInfo.coin, this.robotDetailInfo.base],
...@@ -721,12 +648,13 @@ ...@@ -721,12 +648,13 @@
size: this.pageSize1+'', size: this.pageSize1+'',
opt: this.checkedOptions1, opt: this.checkedOptions1,
status: this.checkedStates1, status: this.checkedStates1,
min_time: this.transactionTime1[0], min_time: this.transactionTime ? this.transactionTime[0] : '',
max_time: this.transactionTime1[1], max_time: this.transactionTime ? this.transactionTime[1] : '',
}; };
params = Object.assign({},baseParams,params); params = Object.assign({},baseParams,params);
axios.post(ApiConfig.Records, params).then( res => { axios.post(ApiConfig.Records, params).then( res => {
if (res.data.code === 200){ if (res.data.code === 200){
this.recordsLoading = false;
let result = res.data.data; let result = res.data.data;
this.total1 = result.count; this.total1 = result.count;
if (result.list) { if (result.list) {
...@@ -754,7 +682,7 @@ ...@@ -754,7 +682,7 @@
this.isIndeterminate = checkedCount > 0 && checkedCount < this.options.length; this.isIndeterminate = checkedCount > 0 && checkedCount < this.options.length;
this.getTransaction(); this.getTransaction();
}, },
handleCheckAllChange1(val) { /*handleCheckAllChange1(val) {
this.checkedStates = val ? ['0','1','2','3'] : []; this.checkedStates = val ? ['0','1','2','3'] : [];
this.isIndeterminate1 = false; this.isIndeterminate1 = false;
this.getTransaction(); this.getTransaction();
...@@ -764,7 +692,7 @@ ...@@ -764,7 +692,7 @@
this.checkAll1 = checkedCount === this.states.length; this.checkAll1 = checkedCount === this.states.length;
this.isIndeterminate1 = checkedCount > 0 && checkedCount < this.states.length; this.isIndeterminate1 = checkedCount > 0 && checkedCount < this.states.length;
this.getTransaction(); this.getTransaction();
}, },*/
//交易记录分页 //交易记录分页
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val+''; this.pageSize = val+'';
......
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
axios.post(ApiConfig.GetPlatformInfo).then( res =>{ axios.post(ApiConfig.GetPlatformInfo).then( res =>{
if (res.data.code === 200) { if (res.data.code === 200) {
this.platInfo = res.data.data; this.platInfo = res.data.data;
sessionStorage.setItem('platInfo', JSON.stringify(this.platInfo))
// console.log(this.platInfo) // console.log(this.platInfo)
} }
}) })
......
...@@ -230,8 +230,8 @@ ...@@ -230,8 +230,8 @@
this.showPairFilter = true; this.showPairFilter = true;
this.showWebFilter = this.showCurrencyFilter = false; this.showWebFilter = this.showCurrencyFilter = false;
var index = +RoutePath; var index = +RoutePath;
this.pairs = this.platInfo[index].symbol; this.pairs = JSON.parse(sessionStorage.getItem('platInfo'))[index].symbol;
this.platform = this.platInfo[index].platform; this.platform = JSON.parse(sessionStorage.getItem('platInfo'))[index].platform;
StatusParams.platform = this.platform; StatusParams.platform = this.platform;
ListParams.platform = [this.platform]; ListParams.platform = [this.platform];
break; break;
...@@ -320,7 +320,7 @@ ...@@ -320,7 +320,7 @@
}, },
handleCheckedChange0(value) { handleCheckedChange0(value) {
let checkedCount = value.length; let checkedCount = value.length;
this.checkAll0 = checkedCount === this.webs.length; this.checkAll0 = checkedCount === this.currencies.length;
this.isIndeterminate0 = checkedCount > 0 && checkedCount < this.currencies.length; this.isIndeterminate0 = checkedCount > 0 && checkedCount < this.currencies.length;
var ListParams = { var ListParams = {
class: "robot", //账户级别 class: "robot", //账户级别
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment