Explorar el Código

新建单位工程,选择按钮刷新问题

zhangweicheng hace 7 años
padre
commit
3cad817ef7

+ 0 - 6
web/building_saas/main/js/views/mbzm_view.js

@@ -528,12 +528,6 @@ let mbzm_obj={
                         t_times = isNaN(t_times)?1:t_times;//工程量要乘以定额单位的倍数
                         rnode.data.quantity = scMathUtil.roundForObj(t_quantity/t_times,getDecimal('ration.quantity'));
                         rnode.data.contain = projectObj.project.Ration.getContain(rnode.parent,rnode.data.quantity);
-                       /* if(rnode.parent.data.quantity&&rnode.parent.data.quantity!=0&&rnode.parent.data.quantity!=""){
-                            var billQuantity = scMathUtil.roundForObj(rnode.parent.data.quantity,getDecimal("quantity",node.parent));
-                            rnode.data.contain = scMathUtil.roundForObj(rnode.data.quantity/billQuantity,getDecimal("process"));
-                        }else {
-                            rnode.data.contain=0;
-                        }*/
                         rnode.change = true;
                         rationNodes.push(rnode)
                     }

+ 9 - 5
web/building_saas/pm/js/pm_newMain.js

@@ -1104,6 +1104,13 @@ const projTreeObj = {
         }
         sheet.setValue(row, col, value);
     },
+    setFileSelectButton:function (row,col,node,sheet,setting) {
+        if(!setting) setting = this.setting;
+        let dataCode = setting.header[col]['dataCode'];
+        if(node.data.projType == "Tender" && (dataCode=="feeRateFile" || dataCode == "unitPriceFile")){
+            sheet.setCellType(row, col,sheetCommonObj.getCusButtonCellType(projTreeObj.cusButtonClick,false),GC.Spread.Sheets.SheetArea.viewport);
+        }
+    },
     showTreeData: function (nodes, setting,sheet) {
         let headers = setting.header;
         let me = this;
@@ -1122,11 +1129,7 @@ const projTreeObj = {
                         sheet.getCell(i, j).hAlign(GC.Spread.Sheets.HorizontalAlign.center);
                     }
                     me.setCellValue({row: i, col: j}, nodes[i],sheet,setting);
-                    let dataCode = headers[j].dataCode;
-                    if(nodes[i].data.projType == "Tender" && (dataCode=="feeRateFile" || dataCode == "unitPriceFile")) {
-                        sheet.setCellType(i, j,sheetCommonObj.getCusButtonCellType(me.cusButtonClick,false),GC.Spread.Sheets.SheetArea.viewport);
-                    }
-                    //sheet.setValue(i, j, nodes[i]['data'][dataCode]);
+                    me.setFileSelectButton(i,j,nodes[i],sheet,setting);
                 }
                 sheet.getCell(i, 1,GC.Spread.Sheets.SheetArea.viewport).locked(true);
             }
@@ -1151,6 +1154,7 @@ const projTreeObj = {
             let rIdx = me.tree.items.indexOf(n);
             for(let i = 0; i < header.length; i++){
                 me.setCellValue({row: rIdx, col: i}, n,sheet);
+                me.setFileSelectButton(rIdx,i,n,sheet)
             }
         }