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