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

refactor(types): 子目换算调整

vian 4 лет назад
Родитель
Сommit
1e211c1bdb
2 измененных файлов с 14 добавлено и 10 удалено
  1. 2 4
      types/src/interface/base.ts
  2. 12 6
      types/src/interface/ration.ts

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

@@ -126,13 +126,11 @@ export enum CptModelName {
   feeRateFile = 'feeRateFile',
   labourCoeFile = 'labourCoeFile',
   importLogs = 'importLogs',
-  cptRationTree = 'cptRationTree',
   cptGlj = 'cptGlj',
   cptGljTree = 'cptGljTree',
-  cptRationCoeList = 'cptRationCoeList',
-  cptRationInstallation = 'cptRationInstallation',
-  cptRationInstallationSection = 'cptRationInstallationSection',
+  cptRationTree = 'cptRationTree',
   cptRation = 'cptRation',
+  cptRationCoe = 'cptRationCoe',
   cptRationChapterTrees = 'cptRationChapterTrees',
   configMaterials = 'configMaterials',
   projectGljs = 'projectGljs',

+ 12 - 6
types/src/interface/ration.ts

@@ -104,7 +104,7 @@ export interface IStdRationCondition {
   rationRepIds: number[];
 }
 export interface ICoeList {
-  ID: number;
+  ID: number | string;
   no: number;
 }
 
@@ -121,10 +121,10 @@ export enum CoeType {
   SELECT = '所选人材机',
 }
 
-export interface IStdCoe {
+export interface IBaseCoe {
   coeType: CoeType; // 系数类型,指作用范围:
   // 单个(如:111量0.001)、人工类、材料类、机械类、全部(如:定额×0.925)。
-  gljID?: number; // 要调整的工料机ID(当coeType=0时有效)
+  gljID?: number; // 要调整的工料机ID(当coeType=单个工料机时有效)
   operator: string; // 运算符(*、+、-、=)
   amount: string; // 调整的量
   gljCode: string;
@@ -133,12 +133,16 @@ export interface IStdCoe {
   replaceName?: string;
 }
 
+export type IStdCoe = IBaseCoe;
+
+export type ICptCoe = IBaseCoe;
+
 export interface IBaseCoeItem {
-  ID: number;
+  ID: number | string;
   serialNo?: number; // 编号
   name: string; // 名称
   content?: string; // 说明
-  coes: IStdCoe[];
+  coes: IBaseCoe[];
 }
 
 export interface IOptionList {
@@ -146,8 +150,9 @@ export interface IOptionList {
   value: string;
 }
 export interface ICptCoeItem extends IBaseCoeItem {
-  userID: string;
+  ownerID: string;
   compilationID: string;
+  coes: ICptCoe[];
 }
 
 export interface IStdCoeItem extends IBaseCoeItem {
@@ -155,6 +160,7 @@ export interface IStdCoeItem extends IBaseCoeItem {
   original_code?: string; // 原人材机编码
   option_codes?: string; // 可选人材机编码
   option_list?: IOptionList[]; // 下拉列表选项
+  coes: IStdCoe[];
 }
 
 export interface IRationCoe {