Explorar o código

feat(types): 添加定额清单共有属性

zhangweicheng %!s(int64=4) %!d(string=hai) anos
pai
achega
f27a0a8782
Modificáronse 3 ficheiros con 22 adicións e 27 borrados
  1. 18 1
      types/src/interface/base.ts
  2. 2 13
      types/src/interface/bill.ts
  3. 2 13
      types/src/interface/ration.ts

+ 18 - 1
types/src/interface/base.ts

@@ -1,10 +1,11 @@
 import { IProjectGlj } from './glj';
-import { IBill } from './bill';
+import { IBill, IBookmark } from './bill';
 import { IProject, IProjectPermission } from './project';
 import { IRation } from './ration';
 import { IFeeRateFile } from './feeRate';
 import { ICalcProgramFile } from './calculation';
 import { IConfigMaterial } from './configMaterial';
+import { IQuantityDetail } from './quantityDetail';
 
 export interface IAny {
   [prop: string]: any;
@@ -218,3 +219,19 @@ export interface IGetData {
   isOwner: boolean;
   projectsPermission: IProjectPermission[];
 }
+
+// 定额和清单共有的属性,造价书中很多地方需要
+export interface IBRBase {
+  ID: string;
+  parentID: string;
+  seq: number;
+  kind: BRType;
+  stdID?: string;
+  unit?: string;
+  code?: string;
+  name?: string;
+  quantity?: number;
+  quantityEXP?: string;
+  quantityDetails?: IQuantityDetail[]; // 工程量明细 -- 原先保存在另外的表中
+  bookMark?: IBookmark[]; // 书签批注
+}

+ 2 - 13
types/src/interface/bill.ts

@@ -1,4 +1,4 @@
-import { BRType, ITreeScm } from './base';
+import { BRType, IBRBase, ITreeScm } from './base';
 import { IQuantityDetail } from './quantityDetail';
 
 // 清单固定类别
@@ -111,18 +111,8 @@ export interface ISetBookmark {
   ID: string;
   content: string;
 }
-export interface IBill {
-  ID: string;
-  parentID: string;
-  seq: number;
-  kind: BRType;
-  stdID?: string;
-  unit?: string;
-  code?: string;
-  name?: string;
+export interface IBill extends IBRBase {
   flag?: FixedFlag; // 清单固定类别
-  quantity?: number;
-  quantityDetails?: IQuantityDetail[]; // 工程量明细 -- 原先保存在另外的表中
   recharge?: string; // 补注
   ruleText?: string; // 工程量计算规则
   jobContents?: IJobContent[]; // 工作内容
@@ -132,7 +122,6 @@ export interface IBill {
   formula?: string; // 基数计算
   formulaValue?: number; // 基数计算的值
   tenderFormulaValue?: number; // 调价基数计算的值
-  bookMark?: IBookmark; // 书签批注
   isAdd?: boolean; // 是否用户新增的清单
   [key: string]: any; // 剩下的之后补充
 }

+ 2 - 13
types/src/interface/ration.ts

@@ -5,6 +5,7 @@ import {
   GljCreateType,
   CreateLocation,
   BRType,
+  IBRBase,
 } from './base';
 import { IBookmark } from './bill';
 import { GljType, ICptGlj, IStdGlj, MaterialType } from './glj';
@@ -258,18 +259,9 @@ export interface IThirdRation {
   rationGljList: IRationGlj[];
 }
 
-export interface IRation {
-  ID: string;
-  parentID: string;
-  seq: number;
-  kind: BRType;
-  code?: string;
-  name?: string;
-  unit?: string;
+export interface IRation extends IBRBase {
   type?: GljType; // 子类型:1人工、201材料、301机械、4主材、5设备
-  quantity?: number;
   contain?: number; // 含量
-  quantityEXP?: string; // 工程量表达式
   programID?: number;
   fees?: any; // 费用字段
   gljQtyCoe?: IGljQtyCoe; // 工料机消耗量调整系数字段
@@ -281,8 +273,6 @@ export interface IRation {
   from?: FromType; // { type: string; default: 'std' }; // std, cpt  来自标准、补充
   isSubcontract?: boolean; // 是否分包
   installationKey?: string; // 用来记录安装增加费的关联字段
-  // 定额特有属性:
-  stdID?: string; // 来自的标准定额ID
   repositoryID?: number; // 定额库ID
   maskName?: string;
   caption?: string;
@@ -318,7 +308,6 @@ export interface IRation {
   rationCoeList?: IRationCoe[]; // 定额调整系数
   rationTemplate?: IRationTemplate; // 定额模板
   rationInstallList?: IRationInstall[]; // 定额安装增加
-  bookmarks?: IBookmark[];
 }
 
 export interface IRations {