Просмотр исходного кода

feat(types): 增加费率、单价文件相关类型

vian 5 лет назад
Родитель
Сommit
9613799de7

+ 42 - 0
types/src/interface/calculation.ts

@@ -17,3 +17,45 @@ export interface ITenderSetting {
   gljPriceTenderCoe: number; // 工料机单价调整系数
   calcPriceOption: TenderOption; // 根据调整系数计算报价
 }
+
+export interface ICalcItem {
+  ID: number;
+  code: string;
+  name: string;
+  fieldName: string;
+  dispExpr: string;
+  dispExprUser?: string;
+  expression: string;
+  compiledExpr?: string;
+  statement: string;
+  feeRateID?: number;
+  feeRate?: string;
+  labourCoeID?: number;
+  memo?: string;
+  custom?: boolean;
+}
+
+export interface ICalcTemplate {
+  ID: number;
+  name: string;
+  calcItems: ICalcItem[];
+}
+
+export interface IStdCalcProgram {
+  ID: number;
+  region: string;
+  libName: string;
+  displayName: string;
+  compilationId: string;
+  compilationName: string;
+  templates: ICalcTemplate[];
+}
+
+export interface ICalcProgram {
+  ID: string;
+  projectID: string;
+  name: string;
+  libID: number;
+  libName: string;
+  templates: ICalcTemplate[];
+}

+ 2 - 3
types/src/interface/compilation.ts

@@ -1,4 +1,3 @@
-/* eslint-disable camelcase */
 import { ELockInfo } from './user';
 import { TaxType, IGLJCol } from './project';
 import { IFileRef, INumFileRef } from './base';
@@ -9,7 +8,7 @@ export interface ICptItem {
   description: string;
 }
 
