/**
 * Created by zhang on 2018/8/14.
 */

if(typeof projectGljObject !== 'undefined'){
    projectGljObject.displayTypeMap=[
        {ID:'LABOUR',text:'人工'},
        {ID:'GENERAL_MATERIAL',text:'材料'},
        {ID:'GENERAL_MACHINE',text:'施工机具'},//重庆2018定额中去掉了主材，机械的显示改为了施工机具
        {ID:'MAIN_MATERIAL',text:'主材'}
    ];
    $('#menu_index_info').show();
    //2020-11-06 暂时去掉主城区加载通用 
  projectGljObject.addCommonInfoPriceID = function (condition) { 
    if(condition.areaID != projectGljObject.commonInfoPriceID) condition.commonInfoPriceID = projectGljObject.commonInfoPriceID;
  }
}
if(typeof gljUtil !== 'undefined'){
    gljUtil.hasCompMachine = [301,304];//有组成物的机械
    gljUtil.machineComposition = [303,305,306,307,308,309,310,311];//可以做为机械组成物的类型
}

//允许使用的工料机类型：人工、普通材料、混凝土、砂浆、配合比、商品混凝土、商品砂浆、其他材料费、机械台班、机上人工、仪器仪表、燃料动力费、折旧费、
// 检修费、维护费、安拆费及场外运费、校验费、其他费用、主材、设备、企业管理费、利润、一般风险费  前端工料机库编辑器下拉列表没有用到这个
if(typeof allowGljType !== 'undefined'){
    allowGljType = [1, 201, 202, 203, 204, 205, 206, 207, 301, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 4,5,6, 7, 8];
}
if(typeof allowComponent !== 'undefined'){
    //允许含有组成物的工料机类型：混凝土、砂浆、配合比、机械台班、仪器仪表、主材
    allowComponent = [202, 203, 204, 301, 304, 4];
}
if(typeof componentType !== 'undefined'){
    //可以作为组成物的工料机类型：普通材料、机上人工、燃料动力费、折旧费、检修费、维护费、安拆费及场外运费、校验费、其他费用、主材
    componentType = [201, 303, 305, 306, 307, 308, 309, 310, 311, 4];
}
if(typeof machineAllowComponent !== 'undefined'){
    //允许含有组成物的机械工料机类型：机械台班、仪器仪表
    machineAllowComponent = [301, 304];
}
if(typeof machineComponent !== 'undefined'){
    //可以作为机械工料机组成物的工料机类型：机械组成物、机上人工、燃料动力费、折旧费、检修费、维护费、安拆费及场外运费、校验费、其他费用
    machineComponent = [303, 305, 306, 307, 308, 309, 310, 311];
}
if(typeof materialAllowComponent !== 'undefined'){
    //允许含有组成物的材料工料机类型：混凝土、砂浆、配合比
    materialAllowComponent = [202, 203, 204];
}
if(typeof materialComponent !== 'undefined'){
    //可以作为材料工料机组成物的工料机类型：普通材料
    materialComponent = [201];
}

// CSL, 2018-08-21 计算程序、基数 的覆盖。---------------------------------------------------------------------------------
let isCQ2018 = true;

if(typeof baseMaterialTypes !== 'undefined') baseMaterialTypes.push(gljType.OTHER_MATERIAL);

if(typeof baseMachineMasterTypes !== 'undefined') baseMachineMasterTypes.push(gljType.INSTRUMENT);
if(typeof baseMachineTypes !== 'undefined'){
  _.pull(baseMachineTypes,gljType.MACHINE_COMPOSITION);
  //baseMachineTypes.delete(gljType.MACHINE_COMPOSITION);
  baseMachineTypes.push(gljType.INSTRUMENT, gljType.FUEL_POWER_FEE, gljType.DEPRECIATION_FEE,
      gljType.INSPECTION_FEE, gljType.MAINTENANCE, gljType.DISMANTLING_FREIGHT_FEE,
      gljType.VERIFICATION_FEE, gljType.OTHER_FEE, gljType.OTHER_MACHINE_USED);
}

