/* * @Descripttion: * @Author: vian * @Date: 2021-05-26 17:37:16 */ import { FromType, ITreeScm, SupplyType } from './base'; // 工料机类型 export enum GljType { LABOUR = 1, // 人工 // ==============材料类型 ↓================= MATERIAL = 2, // 材料 GENERAL_MATERIAL = 201, // 普通材料 CONCRETE = 202, // 混凝土 MORTAR = 203, // 砂浆 MIX_RATIO = 204, // 配合比 COMMERCIAL_CONCRETE = 205, // 商品混凝土 COMMERCIAL_MORTAR = 206, // 商品砂浆 OTHER_MATERIAL = 207, // 其它材料 // ==============材料类型 ↑================= // ==============机械类型 ↓================= GENERAL_MACHINE = 301, // 机械台班 MACHINE_COMPOSITION = 302, // 机械组成物 MACHINE_LABOUR = 303, // 机上人工 INSTRUMENT = 304, // 仪器仪表 FUEL_POWER_FEE = 305, // 燃料动力费 DEPRECIATION_FEE = 306, // 折旧费 INSPECTION_FEE = 307, // 检修费 MAINTENANCE = 308, // 维护费 DISMANTLING_FREIGHT_FEE = 309, // 安拆费及场外运费 VERIFICATION_FEE = 310, // 校验费 OTHER_FEE = 311, // 其他费用 OTHER_MACHINE_USED = 312, // 其他施工机具使用费 // ==============机械类型 ↑================= MAIN_MATERIAL = 4, // 主材 EQUIPMENT = 5, // 设备 MANAGEMENT_FEE = 6, // 企业管理费 PROFIT = 7, // 利润 GENERAL_RISK_FEE = 8, // 一般风险费 } export interface IBaseGlj { code: string; name: string; specs?: string; type: GljType; unit: string; [key: string]: any; } export interface IGljTypeShortName { [type: number]: string; } // 人材机类型简称 export const GljTypeShortName: IGljTypeShortName = { 1: '人', 201: '材', 202: '砼', 203: '浆', 204: '配比', 205: '商砼', 206: '商浆', 207: '材', 208: '外购', 209: '苗木', 301: '机', 302: '机', 303: '机人', 304: '仪', 305: '动', 306: '折', 307: '检', 308: '维', 309: '安', 310: '校', 311: '机', 312: '机', 4: '主', 5: '设', 6: '管', 7: '利', 8: '险', }; // 人材机类型全称 export const GljTypeFullName: Record = { 1: '人工', 201: '普通材料', 202: '混凝土', 203: '砂浆', 204: '配合比', 205: '商品混凝土', 206: '商品砂浆', 207: '其他材料费', 208: '外购砼构件', 209: '绿化苗木', 301: '机械台班', 302: '机械组成物', 303: '机上人工', 304: '仪器仪表', 305: '燃料动力费', 306: '折旧费', 307: '检修费', 308: '维护费', 309: '安拆费及场外运费', 310: '校验费', 311: '其他费用', 312: '其他施工机具使用费', 4: '主材', 5: '设备', 6: '企业管理费', 7: '利润', 8: '一般风险费', }; export interface IComponent { ID: string; consumption: number; // 消耗量(有别于总消耗,此字段记录配合比的消耗量) gljID: string; // 工料机总库对应id (关联用) specs?: string; // 规格型号 unit: string; // 单位 name: string; // 名称 code: string; // 对应工料机code type: GljType; // 工料机类型 model?: number; // 机型 from: FromType; // std, cpt 来自标准工料机库、补充工料机库 } export enum MaterialType { GC = 1, GJ = 2, MC = 3, SN = 4, SPT = 5, SPSJ = 6, } export const MaterialDisplay = { 1: '钢材', 2: '钢筋', 3: '木材', 4: '水泥', 5: '商品砼', 6: '商品砂浆', }; // 机型 export enum GljModel { EXTRA_LARGE = 1, LARGE, MEDIUM, SMALL, } // 机型名称映射 export const GljModelName = { 1: '特大', 2: '大', 3: '中', 4: '小', }; export interface IProjectGlj { ID: string; gljID: string; // 工料机ID code: string; // 编码 originalCode: string; // 原始的编码 name: string; // 名称 supply: SupplyType; // 供货方式 supplyQuantity?: number; // 甲供数量 delivery?: string; // 交货方式 deliveryAddress?: string; // 送达地点 noAdjustPrice: boolean; // 不调价 { type: boolean; default: false } noTaxEqp?: boolean; // 不计税设备 { type: boolean; default: false } adjCoe?: number; // 调整系数ID specs: string; // 规格型号 type: GljType; // 类型 model?: number; // 机型 unit: string; // 单位 isAdd: boolean; // 是否新增 basePrice: number; // 基价单价 marketPrice: number; // 市场单价 components?: IComponent[]; // 组成物 taxRate?: number; // 税率 adjustPrice?: string; // 显示调整基价 quantity?: number; // 显示关联的消耗量 tenderQuantity?: number; // 调整后消耗量 techQuantity?: number; // 技术措施项目消耗量 subdivisionQuantity?: number; // 分部分项消耗量 materialType?: MaterialType; // 三材类别 materialCoe?: number; // 三材系数 materialQuantity?: number; // 三材量 // 经济指标数据 materialIndexType?: string; // 工料指标类别 materialIndexUnit?: string; // 工料指标单位 materialIndexCoe: number; // 单位转换系数 isMainMaterial: boolean; // 是否主要材料 (0为否 1为是) { type: boolean; default: false }; remark?: string; // 备注 originPlace?: string; // 产地 vender?: string; // 厂家 qualityGrade?: string; // 质量等级 brand?: string; // 品牌 priceFrom?: string; // 价格来源 from: FromType; // std, cpt 来自标准工料机库、补充工料机库 } export interface IProjectGljs { projectID: string; projectGljs: IProjectGlj[]; } /* 标准人材机相关 ↓ */ // 标准、补充人材机共用属性(原始数据) export interface IBaseRationGlj { code: string; name: string; specs?: string; basePrice: number; priceProperty?: any; // 多单价的情况 model?: number; // 机型 shortName: string; unit: string; adjCoe?: number; materialType?: MaterialType; // 三材类别 materialCoe?: number; // 三材系数 // 经济指标数据 materialIndexType?: string; // 工料指标类别 materialIndexUnit?: string; // 工料指标单位 materialIndexCoe?: number; // 单位转换系数 taxRate?: string; // 税率 } // 标准人材机组成物 export interface IStdComponent { ID: number; consumeAmt: number; consumeAmtProperty: any; // 多消耗量的情况 } // 标准人材机(原始数据) export interface IRawStdGlj extends IBaseRationGlj { ID: number; repositoryId: number; gljClass: number; gljType: number; component: IStdComponent[]; } // 标准人材机 export interface IStdGlj extends IBaseRationGlj { ID: number; repositoryID: number; type: number; gljClass: number; components: IStdComponent[]; from: FromType; } // 标准人材机分类树(原始数据) export interface IRawStdGljTree { ID: number; ParentID: number; NextSiblingID: number; repositoryId: number; Name: string; } // 标准人材机分类树 export interface IStdGljTree extends ITreeScm { repositoryID: number; name: string; from: FromType; } /* 标准人材机相关 ↑ */ /* 补充人材机相关 ↓ */ // 补充人材机分类树-模板(后台设置) export interface IRawCptGljTreeTemplate { compilationId: string; Name: string; ID: number; ParentID: number; NextSiblingID: number; } // 补充人材机分类树 export interface ICptGljTree extends ITreeScm { name: string; from: FromType; } // 补充人材机分类树容器 export interface ICptGljTreeData { compilationID: string; ownerID: string; // 企业或用户 treeData: ICptGljTree[]; } // 补充人材机组成物 export interface ICptComponent { ID: number | string; // 可为补充、标准 consumeAmt: number; consumeAmtProperty?: any; // 多消耗量的情况 from: FromType; } // 补充人材机组成物的组合数据(增加一些字段用于显示) export interface ICptDisplayComponent extends ICptComponent { code: string; name: string; unit: string; basePrice: number; } // 补充人材机 export interface ICptGlj extends IBaseRationGlj { ID: string; ownerID: string; type: number; gljClass: string; compilationID: string; components: ICptComponent[]; displayComponents?: ICptDisplayComponent[]; from: FromType; } // 新增补充人材机接口传输的数据接口 export interface IInsertCptGlj { ID: string; gljClass: string; code: string; name: string; unit: string; specs?: string; type: number; basePrice: number; model?: number; } // 补充人材机 /* 补充人材机相关 ↑ */ /* 选择人材机相关 ↓ */ // 库下拉项 export interface ISelectGljLibItem { name: string; repositoryID: number | string; key: string; // 与gljLibID拼接的形成的唯一值 isPrior: boolean; // 优先的 from: FromType; located?: boolean; // 定位到的库(替换时需要) } // 获取人材机分页数据接口选项 export interface IGetPagingGljOptions { classList?: number[]; // 需要匹配的分类 typeList?: GljType[]; // 需要匹配的人材机类型 libID?: number | string; // 人材机库ID replaceGlj?: IBaseGlj; // 替换的人材机 located?: boolean; // 是否需要定位(打开替换窗口时) limit?: number; // 分页数量 gtCode?: string; // 分页排序$gt code search?: string; // 搜索的内容(匹配编号、名称) } // 选择人材机接口返回数据格式 export interface ISelectGljResult { libData: ISelectGljLibItem[]; // 库下拉项 treeData: IStdGljTree[]; // 人材机分类树 gljData: (IStdGlj | ICptGlj)[]; // 人材机数据 total: number; // 当前数据总数量 locatedGlj?: IStdGlj | ICptGlj; // 需要定位到的人材机 } /* 选择人材机相关 ↑ */