11 .transferType input[type=radio] {
16 .transferType input[type="radio"]:checked+label{
18 background-color: #333333;
38 vertical-align: middle;
45 border:1px solid #E0E0E0;
53 <div class="warp-chlid bg-gray">
54 <section class="header bg-header">
55 <i class="iconfont icon-back" @click="close"></i>
56 <p>{{ $t('listVote.cancelVote') }}</p>
59 <section class="form-container">
60 <div class="form bg-white">
61 <div v-if="selectVote !== null" class="form-item">
62 <label class="form-item-label">{{ $t('vote.selectNode') }}</label>
63 <div class="form-item-content" >
64 <div class="vote-title" >
65 <img :src="selectVote.logo" alt="">
73 <div class="form bg-white">
75 <div class="form-item">
76 <label class="form-item-label">
77 {{ $t('transfer.quantity') }}
80 <div class="form-item-content" style=" display: flex;">
81 <input type="number" v-model="transaction.amount" :placeholder="bytomBalance">
82 <span class="color-grey" style="width: 40px; font-size: 15px;position: absolute;right: 0;">{{unit}}</span>
86 <a class="btn btn-primary" @click="send">{{ $t('transfer.confirm') }}</a>
92 import transaction from "@/models/transaction";
93 import getLang from "@/assets/language/sdk";
94 import Confirm from "../sendTransaction/transferConfirm";
95 import { BTM } from "@/utils/constants";
96 import { mapGetters, mapState } from 'vuex'
97 import { Number as Num } from "@/utils/Number"
99 const currencyInPrice = {
117 accountBalance: 0.00,
119 fee: this.$t("transfer.feeType"),
120 feeTypeOptions: [this.$t("transfer.feeType")],
130 bytomBalance: function () {
131 const vote = this.selectVote
133 if(vote && vote.total > vote.locked ){
134 vetoAmount = Num.formatNue(vote.total-vote.locked,8)
137 return `${this.$t("listCancel.availableVeto")}${(vetoAmount != null && vetoAmount != 0) ? vetoAmount : '0.00'}`
152 account: function (newAccount) {
153 this.guid = newAccount.guid;
159 this.transaction.vote = "";
160 this.transaction.amount = "";
162 formatCurrency: function (num) {
163 return Num.formatCurrency(num, this.currency)
166 if (this.transaction.amount <= 0) {
168 body: this.$t("transfer.noneBTM")
173 let loader = this.$loading.show({
174 // Optional parameters
177 onCancel: this.onCancel
180 const vote = this.selectVote.pub_key
181 this.transaction.to = vote
182 transaction.buildVeto(this.currentAccount.guid, vote, Num.convertToNue(this.transaction.amount,8), this.transaction.confirmations).then(result => {
184 if(!this.transaction.fee){
185 this.transaction.fee = Number( _.sumBy(result, 'fee') / 100000000);
187 this.$router.push({ name: 'vote-confirm', params: { account: this.currentAccount, transaction: this.transaction, assetAlias: 'BTM',rawData: result} })
191 body: getLang(error.message)
197 transaction.asset(BTM).then(ret => {
198 this.selectAsset = ret