瀏覽代碼

Merge branch '1.0.0_online' of http://smartcost.f3322.net:3000/SmartCost/ConstructionCost into 1.0.0_online

chenshilong 6 年之前
父節點
當前提交
da33b60f0d
共有 34 個文件被更改,包括 651 次插入173 次删除
  1. 2 1
      modules/all_models/ration.js
  2. 2 2
      modules/all_models/std_glj.js
  3. 9 8
      modules/all_models/tpl_tree_node.js
  4. 1 1
      modules/glj/models/glj_list_model.js
  5. 2 2
      modules/main/controllers/bills_controller.js
  6. 10 0
      modules/main/controllers/ration_controller.js
  7. 16 1
      modules/main/facade/ration_facade.js
  8. 1 0
      modules/main/routes/ration_route.js
  9. 4 1
      modules/pm/controllers/pm_controller.js
  10. 9 2
      modules/pm/facade/pm_facade.js
  11. 1 1
      modules/reports/util/rpt_construct_data_util.js
  12. 12 3
      public/web/sheet/sheet_common.js
  13. 94 80
      public/web/sheet/sheet_data_helper.js
  14. 5 4
      public/web/tree_sheet/tree_sheet_helper.js
  15. 8 6
      test/unit/reports/test_rpt_test_template.js
  16. 12 7
      test/unit/reports/test_tpl_05.js
  17. 二進制
      web/building_saas/css/animated_favicon1.gif
  18. 4 1
      web/building_saas/css/custom.css
  19. 二進制
      web/building_saas/css/favicon.ico
  20. 二進制
      web/building_saas/css/logo.png
  21. 1 1
      web/building_saas/main/html/main.html
  22. 3 2
      web/building_saas/main/js/models/calc_base.js
  23. 15 0
      web/building_saas/main/js/models/project.js
  24. 11 4
      web/building_saas/main/js/models/ration.js
  25. 29 5
      web/building_saas/main/js/views/main_tree_col.js
  26. 1 15
      web/building_saas/main/js/views/project_info.js
  27. 63 11
      web/building_saas/main/js/views/project_view.js
  28. 16 0
      web/building_saas/main/js/views/quantity_edit_view.js
  29. 8 10
      web/building_saas/main/js/views/zmhs_view.js
  30. 3 0
      web/building_saas/report/js/rpt_main.js
  31. 二進制
      web/dest/css/logo.png
  32. 304 0
      web/over_write/js/jiangxi_2017.js
  33. 1 1
      web/users/html/login.html
  34. 4 4
      web/users/html/user-set.html

+ 2 - 1
modules/all_models/ration.js

