|
@@ -54,6 +54,7 @@ const { buildingTemplate, railTemplate } = require('../../main/templates/constru
|
|
|
const { BudgetType } = require('../../../public/common_constants');
|
|
|
|
|
|
let equipmentPurchaseModel = mongoose.model('equipment_purchase');
|
|
|
+const uuidV1 = require('uuid/v1');
|
|
|
function ProjectsDAO() {
|
|
|
}
|
|
|
|
|
@@ -276,7 +277,8 @@ ProjectsDAO.prototype.updateUserProjects = async function (userId, compilationId
|
|
|
let cpFile = await calcProgramFacade.newProjectCalcProgramFile(data.updateData);
|
|
|
newProject.property.calcProgramFile = cpFile ? cpFile : null;
|
|
|
//新建设备购置计录行
|
|
|
- await equipmentPurchaseModel.create({projectID:newProject.ID,total:0,equipments:[]});
|
|
|
+ const empRow = {ID:uuidV1(),ParentID:'-1',seq:1};
|
|
|
+ await equipmentPurchaseModel.create({projectID:newProject.ID,total:0,equipments:[empRow]});
|
|
|
}
|
|
|
newProject.save(async function (err, result) {
|
|
|
if (!err && result._doc.projType === projectType.tender) {
|