/* * @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 IDisplayType { [type: number]: string; } export const DisplayType: IDisplayType = { 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 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; // 多单价的情况 gljClass: number; 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; gljType: number; component: IStdComponent[]; } // 标准人材机 export interface IStdGlj extends IBaseRationGlj { ID: number; repositoryID: number; type: 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 ICptComponent { ID: string; // 补充的ID改成了UUID ,标准的不变,但是这里 consumeAmt: number; consumeAmtProperty: any; // 多消耗量的情况 from: fromType; } export interface ICptGlj extends IBaseRationGlj { ID: string; ownerID: string; type: number; compilationID: string; components: ICptComponent[]; from: fromType; } /* 补充人材机相关 ↑ */ /* 选择人材机相关 ↓ */ // 库下拉项 export interface ISelectGljLibItem { name: string; repositoryID: number | string; key: string; // 与gljLibID拼接的形成的唯一值 isPrior: boolean; // 优先的 from: fromType; located?: boolean; // 定位到的库(替换时需要) } // 选择人材机-需要替换人材机接口 export interface IGetPagingGljReplaceGlj extends IBaseGlj { repositoryID: number | string; from: fromType; } // 获取人材机分页数据接口选项 export interface IGetPagingGljOptions { classList?: number[]; // 需要匹配的分类 typeList?: GljType[]; // 需要匹配的人材机类型 libID?: number | string; // 人材机库ID replaceGlj?: IGetPagingGljReplaceGlj; // 替换的人材机 located?: boolean; // 是否需要定位(打开替换窗口时) limit?: number; // 分页数量 gtCode?: string; // 分页排序$gt code search?: string; // 搜索的内容(匹配编号、名称) } // 选择人材机接口返回数据格式 export interface ISelectGljResult { libData: ISelectGljLibItem[]; // 库下拉项 treeData: IStdGljTree[]; // 人材机分类树 gljData: (IStdGlj | ICptGlj)[]; // 人材机数据 total: number; // 当前数据总数量 } /* 选择人材机相关 ↑ */