|
@@ -160,16 +160,20 @@ let selectFBObject = {
|
|
|
let controller = projectObj.mainController;
|
|
|
let selected = project.mainTree.selected;
|
|
|
if(selected){
|
|
|
+ const fbNext = null;
|
|
|
if(selected.children && selected.children.length > 0){
|
|
|
let firstNode = selected.children[0];
|
|
|
if(firstNode.sourceType==project.Ration.getSourceType()){
|
|
|
//插入为定额的父项
|
|
|
- ProjectController.addFBToBeParent(firstNode,{});
|
|
|
+ return ProjectController.addFBToBeParent(firstNode,{});
|
|
|
}else if(selected.data.type==billType.FB){
|
|
|
//插入为第一个子节点
|
|
|
- ProjectController.addSpecialBill(project, controller,selected, firstNode,true,billType.FB,{});
|
|
|
+ fbNext = firstNode;
|
|
|
}
|
|
|
}
|
|
|
+ //插入为子节点
|
|
|
+ ProjectController.addSpecialBill(project, controller,selected, fbNext,true,billType.FB,{});
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|