Bladeren bron

Merge branch '1.0.0_online' of http://192.168.1.12:3000/SmartCost/ConstructionCost into 1.0.0_online

TonyKang 7 jaren geleden
bovenliggende
commit
54acdf0b47
52 gewijzigde bestanden met toevoegingen van 305 en 103 verwijderingen
  1. 1 1
      config/config.js
  2. 1 0
      config/gulpConfig.js
  3. 4 4
      modules/complementary_ration_lib/models/compleRationModel.js
  4. 3 4
      modules/main/controllers/bills_controller.js
  5. 39 2
      modules/main/facade/ration_facade.js
  6. 7 6
      modules/options/models/optionTypes.js
  7. 3 0
      modules/pm/controllers/pm_controller.js
  8. 25 2
      modules/pm/facade/pm_facade.js
  9. 14 2
      public/web/sheet/sheet_common.js
  10. 4 3
      public/web/sheet/sheet_data_helper.js
  11. 5 3
      public/web/tree_sheet/tree_sheet_helper.js
  12. 2 2
      socketdockerfile
  13. 1 0
      web/building_saas/complementary_glj_lib/js/components.js
  14. 1 0
      web/building_saas/complementary_glj_lib/js/glj.js
  15. 1 0
      web/building_saas/complementary_glj_lib/js/gljClassTree.js
  16. 1 0
      web/building_saas/complementary_glj_lib/js/gljComponent.js
  17. 1 0
      web/building_saas/complementary_ration_lib/html/dinge.html
  18. 2 0
      web/building_saas/complementary_ration_lib/js/coe.js
  19. 1 0
      web/building_saas/complementary_ration_lib/js/gljSelect.js
  20. 3 0
      web/building_saas/complementary_ration_lib/js/installation.js
  21. 1 0
      web/building_saas/complementary_ration_lib/js/ration.js
  22. 1 0
      web/building_saas/complementary_ration_lib/js/repository_glj.js
  23. 1 0
      web/building_saas/complementary_ration_lib/js/section_tree.js
  24. 1 1
      web/building_saas/css/main.css
  25. 4 2
      web/building_saas/main/js/models/ration.js
  26. 1 0
      web/building_saas/main/js/views/calc_base_view.js
  27. 2 0
      web/building_saas/main/js/views/calc_program_manage.js
  28. 32 18
      web/building_saas/main/js/views/character_content_view.js
  29. 2 0
      web/building_saas/main/js/views/fee_rate_view.js
  30. 13 12
      web/building_saas/main/js/views/glj_col.js
  31. 35 2
      web/building_saas/main/js/views/glj_view.js
  32. 10 5
      web/building_saas/main/js/views/installation_fee_view.js
  33. 3 1
      web/building_saas/main/js/views/main_tree_col.js
  34. 7 5
      web/building_saas/main/js/views/project_glj_view.js
  35. 1 1
      web/building_saas/main/js/views/project_info.js
  36. 1 0
      web/building_saas/main/js/views/project_property_basicInfo.js
  37. 1 0
      web/building_saas/main/js/views/project_property_bills_quantity_decimal.js
  38. 1 0
      web/building_saas/main/js/views/project_property_indicativeInfo.js
  39. 1 0
      web/building_saas/main/js/views/project_property_projFeature.js
  40. 36 17
      web/building_saas/main/js/views/project_view.js
  41. 1 1
      web/building_saas/main/js/views/quantity_edit_view.js
  42. 1 0
      web/building_saas/main/js/views/std_billsGuidance_lib.js
  43. 3 0
      web/building_saas/main/js/views/std_bills_lib.js
  44. 6 0
      web/building_saas/main/js/views/std_ration_lib.js
  45. 1 0
      web/building_saas/main/js/views/sub_fee_rate_views.js
  46. 5 2
      web/building_saas/main/js/views/sub_view.js
  47. 1 0
      web/building_saas/main/js/views/tender_price_view.js
  48. 3 0
      web/building_saas/main/js/views/zmhs_view.js
  49. 1 0
      web/building_saas/pm/html/project-management.html
  50. 1 0
      web/building_saas/pm/js/pm_gc.js
  51. 8 7
      web/building_saas/pm/js/pm_newMain.js
  52. 1 0
      web/building_saas/pm/js/pm_share.js

File diff suppressed because it is too large
+ 1 - 1
config/config.js


+ 1 - 0
config/gulpConfig.js

@@ -36,6 +36,7 @@ module.exports = {
         'public/web/id_tree.js',
         'public/web/tree_sheet/tree_sheet_helper.js',
         'public/web/sheet/sheet_data_helper.js',
+        'public/web/sheet/sheet_common.js',
         'public/web/common_ajax.js',
         'lib/JSExpressionEval_src/Date.js',
         'web/building_saas/pm/js/**/*.js',

+ 4 - 4
modules/complementary_ration_lib/models/compleRationModel.js

@@ -176,12 +176,12 @@ class CompleRatoinDao {
                     }
                 }
                 hintsArr.push(`基价 元 ${ration.basePrice}`);
