case 1690
This commit is contained in:
@@ -162,39 +162,90 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-form>
|
</v-form>
|
||||||
<!-- <v-row justify="center">
|
<!-- ################################################################################-->
|
||||||
<v-dialog v-model="woSelectorDialog" persistent max-width="300px">
|
<!-- ########################## UNIT ADD FORM #####################################-->
|
||||||
<v-card>
|
<!-- ################################################################################-->
|
||||||
<v-card-title>
|
<template>
|
||||||
<span class="text-h5">{{
|
<v-row justify="center">
|
||||||
$ay.t("CustomerServiceRequestAcceptToExisting")
|
<v-dialog max-width="1600px" v-model="addUnitDialog">
|
||||||
}}</span>
|
<v-card>
|
||||||
</v-card-title>
|
<v-card-title> </v-card-title>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
|
<v-row>
|
||||||
<gz-pick-list
|
<v-col
|
||||||
:aya-type="ayaTypes().WorkOrder"
|
v-if="$store.state.userType == 4"
|
||||||
:variant="'customerid:' + obj.customerId"
|
cols="12"
|
||||||
:show-edit-icon="false"
|
sm="6"
|
||||||
v-model="selectedWOId"
|
lg="4"
|
||||||
:label="$ay.t('WorkOrder')"
|
xl="3"
|
||||||
></gz-pick-list>
|
>
|
||||||
</v-card-text>
|
<gz-pick-list
|
||||||
<v-card-actions>
|
:aya-type="ayaTypes().Customer"
|
||||||
<v-spacer></v-spacer>
|
show-edit-icon
|
||||||
<v-btn
|
:include-inactive="true"
|
||||||
color="blue darken-1"
|
v-model="unitObj.customerId"
|
||||||
text
|
:label="$ay.t('Customer')"
|
||||||
@click="woSelectorDialog = false"
|
ref="customerId"
|
||||||
>{{ $ay.t("Cancel") }}</v-btn
|
data-cy="customerId"
|
||||||
>
|
variant="ho"
|
||||||
<v-btn color="blue darken-1" text @click="accept(selectedWOId)">{{
|
template="[{'fld':'customername'}]"
|
||||||
$ay.t("OK")
|
></gz-pick-list>
|
||||||
}}</v-btn>
|
</v-col>
|
||||||
</v-card-actions>
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
</v-card>
|
<v-text-field
|
||||||
</v-dialog>
|
v-model="unitObj.serial"
|
||||||
</v-row> -->
|
:readonly="formState.readOnly"
|
||||||
|
:label="$ay.t('UnitSerial')"
|
||||||
|
:rules="[form().required(this, 'serial')]"
|
||||||
|
:error-messages="form().serverErrors(this, 'serial')"
|
||||||
|
ref="serial"
|
||||||
|
data-cy="serial"
|
||||||
|
></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
|
<v-text-field
|
||||||
|
v-model="unitObj.description"
|
||||||
|
:readonly="formState.readOnly"
|
||||||
|
:label="$ay.t('UnitDescription')"
|
||||||
|
ref="description"
|
||||||
|
data-cy="description"
|
||||||
|
:error-messages="form().serverErrors(this, 'description')"
|
||||||
|
></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
|
<gz-pick-list
|
||||||
|
:aya-type="ayaTypes().UnitModel"
|
||||||
|
show-edit-icon
|
||||||
|
v-model="unitObj.unitModelId"
|
||||||
|
:readonly="formState.readOnly"
|
||||||
|
:label="$ay.t('UnitModel')"
|
||||||
|
ref="unitModelId"
|
||||||
|
data-cy="unitModelId"
|
||||||
|
:error-messages="form().serverErrors(this, 'unitModelId')"
|
||||||
|
></gz-pick-list>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-card-text>
|
||||||
|
<v-card-actions>
|
||||||
|
<v-btn text @click="addUnitDialog = false" color="primary">{{
|
||||||
|
$ay.t("Cancel")
|
||||||
|
}}</v-btn>
|
||||||
|
<v-spacer></v-spacer>
|
||||||
|
<v-btn
|
||||||
|
:disabled="unitObj.serial == null"
|
||||||
|
color="primary"
|
||||||
|
text
|
||||||
|
@click="addUnit()"
|
||||||
|
class="ml-4"
|
||||||
|
data-cy="csrUnitAdd"
|
||||||
|
>{{ $ay.t("Add") }}</v-btn
|
||||||
|
>
|
||||||
|
</v-card-actions>
|
||||||
|
</v-card>
|
||||||
|
</v-dialog>
|
||||||
|
</v-row>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<v-overlay :value="!formState.ready || formState.loading">
|
<v-overlay :value="!formState.ready || formState.loading">
|
||||||
<v-progress-circular indeterminate :size="64" />
|
<v-progress-circular indeterminate :size="64" />
|
||||||
@@ -236,6 +287,7 @@ export default {
|
|||||||
if (this.$store.state.userType == 3) {
|
if (this.$store.state.userType == 3) {
|
||||||
//Customer specific user
|
//Customer specific user
|
||||||
this.obj.customerId = this.$store.state.customerRights.entityId;
|
this.obj.customerId = this.$store.state.customerRights.entityId;
|
||||||
|
this.unitObj.customerId = this.$store.state.customerRights.entityId;
|
||||||
}
|
}
|
||||||
window.$gz.form.setFormState({
|
window.$gz.form.setFormState({
|
||||||
vm: vm,
|
vm: vm,
|
||||||
@@ -307,7 +359,14 @@ export default {
|
|||||||
serverError: {}
|
serverError: {}
|
||||||
},
|
},
|
||||||
rights: window.$gz.role.defaultRightsObject(),
|
rights: window.$gz.role.defaultRightsObject(),
|
||||||
ayaType: window.$gz.type.CustomerServiceRequest
|
ayaType: window.$gz.type.CustomerServiceRequest,
|
||||||
|
addUnitDialog: false,
|
||||||
|
unitObj: {
|
||||||
|
serial: null,
|
||||||
|
description: null,
|
||||||
|
unitModelId: null,
|
||||||
|
customerId: null
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -339,7 +398,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showAddUnitDialog: function() {},
|
showAddUnitDialog: function() {
|
||||||
|
this.addUnitDialog = true;
|
||||||
|
},
|
||||||
|
addUnit: function() {},
|
||||||
unitListVariant: function() {
|
unitListVariant: function() {
|
||||||
return `customerid: ${this.obj.customerId}`;
|
return `customerid: ${this.obj.customerId}`;
|
||||||
},
|
},
|
||||||
@@ -688,7 +750,10 @@ async function fetchTranslatedText() {
|
|||||||
"CustomerServiceRequestCustom14",
|
"CustomerServiceRequestCustom14",
|
||||||
"CustomerServiceRequestCustom15",
|
"CustomerServiceRequestCustom15",
|
||||||
"CustomerServiceRequestCustom16",
|
"CustomerServiceRequestCustom16",
|
||||||
"AddNewUnit"
|
"AddNewUnit",
|
||||||
|
"UnitDescription",
|
||||||
|
"UnitModel",
|
||||||
|
"UnitSerial"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user