Commit 1d988fc6 authored by 汪晓凯's avatar 汪晓凯

修改银行配置

parent ad481c16
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
width="80" width="180"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
...@@ -82,6 +82,12 @@ ...@@ -82,6 +82,12 @@
size="small"> size="small">
充值 充值
</el-button> </el-button>
<el-button
@click.native.prevent="clickUpdate(scope.row.coin)"
type="primary"
size="small">
修改配置
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -147,6 +153,57 @@ ...@@ -147,6 +153,57 @@
<el-button type="primary" @click="amount_num&&recharge_list_value ? innerVisible=true : innerVisible=false">确 定</el-button> <el-button type="primary" @click="amount_num&&recharge_list_value ? innerVisible=true : innerVisible=false">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 修改配置弹框 -->
<el-dialog
title="修改配置"
:visible.sync="dialogFormVisible1"
:before-close="handleClose"
:close-on-click-modal = "false"
center>
<!-- 内层确认弹框 -->
<el-dialog
width="40%"
title="确认修改"
:visible.sync="innerVisible1"
:before-close="handleClose"
:close-on-click-modal = "false"
append-to-body
center>
<el-card class="box-card" style="text-align:left;">
<p>银行账户:<span>{{bankId}}</span></p>
<p>币种:<span>{{coin}}</span></p>
<p>资产最低值:<span>{{min_amount}}</span></p>
<p>自动充值金额:<span>{{recharge_amount}}</span></p>
<p>日最大充值次数:<span>{{max_recharge_times}}</span></p>
</el-card>
<p class="tips">操作前请确认信息</p>
<div slot="footer" class="dialog-footer">
<el-button @click="innerVisible1 = false">取 消</el-button>
<el-button type="primary" @click="sure_recharge1" :disabled="transferok1">确认充值</el-button>
</div>
</el-dialog>
<el-form>
<el-form-item label="银行账户" label-width="120px">
<el-input v-model="bankId" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="币种" label-width="120px">
<el-input v-model="coin" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="资产最低值" label-width="120px">
<el-input v-model="min_amount"></el-input>
</el-form-item>
<el-form-item label="自动充值金额" label-width="120px">
<el-input v-model="recharge_amount"></el-input>
</el-form-item>
<el-form-item label="日最大充值次数" label-width="120px">
<el-input v-model="max_recharge_times"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel(),dialogFormVisible1 = false">取 消</el-button>
<el-button type="primary" @click="min_amount && recharge_amount && max_recharge_times ? innerVisible1=true : innerVisible1=false">确 定</el-button>
</div>
</el-dialog>
</div> </div>
<!--操作记录--> <!--操作记录-->
<div class="record-box"> <div class="record-box">
...@@ -291,6 +348,15 @@ ...@@ -291,6 +348,15 @@
innerVisible: false,//充值确认弹框 innerVisible: false,//充值确认弹框
recharge_list_value: '',//充值时候选择的账户 recharge_list_value: '',//充值时候选择的账户
account_symbol: '',//充值币种 account_symbol: '',//充值币种
/*修改配置弹框参数*/
dialogFormVisible1:false,//充值弹框
transferok1:false,
innerVisible1: false,//确认弹框
min_amount:'',//最低值
recharge_amount: '',//自动充值金额
max_recharge_times: '',//日最大自动充值次数
coin: '',//修改配置的币种
Loading: false, Loading: false,
} }
}, },
...@@ -378,6 +444,7 @@ ...@@ -378,6 +444,7 @@
this.amount_num = ''; this.amount_num = '';
this.recharge_list_value = ''; this.recharge_list_value = '';
this.transferok = false; this.transferok = false;
this.transferok1 = false;
}) })
.catch(_ => {}); .catch(_ => {});
}, },
...@@ -386,6 +453,7 @@ ...@@ -386,6 +453,7 @@
this.amount_num = ''; this.amount_num = '';
this.recharge_list_value = ''; this.recharge_list_value = '';
this.transferok = false; this.transferok = false;
this.transferok1 = false;
}, },
//弹框确认充值 //弹框确认充值
sure_recharge(){ sure_recharge(){
...@@ -450,6 +518,70 @@ ...@@ -450,6 +518,70 @@
}); });
} }
}, },
//修改配置
clickUpdate(symbol) {
this.coin = symbol;
this.dialogFormVisible1 = true;
let Item ;
this.walletInfo.forEach( item => {
if(item.coin===symbol) {
Item = item;
}
})
this.min_amount = Item.min_amount;
this.recharge_amount = Item.recharge_amount;
this.max_recharge_times = Item.max_recharge_times;
},
//弹框确认
sure_recharge1(){
const params = {
account: this.bankId,
coin: this.coin,
min_amount: this.min_amount,
recharge_amount: this.recharge_amount,
max_recharge_times: this.max_recharge_times,
};
this.transferok1 = true;
this.Loading = true;
axios.post(ApiConfig.UpdateBankConfig, params).then(res=>{
if(res.data.code === 200){
this.$notify({
title: '提示',
message: '修改成功',
type: 'success',
duration:'2000',
});
this.Loading = false;
setTimeout(()=>{
this.init();
},500)
}else{
this.Loading = false;
this.$notify({
title: '提示',
message: res.data.msg,
type: 'error',
duration:'2000',
})
}
this.dialogFormVisible1 = false;
this.innerVisible1= false;
this.transferok1 = false;
}).catch( error => {
this.Loading = false;
this.dialogFormVisible1 = false;
this.innerVisible1 = false;
this.transferok1 = false;
this.$notify({
title: '错误',
message: "服务器崩溃啦,请稍后再试",
type: 'error',
duration:'2000',
});
});
},
//币种筛选 //币种筛选
handleCheckAllChange(val) { handleCheckAllChange(val) {
this.checkedCoins = val ? this.coinList : []; this.checkedCoins = val ? this.coinList : [];
......
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