zhangweicheng hace 5 años
padre
commit
8f6432041e
Se han modificado 1 ficheros con 33 adiciones y 1 borrados
  1. 33 1
      web/building_saas/main/js/views/divide_view.js

+ 33 - 1
web/building_saas/main/js/views/divide_view.js

@@ -56,6 +56,7 @@ let divideObj = {
   showDatas:function(){
     this.showDivideDatas();
     this.showBillsDatas();
+    this.showRationGLJDatas();
   },
   refreshViews:function(){
     if(!$('#divide_main').is(':visible')) return;
@@ -95,6 +96,24 @@ let divideObj = {
       return datas;
     }
   },
+
+  showRationGLJDatas:function(){
+    if(!$('#divide_glj_nav').hasClass('active')) return;
+    this.divideSubSpread.setActiveSheetIndex(0);
+    this.rationGLJDatas = getRationGLJDatas();
+    let rationGLJSheet = this.divideSubSpread.getSheet(0)
+    rationGLJSheet.setRowCount(this.rationGLJDatas.length);
+    sheetCommonObj.showTreeData(rationGLJSheet, gljCol.ration_glj_setting,this.rationGLJDatas);
+    function getRationGLJDatas(){
+      let datas = [];
+      let selected = divideObj.getSelectedItem();
+      let divideSetting =  projectObj.project.divide_setting.datas;
+      if(selected){
+
+      }
+      return datas;
+    }
+  },
   getProgramOptions:function(){
     let names = projectObj.project.calcProgram.compiledTemplateNames;
     let map = projectObj.project.calcProgram.compiledTemplateMaps;
@@ -478,6 +497,18 @@ let divideObj = {
                   }
                 }
             },
+            "calcRation": {
+                name: "计算定额/量价",
+                icon: 'fa-sign-in',
+                disabled: function () {
+                  return me.rightClickTarget.row === undefined
+                },
+                callback: function (key, opt) {  
+                  let selected = me.getSelectedItem();
+                  projectObj.project.calcProgram.innerCalcForFTRation({data:selected,sourceType:"ration"});
+                  console.log(selected)
+                }
+            },
             "removeItem": {
                 name: "删除",
                 icon: 'fa-trash-o',
@@ -499,9 +530,10 @@ let divideObj = {
         resize: $('#divide_rgResize'),
         top: $('#divide_top'),
         topSpread: $('#divide_main_sheet'),
-        bottom: $('#divideBottom'),
+        bottom: $('#divideBottom').children().find('.main-data-bottom'),
         bottomSpread: [$('#divide_subSpread')]
     };
+
     divideResizeEles.limit = {
         min: 150,
         max: `$(window).height()-$('.header').height()-$('#divideToolsBar').height()-150-5`,//5: resize.height()