ソースを参照

feat(types): 清单精灵

vian 4 年 前
コミット
0a3a530648
1 ファイル変更40 行追加9 行削除
  1. 40 9
      types/src/interface/billGuide.ts

+ 40 - 9
types/src/interface/billGuide.ts

@@ -1,5 +1,3 @@
-import { ITreeScm } from './base';
-
 // 指引库类型
 // 指引库类型
 export enum BillGuideLibType {
 export enum BillGuideLibType {
   // 清单指引
   // 清单指引
@@ -43,8 +41,17 @@ export enum BillGuideItemType {
   RATION,
   RATION,
 }
 }
 
 
+export interface IBillGuideCommonProp {
+  outputItemCharacter?: boolean;
+  required?: boolean;
+  unit?: string; // 单位,识别辅助运距功能
+  interval?: string; // 区间,辅助运距功能
+  isMaterial?: boolean; // 材料,辅助替换材料规格
+  isDefaultOption?: boolean; // 是否是默认选项
+}
+
 // 指引原数据
 // 指引原数据
-export interface IBillGuideItemResult {
+export interface IBillGuideItemResult extends IBillGuideCommonProp {
   libID: string;
   libID: string;
   ID: string;
   ID: string;
   ParentID: string;
   ParentID: string;
@@ -54,21 +61,19 @@ export interface IBillGuideItemResult {
   type: BillGuideItemType;
   type: BillGuideItemType;
   rationID?: number;
   rationID?: number;
   deleted?: boolean;
   deleted?: boolean;
-  outputItemCharacter?: boolean;
-  required?: boolean;
 }
 }
 
 
 // 指引数据
 // 指引数据
-export interface IBillGuideItem extends ITreeScm {
+export interface IBillGuideItem extends IBillGuideCommonProp {
   libID: string;
   libID: string;
   ID: string;
   ID: string;
+  parentID: string;
+  seq: number;
   billID: string;
   billID: string;
   name: string;
   name: string;
   type: BillGuideItemType;
   type: BillGuideItemType;
   rationID?: number;
   rationID?: number;
   select?: boolean;
   select?: boolean;
-  outputItemCharacter?: boolean;
-  required?: boolean;
 }
 }
 
 
 // 清单精灵数据选项
 // 清单精灵数据选项
@@ -76,10 +81,15 @@ export interface IBillElfOption {
   ID: string; // 选项对应原数据ID
   ID: string; // 选项对应原数据ID
   name: string;
   name: string;
   checked: boolean;
   checked: boolean;
+  unit?: string; // 单位,来自父项(工序)
+  optionInputVal?: string; // 选项里可能包含用户自己输入的input(运距等情况),有单位的情况下需要显示input
 }
 }
 
 
 // 清单精灵数据
 // 清单精灵数据
-export interface IBillElfItem extends ITreeScm {
+export interface IBillElfItem extends IBillGuideCommonProp {
+  ID: string;
+  parentID: string;
+  seq: number;
   // 工序
   // 工序
   process: string;
   process: string;
   // 工序选项数据
   // 工序选项数据
@@ -90,6 +100,9 @@ export interface IBillElfItem extends ITreeScm {
   isAdditional: boolean;
   isAdditional: boolean;
   outputItemCharacter?: boolean;
   outputItemCharacter?: boolean;
   required?: boolean;
   required?: boolean;
+  unit?: string; // 单位,识别辅助运距功能
+  isMaterial?: boolean; // 材料,辅助替换材料规格
+  isDefaultOption?: boolean; // 是否是默认选项
 }
 }
 
 
 // 清单下记录的清单精灵选项数据(1.为了后续为项目特征识别提供样本 2.审核可知道插入的定额是否准确)
 // 清单下记录的清单精灵选项数据(1.为了后续为项目特征识别提供样本 2.审核可知道插入的定额是否准确)
@@ -102,8 +115,26 @@ export interface IElfItem {
   option: string;
   option: string;
   // 选项对应的标准清单精灵节点ID,如果没有则说明是空行输入的
   // 选项对应的标准清单精灵节点ID,如果没有则说明是空行输入的
   optionID?: string;
   optionID?: string;
+  // 选项里可能包含用户自己输入的input(运距等情况)
+  optionInputVal?: string;
   // 是否是额外的非标准的,这个标记只是方便前台清单精灵功能
   // 是否是额外的非标准的,这个标记只是方便前台清单精灵功能
   isAdditional: boolean;
   isAdditional: boolean;
   // 记录这个选项对应的标准定额ID(考虑其他功能可能有用)
   // 记录这个选项对应的标准定额ID(考虑其他功能可能有用)
   rationID?: number;
   rationID?: number;
 }
 }
+
+// 清单精灵单条材料
+export interface IElfGlj {
+  gljID: number;
+  name?: string;
+  specs?: string;
+}
+
+// 清单精灵材料:用于清单精灵材料替换
+export interface IElfMaterial {
+  // 清单精灵库
+  libID: string;
+  ID: string;
+  billID: string;
+  materials: IElfGlj[];
+}