This commit is contained in:
2021-06-16 23:47:58 +00:00
parent 6526fd1271
commit 026f53baf4
8 changed files with 56 additions and 16 deletions

View File

@@ -623,8 +623,13 @@ export default {
},
gotoIndex(val, oldVal) {
if (val != oldVal) {
this.selectedRow = [{ index: val }];
this.activeItemIndex = val;
let gotoIndex = val;
if (val < 0) {
//it's a create request
gotoIndex = this.newItem();
}
this.selectedRow = [{ index: gotoIndex }];
this.activeItemIndex = gotoIndex;
this.$nextTick(() => {
const el = this.$refs.outsideservicetopform;
if (el) {
@@ -692,6 +697,7 @@ export default {
`Items[${this.activeWoItemIndex}].outsideServices[${this.activeItemIndex}].unitId`
);
});
return newIndex; //for create new on goto
},
unDeleteItem() {
this.value.items[this.activeWoItemIndex].outsideServices[