瀏覽代碼

feat: 选择分部的弹窗选择标准清单

zhangweicheng 3 年之前
父節點
當前提交
eaa932c7dc
共有 1 個文件被更改,包括 16 次插入1 次删除
  1. 16 1
      web/building_saas/main/js/views/select_FB_view.js

+ 16 - 1
web/building_saas/main/js/views/select_FB_view.js

@@ -50,13 +50,28 @@ let selectFBObject = {
 
     showData:function(){
         let budgetType = projectObj.project.property.budgetType||commonConstants.BudgetType.BUILDING;
-        this.showRationTree();
+        this.showBillLibTree();
+        //this.showRationTree();
        /*  if(budgetType===commonConstants.BudgetType.BUILDING){//建筑安装工程显示清单树 显示定额章节树
             this.showRationTree();
         }else{//城市轨道交通工程 显示分部
             this.showBillTree();
         } */
     },
+    showBillLibTree:async function(){
+       const libs =  projectObj.project.projectInfo.engineeringInfo.bill_lib;
+      if(!this.billLibTree){
+        $.bootstrapLoading.start();
+        let data = await ajaxPost('/billsGuidance/api/getLibWithBills', {libID: libs[0].id, isGuidanceLib: false});
+        this.billLibTree = idTree.createNew({id: 'ID', pid: 'ParentID', nid: 'NextSiblingID', rootId: -1, autoUpdate: false});
+        this.billLibTree.loadDatas(data.bills);
+        $.bootstrapLoading.end();
+      }
+      
+       this.showTreeData(this.billLibTree.roots);
+    },
+
+
     showRationTree:async function(){
         let rationLibID = rationLibObj.getDefaultStdRationLibID();
         if(!this.rationChapterTree){