close #1456 Fixed: Amount is erased when changing account in payments

This commit is contained in:
Cüneyt Şentürk
2020-06-04 22:21:37 +03:00
parent fd5d1398f1
commit fe5329d6cd
14 changed files with 20 additions and 15 deletions

View File

@ -10,7 +10,7 @@
</span>
</div>
<money :name="name" @input="input" :placeholder="placeholder" v-bind="money" :value="value" :disabled="disabled" :masked="masked" class="form-control"></money>
<money :name="name" @input="input" :placeholder="placeholder" v-bind="money" :value="model" :disabled="disabled" :masked="masked" class="form-control"></money>
</div>
<div class="invalid-feedback d-block" v-if="error" v-html="error"></div>
@ -126,6 +126,8 @@ export default {
},
mounted() {
this.model = this.value;
this.$emit('interface', this.model);
},
@ -134,6 +136,7 @@ export default {
//this.$emit('change', this.model);
//this.$emit('interface', this.model);
},
input(event) {
this.model = event;
@ -153,9 +156,11 @@ export default {
masked: this.masked
};
},
value: function (value) {
this.model = value;
},
model: function (model) {
this.$emit('change', this.model);
this.$emit('interface', this.model);

View File

@ -184,10 +184,10 @@ export default {
}
})
.then(response => {
this.currency = response.data;
this.form.currency_code = response.data.currency_code;
this.form.currency_rate = response.data.currency_rate;
this.currency = response.data;
})
.catch(error => {
});