Przeglądaj źródła

feat(types): project类型变更

vian 5 lat temu
rodzic
commit
4357df8949
2 zmienionych plików z 12 dodań i 6 usunięć
  1. 4 4
      types/src/interface/base.ts
  2. 8 2
      types/src/interface/project.ts

+ 4 - 4
types/src/interface/base.ts

@@ -67,20 +67,20 @@ export enum supplyType {
   JDYG, // 甲定乙供
 }
 
-export interface IUpdate<T extends IAny> {
+export interface IUpdate<T extends IAny = any> {
   filter: T;
   update: T;
 }
 
-export interface ICreate<T extends IAny> {
+export interface ICreate<T extends IAny = any> {
   document: T;
 }
 
-export interface IDelete<T extends IAny> {
+export interface IDelete<T extends IAny = any> {
   filter: T;
 }
 
-export interface IBulkWrite<T extends IAny> {
+export interface IBulkWrite<T extends IAny = any> {
   update?: IUpdate<T>[];
   create?: ICreate<T>[];
   remove?: IDelete<T>[];

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

@@ -1,3 +1,4 @@
+import { ValuationType } from './compilation';
 import { ILabourCoeFile } from './labourCoe';
 import { IIncreaseSetting } from './increaseFee';
 import {
@@ -101,7 +102,7 @@ export enum FileTypeName {
 
 export const FileTypeMap = {
   [FileType.SUBMISSION]: FileTypeName.SUBMISSION,
-  [FileType.INVITATION]: FileTypeName.SUBMISSION,
+  [FileType.INVITATION]: FileTypeName.INVITATION,
   [FileType.CONTROL]: FileTypeName.CONTROL,
 };
 
@@ -156,6 +157,7 @@ export interface IEconomicIndex {
 // 项目属性
 export interface IProperty {
   rootProjectID?: string; // 建设项目ID
+  valuationType?: ValuationType; // 计价类型
   valuationID?: string; // 计价规则
   programID?: number; // 工程专业,填计算程序工程专业ID
   engineeringID?: string; // 工程专业ID
@@ -184,7 +186,7 @@ export interface IProperty {
   progressiveLibID?: string; // 累进区间库
   lockBills?: boolean; // 锁定清单
   decimal?: IDecimal; // 小数位数
-  billsQuantityDecimal: IBillsQuantityDecimal[]; // 清单工程量精度
+  billsQuantityDecimal?: IBillsQuantityDecimal[]; // 清单工程量精度
   displaySetting?: IDisplaySetting; // 呈现选项
   billsCalcMode?: number; // 清单计费取费方式
   zanguCalcMode?: number; // 暂估合价计算方式
@@ -238,6 +240,10 @@ export interface IProject extends ITreeScm {
   deleteType?: DeleteEnum;
   deleteDate?: number;
   deleteBy?: string;
+  // 只是为了显示,不是自身的正在数据,比如汇总信息等
+  external?: {
+    cost: number; // 工程造价
+  };
 }
 
 export interface IProjectBulkRst {