This commit is contained in:
@@ -90,8 +90,59 @@ export default {
|
|||||||
cp.concurrency = 0;
|
cp.concurrency = 0;
|
||||||
cp.uid = Date.now();
|
cp.uid = Date.now();
|
||||||
cp.isDirty = true;
|
cp.isDirty = true;
|
||||||
console.log("copy item is", JSON.stringify(cp));
|
cp.sequence = this.obj.items.length + 1;
|
||||||
|
cp.expenses.forEach(x => {
|
||||||
|
x.id = 0;
|
||||||
|
x.concurrency = undefined;
|
||||||
|
x.isDirty = true;
|
||||||
|
});
|
||||||
|
cp.labors.forEach(x => {
|
||||||
|
x.id = 0;
|
||||||
|
x.concurrency = undefined;
|
||||||
|
x.isDirty = true;
|
||||||
|
});
|
||||||
|
cp.loans.forEach(x => {
|
||||||
|
x.id = 0;
|
||||||
|
x.concurrency = undefined;
|
||||||
|
x.isDirty = true;
|
||||||
|
x.cost = 0;
|
||||||
|
x.listPrice = 0;
|
||||||
|
});
|
||||||
|
cp.parts.forEach(x => {
|
||||||
|
x.id = 0;
|
||||||
|
x.concurrency = undefined;
|
||||||
|
x.isDirty = true;
|
||||||
|
x.cost = 0;
|
||||||
|
x.listPrice = 0;
|
||||||
|
});
|
||||||
|
|
||||||
|
cp.scheduledUsers.forEach(x => {
|
||||||
|
x.id = 0;
|
||||||
|
x.concurrency = undefined;
|
||||||
|
x.isDirty = true;
|
||||||
|
});
|
||||||
|
cp.tasks.forEach(x => {
|
||||||
|
x.id = 0;
|
||||||
|
x.concurrency = undefined;
|
||||||
|
x.isDirty = true;
|
||||||
|
});
|
||||||
|
cp.travels.forEach(x => {
|
||||||
|
x.id = 0;
|
||||||
|
x.concurrency = undefined;
|
||||||
|
x.isDirty = true;
|
||||||
|
});
|
||||||
|
cp.units.forEach(x => {
|
||||||
|
x.id = 0;
|
||||||
|
x.concurrency = undefined;
|
||||||
|
x.isDirty = true;
|
||||||
|
});
|
||||||
|
cp.outsideServices.forEach(x => {
|
||||||
|
x.id = 0;
|
||||||
|
x.concurrency = undefined;
|
||||||
|
x.isDirty = true;
|
||||||
|
});
|
||||||
vm.obj.items.push(cp);
|
vm.obj.items.push(cp);
|
||||||
|
setDirty = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user