This commit is contained in:
@@ -876,82 +876,11 @@ export default {
|
||||
//Self copy to current workorder??
|
||||
if (this.copyItemWoNumber == this.value.serial) {
|
||||
let newIndex = this.value.items.length;
|
||||
// let wi = window.$gz.util.deepCopy(
|
||||
// this.value.items[this.activeItemIndex]
|
||||
// );
|
||||
|
||||
let wi = JSON.parse(
|
||||
JSON.stringify(this.value.items[this.activeItemIndex])
|
||||
);
|
||||
|
||||
// //deep copy all children
|
||||
// wi.expenses.forEach(x => {
|
||||
// x.id = 0;
|
||||
// x.workOrderItemId = 0;
|
||||
// x.concurrency = undefined;
|
||||
// x.isDirty = true;
|
||||
// });
|
||||
// wi.labors.forEach(x => {
|
||||
// x.id = 0;
|
||||
// x.workOrderItemId = 0;
|
||||
// x.concurrency = undefined;
|
||||
// x.isDirty = true;
|
||||
// });
|
||||
// wi.loans.forEach(x => {
|
||||
// x.id = 0;
|
||||
// x.workOrderItemId = 0;
|
||||
// x.concurrency = undefined;
|
||||
// x.isDirty = true;
|
||||
// x.cost = 0;
|
||||
// x.listPrice = 0;
|
||||
// });
|
||||
// wi.parts.forEach(x => {
|
||||
// x.id = 0;
|
||||
// x.workOrderItemId = 0;
|
||||
// x.concurrency = undefined;
|
||||
// x.isDirty = true;
|
||||
// x.cost = 0;
|
||||
// x.listPrice = 0;
|
||||
// });
|
||||
|
||||
// wi.scheduledUsers.forEach(x => {
|
||||
// x.id = 0;
|
||||
// x.workOrderItemId = 0;
|
||||
// x.concurrency = undefined;
|
||||
// x.isDirty = true;
|
||||
// });
|
||||
// wi.tasks.forEach(x => {
|
||||
// x.id = 0;
|
||||
// x.workOrderItemId = 0;
|
||||
// x.concurrency = undefined;
|
||||
// x.isDirty = true;
|
||||
// });
|
||||
// wi.travels.forEach(x => {
|
||||
// x.id = 0;
|
||||
// x.workOrderItemId = 0;
|
||||
// x.concurrency = undefined;
|
||||
// x.isDirty = true;
|
||||
// });
|
||||
// wi.units.forEach(x => {
|
||||
// x.id = 0;
|
||||
// x.workOrderItemId = 0;
|
||||
// x.concurrency = undefined;
|
||||
// x.isDirty = true;
|
||||
// });
|
||||
// wi.outsideServices.forEach(x => {
|
||||
// x.id = 0;
|
||||
// x.workOrderItemId = 0;
|
||||
// x.concurrency = undefined;
|
||||
// x.isDirty = true;
|
||||
// });
|
||||
|
||||
console.log(
|
||||
"wi equals source",
|
||||
wi === this.value.items[this.activeItemIndex]
|
||||
);
|
||||
console.log(
|
||||
"wi.labors[0] equals source.labors[0]",
|
||||
wi.labors[0] === this.value.items[this.activeItemIndex].labors[0]
|
||||
);
|
||||
this.pvm.washWorkOrderItem(wi);
|
||||
wi.workOrderId = this.value.id;
|
||||
wi.sequence = newIndex + 1;
|
||||
|
||||
Reference in New Issue
Block a user