瀏覽代碼

开放插入人材机,安装增加费行高问题

zhangweicheng 5 年之前
父節點
當前提交
10022af45a

+ 1 - 1
modules/ration_glj/facade/ration_glj_facade.js

@@ -857,7 +857,7 @@ async function insertGLJAsRation(data,compilation) {
         }
         await ration.update(query, {$inc: {serialNo: gljList.length}}, {multi: true});
     }
-    let [unitFileId,ext] = await prepareExtData(data.doc.projectID,compilation);
+    let [unitFileId,ext] = await prepareExtData(data.projectID,compilation);
     for (let glj of gljList) {
         let p_glj = getGLJSearchInfo(glj);
         let projectGljModel = new GLJListModel();

+ 1 - 1
public/web/sheet/sheet_common.js

@@ -276,7 +276,7 @@ var sheetCommonObj = {
         //sheet.addRows(row, 1);
         sheet.clear(0, 0, sheet.getRowCount(), sheet.getColumnCount(), GC.Spread.Sheets.SheetArea.viewport, GC.Spread.Sheets.StorageType.data);
         if(sheet.getRowCount()<data.length){
-            data.length<30? sheet.setRowCount(30):sheet.setRowCount(data.length);
+          data.length<30? sheet.setRowCount(30):sheet.setRowCount(data.length);
         }else if(sheet.getRowCount()==0){
             sheet.setRowCount(30);
         }

+ 14 - 3
web/building_saas/main/js/views/installation_fee_view.js

@@ -368,21 +368,30 @@ let installationFeeObj={
         }else {
             this.feeDetailData = []
         }
+        //这里由于combobax 自动行高有问题,还没找到好的解决方法,所以用先添加一行普通列用于自动行高的计算
+        //显示完了再把添加的多余列给删除了
+        let tcol = this.feeDetailSetting.header.length;
+        let theader = {headerName: "",headerWidth: 220, dataCode: "ruleName", hAlign: "left", dataType: "String",getText:'forRule'};
+        this.feeDetailSheet.addColumns(tcol,1);
+        this.feeDetailSheet.setColumnWidth(tcol, theader.headerWidth);
+        this.feeDetailSetting.header.push(theader);
+
         sheetCommonObj.showData(this.feeDetailSheet, this.feeDetailSetting, this.feeDetailData);
-        this.feeDetailSheet.setRowCount(this.feeDetailData.length);
         if(this.feeDetailData.length>0){
             this.feeDetailSheet.suspendPaint();
             this.feeDetailSheet.suspendEvent();
-            this.feeDetailSheet.getRange(0, -1, this.feeDetailData.length, -1, GC.Spread.Sheets.SheetArea.viewport).wordWrap(true);
+            this.feeDetailSheet.getRange(0, -1, this.feeDetailData.length, -1, GC.Spread.Sheets.SheetArea.viewport).wordWrap(true); 
             let feeItem = this.feeItemData[this.feeItemSheet.getSelections()[0].row];
             for(let i =0;i<this.feeDetailData.length;i++){
-                this.feeDetailSheet.autoFitRow(i);
                 this.setComboRuleCell(i,1,this.feeDetailData[i],this.feeDetailSheet);//设置费用规则下拉选项
                 this.lockDetailSheet(i,this.feeDetailData[i],feeItem);
+                this.feeDetailSheet.autoFitRow(i);
             }
             this.feeDetailSheet.resumeEvent();
             this.feeDetailSheet.resumePaint();
         }
+        this.feeDetailSheet.deleteColumns(tcol,1);
+        _.remove(this.feeDetailSetting.header,{dataCode:"ruleName"});
     },
     showMoreFeeRule:function () {
         this.moreFeeRuleData = this.getMoreFeeRuleData();
@@ -466,12 +475,14 @@ let installationFeeObj={
         let options=[{text:"无",value:""}];
         for(let ir of detail.impactRules){
             options.push({text:ir.rule,value:ir.ID});
+            options.push(ir.rule);
         }
         options.push({text:"更多",value:'more'});
         let dynamicCombo = sheetCommonObj.getDynamicCombo();//new GC.Spread.Sheets.CellTypes.ComboBox();
         dynamicCombo.items(options);
         dynamicCombo.editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.value);
         sheet.setCellType(row, col, dynamicCombo, GC.Spread.Sheets.SheetArea.viewport);
+        sheet.getCell(row,col).wordWrap(true);
     },
     getFeeItemData:function (datas) {
         let feeItemShowArray = [];

+ 1 - 1
web/building_saas/main/js/views/project_view.js

@@ -1433,7 +1433,7 @@ var projectObj = {
                         getGLJData('insert');// ProjectController.addRation(project, controller, rationType.volumePrice);
                     },
                     visible: function(key, opt){//2018-11-08  新需求,这个按钮先隐藏,有需要再放开
-                        return false;
+                        return true;
                     }
                 },
                 "spr2": '--------',