-                hintsArr.push(`工作内容:`);
-                if(ration.jobContent){
+                if(ration.jobContent && ration.jobContent.toString().trim() !== ''){
+                    hintsArr.push(`工作内容:`);
                     hintsArr = hintsArr.concat(ration.jobContent.split('\n'));
                 }
-                hintsArr.push(`附注:`);
-                if(ration.annotation){
+                if(ration.annotation && ration.annotation.toString().trim() !== ''){
+                    hintsArr.push(`附注:`);
                     hintsArr = hintsArr.concat(ration.annotation.split('\n'));
                 }
                 ration._doc.hint = hintsArr.join('<br>');

+ 3 - 4
modules/main/controllers/bills_controller.js

@@ -418,7 +418,6 @@ function getColMapping(sheetData){
         if(headRow[c]){
             headRow[c] = headRow[c].toString().replace(/\s/g, '');
             //重复的,只取第一个
-            console.log(headRow[c]);
             if(headRow[c] === '序号' && colMapping.serialNo === undefined){
                 colMapping.serialNo = c;
             }
@@ -548,8 +547,8 @@ function parseToBillData(validData, colMapping, fixedBill, projectID, stdData){
     function isExtend(preData, rData){
         let serialNo = removeESC(rData[colMapping.serialNo]);
         let code = removeESC(rData[colMapping.code]);
-        let name = rData[colMapping.name];
-        let itemCharacterText = rData[colMapping.itemCharacterText];
+        let name = removeESC(rData[colMapping.name]);
+        let itemCharacterText = removeESC(rData[colMapping.itemCharacterText]);
         return isDef(preData) && (isRoot(preData) || isLeaf(preData)) && !isDef(serialNo) && !isDef(code) && (isDef(name) || isDef(itemCharacterText));
     }
     function getBillType(rData, flag){
@@ -624,8 +623,8 @@ function parseToBillData(validData, colMapping, fixedBill, projectID, stdData){
         }
         if(isExtend(preData, rData)){
             let preBill = billIdx[preID];
-            //合并续数据
             if(preBill){
+                //合并续数据
                 preBill.code += rData[colMapping.code] ? rData[colMapping.code] : '';
                 preBill.name += rData[colMapping.name] ? rData[colMapping.name] : '';
                 preBill.itemCharacterText += rData[colMapping.itemCharacterText] ? rData[colMapping.itemCharacterText] : '';

+ 39 - 2
modules/main/facade/ration_facade.js

@@ -133,8 +133,11 @@ async function replaceRations(userID,data) {
 }
 
 async function replaceRation(nodeInfo,stdRation,firstLibID,projectID,calQuantity) {
-    if(stdRation){
-        await deleRationSubRecode(projectID,nodeInfo.ID);
+    if(nodeInfo.newCode == null||nodeInfo.newCode ==""){//说明是删除编号,则要变成一条空定额
+        await deleRationSubRecode(projectID,nodeInfo.ID);//删除定额下挂的各种数据,如定额工料机等
+        return await setEmptyRation(projectID,nodeInfo.ID);
+    }else if(stdRation){
+        await deleRationSubRecode(projectID,nodeInfo.ID);//删除定额下挂的各种数据,如定额工料机等
         let newRation = await updateRation(stdRation,firstLibID,nodeInfo.ID,nodeInfo.billsItemID,projectID,calQuantity);//生成并插入新的定额
         return await addRationSubList(stdRation,newRation,nodeInfo.needInstall);
     }else {
@@ -375,6 +378,40 @@ async function  updateRation(std,firstLibID,rationID,billsItemID,projectID,calQu
     return newRation;
 }
 
+async function setEmptyRation(projectID,rationID){
+    let ration ={};
+    ration.code = "";
+    ration.name = "";
+    ration.caption = "";
+    ration.unit = "";
+    ration.libID = null;
+    ration.content = "";
+    ration.adjustState = '';
+    ration.isFromDetail=0;
+    ration.isSubcontract=false;
+    ration.fees=[];
+    ration.comments = "";
+    ration.ruleText = "";
+    ration.quantity="";
+    ration.contain="";
+    ration.quantityEXP="";
+    ration.from = 'std';
+    //定额前缀 none:0, complementary:1, borrow: 2
+    ration.prefix = '';
+    ration.rationAssList = [];
+    ration.marketUnitFee ="";
+    ration.marketTotalFee ="";
+    ration.maskName = "";
+    ration.targetTotalFee ='';
+    ration.targetUnitFee = "";
+    ration.deleteInfo = null;
+    ration.quantityCoe = {};
+    ration.rationQuantityCoe="";
+    ration.tenderQuantity = "";
+    let newRation = await ration_model.model.findOneAndUpdate({ID:rationID,projectID:projectID},{"$set":ration},{new: true});//;
+    return {ration:newRation,ration_gljs:[],ration_coes:[],ration_installs:[]};
+}
+
 function createRationAss(std) {
     let  rationAssList = [];//生成辅助定额
     if(std.hasOwnProperty('rationAssList')&&std.rationAssList.length>0){

+ 7 - 6
modules/options/models/optionTypes.js

@@ -15,11 +15,11 @@ const optionSetting = {
         DEFAULT: {
             backColor: 'White',
             foreColor: 'Black',
-            stringFont: '15px Arial',
-            numFont: '13px Arial'
+            stringFont: '0.9rem Arial',
+            numFont: '0.9rem Arial'
         },
         SELECTED: {
-            backColor: '#dddddd',
+            backColor: '#FFFACD',
             foreColor: 'default',
             stringFont: 'default',
             numFont: 'default'
@@ -27,8 +27,8 @@ const optionSetting = {
         DXFY: {
             backColor: 'default',
             foreColor: 'default',
-            stringFont: 'bold 15px Arial',
-            numFont: 'bold 13px Arial'
+            stringFont: 'bold 0.9rem Arial',
+            numFont: 'bold 0.9rem Arial'
         },
         FB: {
             backColor: '#C4CAFB',
@@ -60,8 +60,9 @@ const optionSetting = {
             stringFont: 'default',
             numFont: 'default'
         },
+        //含有计算基数的节点
         CBBILL: {
-            backColor: '#E5F3F2',
+            backColor: '#DFE8F9',
             foreColor: 'default',
             stringFont: 'default',
             numFont: 'default'

+ 3 - 0
modules/pm/controllers/pm_controller.js

@@ -192,6 +192,9 @@ module.exports = {
                 if(basicInfo !== null){
                     projInfo.property.basicInformation = basicInfo;
                 }
+                //获取单位工程完整目录结构
+                let fullPath = await pm_facade.getFullPath(projectID);
+                projInfo.fullPath = fullPath;
                 callback(req, res, err, message, projInfo);
             } else {
                 callback(req, res, err, message, null);

+ 25 - 2
modules/pm/facade/pm_facade.js

@@ -33,13 +33,15 @@ const projectType = {
     project: 'Project',
     engineering: 'Engineering',
 };
+const notDeleted = [{deleteInfo: null}, {'deleteInfo.deleted': false}];
 
 
 module.exports={
     moveProject:moveProject,
     copyProject:copyProject,
     getSummaryInfo: getSummaryInfo,
-    getConstructionProject: getConstructionProject
+    getConstructionProject: getConstructionProject,
+    getFullPath: getFullPath
 };
 
 async function copyProject(userID, compilationID,data) {
@@ -607,7 +609,6 @@ async function getSummaryInfo(projectIDs){
 //根据项目ID获取所属建设项目
 //@param {Number}projectID @return {Object}
 async function getConstructionProject(projectID){
-    const notDeleted = [{deleteInfo: null}, {'deleteInfo.deleted': false}];
     function returnProject(project){
         if(!project || project.projType === projectType.folder){
             return null;
@@ -629,4 +630,26 @@ async function getConstructionProject(projectID){
     let grandParent = await projectModel.findOne({ID: parent.ParentID, $or: notDeleted});
     returnV = returnProject(grandParent);
     return returnV !== undefined ? returnV : null;
+}
+
+//获取单位工程完整目录结构
+//@param {Number}projectID @return {Arry}
+async function getFullPath(projectID) {
+    let fullPath = [];
+    let project = await projectModel.findOne({ID: projectID, $or: notDeleted}, '-_id ParentID name');
+    if(project){
+        fullPath.push(project.name);
+        await getParent(project.ParentID);
+    }
+    fullPath = fullPath.reverse();
+    return fullPath.join('\\');
+    async function getParent(ParentID) {
+        if(ParentID != -1){
+            let parent = await projectModel.findOne({ID: ParentID, $or: notDeleted}, '-_id ParentID name');
+            if(parent){
+                fullPath.push(parent.name);
+                await getParent(parent.ParentID);
+            }
+        }
+    }
 }

+ 14 - 2
public/web/sheet/sheet_common.js

@@ -23,7 +23,7 @@ var sheetCommonObj = {
         var spreadNS = GC.Spread.Sheets;
         sheet.suspendPaint();
         sheet.suspendEvent();
-
+        if(setting.frozenCols)  sheet.frozenColumnCount(setting.frozenCols);//冻结列
         sheet.setRowCount(1, spreadNS.SheetArea.colHeader);
         sheet.setColumnCount(setting.header.length, spreadNS.SheetArea.viewport);
 
@@ -638,6 +638,18 @@ var sheetCommonObj = {
         });
         workBook.commandManager().setShortcutKey(null, GC.Spread.Commands.Key.esc, false, false, false, false);
         workBook.commandManager().setShortcutKey('myEsc', GC.Spread.Commands.Key.esc, false, false, false, false);
-    }
+    },
+    //设置默认样式
+    spreadDefaultStyle: function (workBook) {
+        let defaultStyle = new GC.Spread.Sheets.Style();
+        defaultStyle.font = '0.9rem Calibri';
+        let sheetCount = workBook.getSheetCount();
+        for(let i = 0; i < sheetCount; i++){
+            let sheet = workBook.getSheet(i);
+            sheet.setDefaultStyle(defaultStyle, GC.Spread.Sheets.SheetArea.viewport);
+            sheet.setDefaultStyle(defaultStyle, GC.Spread.Sheets.SheetArea.colHeader);
+            sheet.setDefaultStyle(defaultStyle, GC.Spread.Sheets.SheetArea.rowHeader);
+        }
+    },
 
 }

+ 4 - 3
public/web/sheet/sheet_data_helper.js

@@ -87,7 +87,8 @@ var SheetDataHelper = {
                     for (i = 0; i < col.head.spanCols.length; i++) {
                         if (col.head.spanCols[i] !== 0) {
                             cell = sheet.getCell(iRow, index, GC.Spread.Sheets.SheetArea.colHeader);
-                            cell.value(col.head.titleNames[i]).font(col.head.font).hAlign(col.head.hAlign[i]).vAlign(col.head.vAlign[i]).wordWrap(true);
+                            cell.value(col.head.titleNames[i]).hAlign(col.head.hAlign[i]).vAlign(col.head.vAlign[i]).wordWrap(true);
+                            //cell.value(col.head.titleNames[i]).font(col.head.font).hAlign(col.head.hAlign[i]).vAlign(col.head.vAlign[i]).wordWrap(true);
                         }
                         if (col.head.spanCols[i] > 1 || col.head.spanRows[i] > 1) {
                             sheet.addSpan(iRow, index, col.head.spanRows[i], col.head.spanCols[i], GC.Spread.Sheets.SheetArea.colHeader);
@@ -115,7 +116,7 @@ var SheetDataHelper = {
         var style = new GC.Spread.Sheets.Style();
         style.locked = setting.readOnly;
         style.name = setting.id;
-        style.font = setting.data.font;
+        //style.font = setting.data.font;
         style.hAlign = setting.data.hAlign;
         style.vAlign = setting.data.vAlign;
         style.wordWrap = setting.data.wordWrap;
@@ -159,7 +160,7 @@ var SheetDataHelper = {
                         $(div).css("position", "absolute")
                             .css("border", "1px #C0C0C0 solid")
                             .css("box-shadow", "1px 2px 5px rgba(0,0,0,0.4)")
-                            .css("font", "9pt Arial")
+                           // .css("font", "9pt Arial")
                             .css("background", "white")
                             .css("padding", 5)
                             .attr("id", 'autoTip');

+ 5 - 3
public/web/tree_sheet/tree_sheet_helper.js

@@ -40,7 +40,7 @@ var TREE_SHEET_HELPER = {
         var style = new GC.Spread.Sheets.Style();
         //style.locked = setting.readOnly ? true : false;
         style.name = setting.id;
-        style.font = setting.data.font;
+        //style.font = setting.data.font;
         style.hAlign = setting.data.hAlign;
         style.vAlign = setting.data.vAlign;
         style.wordWrap = setting.data.wordWrap;
@@ -64,7 +64,8 @@ var TREE_SHEET_HELPER = {
                 for (i = 0; i < col.head.spanCols.length; i++) {
                     if (col.head.spanCols[i] !== 0) {
                         cell = sheet.getCell(iRow, index, GC.Spread.Sheets.SheetArea.colHeader);
-                        cell.value(col.head.titleNames[i]).font(col.head.font).hAlign(col.head.hAlign[i]).vAlign(col.head.vAlign[i]).wordWrap(true);
+                        //cell.value(col.head.titleNames[i]).font(col.head.font).hAlign(col.head.hAlign[i]).vAlign(col.head.vAlign[i]).wordWrap(true);
+                        cell.value(col.head.titleNames[i]).hAlign(col.head.hAlign[i]).vAlign(col.head.vAlign[i]).wordWrap(true);
                     }
                     if (col.head.spanCols[i] > 1 || col.head.spanRows[i] > 1) {
                         sheet.addSpan(iRow, index, col.head.spanRows[i], col.head.spanCols[i], GC.Spread.Sheets.SheetArea.colHeader);
@@ -119,10 +120,11 @@ var TREE_SHEET_HELPER = {
             }
             setting.cols.forEach(function (colSetting, iCol) {
                 var cell = sheet.getCell(iRow, iCol, GC.Spread.Sheets.SheetArea.viewport);
-                if(typeof projectObj !== 'undefined'){
+   /* if(typeof projectObj !== 'undefined'){ 7/28  取消黑体显示
                     let boldFontStyle = projectObj.getBoldFontStyle(node, colSetting);
                     sheet.setStyle(iRow, iCol, boldFontStyle);
                 }
+                }*/
 
                 // var getFieldText = function () {
                 //     var fields = colSetting.data.field.split('.');

+ 2 - 2
socketdockerfile

@@ -1,8 +1,8 @@
-FROM costbase:latest
+FROM costbase:2.0
 
 WORKDIR /home/ConstructionCost
 
-RUN git pull http://192.168.1.12:3000/SmartCost/ConstructionCost master
+COPY . /home/ConstructionCost
 
 RUN cnpm install 
 

+ 1 - 0
web/building_saas/complementary_glj_lib/js/components.js

@@ -25,6 +25,7 @@ let componentOprObj = {
     buildSheet: function (container) {
         let me = componentOprObj;
         me.workBook = sheetOpr.buildSheet(container, me.setting, 30);
+        sheetCommonObj.spreadDefaultStyle(me.workBook);
         me.workBook.getSheet(0).setColumnWidth(0, 20, GC.Spread.Sheets.SheetArea.rowHeader);
         me.workBook.getSheet(0).setFormatter(-1, 1, "@", GC.Spread.Sheets.SheetArea.viewport);
         me.workBook.getSheet(0).bind(GC.Spread.Sheets.Events.EditStarting, me.onCellEditStart);

+ 1 - 0
web/building_saas/complementary_glj_lib/js/glj.js

@@ -204,6 +204,7 @@ let repositoryGljObj = {
     buildSheet: function(container) {
         let me = repositoryGljObj;
         me.workBook = sheetOpr.buildSheet(container, me.setting, 30);
+        sheetCommonObj.spreadDefaultStyle(me.workBook);
         me.repositoryGljDelOpr();
         me.bindEnterKey();
         me.setUnitCombo(me.workBook.getActiveSheet(), me.setting.header);

+ 1 - 0
web/building_saas/complementary_glj_lib/js/gljClassTree.js

@@ -76,6 +76,7 @@ let gljClassTreeObj = {
     buildSheet: function () {
         if(!this.isDef(this.workBook)){
             this.workBook = new GC.Spread.Sheets.Workbook($('#gljClassSpread')[0], {sheetCount: 1});
+            sheetCommonObj.spreadDefaultStyle(this.workBook);
             this.sheet = this.workBook.getActiveSheet();
             this.setOptions(this.workBook, this.setting.options);
             this.sheet.options.clipBoardOptions = GC.Spread.Sheets.ClipboardPasteOptions.values;

+ 1 - 0
web/building_saas/complementary_glj_lib/js/gljComponent.js

@@ -21,6 +21,7 @@ let gljComponentOprObj = {
     buildSheet: function(container) {
         let me = gljComponentOprObj;
         me.workBook = sheetOpr.buildSheet(container, me.setting, 30);
+        sheetCommonObj.spreadDefaultStyle(me.workBook);
         me.workBook.getSheet(0).setColumnWidth(0, 20, GC.Spread.Sheets.SheetArea.rowHeader);
         me.workBook.getSheet(0).setFormatter(-1, 0, "@", GC.Spread.Sheets.SheetArea.viewport);
         sheetOpr.cleanData(me.workBook.getSheet(0), me.setting, -1);

+ 1 - 0
web/building_saas/complementary_ration_lib/html/dinge.html

@@ -547,6 +547,7 @@
 
         // tabPanel 下有多个Spread时,相互之间不能正确显示。改成一个Spread下多个Sheet。
         var rdSpread = sheetCommonObj.createSpread($("#rdSpread")[0], 4);
+        sheetCommonObj.spreadDefaultStyle(rdSpread);
         rationGLJOprObj.buildSheet(rdSpread.getSheet(0));
 
         rationAssistOprObj.buildSheet(rdSpread.getSheet(1));

+ 2 - 0
web/building_saas/complementary_ration_lib/js/coe.js

@@ -77,6 +77,7 @@ let coeOprObj = {
     buildSheet: function (container) {
         let me = coeOprObj;
         me.workBook = sheetCommonObj.buildSheet(container, me.setting, 30);
+        sheetCommonObj.spreadDefaultStyle(me.workBook);
         me.workSheet = me.workBook.getSheet(0);
         me.workSheet.options.isProtected = true;
         me.workSheet.bind(GC.Spread.Sheets.Events.SelectionChanged, me.onSelectionChanged);
@@ -155,6 +156,7 @@ let gljAdjOprObj = {
     buildSheet: function (container) {
         let me = gljAdjOprObj;
         me.workBook = sheetCommonObj.buildSheet(container, me.setting, 3);
+        sheetCommonObj.spreadDefaultStyle(me.workBook);
         me.workSheet = me.workBook.getSheet(0);
         me.workSheet.options.isProtected = true;
         me.workSheet.clearSelection();

+ 1 - 0
web/building_saas/complementary_ration_lib/js/gljSelect.js

@@ -78,6 +78,7 @@ let gljSelOprObj = {
     buildSheet: function (container) {
         let me = gljSelOprObj;
         me.workBook = sheetCommonObj.buildSheet(container, me.setting, 30);
+        sheetCommonObj.spreadDefaultStyle(me.workBook);
         me.workBook.getSheet(0).setColumnWidth(0, 20, GC.Spread.Sheets.SheetArea.rowHeader);
         me.workBook.getSheet(0).setFormatter(-1, 1, "@", GC.Spread.Sheets.SheetArea.viewport);
         me.workBook.getSheet(0).bind(GC.Spread.Sheets.Events.EditStarting, me.onCellEditStart);

+ 3 - 0
web/building_saas/complementary_ration_lib/js/installation.js

@@ -40,6 +40,7 @@ let feeItemObj = {
         let me = this, se = sectionObj, fr = feeRuleObj;
         if(!this.isDef(this.workBook)){
             this.workBook = sheetCommonObj.buildSheet($('#feeItemSpread')[0], this.setting, 10);
+            sheetCommonObj.spreadDefaultStyle(this.workBook);
             this.sheet = this.workBook.getActiveSheet();
             this.setOptions(this.workBook, this.setting.options);
             this.bindEvents(this.sheet);
@@ -155,6 +156,7 @@ let sectionObj = {
     buildSheet: function () {
         if(!this.isDef(this.workBook)){
             this.workBook = sheetCommonObj.buildSheet($('#instSectionSpread')[0], this.setting, 10);
+            sheetCommonObj.spreadDefaultStyle(this.workBook);
             this.sheet = this.workBook.getActiveSheet();
             this.setOptions(this.workBook, this.setting.options);
             this.sheet.options.clipBoardOptions = GC.Spread.Sheets.ClipboardPasteOptions.values;
@@ -265,6 +267,7 @@ let feeRuleObj = {
     buildSheet: function () {
         if(!this.isDef(this.workBook)){
             this.workBook = sheetCommonObj.buildSheet($('#instFeeRuleSpread')[0], this.setting, 10);
+            sheetCommonObj.spreadDefaultStyle(this.workBook);
             this.sheet = this.workBook.getActiveSheet();
             this.buildHeader();
             this.setOptions(this.workBook, this.setting.options);

+ 1 - 0
web/building_saas/complementary_ration_lib/js/ration.js

@@ -41,6 +41,7 @@ let rationOprObj = {
         let rationRepId = getQueryString("repository");
         let me = rationOprObj;
         me.workBook = sheetCommonObj.buildSheet(container, me.setting, 30);
+        sheetCommonObj.spreadDefaultStyle(me.workBook);
         sheetCommonObj.bindEscKey(me.workBook, [{sheet: me.workBook.getSheet(0), editStarting: me.onCellEditStart, editEnded: me.onCellEditEnd}]);
         me.getRationsCodes(rationRepId);
         me.onContextmenuOpr();

+ 1 - 0
web/building_saas/complementary_ration_lib/js/repository_glj.js

@@ -148,6 +148,7 @@ repositoryGljObj = {
     buildSheet: function(container) {
         var me = repositoryGljObj;
         me.workBook = sheetCommonObj.buildSheet(container, me.setting, 30, me);
+        sheetCommonObj.spreadDefaultStyle(me.workBook);
         me.workBook.getSheet(0).options.isProtected = true;
         /* me.repositoryGljDelOpr();
          me.workBook.bind(GC.Spread.Sheets.Events.ClipboardPasting, me.onClipboardPasting);

+ 1 - 0
web/building_saas/complementary_ration_lib/js/section_tree.js

@@ -143,6 +143,7 @@ let sectionTreeObj = {
     buildSheet: function () {
         if(!this.isDef(this.workBook)){
             this.workBook = new GC.Spread.Sheets.Workbook($('#sectionSpread')[0], {sheetCount: 1});
+            sheetCommonObj.spreadDefaultStyle(this.workBook);
             sheetCommonObj.bindEscKey(this.workBook, [{sheet: this.workBook.getSheet(0), editStarting: this.onEditStarting, editEnded: this.onEditEnded}]);
             this.sheet = this.workBook.getSheet(0);
             this.bindEvents(this.sheet);

+ 1 - 1
web/building_saas/css/main.css

@@ -104,7 +104,7 @@ body {
     left:0
 }
 .pm-content{
-    padding-left:58px
+    padding-left:48px
 }
 .content {
     border-left: 1px solid #ccc;

+ 4 - 2
web/building_saas/main/js/models/ration.js

@@ -399,8 +399,10 @@ var Ration = {
                     needInstall = project.Bills.isFBFX(r.node);
                 }
                 r.value===null||r.value===undefined?"":r.value = r.value.replace(/[\s\r\n]/g, "");//去掉空格回车换行等字符
-                nodeInfo.push({ID:r.node.data.ID,billsItemID:r.node.data.billsItemID,newCode:r.value,needInstall:needInstall});
-                refershNodes.push(r.node);
+                if(r.value != r.node.data.code){
+                    nodeInfo.push({ID:r.node.data.ID,billsItemID:r.node.data.billsItemID,newCode:r.value,needInstall:needInstall});
+                    refershNodes.push(r.node);
+                }
             }
             let calQuantity = optionsOprObj.getOption(optionsOprObj.optionsTypes.GENERALOPTS, 'rationQuanACToBillsQuan');
             $.bootstrapLoading.start();

+ 1 - 0
web/building_saas/main/js/views/calc_base_view.js

@@ -67,6 +67,7 @@ let calcBaseView = {
     buildSheet: function () {
         if(!this.workBook){
             this.workBook = new GC.Spread.Sheets.Workbook($('#billsBaseSpread')[0], {sheetCount: 1});
+            sheetCommonObj.spreadDefaultStyle(this.workBook);
             this.setOptions(this.workBook, this.setting.options);
             //bills
             if(this.curType === this.type.bills){

+ 2 - 0
web/building_saas/main/js/views/calc_program_manage.js

@@ -49,7 +49,9 @@ let calcProgramManage = {
             me.detailSpread = null;
         };
         me.mainSpread = sheetCommonObj.buildSheet($('#mainSpread')[0], me.mainSetting, me.datas.length);
+        sheetCommonObj.spreadDefaultStyle(me.mainSpread);
         me.detailSpread = sheetCommonObj.buildSheet($('#detailSpread')[0], me.detailSetting, me.datas[0].calcItems.length);
+        sheetCommonObj.spreadDefaultStyle(me.detailSpread);
         let arr = projectObj.project.calcProgram.compiledFeeTypeNames.slice();
         // arr.splice(arr.findIndex(function (e){return e == '暂估费'}), 1);
         let fieldName = new GC.Spread.Sheets.CellTypes.ComboBox();

+ 32 - 18
web/building_saas/main/js/views/character_content_view.js

@@ -27,7 +27,7 @@ let contentOprObj = {
         const EVENTS = GC.Spread.Sheets.Events;
         workBook.bind(EVENTS.ButtonClicked, me.onButtonClicked);
         sheet.bind(EVENTS.EditStarting, me.onEditStart);
-        sheet.bind(EVENTS.EditEnded, me.onEditEnded);
+        sheet.bind(EVENTS.ValueChanged, me.onValueChanged);
         sheet.bind(EVENTS.ClipboardPasting, me.onClipboardPasting);
         sheet.bind(EVENTS.ClipboardPasted, me.onClipboardPasted);
         sheet.bind(EVENTS.SelectionChanged, me.onSelectionChanged);
@@ -145,10 +145,12 @@ let contentOprObj = {
         me.workBook.focus();
     },
     //更新
-    updateContent: function (job, newContent) {
+    updateContent: function (job, newContent, save = true) {
         let me = contentOprObj;
         job.content = newContent;
-        me.save();
+        if(save){
+            me.save();
+        }
     },
     //新增
     insertContent: function (sheet, idx, content) {
@@ -172,15 +174,16 @@ let contentOprObj = {
             return;
         }
     },
-    onEditEnded: function (sender, args) {
+    onValueChanged: function (sender, args) {
         let me = contentOprObj;
         if(me.setting.header[args.col].dataCode === 'isChecked'){
             return;
         }
-        args.editingText = args.editingText ? args.editingText : '';
+        args.newValue = args.newValue ?  args.newValue : '';
         //更新
-        if(args.row < me.currentCache.length ){
-            me.updateContent(me.currentCache[args.row], args.editingText);
+        if(args.row < me.currentCache.length){
+            let job = me.currentCache[args.row];
+            me.updateContent(job, args.newValue);
         }
 
     },
@@ -236,13 +239,18 @@ let contentOprObj = {
     onClipboardPasted: function (sender, args) {
         let me = contentOprObj;
         let items = sheetCommonObj.analyzePasteData(me.setting, args);
+        let toSave = false;
         for(let i = 0, len = items.length; i < len; i++){
             let rowIdx = args.cellRange.row + i;
             //更新
             if(rowIdx < me.currentCache.length){
-                me.updateContent(me.currentCache[rowIdx], items[i].content);
+                toSave = true;
+                me.updateContent(me.currentCache[rowIdx], items[i].content, false);
             }
         }
+        if(toSave){
+            me.save();
+        }
     },
     onSelectionChanged: function (sender, args) {
         let me = contentOprObj;
@@ -411,7 +419,7 @@ let characterOprObj = {
         const EVENTS = GC.Spread.Sheets.Events;
         workBook.bind(EVENTS.ButtonClicked, me.onButtonClicked);
         sheet.bind(EVENTS.EnterCell, me.onEnterCell);
-        sheet.bind(EVENTS.EditEnded, me.onEditEnded);
+        sheet.bind(EVENTS.ValueChanged, me.onValueChanged);
         sheet.bind(EVENTS.EditStarting, me.onEditStart);
         sheet.bind(EVENTS.ClipboardPasting, me.onClipboardPasting);
         sheet.bind(EVENTS.ClipboardPasted, me.onClipboardPasted);
@@ -604,7 +612,7 @@ let characterOprObj = {
         let newValue = {value: value, isSelected: true};
         item.eigenvalue.push(newValue);
     },
-    updateCharacter: function (item, character, value) {
+    updateCharacter: function (item, character, value, save = true) {
         let me = characterOprObj;
         if(character !== undefined && character !== null){
             item.character = character;
@@ -634,7 +642,9 @@ let characterOprObj = {
                 me.unsetSelected(item);
             }
         }
-        me.save();
+        if(save){
+            me.save();
+        }
     },
     insertCharacter: function (sheet, idx, character) {
         let me = characterOprObj;
@@ -663,18 +673,17 @@ let characterOprObj = {
     onEnterCell: function (sender, args) {
         args.sheet.repaint();
     },
-    onEditEnded: function (sender, args) {
-        let me = characterOprObj, characterTxt;
-        let preObj = me.currentCache.length > 0 ?  me.currentCache[me.currentCache.length - 1] : null;
-        args.editingText = args.editingText ? args.editingText : '';
+    onValueChanged: function (sender, args) {
+        let me = characterOprObj;
+        args.newValue = args.newValue ? args.newValue : '';
         //更新
         if(args.row < me.currentCache.length){
             let thisCha = me.currentCache[args.row];
             if(args.col === 0){//特征
-                me.updateCharacter(thisCha, args.editingText, null);
+                me.updateCharacter(thisCha, args.newValue, null);
             }
             else if(args.col === 1){//特征值
-                me.updateCharacter(thisCha, null, args.editingText);
+                me.updateCharacter(thisCha, null, args.newValue);
             }
         }
     },
@@ -689,13 +698,18 @@ let characterOprObj = {
     onClipboardPasted: function (sender, args) {
         let me = characterOprObj;
         let items = sheetCommonObj.analyzePasteData(me.setting, args);
+        let toSave = false;
         for(let i = 0, len = items.length; i < len; i++){
             //更新
             let rowIdx = args.cellRange.row + i;
             if(me.currentCache.length > rowIdx){
-               me.updateCharacter(me.currentCache[rowIdx], items[i].character, items[i].eigenvalue);
+                toSave = true;
+               me.updateCharacter(me.currentCache[rowIdx], items[i].character, items[i].eigenvalue, false);
             }
         }
+        if(toSave){
+            me.save();
+        }
     },
     onRangeChanged: function (sender, args) {
         let me = characterOprObj;

+ 2 - 0
web/building_saas/main/js/views/fee_rate_view.js

@@ -130,6 +130,7 @@ var feeRateObject={
     createSheet:function(){
         var feeRateFile = projectObj.project.FeeRate.getActivateFeeRate();
         feeRateObject.feeRateSpreads=sheetCommonObj.buildSheet($('#fee_rate_sheet')[0], feeRateObject.sheetSetting,feeRateFile.rates.length);
+        sheetCommonObj.spreadDefaultStyle(feeRateObject.feeRateSpreads);
         feeRateObject.feeRateSheet = feeRateObject.feeRateSpreads.getSheet(0);
         feeRateObject.feeRateSheet.selectionUnit(1)//0 cell,1 row,2 col;
         feeRateObject.feeRateSheet.options.isProtected = true;
@@ -430,6 +431,7 @@ var feeRateObject={
     initFeeRateSpread:function (rowCount) {
         //初始化费用项表格
         this.mainFeeRateSpread = sheetCommonObj.buildSheet($('#divFee')[0], this.mainFeeRateSetting,rowCount);
+        sheetCommonObj.spreadDefaultStyle(this.mainFeeRateSpread);
         this.mainFeeRateSpread.options.scrollbarMaxAlign = true;
         this.mainFeeRateSheet = this.mainFeeRateSpread.getSheet(0);
         if(!projectReadOnly){

+ 13 - 12
web/building_saas/main/js/views/glj_col.js

@@ -5,8 +5,8 @@ let gljCol = {
     ration_glj_setting: {
         header: [
             {headerName: "编码", headerWidth: 100, dataCode: "code", dataType: "String", formatter: "@"},
-            {headerName: "名称", headerWidth: 160, dataCode: "name", dataType: "String",cellType:'tipsCell'},
-            {headerName: "规格型号", headerWidth: 90, dataCode: "specs", dataType: "String", hAlign: "left",cellType:'tipsCell'},
+            {headerName: "名称", headerWidth: 240, dataCode: "name", dataType: "String",cellType:'tipsCell'},
+            {headerName: "规格型号", headerWidth: 190, dataCode: "specs", dataType: "String", hAlign: "left",cellType:'tipsCell'},
             {headerName: "单位", headerWidth: 45, dataCode: "unit", dataType: "String", hAlign: "center"},
             {headerName: "市场价", headerWidth: 80, dataCode: "marketPrice", dataType: "Number", hAlign: "right"},//, decimalField: "glj.unitPrice"
             {headerName: "调整价", headerWidth: 80, dataCode: "adjustPrice", dataType: "Number", hAlign: "right"},//, decimalField: "glj.unitPrice"1
@@ -26,8 +26,8 @@ let gljCol = {
     project_glj_setting:{
         header: [
             {headerName: "编码", headerWidth: 80, dataCode: "code", dataType: "String"},
-            {headerName: "名称", headerWidth: 160, dataCode: "name", dataType: "String"},
-            {headerName: "规格型号", headerWidth: 120, dataCode: "specs", hAlign: "left", dataType: "String"},
+            {headerName: "名称", headerWidth: 240, dataCode: "name", dataType: "String",cellType:'tipsCell'},
+            {headerName: "规格型号", headerWidth: 190, dataCode: "specs", hAlign: "left", dataType: "String",cellType:'tipsCell'},
             {headerName: "单位", headerWidth: 45, dataCode: "unit", hAlign: "center", dataType: "String"},
             {headerName: "类型", headerWidth: 45, dataCode: "short_name", hAlign: "center", dataType: "String"},
             {headerName: "市场价", headerWidth: 70, dataCode: "marketPrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:"glj.unitPrice"
@@ -36,18 +36,19 @@ let gljCol = {
             {headerName: "总消耗量", headerWidth: 90, dataCode: "quantity", hAlign: "right", dataType: "Number",decimalField:'glj.quantity'},
             {headerName: "暂估", headerWidth: 45, dataCode: "is_evaluate", hAlign: "center", dataType: "String",cellType:'checkBox'},
             {headerName: "主要\n材料", headerWidth: 45, dataCode: "is_main_material", hAlign: "center", dataType: "String",cellType:'checkBox'},
-            {headerName: "供货方式", headerWidth: 80, dataCode: "supply", hAlign: "center", dataType: "String",cellType:'comboBox',editorValueType:true,options:supplyComboMap},
-            {headerName: "甲供数量", headerWidth: 100, dataCode: "supply_quantity", hAlign: "right", dataType: "Number",validator:"number",decimalField:'glj.quantity'},
-            {headerName: "三材类别", headerWidth: 80, dataCode: "materialType", hAlign: "center", dataType: "String",cellType:'comboBox',editorValueType:true,options:materialComboMap},
-            {headerName: "三材系数", headerWidth: 100, dataCode: "materialCoe", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:'material'
-            {headerName: "交货方式", headerWidth: 90, dataCode: "delivery", hAlign: "left", dataType: "String"},
-            {headerName: "送达地点", headerWidth: 100, dataCode: "delivery_address", hAlign: "left", dataType: "String"},
+            {headerName: "供货方式", headerWidth: 70, dataCode: "supply", hAlign: "center", dataType: "String",cellType:'comboBox',editorValueType:true,options:supplyComboMap},
+            {headerName: "甲供数量", headerWidth: 90, dataCode: "supply_quantity", hAlign: "right", dataType: "Number",validator:"number",decimalField:'glj.quantity'},
+            {headerName: "三材类别", headerWidth: 70, dataCode: "materialType", hAlign: "center", dataType: "String",cellType:'comboBox',editorValueType:true,options:materialComboMap},
+            {headerName: "三材系数", headerWidth: 70, dataCode: "materialCoe", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:'material'
+            {headerName: "交货方式", headerWidth: 70, dataCode: "delivery", hAlign: "left", dataType: "String"},
+            {headerName: "送达地点", headerWidth: 70, dataCode: "delivery_address", hAlign: "left", dataType: "String"},
             {headerName: "不调价", headerWidth: 55, dataCode: "is_adjust_price", dataType: "String",cellType: "checkBox"},
             {headerName: "备注", headerWidth: 100, dataCode: "remark", hAlign: "left", dataType: "String"}
         ],
-            view: {
+        view: {
             lockColumns: [0,1,2,3,4,6,8]
-        }
+        },
+        frozenCols:4
     },
     mixRatio_Setting:{
         header:[

+ 35 - 2
web/building_saas/main/js/views/glj_view.js

@@ -236,6 +236,32 @@ var gljOprObj = {
         }
         me.updateRationGLJ(args);
     },
+    onSelectionChanged: function (sender, args) {
+        let me = gljOprObj;
+        me.initSelection(args.newSelections.length > 0 ? {row: args.newSelections[0].row} : {row: 0});
+    },
+    getSelStyle: function (selected) {
+        let style = new GC.Spread.Sheets.Style();
+        style.borderLeft = new GC.Spread.Sheets.LineBorder("#D4D4D4", GC.Spread.Sheets.LineStyle.thin);
+        style.borderTop = new GC.Spread.Sheets.LineBorder("#D4D4D4", GC.Spread.Sheets.LineStyle.thin);
+        style.borderRight = new GC.Spread.Sheets.LineBorder("#D4D4D4", GC.Spread.Sheets.LineStyle.thin);
+        style.borderBottom = new GC.Spread.Sheets.LineBorder("#D4D4D4", GC.Spread.Sheets.LineStyle.thin);
+        let colorOpts = optionsOprObj.getOption(optionsOprObj.optionsTypes.COLOROPTS);
+        let selectedColor = colorOpts.SELECTED.backColor,
+            recColor = 'White';
+        style.backColor = selected ? selectedColor : recColor;
+        return style;
+    },
+    initSelection: function (sel) {
+        let me = gljOprObj;
+        if(sel){
+            me.gljLibSheet.setStyle(sel.row, -1, me.getSelStyle(true));
+        }
+        if(me.preSelection){
+            me.gljLibSheet.setStyle(me.preSelection.row, -1, me.getSelStyle(false));
+        }
+        me.preSelection = sel;
+    },
     onButtonClick: function (sender, args) {
         if(args.sheet.isEditing()){
             args.sheet.endEdit();
@@ -1221,7 +1247,11 @@ var gljOprObj = {
             return offset;
         }
 
-        TreeNodeCellType.prototype =  data[index]&&data[index].isMixRatio?new ns.CellTypes.Text(): sheetCommonObj.getDynamicCombo();//new ns.CellTypes.Text();
+        if(isDef(index) && data[index] && data[index].isMixRatio !==true){
+            TreeNodeCellType.prototype =  sheetCommonObj.getDynamicCombo();
+        }else {
+            TreeNodeCellType.prototype =  new ns.CellTypes.Text();
+        }
         TreeNodeCellType.prototype.paint = function (ctx, value, x, y, w, h, style, options) {
             if (value != null) {
                 var offset = margin + rectW + 6;
@@ -1277,7 +1307,7 @@ var gljOprObj = {
         };
         let cellType = new TreeNodeCellType();
         let options = [];
-        if(!(data[index]&&data[index].isMixRatio)){
+        if(isDef(index) && data[index] && data[index].isMixRatio !==true){
             let code = data[index].code;
             if(code) {
                 let preCode = code.split("-")[0];
@@ -1316,8 +1346,10 @@ $(function () {
     $('#glj_tree_div').on('shown.bs.modal', function (e) {
         if (gljOprObj.gljLibSpresd == undefined) {
             gljOprObj.gljLibSpresd = sheetCommonObj.buildSheet($('#gljLibSheet')[0], gljOprObj.gljLibSheetSetting, gljOprObj.stdGLJ.length + gljOprObj.complementaryGLJs.length);
+            sheetCommonObj.spreadDefaultStyle(gljOprObj.gljLibSpresd);
             gljOprObj.gljLibSpresd.bind(GC.Spread.Sheets.Events.ButtonClicked, gljOprObj.onButtonClick);
             gljOprObj.gljLibSheet = gljOprObj.gljLibSpresd.getSheet(0);
+            gljOprObj.gljLibSheet.bind(GC.Spread.Sheets.Events.SelectionChanged, gljOprObj.onSelectionChanged);
             gljOprObj.gljLibSheet.setColumnWidth(0, 20, GC.Spread.Sheets.SheetArea.rowHeader);
             gljOprObj.gljLibSheet.options.isProtected = true;
             gljOprObj.gljLibSheet.name('glj_lib');
@@ -1358,6 +1390,7 @@ $(function () {
             let index = _.findIndex(gljOprObj.gljLibSheetData, {code: selected.code});
             gljOprObj.gljLibSheet.showRow(index, GC.Spread.Sheets.VerticalPosition.center);
             gljOprObj.gljLibSheet.setActiveCell(index, 0);
+            gljOprObj.initSelection({row: index});
             gljOprObj.gljLibSpresd.focus(true);
         }
         else gljOprObj.showLibGLJSheetData();

+ 10 - 5
web/building_saas/main/js/views/installation_fee_view.js

@@ -63,11 +63,11 @@ let installationFeeObj={
             {headerName: "费用规则", headerWidth: 220, dataCode: "rule", hAlign: "left", dataType: "String",getText:'forRule'},
             {headerName: "编码", headerWidth: 70, dataCode: "code", hAlign: "left", dataType: "String"},
             {headerName: "基数", headerWidth: 80, dataCode: "base", hAlign: "left", dataType: "String",cellType:'comboBox',options:installSectionBase},
-            {headerName: "费率(%)", headerWidth: 70, dataCode: "feeRate", hAlign: "right", dataType: "String"},
-            {headerName: "人工(%)", headerWidth: 70, dataCode: "labour", hAlign: "right", dataType: "String"},
-            {headerName: "材料(%)", headerWidth: 70, dataCode: "material", hAlign: "right", dataType: "String"},
-            {headerName: "机械(%)", headerWidth: 70, dataCode: "machine", hAlign: "right", dataType: "String"},
-            {headerName: "记取位置", headerWidth: 200, dataCode: "position", hAlign: "left", dataType: "String",cellType:'selectButton'}
+            {headerName: "费率(%)", headerWidth: 75, dataCode: "feeRate", hAlign: "right", dataType: "String"},
+            {headerName: "人工(%)", headerWidth: 75, dataCode: "labour", hAlign: "right", dataType: "String"},
+            {headerName: "材料(%)", headerWidth: 75, dataCode: "material", hAlign: "right", dataType: "String"},
+            {headerName: "机械(%)", headerWidth: 75, dataCode: "machine", hAlign: "right", dataType: "String"},
+            {headerName: "记取位置", headerWidth: 180, dataCode: "position", hAlign: "left", dataType: "String",cellType:'selectButton'}
         ],
         view: {
             lockColumns: [0, 2]
@@ -234,6 +234,7 @@ let installationFeeObj={
     initInstallationFeeSpread:function(){
         //初始化费用项表格
       this.feeItemSpread = SheetDataHelper.createNewSpread($("#feeItemSheet")[0]);
+      sheetCommonObj.spreadDefaultStyle(this.feeItemSpread);
       this.feeItemSheet = this.feeItemSpread.getSheet(0);
       this.initSheet(this.feeItemSheet,this.feeItemSetting);
       this.feeItemSheet.name('feeItemSheet');
@@ -244,6 +245,7 @@ let installationFeeObj={
 
       //初始化章节项表格
        this.feeDetailSpread = SheetDataHelper.createNewSpread($("#feeDetailSheet")[0]);
+       sheetCommonObj.spreadDefaultStyle(this.feeDetailSpread);
        this.feeDetailSheet = this.feeDetailSpread.getSheet(0);
        this.initSheet(this.feeDetailSheet,this.feeDetailSetting);
        this.feeDetailSheet.bind(GC.Spread.Sheets.Events.SelectionChanged,this.onFeeDetailSelectionChange);
@@ -567,6 +569,7 @@ let installationFeeObj={
     },
     initPositionSpread:function () {
         this.positionSpread = SheetDataHelper.createNewSpread($('#positionSpread')[0]);
+        sheetCommonObj.spreadDefaultStyle(this.positionSpread);
         this.selectionTree = idTree.createNew({id: 'ID', pid: 'ParentID', nid: 'NextSiblingID', rootId: -1, autoUpdate: false});
         this.selectionTreeController = TREE_SHEET_CONTROLLER.createNew(this.selectionTree, this.positionSpread.getActiveSheet(), this.positionSetting);
         this.positionSheet = this.positionSpread.getActiveSheet();
@@ -574,6 +577,7 @@ let installationFeeObj={
     },
     initMoreFeeRuleSpread:function () {
         this.moreFeeRuleSpread = SheetDataHelper.createNewSpread($("#moreFeeRuleSpread")[0]);
+        sheetCommonObj.spreadDefaultStyle(this.moreFeeRuleSpread);
         this.moreFeeRuleSheet = this.moreFeeRuleSpread.getSheet(0);
         this.initSheet(this.moreFeeRuleSheet,this.moreFeeRuleSetting);
         this.moreFeeRuleSheet.bind(GC.Spread.Sheets.Events.CellDoubleClick, this.onFeeRuleDoubleClick);
@@ -583,6 +587,7 @@ let installationFeeObj={
     initModifyFeeRuleSpread:function () {
         let me = this;
         me.modifyFeeRuleSpread = SheetDataHelper.createNewSpread($("#modifyFeeRuleSpread")[0]);
+        sheetCommonObj.spreadDefaultStyle(me.modifyFeeRuleSpread);
         me.modifyFeeRuleSheet = me.modifyFeeRuleSpread.getSheet(0);
         me.initSheet(me.modifyFeeRuleSheet, me.modifyFeeRuleSetting);
         this.modifyFeeRuleSpread.bind(GC.Spread.Sheets.Events.ButtonClicked, this.onPositionButtonClick);

+ 3 - 1
web/building_saas/main/js/views/main_tree_col.js

@@ -401,7 +401,8 @@ let colSettingObj = {
             for (i = 0; i < col.head.spanCols.length; i++) {
                 if (col.head.spanCols[i] !== 0) {
                     cell = sheet.getCell(index, iCol, GC.Spread.Sheets.SheetArea.rowHeader);
-                    cell.value(col.head.titleNames[i]).font(col.head.font).hAlign(col.head.hAlign[i]).vAlign(col.head.vAlign[i]);
+                    cell.value(col.head.titleNames[i]).hAlign(col.head.hAlign[i]).vAlign(col.head.vAlign[i]);
+                    //cell.value(col.head.titleNames[i]).font(col.head.font).hAlign(col.head.hAlign[i]).vAlign(col.head.vAlign[i]);
                 }
                 if (col.head.spanCols[i] > 1 || col.head.spanRows[i] > 1) {
                     sheet.addSpan(index, iCol, col.head.spanRows[i], col.head.spanCols[i], GC.Spread.Sheets.SheetArea.rowHeader);
@@ -419,6 +420,7 @@ let colSettingObj = {
     },
     initSettingSpread: function () {
         this.settingSpread = SheetDataHelper.createNewSpread($('#col_setting_spread')[0], {sheetCount: 1});
+        sheetCommonObj.spreadDefaultStyle(this.settingSpread);
         this.settingSpread.options.showScrollTip = GC.Spread.Sheets.ShowScrollTip.vertical;
         this.settingSpread.bind(GC.Spread.Sheets.Events.ButtonClicked, function (sender, args) {
             if(args.sheet.isEditing()){

+ 7 - 5
web/building_saas/main/js/views/project_glj_view.js

@@ -24,15 +24,15 @@ projectGljObject={
     materialSetting:{
         header:[
             {headerName: "编码", headerWidth: 200, dataCode: "code", dataType: "String"},
-            {headerName: "名称", headerWidth: 160, dataCode: "name", dataType: "String"},
-            {headerName: "规格型号", headerWidth: 120, dataCode: "specs", hAlign: "left", dataType: "String"},
+            {headerName: "名称", headerWidth: 240, dataCode: "name", dataType: "String"},
+            {headerName: "规格型号", headerWidth: 190, dataCode: "specs", hAlign: "left", dataType: "String"},
             {headerName: "单位", headerWidth: 45, dataCode: "unit", hAlign: "center", dataType: "String"},
             {headerName: "定额价", headerWidth: 70, dataCode: "basePrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:'glj.unitPrice'
             {headerName: "市场价", headerWidth: 70, dataCode: "marketPrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:"glj.unitPrice"
-            {headerName: "总消耗量", headerWidth: 100, dataCode: "quantity", hAlign: "right", dataType: "Number",decimalField:'glj.quantity'},
-            {headerName: "三材系数", headerWidth: 100, dataCode: "materialCoe", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:'material'
+            {headerName: "总消耗量", headerWidth: 70, dataCode: "quantity", hAlign: "right", dataType: "Number",decimalField:'glj.quantity'},
+            {headerName: "三材系数", headerWidth: 70, dataCode: "materialCoe", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:'material'
             {headerName: "三材量", headerWidth: 100, dataCode: "materialQuantity", hAlign: "right", dataType: "Number",decimalField:'glj.quantity'},
-            {headerName: "三材类别", headerWidth: 80, dataCode: "materialType", hAlign: "center", dataType: "String",cellType:'comboBox',editorValueType:true,options:materialComboMap}
+            {headerName: "三材类别", headerWidth: 70, dataCode: "materialType", hAlign: "center", dataType: "String",cellType:'comboBox',editorValueType:true,options:materialComboMap}
         ],
         view: {
             lockColumns: [0,1,2,3,6,8]
@@ -46,6 +46,7 @@ projectGljObject={
     initProjectGljSpread:function () {
         if(!this.projectGljSpread){
             this.projectGljSpread = SheetDataHelper.createNewSpread($("#project_glj_sheet")[0],2);
+            sheetCommonObj.spreadDefaultStyle(this.projectGljSpread);
         }
         this.projectGljSpread.bind(GC.Spread.Sheets.Events.RangeChanged, this.onProjectGljRangeChange);
         this.initProjectGljSheet();
@@ -80,6 +81,7 @@ projectGljObject={
     },
     initMixRatioSpread:function () {
         this.mixRatioSpread = SheetDataHelper.createNewSpread($("#mix_ratio_sheet")[0]);
+        sheetCommonObj.spreadDefaultStyle(this.mixRatioSpread);
         this.mixRatioSheet = this.mixRatioSpread .getSheet(0);
         this.initSheet(this.mixRatioSheet,this.mixRatioSetting);
         this.mixRatioSheet.name('mixRatioSheet');

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

@@ -22,7 +22,7 @@ var projectInfoObj = {
             }
              */
             let newHtml = `<span><i class="fa fa-sticky-note-o"></i></span>
-                <span class="" data-placement="bottom" title="t1"> <span class="text-truncate float-right">&nbsp;t1</span></span>`
+                <span class="" data-placement="bottom" title="${proj.fullPath}"> <span class="text-truncate float-right">&nbsp;${proj.name}</span></span>`
             fullPath.push(newHtml);
 
         }

+ 1 - 0
web/building_saas/main/js/views/project_property_basicInfo.js

@@ -78,6 +78,7 @@ let basicInfoView = {
     buildSheet: function () {
         if(!this.workBook){
             this.workBook = new GC.Spread.Sheets.Workbook($('#basicInfoSpread')[0], {sheetCount: 1});
+            sheetCommonObj.spreadDefaultStyle(this.workBook);
             sheetCommonObj.bindEscKey(this.workBook, [{sheet: this.workBook.getSheet(0), editStarting: this.onEditStarting, editEnded: this.onEditEnded}]);
             this.setOptions(this.workBook, this.setting.options);
             this.buildHeader(this.workBook.getActiveSheet(), this.setting.header);

+ 1 - 0
web/building_saas/main/js/views/project_property_bills_quantity_decimal.js

@@ -85,6 +85,7 @@ let billsDecimalView = {
     buildSheet: function () {
         if(!this.workBook){
             this.workBook = new GC.Spread.Sheets.Workbook($('#billsQuanDecimal')[0], {sheetCount: 1});
+            sheetCommonObj.spreadDefaultStyle(this.workBook);
             this.setOptions(this.workBook, this.setting.options);
             this.buildHeader(this.workBook.getActiveSheet(), this.setting.header);
             this.bindEvent(this.workBook);

+ 1 - 0
web/building_saas/main/js/views/project_property_indicativeInfo.js

@@ -53,6 +53,7 @@ let indicativeInfoObj = {
     buildSheet: function () {
         if(!this.workBook){
             this.workBook = new GC.Spread.Sheets.Workbook($('#indicativeInfoSpread')[0], {sheetCount: 1});
+            sheetCommonObj.spreadDefaultStyle(this.workBook);
             this.setOptions(this.workBook, this.setting.options);
             this.workBook.getSheet(0).options.isProtected = true;
             this.buildHeader(this.workBook.getActiveSheet(), this.setting.header);

+ 1 - 0
web/building_saas/main/js/views/project_property_projFeature.js

@@ -81,6 +81,7 @@ let projFeatureView = {
     buildSheet: function () {
         if(!this.workBook){
             this.workBook = new GC.Spread.Sheets.Workbook($('#projFeatureSpread')[0], {sheetCount: 1});
+            sheetCommonObj.spreadDefaultStyle(this.workBook);
             sheetCommonObj.bindEscKey(this.workBook, [{sheet: this.workBook.getSheet(0), editStarting: this.onEditStarting, editEnded: this.onEditEnded}]);
             this.setOptions(this.workBook, this.setting.options);
             this.buildHeader(this.workBook.getActiveSheet(), this.setting.header);

+ 36 - 17
web/building_saas/main/js/views/project_view.js

@@ -524,9 +524,9 @@ var projectObj = {
         let node = project.mainTree.items[info.row];
         let fieldName = projectObj.mainController.setting.cols[info.col].data.field;
         let value = info.sheet.getValue(info.row, info.col);
-        if(fieldName === 'code' && node && calcTools.isRationItem(node) && isDef(node.data.code)){
+        if(fieldName === 'code' && node && calcTools.isRationItem(node) && isDef(node.data.code)&&isDef(value)){
             if (isDef(node.data.prefix) && node.data.prefix !== rationPrefix.none){
-                value = value.replace(new RegExp(node.data.prefix), '');
+                 value = value.replace(new RegExp(node.data.prefix), '');
             };
             value = value.replace(new RegExp(rationPrefix.replace), '');
             info.sheet.setValue(info.row, info.col, value);
@@ -545,6 +545,22 @@ var projectObj = {
                 return;
             }
         }
+        if(fieldName == 'code' && node){
+            projectObj.showBillOrRationLib(node)
+        }
+
+    },
+    showBillOrRationLib(node){
+        if(node.sourceType == ModuleNames.bills){//当清单是“分部分项工程”、“措施项目工程”时,要展开清单规则节点
+
+        }
+
+
+
+/*
+        if(node){
+            if(!$("#qd").is(":visible"))  $('#stdBillsTab').click();
+        }*/
     },
     onColumnWidthChanged: function (sender, info) {         // CSL,2018.07.25
         if (info.colList.includes(4) || info.colList.includes(5)){
@@ -600,7 +616,7 @@ var projectObj = {
                 let node = project.mainTree.items[changedCell.row];
                 let colSetting = setting.cols[changedCell.col];
                 let value = projectObj.checkSpreadEditingText(changedCell.text, colSetting)
-                if(colSetting.data.field=='code' && value != '' && node.sourceType == project.Ration.getSourceType()&&node.data.type==rationType.ration){//如果是更新定额的编码
+                if(colSetting.data.field=='code' && node.sourceType == project.Ration.getSourceType()&&node.data.type==rationType.ration){//如果是更新定额的编码
                     updateRationCodes.push({'node':node,value:value});
                 }else {
                     projectObj.updateCellValue(node, value, colSetting,changedCell.text);
@@ -617,6 +633,7 @@ var projectObj = {
     checkMainSpread: function () {
         if (!this.mainSpread) {
             this.mainSpread = SheetDataHelper.createNewSpread($('#billsSpread')[0]);
+            sheetCommonObj.spreadDefaultStyle(this.mainSpread);
             this.mainSpread.getActiveSheet().selectionPolicy(GC.Spread.Sheets.SelectionPolicy.muliRange);
             this.mainSpread.getActiveSheet().name('mainSheet');
             this.mainSpread.getActiveSheet().options.isProtected = true;
@@ -728,7 +745,6 @@ var projectObj = {
                 that.mainSpread.bind(GC.Spread.Sheets.Events.ButtonClicked, that.onButtonClick);
                 that.mainSpread.bind(GC.Spread.Sheets.Events.CellDoubleClick, that.onCellDoubleClick);
                 that.mainSpread.bind(GC.Spread.Sheets.Events.ColumnWidthChanged, that.onColumnWidthChanged);
-
                 //let loadOtherStartTime = +new Date();
                 if(!projectReadOnly){
                     that.loadMainSpreadContextMenu();
@@ -749,6 +765,8 @@ var projectObj = {
                 if(projectReadOnly){
                     disableSpread(that.mainSpread);
                 }
+                let themeName = that.mainSpread.getSheet(0).currentTheme().name();
+                console.log(GC.Spread.Sheets.Themes[themeName]);
                 $.bootstrapLoading.end();
             }
             else {
@@ -876,7 +894,7 @@ var projectObj = {
                             newCol = codeCol;
                         }
                         sheet.setActiveCell(newRow, newCol);
-                    });
+                    }, true);
                 }
                 //如果其后有定额空行,焦点跳动至定额空行的编码单元格
                 else if(nextSibling && !(isDef(nextSibling.data.code) && nextSibling.data.code.toString().trim() !== '')) {
@@ -1448,7 +1466,6 @@ var projectObj = {
         node.changed = true;
         projectObj.project.calcProgram.calcAndSave(node);
     },
-
     //根据节点获取行style(颜色、字体加粗)
     getNodeColorStyle: function (sheet, node, tree) {
         let colorSetting = optionsOprObj.getOption(optionsOprObj.optionsTypes.COLOROPTS);
@@ -1541,6 +1558,10 @@ var projectObj = {
         if(node === tree.selected){
              style.backColor = colorSetting[mapping.SELECTED]['backColor'];
         }
+        //大项费用加粗(数字与中文字符大小不一问题由字体造成,暂时不考虑分别设置大小)
+       /* if(node.sourceType === this.project.Bills.getSourceType() && node.data.type === billType.DXFY){
+            style.font = 'bold 0.9rem Arial';
+        }*/
         style.borderLeft = new GC.Spread.Sheets.LineBorder("#D4D4D4", GC.Spread.Sheets.LineStyle.thin);
         style.borderTop = new GC.Spread.Sheets.LineBorder("#D4D4D4", GC.Spread.Sheets.LineStyle.thin);
         style.borderRight = new GC.Spread.Sheets.LineBorder("#D4D4D4", GC.Spread.Sheets.LineStyle.thin);
@@ -1567,13 +1588,13 @@ var projectObj = {
             'programID',
             'ruleText'
         ];
-
-        if(stringFields.indexOf(colSetting.data.field) > 0){
-            style.font = 'bold 15px Arial';
+        style.font = 'bold 0.9rem Arial';
+        /*if(stringFields.indexOf(colSetting.data.field) > 0){
+            style.font = 'bold 0.9rem Arial';
         }
         else {
             style.font = 'bold 13px Arial';
-        }
+        }*/
         return style;
     },
    //设置节点style
@@ -2281,6 +2302,7 @@ $('#customFile').change(function () {
         $('#uploadAlert').hide();
         //读取各个表及表名
         $.bootstrapLoading.start();
+        $('#loadingPage').css('z-index', '2000');
         let fileReader = new FileReader();
         fileReader.onload = function(ev) {
             try {
@@ -2336,6 +2358,8 @@ $('#uploadConfirm').click(function () {
         let matchBillLibId = projectInfoObj.projectInfo.engineeringInfo.bill_lib.length > 0 ? projectInfoObj.projectInfo.engineeringInfo.bill_lib[0].id : null;
         formData.append('billsLibId', matchBillLibId);
         let uploadS = +new Date();
+        $.bootstrapLoading.start();
+        $('#loadingPage').css('z-index', '2000');
         $.ajax({
             url: '/bills/upload',
             type: 'POST',
@@ -2343,9 +2367,6 @@ $('#uploadConfirm').click(function () {
             cache: false,
             contentType: false,
             processData: false,
-            beforeSend: function() {
-                $.bootstrapLoading.start();
-            },
             success: function(response){
                 if (response.err === 0) {
                     const message = response.msg !== undefined ? response.msg : '';
@@ -2368,8 +2389,8 @@ $('#uploadConfirm').click(function () {
                 }
                 $(me).removeClass('disabled');
             },
-            error: function(){
-                alert("与服务器通信发生错误");
+            error: function(jqXHR){
+                alert(`与服务器通信发生错误${jqXHR.status} ${jqXHR.statusText}`);
                 $.bootstrapLoading.end();
                 $(me).removeClass('disabled');
             }
@@ -2595,7 +2616,6 @@ function disableTools(){
 function disableSpread(spread){
     spread.unbind(GC.Spread.Sheets.Events.ButtonClicked);
     let sheetCount = spread.getSheetCount();
-    console.log(sheetCount);
     for(let i = 0; i < sheetCount; i++){
         let sheet = spread.getSheet(i);
         sheet.unbind(GC.Spread.Sheets.Events.ButtonClicked);
@@ -2607,7 +2627,6 @@ function disableSpread(spread){
         sheet.unbind(GC.Spread.Sheets.Events.CellDoubleClick);
         sheet.unbind(GC.Spread.Sheets.Events.CellClick);
         sheet.unbind(GC.Spread.Sheets.Events.ValueChanged);
-        console.log(sheet.name());
         sheet.suspendPaint();
         sheet.suspendEvent();
         sheet.options.isProtected = true;

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

@@ -171,7 +171,7 @@ let quantityEditObj = {
     showSelectModal:function (hitinfo) {
         //锁定的清单不显示
         let project = projectObj.project;
-        if(project.isBillsLocked() && project.withinBillsLocked(project.mainTree.selected)){
+        if(project.mainTree.selected.sourceType == ModuleNames.bills && project.isBillsLocked() && project.withinBillsLocked(project.mainTree.selected)){
             return;
         }
         this.initModalContent();

+ 1 - 0
web/building_saas/main/js/views/std_billsGuidance_lib.js

@@ -331,6 +331,7 @@ const billsGuidance = (function () {
     function buildSheet(module) {
         if(!module.workBook){
             module.workBook = new GC.Spread.Sheets.Workbook(module.dom[0], {sheetCount: 1});
+            sheetCommonObj.spreadDefaultStyle(module.workBook);
             let sheet = module.workBook.getActiveSheet();
             if(module === bills){
                 //默认初始可控制焦点在清单表中

+ 3 - 0
web/building_saas/main/js/views/std_bills_lib.js

@@ -14,6 +14,7 @@ var billsLibObj = {
     checkBillsSpread: function () {
         if (!this.stdBillsSpread) {
             this.stdBillsSpread = SheetDataHelper.createNewSpread($('#stdBillsSpread')[0]);
+            sheetCommonObj.spreadDefaultStyle(this.stdBillsSpread);
             this.stdBillsSpread.getSheet(0).name('stdBillsLib_bills');
             // 刷新setting中记录的spread的位置
             this.refreshSettingForHint();
@@ -27,9 +28,11 @@ var billsLibObj = {
     checkBillsRelaSpread: function () {
         if (!this.stdBillsJobSpread) {
             this.stdBillsJobSpread = SheetDataHelper.createNewSpread($('#stdBillsJobs')[0]);
+            sheetCommonObj.spreadDefaultStyle(this.stdBillsJobSpread);
         }
         if (!this.stdBillsFeatureSpread) {
             this.stdBillsFeatureSpread = SheetDataHelper.createNewSpread($('#stdBillsFeatures')[0]);
+            sheetCommonObj.spreadDefaultStyle(this.stdBillsFeatureSpread);
         }
     },
     refreshBillsRelaSpread: function () {

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

@@ -14,11 +14,13 @@ var rationLibObj = {
     checkSpread: function () {
         if (!this.rationChapterSpread) {
             this.rationChapterSpread = SheetDataHelper.createNewSpread($('#stdRationChapter')[0]);
+            sheetCommonObj.spreadDefaultStyle(this.rationChapterSpread);
             this.rationChapterSpread.getSheet(0).name('stdRationLib_chapter');
             this.rationChapterSpread.bind(GC.Spread.Sheets.Events.CellDoubleClick, this.onChapterSpreadCellDoubleClick);
         }
         if (!this.sectionRationsSpread) {
             this.sectionRationsSpread = SheetDataHelper.createNewSpread($('#stdSectionRations')[0]);
+            sheetCommonObj.spreadDefaultStyle(this.sectionRationsSpread);
 
             this.sectionRationsSpread.bind(GC.Spread.Sheets.Events.CellDoubleClick, this.onRationSpreadCellDoubleClick);
             this.refreshSettingForHint();
@@ -121,6 +123,10 @@ var rationLibObj = {
     },
     loadSectionRations: function (sectionID) {
         var showDatas = function (datas, setting) {
+            let rationSheet = rationLibObj.sectionRationsSpread.getActiveSheet();
+            TREE_SHEET_HELPER.massOperationSheet(rationSheet, function () {
+                rationSheet.setColumnWidth(0, 25, GC.Spread.Sheets.SheetArea.rowHeader);
+            });
             SheetDataHelper.loadSheetHeader(setting, rationLibObj.sectionRationsSpread.getActiveSheet());
             SheetDataHelper.loadSheetData(setting, rationLibObj.sectionRationsSpread.getActiveSheet(), datas);
             rationLibObj.setTagForHint(datas);

+ 1 - 0
web/building_saas/main/js/views/sub_fee_rate_views.js

@@ -84,6 +84,7 @@ var subRateObject={
     initSubRateSpread:function (item) {
         if(this.subRateSpread == null){
             this.subRateSpread = SheetDataHelper.createNewSpread($("#subRate")[0]);
+            sheetCommonObj.spreadDefaultStyle(this.subRateSpread);
             this.subRateSheet = this.subRateSpread.getSheet(0);
             sheetCommonObj.initSheet(this.subRateSheet, this.subRateSetting, 30);
             this.subRateSheet.bind(GC.Spread.Sheets.Events.SelectionChanged, this.onSubRateSelectChanged);

+ 5 - 2
web/building_saas/main/js/views/sub_view.js

@@ -11,12 +11,15 @@ let subSpread = null;
 let subObj = {
     initSubSpread:function () {
         contentOprObj.buildSheet($("#jobSpread")[0]);
-        sheetCommonObj.bindEscKey(contentOprObj.workBook, [{sheet: contentOprObj.workBook.getSheet(0), editStarting: contentOprObj.onEditStart, editEnded: contentOprObj.onEditEnded}]);
+        //sheetCommonObj.bindEscKey(contentOprObj.workBook, [{sheet: contentOprObj.workBook.getSheet(0), editStarting: contentOprObj.onEditStart, editEnded: contentOprObj.onEditEnded}]);
+        sheetCommonObj.spreadDefaultStyle(contentOprObj.workBook);
         characterOprObj.buildSheet($("#itemSpread")[0]);
-        sheetCommonObj.bindEscKey(characterOprObj.workBook, [{sheet: characterOprObj.workBook.getSheet(0), editStarting: characterOprObj.onEditStart, editEnded: characterOprObj.onEditEnded}]);
+        //sheetCommonObj.bindEscKey(characterOprObj.workBook, [{sheet: characterOprObj.workBook.getSheet(0), editStarting: characterOprObj.onEditStart, editEnded: characterOprObj.onEditEnded}]);
+        sheetCommonObj.spreadDefaultStyle(characterOprObj.workBook);
         $("#tzjnrCon").hide();
         $("#subSpread").show();
         subSpread = sheetCommonObj.createSpread($("#subSpread")[0], 4);
+        sheetCommonObj.spreadDefaultStyle(subSpread);
         subSpread.options.allowUserDragDrop = false;
         subSpread.options.allowUserDragFill = false;
         subSpread.getSheet(2).name('JSCX');

+ 1 - 0
web/building_saas/main/js/views/tender_price_view.js

@@ -42,6 +42,7 @@ let tender_obj={
     initTenderSpread:function () {
         if(!this.tenderSpread){
             this.tenderSpread = SheetDataHelper.createNewSpread($("#tenderSpread")[0]);
+            sheetCommonObj.spreadDefaultStyle(this.tenderSpread);
         }
         this.tenderSheet = this.tenderSpread.getSheet(0);
         this.tenderTree = cacheTree.createNew(this);

+ 3 - 0
web/building_saas/main/js/views/zmhs_view.js

@@ -31,7 +31,10 @@ let zmhs_obj = {
     },
     initSpread:function () {
         this.coeSpread = SheetDataHelper.createNewSpread($("#coeSpread")[0]);
+        sheetCommonObj.spreadDefaultStyle(this.coeSpread);
         this.assSpread = SheetDataHelper.createNewSpread($("#assSpread")[0]);
+        sheetCommonObj.spreadDefaultStyle(this.assSpread);
+
         this.coeSheet = this.coeSpread.getSheet(0);
         sheetCommonObj.initSheet(this.coeSheet, this.coeSetting, 30);
         this.coeSheet.name('ration_coe');

+ 1 - 0
web/building_saas/pm/html/project-management.html

@@ -540,6 +540,7 @@
 <script src="/public/web/id_tree.js"></script>
 <script src="/public/web/tree_sheet/tree_sheet_helper.js"></script>
 <script src="/public/web/sheet/sheet_data_helper.js"></script>
+<script src="/public/web/sheet/sheet_common.js"></script>
 <script type="text/javascript" src="/public/web/common_ajax.js"></script>
 <script src="/lib/JSExpressionEval_src/Date.js"></script>
 <script src="/web/building_saas/pm/js/pm_ajax.js"></script>

+ 1 - 0
web/building_saas/pm/js/pm_gc.js

@@ -88,6 +88,7 @@ const gcTreeObj = {
     buildSheet: function () {
         if(!this.workBook){
             this.workBook = new GC.Spread.Sheets.Workbook($('#gcSpread')[0], {sheetCount: 1});
+            sheetCommonObj.spreadDefaultStyle(this.workBook);
             this.setOptions(this.workBook, this.setting.options);
             this.buildHeader(this.workBook.getActiveSheet(), this.setting.header);
             this.bindEvent(this.workBook);

+ 8 - 7
web/building_saas/pm/js/pm_newMain.js

@@ -51,13 +51,13 @@ const projTreeObj = {
         //0.48 0.13 0.15 0.15 0.09
         header: [
             {name: '工程列表', dataCode: 'name', width: 300, vAlign: 'center', hAlign: 'left'},
-            {name: '工程造价', dataCode: 'engineeringCost', width: 120, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
-            {name: '分部分项合计', dataCode: 'subEngineering', width: 120, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
-            {name: '措施项目合计', dataCode: 'measure', width: 120, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
-            {name: '其他项目合计', dataCode: 'other', width: 120, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
-            {name: '安全文明施工费', dataCode: 'safetyConstruction', width: 120, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
-            {name: '规费', dataCode: 'charge', width: 120, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
-            {name: '税金', dataCode: 'tax', width: 120, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
+            {name: '工程造价', dataCode: 'engineeringCost', width: 100, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
+            {name: '分部分项合计', dataCode: 'subEngineering', width: 100, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
+            {name: '措施项目合计', dataCode: 'measure', width: 100, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
+            {name: '其他项目合计', dataCode: 'other', width: 100, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
+           /* {name: '安全文明施工费', dataCode: 'safetyConstruction', width: 100, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
+            {name: '规费', dataCode: 'charge', width: 100, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
+            {name: '税金', dataCode: 'tax', width: 100, vAlign: 'center', hAlign: 'right', formatter: '0.00'},*/
             {name: '占造价比例(%)', dataCode: 'rate', width: 100, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
             {name: '建筑面积', dataCode: 'buildingArea', width: 100, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
             {name: '单方造价', dataCode: 'perCost', width: 100, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
@@ -1626,6 +1626,7 @@ function init() {
             projTreeObj.tree = pmTree.createNew(projTreeObj.setting, datas);
             projTreeObj.tree.selected = projTreeObj.tree.items[0];
             projTreeObj.workBook = projTreeObj.buildSheet(projTreeObj.workBook,'projSpread',projTreeObj.setting);
+            sheetCommonObj.spreadDefaultStyle(projTreeObj.workBook);
             projTreeObj.sumEngineeringCost();
             projTreeObj.showTreeData(projTreeObj.tree.items, projTreeObj.setting.header, projTreeObj.workBook.getActiveSheet());
             //初始选择

+ 1 - 0
web/building_saas/pm/js/pm_share.js

@@ -132,6 +132,7 @@ const pmShare = (function () {
     //
     function buildSheet(){
         spreadObj.workBook = new GC.Spread.Sheets.Workbook(spreadDom[0], {sheetCount: 1});
+        sheetCommonObj.spreadDefaultStyle(spreadObj.workBook);
         spreadObj.sheet = spreadObj.workBook.getActiveSheet();
         setSpreadOptions(spreadObj.workBook, spreadOpts);
         bindEvent(spreadObj.workBook, spreadEvents);