'use strict';

/**
 *
 *
 * @author Mai
 * @date
 * @version
 */

const parseInfo = ['deal_info', 'construction_unit', 'tech_param', 'decimal', 'precision', 'deal_param', 'display', 'chapter'];
const defaultInfo = {
    // 合同信息
    deal_info: {
        buildName: '',
        dealCode: '',
        dealName: '',
    },
    // 参建单位
    construction_unit: {
        build: {
            company: '',
            corporation: '',
            date: '',
        },
        contract1: {
            company: '',
            corporation: '',
            date: '',
        },
        contract2: {
            company: '',
            corporation: '',
            date: '',
        },
        supervision1: {
            company: '',
            corporation: '',
            date: '',
        },
        supervision2: {
            company: '',
            corporation: '',
            date: '',
        },
    },
    // 技术参数
    tech_param: {
        loadLevel: 0,
        loadLength: 0,
        startPeg: '',
        endPeg: '',
        laneCount: 0,
        dealPeriod: '',
        startDate: '',
        planEndDate: '',
    },
    // 小数位数
    decimal: {
        up: 2,
        qty: 3,
        tp: 0,
        pay: false,
        payTp: 0,
    },
    precision: {
        t: { unit: 't', value: 3 },
        km: { unit: 'km', value: 3 },
        m: { unit: 'm', value: 3 },
        m2: { unit: 'm2', value: 2 },
        m3: { unit: 'm3', value: 2 },
        kg: { unit: 'kg', value: 2 },
        ge: { unit: '个', value: 0 },
        tai: { unit: '台', value: 0 },
        tao: { unit: '套', value: 0 },
        ke: { unit: '棵', value: 0 },
        zu: { unit: '组', value: 0 },
        xitong: { unit: '系统', value: 0 },
        other: { value: 3 },
    },
    // 合同参数
    deal_param: {
        contractPrice: 0,
        zanLiePrice: 0,
        startAdvance: 0,
        materialAdvance: 0,
    },
    // 显示设置
    display: {
        ledger: {
            dgnQty: false,
            clQty: false,
        },
    },
    chapter: [
        {code: '100', name: '总则'},
        {code: '200', name: '路基'},
        {code: '300', name: '路面'},
        {code: '400', name: '桥梁、涵洞'},
        {code: '500', name: '隧道'},
        {code: '600', name: '安全设施及预埋管线'},
        {code: '700', name: '绿化及环境保护'},
        {code: '800', name: '机电工程'},
        {code: '900', name: '房建工程'},
        {code: '1000', name: '收费系统'},
        {code: '1100', name: '通信系统'},
        {code: '1200', name: '消防系统'},
        {code: '1300', name: '供配电及照明系统'},
    ]
};

module.exports = {
    parseInfo,
    defaultInfo,
};
