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

refactor(type): 重构辅助定额

vian 4 лет назад
Родитель
Сommit
6d71ac03fd
1 измененных файлов с 26 добавлено и 17 удалено
  1. 26 17
      types/src/interface/ration.ts

+ 26 - 17
types/src/interface/ration.ts

@@ -64,20 +64,29 @@ export interface IStdRationGljRef extends IBaseRationGljRef {
 export interface ICptRationGljRef extends IBaseRationGljRef {
   gljId: string | number; // 原std库已经是这样,不能改成ID
 }
-export interface IStdRationAss {
-  name: string;
-  assistCode: string;
-  stdValue: string;
-  stepValue: string;
-  decimal: number;
-  carryBit: string;
-  minValue: string;
-  maxValue: string;
-  paramName: string; // 参数名称
-  param: string; // 参数
-  thirdRationCode: string; // 第三定额
+
+// 基准辅助定额
+export interface IBaseRationAss {
+  name: string; // 调整名称
+  assistCode: string; // 辅助定额号
+  stdValue: string; // 标准值
+  stepValue: string; // 步距
+  decimal: number; // 精度
+  carryBit: string; // 进位方式
+  minValue?: string; // 最小值
+  maxValue?: string; // 最大值
+}
+
+// 标准定额辅助
+export interface IStdRationAss extends IBaseRationAss {
+  paramName?: string; // 参数名称
+  param?: string; // 参数
+  thirdRationCode?: string; // 第三定额
 }
 
+// 补充定额辅助
+type ICptRationAss = IBaseRationAss;
+
 export interface IStdRationInstall {
   feeItemId: string; // 原std库已经是这样,不能改成ID
   sectionId: string; // 原std库已经是这样,不能改成ID
@@ -161,7 +170,7 @@ export interface IRationCoe {
 }
 
 export interface IBaseRation {
-  code?: string;
+  code: string;
   name?: string;
   unit?: string;
   basePrice: number;
@@ -174,7 +183,7 @@ export interface IBaseRation {
   annotation?: string;
   manageFeeRate?: string; // 管理费费率
   rationCoeList?: ICoeList[];
-  rationAssList?: IStdRationAss[];
+  rationAssList?: IBaseRationAss[];
   rationInstList?: IStdRationInstall[];
   rationTemplateList?: IStdRationTemp[];
   from?: FromType; // 单条查找结果时用到
@@ -184,17 +193,17 @@ export interface IStdRation extends IBaseRation {
   rationRepId: number;
   sectionId: number;
   rationGljList: IStdRationGljRef[];
-
+  rationAssList?: IStdRationAss[];
   chapter?: IStdRationChapter;
 }
 
 export interface ICptRation extends IBaseRation {
-  code: string;
   ownerID: string;
   compilationID: string;
   ID: string;
   sectionId: string;
   rationGljList: ICptRationGljRef[];
+  rationAssList: ICptRationAss[];
   chapter?: ICptRationChapter;
 }
 
@@ -229,7 +238,7 @@ export interface IGljQtyCoe {
 }
 
 // 实际保存到项目中的辅助定额数据
-export interface IRationAss extends IStdRationAss {
+export interface IRationAss extends IBaseRationAss {
   ID: string;
   actualValue?: number;
   isAdjust: boolean; // 是否调整