function overwriteRationCalcBases (taxType){
    if (rationCalcBases){
        for (let key in rationCalcBases) {
            delete rationCalcBases[key];
        };
        let isJY = taxType == '2';

        rationCalcBases['定额人工费'] = function (node, isTender) {
            return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptBasePrice, isTender);
        };
        rationCalcBases['定额材料费'] = function (node, isTender) {
            return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptBasePrice, isTender);
        };
        rationCalcBases['定额其他材料费'] = function (node, isTender) {
            return calcTools.rationBaseFee(node, [gljType.OTHER_MATERIAL], priceTypes.ptBasePrice, isTender);
        };
        rationCalcBases['定额施工机具使用费'] = function (node, isTender) {
            return calcTools.rationBaseFee(node, [gljType.GENERAL_MACHINE, gljType.INSTRUMENT, gljType.OTHER_MACHINE_USED], priceTypes.ptBasePrice, isTender);
        };
        rationCalcBases['市场价主材费'] = function (node, isTender) {
            return calcTools.rationBaseFee(node, [gljType.MAIN_MATERIAL], priceTypes.ptMarketPrice, isTender);
        };
        rationCalcBases['市场价设备费'] = function (node, isTender) {
            return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptMarketPrice, isTender);
        };
        rationCalcBases['人工工日'] = function (node, isTender) {
            return calcTools.labourDays(node, isTender);
        };
        rationCalcBases['人工费价差'] = function (node, isTender) {
            return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptDiffPrice, isTender);
        };
        rationCalcBases['材料费价差'] = function (node, isTender) {
            return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptDiffPrice, isTender);
        };
