| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454 |
- import { EntityType } from './user';
- import { ValuationType } from './compilation';
- import { IIncreaseSetting } from './increaseFee';
- import { ITreeScm, DeleteEnum, INumFileRef, IColumnMeta } from './base';
- import { ICalcOption, ITenderSetting, IDistributeSetting } from './calculation';
- import { ISharePermission } from './share';
- import { IOverHeight, IOverHeightSetting } from './overHeight';
- import { IProcessAccount } from './process';
- // 项目类型
- export enum ProjectType {
- FOLDER = 1,
- CONSTRUCTION, // 建设项目
- SINGLE, // 单项工程
- UNIT, // 单位工程
- }
- export const projectTextMap = {
- [ProjectType.FOLDER]: '文件夹',
- [ProjectType.CONSTRUCTION]: '建设项目',
- [ProjectType.SINGLE]: '单项工程',
- [ProjectType.UNIT]: '单位工程',
- };
- export interface IGLJCol {
- showAdjustPrice?: boolean;
- }
- // 小数位数
- export interface IDecimal {
- bill: { unitPrice: number; totalPrice: number };
- ration: { quantity: number; unitPrice: number; totalPrice: number };
- glj: { quantity: number; unitPriceHasMix: number; unitPrice: number };
- feeRate: number;
- quantityDetail: number;
- material: number; // 三材系数
- process: number;
- }
- // 工程量精度
- export interface IBillsQuantityDecimal {
- unit: string;
- decimal: number;
- ID: string;
- }
- // 呈现选项
- export interface IDisplaySetting {
- billsAutoHeight: boolean;
- rationAutoHeight: boolean;
- disPlayMainMaterial: boolean;
- }
- // 累进区间
- export interface IProgression {
- interval: string; // 区间字符 eg: '(0,100]'
- feeRate: boolean;
- }
- export interface IProgressiveInterval {
- ID: string;
- name: string;
- progression: IProgression[];
- generalRate?: number;
- simpleRate?: number;
- }
- // 承包人材料调整类型
- export enum GLJAdjustType {
- PRICE_INFO = 'priceInfo', // 造价信息差额调整法
- PRICE_COE = 'priceCoe', // 价格指数调整法
- }
- // 计税方式
- export enum TaxType {
- GENERAL = 1,
- SIMPLE,
- }
- // 文件类型
- export enum FileType {
- // 预算类型, 投标,招标属于预算子类
- SUBMISSION = 1, // 投标
- INVITATION = 2, // 招标
- CONTROL = 3, // 控制价
- // 预算类型 --- end
- ESTIMATE = 5, // 概算
- SETTLEMENT = 10, // 结算
- }
- // 结算流程类型
- export enum ProcessType {
- CHANGE = 1, // 变更
- VISA, // 签证
- MISS, // 漏项
- CLAIM, // 索赔
- OTHER, // 其它
- }
- export enum FileTypeName {
- SUBMISSION = '预算',
- INVITATION = '预算',
- ESTIMATE = '概算',
- SETTLEMENT = '结算',
- }
- export const FileTypeMap = {
- [FileType.SUBMISSION]: FileTypeName.SUBMISSION,
- [FileType.INVITATION]: FileTypeName.INVITATION,
- };
- // 工程特征、基本信息
- export interface IInfoItem {
- ID: string;
- key: string;
- dispName: string;
- value?: string;
- code?: string;
- required?: string;
- readonly?: string;
- options?: string;
- cellType?: string;
- fileKind?: FileTypeName;
- items?: IInfoItem[];
- parentID: string;
- seq: number;
- }
- // 工程特征指标
- interface IBaseEngineerFeature {
- value: string;
- name: string;
- exportName?: string;
- cellType?: string;
- options?: string;
- }
- export interface IStdEngineerFeature extends IBaseEngineerFeature {
- ID: number;
- ParentID: number;
- }
- export interface IEngineerFeature extends ITreeScm, IBaseEngineerFeature {}
- // 主要工料指标
- export interface IMaterialIndex {
- ID: string;
- name: string;
- unit: string;
- coe: number;
- }
- // 主要工程量指标
- export interface IMainQtyIndex {
- ID: string;
- name: string;
- unit: string;
- coe: number;
- }
- // 主要经济指标
- export interface IEconomicIndex {
- ID: string;
- name: string;
- value: string;
- }
- // 面积增加类型
- export enum AreaIncreaseType {
- LABOUR = 'labour',
- MATERIAL = 'material',
- MACHINE = 'machine',
- }
- export interface IAreaIncreaseSetting {
- [AreaIncreaseType.LABOUR]: number;
- [AreaIncreaseType.MATERIAL]: number;
- [AreaIncreaseType.MACHINE]: number;
- }
- // 关于计算取费方式
- export enum BillGetFeeType {
- RATION_CONTENT = 0,
- RATION_PRICE_CONVERSE = 1,
- RATION_PRICE = 2,
- BILL_PRICE = 3,
- }
- export interface IInfoPriceOption {
- areaID: string;
- year: string;
- month: string;
- }
- // 项目属性
- export interface IProperty {
- constructionID?: string; // 建设项目ID
- valuationType?: ValuationType; // 计价类型
- valuationID?: string; // 计价规则
- engineeringID?: string; // 工程专业ID
- fileType?: FileType; // 文件类型
- processType?: ProcessType; // 结算项目里的流程类型,有变更,签证, 漏项......等
- taxType?: TaxType; // 计税方式
- rationFeeType?: number; // 定额取费专业
- unitFeeType?: number; // 单位工程取费专业
- calcProgramLib?: INumFileRef; // 计算程序(标准)
- region?: string; // 所属地区
- showAdjustPrice?: boolean; // 是否显示调整价列
- isInstall?: boolean; // 是否是安装工程
- isItemIncrease?: boolean; // 是否是子目增加
- itemIncreaseSetting?: IIncreaseSetting;
- isAreaIncrease?: boolean; // 是否是面积增加
- isShowRation?: boolean; // 是否显示定额
- areaIncreaseSetting?: IAreaIncreaseSetting; // 面积增加费设置
- indexName?: string; // 指标名称
- lockBills?: boolean; // 锁定清单
- decimal?: IDecimal; // 小数位数
- billsQuantityDecimal?: IBillsQuantityDecimal[]; // 清单工程量精度
- displaySetting?: IDisplaySetting; // 呈现选项
- billsCalcMode?: BillGetFeeType; // 清单计费取费方式
- zanguCalcMode?: number; // 暂估合价计算方式
- calcOption?: ICalcOption; // 计算选项
- tenderSetting?: ITenderSetting; // 调价设置
- overHeight?: IOverHeight[]; // 超高降效数据
- overHeightSetting?: IOverHeightSetting; // 超高降效选项
- basicInfo?: IInfoItem[]; // 基本信息
- feature?: IInfoItem[]; // 工程特征
- singleInfo?: IInfoItem[]; // 单项信息
- progressiveInterval?: IProgressiveInterval[]; // 累进区间
- gljAdjustType?: GLJAdjustType; // 承包人材料调整类型
- cptIllustration?: string; // 编制说明
- engineerInfos?: IInfoItem[];
- engineerFeatures?: IEngineerFeature[];
- materials?: IMaterialIndex[];
- mainQuantities?: IMainQtyIndex[];
- economics?: IEconomicIndex[];
- overHeightSpecificID?: string; // 超高子目指定清单ID
- distributeSetting?: IDistributeSetting; // 强制修改叶子清单的综合单价,分摊计算定额工程量 或 分摊计算定额下的工料机消耗量。
- colMetas?: IColumnMeta[];
- valuationName?: string; // 计价规则名称
- maxLimitPriceRate?: number; // 设置最高限价单价浮动率
- minLimitPriceRate?: number; // 设置最低限价单价浮动率
- fileKind?: string; // 导入进来的属性,平台导出需要维持这个值不变
- infoPriceOption?: IInfoPriceOption; // 信息价选项 只用于搜索
- recommendPriceOption?: IInfoPriceOption; // 智能材价匹配时的选项
- saveLog?: boolean; // 记录项目编辑log
- indexType?: string; // 指标项目分类用于指标入库
- normLib?: string;
- }
- // 原来的列设置太复杂了,没什么必要
- export interface IMainTreeCol {
- cols: Array<any>;
- headRowHeight: Array<number>;
- treeCol?: number;
- headRows?: number;
- emptyRows?: number;
- }
- export enum ImportType {
- NONE,
- YBP,
- INTERFACE,
- }
- // 项目活动枚举
- export enum ProjectActivity {
- // 新建
- CREATE = 'create',
- // 编辑
- EDIT = 'edit',
- // 删除
- DELETE = 'delete',
- // 恢复
- RECOVER = 'recover',
- }
- // 对项目的权限
- export enum PermissionType {
- READONLY = 'readonly',
- EDIT = 'edit',
- }
- export interface IProject extends ITreeScm {
- type: ProjectType;
- compilationID: string;
- ownerID: string; // 拥有者ID(个人或企业)
- ownerType: EntityType;
- managerID: string; // 负责人ID
- creator: string;
- name: string;
- updateDate: number; // 更新时间
- code?: string;
- createDate: number;
- property?: IProperty;
- changeMark?: string;
- remark?: string;
- fileVer?: string;
- lastFileVer?: string;
- imported?: ImportType;
- deleteType?: DeleteEnum;
- deleteDate?: number;
- deleteBy?: string;
- financialProjectID?: string; // 关联财审项目ID(不用财审项目关联此表,因为可能多个项目对应一个财审项目)
- edition?: string; // 数据版本号
- // 流程信息
- processInfo?: {
- currentApprovalID: string; // 当前正处于哪个审批流中
- currentProcessID: string; // 当前正处于哪个环节的ID
- processName: string; // 环节名称 冗余数据用于列表显示
- // 当前所处流程里,哪些账号能编辑,哪些账号能查看或者审批等设置
- processAccounts?: {
- ID: string; // 用户ID
- permission: PermissionType;
- }[];
- };
- // 只是为了显示,不是自身的正在数据,比如汇总信息等
- external?: {
- showShareMark?: boolean; // 是否显示分享标记
- cost?: number; // 工程造价
- // 有时候为了显示,需要一些特殊处理日期。如:项目管理-回收站,建设项目、单项工程的删除日期和创建日期需要显示为空
- deleteDateForView?: number;
- createDateForView?: number;
- actualTreeData?: ITreeScm; // 真正的树结构数据。有时候可能需要暂时变更project的树结构数据,在这种时候需要存储原本的真实树结构数据
- from?: string; // 来自于某用户名称
- members?: string[]; // 成员协作
- };
- }
- export interface IProjectBulkRst {
- create: IProject[];
- remove: string[];
- }
- // 建设项目默认设置项(可以被恢复的)
- export interface IConstructionDefaultSetting {
- decimal: IProperty['decimal'];
- billsQuantityDecimal: IProperty['billsQuantityDecimal'];
- displaySetting: IProperty['displaySetting'];
- billsCalcMode: IProperty['billsCalcMode'];
- zanguCalcMode: IProperty['zanguCalcMode'];
- calcOption: IProperty['calcOption'];
- colMetas: IProperty['colMetas'];
- }
- // 项目权限
- export interface IProjectPermission {
- projectID: string;
- readOnly: boolean;
- allowCopy: boolean;
- }
- // constructionTreeData接口
- export interface IConstructionTreeData {
- construction: { project: IProject };
- treeData: IProject[];
- }
- // 项目活动
- export interface IProjectActivity {
- activity: ProjectActivity;
- userID: string;
- date: number;
- }
- // 项目log
- export interface IProjectLog {
- // 企业ID
- enterpriseID: string;
- // 费用定额ID
- compilationID: string;
- // 费用定额名称
- compilationName: string;
- // 建设项目ID
- constructionID: string;
- // 建设项目名称
- constructionName: string;
- // 单位工程ID
- unitID: string;
- // 单位工程名称
- unitName: string;
- // 更新时间
- updateDate: number;
- // 管理者(所有者、负责人)ID
- managerID: string;
- // 活动
- activity: ProjectActivity;
- // 活动时间
- activityDate: number;
- // 活动者ID
- activityUserID: string;
- // 协作
- cooperationCount?: number;
- // 是否与我协作
- cooperateWithMe?: boolean;
- // 版本号
- edition?: string;
- }
- // 导入状态
- export enum ImportStatus {
- IMPORTING = 0,
- FINISH = 1,
- FAIL = 3,
- }
- // 导入log
- export interface IImportLog {
- status: ImportStatus;
- errorMsg: string;
- stack?: any;
- constructID?: string;
- constructName?: string;
- }
- export interface ISaveProjectInfo {
- ID: string;
- parentID: string;
- seq: number;
- type: ProjectType;
- name?: string;
- unitName?: string;
- singleName?: string;
- constructionName?: string;
- unitID?: string;
- singleID?: string;
- constructionID?: string;
- indexTypes: string[];
- projLocation: string;
- year: string;
- month: string;
- fileType: FileType;
- unit?: string;
- quantity?: string;
- }
- export interface ICommonIndex {
- ID: string;
- parentID: string;
- seq: number;
- type: ProjectType;
- name?: string;
- constructionID?: string;
- indexTypes: string[];
- projLocation: string;
- year: string;
- month: string;
- fileType: FileType;
- unit?: string;
- quantity?: string;
- composite: string; // 综合指标
- dynamicIndex: Record<string, string>; // 动态指标,年-月为key 综合指标的映射
- }
|