This commit is contained in:
@@ -21,23 +21,20 @@
|
|||||||
v-model="newSerial"
|
v-model="newSerial"
|
||||||
:label="$ay.t('PartSerialNumbersAvailable')"
|
:label="$ay.t('PartSerialNumbersAvailable')"
|
||||||
clearable
|
clearable
|
||||||
no-resize
|
:rows="$vuetify.breakpoint.xs ? 5 : 20"
|
||||||
rows="5"
|
|
||||||
ref="newSerial"
|
ref="newSerial"
|
||||||
data-cy="newSerial"
|
data-cy="newSerial"
|
||||||
append-outer-icon="$ayiPlus"
|
append-outer-icon="$ayiPlus"
|
||||||
@click:append-outer="addItem()"
|
@click:append-outer="addItem()"
|
||||||
></v-textarea>
|
></v-textarea>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" class="mt-n12">
|
<v-col cols="12" sm="6" class="mt-n12">
|
||||||
<v-simple-table>
|
<v-simple-table>
|
||||||
<template v-slot:default>
|
<template v-slot:default>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th />
|
<th />
|
||||||
<!-- <th class="text-left">
|
<th />
|
||||||
{{ $ay.t("PartSerialNumbersAvailable") }}
|
|
||||||
</th> -->
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
@@ -45,7 +42,8 @@
|
|||||||
<tr v-for="(item, index) in sortedList()" :key="index">
|
<tr v-for="(item, index) in sortedList()" :key="index">
|
||||||
<td>
|
<td>
|
||||||
{{ item }}
|
{{ item }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
<v-icon class="ml-6" @click="removeItem(index)">
|
<v-icon class="ml-6" @click="removeItem(index)">
|
||||||
$ayiTrashAlt
|
$ayiTrashAlt
|
||||||
</v-icon>
|
</v-icon>
|
||||||
@@ -174,8 +172,8 @@ export default {
|
|||||||
return this.obj.slice().sort();
|
return this.obj.slice().sort();
|
||||||
},
|
},
|
||||||
removeItem: function(index) {
|
removeItem: function(index) {
|
||||||
vm.obj.splice(index, 1);
|
this.obj.splice(index, 1);
|
||||||
vm.formState.dirty = true;
|
this.formState.dirty = true;
|
||||||
},
|
},
|
||||||
canSave: function() {
|
canSave: function() {
|
||||||
return this.formState.valid && this.formState.dirty;
|
return this.formState.valid && this.formState.dirty;
|
||||||
@@ -189,8 +187,8 @@ export default {
|
|||||||
splitted = [...splitted, ...this.obj];
|
splitted = [...splitted, ...this.obj];
|
||||||
let uniqueItems = [...new Set(splitted)];
|
let uniqueItems = [...new Set(splitted)];
|
||||||
uniqueItems.sort();
|
uniqueItems.sort();
|
||||||
console.log(uniqueItems);
|
this.obj = uniqueItems;
|
||||||
//1,2,3,1,014369160,5,3,9,qw
|
this.formState.dirty = true;
|
||||||
},
|
},
|
||||||
ayaTypes: function() {
|
ayaTypes: function() {
|
||||||
return window.$gz.type;
|
return window.$gz.type;
|
||||||
|
|||||||
Reference in New Issue
Block a user