/*        if (isJY){
            rationCalcBases['计价材料价差'] = function (node, isTender) {
                let baseMaterialTypesWithoutOtherMaterial = [
                    gljType.GENERAL_MATERIAL,
                    gljType.CONCRETE,
                    gljType.MORTAR,
                    gljType.MIX_RATIO,
                    gljType.COMMERCIAL_CONCRETE,
                    gljType.COMMERCIAL_MORTAR
                ];
                return calcTools.rationBaseFee(node, baseMaterialTypesWithoutOtherMaterial, priceTypes.ptDiffPrice, isTender);
            };
        };*/
        rationCalcBases['机上人工费价差'] = function (node, isTender) {
            return calcTools.rationBaseFee(node, [gljType.MACHINE_LABOUR], priceTypes.ptDiffPrice, isTender);
        };
        rationCalcBases['燃料动力费价差'] = function (node, isTender) {
            return calcTools.rationBaseFee(node, [gljType.FUEL_POWER_FEE], priceTypes.ptDiffPrice, isTender);
        };
        if (isJY) {
            rationCalcBases['定额其他施工机具使用费'] = function (node, isTender) {
                return calcTools.rationBaseFee(node, [gljType.OTHER_MACHINE_USED], priceTypes.ptBasePrice, isTender);
            };
            rationCalcBases['机械折旧费'] = function (node, isTender) {
                return calcTools.machineDetailFee(node, node.data.gljList, [], gljType.DEPRECIATION_FEE, isTender);
            };
            rationCalcBases['特大机械检修费'] = function (node, isTender) {
                return calcTools.machineDetailFee(node, node.data.gljList, [1, 2], gljType.INSPECTION_FEE, isTender);
            };
            rationCalcBases['中小机械检修费'] = function (node, isTender) {
                return calcTools.machineDetailFee(node, node.data.gljList, [3, 4], gljType.INSPECTION_FEE, isTender);
            };
            rationCalcBases['特大机械维护费'] = function (node, isTender) {
                return calcTools.machineDetailFee(node, node.data.gljList, [1, 2], gljType.MAINTENANCE, isTender);
            };
            rationCalcBases['中小机械维护费'] = function (node, isTender) {
                return calcTools.machineDetailFee(node, node.data.gljList, [3, 4], gljType.MAINTENANCE, isTender);
            };
            rationCalcBases['安拆费及场外运输费'] = function (node, isTender) {
                return calcTools.machineDetailFee(node, node.data.gljList, [], gljType.DISMANTLING_FREIGHT_FEE, isTender);
            };
/*            rationCalcBases['燃料动力费'] = function (node, isTender) {
                return calcTools.machineDetailFee(node, node.data.gljList, [], gljType.FUEL_POWER_FEE, isTender);
            };*/
            rationCalcBases['定额仪器仪表费'] = function (node, isTender) {
                return calcTools.rationBaseFee(node, [gljType.INSTRUMENT], priceTypes.ptBasePrice, isTender);
            };
        };
        rationCalcBases['建筑面积'] = function (node, isTender) {
            return calcTools.getProjectFeatureProperty('buildingArea');
        };
        rationCalcBases['甲供定额人工费'] = function (node, isTender) {
            return calcTools.partASupplyFee(node, '甲供定额人工费', isTender);
        };
        rationCalcBases['甲供定额材料费'] = function (node, isTender) {
            return calcTools.partASupplyFee(node, '甲供定额材料费', isTender);
        };
        rationCalcBases['甲供定额施工机具费'] = function (node, isTender) {
            return calcTools.partASupplyFee(node, '甲供定额施工机具费', isTender);
        };
        rationCalcBases['甲供主材费'] = function (node, isTender) {
            return calcTools.partASupplyFee(node, '甲供主材费', isTender, false);
        };
        rationCalcBases['甲定定额人工费'] = function (node, isTender) {
            return calcTools.partASupplyFee(node, '甲定定额人工费', isTender);
        };
        rationCalcBases['甲定定额材料费'] = function (node, isTender) {
            return calcTools.partASupplyFee(node, '甲定定额材料费', isTender);
        };
        rationCalcBases['甲定定额施工机具费'] = function (node, isTender) {
            return calcTools.partASupplyFee(node, '甲定定额施工机具费', isTender);
        };
        rationCalcBases['甲定主材费'] = function (node, isTender) {
            return calcTools.partASupplyFee(node, '甲定主材费', isTender, false);
        };
        rationCalcBases['暂估材料费'] = function (node, isTender) {
            return calcTools.estimateFee(node, true, isTender);
        };
        rationCalcBases['分包定额人工费'] = function (node, isTender) {
            if (node.data.isSubcontract)
                return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptBasePrice, isTender)
            else
                return 0;
        };
        rationCalcBases['分包定额材料费'] = function (node, isTender) {
            if (node.data.isSubcontract)
                return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptBasePrice, isTender)
            else
                return 0;
        };
        rationCalcBases['分包定额机械费'] = function (node, isTender) {
            if (node.data.isSubcontract)
                return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptBasePrice, isTender)
            else
                return 0;
        };
        rationCalcBases['分包主材费'] = function (node, isTender) {
            if (node.data.isSubcontract)
                return calcTools.rationBaseFee(node, [gljType.MAIN_MATERIAL], priceTypes.ptMarketPrice, isTender)
            else
                return 0;
        };
        rationCalcBases['分包设备费'] = function (node, isTender) {
            if (node.data.isSubcontract)
                return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptMarketPrice, isTender)
            else
                return 0;
        };
        rationCalcBases['分包人工工日'] = function (node, isTender) {
            if (node.data.isSubcontract)
                return calcTools.labourDays(node, isTender)
            else
                return 0;
        };
    };
};
//code为标准接口所需，值是字典规定的
(function overwriteFeeTypes() {
    if (typeof cpFeeTypes == 'undefined') return;
    cpFeeTypes = [
        {type: 'rationUnitPrice', name: '定额综合单价', code: '1800'},
        {type: 'labour', name: '人工费', code: '101'},
        {type: 'material', name: '材料费', code: '201'},
        {type: 'machine', name: '施工机具使用费', code: '301'},
        {type: 'mainMaterial', name: '主材费', code: '501'},
        {type: 'equipment', name: '设备费', code: '502'},
        {type: 'manage', name: '企业管理费', code: '600'},
        {type: 'profit', name: '利润', code: '700'},
        {type: 'risk', name: '一般风险费', code: '1000'},
        {type: 'labourDiff', name: '人工价差', code: '104'},
        {type: 'materialDiff', name: '材料价差', code: '203'},
        {type: 'machineDiff', name: '施工机具使用价差', code: '304'},
        {type: 'otherRisk', name: '其他风险费', code: '1800'},
        {type: 'unratedMaterial', name: '未计价材料费', code: '1800'},
        {type: 'organizeMeasures', name: '组织措施费', code: '1200'},
        {type: 'safeCivilization', name: '安全文明施工费', code: '1204'},
        {type: 'document', name: '建设工程竣工档案编制费', code: '10041'},
        {type: 'acceptance', name: '住宅工程质量分户验收费', code: '1206'},
        {type: 'forceFee', name: '规费', code: '800'},
        {type: 'tax', name: '税金', code: '900'},
        {type: 'VAT', name: '增值税', code: '1800'},
        {type: 'surtax', name: '附加税', code: '1800'},
        {type: 'environmentTax', name: '环境保护税', code: '1800'},
        {type: 'common', name: '工程造价', code: '1'}
    ];
})();



