| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335 |
- import { IProcessData, IProjectApproval } from './process';
- import { IProjectGlj } from './glj';
- import { IBill, IBookmark } from './bill';
- import { IProject, IProjectPermission } from './project';
- import { IGljQtyCoe, IRation } from './ration';
- import { IFeeRateFile } from './feeRate';
- import { ICalcProgramFile } from './calculation';
- import { IConfigMaterial } from './configMaterial';
- import { IQuantityDetail } from './quantityDetail';
- import { IInstallationFee } from './installation';
- export interface IAny {
- [prop: string]: any;
- }
- export interface ITreeScm {
- ID: string;
- parentID: string;
- seq: number;
- }
- export interface IFileRef {
- ID: string;
- name: string;
- type?: number;
- isDefault?: boolean;
- }
- export interface INumFileRef {
- ID: number;
- name: string;
- type?: number;
- isDefault?: boolean;
- }
- export enum DeleteEnum {
- NORMAL = 1,
- DELETED,
- COMPLETEDELETED,
- }
- // 返回数据接口
- export interface IResult<T = any> {
- errno: number;
- message: string;
- data: T;
- }
- export enum FromType {
- STD = 'std',
- CPT = 'cpt',
- }
- export enum RationPrefix {
- EMT = '',
- BOR = '借',
- CPT = '补',
- REP = '换',
- }
- // 工料机生成的类型
- export enum GljCreateType {
- NORMAL = 'normal',
- ADD = 'add',
- REPLACE = 'replace',
- }
- export enum CreateLocation {
- CSXM = 1, // 模板子目分别放在措施项目下
- FBFX = 2, // 模板子目分别放在分部分项下
- HNTZM = 3, // 模板子目分别放在对应混凝土子目下
- }
- export enum BRType { // 1 :大项费用 2:分部 3分项 4清单;5补项 6 定额、7 量价、8 工料机定额
- DXFY = 1, // 大项费用
- FB = 2, // 分部
- FX = 3, // 分项
- BILL = 4, // 清单
- BX = 5, // 这个补项因为旧版本是后定义的,所以放在后面,为了统一不混淆
- CS = 6, // 分类
- DT = 7, // 费用明细
- RATION = 20, // 定额
- INST = 21, // 安装增加费生成的定额
- VP = 22, // 量价
- GLJ = 23, // 工料机
- OH = 24, // 超高子目
- ITEM = 25, // 子目增加
- // 虚拟节点,主材、设备,只是显示
- MAIN = 50, // 主材
- EQUIP = 51, // 设备
- }
- export enum SupplyType {
- ZXCG = 1, // 自行采购
- BFJG, // 部分甲供
- WQJG, // 完全甲供
- JGCL, // 甲供材料 (“完全甲供”改文字为“甲供材料”)
- JDYG, // 甲定乙供
- }
- export interface IUpdate<T extends IAny = any> {
- filter: T;
- update: T;
- }
- export interface ICreate<T extends IAny = any> {
- document: T;
- }
- export interface IDelete<T extends IAny = any> {
- filter: T;
- }
- export interface IBulkWrite<T extends IAny = any> {
- update?: IUpdate<T>[];
- create?: ICreate<T>[];
- remove?: IDelete<T>[];
- }
- export enum CptModelName {
- projects = 'projects',
- quantityNumSheets = 'quantityNumSheets',
- bills = 'bills',
- billCodeSeqs = 'billCodeSeqs',
- rations = 'rations',
- rationGljs = 'rationGljs',
- unitPriceFile = 'unitPriceFile',
- feeRateFile = 'feeRateFile',
- labourCoeFile = 'labourCoeFile',
- importLogs = 'importLogs',
- cptGljLib = 'cptGljLib',
- cptGlj = 'cptGlj',
- cptGljTree = 'cptGljTree',
- cptRationLib = 'cptRationLib',
- cptRationTree = 'cptRationTree',
- cptRation = 'cptRation',
- cptRationCoe = 'cptRationCoe',
- cptRationChapterTrees = 'cptRationChapterTrees',
- configMaterials = 'configMaterials',
- projectGljs = 'projectGljs',
- calcProgramFile = 'calcProgramFile',
- options = 'options',
- installationFee = 'installationFee',
- financialProject = 'financialProject',
- approval = 'approval', // 后台设置的流程,相关于模板
- projectApproval = 'projectApproval', // 上报后项目实际使用的流程
- processAuditMoney = 'processAuditMoney', // 每个环节的审批金额
- financialProjectType = 'financialProjectType',
- editLogs = 'editLogs', // 项目修改记录
- processData = 'processData', // 流程备份数据
- billIndex = 'billIndex', // 清单指标库
- FBIndex = 'FBIndex', // 分部指标库
- commonIndex = 'commonIndex', // 综合指标库
- }
- // 无数据表的模块名称的枚举
- export enum SubModelName {
- bookmarks = 'bookmarks', // 书签批注
- components = 'components', // 组成物
- rationSubs = 'rationSubs', // 定额的子项
- }
- export enum ActionType {
- ADD = 'add',
- UPDATE = 'update',
- REPLACE = 'replace', // 和update不同,如替换定额,替换清单等,操作不一样
- DELETE = 'delete',
- }
- // 特殊的action
- export enum ActionName {
- // 项目属性相关
- RESET_COL_METAS = 'resetColMetas', // 重置默认列设置
- UPDATE_PROPERTY = 'updateProperty', // 更新项目属性
- // ration相关property
- ADD_LIB_RATIONS = 'addLibRations', // 添加标准/补充定额
- ADD_GLJ_RATIONS = 'addGljRations', // 插入工料机类型的定额
- CLEAN_ZMHS = 'cleanZmhs', // 清空子目换算
- RESET_INSTALL_FEE = 'resetInstallFee', // 重置安装增加费设置
- CALC_AREA_INCREASE = 'calcAreaIncrease', // 计算面积增加费
- // 定额工料机相关
- UPDATE_INDEX_KEY = 'updateIndexKey', // 修改定额工料机的名称,规格,单位
- ADD_RATION_GLJS = 'addRationGljs', // 添加定额工料机(多个)
- REPLACE_RATION_GLJ = 'replaceRationGlj', // 替换定额工料机(单个)
- // 项目工料机相关
- APPLY_ALL_INFO_PRICE = 'applyAllInfoPrice', // 批量套用信息价
- PROJECT_GLJ_EXIST_CHECK = 'projectGljExistCheck', // 检查工料机是否已经存在
- // 安装增加费
- CALC_INSTALL_FEE = 'calcInstallFee', // 计算安装增加费
- // 清单相关
- ADD_STD_BILLS = 'addStdBills', // 添加标准清单
- PASTE_BLOCK = 'pasteBlock', // 复制整块
- IMPORT_EXCEL_BILL = 'importExcelBill', // 导入excel清单
- BILL_CHECK = 'billCheck', // 清单检测
- // 费率相关
- RESET_FEE_RATE = 'resetFeeRate', // 重选标准
- // 补充人材机相关
- CHANGE_CPT_RATION_TREE = 'changeCptRationTree', // 补充定额章节树数据变更
- CHANGE_CPT_RATION = 'changeCptRation', // 补充定额数据变更
- CHANGE_CPT_RATION_GLJ = 'changeCptRationGlj', // 补充定额人材机变更
- CHANGE_CPT_RATION_COE = 'changeCptRationCoe', // 补充定额子目换算变更
- CHANGE_CPT_COE = 'changeCptCoe', // 补充子目换算数据变更
- ADD_RATION_COE_TO_SECTION = 'addRationCoeToSection', // 添加子目换算到本节其他定额
- UPDATE_CALCPROGRAM_TEMPLATE = 'updateCalcProgramTemplate',
- UPDATE_CALCPROGRAM_CALCITEM = 'updateCalcProgramCalcItem',
- BILL_UPGRADE = 'billUpgrade',
- BILL_DOWNGRADE = 'billDowngrade',
- CHANGE_FEATRUE_PRJTYPE = 'changeFeaturePrjType',
- }
- export interface IBaseFilter {
- ID: string;
- prop?: string;
- }
- export interface IFilter {
- ID: string;
- [key: string]: string;
- }
- // 统一subject更新提交数据入口,为撤销功能做准备
- export interface ISetData<T = any, F = any, R = any> {
- projectID: string; // 考虑到可能会跨项目更新,提高一层
- module: CptModelName | SubModelName;
- action: ActionType;
- createLog?: boolean; // 是否生成这个setData包的修改记录
- prop?: string; // 用来指表中的数组属性名,针对如configMaterial里,一个collections 里有多个数组数据的情况
- actionName?: ActionName; // 除了增删改查,还会有更复杂的操作,用这个来区分
- filter?: F; // 查询条件
- update?: Partial<T>; // 和update类型对应,
- documents?: T[]; // add 类型对应,批量插入
- oDocs?: any[]; // 存放撤销的原始数据?
- oldData?: T; // 旧数据,造价书中节点是引用同一个对象,编辑后是直接修改源数据,生成log时取不到旧数据
- result?: R; // 特殊的返回结果
- }
- export interface IColumnMeta {
- ID: string;
- title: string;
- data: string;
- renderer?: string;
- editor?: string;
- readOnly?: boolean;
- width: number;
- type?: string;
- numericFormat?: { pattern?: string; zeroFormat?: string };
- visible?: boolean;
- source?: string[];
- }
- // subject getData数据接口
- export interface ISubjectGetData {
- project: IProject;
- [CptModelName.bills]: IBill[];
- [CptModelName.rations]: IRation[];
- [CptModelName.projectGljs]: IProjectGlj[];
- [CptModelName.feeRateFile]: IFeeRateFile;
- [CptModelName.calcProgramFile]: ICalcProgramFile;
- [CptModelName.configMaterials]: IConfigMaterial;
- [CptModelName.installationFee]: IInstallationFee;
- [CptModelName.processData]?: IProcessData[];
- }
- // getData数据接口
- export interface IGetData {
- subject: ISubjectGetData;
- construction: { project?: IProject };
- treeData: IProject[];
- isManager: boolean;
- projectsPermission: IProjectPermission[];
- approval?: IProjectApproval;
- }
- export interface IFee {
- tenderTotalFee: number;
- tenderUnitPrice: number;
- totalFee: number;
- unitPrice: number;
- }
- // 费用字段
- export interface IFees {
- [key: string]: IFee;
- }
- // 定额和清单共有的属性,造价书中很多地方需要
- export interface IBRBase {
- ID: string;
- parentID: string;
- seq: number;
- kind: BRType;
- stdID?: string; // 原始数据存在库中的ID(补充定额时也共用这个字段)
- repositoryID?: number | string; // 定额库/清单库 ID
- unit?: string;
- code?: string;
- name?: string;
- quantity?: number;
- quantityEXP?: string;
- quantityDetails?: IQuantityDetail[]; // 工程量明细 -- 原先保存在另外的表中
- // 是否记取面积增加费
- areaIncreaseFee?: boolean | null; // { type: Schema.Types.Mixed; default: false }; // true 是,false否,null 不确定,三个状态
- fees?: IFees; // 费用字段
- bookmarks?: IBookmark[]; // 书签批注
- overHeight?: string; // 超高降效
- targetUnitPrice?: number; // 调价:目标综合单价
- targetTotalFee?: number; // 调价:目标综合合价
- readjustUnitPrice?: number; // 调价:调整后综合单价
- readjustTotalFee?: number; // 调价:调整后综合合价
- rationQtyCoe?: number; // 调价:子目工程量调整系数
- gljQtyCoe?: IGljQtyCoe; // 调价:工料机消耗量调整系数
- }
- export const SeparateString = '|----|';
- // 检查subjec tree返回类型
- export enum CheckSubjectTreeType {
- // 项目被删除
- PROJECT_DELETED = 1,
- // 项目被取消分享
- PROJECT_CANCEL_SHARED,
- // 权限限制(未知情况)
- PERMISSION_LIMITED,
- }
- // 检查subjec tree返回结果
- export interface ICheckSubjectTreeRst {
- checkType: CheckSubjectTreeType;
- }
|