This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
@input="fieldValueChanged('name')"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
{{ sortedList }}
|
||||
<v-col cols="12">
|
||||
<gz-pick-list
|
||||
v-if="!formState.readOnly"
|
||||
@@ -69,6 +69,7 @@
|
||||
<gz-decimal
|
||||
v-model="item.quantity"
|
||||
:readonly="formState.readOnly"
|
||||
@input="quantityChanged(item)"
|
||||
></gz-decimal>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -334,6 +335,22 @@ export default {
|
||||
id: item.partId
|
||||
});
|
||||
},
|
||||
quantityChanged: function(item) {
|
||||
let vm = this;
|
||||
if (item.quantity == null || item.quantity < 1) {
|
||||
// item.quantity = 1;
|
||||
|
||||
let index = vm.obj.items.findIndex(z => z.partId == item.partId);
|
||||
if (index == -1) {
|
||||
return;
|
||||
}
|
||||
item.quantity = 1;
|
||||
|
||||
//vm.$set(vm.obj.items, index, item);
|
||||
//vm.obj.items.splice(index, 1, item);
|
||||
}
|
||||
vm.formState.dirty = true;
|
||||
},
|
||||
canSave: function() {
|
||||
return this.formState.valid && this.formState.dirty;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user