|
@@ -86,7 +86,7 @@ ProjectsDAO.prototype.getUserProject = function (userId, ProjId, callback) {
|
|
|
}
|
|
|
|
|
|
ProjectsDAO.prototype.updateUserProjects = async function (userId, compilationId, datas, callback) {
|
|
|
- let data, project, updateLength = 0, hasError = false, deleteInfo = null, i, newProject,original_property = null;
|
|
|
+ let data, project, updateLength = 0, hasError = false, deleteInfo = null, i, newProject;
|
|
|
let updateAll = function (err) {
|
|
|
if (!err) {
|
|
|
updateLength += 1;
|
|
@@ -160,9 +160,6 @@ ProjectsDAO.prototype.updateUserProjects = async function (userId, compilationId
|
|
|
data.updateData.property.lockBills = false;
|
|
|
//工料机单价调整系数
|
|
|
data.updateData.property.tenderSetting = tenderSetting;
|
|
|
- original_property = _.cloneDeep(data.updateData.property);
|
|
|
- delete data.updateData.property.templateLibID;
|
|
|
- delete data.updateData.property.colLibID;
|
|
|
}
|
|
|
|
|
|
newProject = new Projects(data.updateData);
|
|
@@ -185,7 +182,7 @@ ProjectsDAO.prototype.updateUserProjects = async function (userId, compilationId
|
|
|
}
|
|
|
newProject.save(async function (err, result) {
|
|
|
if (!err && result._doc.projType === projectType.tender) {
|
|
|
- newProjController.copyTemplateData(original_property, newProject.ID, updateAll);
|
|
|
+ newProjController.copyTemplateData(result._doc.property, newProject.ID, updateAll);
|
|
|
} else {
|
|
|
updateAll(err);
|
|
|
}
|