import { IInfoKeyword, IInfoPriceItem } from '.'; 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 const hasCompMaterialTypes = [ // 有组成物的材料类型, //混凝土、砂浆、配合比 GljType.CONCRETE, GljType.MORTAR, GljType.MIX_RATIO, ]; export const hasCompMachineTypes = [ // 有组成物的机械类型 GljType.GENERAL_MACHINE, GljType.INSTRUMENT, ]; export const machineCompTypes = [ // 可以做为机械组成物的类型 GljType.MACHINE_COMPOSITION, GljType.MACHINE_LABOUR, GljType.FUEL_POWER_FEE, // 燃料动力费 GljType.DEPRECIATION_FEE, // 折旧费 GljType.INSPECTION_FEE, // 检修费 GljType.MAINTENANCE, // 维护费 GljType.DISMANTLING_FREIGHT_FEE, // 安拆费及场外运费 GljType.VERIFICATION_FEE, // 校验费 GljType.OTHER_FEE, // 其他费用 ]; 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 IMatchedInfoPrice { basePrice: string; key: string; keywordList: IInfoKeyword[]; marketPrice: string; name: string; specs: string; unit: string; dateRemark?: string; classCode: string; code: string; } 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; // 税率 tenderPrice?: number; // 调后价 adjustPrice?: number; // 调整价 quantity?: number; // 显示关联的消耗量 tenderQuantity?: number; // 调整后消耗量 techQuantity?: number; // 技术措施项目消耗量 tenderTechQuantity?: number; // 调整后技术措施项目消耗量 subdivisionQuantity?: number; // 分部分项消耗量 tenderSubdivisionQuantity?: 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; // 价格来源 infoPrice?: number | null; // 信息价 purchaseFeeRate?: number; // 采保费率 from: FromType; // std, cpt 来自标准工料机库、补充工料机库 matchedInfoPrice?: IMatchedInfoPrice | null; // 材料检查后匹配到的信息价 } export interface IProjectGljs { projectID: string; projectGljs: IProjectGlj[]; } /* 标准人材机相关 ↓ */ // 标准人材机库 export interface IStdGljLib { dispName: string; compilationId: string; compilationName: string; ID: number; rationLibs: [{ dispName: string; ID: number }]; } // 标准、补充人材机共用属性(原始数据) 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 ILibComponent { ID: number | string; // 可为补充、标准 consumeAmt: number; consumeAmtProperty?: any; // 多消耗量的情况 } // 标准人材机(原始数据) export interface IRawStdGlj extends IBaseRationGlj { ID: number; repositoryId: number; gljClass: number; gljType: number; component: ILibComponent[]; } // 标准人材机 export interface IStdGlj extends IBaseRationGlj { ID: number; repositoryID: number; type: number; gljClass: number; components: ILibComponent[]; 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 { libID: string; ID: string; compilationID: string; treeData: ICptGljTree[]; } // 补充人材机组成物 export interface ICptComponent extends ILibComponent { from: FromType; } // 补充人材机组成物的组合数据(增加一些字段用于显示) export interface ICptDisplayComponent extends ICptComponent { code: string; name: string; unit: string; basePrice: number; } // 补充人材机 export interface ICptGlj extends IBaseRationGlj { libID: string; ID: string; compilationID: string; type: number; gljClass: string; components: ICptComponent[]; displayComponents?: ICptDisplayComponent[]; from: FromType; creatorID?: string; // 创建者ID creatorName?: string; // 创建者姓名 createTime?: number; // 创建时间 displayLibName?: string; // 工料机所在库在前端UI上的显示,如:[企业库]。 alias?: string; // 别名(名称 规格) period?: string; // 期数 } // 新增补充人材机接口传输的数据接口 export interface IInsertCptGlj { ID: string; gljClass: string; code: string; name: string; unit: string; specs?: string; type: number; basePrice: number; model?: number; } // 准备组成物返回数据接口 export interface IPrepareComponentResult { displayComponents: ICptDisplayComponent[]; } // 补充人材机 /* 补充人材机相关 ↑ */ /* 选择人材机相关 ↓ */ // 库下拉项 export interface ISelectGljLibItem { name: string; repositoryID: number | string; key: string; // 与gljLibID拼接的形成的唯一值 isPrior: boolean; // 优先的 from: FromType; isShare?: boolean; // 是否是被人分享的 located?: boolean; // 定位到的库(替换时需要) enterpriseID?: string; // 库来自企业的ID(企业分享会有) enterpriseName?: string; // 库来自企业的名称(企业分享会有) } export interface IAddComponentOption { type: GljType; gljID?: number | string; } // 获取人材机分页数据接口选项 export interface IGetPagingGljOptions { classList?: (number | string)[]; // 需要匹配的分类 typeList?: GljType[]; // 需要匹配的人材机类型 libID?: number | string; // 人材机库ID replaceGlj?: IBaseGlj; // 替换的人材机 addComponent?: IAddComponentOption; // 添加组成物时的参数 located?: boolean; // 是否需要定位(打开替换窗口时) limit?: number; // 分页数量 gtCode?: string; // 分页排序$gt code search?: string; // 搜索的内容(匹配编号、名称) excludeIDs?: (number | string)[]; // 排除的人材机ID } // 选择人材机接口返回数据格式 export interface ISelectGljResult { libData: ISelectGljLibItem[]; // 库下拉项 treeData: (IStdGljTree | ICptGljTree)[]; // 人材机分类树 gljData: (IStdGlj | ICptGlj)[]; // 人材机数据 total: number; // 当前数据总数量 locatedGlj?: IStdGlj | ICptGlj; // 需要定位到的人材机 } /* 选择人材机相关 ↑ */ // 补充定额库中,需要显示用的补充定额人材机 export interface ICptDisplayRationGlj { ID: string | number; // 人材机ID(标准为number,补充为string) code: string; name: string; unit: string; specs?: string; basePrice: number; consumeAmt: number; from: FromType; type: GljType; } // 重算补充定额价格需要的人材机类型 export interface IGljForCalcRationPrice { basePrice: number; consumeAmt: number; type: GljType; [props: string]: any; } // 价格变更人材机 export interface IPriceChangeGlj { ID: string; basePrice: number; } // 添加组成物filter类型 export interface IAddComponentFilter { projectGljID: string; libGljs: (IStdGlj | ICptGlj)[]; processID?: string; } // 补充定额库选项 export interface ICptGljLibOption { ID: string; name: string; readOnly: boolean; enterpriseID?: string; // 库来自企业的ID(企业分享会有) enterpriseName?: string; // 库来自企业的名称(企业分享会有) } // 进入定额库需要准备的数据(一些状态) export interface IPrepareCptGljLib { // 人材机库分享人数 shareCount: number; // 库下拉选项 libOptions: ICptGljLibOption[]; } // 补充人材机库 export interface ICptGljLib { ID: string; // 库名称,预留字段,以后可能允许自行新建补充库 name?: string; // 费用定额ID compilationID: string; // 企业ID,可为空字符串 enterpriseID: string; // 用户ID userID: string; // 是否为企业内部库 isEnterpriseInternal: boolean; createDate: number; } // 以工料机五大项为key,映射表 export interface IGljKeyMap { [key: string]: IBaseGlj; }