-export interface IProgramLib extends IFileRef {
+export interface IProgramLib extends INumFileRef {
   displayName: string;
 }
 
@@ -42,7 +41,7 @@ export interface IEngineering {
   engineerInfoLib?: IFileRef[];
   infoLib?: IFileRef[];
   featureLib?: IFileRef[];
-  artificialLib?: IFileRef[];
+  artificialLib?: INumFileRef[];
   billLib?: INumFileRef[];
   billsGuidanceLib?: IFileRef[];
   gljLib?: INumFileRef[];

+ 65 - 0
types/src/interface/feeRate.ts

@@ -0,0 +1,65 @@
+import { DeleteEnum, ITreeScm } from './base';
+
+export interface ISubFeeRateOption {
+  name: string;
+  value: string;
+  selected: boolean;
+}
+
+export interface ISubFeeRateRecord {
+  ID: number;
+  name: string;
+  optionList: ISubFeeRateOption[];
+}
+
+export interface IFeeRateValueMap {
+  ID: string;
+  value: number;
+}
+
+export interface ISubFeeRate {
+  records: ISubFeeRateRecord[];
+  valueMaps: IFeeRateValueMap[];
+}
+
+export interface IFeeRate extends ITreeScm {
+  name: string;
+  rate: number;
+  originalRate: number;
+  memo?: string; // 备注
+  subFeeRate: ISubFeeRate;
+}
+
+export interface IFeeRateFile {
+  ID: string;
+  rootProjectID: string;
+  userID: string;
+  name: string;
+  libID: string;
+  libName: string;
+  rates: IFeeRate[];
+  deleteType?: DeleteEnum;
+}
+
+export interface IStdSubFeeRate {
+  recodes: ISubFeeRateRecord[];
+  records?: ISubFeeRateRecord[]; // 标准数据recodes拼写错误,解决拼写错误
+  valueMaps: IFeeRateValueMap[];
+}
+
+export interface IStdFeeRate {
+  ID: number;
+  ParentID: number;
+  name: string;
+  rate: number;
+  memo?: string;
+  subFeeRate: IStdSubFeeRate;
+}
+
+export interface IStdFeeRateFile {
+  ID: string;
+  libName: string;
+  compilationId: string;
+  compilationName: string;
+  rates: IStdFeeRate[];
+}

+ 2 - 0
types/src/interface/index.ts

@@ -6,3 +6,5 @@ export * from './systemSetting';
 export * from './project';
 export * from './increaseFee';
 export * from './labourCoe';
+export * from './unitPrice';
+export * from './feeRate';

+ 51 - 8
types/src/interface/project.ts

@@ -1,5 +1,6 @@
+import { ILabourCoe } from './labourCoe';
 import { IIncreaseSetting } from './increaseFee';
-import { ITreeScm, IFileRef, DeleteEnum } from './base';
+import { ITreeScm, IFileRef, DeleteEnum, INumFileRef } from './base';
 import { ICalcOption, ITenderSetting } from './calculation';
 
 export enum ProjectType {
@@ -53,12 +54,12 @@ export interface IOverHeight {
   name: string;
   code?: string;
   unit?: string;
-  labourRate?: string;
-  machineRate?: string;
-  labourMachineRate?: string;
-  benchmark?: string;
-  extra?: string;
-  limit?: string;
+  labourRate?: number;
+  machineRate?: number;
+  labourMachineRate?: number;
+  benchmark?: number;
+  extra?: number;
+  limit?: number;
 }
 
 export enum OverHeightOption {
@@ -111,6 +112,41 @@ export interface IInfoItem {
   items?: IInfoItem[];
 }
 
+// 工程特征指标
+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 {
+  name: string;
+  unit: string;
+  coe: number;
+}
+
+// 主要工程量指标
+export interface IMainQtyIndex {
+  name: string;
+  unit: string;
+  coe: number;
+}
+
+// 主要经济指标
+export interface IEconomicIndex {
+  name: string;
+  value: string;
+}
+
 // 项目属性
 export interface IProperty {
   rootProjectID?: string; // 建设项目ID
@@ -120,7 +156,8 @@ export interface IProperty {
   taxType?: TaxType; // 计税方式
   rationFeeType?: number; // 定额取费专业
   unitFeeType?: number; // 单位工程取费专业
-  calcProgram?: IFileRef; // 计算程序
+  calcProgramLib?: INumFileRef; // 计算程序(标准)
+  calcProgramFile?: IFileRef; // 计算程序(用户数据)
   colLibID?: string; // 列设置
   templateLibID?: string; // 清单模板
   unitPriceFile?: IFileRef; // 单价文件
@@ -153,6 +190,12 @@ export interface IProperty {
   progressiveInterval?: IProgressiveInterval[]; // 累进区间
   gljAdjustType?: GLJAdjustType; // 承包人材料调整类型
   cptIllustration?: string; // 编制说明
+  labourCoeFile?: ILabourCoe; // 人工系数文件
+  engineerInfos?: IInfoItem[];
+  engineerFeatures?: IEngineerFeature[];
+  materials?: IMaterialIndex[];
+  mainQuantities?: IMainQtyIndex[];
+  economics?: IEconomicIndex[];
 }
 
 export interface IMainTreeCol {

+ 39 - 0
types/src/interface/unitPrice.ts

@@ -0,0 +1,39 @@
+import { DeleteEnum } from './base';
+
+export interface IMixRatio {
+  ID: string;
+  consumption: number; // 消耗量(有别于总消耗,此字段记录配合比的消耗量)
+  gljID: number; // 工料机总库对应id (关联用)
+  specs: string; // 规格型号
+  unit: string; // 单位
+  name: string; // 名称
+  code: string; // 对应工料机code
+  type: number; // 工料机类型
+  model: number; // 机型
+}
+
+export interface IUnitPrice {
+  ID: string;
+  basePrice: string; // 基价单价
+  marketPrice: string; // 市场单价
+  taxRate?: string; // 税率
+  code: string; // 编码
+  originalCode: string; // 原始的编码
+  name: string; // 名称
+  specs: string; // 规格型号
+  unit: string; // 单位
+  type: number; // 类型
+  gljID: number; // 对应标准库工料机id
+  priceFrom?: string; // 价格来源
+  mixRatios: IMixRatio[];
+  isAdd: boolean;
+}
+
+export interface IUnitPriceFile {
+  ID: string;
+  name: string;
+  userID: string;
+  rootProjectID: string;
+  unitPrices: IUnitPrice[];
+  deleteType?: DeleteEnum;
+}