This commit is contained in:
@@ -92,75 +92,6 @@ export default {
|
|||||||
vm.obj.items.push(wi);
|
vm.obj.items.push(wi);
|
||||||
setDirty = true;
|
setDirty = true;
|
||||||
}
|
}
|
||||||
// if (cp) {
|
|
||||||
// cp.id = 0;
|
|
||||||
// cp.concurrency = 0;
|
|
||||||
// cp.uid = Date.now();
|
|
||||||
// cp.workOrderId = this.obj.id;
|
|
||||||
// cp.isDirty = true;
|
|
||||||
// cp.sequence = this.obj.items.length + 1;
|
|
||||||
// cp.expenses.forEach(x => {
|
|
||||||
// x.id = 0;
|
|
||||||
// x.workOrderItemId = 0;
|
|
||||||
// x.concurrency = undefined;
|
|
||||||
// x.isDirty = true;
|
|
||||||
// });
|
|
||||||
// cp.labors.forEach(x => {
|
|
||||||
// x.id = 0;
|
|
||||||
// x.workOrderItemId = 0;
|
|
||||||
// x.concurrency = undefined;
|
|
||||||
// x.isDirty = true;
|
|
||||||
// });
|
|
||||||
// cp.loans.forEach(x => {
|
|
||||||
// x.id = 0;
|
|
||||||
// x.workOrderItemId = 0;
|
|
||||||
// x.concurrency = undefined;
|
|
||||||
// x.isDirty = true;
|
|
||||||
// x.cost = 0;
|
|
||||||
// x.listPrice = 0;
|
|
||||||
// });
|
|
||||||
// cp.parts.forEach(x => {
|
|
||||||
// x.id = 0;
|
|
||||||
// x.workOrderItemId = 0;
|
|
||||||
// x.concurrency = undefined;
|
|
||||||
// x.isDirty = true;
|
|
||||||
// x.cost = 0;
|
|
||||||
// x.listPrice = 0;
|
|
||||||
// });
|
|
||||||
|
|
||||||
// cp.scheduledUsers.forEach(x => {
|
|
||||||
// x.id = 0;
|
|
||||||
// x.workOrderItemId = 0;
|
|
||||||
// x.concurrency = undefined;
|
|
||||||
// x.isDirty = true;
|
|
||||||
// });
|
|
||||||
// cp.tasks.forEach(x => {
|
|
||||||
// x.id = 0;
|
|
||||||
// x.workOrderItemId = 0;
|
|
||||||
// x.concurrency = undefined;
|
|
||||||
// x.isDirty = true;
|
|
||||||
// });
|
|
||||||
// cp.travels.forEach(x => {
|
|
||||||
// x.id = 0;
|
|
||||||
// x.workOrderItemId = 0;
|
|
||||||
// x.concurrency = undefined;
|
|
||||||
// x.isDirty = true;
|
|
||||||
// });
|
|
||||||
// cp.units.forEach(x => {
|
|
||||||
// x.id = 0;
|
|
||||||
// x.workOrderItemId = 0;
|
|
||||||
// x.concurrency = undefined;
|
|
||||||
// x.isDirty = true;
|
|
||||||
// });
|
|
||||||
// cp.outsideServices.forEach(x => {
|
|
||||||
// x.id = 0;
|
|
||||||
// x.workOrderItemId = 0;
|
|
||||||
// x.concurrency = undefined;
|
|
||||||
// x.isDirty = true;
|
|
||||||
// });
|
|
||||||
// vm.obj.items.push(cp);
|
|
||||||
// setDirty = true;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//new path
|
//new path
|
||||||
@@ -172,63 +103,8 @@ export default {
|
|||||||
this.obj.serial = 0;
|
this.obj.serial = 0;
|
||||||
this.obj.isDirty = true;
|
this.obj.isDirty = true;
|
||||||
vm.obj.items.forEach(z => {
|
vm.obj.items.forEach(z => {
|
||||||
z.id = 0;
|
|
||||||
z.concurrency = undefined;
|
|
||||||
z.workOrderId = 0;
|
z.workOrderId = 0;
|
||||||
z.isDirty = true;
|
washWorkOrderItem(z);
|
||||||
if (z.partRequests) {
|
|
||||||
z.partRequests.splice(0);
|
|
||||||
}
|
|
||||||
z.expenses.forEach(x => {
|
|
||||||
x.id = 0;
|
|
||||||
x.concurrency = undefined;
|
|
||||||
x.isDirty = true;
|
|
||||||
});
|
|
||||||
z.labors.forEach(x => {
|
|
||||||
x.id = 0;
|
|
||||||
x.concurrency = undefined;
|
|
||||||
x.isDirty = true;
|
|
||||||
});
|
|
||||||
z.loans.forEach(x => {
|
|
||||||
x.id = 0;
|
|
||||||
x.concurrency = undefined;
|
|
||||||
x.isDirty = true;
|
|
||||||
x.cost = 0;
|
|
||||||
x.listPrice = 0;
|
|
||||||
});
|
|
||||||
z.parts.forEach(x => {
|
|
||||||
x.id = 0;
|
|
||||||
x.concurrency = undefined;
|
|
||||||
x.isDirty = true;
|
|
||||||
x.cost = 0;
|
|
||||||
x.listPrice = 0;
|
|
||||||
});
|
|
||||||
|
|
||||||
z.scheduledUsers.forEach(x => {
|
|
||||||
x.id = 0;
|
|
||||||
x.concurrency = undefined;
|
|
||||||
x.isDirty = true;
|
|
||||||
});
|
|
||||||
z.tasks.forEach(x => {
|
|
||||||
x.id = 0;
|
|
||||||
x.concurrency = undefined;
|
|
||||||
x.isDirty = true;
|
|
||||||
});
|
|
||||||
z.travels.forEach(x => {
|
|
||||||
x.id = 0;
|
|
||||||
x.concurrency = undefined;
|
|
||||||
x.isDirty = true;
|
|
||||||
});
|
|
||||||
z.units.forEach(x => {
|
|
||||||
x.id = 0;
|
|
||||||
x.concurrency = undefined;
|
|
||||||
x.isDirty = true;
|
|
||||||
});
|
|
||||||
z.outsideServices.forEach(x => {
|
|
||||||
x.id = 0;
|
|
||||||
x.concurrency = undefined;
|
|
||||||
x.isDirty = true;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
setDirty = true;
|
setDirty = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -2000,12 +1876,15 @@ function generateMenu(vm) {
|
|||||||
// savable as a new record
|
// savable as a new record
|
||||||
// (used by duplicate and copy wo item functions)
|
// (used by duplicate and copy wo item functions)
|
||||||
//
|
//
|
||||||
function washWorkOrderItem(wi, vm) {
|
function washWorkOrderItem(wi) {
|
||||||
if (wi) {
|
if (wi) {
|
||||||
wi.id = 0;
|
wi.id = 0;
|
||||||
wi.concurrency = 0;
|
wi.concurrency = 0;
|
||||||
wi.uid = Date.now();
|
wi.uid = Date.now();
|
||||||
wi.isDirty = true;
|
wi.isDirty = true;
|
||||||
|
if (wi.partRequests) {
|
||||||
|
wi.partRequests.splice(0);
|
||||||
|
}
|
||||||
wi.expenses.forEach(x => {
|
wi.expenses.forEach(x => {
|
||||||
x.id = 0;
|
x.id = 0;
|
||||||
x.workOrderItemId = 0;
|
x.workOrderItemId = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user