/**
 * Created by Zhong on 2017/11/16.
 */

//默认的小数位数,用于定义用户可编辑的字段（入库），用户不可编辑的字段在前端defaultDecima._def中定义即可
const defaultDecimal = {
    bills: { unitPrice: 2, totalPrice: 2 },
    ration: { quantity: 4, unitPrice: 2, totalPrice: 2 },
    glj: { quantity: 4, unitPriceHasMix: 2, unitPrice: 2 },
    feeRate: 3,
    quantity_detail: 4,
    material: 5,//三材系数
    process: 6
};
const displaySetting = {
    autoHeight: true,
    billsAutoHeight: true,
    rationAutoHeight: true,
    disPlayMainMaterial: false
};

const tenderSetting = {
    gljPriceTenderCoe: 1, //工料机单价调整系数
    calcPriceOption: 'priceBase_RCJ'//根据调整系数计算报价
};

const calcOptions = {
    calc_main: false,
    calc_add: true,
    calc_est: true
}
/*
* 单位工程清单工程量精度模板
* */
const billsQuantityDecimal = [
    { unit: '其他未列单位', decimal: 2 },
    { unit: 't', decimal: 3 },
    { unit: '吨', decimal: 3 },
    { unit: 'km', decimal: 3 },
    { unit: '千米', decimal: 3 },
    { unit: 'm', decimal: 2 },
    { unit: '米', decimal: 2 },
    { unit: 'm2', decimal: 2 },
    { unit: '平方米', decimal: 2 },
    { unit: 'm3', decimal: 2 },
    { unit: '立方米', decimal: 2 },
    { unit: 'kg', decimal: 2 },
    { unit: '千克', decimal: 2 },
    { unit: '公斤', decimal: 2 },
    { unit: '元', decimal: 2 },
    { unit: '工日', decimal: 0 },
    { unit: '台班', decimal: 0 },
    { unit: '个', decimal: 0 },
    { unit: '件', decimal: 0 },
    { unit: '根', decimal: 0 },
    { unit: '组', decimal: 0 },
    { unit: '宗', decimal: 0 },
    { unit: '付', decimal: 0 },
    { unit: '处', decimal: 0 },
    { unit: '系统', decimal: 0 },
    { unit: '部', decimal: 0 },
    { unit: '台', decimal: 0 },
    { unit: '辆', decimal: 0 },
    { unit: '套', decimal: 0 },
    { unit: '株', decimal: 0 },
    { unit: '从', decimal: 0 },
    { unit: '缸', decimal: 0 },
    { unit: '支', decimal: 0 },
    { unit: '只', decimal: 0 },
    { unit: '块', decimal: 0 },
    { unit: '座', decimal: 0 },
    { unit: '对', decimal: 0 },
    { unit: '份', decimal: 0 },
    { unit: '樘', decimal: 0 },
    { unit: '攒', decimal: 0 },
    { unit: '榀', decimal: 0 }
];

//项目属性基本信息
const basicInformation = [
    {
        dispName: '基本信息', key: 'basicInfo', items: [
            { dispName: '合同号', key: 'contractNum', value: '' },
            { dispName: '建设地点', key: 'constructionPlace', value: '' },
            { dispName: '质量标准', key: 'qualityStandard', value: '' },
            { dispName: '工程类别', key: 'projectCategory', value: '' },
            { dispName: '建设日期', key: 'constructionDate', value: '' },
            { dispName: '工程规模', key: 'projectScale', value: '' },
            { dispName: '总建筑面积(m2)', key: 'grossArea', value: '' },
            { dispName: '建设单位', key: 'constructionUnit', value: '' },
            { dispName: '设计单位', key: 'designUnit', value: '' },
            { dispName: '施工单位', key: 'buildingUnit', value: '' },
            { dispName: '监理单位', key: 'supervisingUnit', value: '' },
            { dispName: '审核单位', key: 'auditUnit', value: '' },
            { dispName: '建设单位审核人', key: 'constructionUnitAudit', value: '' },
            { dispName: '设计单位负责人', key: 'designUnitPrincipal', value: '' },
            { dispName: '施工单位编制人', key: 'buildingUnitAuthor', value: '' },
            { dispName: '监理单位审核人', key: 'supervisingUnitAuditor', value: '' },
            { dispName: '审核单位审核人', key: 'auditUnitAuditor', value: '' },
            { dispName: '编制时间', key: 'establishDate', value: '' }
        ]
    },
    {
        dispName: '招标信息', key: 'biddingInfo', items: [
            { dispName: '招标人', key: 'bidInviter', value: '' },
            { dispName: '法定代表人或其他授权人', key: 'representative', value: '' },
            { dispName: '造价工程师', key: 'costEngineer', value: '' }
        ]
    },
    {
        dispName: '投标信息', key: 'bidInfo', items: [
            { dispName: '投标人', key: 'bidder', value: '' },
            { dispName: '法定代表人或其授权人', key: 'representative', value: '' },
            { dispName: '造价工程师', key: 'costEngineer', value: '' }
        ]
    },
    {
        dispName: '工程造价咨询信息', key: 'engineeringCostConsultationInfo', items: [
            { dispName: '工程造价咨询人', key: 'consultant', value: '' },
            { dispName: '法定代表人或其授权人', key: 'representative', value: '' },
            { dispName: '造价工程师', key: 'costEngineer', value: '' }
        ]
    }
];

const projectFeature = [
    { dispName: '工程专业', key: 'engineering', value: '' },//只读，用户新建单位工程时选择的值
    { dispName: '工程类型', key: 'projType', value: '' },
    { dispName: '结构类型', key: 'structureType', value: '' },
    { dispName: '基础类型', key: 'baseType', value: '' },
    { dispName: '建筑特征', key: 'buildingFeature', value: '' },
    { dispName: '建筑面积(m2)', key: 'buildingArea', value: '' },
    { dispName: '其中地下室建筑面积(m2)', key: 'basementBuildingArea', value: '' },
    { dispName: '总层数', key: 'totalFloors', value: '' },
    { dispName: '地下室层数(+/-0.00以下)', key: 'basementFloors', value: '' },
    { dispName: '建筑层数(+/-0.00以下)', key: 'buildingFloors', value: '' },
    { dispName: '建筑物总高度(m)', key: 'buildingHeight', value: '' },
    { dispName: '地下室总高度(m)', key: 'basementHeight', value: '' },
    { dispName: '首层高度(m)', key: 'firstFloorHeight', value: '' },
    { dispName: '裙楼高度(m)', key: 'podiumBuildingHeight', value: '' },
    { dispName: '标准层高度(m)', key: 'standardFloorHeight', value: '' },
    { dispName: '基础材料及装饰', key: 'baseMaterial', value: '' },
    { dispName: '楼地面材料及装饰', key: 'flooringMaterial', value: '' },
    { dispName: '外墙材料及装饰', key: 'exteriorWallMaterial', value: '' },
    { dispName: '屋面材料及装饰', key: 'roofingMaterial', value: '' },
    { dispName: '门窗材料及装饰', key: 'doorsWindowsMaterial', value: '' }
];

module.exports = { defaultDecimal, billsQuantityDecimal, basicInformation, projectFeature, displaySetting, calcOptions, tenderSetting };