//清单计算基数相关
if(typeof baseFigureMap !== 'undefined'){
    baseFigureMap = {
        //与清单直接关联=======
        '分部分项工程费': {base: 'FBFXGCF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
        '分部分项定额人工费': {base: 'FBFXDEJJRGF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
        '分部分项定额材料费': {base: 'FBFXDEJJCLF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
        '分部分项定额施工机具使用费': {base: 'FBFXDEJJJXF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
        '分部分项主材费': {base: 'FBFXZCF', 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: 'ZZCSXMDEJJRGF', fixedFlag: fixedFlag.CONSTRUCTION_ORGANIZATION, class: 'CSXM'},
        '组织措施项目定额材料费': {base: 'ZZCSXMDEJJCLF', fixedFlag: fixedFlag.CONSTRUCTION_ORGANIZATION, class: 'CSXM'},
        '组织措施项目定额施工机具使用费': {base: 'ZZCSXMDEJJJXF', fixedFlag: fixedFlag.CONSTRUCTION_ORGANIZATION, class: 'CSXM'},
        '安全文明施工专项费': {base: 'AQWMSGZXF', fixedFlag: fixedFlag.SAFETY_CONSTRUCTION, class: 'CSXM'},
        '技术措施项目费': {base: 'JSCSXMF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
        '技术措施项目定额人工费': {base: 'JSCSXMDEJJRGF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
        '技术措施项目定额材料费': {base: 'JSCSXMDEJJCLF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
        '技术措施项目定额施工机具使用费': {base: 'JSCSXMDEJJJXF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
        '技术措施项目主材费': {base: 'JSCSXMZCF', 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: 'ZZS', class: 'SJ', fixedFlag: fixedFlag.ADDED_VALUE_TAX},
        //不于清单直接关联==========
        '建筑面积': {base: 'JZMJ', class: 'FBFX'},
        '人材机价差': {base: 'RCJJC', class: 'RCJ'},
        '人工价差': {base: 'RGJC', class: 'RCJ'},
        '材料价差': {base: 'CLJC', class: 'RCJ'},
        '施工机具使用费价差': {base: 'JXJC', class: 'RCJ'},
        '分部分项人材机价差': {base: 'FBFXRCJJC', class: 'RCJ'},
        '分部分项人工价差': {base: 'FBFXRGJC', class: 'RCJ'},
        '分部分项材料价差': {base: 'FBFXCLJC', class: 'RCJ'},
        '分部分项施工机具使用费价差': {base: 'FBFXJXJC', class: 'RCJ'},
        '技术措施项目人材机价差': {base: 'JSCSXMRCJJC', class: 'RCJ'},
        '技术措施项目人工价差': {base: 'JSCSXMRGJC', class: 'RCJ'},
        '技术措施项目材料价差': {base: 'JSCSXMCLJC', class: 'RCJ'},
        '技术措施项目施工机具使用费价差': {base: 'JSCSXMJXJC', class: 'RCJ'},
        '甲供定额人工费': {base: 'JGDEJJRGF', class: 'RCJ'},
        '甲供定额材料费': {base: 'JGDEJJCLF', class: 'RCJ'},
        '甲供定额施工机具使用费': {base: 'JGDEJJJXF', class: 'RCJ'},
        '甲供人工费': {base: 'JGRGF', class: 'RCJ'},
        '甲供材料费': {base: 'JGCLF', class: 'RCJ'},
        '甲供施工机具使用费': {base: 'JGJXF', class: 'RCJ'},
        '甲供主材费': {base: 'JGZCF', class: 'RCJ'},
        '甲定定额人工费': {base: 'JDDEJJRGF', class: 'RCJ'},
        '甲定定额材料费': {base: 'JDDEJJCLF', class: 'RCJ'},
        '甲定定额施工机具使用费': {base: 'JDDEJJJXF', class: 'RCJ'},
        '甲定人工费': {base: 'JDRGF', class: 'RCJ'},
        '甲定材料费': {base: 'JDCLF', class: 'RCJ'},
        '甲定施工机具使用费': {base: 'JDJXF', class: 'RCJ'},
        '甲定主材费': {base: 'JDZCF', class: 'RCJ'},
        '暂估材料费(从子目汇总)': {base: 'ZGCLFFZM', class: 'RCJ'},
        '分包费': {base: 'FBF', class: 'FBF'},
        '分包定额人工费': {base: 'FBDEJJRGF', class: 'FBF'},
        '分包定额材料费': {base: 'FBDEJJCLF', class: 'FBF'},
        '分包定额机械费': {base: 'FBDEJJJXF', class: 'FBF'},
        '分包主材费': {base: 'FBZCF', class: 'FBF'},
        '分包设备费': {base: 'FBSBF', class: 'FBF'},
        '分包人工工日': {base: 'FBRGGR', class: 'FBF'},
        '税前工程造价': {base: 'SQGCZJ', class: 'SQGCZJ',
            cycleCalcRef: [fixedFlag.SUB_ENGINERRING, fixedFlag.OTHER, fixedFlag.CHARGE],   //循环计算相关固定行，由于计算排除了本身，不用判断措施项目
            multiRef: [fixedFlag.SUB_ENGINERRING, fixedFlag.MEASURE, fixedFlag.OTHER, fixedFlag.CHARGE]},//相关固定行
    };
}

function dynamicLoadCalcBase() {
    // 兼容旧数据，旧单位工程可能不存在累进区间
    if (projectObj && projectObj.project.property.progressiveInterval) {
        baseFigureMap['市政道路工程安全文明施工费'] = {
            base: 'SZDLGCAQWMSGF', class: 'CSXM',
            cycleCalcRef: [fixedFlag.SUB_ENGINERRING, fixedFlag.OTHER, fixedFlag.CHARGE],   // 以税前工程造价作为累进基数，因此配置沿用{税前工程造价}
            multiRef: [fixedFlag.SUB_ENGINERRING, fixedFlag.MEASURE, fixedFlag.OTHER, fixedFlag.CHARGE]
        };
        baseFigureMap['市政桥梁工程安全文明施工费'] = {
            base: 'SZQLGCAQWMSGF', class: 'CSXM',
            cycleCalcRef: [fixedFlag.SUB_ENGINERRING, fixedFlag.OTHER, fixedFlag.CHARGE],   // 以税前工程造价作为累进基数，因此配置沿用{税前工程造价}
            multiRef: [fixedFlag.SUB_ENGINERRING, fixedFlag.MEASURE, fixedFlag.OTHER, fixedFlag.CHARGE]
        };
        baseFigureMap['市政隧道工程安全文明施工费'] = {
            base: 'SZSDGCAQWMSGF', class: 'CSXM',
            cycleCalcRef: [fixedFlag.SUB_ENGINERRING, fixedFlag.OTHER, fixedFlag.CHARGE],   // 以税前工程造价作为累进基数，因此配置沿用{税前工程造价}
            multiRef: [fixedFlag.SUB_ENGINERRING, fixedFlag.MEASURE, fixedFlag.OTHER, fixedFlag.CHARGE]
        };
        baseFigureMap['城轨盾构工程安全文明施工费'] = {
            base: 'CGDGGCAQWMSGF', class: 'CSXM',
            cycleCalcRef: [fixedFlag.SUB_ENGINERRING, fixedFlag.OTHER, fixedFlag.CHARGE],   // 以税前工程造价作为累进基数，因此配置沿用{税前工程造价}
            multiRef: [fixedFlag.SUB_ENGINERRING, fixedFlag.MEASURE, fixedFlag.OTHER, fixedFlag.CHARGE]
        };
        baseFigureMap['城轨高架桥工程安全文明施工费'] = {
            base: 'CGGJQGCAQWMSGF', class: 'CSXM',
            cycleCalcRef: [fixedFlag.SUB_ENGINERRING, fixedFlag.OTHER, fixedFlag.CHARGE],   // 以税前工程造价作为累进基数，因此配置沿用{税前工程造价}
            multiRef: [fixedFlag.SUB_ENGINERRING, fixedFlag.MEASURE, fixedFlag.OTHER, fixedFlag.CHARGE]
        };
        baseFigureMap['城轨地下工程安全文明施工费'] = {
            base: 'CGDXGCAQWMSGF', class: 'CSXM',
            cycleCalcRef: [fixedFlag.SUB_ENGINERRING, fixedFlag.OTHER, fixedFlag.CHARGE],   // 以税前工程造价作为累进基数，因此配置沿用{税前工程造价}
            multiRef: [fixedFlag.SUB_ENGINERRING, fixedFlag.MEASURE, fixedFlag.OTHER, fixedFlag.CHARGE]
        };
        baseFigureMap['城轨轨道工程安全文明施工费'] = {
            base: 'CGGDGCAQWMSGF', class: 'CSXM',
            cycleCalcRef: [fixedFlag.SUB_ENGINERRING, fixedFlag.OTHER, fixedFlag.CHARGE],   // 以税前工程造价作为累进基数，因此配置沿用{税前工程造价}
            multiRef: [fixedFlag.SUB_ENGINERRING, fixedFlag.MEASURE, fixedFlag.OTHER, fixedFlag.CHARGE]
        };
    }
}

if(typeof baseFigureTemplate !== 'undefined'){
    baseFigureTemplate['ZZS'] =  function (tender) {//增值税
        let feeField = 'common',
            subFeeField = tender ? 'tenderTotalFee' : 'totalFee';
        return cbTools.getBillsFee(fixedFlag.ADDED_VALUE_TAX, feeField, subFeeField);
    };
}
if(typeof figureClassTemplate !== 'undefined'){
    figureClassTemplate['ADDED_VALUE_TAX'] = {flag: fixedFlag.ADDED_VALUE_TAX, filter: ['SJ', 'ZZS', 'SQGCZJ']}
};

if(typeof gljCol !== 'undefined'){
  gljCol.hideInfoPrice = false;
};

//这个文档浏览器库和服务器端共用，所以这个文件中用到的变量都要记得做undefined判断，不然后端读取时会有问题
//=================================================== 前后端分割线 ======================================================================
if(typeof module !== 'undefined'){
    module.exports = {
        getCusCoeContent: getCusCoeContent,
        getCustomerCoeData: getCustomerCoeData
    };
}

function getCusCoeContent() {
    return '人工×1，材料×1，施工机具×1，主材×1，设备×1';//2019-07-08 bug 添加自定义系数添加设备
}

function getCustomerCoeData() {
    return [
        {amount:1, operator:'*', gljCode:null, coeType:'定额'},
        { amount:1, operator:'*', gljCode:null, coeType:'人工'},
        { amount:1, operator:'*', gljCode:null, coeType:'材料'},
        { amount:1, operator:'*', gljCode:null, coeType:'施工机具'},
        { amount:1, operator:'*', gljCode:null, coeType:'主材'},
        { amount:1, operator:'*', gljCode:null, coeType:'设备'}
    ]
}