Kaynağa Gözat

设备购备,默认添加空行

zhangweicheng 4 yıl önce
ebeveyn
işleme
93b0548cfc

+ 3 - 1
modules/pm/models/project_model.js

@@ -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) {

+ 0 - 1
web/building_saas/main/js/views/calc_base_view.js

@@ -320,7 +320,6 @@ let calcBaseView = {
             if (!toggle || toggle !== 'calcBase') {
                 return;
             }
-            debugger;
             //bills
             if (me.curType === me.type.bills) {
                 let selected = projectObj.project.mainTree.selected;

+ 0 - 1
web/building_saas/main/js/views/project_property_projFeature.js

@@ -446,7 +446,6 @@ let projFeatureView = {
                 var offset = margin + rectW + indent;
                 var recode = data[options.row];
                 if (recode && recode.hasOwnProperty('items')) {
-                    debugger;
                     drowRect(ctx, x, y, w, h);
                     var collapsed = recode.collapsed == undefined ? true : recode.collapsed;//options.sheet.getTag(options.row,options.col);
                     drowSymbol(ctx, x, y, w, h, collapsed);