This commit is contained in:
@@ -152,6 +152,12 @@
|
||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].partId`
|
||||
)
|
||||
"
|
||||
:rules="[
|
||||
form().required(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].partId`
|
||||
)
|
||||
]"
|
||||
@input="
|
||||
fieldValueChanged(
|
||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].partId`
|
||||
@@ -476,7 +482,7 @@ export default {
|
||||
userId: null,
|
||||
description: null,
|
||||
serials: null,
|
||||
partId: null,
|
||||
partId: 0, //deliberately zero to break rule on new
|
||||
partWarehouseId: 1, //important always default to "default" warehouse id 1 as even with inventory turned off it's required
|
||||
quantity: 1,
|
||||
taxPartSaleId: null,
|
||||
@@ -491,6 +497,15 @@ export default {
|
||||
this.$emit("change");
|
||||
this.selectedRow = [{ index: newIndex }];
|
||||
this.activeItemIndex = newIndex;
|
||||
//trigger rule breaking / validation
|
||||
this.$nextTick(() => {
|
||||
this.value.items[this.activeWoItemIndex].parts[
|
||||
this.activeItemIndex
|
||||
].partId = null;
|
||||
this.fieldValueChanged(
|
||||
`Items[${this.activeWoItemIndex}].parts[${this.activeItemIndex}].partId`
|
||||
);
|
||||
});
|
||||
},
|
||||
unDeleteItem() {
|
||||
this.value.items[this.activeWoItemIndex].parts[
|
||||
|
||||
@@ -280,7 +280,7 @@ export default {
|
||||
customFields: "{}",
|
||||
tags: [],
|
||||
userId: null,
|
||||
unitId: 0,
|
||||
unitId: 0,//zero to break rule on new
|
||||
estimatedQuantity: 0,
|
||||
startDate: null,
|
||||
stopDate: null,
|
||||
|
||||
Reference in New Issue
Block a user