This commit is contained in:
@@ -54,7 +54,8 @@ export default {
|
|||||||
"Print",
|
"Print",
|
||||||
"WikiPage",
|
"WikiPage",
|
||||||
"Duplicate",
|
"Duplicate",
|
||||||
"RecordHistory"
|
"RecordHistory",
|
||||||
|
"ErrorFieldLengthExceeded"
|
||||||
],
|
],
|
||||||
decimalValidate(required) {
|
decimalValidate(required) {
|
||||||
return { required: required, decimal: [2, this.formats.decimalSeparator] };
|
return { required: required, decimal: [2, this.formats.decimalSeparator] };
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import dayjs from "dayjs";
|
|||||||
import lodash from "./libs/lodash.min.js";
|
import lodash from "./libs/lodash.min.js";
|
||||||
import locale from "./api/locale";
|
import locale from "./api/locale";
|
||||||
import gzapi from "./api/apiutil";
|
import gzapi from "./api/apiutil";
|
||||||
|
import gzvalidate from "./api/gzvalidate";
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
// LIBS AND GLOBAL ITEMS
|
// LIBS AND GLOBAL ITEMS
|
||||||
@@ -25,6 +26,7 @@ Object.defineProperty(Vue.prototype, "$dayjs", { value: dayjs });
|
|||||||
Object.defineProperty(Vue.prototype, "$_", { value: lodash });
|
Object.defineProperty(Vue.prototype, "$_", { value: lodash });
|
||||||
Object.defineProperty(Vue.prototype, "$gzlocale", { value: locale });
|
Object.defineProperty(Vue.prototype, "$gzlocale", { value: locale });
|
||||||
Object.defineProperty(Vue.prototype, "$gzapi", { value: gzapi });
|
Object.defineProperty(Vue.prototype, "$gzapi", { value: gzapi });
|
||||||
|
Object.defineProperty(Vue.prototype, "$gzv", { value: gzvalidate });
|
||||||
Object.defineProperty(Vue.prototype, "$gzerror", {
|
Object.defineProperty(Vue.prototype, "$gzerror", {
|
||||||
value: errorHandler.handleFormError
|
value: errorHandler.handleFormError
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-layout>
|
<v-layout v-if="this.formReady">
|
||||||
<v-flex>
|
<v-flex>
|
||||||
<form>
|
<form>
|
||||||
<v-layout align-center justify-left row wrap>
|
<v-layout align-center justify-left row wrap>
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
v-model="obj.serial"
|
v-model="obj.serial"
|
||||||
:counter="10"
|
:counter="10"
|
||||||
:label="this.$gzlocale.get('WidgetSerial')"
|
:label="this.$gzlocale.get('WidgetSerial')"
|
||||||
|
:rules="[this.$gzv.MaxLength('WidgetSerial',obj.serial,10)]"
|
||||||
name="serial"
|
name="serial"
|
||||||
required
|
required
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
@@ -90,7 +91,6 @@
|
|||||||
required
|
required
|
||||||
></v-checkbox>
|
></v-checkbox>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
|
|
||||||
</v-layout>
|
</v-layout>
|
||||||
|
|
||||||
<v-layout align-center justify-space-around row wrap mt-5>
|
<v-layout align-center justify-space-around row wrap mt-5>
|
||||||
@@ -142,7 +142,13 @@ export default {
|
|||||||
"WidgetCustom15",
|
"WidgetCustom15",
|
||||||
"WidgetCustom16"
|
"WidgetCustom16"
|
||||||
].concat(this.$gzlocale.commonKeysEditForm);
|
].concat(this.$gzlocale.commonKeysEditForm);
|
||||||
this.$gzlocale.fetch(ltKeysRequired);
|
this.$gzlocale
|
||||||
|
.fetch(ltKeysRequired)
|
||||||
|
.then(() => (this.formReady = true))
|
||||||
|
.catch(err => {
|
||||||
|
this.formReady = true;
|
||||||
|
this.$gzerror(err);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getDataFromApi();
|
this.getDataFromApi();
|
||||||
@@ -151,6 +157,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
obj: {},
|
obj: {},
|
||||||
|
formReady: false,
|
||||||
theDate: new Date(),
|
theDate: new Date(),
|
||||||
date: new Date().toISOString().substr(0, 10),
|
date: new Date().toISOString().substr(0, 10),
|
||||||
menu: false,
|
menu: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user