@@ -55,7 +55,8 @@ let rationSchema = new Schema({
     libID: Number,
     maskName: String,
     caption: String,
-    isFromDetail:{type: Number,default:0},       // 1 true 2 false
+    evaluationProject:{type: Number,default:0},       // 1 true 0 false 估价项目
+    isFromDetail:{type: Number,default:0},       // 1 true 0 false
     adjustState: String,
     rationProjName: String,
     comments: String,                           // 说明

+ 2 - 2
modules/all_models/std_glj.js

@@ -9,7 +9,7 @@ const std_gljComponent = new Schema(
     {
         ID: Number,
         consumeAmt: Number,
-        consumeAmtProperties: {
+        consumeAmtProperty: {
             type: Schema.Types.Mixed,
             default: {}
         }
@@ -26,7 +26,7 @@ const std_glj = new Schema({
     name: String,
     specs: String,
     basePrice: Number,
-    basePriceProperties: {
+    priceProperty: {
         type: Schema.Types.Mixed,
         default: {}
     },

+ 9 - 8
modules/all_models/tpl_tree_node.js

@@ -28,14 +28,15 @@ let TplNodeSchema = new Schema({
 });
 
 let RptTplTreeSchema = new Schema({
-    compilationId: String,  //编办的ObjectId
-    // engineerId: Number,     //工程专业Id(参考 /modules/common/const/engineering.js)
-    userId: String,        //用户名的object_id串
-    properties: [],         //这是一个预留的属性,假定未来还会有不同的划分细节(如:招标/投标/清单 ... etc)
-    name: String,           //显示名称
-    released: Boolean,      //是否已发布
-    isDeleted: Boolean,     //删除标记
-    items: []               //TplNodeSchema entity
+    compilationId: String,      //编办的ObjectId
+    // engineerId: Number,         //工程专业Id(参考 /modules/common/const/engineering.js)
+    userId: String,             //用户名的object_id串
+    properties: [],             //这是一个预留的属性,假定未来还会有不同的划分细节(如:招标/投标/清单 ... etc)
+    name: String,               //显示名称
+    released: Boolean,          //是否已发布
+    isDeleted: Boolean,         //删除标记
+    flags: Schema.Types.Mixed,  //额外标记集合(这些标记可能会影响到前端显示,如‘计税方式’等)
+    items: []                   //TplNodeSchema entity
 });
 RptTplTreeSchema.statics.findAndModify = function (query, sort, doc, options, callback) {
     return this.collection.findAndModify(query, sort, doc, options, callback);

+ 1 - 1
modules/glj/models/glj_list_model.js

@@ -560,7 +560,7 @@ class GLJListModel extends BaseModel {
                 }
                 // 配合比数据插入
                 let mixRatioData = {
-                    consumption: tmp.consumption,
+                    consumption: consumpiton,
                     glj_id: tmp.ID,
                     unit_price_file_id: unitPriceFileId,
                     connect_key: connect_key,

+ 2 - 2
modules/main/controllers/bills_controller.js

@@ -234,11 +234,10 @@ module.exports = {
                 }
                 let importData = JSON.parse(LZString.decompressFromUTF16(compressData));
                 //匹配的清单库
-                let stdDateA = +new Date();
                 const billsLibId = fields.billsLibId !== undefined && fields.billsLibId.length > 0 && fields.billsLibId[0]? parseInt(fields.billsLibId[0]) : null;
                 let stdBills = [], stdJobs = [], stdCharacters = [];
                 if(billsLibId){
-                    stdBills = await stdBillsModel.find({billsLibId: billsLibId, deleted: false}, '-_id code jobs items engineering billsLibId');
+                    stdBills = await stdBillsModel.find({billsLibId: billsLibId, deleted: false}, '-_id code jobs items engineering billsLibId ruleText');
                     stdJobs = await stdBillJobsModel.find({billsLibId: billsLibId, deleted: false});
                     stdCharacters = await stdBillCharacterModel.find({billsLibId: billsLibId, deleted: false});
                 }
@@ -350,6 +349,7 @@ function parseToCompleteBills(excelBills, fixedBills, stdData){
                     isMatch = true;
                     excelBill.programID = stdBill.engineering ? stdBill.engineering : null;
                     excelBill.billsLibId = stdBill.billsLibId ? stdBill.billsLibId : null;
+                    excelBill.ruleText = stdBill.ruleText ? stdBill.ruleText : '';
                     //set jobContent and itemCharacter
                     let tempJob = [], tempCharacter = [];
                     for(let billJob of stdBill.jobs){

+ 10 - 0
modules/main/controllers/ration_controller.js

@@ -37,6 +37,16 @@ let controller = {
         let data = req.body.data;
         data = JSON.parse(data);
         return await ration_facade.getSameSectionRations(data,req.session.sessionUser.id, req.session.sessionCompilation._id);
+    },
+    //取定额默认的取费专业
+    getDefaultProgramID:async function(req){
+        let data = req.body.data;
+        data = JSON.parse(data);
+        data.userID = req.session.sessionUser.id;
+        data.compilationId = req.session.sessionCompilation._id;
+        return await ration_facade.getDefaultProgramID(data);
+
+
     }
 };
 

+ 16 - 1
modules/main/facade/ration_facade.js

@@ -31,7 +31,8 @@ module.exports = {
     addNewRation:addNewRation,
     addMultiRation: addMultiRation,
     getSameSectionRations:getSameSectionRations,
-    getExtendData:getExtendData
+    getExtendData:getExtendData,
+    getDefaultProgramID:getDefaultProgramID
 };
 async function addNewRation(data,compilation) {
     let query = data.itemQuery;
@@ -167,6 +168,18 @@ async function replaceRations(userID,data,compilation) {
     return recodes;
 }
 
+async function getDefaultProgramID(data) {
+    let searchDao = new SearchDao();
+    let programID;
+    let std = await searchDao.getRationItem(data.userID,data.compilationId,[data.libID],data.code, null);
+    if(std.feeType == undefined || std.feeType == null || std.feeType ==''){//定额取费专业为空的情况下,取项目属性中的定额取费专业ID
+        programID = await getProgramForProject(data.projectID);
+    }else {
+        programID = std.feeType;
+    }
+    return programID;
+}
+
 async function replaceRation(nodeInfo,stdRation,defaultLibID,projectID,calQuantity,compilation) {
     if(nodeInfo.newCode == null||nodeInfo.newCode ==""){//说明是删除编号,则要变成一条空定额
         await deleRationSubRecode(projectID,nodeInfo.ID);//删除定额下挂的各种数据,如定额工料机等
@@ -383,6 +396,8 @@ async function addRationGLJ(std,newRation,compilation) {
                     std_glj.basePrice =  std_glj.priceProperty[ext.priceField];
                 }
             }
+            console.log("================================get std glj=============================================");
+            console.log(std_glj);
             let std_gljTime = +new Date();
             if(std_glj){
                 newGLJ.name = std_glj.name;

+ 1 - 0
modules/main/routes/ration_route.js

@@ -14,5 +14,6 @@ module.exports = function (app) {
     rationRouter.post('/addNewRation', rationController.action);
     rationRouter.post('/addMultiRation', rationController.action);
     rationRouter.post('/getSameSectionRations', rationController.action);
+    rationRouter.post('/getDefaultProgramID', rationController.action);
     app.use('/ration', rationRouter);
 };

+ 4 - 1
modules/pm/controllers/pm_controller.js

@@ -253,10 +253,13 @@ module.exports = {
             let usedCompilation = _.find(userData.used_list, function (o) {
                 return o.compilationId === compilationData._id.toString();
             });
+            //第一次使用该费用定额
             if (!usedCompilation) {
                 await userModel.update({_id: mongoose.Types.ObjectId(request.session.sessionUser.id)}, {$push: {used_list: {compilationId: compilationData._id}}});
-                //拷贝模板数据
+                //拷贝补充定额模板数据
                 await sectionTreeDao.copyDataFromTemplate(request.session.sessionUser.id, compilationData._id);
+                //拷贝例题数据
+
             }
         }
         // 清单计价

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

@@ -51,10 +51,17 @@ module.exports={
     isShare: isShare,
 };
 
-async function copyProject(userID, compilationID,data) {
+//拷贝父级项目
+async function copyParent(){
+
+}
+
+async function copyProject(userID, compilationID,data,newProjectID = null) {
     let projectMap = data.projectMap;
     let originalID = projectMap['copy'].document.ID;
-    let newProjectID = await getCounterID("projects");
+    if (!newProjectID) {
+        newProjectID = await getCounterID("projects");
+    }
     let newFeeName = null,newUnitName = null;
     let calcProgramFileID = uuidV1();//新的计算程序文件ID
     let labourCoeFileID = uuidV1();//新的人工调整系数文件ID

+ 1 - 1
modules/reports/util/rpt_construct_data_util.js

@@ -1281,7 +1281,7 @@ function ext_getPropety(propKey) {
                     if (pi === propKey.length - 1) rst.push('');
                 }
             } else {
-                if (doc.hasOwnProperty("property")) {
+                if (doc.hasOwnProperty("property") && doc["property"].hasOwnProperty(propKey)) {
                     rst.push(doc["property"][propKey]);
                 } else if (doc.hasOwnProperty(propKey)) {
                     rst.push(doc[propKey]);

+ 12 - 3
public/web/sheet/sheet_common.js

@@ -204,8 +204,16 @@ var sheetCommonObj = {
             sheet.setValue(row, col, val, ch);
         }
         this.setRowStyle(row,sheet,data[row].bgColour);
-        if(setting.autoFit==true){
-            sheet.getRange(row, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).wordWrap(true);
+        if(setting.autoFit==true){//设置自动行高
+            if(setting.fitRow && setting.fitRow.length > 0){//如果有设置特定的某些列才需要自动行高就按设置的来,没有设置就默认所有列
+                for(let dataCode of setting.fitRow){
+                  let col =  _.findIndex(setting.header,{dataCode:dataCode})
+                  sheet.getCell(row,col).wordWrap(true);
+                }
+            }else {
+                sheet.getRange(row, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).wordWrap(true);
+            }
+
             sheet.autoFitRow(row);
         }
     },
@@ -306,7 +314,8 @@ var sheetCommonObj = {
                 $editor = $(editorContext);
                 $editor.css("position", "fixed");
                 $editor.css("background", "white");
-                $editor.css("width", cellRect.width);
+                //$editor.css("width", cellRect.width); 2018-11-15 改成固定列宽
+                $editor.css("width", 140);
                 $editor.attr("gcUIElement", "gcEditingInput");
                 if(htmlGenerator) htmlGenerator(context,cellRect,$editor);
             }

+ 94 - 80
public/web/sheet/sheet_data_helper.js

@@ -30,6 +30,7 @@ var __settingTemp = {
 };
 
 var SheetDataHelper = {
+    enterTime: 0,
     getObjPos: function (obj) {
         let target = obj;
         let pos = {x: obj.offsetLeft, y: obj.offsetTop};
@@ -144,89 +145,18 @@ var SheetDataHelper = {
             };
         };
         TipCellType.prototype.processMouseEnter = function (hitinfo) {
-            let text = hitinfo.sheet.getText(hitinfo.row, hitinfo.col);
-            let tag = hitinfo.sheet.getTag(hitinfo.row, hitinfo.col);
-            if(tag !== undefined && tag){
-                text = tag;
-            }
-            if(sheet && sheet.getParent().qo){
-                setting.pos = SheetDataHelper.getObjPos(sheet.getParent().qo);
-            }
-            if (setting.pos && text && text !== '') {
-                //固定不显示的div,存储文本获取固定div宽度,toolTipElement由于显示和隐藏,获取宽度不正确
-                if(!this._fixedTipElement){
-                    let div = $('#fixedTip')[0];
-                    if (!div) {
-                        div = document.createElement("div");
-                        $(div).css("padding", 5)
-                            .attr("id", 'fixedTip');
-                        $(div).hide();
-                        document.body.insertBefore(div, null);
-                    }
-                    this._fixedTipElement = div;
+            let nowTime = Date.now();
+            SheetDataHelper.enterTime = nowTime;
+            const delayTime = 500;
+            let me = this;
+            setTimeout(function(){
+                if (nowTime - SheetDataHelper.enterTime == 0) {
+                    SheetDataHelper.showTipsDIv.call(me, setting, hitinfo);
                 }
-                $(this._fixedTipElement).width('');
-                $(this._fixedTipElement).html(text);
-                if (!this._toolTipElement) {
-                    let div = $('#autoTip')[0];
-                    if (!div) {
-                        div = document.createElement("div");
-                        $(div).css("position", "absolute")
-                            .css("border", "1px #C0C0C0 solid")
-                            .css("box-shadow", "1px 2px 5px rgba(0,0,0,0.4)")
-                            .css("font", "0.9rem Calibri")
-                            .css("background", "Black")
-                            .css("color", "White")
-                            .css("padding", 5)
-                            .attr("id", 'autoTip');
-                        $(div).hide();
-                        document.body.insertBefore(div, null);
-                    }
-                    this._toolTipElement = div;
-                    $(this._toolTipElement).width('');
-                    //实时读取位置信息
-                    if(hitinfo.sheet && hitinfo.sheet.getParent().qo){
-                        setting.pos = SheetDataHelper.getObjPos(hitinfo.sheet.getParent().qo);
-                    }
-                    $(this._toolTipElement).html(text);
-                    //定额库定额特殊处理
-                    if($(hitinfo.sheet.getParent().qo).attr('id') === 'stdSectionRations' ||
-                        $(hitinfo.sheet.getParent().qo).hasClass('main-data-side-search')){
-                        let divWidth = $(this._fixedTipElement).width(),
-                            divHeight = $(this._fixedTipElement).height();
-                        if(divWidth > 600){
-                            divWidth = 590;
-                           $(this._toolTipElement).width(divWidth);
-                        }
-                        let top = setting.pos.y  + hitinfo.y - divHeight < 0 ? 0 :  setting.pos.y + hitinfo.cellRect.y - divHeight;
-                        if(hitinfo.col === 0){
-                            $(this._toolTipElement).css("top", top).css("left", setting.pos.x + hitinfo.cellRect.x - divWidth - 10);
-                        } else{
-                            $(this._toolTipElement).css("top", setting.pos.y + hitinfo.cellRect.y - divHeight - 10).css("left", setting.pos.x + hitinfo.cellRect.x - divWidth);
-                        }
-                    }
-                    else{
-                        $(this._toolTipElement).css("top", setting.pos.y + hitinfo.y +15).css("left", setting.pos.x + hitinfo.x + 15);
-                    }
-                    if($(hitinfo.sheet.getParent().qo).attr('id') === 'stdSectionRations' &&
-                        hitinfo.col === 1){
-                        let value = hitinfo.sheet.getValue(hitinfo.row, hitinfo.col);
-                        let acStyle = hitinfo.sheet.getActualStyle(hitinfo.row, hitinfo.col),
-                            zoom = hitinfo.sheet.zoom();
-                        let textLength = this.getAutoFitWidth(value, text, acStyle, zoom, {sheet: hitinfo.sheet, row: hitinfo.row, col: hitinfo.col, sheetArea: GC.Spread.Sheets.SheetArea.viewport});
-                        let cellWidth = hitinfo.sheet.getCell(-1, hitinfo.col).width();
-                        if(textLength > cellWidth){
-                            $(this._toolTipElement).show("fast");
-                            TREE_SHEET_HELPER.tipDiv = 'show';//做个标记
-                        }
-                    } else {
-                        $(this._toolTipElement).show("fast");
-                        TREE_SHEET_HELPER.tipDiv = 'show';//做个标记
-                    }
-                }
-            }
+            }, delayTime);
         };
         TipCellType.prototype.processMouseLeave = function (hininfo) {
+            SheetDataHelper.enterTime = Date.now();
             TREE_SHEET_HELPER.tipDiv = 'hide';
             if (this._toolTipElement) {
                 $(this._toolTipElement).hide();
@@ -363,5 +293,89 @@ var SheetDataHelper = {
             let selections = sheet.getSelections();
             
         });
+    },
+    showTipsDIv: function(setting, hitinfo){
+        let text = hitinfo.sheet.getText(hitinfo.row, hitinfo.col);
+        let tag = hitinfo.sheet.getTag(hitinfo.row, hitinfo.col);
+        let sheet = hitinfo.sheet;
+        if(tag !== undefined && tag){
+            text = tag;
+        }
+        if(sheet && sheet.getParent().qo){
+            setting.pos = SheetDataHelper.getObjPos(sheet.getParent().qo);
+        }
+        if (setting.pos && text && text !== '') {
+            //固定不显示的div,存储文本获取固定div宽度,toolTipElement由于显示和隐藏,获取宽度不正确
+            if(!this._fixedTipElement){
+                let div = $('#fixedTip')[0];
+                if (!div) {
+                    div = document.createElement("div");
+                    $(div).css("padding", 5)
+                        .attr("id", 'fixedTip');
+                    $(div).hide();
+                    document.body.insertBefore(div, null);
+                }
+                this._fixedTipElement = div;
+            }
+            $(this._fixedTipElement).width('');
+            $(this._fixedTipElement).html(text);
+            if (!this._toolTipElement) {
+                let div = $('#autoTip')[0];
+                if (!div) {
+                    div = document.createElement("div");
+                    $(div).css("position", "absolute")
+                        .css("border", "1px #C0C0C0 solid")
+                        .css("box-shadow", "1px 2px 5px rgba(0,0,0,0.4)")
+                        .css("font", "0.9rem Calibri")
+                        .css("background", "Black")
+                        .css("color", "White")
+                        .css("padding", 5)
+                        .attr("id", 'autoTip');
+                    $(div).hide();
+                    document.body.insertBefore(div, null);
+                }
+                this._toolTipElement = div;
+                $(this._toolTipElement).width('');
+                //实时读取位置信息
+                if(hitinfo.sheet && hitinfo.sheet.getParent().qo){
+                    setting.pos = SheetDataHelper.getObjPos(hitinfo.sheet.getParent().qo);
+                }
+                $(this._toolTipElement).html(text);
+                //定额库定额特殊处理
+                if($(hitinfo.sheet.getParent().qo).attr('id') === 'stdSectionRations' ||
+                    $(hitinfo.sheet.getParent().qo).hasClass('main-data-side-search')){
+                    let divWidth = $(this._fixedTipElement).width(),
+                        divHeight = $(this._fixedTipElement).height();
+                    if(divWidth > 600){
+                        divWidth = 590;
+                        $(this._toolTipElement).width(divWidth);
+                    }
+                    let top = setting.pos.y  + hitinfo.y - divHeight < 0 ? 0 :  setting.pos.y + hitinfo.cellRect.y - divHeight;
+                    if(hitinfo.col === 0){
+                        $(this._toolTipElement).css("top", top).css("left", setting.pos.x + hitinfo.cellRect.x - divWidth - 10);
+                    } else{
+                        $(this._toolTipElement).css("top", setting.pos.y + hitinfo.cellRect.y - divHeight - 10).css("left", setting.pos.x + hitinfo.cellRect.x - divWidth);
+                    }
+                }
+                else{
+                    $(this._toolTipElement).css("top", setting.pos.y + hitinfo.y +15).css("left", setting.pos.x + hitinfo.x + 15);
+                }
+                if($(hitinfo.sheet.getParent().qo).attr('id') === 'stdSectionRations' &&
+                    hitinfo.col === 1){
+                    let value = hitinfo.sheet.getValue(hitinfo.row, hitinfo.col);
+                    let acStyle = hitinfo.sheet.getActualStyle(hitinfo.row, hitinfo.col),
+                        zoom = hitinfo.sheet.zoom();
+                    let textLength = this.getAutoFitWidth(value, text, acStyle, zoom, {sheet: hitinfo.sheet, row: hitinfo.row, col: hitinfo.col, sheetArea: GC.Spread.Sheets.SheetArea.viewport});
+                    let cellWidth = hitinfo.sheet.getCell(-1, hitinfo.col).width();
+                    if(textLength > cellWidth){
+                        $(this._toolTipElement).show("fast");
+                        TREE_SHEET_HELPER.tipDiv = 'show';//做个标记
+                    }
+                } else {
+                    $(this._toolTipElement).show("fast");
+                    TREE_SHEET_HELPER.tipDiv = 'show';//做个标记
+                }
+            }
+        }
     }
 };

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

@@ -270,9 +270,13 @@ var TREE_SHEET_HELPER = {
                 else if(tag !== undefined && tag) {
                     text = tag;
                 }
+                //这里要改成延时显示
+                TREE_SHEET_HELPER.delayShowTips(hitinfo,setting,text);
+            }else {//非造价书页面还是实时显示
+                TREE_SHEET_HELPER.showTipsDiv(text,setting,hitinfo);
             }
 
-            TREE_SHEET_HELPER.showTipsDiv(text,setting,hitinfo);
+
         };
         TipCellType.prototype.processMouseLeave = function (hitinfo) {
             TREE_SHEET_HELPER.hideTipsDiv();
@@ -425,9 +429,6 @@ var TREE_SHEET_HELPER = {
             if (isRationNode&& options.row === sheet.getActiveRowIndex() && options.col === sheet.getActiveColumnIndex()) {
                 sheetCommonObj.drowTriangle(ctx,x+w-12,y+h/2+2);
             }
-            if (sheet.name() === 'stdRationLib_chapter') {
-                console.log(rationLibObj.hasExplanationRuleText(options.row));
-            }
             //定额库章节树问号
             if(sheet.name() === 'stdRationLib_chapter' && this.enterCell && options.row === this.enterCell.row
                 && typeof rationLibObj !== 'undefined' && rationLibObj.hasExplanationRuleText(options.row)){

+ 8 - 6
test/unit/reports/test_rpt_test_template.js

@@ -32,10 +32,12 @@ let demoPrjId = - 1;
 // let demoRptId = 361; //封1
 // let demoRptId = 279; //表04
 // let demoRptId = 261; //封3
-let demoRptId = 458; //09
+// let demoRptId = 458; //09
+// let demoRptId = 551; //05
+// let demoRptId = 626; //06
 // let demoRptId = 451; //09-1
 // let demoRptId = 452; //04
-// let demoRptId = 612; //09-3
+let demoRptId = 612; //09-3
 // let demoRptId = 530; //封2
 // let demoRptId = 386; //04
 // let demoRptId = 389; //10
@@ -53,7 +55,7 @@ let userId_HaiZhu = "5b5a66c4a3c23e000dccdd77"; //海珠user id
 // demoPrjId = 720; //QA: DW3
 //demoPrjId = 1626; //QA:
 // demoPrjId = 2260; //QA:
-demoPrjId = 4568; //QA:
+demoPrjId = 4563; //QA:
 //*/
 let userId_Dft = userId_HaiZhu;
 // let userId_Dft = "5a025c4c15074d134c2b9689";
@@ -84,10 +86,10 @@ test('测试 - 测试模板啦: ', function (t) {
         rptTplDataFacade.prepareProjectData(userId_Dft, demoPrjId, filter, function (err, msg, rawDataObj) {
             if (!err) {
                 try {
-                    // fsUtil.writeObjToFile(rawDataObj, "D:/GitHome/ConstructionCost/tmp/rptTplRawDataObject_测试模板.jsp");
+                    fsUtil.writeObjToFile(rawDataObj, "D:/GitHome/ConstructionCost/tmp/rptTplRawDataObject_测试模板.jsp");
                     let tplData = rptDataUtil.assembleData(rawDataObj);
-                    // fsUtil.writeObjToFile(rawDataObj, "D:/GitHome/ConstructionCost/tmp/rptTplRawDataAfterCacl_测试模板.jsp");
-                    // fsUtil.writeObjToFile(tplData, "D:/GitHome/ConstructionCost/tmp/rptTplAssembledData_测试模板.jsp");
+                    fsUtil.writeObjToFile(rawDataObj, "D:/GitHome/ConstructionCost/tmp/rptTplRawDataAfterCacl_测试模板.jsp");
+                    fsUtil.writeObjToFile(tplData, "D:/GitHome/ConstructionCost/tmp/rptTplAssembledData_测试模板.jsp");
                     //it's time to build the report!!!
                     let printCom = JpcEx.createNew();
                     rptTpl[JV.NODE_MAIN_INFO][JV.NODE_PAGE_INFO][JV.PROP_PAGE_SIZE] = pagesize;

+ 12 - 7
test/unit/reports/test_tpl_05.js

@@ -26,12 +26,15 @@ cfgCacheUtil.setupDftCache();
 let fsUtil = require("../../../public/fsUtil");
 
 let demoPrjId = - 1;
-let demoRptId = 384, pagesize = "A4";
+// let demoRptId = 551; //05
+let demoRptId = 626; //06
+let pagesize = "A4";
 
 // demoPrjId = 720; //QA: DW3
-demoPrjId = 3417; //QA:
+demoPrjId = 4563; //QA:
 //*/
-let userId_Leng = "59cdf14a0034a1000ba52b97"; //小冷User Id 换成_id了
+// let userId_Leng = "59cdf14a0034a1000ba52b97"; //小冷User Id 换成_id了
+let userId_Leng = "5b5a66c4a3c23e000dccdd77"; //海珠的 _id
 let userId_Dft = userId_Leng;
 /*/
  let userId_Dft = "595328da1934dc327cad08eb";
@@ -108,21 +111,23 @@ test('测试 - 模板05汇总表: ', function (t) {
 
 function buildPageData(t, rawDataObj, rptDataUtil, rptTpl) {
     try {
-        // fsUtil.writeObjToFile(rawDataObj, "D:/GitHome/ConstructionCost/tmp/rptTplRawDataObject.jsp");
+        // fsUtil.writeObjToFile(rawDataObj, "D:/GitHome/ConstructionCost/tmp/rptTplRawDataObject_汇总表.jsp");
         let tplData = rptDataUtil.assembleData(rawDataObj);
+        fsUtil.writeObjToFile(rawDataObj, "D:/GitHome/ConstructionCost/tmp/rptTplRawDataAfterCacl_汇总表.jsp");
+        fsUtil.writeObjToFile(tplData, "D:/GitHome/ConstructionCost/tmp/rptTplAssembledData_汇总表.jsp");
         //it's time to build the report!!!
         let printCom = JpcEx.createNew();
         rptTpl[JV.NODE_MAIN_INFO][JV.NODE_PAGE_INFO][JV.PROP_PAGE_SIZE] = pagesize;
         let defProperties = rpt_cfg;
         let dftOption = JV.PAGING_OPTION_NORMAL;
         printCom.initialize(rptTpl);
-        // fsUtil.writeObjToFile(tplData, "D:/GitHome/ConstructionCost/tmp/rptAssembledData.jsp");
-        // fsUtil.writeObjToFile(rawDataObj, "D:/GitHome/ConstructionCost/tmp/rptRawDataAfterAssembled.jsp");
+        // fsUtil.writeObjToFile(tplData, "D:/GitHome/ConstructionCost/tmp/rptAssembledData_汇总表.jsp");
+        // fsUtil.writeObjToFile(rawDataObj, "D:/GitHome/ConstructionCost/tmp/rptRawDataAfterAssembled_汇总表.jsp");
         printCom.analyzeData(rptTpl, tplData, defProperties, dftOption);
         let maxPages = printCom.totalPages;
         let pageRst = printCom.outputAsSimpleJSONPageArray(rptTpl, tplData, 1, maxPages, defProperties);
         if (pageRst) {
-            fsUtil.writeObjToFile(pageRst, "D:/GitHome/ConstructionCost/tmp/rptPageResult_05.jsp");
+            // fsUtil.writeObjToFile(pageRst, "D:/GitHome/ConstructionCost/tmp/rptPageResult_汇总表.jsp");
         } else {
             console.log("oh! no pages were created!");
         }

二進制
web/building_saas/css/animated_favicon1.gif


+ 4 - 1
web/building_saas/css/custom.css

@@ -262,4 +262,7 @@ legend.legend{
     width: 29.8%;
     float: left;
     background: #F1F1F1
-}
+}
+input.text-right{
+    text-align: right;
+}

二進制
web/building_saas/css/favicon.ico


二進制
web/building_saas/css/logo.png


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

@@ -91,7 +91,7 @@
                         </div>
                     </span>
                     <a href="javascript:void(0)" class="btn btn-light btn-sm" id="insertRation" data-toggle="tooltip" data-placement="bottom" data-original-title="插入定额"><i class="fa fa-sign-in" aria-hidden="true"></i></a>
-                    <a href="javascript:void(0)" class="btn btn-light btn-sm" id="delete" data-toggle="tooltip" data-placement="bottom" data-original-title="删除"><i class="fa fa-remove" aria-hidden="true"></i></a>
+                    <!--2018-11-15 隐藏删除按钮   <a href="javascript:void(0)" class="btn btn-light btn-sm" id="delete" data-toggle="tooltip" data-placement="bottom" data-original-title="删除"><i class="fa fa-remove" aria-hidden="true"></i></a>-->
                     <a href="javascript:void(0)" class="btn btn-light btn-sm" id="upLevel" data-toggle="tooltip" data-placement="bottom" data-original-title="升级"><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
                     <a href="javascript:void(0)"  class="btn btn-light btn-sm" id="downLevel" data-toggle="tooltip" data-placement="bottom" data-original-title="降级"><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
                       <a href="javascript:void(0)" class="btn btn-light btn-sm" id="upMove" data-toggle="tooltip" data-placement="bottom" data-original-title="上移"><i class="fa fa-arrow-up" aria-hidden="true"></i></a>

+ 3 - 2
web/building_saas/main/js/models/calc_base.js

@@ -1521,7 +1521,8 @@ let cbParser = {
         //暂估材料费特殊处理:CN(CN)
         let isZG = false;
         for(let i = 0, len = temp.length; i < len; i++){
-            if(temp[i] !== '' && rst.indexOf(temp[i]) === -1){
+            if(temp[i] !== ''){
+            //if(temp[i] !== '' && rst.indexOf(temp[i]) === -1){
                 if(temp[i] === '暂估材料费'){//处理暂估材料基数
                     isZG = true;
                     continue;
@@ -1632,7 +1633,7 @@ let cbParser = {
             return '$CBC.base(\'NONE\')';
         }
         //基数
-        let strs = this.getFigure(v);
+        let strs = _.uniq(this.getFigure(v));
         let exps = [];
         for(let i = 0, len = strs.length; i < len; i++){
             let exp = Object.create(null);

+ 15 - 0
web/building_saas/main/js/models/project.js

@@ -406,6 +406,21 @@ var PROJECT = {
                 }
             })
         };
+
+        project.prototype.updateEvalproject = function (evalProject,data,callback){
+            let programID = null;
+            if(evalProject ==1){//当打勾估价项目选项后,该定额取费专业读取计算程序名称为“估价项目”的计算程序,且为只读状态
+                programID =  this.calcProgram.compiledTemplateMaps["估价项目"];
+                if(callback) callback(programID);
+            }else {//如果evalProject==0,则是去掉勾选估价项目选项,需要获取定额默认的取费专业。
+                let libID = data.from == 'cpt'?"compleRationLib":data.libID;
+                let query = {code:data.code,projectID:data.projectID,libID:libID};
+                CommonAjax.post("/ration/getDefaultProgramID",query,function (result) {
+                    if(callback) callback(result);
+                })
+            }
+        };
+
         //判断项目是否安装工程
         project.prototype.isInstall = function () {
             return projectInfoObj.projectInfo.property.isInstall?true:false;//如果是undefinded 就也返回false

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

@@ -108,13 +108,13 @@ var Ration = {
             });
             controller.sheet.getCell(selected[0].row,col).value(data[fieldName]);
         };
-        ration.prototype.getTempRationData = function (id, billsID, serialNo, rType) {
+        ration.prototype.getTempRationData = function (id, billsID, serialNo, rType,priceType) {
             let newData = {'ID': id, 'serialNo': serialNo, projectID: this.project.ID()};
             let pEngineer = projectInfoObj.projectInfo.property.projectEngineering;//量价默认使用后台设置的单位工程取费专业
             newData[project.masterField.ration] = billsID;
             newData['type'] = rType;
             if (rType == rationType.volumePrice){
-                newData['subType'] = gljType.GENERAL_MATERIAL;   // 默认的量价类型为材料
+                newData['subType'] =  priceType?priceType:gljType.GENERAL_MATERIAL;   // 如果priceType 没传,默认的量价类型为材料
             };
             if(rType == rationType.ration){//空定额暂时不输入取费专业
                // newData['programID'] = projectInfoObj.projectInfo.property.engineering;
@@ -548,7 +548,14 @@ var Ration = {
                 })
             }
         };
-        ration.prototype.addNewRation = function (itemQuery,rationType,callback=null,isEmpty=false) {
+        ration.prototype.insertVolumePrice = function(type){
+            this.addNewRation(null,rationType.volumePrice,function (newNode) {//插入人工不需要自动定位到编号列
+                projectObj.selectColAndFocus(newNode,null);
+            },true,type);
+        };
+
+
+        ration.prototype.addNewRation = function (itemQuery,rationType,callback=null,isEmpty=false,priceType) {//priceType 是量价类型
             let me = this;
             let project = projectObj.project, sheetController = projectObj.mainController;
             let engineering = projectInfoObj.projectInfo.property.engineering;
@@ -579,7 +586,7 @@ var Ration = {
             };
             if(billItemID){
                 let newID = me.getNewRationID();
-                let newData =  me.getTempRationData(newID, billItemID, serialNo, rationType);
+                let newData =  me.getTempRationData(newID, billItemID, serialNo, rationType,priceType);
                 let calQuantity =  isEmpty===true?false:optionsOprObj.getOption(optionsOprObj.optionsTypes.GENERALOPTS, 'rationQuanACToBillsQuan');
                 let brUpdate = [];
                 //更新兄弟节点的序列号

+ 29 - 5
web/building_saas/main/js/views/main_tree_col.js

@@ -90,16 +90,34 @@ let MainTreeCol = {
             return false;
         },
         calcProgramName: function (node) {
-            if (
-                node.sourceType === projectObj.project.Ration.getSourceType() ||
+            if (node.sourceType === projectObj.project.Ration.getSourceType() ||
                 (calcTools.isLeafBill(node) && projectObj.project.property.billsCalcMode === leafBillGetFeeType.billsPrice)
-            ) return false
-            else return true;
+            ) {
+                //当打勾估价项目选项后,该定额取费专业只读
+                if(node.data.evaluationProject == 1){
+                    return true;
+                }
+                return false;
+            }
+            return true;
         },
         non_editSubType: function (node) {
             return node.data.subType != 201 && node.data.subType != 4 && node.data.subType != 5
         },
         commonUnitFee: function (node) {
+            // 2018-11-15 zhang
+            let Bills =projectObj.project.Bills;
+            if(node.sourceType == ModuleNames.bills){//针对清单、分项部分
+                // 当前属于分部分项、施工技术措施项目,综合单价只读。
+                if(Bills.isFBFX(node)||Bills.isTechMeasure(node)) return true;
+                // 不属于分部分项、施工技术措施项目的部分,如果不是叶子清单,或有基数计算/定额/量价/人材机 只读
+                if(!calcTools.isLeafBill(node)||calcTools.isCalcBaseBill(node)||node.children.length > 0)return true;
+            }
+            //当前是定额,综合单价只读。 2018-11-15
+            if(MainTreeCol.readOnly.ration(node)) return true;
+            return false;
+        },
+        commonTotalFee: function (node) {
             // 09-29 zhang
             let Bills =projectObj.project.Bills;
             // 当前属于分部分项、施工技术措施项目,综合单价只读。
@@ -111,8 +129,8 @@ let MainTreeCol = {
                 return true;
             }
             return false;
-            //return !(calcTools.isLeafBill(node) && !calcTools.isBill_DXFY(node) && !calcTools.isCalcBaseBill(node) && !calcTools.isInheritFrom(node, [fixedFlag.SUB_ENGINERRING, fixedFlag.MEASURE]));
         },
+
         //根据节点、父节点类型判断是否可用计算基数
         calcBaseType: function (node) {
             function isDef(v) {
@@ -325,6 +343,12 @@ let MainTreeCol = {
                 return new GC.Spread.Sheets.CellTypes.CheckBox();
             }
         },
+        evaluationProject:function (node) {
+            if(node.sourceType == ModuleNames.ration){
+                return new GC.Spread.Sheets.CellTypes.CheckBox();
+            }
+
+        },
         commonTotalFee: function () {
             return projectObj.getCommonTotalFeeCellType();
         }

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

@@ -6,21 +6,7 @@ var projectInfoObj = {
     projectInfo: null,
     getFullPathHtml: function (proj) {
         let fullPath = [], i, pm = '<span class="text-truncate"><a href="/pm">项目管理</a></span>', angleRight = '<span class="text-truncate"><i class="fa fa-angle-right fa-fw"></i></span>';
-        // fullPath.push(pm);
         if (proj) {
-            /*
-            for (i = 0; i < proj.fullFolder.length; i++) {
-                if (i <= proj.fullFolder.length - 3) {
-                    fullPath.push(angleRight, '<span class="text-truncate" data-toggle="tooltip" data-placement="bottom" title="', proj.fullFolder[i], '"><i class="fa fa-folder-open-o"></i></span>');
-                } else if (i === proj.fullFolder.length - 2) {
-                    // 屏蔽原有代码 不显示中间内容
-                    // fullPath.push(angleRight, '<span class="text-truncate" data-toggle="tooltip" data-placement="bottom" title="' + proj.fullFolder[i] + '"><i class="fa fa-cubes"></i>' + proj.fullFolder[i] + '</span>');
-                } else if (i === proj.fullFolder.length - 1) {
-                    // 屏蔽原有代码 不显示中间内容
-                    // fullPath.push(angleRight, '<span class="text-truncate" data-toggle="tooltip" data-placement="bottom" title="' + proj.fullFolder[i] + '"><i class="fa fa-cube"></i>' + proj.fullFolder[i] + '</span>');
-                }
-            }
-             */
             let pathArr = proj.fullPath;
             let engName = pathArr[pathArr.length -2] || '',
                 projectName = pathArr[pathArr.length -3] || '',
@@ -32,7 +18,7 @@ var projectInfoObj = {
                 <span data-toggle="tooltip" data-placement="bottom" data-original-title="${engName}"><i class="fa fa-cube"></i>...</span>
                 <span class="text-muted px-1">\</span>
                  <span><i class="fa fa-sticky-note-o"></i></span>
-                <span class="text-truncate float-right"  data-toggle="tooltip" data-placement="bottom" data-original-title="${proj.name}">&nbsp;${proj.name}</span>`;
+                <span class="text-truncate"  data-toggle="tooltip" data-placement="bottom" data-original-title="${proj.name}">&nbsp;${proj.name}</span>`;
             fullPath.push(newHtml);
 
         }

+ 63 - 11
web/building_saas/main/js/views/project_view.js

@@ -467,7 +467,13 @@ var projectObj = {
                         return
                     }
                     if (value) {
-                        if(fieldName === 'feesIndex.common.unitFee')  value = parseFloat(value).toDecimal(decimalObj.decimal("unitPrice", node));
+                        if(fieldName === 'feesIndex.common.unitFee') {
+                            value = parseFloat(value).toDecimal(decimalObj.decimal("unitPrice", node));
+                            //当前是量价/人材机,综合单价可输入,输入的值读取到市场单价,重算综合单价。
+                            if(node.sourceType == ModuleNames.ration && node.data.type != rationType.ration){
+                                fieldName = 'marketUnitFee';
+                            }
+                        }
                         if(fieldName === 'feesIndex.common.totalFee'){//修改了综合合价后,反算综合单价,然后再由计算程序算个综合合价出来
                             let unitfee = 0;
                             if(node.data.quantity){//如果工程量为0或空,综合合单直接填到综合单价
@@ -1284,7 +1290,7 @@ var projectObj = {
                     }*/
                 },
                 "insertLJ": {
-                    name: "插入量价",
+                    name: "插入量价",//插入量价不需要自动定位到编号列
                     icon: 'fa-sign-in',
                     disabled: function () {
                         // var selected = project.mainTree.selected;
@@ -1292,22 +1298,48 @@ var projectObj = {
                         return !project.Ration.canAdd(project.mainTree.selected);
                     },
                     callback: function (key, opt) {
-                        project.Ration.addNewRation(null,rationType.volumePrice,function (newNode) {//插入量价不需要自动定位到编号列
+                       /* project.Ration.addNewRation(null,rationType.volumePrice,function (newNode) {
                             projectObj.selectColAndFocus(newNode,null);
-                        },true);
-
-                       // ProjectController.addRation(project, controller, rationType.volumePrice);
+                        },true);*/
                     },
-                  /*  items:{
-                        firstCommand:{
-                            name: "插入量价",
+                    items:{
+                        insertLabour:{
+                            name: "人工",
                             icon: 'fa-sign-in',
                             callback:function(key){
-
+                                project.Ration.insertVolumePrice(gljType.LABOUR);
+                            }
+                        },
+                        insertMaterial:{
+                           name:"材料" ,
+                            icon: 'fa-sign-in',
+                            callback:function(key){
+                                project.Ration.insertVolumePrice(gljType.GENERAL_MATERIAL);
+                            }
+                        },
+                        insertMachine:{
+                            name:"机械" ,
+                            icon: 'fa-sign-in',
+                            callback:function(key){
+                                project.Ration.insertVolumePrice(gljType.GENERAL_MACHINE);
+                            }
+                        },
+                        insertMainMaterial:{
+                            name:"主材" ,
+                            icon: 'fa-sign-in',
+                            callback:function(key){
+                                project.Ration.insertVolumePrice(gljType.MAIN_MATERIAL);
+                            }
+                        },
+                        insertEquipment:{
+                            name:"设备" ,
+                            icon: 'fa-sign-in',
+                            callback:function(key){
+                                project.Ration.insertVolumePrice(gljType.EQUIPMENT);
                             }
                         }
 
-                    }*/
+                    }
                 },
                 "insertGLJ": {
                     name: "插入人材机",
@@ -1367,6 +1399,9 @@ var projectObj = {
                     icon: 'fa-calculator',
                     callback: function () {
                         project.calcProgram.calcAllNodesAndSave();
+                    },
+                    visible:function(key, opt){//2018-11-15 新需求隐藏右键“造价计算”。
+                        return false;
                     }
                 },
                 "spr4":'--------',
@@ -1458,6 +1493,9 @@ var projectObj = {
                     },
                     callback:function(){
                         MaterialController.replaceMaterial([project.mainTree.selected]);
+                    },
+                    visible: function(key, opt){//2018-11-15 暂时隐藏
+                        return false
                     }
                 }
             }
@@ -1578,8 +1616,22 @@ var projectObj = {
             projectObj.onSubcontractClick(node);
         }else if(fieldName == "isEstimate"){
             projectObj.onIsEstimateClick(node,info);
+        }else if(fieldName == "evaluationProject"){
+            projectObj.onEvaluationProjectClic(node,info);
         }
+
+    },
+    onEvaluationProjectClic:function (node,info) {
+        let checkboxValue = info.sheet.getCell(info.row, info.col).value();
+        let newval = checkboxValue?0:1;
+        projectObj.project.updateEvalproject(newval,node.data,function (programID) {
+            node.data.evaluationProject = newval;
+            node.data.programID = programID;
+            node.changed=true;
+            projectObj.project.calcProgram.calcAndSave(node);
+        })
     },
+
     onIsEstimateClick: function(node,info){
         let checkboxValue = info.sheet.getCell(info.row, info.col).value();
         let cell = info.sheet.getCell(info.row, info.col), newval = 0;

+ 16 - 0
web/building_saas/main/js/views/quantity_edit_view.js

@@ -290,4 +290,20 @@ function setCursor(elem, index) {
         range.move("character", index); //光标放到index位置
         range.select();
     }
+}
+
+
+function setSelection(elem, leftIndex, rightIndex) {
+    if (elem.selectionStart !== undefined) { //IE 9 ,10,其他浏览器
+        elem.selectionStart = leftIndex;
+        elem.selectionEnd = rightIndex;
+    } else { //IE 6,7,8
+        var range = elem.createTextRange();
+        range.move("character", -elem.value.length); //光标移到0位置。
+        //这里一定是先moveEnd再moveStart
+        //因为如果设置了左边界大于了右边界,那么浏览器会自动让右边界等于左边界。
+        range.moveEnd("character", rightIndex);
+        range.moveStart("character", leftIndex);
+        range.select();
+    }
 }

+ 8 - 10
web/building_saas/main/js/views/zmhs_view.js

@@ -15,7 +15,9 @@ let zmhs_obj = {
         view: {
             lockColumns:[0,1,2],
             rowHeaderWidth:25
-        }
+        },
+        autoFit:true,
+        fitRow:['name']
     },
     assSpread:null,
     assSheet:null,
@@ -149,12 +151,6 @@ let zmhs_obj = {
                     for(let c of coe.coes){
                         $('#'+c.coeType).val(newValue)
                     }
-                    /*$('#coe_ration').val(newValue);
-                    $('#manual').val(newValue);
-                    $('#material').val(newValue);
-                    $('#manchine').val(newValue);
-                    $('#mainM').val(newValue);
-                    $('#equipment').val(newValue);*/
                 } else {
                     $('#' + id).val(newValue);
                 }
@@ -162,7 +158,9 @@ let zmhs_obj = {
                 $('#' + id).val(coe.coes[name].amount);
             }
         }
-
+    },
+    onInputClick(ele){//点中系数单元格,则默认选中系数值
+        setSelection(ele,0,$(ele).val().length)
     },
     checkIfNeedUpdate(){
         let data = _.find(zmhs_obj.coeSheetData, function (c) {
@@ -236,8 +234,8 @@ let zmhs_obj = {
     },
     getOneRow: function (text, name, id,inputHeight) {
         var rowstr = "<tr ><td style='width: 50%'>" + text
-            + ":</td><td style='width: 50%' align='right'><input type='text' value='1' name=" + name
-            + " style='width:40px;border:0;height:"+ inputHeight+"px;' align='right' id=" + id + " onchange='zmhs_obj.onInputChange(this.id,this.name)' autocomplete='off'></td></tr>";
+            + ":</td><td style='width: 50%' align='right'><input class='text-right' type='text' value='1' name=" + name
+            + " style='width:100%;border:0;height:"+ inputHeight+"px;' align='right' id=" + id + " onchange='zmhs_obj.onInputChange(this.id,this.name)' onclick='zmhs_obj.onInputClick(this)' autocomplete='off'></td></tr>";
         return rowstr;
 
     },

+ 3 - 0
web/building_saas/report/js/rpt_main.js

@@ -62,12 +62,15 @@ let zTreeOprObj = {
     getReportTemplateTree: function() {
         let me = zTreeOprObj, params = {};
         params.engineerId = projectInfoObj.projectInfo.property.engineering;
+        // projectInfoObj.projectInfo.property.taxType === 1 //1: 一般计税 2: 简易计税
         CommonAjax.postEx("report_tpl_api/getRptTplTree", params, 20000, true, function(result){
             let private_remove_hide_item = function (items) {
                 if (items && items.length > 0) {
                     for (let i = items.length - 1; i >= 0; i--) {
                         if (!(items[i].released) && items[i].nodeType === 2) {
                             items.splice(i, 1);
+                        } else if(items[i].hasOwnProperty('flags') && items[i].flags['taxType'] == projectInfoObj.projectInfo.property.taxType ) {
+                            items.splice(i, 1);
                         } else {
                             if (items[i].items && items[i].items.length > 0) {
                                 private_remove_hide_item(items[i].items);

二進制
web/dest/css/logo.png


+ 304 - 0
web/over_write/js/jiangxi_2017.js

@@ -146,6 +146,310 @@ function overwriteRationCalcBases (taxType){
 })();
 
 
+//清单计算基数相关
+if(typeof baseFigureMap !== 'undefined'){
+    baseFigureMap = {
+        //与清单直接关联=======
+        '分部分项工程费': {base: 'FBFXGCF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
+        '分部分项直接费': {base: 'FBFXZJF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
+        '分部分项定额人工费': {base: 'FBFXDEJJRGF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
+        '分部分项人工费': {base: 'FBFXRGF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
+        '分部分项材料费': {base: 'FBFXCLF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
+        '分部分项定额机械费': {base: 'FBFXDEJJJXF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
+        '分部分项机械费': {base: 'FBFXJXF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
+        '分部分项主材费': {base: 'FBFXZCF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
+        '分部分项设备费': {base: 'FBFXSBF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
+        '分部分项人工工日': {base: 'FBFXRGGR', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
+        '措施项目费': {base: 'CSXMF', fixedFlag: fixedFlag.MEASURE, class: 'CSXM'},
+        '组织措施项目费': {base: 'ZZCSXMF', fixedFlag: fixedFlag.CONSTRUCTION_ORGANIZATION, class: 'CSXM'},
+        '组织措施项目人工费': {base: 'ZZCSXMRGF', fixedFlag: fixedFlag.CONSTRUCTION_ORGANIZATION, class: 'CSXM'},
+        '组织措施项目材料费': {base: 'ZZCSXMCLF', fixedFlag: fixedFlag.CONSTRUCTION_ORGANIZATION, class: 'CSXM'},
+        '组织措施项目机械费': {base: 'ZZCSXMJXF', fixedFlag: fixedFlag.CONSTRUCTION_ORGANIZATION, class: 'CSXM'},
+        '技术措施项目费': {base: 'JSCSXMF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
+        '技术措施项目定额人工费': {base: 'JSCSXMDEJJRGF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
+        '技术措施项目人工费': {base: 'JSCSXMRGF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
+        '技术措施项目材料费': {base: 'JSCSXMCLF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
+        '技术措施项目定额机械费': {base: 'JSCSXMDEJJJXF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
+        '技术措施项目机械费': {base: 'JSCSXMJXF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
+        '技术措施项目主材费': {base: 'JSCSXMZCF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
+        '技术措施项目设备费': {base: 'JSCSXMSBF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
+        '技术措施项目人工工日': {base: 'JSCSXMRGGR', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
+        '其他项目费': {base: 'QTXMF',  fixedFlag: fixedFlag.OTHER, class: 'QTXM'},
+        '规费': {base: 'GF', fixedFlag: fixedFlag.CHARGE, class: 'GF'},
+        '税金': {base: 'SJ', fixedFlag: fixedFlag.TAX, class: 'SJ'},
+        //不于清单直接关联==========
+        '建筑面积': {base: 'JZMJ', class: 'FBFX'},
+        '人材机价差': {base: 'RCJJC', class: 'RCJ'},
+        '人工价差': {base: 'RGJC', class: 'RCJ'},
+        '材料价差': {base: 'CLJC', class: 'RCJ'},
+        '机械价差': {base: 'JXJC', class: 'RCJ'},
+        '甲供人工费': {base: 'JGRGF', class: 'RCJ'},
+        '甲供材料费': {base: 'JGCLF', class: 'RCJ'},
+        '甲供机械费': {base: 'JGJXF', class: 'RCJ'},
+        '甲供主材费': {base: 'JGZCF', class: 'RCJ'},
+        '甲供设备费': {base: 'JGSBF', class: 'RCJ'},
+        '甲定人工费': {base: 'JDRGF', class: 'RCJ'},
+        '甲定材料费': {base: 'JDCLF', class: 'RCJ'},
+        '甲定机械费': {base: 'JDJXF', class: 'RCJ'},
+        '甲定主材费': {base: 'JDZCF', class: 'RCJ'},
+        '甲定设备费': {base: 'JDSBF', class: 'RCJ'},
+        '暂估材料费(从子目汇总)': {base: 'ZGCLFFZM', class: 'RCJ'},
+        '分包费': {base: 'FBF', class: 'FBF'},
+        '分包人工费': {base: 'FBRGF', class: 'FBF'},
+        '分包材料费': {base: 'FBCLF', class: 'FBF'},
+        '分包机械费': {base: 'FBJXF', class: 'FBF'},
+        '分包主材费': {base: 'FBZCF', class: 'FBF'},
+        '分包设备费': {base: 'FBSBF', class: 'FBF'},
+        '分包人工工日': {base: 'FBRGGR', class: 'FBF'},
+        '估价项目定额人工费': {base: 'GJXMDERGF', class: 'GJXM'},
+        '估价项目定额机械费': {base: 'GJXMDEJXF', class: 'GJXM'},
+        '估价项目直接费': {base: 'GJXMZJF', class: 'GJXM'},
+        '估价项目人工费': {base: 'GJXMRGF', class: 'GJXM'},
+        '估价项目材料费': {base: 'GJXMCLF', class: 'GJXM'},
+        '估价项目机械费': {base: 'GJXMJXF', class: 'GJXM'},
+        '估价项目主材费': {base: 'GJXMZCF', class: 'GJXM'},
+        '估价项目工日': {base: 'GJXMGR', class: 'GJXM'},
+    };
+}
+if(typeof baseFigureTemplate !== 'undefined'){
+    baseFigureTemplate['FBFXZJF'] =  function (tender) {//分部分项直接费
+        if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.SUB_ENGINERRING])){
+            return 0;
+        }
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let bill = calcBase.fixedBills[fixedFlag.SUB_ENGINERRING]['bill'];
+        if(cbTools.isUnDef(bill)) return 0;
+        if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
+        return cbTools.isDef(bill.feesIndex.direct) && cbTools.isDef(bill.feesIndex.direct[totalFeeType]) ? bill.feesIndex.direct[totalFeeType] : 0;
+    };
+    baseFigureTemplate['FBFXRGF'] =  function (tender) {//分部分项人工费(市场人工费)
+        if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.SUB_ENGINERRING])){
+            return 0;
+        }
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let bill = calcBase.fixedBills[fixedFlag.SUB_ENGINERRING]['bill'];
+        if(cbTools.isUnDef(bill)) return 0;
+        if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
+        return cbTools.isDef(bill.feesIndex.marketLabour) && cbTools.isDef(bill.feesIndex.marketLabour[totalFeeType]) ? bill.feesIndex.marketLabour[totalFeeType] : 0;
+    };
+    baseFigureTemplate['FBFXCLF'] =  function (tender) {//分部分项材料费(市场材料费)
+        if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.SUB_ENGINERRING])){
+            return 0;
+        }
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let bill = calcBase.fixedBills[fixedFlag.SUB_ENGINERRING]['bill'];
+        if(cbTools.isUnDef(bill)) return 0;
+        if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
+        return cbTools.isDef(bill.feesIndex.marketMaterial) && cbTools.isDef(bill.feesIndex.marketMaterial[totalFeeType]) ? bill.feesIndex.marketMaterial[totalFeeType] : 0;
+    };
+    baseFigureTemplate['FBFXJXF'] =  function (tender) {//分部分项机械费(市场机械费)
+        if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.SUB_ENGINERRING])){
+            return 0;
+        }
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let bill = calcBase.fixedBills[fixedFlag.SUB_ENGINERRING]['bill'];
+        if(cbTools.isUnDef(bill)) return 0;
+        if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
+        return cbTools.isDef(bill.feesIndex.marketMachine) && cbTools.isDef(bill.feesIndex.marketMachine[totalFeeType]) ? bill.feesIndex.marketMachine[totalFeeType] : 0;
+    };
+    baseFigureTemplate['ZZCSXMRGF'] =  function (tender) {//组织措施项目人工费(市场人工费)
+        if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.CONSTRUCTION_ORGANIZATION])){
+            return 0;
+        }
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let bill = calcBase.fixedBills[fixedFlag.CONSTRUCTION_ORGANIZATION]['bill'];
+        if(cbTools.isUnDef(bill)) return 0;
+        if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
+        return cbTools.isDef(bill.feesIndex.marketLabour) && cbTools.isDef(bill.feesIndex.marketLabour[totalFeeType]) ? bill.feesIndex.marketLabour[totalFeeType] : 0;
+    };
+    baseFigureTemplate['ZZCSXMCLF'] =  function (tender) {//组织措施项目材料费(市场材料费)
+        if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.CONSTRUCTION_ORGANIZATION])){
+            return 0;
+        }
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let bill = calcBase.fixedBills[fixedFlag.CONSTRUCTION_ORGANIZATION]['bill'];
+        if(cbTools.isUnDef(bill)) return 0;
+        if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
+        return cbTools.isDef(bill.feesIndex.marketMaterial) && cbTools.isDef(bill.feesIndex.marketMaterial[totalFeeType]) ? bill.feesIndex.marketMaterial[totalFeeType] : 0;
+    };
+    baseFigureTemplate['ZZCSXMJXF'] =  function (tender) {//组织措施项目机械费(市场机械费)
+        if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.CONSTRUCTION_ORGANIZATION])){
+            return 0;
+        }
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let bill = calcBase.fixedBills[fixedFlag.CONSTRUCTION_ORGANIZATION]['bill'];
+        if(cbTools.isUnDef(bill)) return 0;
+        if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
+        return cbTools.isDef(bill.feesIndex.marketMachine) && cbTools.isDef(bill.feesIndex.marketMachine[totalFeeType]) ? bill.feesIndex.marketMachine[totalFeeType] : 0;
+    };
+    baseFigureTemplate['JSCSXMRGF'] =  function (tender) {//技术措施项目人工费(市场人工费)
+        if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.CONSTRUCTION_TECH])){
+            return 0;
+        }
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let bill = calcBase.fixedBills[fixedFlag.CONSTRUCTION_TECH]['bill'];
+        if(cbTools.isUnDef(bill)) return 0;
+        if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
+        return cbTools.isDef(bill.feesIndex.marketLabour) && cbTools.isDef(bill.feesIndex.marketLabour[totalFeeType]) ? bill.feesIndex.marketLabour[totalFeeType] : 0;
+    };
+    baseFigureTemplate['JSCSXMCLF'] =  function (tender) {//技术措施项目材料费(市场材料费)
+        if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.CONSTRUCTION_TECH])){
+            return 0;
+        }
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let bill = calcBase.fixedBills[fixedFlag.CONSTRUCTION_TECH]['bill'];
+        if(cbTools.isUnDef(bill)) return 0;
+        if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
+        return cbTools.isDef(bill.feesIndex.marketMaterial) && cbTools.isDef(bill.feesIndex.marketMaterial[totalFeeType]) ? bill.feesIndex.marketMaterial[totalFeeType] : 0;
+    };
+    baseFigureTemplate['JSCSXMJXF'] =  function (tender) {//技术措施项目机械费(市场机械费)
+        if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.CONSTRUCTION_TECH])){
+            return 0;
+        }
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let bill = calcBase.fixedBills[fixedFlag.CONSTRUCTION_TECH]['bill'];
+        if(cbTools.isUnDef(bill)) return 0;
+        if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
+        return cbTools.isDef(bill.feesIndex.marketMachine) && cbTools.isDef(bill.feesIndex.marketMachine[totalFeeType]) ? bill.feesIndex.marketMachine[totalFeeType] : 0;
+    };
+    baseFigureTemplate['FBRGF'] =  function (tender) {//分包人工费(市场人工费)
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let rst = 0;
+        let rations = calcBase.project.Ration.datas;
+        for(let ration of rations){
+            if(ration.isSubcontract && ration.feesIndex && ration.feesIndex.marketLabour){
+                rst = parseFloat(rst + ration.feesIndex.marketLabour[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
+            }
+        }
+        return rst;
+    };
+    baseFigureTemplate['FBCLF'] =  function (tender) {//分包材料费(市场材料费)
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let rst = 0;
+        let rations = calcBase.project.Ration.datas;
+        for(let ration of rations){
+            if(ration.isSubcontract && ration.feesIndex && ration.feesIndex.marketMaterial){
+                rst = parseFloat(rst + ration.feesIndex.marketMaterial[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
+            }
+        }
+        return rst;
+    };
+    baseFigureTemplate['FBJXF'] =  function (tender) {//分包机械费(市场机械费)
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let rst = 0;
+        let rations = calcBase.project.Ration.datas;
+        for(let ration of rations){
+            if(ration.isSubcontract && ration.feesIndex && ration.feesIndex.marketMachine){
+                rst = parseFloat(rst + ration.feesIndex.marketMachine[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
+            }
+        }
+        return rst;
+    };
+    baseFigureTemplate['GJXMDERGF'] =  function (tender) {//估计项目定额人工费
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let rst = 0;
+        let rations = calcBase.project.Ration.datas;
+        for(let ration of rations){
+            if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.labour){
+                rst = parseFloat(rst + ration.feesIndex.labour[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
+            }
+        }
+        return rst;
+    };
+    baseFigureTemplate['GJXMDEJXF'] =  function (tender) {//估计项目定额机械费
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let rst = 0;
+        let rations = calcBase.project.Ration.datas;
+        for(let ration of rations){
+            if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.machine){
+                rst = parseFloat(rst + ration.feesIndex.machine[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
+            }
+        }
+        return rst;
+    };
+    baseFigureTemplate['GJXMZJF'] =  function (tender) {//估计项目直接费
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let rst = 0;
+        let rations = calcBase.project.Ration.datas;
+        for(let ration of rations){
+            if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.direct){
+                rst = parseFloat(rst + ration.feesIndex.direct[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
+            }
+        }
+        return rst;
+    };
+    baseFigureTemplate['GJXMRGF'] =  function (tender) {//估计项目人工费(市场人工费)
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let rst = 0;
+        let rations = calcBase.project.Ration.datas;
+        for(let ration of rations){
+            if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.marketLabour){
+                rst = parseFloat(rst + ration.feesIndex.marketLabour[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
+            }
+        }
+        return rst;
+    };
+    baseFigureTemplate['GJXMCLF'] =  function (tender) {//估计项目材料费(市场材料费)
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let rst = 0;
+        let rations = calcBase.project.Ration.datas;
+        for(let ration of rations){
+            if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.marketMaterial){
+                rst = parseFloat(rst + ration.feesIndex.marketMaterial[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
+            }
+        }
+        return rst;
+    };
+    baseFigureTemplate['GJXMJXF'] =  function (tender) {//估计项目机械费(市场机械费)
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let rst = 0;
+        let rations = calcBase.project.Ration.datas;
+        for(let ration of rations){
+            if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.marketMachine){
+                rst = parseFloat(rst + ration.feesIndex.marketMachine[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
+            }
+        }
+        return rst;
+    };
+    baseFigureTemplate['GJXMZCF'] =  function (tender) {//估计项目主材费
+        const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
+        let rst = 0;
+        let rations = calcBase.project.Ration.datas;
+        for(let ration of rations){
+            if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.mainMaterial){
+                rst = parseFloat(rst + ration.feesIndex.mainMaterial[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
+            }
+        }
+        return rst;
+    };
+    baseFigureTemplate['GJXMGR'] =  function (tender) {//估计项目工日
+        const quantityType = tender ? 'tenderQuantity' : 'quantity';
+        let rst = 0;
+        let rations = calcBase.project.Ration.datas;
+        let rationGljs = calcBase.project.ration_glj.datas;
+        for (let ration of rations) {
+            if (ration.evaluationProject && ration.type === rationType.ration) {
+                for(let glj of rationGljs){
+                    if(ration.ID === glj.rationID && glj.type === gljType.LABOUR){
+                        rst = parseFloat(rst + parseFloat(glj[quantityType] * ration[quantityType]).toDecimal(decimalObj.glj.quantity)).toDecimal(decimalObj.glj.quantity);
+                    }
+                }
+            }
+        }
+        return rst;
+    };
+}
+//增加清单基数分类估价项目、去除分类税前工程造价
+if(typeof $ !== 'undefined' && $('#cbClassList')){
+    $('#cbClassList').find('li:eq(8)').remove();
+    let $li = $('<li class="p-1"><a id="cb_GJXM" href="javascript:void(0);">估价项目</a></li>');
+    $li.insertAfter($('#cbClassList').find('li:eq(4)'));
+}
+if (typeof calcBaseView !== 'undefined') {
+    calcBaseView.billsCBClass = {ALL: [], FBFX: [], CSXM: [], QTXM: [], FBF: [], RCJ: [], GF: [], SJ: [], GJXM: []};
+}
+
+
 
 
 

+ 1 - 1
web/users/html/login.html

@@ -44,7 +44,7 @@
         <div class="modal-dialog modal-lg" role="document">
             <div class="modal-content">
                 <div class="modal-header">
-                    <h5 class="modal-title">选择登录版本</h5>
+                    <h5 class="modal-title">选择费用定额</h5>
                     <p class="m-0 text-warning"><i class="fa fa-exclamation-triangle"></i> <b>登录设置</b> 中可以修改您的登录习惯。</p>
                 </div>
                 <div class="modal-body">

+ 4 - 4
web/users/html/user-set.html

@@ -44,7 +44,7 @@
                         <legend class="my-3">登录设置</legend>
                         <form method="post" action="/user/save-preferences">
                             <div class="form-group">
-                                <label class="form-control-label">登录时选择版本</label>
+                                <label class="form-control-label">登录时选择费用定额</label>
                                 <div class="form-control">
                                     <div class="form-check form-check-inline">
                                       <input name="login_ask" type="radio" class="form-check-input" value="1"
@@ -54,14 +54,14 @@
                                     <div class="form-check form-check-inline">
                                       <input name="login_ask" type="radio" class="form-check-input" value="0"
                                         <% if(preferenceSetting.login_ask === 0) { %>checked="checked" <% } %>>
-                                      <span class="form-check-label">指定版本</span>
+                                      <span class="form-check-label">指定费用定额</span>
                                     </div>
                                 </div>
                             </div>
                             <div class="form-group">
-                                <label class="form-control-label">指定版本</label>
+                                <label class="form-control-label">指定费用定额</label>
                                 <select class="form-control" name="select_version">
-                                    <option value="">请选择版本</option>
+                                    <option value="">请选择费用定额</option>
                                     <% if (compilationList.length > 0) {%>
                                     <% compilationList.forEach(function(compilation) { %>
                                     <option value="<%= compilation._id %>" <% if(preferenceSetting.select_version === compilation._id.toString()) { %>selected="selected" <% } %>><%= compilation.name %></option>