Преглед изворни кода

feat:大项费用可插入分部做为子项

zhangweicheng пре 4 година
родитељ
комит
1d57e688ae

+ 4 - 0
web/building_saas/main/js/controllers/project_controller.js

@@ -219,6 +219,10 @@ ProjectController = {
     addFB:function(project, sheetController,node,ext) {//添加分部
         if (!project || !sheetController) { return null; }
         let selected =node|| project.mainTree.selected;
+
+         if(selected.sourceType==project.Bills.getSourceType() && selected.data.type==billType.DXFY){//概算大项费用可插入分部,做为最后一个子项
+            return this.addSpecialBill(project, sheetController,selected, null,true,billType.FB,ext);
+         }
         if(selected.parent==null&&isFlag(selected.data)&&selected.data.flagsIndex.fixed.flag==fixedFlag.SUB_ENGINERRING){//选中的是分部分项,则插入做为最后一个子项
             return this.addSpecialBill(project, sheetController,selected, null,true,billType.FB,ext);
         }

+ 2 - 0
web/building_saas/main/js/views/project_view.js

@@ -1324,6 +1324,8 @@ var projectObj = {
                             if(selected.data.type==billType.FB){
                                 return false;
                             }
+                            if(selected.data.type==billType.DXFY) return false; 
+
                             if(selected.data.type==billType.FX ||  selected.data.type==billType.BX){// 当前定位在分项(包括补项),
                                 if(selected.preSibling){//判断分项有无前兄弟?
                                     //有,则判断父项的类型是什么,是分部,右键有效显示,点击则按②执行。