فهرست منبع

补充人材机18人材机类型、机型

zhongzewei 7 سال پیش
والد
کامیت
02d366667a

+ 1 - 0
config/gulpConfig.js

@@ -164,6 +164,7 @@ module.exports = {
         'public/web/id_tree.js',
         'public/web/tree_sheet/tree_sheet_controller.js',
         'public/web/tree_sheet/tree_sheet_helper.js',
+        'public/web/tools_const.js',
         'public/web/ration_glj_units.js',
         'web/building_saas/complementary_glj_lib/js/glj.js',
         'web/building_saas/complementary_glj_lib/js/gljClassTree.js',

+ 1 - 0
modules/all_models/compleGlj_glj.js

@@ -26,6 +26,7 @@ const comple_glj = new Schema({
     basePrice: String,
     gljClass: Number,
     gljType: Number,
+    model: Number,
     shortName: String,
     component: [comple_gljComponent]
 }, {versionKey: false});

+ 4 - 1
modules/complementary_glj_lib/controllers/gljController.js

@@ -33,12 +33,15 @@ class GljController extends BaseController{
             let engineeringInfo = await engineeringLibModel.findDataByCondition({'valuationID': {"$in": valuationIDs},"glj_lib.0": {$exists:1}});//数组大于0
             gljLibId = engineeringInfo.glj_lib.length > 0 && typeof engineeringInfo.glj_lib !== 'undefined' ? engineeringInfo.glj_lib[0].id : null;
         }
+        let overWriteUrl = req.session.sessionCompilation && req.session.sessionCompilation.overWriteUrl &&
+                            req.session.sessionCompilation._id !== '5b4d581023a924000b760f2d' ? req.session.sessionCompilation.overWriteUrl : null;
         res.render('building_saas/complementary_glj_lib/html/tools-gongliaoji.html',{
             userID: req.session.sessionUser.id,
             gljLibId: gljLibId,
             compilationId: sessionCompilation._id,
             versionName: req.session.sessionCompilation.name + '免费版',
-            LicenseKey:config.getLicenseKey(process.env.NODE_ENV)
+            LicenseKey:config.getLicenseKey(process.env.NODE_ENV),
+            overWriteUrl: overWriteUrl,
         });
     }
     getGljDistType (req, res) {

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

@@ -499,7 +499,10 @@ var sheetCommonObj = {
         sheet.suspendPaint();
         let combo = me.getDynamicCombo();
         for(let i = 0, len = rowCount; i < len; i++){
-            if(itemsHeight) combo.itemHeight(itemsHeight);
+            if(itemsHeight) {
+                combo.itemHeight(itemsHeight);
+                combo._maxDropDownItems = itemsHeight + 5;
+            }
             if(itemsType === 'value') combo.items(items).editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.value);
             else if(itemsType === 'text') combo.items(items).editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.text);
             else combo.items(items);

+ 24 - 0
public/web/tools_const.js

@@ -0,0 +1,24 @@
+'use strict';
+
+/**
+ *
+ *
+ * @author Zhong
+ * @date 2018/8/16
+ * @version
+ */
+//允许使用的工料机类型:人工、普通材料、混凝土、砂浆、配合比、商品混凝土、商品砂浆、机械台班、机械组成物、机上人工、主材、设备
+let allowGljType = [1, 201, 202, 203, 204, 205, 206, 301, 302, 303, 4, 5];
+
+//允许含有组成物的工料机类型:混凝土、砂浆、配合比、机械台班、主材
+let allowComponent = [202, 203, 204, 301, 4];
+//可以作为组成物的工料机类型:普通材料、机械组成物、机上人工、主材
+let componentType = [201, 302, 303, 4];
+//允许含有组成物的机械工料机类型:机械台班
+let machineAllowComponent = [301];
+//可以作为机械工料机组成物的工料机类型:机械组成物、机上人工
+let machineComponent = [302, 303];
+//允许含有组成物的材料工料机类型:混凝土、砂浆、配合比
+let materialAllowComponent = [202, 203, 204];
+//可以作为材料工料机组成物的工料机类型:普通材料
+let materialComponent = [201];

+ 2 - 0
web/building_saas/complementary_glj_lib/html/tools-gongliaoji.html

@@ -148,6 +148,7 @@
     <script type="text/javascript" src="/public/web/QueryParam.js"></script>
     <script type="text/javascript" src="/lib/lodash/lodash.js"></script>
     <script type="text/javascript" src="/public/web/id_tree.js"></script>
+    <script type="text/javascript" src="/public/web/tools_const.js"></script>
     <script type="text/javascript" src="/public/web/tree_sheet/tree_sheet_controller.js"></script>
     <script type="text/javascript" src="/public/web/tree_sheet/tree_sheet_helper.js"></script>
     <script type="text/javascript" src="/public/web/ration_glj_units.js"></script>
@@ -160,6 +161,7 @@
     <script type="text/javascript" src="/web/building_saas/complementary_glj_lib/js/sheetOpr.js"></script>
     <script type="text/javascript" src="/public/web/storageUtil.js"></script>
     <!--endinject-->
+    <script type="text/javascript" src="<%= overWriteUrl %>"></script>
     <SCRIPT type="text/javascript">
         let userId = "<%= userID%>";
         let compilationId = "<%= compilationId%>";

+ 2 - 16
web/building_saas/complementary_glj_lib/js/components.js

@@ -73,13 +73,10 @@ let componentOprObj = {
         }
     },
     setShowGljList: function (gljList, clearChecked) {
-        //初始为所有工料机,机械类型可添加机械组成物、机上人工,混凝土,砂浆、配合比可添加普通材料
-        let machineArr = [302, 303];
-        let materialArr = [202, 203, 204];//混凝土、砂浆、配合比, 201普通材料
         let that = repositoryGljObj, me = componentOprObj;
             for(let i = 0; i < gljList.length; i++){
-                if(that.currentGlj.gljType === 301 && machineArr.indexOf(gljList[i].gljType) !== -1 ||
-                    materialArr.indexOf(that.currentGlj.gljType) !== -1 && gljList[i].gljType === 201 ||
+                if(machineAllowComponent.includes(that.currentGlj.gljType) && machineComponent.includes(gljList[i].gljType) ||
+                    materialAllowComponent.includes(that.currentGlj.gljType) && gljList[i].gljType === 201 ||
                     that.currentGlj.gljType === 4 && gljList[i].gljType === 4 && (!gljList[i].component || gljList[i].component.length === 0) && gljList[i].ID !== that.currentGlj.ID){
                     //去除与已添加的组成物重复的条目
                     let isExist = false;
@@ -123,7 +120,6 @@ let componentOprObj = {
     },
     filterDatasAndShow: function () {
         let me = componentOprObj, re = repositoryGljObj;
-        let materialArr = [202, 203, 204];//混凝土、砂浆、配合比, 201普通材料
         let val = $("input[name='glj']:checked").val();
         me.radiosSelected = val;
         //选择改变,数据重新筛选显示
@@ -164,20 +160,10 @@ let componentOprObj = {
     //监听radios选择事件
     radiosChange: function () {
         let me = componentOprObj, re = repositoryGljObj;
-        let materialArr = [202, 203, 204];//混凝土、砂浆、配合比, 201普通材料
         $('.glj-radio').change(function () {
             me.filterDatasAndShow();
         });
     },
-
-    //获得选择的组成物
-    getComponents: function () {
-        let rst = [];
-        let me = componentOprObj;
-        for(let i = 0; i < me.showGljList.length; i++){
-
-        }
-    },
     getParentCache: function (nodes) {
         let me = componentOprObj, rst = [];
         for(let i = 0; i < me.showGljList.length; i++){

+ 80 - 30
web/building_saas/complementary_glj_lib/js/glj.js

@@ -35,11 +35,10 @@ let repositoryGljObj = {
     gljList: [],
     stdGljList:[],
     complementaryGljList: [],
-    allowComponent: [202, 203, 204, 301, 4],//可带组成物类型:混凝土、砂浆、配合比、机械台班、主材
-    componentGljType: [201, 302, 303, 4],//可成为组成物的工料机类型: 普通材料、 机械组成物、 机上人工、主材
+    machineModel: {textArr: ['特', '大', '中', '小'], comboItems: [{text: '特', value: 1}, {text: '大', value: 2},{text: '中', value: 3}, {text: '小', value: 4}]},
+    machineModelIdx: {'1': '特', '2': '大', '3': '中', '4': '小'},
     distTypeTree: null,//add
     setting: {
-
         header:[
             {headerName:"编码",headerWidth:80,dataCode:"code", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"},
             {headerName:"名称",headerWidth:160,dataCode:"name", dataType: "String", hAlign: "left", vAlign: "center"},
@@ -47,6 +46,7 @@ let repositoryGljObj = {
             {headerName:"单位",headerWidth:45,dataCode:"unit", dataType: "String", hAlign: "center", vAlign: "center"},
             {headerName:"定额价",headerWidth:80,dataCode:"basePrice", dataType: "Number", formatter: "0.00", hAlign: "right", vAlign: "center"},
             {headerName:"类型",headerWidth:90,dataCode:"gljType", dataType: "String", hAlign: "center", vAlign: "center"},
+            {headerName:"机型",headerWidth:60,dataCode:"model", dataType: "Number", hAlign: "center", vAlign: "center"},
             {headerName:"是否新增",headerWidth:60,dataCode:"isComplementary", hAlign: "center", vAlign: "center"}
         ],
         view:{
@@ -86,16 +86,20 @@ let repositoryGljObj = {
                 data: typeData,
                 children: [],
                 parent: null
+            };
+            if(allowGljType.includes(typeData.ID)){
+                distTypeTree.distTypes[distTypeTree.prefix + typeData.ID] = typeObj;
+                distTypeTree.distTypesArr.push(typeObj);
             }
-            distTypeTree.distTypes[distTypeTree.prefix + typeData.ID] = typeObj;
-            distTypeTree.distTypesArr.push(typeObj);
         });
         gljDistType.forEach(function (typeData) {
-            distType = distTypeTree.distTypes[distTypeTree.prefix + typeData.ID];
-            let parent = distTypeTree.distTypes[distTypeTree.prefix + typeData.ParentID];
-            if(parent){
-                distType.parent = parent;
-                parent.children.push(distType);
+            if(allowGljType.includes(typeData.ID)){
+                distType = distTypeTree.distTypes[distTypeTree.prefix + typeData.ID];
+                let parent = distTypeTree.distTypes[distTypeTree.prefix + typeData.ParentID];
+                if(parent){
+                    distType.parent = parent;
+                    parent.children.push(distType);
+                }
             }
         });
         distTypeTree.distTypesArr.forEach(function (distTypeObj) {
@@ -164,8 +168,10 @@ let repositoryGljObj = {
                 }
             }
             sheetOpr.cleanData(me.workBook.getSheet(0), me.setting, -1);
-            sheetOpr.showData(me.workBook.getSheet(0), me.setting, cacheSection, me.distTypeTree);
+            sheetOpr.showData(me.workBook.getSheet(0), me.setting, cacheSection, me.distTypeTree, me.machineModelIdx);
             sheetCommonObj.setDynamicCombo(me.workBook.getActiveSheet(), 0, 5, me.workBook.getActiveSheet().getRowCount(), me.distTypeTree.comboDatas, false, 'text');
+            sheetCommonObj.setDynamicCombo(me.workBook.getActiveSheet(), 0, 6, me.workBook.getActiveSheet().getRowCount(), me.machineModel.comboItems, false, 'text');
+
 
             cacheSection = null;
         }
@@ -334,7 +340,7 @@ let repositoryGljObj = {
             if(row < me.currentCache.length){
                 //标记当前工料机
                 me.currentGlj = me.currentCache[row];
-                if(me.allowComponent.indexOf(me.currentCache[row].gljType) !== -1){
+                if(allowComponent.includes(me.currentCache[row].gljType)){
                     //展示数据
                     if(me.currentGlj.component.length > 0){
                         me.currentComponent = me.getCurrentComponent(me.currentGlj.component);
@@ -430,8 +436,8 @@ let repositoryGljObj = {
         me.orgCode = me.workBook.getSheet(0).getValue(args.row, 0);
         if(args.row < me.currentCache.length){
             me.currentGlj = me.currentCache[args.row];
-            if(args.col === 0 || (args.col === 4 && me.allowComponent.indexOf(me.currentGlj.gljType) !== -1 && me.currentGlj.component.length > 0)
-                || args.col === 6){
+            if(args.col === 0 || (args.col === 4 && allowComponent.includes(me.currentGlj.gljType) && me.currentGlj.component.length > 0)
+                || (args.col === 6 && me.currentGlj.gljType !== 301) || args.col === 7){
                 args.cancel = true;
             }
             else {
@@ -467,19 +473,24 @@ let repositoryGljObj = {
                                /* if(me.allowComponent.indexOf(rObj.gljType) !== -1){
                                     rObj.basePrice = 0;
                                 }*/
-                                if(me.componentGljType.indexOf(me.currentEditingGlj.gljType) !== -1 &&
-                                    !(me.currentEditingGlj.gljType === 302 && rObj.gljType === 303) && !(me.currentEditingGlj.gljType === 303 && rObj.gljType === 302)){//修改了原本是组成物的工料机
-                                    //寻找所有引用了此组成物的工料机,并从组成物中删去此工料机,并重算单价
-                                    let updateGljs = me.getUpdateGljs(rObj, true);
-                                    if(updateGljs.updateArr.length > 0 || updateGljs.updateBasePrcArr.length > 0){
-                                        for(let i = 0; i < updateGljs.updateArr.length; i++){
-                                            updateArr.push(updateGljs.updateArr[i]);
-                                        }
-                                        for(let i = 0; i < updateGljs.updateBasePrcArr.length; i++){
-                                            updateArr.push(updateGljs.updateBasePrcArr[i]);
-                                        }
+                            //工料机类型不为机械台班时,清空机型
+                            if(me.currentEditingGlj.gljType === 301 && rObj.gljType !== 301 && me.currentEditingGlj.model){
+                                rObj.model = null;
+                            }
+                            if(componentType.includes(me.currentEditingGlj.gljType) &&
+                                !(machineComponent.includes(me.currentEditingGlj.gljType) && machineComponent.includes(rObj.gljType))
+                                && !(materialComponent.includes(me.currentEditingGlj.gljType) && materialComponent.includes(rObj.gljType))){//修改了原本是组成物的工料机
+                                //寻找所有引用了此组成物的工料机,并从组成物中删去此工料机,并重算单价
+                                let updateGljs = me.getUpdateGljs(rObj, true);
+                                if(updateGljs.updateArr.length > 0 || updateGljs.updateBasePrcArr.length > 0){
+                                    for(let i = 0; i < updateGljs.updateArr.length; i++){
+                                        updateArr.push(updateGljs.updateArr[i]);
+                                    }
+                                    for(let i = 0; i < updateGljs.updateBasePrcArr.length; i++){
+                                        updateArr.push(updateGljs.updateBasePrcArr[i]);
                                     }
                                 }
+                            }
                             sheetOpr.cleanData(that.workBook.getSheet(0), that.setting, 5);
                         }
                         else if(rObj.basePrice !== me.currentEditingGlj.basePrice){//修改了单价,可修改单价的必为可成为组成物的
@@ -610,7 +621,7 @@ let repositoryGljObj = {
                                     for(let col = sels[i].col; col <= maxCol; col++){
                                         if(me.setting.header[col].dataCode === 'basePrice'){
                                             //如果类型不为混凝土、砂浆、配合比、机械,才可删除单价 basePrice = 0
-                                            if(me.allowComponent.indexOf(updateObj.gljType) === -1){
+                                            if(!allowComponent.includes(updateObj.gljType)){
                                                 canUpdate = true;
                                                 updateObj[me.setting.header[col].dataCode] = 0;
                                                 updateBasePrcArr.push({gljId: updateObj.ID, gljType: updateObj.gljType, basePrice: 0});
@@ -717,9 +728,12 @@ let repositoryGljObj = {
                     pasteObj.gljType = me.distTypeTree.comboDatas[i].value;
                     isExsit = true;
                     reCalBasePrc = true;
-                    //
-                    if(me.componentGljType.indexOf(tempObj.gljType) !== -1 &&
-                        !(tempObj.gljType === 302 && pasteObj.gljType === 303) && !(tempObj.gljType === 303 && pasteObj.gljType === 302)){//修改了原本是组成物的工料机
+                    if(pasteObj.gljType !== 301 && tempObj.gljType === 301){
+                        tempObj.model = null;
+                    }
+                    if(componentType.includes(tempObj.gljType)&&
+                        !(machineComponent.includes(tempObj.gljType) && machineComponent.includes(pasteObj.gljType)) &&
+                        !(materialComponent.includes(tempObj.gljType) && materialComponent.includes(pasteObj.gljType))){//修改了原本是组成物的工料机
                         //寻找所有引用了此组成物的工料机,并从组成物中删去此工料机,并重算单价
                         let updateGljs = me.getUpdateGljs(tempObj, true);
                         if(updateGljs.updateArr.length > 0 || updateGljs.updateBasePrcArr.length > 0){
@@ -758,6 +772,29 @@ let repositoryGljObj = {
                 }
             }
         }
+        if(typeof pasteObj.model !== 'undefined'){
+            if(!me.machineModel.textArr.includes(pasteObj.model)){
+                isValid = false;
+            }
+            else {
+                let existsModel = false;
+                if((typeof pasteObj.gljType !== 'undefined' && pasteObj.gljType === 301) ||
+                    (tempObj.gljType && tempObj.gljType === 301)){
+                    me.machineModel.comboItems.forEach(function (item) {
+                        if(item.text === pasteObj.model){
+                            tempObj.model = item.value;
+                            existsModel = true;
+                        }
+                    });
+                    if(!existsModel){
+                        isValid = false;
+                    }
+                }
+                else {
+                    isValid = false;
+                }
+            }
+        }
         if(isValid){
             rst.updateGlj.push(tempObj);
             if(reCalBasePrc){
@@ -808,6 +845,16 @@ let repositoryGljObj = {
             }
 
         }
+        if(typeof pasteObj.model !== 'undefined' && pasteObj.model){
+            if(!me.machineModel.textArr.includes(pasteObj.model) || pasteObj.gljType !== 301){
+                return false;
+            }
+            me.machineModel.comboItems.forEach(function (item) {
+                if(item.text === pasteObj.model){
+                    pasteObj.model = item.value;
+                }
+            });
+        }
         pasteObj.basePrice = !isNaN(parseFloat(pasteObj.basePrice)) && (pasteObj.basePrice && typeof pasteObj.basePrice !== 'undefined') ? parseFloat(pasteObj.basePrice) : 0;
         if(!me.parentNodeIds["_pNodeId_" + me.gljCurTypeId]){
             pasteObj.gljClass = me.gljCurTypeId;
@@ -831,7 +878,7 @@ let repositoryGljObj = {
                 for(let i = 0, len = info.cellRange.rowCount; i < len; i++){
                     let row = i + info.cellRange.row;
                     if(row < me.currentCache.length){
-                        if(me.allowComponent.indexOf(me.currentCache[row].gljType) !== -1){
+                        if(allowComponent.includes(me.currentCache[row].gljType)){
                             rst = false;
                         }
                     }
@@ -924,6 +971,9 @@ let repositoryGljObj = {
                             let gljType = me.currentCache[resumeArr[i]][me.setting.header[col].dataCode];
                             sheet.setValue(resumeArr[i], col, me.distTypeTree.distTypes["gljType" + gljType].data.fullName);
                         }
+                        else if(me.setting.header[col].dataCode === 'model'){
+                            sheet.setValue(resumeArr[i], col, me.currentCache[resumeArr[i]][me.setting.header[col].dataCode] ? me.machineModelIdx[me.currentCache[resumeArr[i]][me.setting.header[col].dataCode]]: '');
+                        }
                         else{
                             sheet.setValue(resumeArr[i], col, me.currentCache[resumeArr[i]][me.setting.header[col].dataCode]);
                         }

+ 2 - 2
web/building_saas/complementary_glj_lib/js/gljComponent.js

@@ -71,7 +71,7 @@ let gljComponentOprObj = {
                     //控制按钮是否可用
                     let insertDis = false,
                         delDis = false;
-                    if(!(that.currentGlj && that.allowComponent.indexOf(that.currentGlj.gljType) !== -1) || (that.currentGlj.gljType === 4 && that.isComponent(that.currentGlj.ID, that.stdGljList.concat(that.complementaryGljList)))){
+                    if(!(that.currentGlj && allowComponent.includes(that.currentGlj.gljType)) || (that.currentGlj.gljType === 4 && that.isComponent(that.currentGlj.ID, that.stdGljList.concat(that.complementaryGljList)))){
                         insertDis = true;
                     }
                     if(!that.currentGlj || typeof that.currentComponent === 'undefined' || (typeof that.currentComponent !== 'undefined' && target.row >= that.currentComponent.length)){//右键定位在有组成物的行,删除键才显示可用
@@ -211,7 +211,7 @@ let gljComponentOprObj = {
         let thatRow = that.workBook.getSheet(0).getSelections()[0].row;
         if(thatRow < that.currentCache.length){
             that.currentGlj = that.currentCache[thatRow];
-            if(me.setting.view.lockedCols.indexOf(args.col) !== -1 || that.allowComponent.indexOf(that.currentGlj.gljType) === -1 ||
+            if(me.setting.view.lockedCols.indexOf(args.col) !== -1 || !allowComponent.includes(that.currentGlj.gljType) ||
                 (that.currentGlj.gljType === 4 && that.isComponent(that.currentGlj.ID, that.stdGljList.concat(that.complementaryGljList))) ||
                 (args.col === 4 && (!that.currentComponent|| args.row >= that.currentComponent.length))){
                 args.cancel = true;

+ 12 - 1
web/building_saas/complementary_glj_lib/js/sheetOpr.js

@@ -111,7 +111,7 @@ let sheetOpr = {
             area.vAlign(GC.Spread.Sheets.VerticalAlign.center);
         }
     },
-    showData: function(sheet, setting, data, distTypeTree) {
+    showData: function(sheet, setting, data, distTypeTree, machineModelIdx) {
         var me = this, ch = GC.Spread.Sheets.SheetArea.viewport;
         sheet.suspendPaint();
         sheet.suspendEvent();
@@ -139,6 +139,9 @@ let sheetOpr = {
                     let distTypeVal =  distTypeTree.distTypes[distTypeTree.prefix + data[row].gljType].data.fullName;
                     sheet.setValue(row, col, distTypeVal, ch);
                 }
+                else if(setting.header[col].dataCode === 'model' && data[row].model){
+                    sheet.setValue(row, col, machineModelIdx ? machineModelIdx[data[row].model] : '');
+                }
                 else {
                     sheet.setValue(row, col, data[row][setting.header[col].dataCode], ch);
                     sheet.setTag(row, 0, data[row].ID, ch);
@@ -195,6 +198,7 @@ let sheetOpr = {
         var rst = {};
         let comboBoxCellType = sheet.getCellType(row, 5);
         let items = comboBoxCellType.items();
+        let machineItems = sheet.getCellType(row, 6).items();
         for (var col = 0; col < setting.header.length; col++) {
             if(setting.header[col].dataCode === 'gljType'){
                 items.forEach(function(item){
@@ -206,6 +210,13 @@ let sheetOpr = {
                     }
                 });
             }
+            else if(setting.header[col].dataCode === 'model'){
+                machineItems.forEach(function(item){
+                    if(sheet.getValue(row, col) === item.text){
+                        rst[setting.header[col].dataCode] = item.value;
+                    }
+                });
+            }
             else if (setting.header[col].dataCode === 'code'){
                 if(repositoryGljObj){
                     let stdGljList = repositoryGljObj.stdGljList,

+ 32 - 2
web/over_write/js/chongqing_2018.js

@@ -1,7 +1,7 @@
 /**
  * Created by zhang on 2018/8/14.
  */
-if(gljType){
+if(typeof gljType !== 'undefined'){
     gljType = {
         LABOUR: 1,// 人工
         GENERAL_MATERIAL: 201, // 普通材料
@@ -25,11 +25,41 @@ if(gljType){
     };
 }
 
-if(projectGljObject){
+if(typeof projectGljObject !== 'undefined'){
     projectGljObject.displayTypeMap=[
         {ID:'LABOUR',text:'人工'},
         {ID:'GENERAL_MATERIAL',text:'材料'},
         {ID:'GENERAL_MACHINE',text:'施工机具'},//重庆2018定额中去掉了主材,机械的显示改为了施工机具
         {ID:'MAIN_MATERIAL',text:'主材'}
     ];
+}
+
+//允许使用的工料机类型:人工、普通材料、混凝土、砂浆、配合比、商品混凝土、商品砂浆、其他材料费、机械台班、机上人工、机械组成物、仪器仪表、燃料动力费、折旧费、
+// 检修费、维护费、安拆费及场外运费、校验费、其他费用、主材、企业管理费、利润、一般风险费
+if(typeof allowGljType !== 'undefined'){
+    allowGljType = [1, 201, 202, 203, 204, 205, 206, 207, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 4, 6, 7, 8];
+}
+if(typeof allowComponent !== 'undefined'){
+    //允许含有组成物的工料机类型:混凝土、砂浆、配合比、机械台班、仪器仪表、主材
+    allowComponent = [202, 203, 204, 301, 304, 4];
+}
+if(typeof componentType !== 'undefined'){
+    //可以作为组成物的工料机类型:普通材料、机械组成物、机上人工、燃料动力费、折旧费、检修费、维护费、安拆费及场外运费、校验费、其他费用、主材
+    componentType = [201, 302, 303, 305, 306, 307, 308, 309, 310, 311, 4];
+}
+if(typeof machineAllowComponent !== 'undefined'){
+    //允许含有组成物的机械工料机类型:机械台班、仪器仪表
+    machineAllowComponent = [301, 304];
+}
+if(typeof machineComponent !== 'undefined'){
+    //可以作为机械工料机组成物的工料机类型:机械组成物、机上人工、燃料动力费、折旧费、检修费、维护费、安拆费及场外运费、校验费、其他费用
+    machineComponent = [302, 303, 305, 306, 307, 308, 309, 310, 311];
+}
+if(typeof materialAllowComponent !== 'undefined'){
+    //允许含有组成物的材料工料机类型:混凝土、砂浆、配合比
+    materialAllowComponent = [202, 203, 204];
+}
+if(typeof materialComponent !== 'undefined'){
+    //可以作为材料工料机组成物的工料机类型:普通材料
+    materialComponent = [201];
 }