This commit is contained in:
@@ -9,16 +9,12 @@
|
|||||||
locale: languageName
|
locale: languageName
|
||||||
}"
|
}"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
v-bind:label="label"
|
:label="label"
|
||||||
v-bind:rules="rules"
|
:rules="rules"
|
||||||
v-bind:required="required"
|
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
<p v-show="error" class="form__error v-messages theme--light error--text">
|
<p v-show="error" class="form__error v-messages theme--light error--text">
|
||||||
{{ error }}
|
{{ error }}
|
||||||
</p>
|
</p>
|
||||||
<!-- currency:{{ currencyName }}, locale:{{ languageName }}, amount:{{ amount }}
|
|
||||||
<span class="title">v-currency-field</span>
|
|
||||||
<v-currency-field v-model="value" /> -->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -41,7 +37,6 @@ export default {
|
|||||||
label: String,
|
label: String,
|
||||||
rules: Array,
|
rules: Array,
|
||||||
value: { type: Number, default: null },
|
value: { type: Number, default: null },
|
||||||
required: { type: Boolean, default: false },
|
|
||||||
readonly: { type: Boolean, default: false },
|
readonly: { type: Boolean, default: false },
|
||||||
error: {
|
error: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -66,29 +61,5 @@ export default {
|
|||||||
this.formattedValue = value;
|
this.formattedValue = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ,
|
|
||||||
// computed: {
|
|
||||||
// amountLocal: {
|
|
||||||
// get: function() {
|
|
||||||
// console.log("Control getting amount: " + this.amount);
|
|
||||||
// if (this.amount == null) {
|
|
||||||
// return "0";
|
|
||||||
// } else {
|
|
||||||
// return this.amount.toString();
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// set: function(value) {
|
|
||||||
// var parsedValue = this.$parseCurrency(this.amount, {
|
|
||||||
// currency: this.currencyName,
|
|
||||||
// locale: this.languageName
|
|
||||||
// });
|
|
||||||
// console.log("Control SETTING amount: " + parsedValue);
|
|
||||||
// //https://vuejs.org/v2/guide/components-custom-events.html#sync-Modifier
|
|
||||||
// //https://stackoverflow.com/a/51722100/8939
|
|
||||||
// this.$emit("update:amount", parsedValue);
|
|
||||||
// this.$emit("change", parsedValue);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
prepend-icon="fa-user"
|
prepend-icon="fa-user"
|
||||||
label="User"
|
label="User"
|
||||||
autofocus
|
autofocus
|
||||||
required
|
|
||||||
clearable
|
clearable
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
autocorrect="off"
|
autocorrect="off"
|
||||||
@@ -41,7 +40,6 @@
|
|||||||
prepend-icon="fa-key"
|
prepend-icon="fa-key"
|
||||||
label="Password"
|
label="Password"
|
||||||
type="password"
|
type="password"
|
||||||
required
|
|
||||||
clearable
|
clearable
|
||||||
:error="errorBadCreds"
|
:error="errorBadCreds"
|
||||||
v-on:keyup.enter="login"
|
v-on:keyup.enter="login"
|
||||||
|
|||||||
@@ -70,7 +70,6 @@
|
|||||||
ref="count"
|
ref="count"
|
||||||
:rules="[form().integerValid(this, 'count')]"
|
:rules="[form().integerValid(this, 'count')]"
|
||||||
:error-messages="form().serverErrors(this, 'count')"
|
:error-messages="form().serverErrors(this, 'count')"
|
||||||
required
|
|
||||||
@change="onChange('count')"
|
@change="onChange('count')"
|
||||||
type="number"
|
type="number"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
@@ -88,10 +87,12 @@
|
|||||||
:readonly="this.formState.readOnly"
|
:readonly="this.formState.readOnly"
|
||||||
:label="lt('WidgetDollarAmount')"
|
:label="lt('WidgetDollarAmount')"
|
||||||
ref="dollarAmount"
|
ref="dollarAmount"
|
||||||
required
|
:rules="[
|
||||||
:rules="[form().decimalValid(this, 'dollarAmount')]"
|
form().decimalValid(this, 'dollarAmount'),
|
||||||
|
form().required(this, 'dollarAmount')
|
||||||
|
]"
|
||||||
:error-messages="form().serverErrors(this, 'dollarAmount')"
|
:error-messages="form().serverErrors(this, 'dollarAmount')"
|
||||||
@change="onChange('dollarAmount')"
|
@input="onChange('dollarAmount')"
|
||||||
></gz-currency>
|
></gz-currency>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
@@ -130,7 +131,6 @@
|
|||||||
:label="lt('Active')"
|
:label="lt('Active')"
|
||||||
ref="active"
|
ref="active"
|
||||||
:error-messages="form().serverErrors(this, 'active')"
|
:error-messages="form().serverErrors(this, 'active')"
|
||||||
required
|
|
||||||
@change="onChange('active')"
|
@change="onChange('active')"
|
||||||
></v-checkbox>
|
></v-checkbox>
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -151,7 +151,6 @@
|
|||||||
ref="roles"
|
ref="roles"
|
||||||
:rules="[form().integerValid(this, 'roles')]"
|
:rules="[form().integerValid(this, 'roles')]"
|
||||||
:error-messages="form().serverErrors(this, 'roles')"
|
:error-messages="form().serverErrors(this, 'roles')"
|
||||||
required
|
|
||||||
@change="onChange('roles')"
|
@change="onChange('roles')"
|
||||||
></v-select>
|
></v-select>
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -416,7 +415,6 @@ export default {
|
|||||||
},
|
},
|
||||||
onChange(ref) {
|
onChange(ref) {
|
||||||
if (!this.formState.loading && !this.formState.readOnly) {
|
if (!this.formState.loading && !this.formState.readOnly) {
|
||||||
console.log("Onchange: " + ref);
|
|
||||||
window.$gz.form.onChange(this, ref);
|
window.$gz.form.onChange(this, ref);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -447,7 +445,7 @@ export default {
|
|||||||
window.$gz.form.setErrorBoxErrors(vm);
|
window.$gz.form.setErrorBoxErrors(vm);
|
||||||
} else {
|
} else {
|
||||||
vm.obj = res.data;
|
vm.obj = res.data;
|
||||||
console.log("GetData dollarAmount:" + res.data.dollarAmount);
|
|
||||||
//Update the form status
|
//Update the form status
|
||||||
window.$gz.form.setFormState({
|
window.$gz.form.setFormState({
|
||||||
vm: vm,
|
vm: vm,
|
||||||
|
|||||||
Reference in New Issue
Block a user