'use strict'; /** * 标段相关常量 * * @author CaiAoLin * @date 2018/2/5 * @version */ // 标段状态 const status = { APPROVAL: 1, }; const statusString = []; statusString[status.APPROVAL] = '审批中'; // 标段类型 const type = { TJ: 1, XX: 2, YY: 3 }; const infoTableCol = [ { title: '名称', field: 'name', folderCell: true, }, { title: '计量期数', field: 'stageCount', }, { title: '审批状态', field: '', }, { title: '0号台账合同', field: '', }, { title: '本期完成', field: '', }, { title: '截止本期合同', field: '', }, { title: '截止本期变更', field: '', }, { title: '截止本期完成', field: '', }, { title: '截止上期完成', field: '', }, { title: '本期应付', field: '', }, ]; const progressTableCol = [ { title: '名称', field: 'name', folderCell: true, }, { title: '完成期数', field: '', }, { title: '累计合同计量', field: '', }, { title: '截止本期累计完成/本期完成/未完成', field: '', }, ]; const manageTableCol = [ { title: '名称', field: 'name', folderCell: true, }, { title: '完成期数', field: 'stage', }, { title: '管理', field: 'manage', }, ]; const measureType = { tz: { value: 1, name: '0号台账模式', title: ' 0号台账', hint: ' 要求以台账为计量根本,必须先有完整台账才能持续计量。', }, gcl: { value: 2, name: '工程量清单模式', title: ' 工程量清单', hint: ' 仅需要工程量清单,详细台账在计量过程中逐步添加,最终组成完整台账。', }, }; const valuationField = function (mt) { switch (mt) { case measureType.tz.value: return { std_bills: 'bill_id', std_xmj: 'chapter_id', template: 'template_id' }; case measureType.gcl.value: return { std_bills: 'list_bill_id', std_xmj: 'list_chapter_id', template: 'list_template_id' }; default: return null; } }; const imType = { zl: { value: 0, name: '总量控制' }, tz: { value: 1, name: '项目节-清单' }, bw: { value: 2, name: '清单-计量单元' }, bb: { value: 3, name: '计量单元-清单' }, }; const typeString = []; typeString[type.TJ] = '土建标'; typeString[type.XX] = 'XX标'; typeString[type.YY] = 'YY标'; module.exports = { status, statusString, type, typeString, infoTableCol, progressTableCol, manageTableCol, measureType, imType, valuationField, };