Explorar el Código

feat(types): 枚举名字首字母大写

zhangweicheng hace 4 años
padre
commit
8c5c57e0d1
Se han modificado 3 ficheros con 24 adiciones y 23 borrados
  1. 5 4
      types/src/interface/base.ts
  2. 8 8
      types/src/interface/glj.ts
  3. 11 11
      types/src/interface/ration.ts

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

@@ -42,24 +42,25 @@ export interface IResult<T = any> {
   data: T;
 }
 
-export enum fromType {
+export enum FromType {
   STD = 'std',
   CPT = 'cpt',
 }
 
-export enum prefix {
+export enum RationPrefix {
   BOR = '借',
   CPT = '补',
+  REP = '换',
 }
 
 // 工料机生成的类型
-export enum gljCreateType {
+export enum GljCreateType {
   NORMAL = 'normal',
   ADD = 'add',
   REPLACE = 'replace',
 }
 
-export enum createLocation {
+export enum CreateLocation {
   CSXM = 1, // 模板子目分别放在措施项目下
   FBFX = 2, // 模板子目分别放在分部分项下
   HNTZM = 3, // 模板子目分别放在对应混凝土子目下

+ 8 - 8
types/src/interface/glj.ts

@@ -3,7 +3,7 @@
  * @Author: vian
  * @Date: 2021-05-26 17:37:16
  */
-import { fromType, ITreeScm, supplyType } from './base';
+import { FromType, ITreeScm, supplyType } from './base';
 
 // 工料机类型
 export enum GljType {
@@ -124,7 +124,7 @@ export interface IComponent {
   code: string; // 对应工料机code
   type: GljType; // 工料机类型
   model?: number; // 机型
-  from: fromType; // std, cpt  来自标准工料机库、补充工料机库
+  from: FromType; // std, cpt  来自标准工料机库、补充工料机库
 }
 
 export enum MaterialType {
@@ -186,7 +186,7 @@ export interface IProjectGlj {
   qualityGrade?: string; // 质量等级
   brand?: string; // 品牌
   priceFrom?: string; // 价格来源
-  from: fromType; // std, cpt  来自标准工料机库、补充工料机库
+  from: FromType; // std, cpt  来自标准工料机库、补充工料机库
 }
 
 export interface IProjectGljs {
@@ -237,7 +237,7 @@ export interface IStdGlj extends IBaseRationGlj {
   repositoryID: number;
   type: number;
   components: IStdComponent[];
-  from: fromType;
+  from: FromType;
 }
 
 // 标准人材机分类树(原始数据)
@@ -253,7 +253,7 @@ export interface IRawStdGljTree {
 export interface IStdGljTree extends ITreeScm {
   repositoryID: number;
   name: string;
-  from: fromType;
+  from: FromType;
 }
 /* 标准人材机相关 ↑ */
 
@@ -262,7 +262,7 @@ export interface ICptComponent {
   ID: string; // 补充的ID改成了UUID ,标准的不变,但是这里
   consumeAmt: number;
   consumeAmtProperty: any; // 多消耗量的情况
-  from: fromType;
+  from: FromType;
 }
 
 export interface ICptGlj extends IBaseRationGlj {
@@ -271,7 +271,7 @@ export interface ICptGlj extends IBaseRationGlj {
   type: number;
   compilationID: string;
   components: ICptComponent[];
-  from: fromType;
+  from: FromType;
 }
 /* 补充人材机相关 ↑ */
 
@@ -282,7 +282,7 @@ export interface ISelectGljLibItem {
   repositoryID: number | string;
   key: string; // 与gljLibID拼接的形成的唯一值
   isPrior: boolean; // 优先的
-  from: fromType;
+  from: FromType;
   located?: boolean; // 定位到的库(替换时需要)
 }
 

+ 11 - 11
types/src/interface/ration.ts

@@ -1,9 +1,9 @@
 /* eslint-disable camelcase */
 import {
-  prefix,
-  fromType,
-  gljCreateType,
-  createLocation,
+  RationPrefix,
+  FromType,
+  GljCreateType,
+  CreateLocation,
   BRType,
 } from './base';
 import { IBookmark } from './bill';
@@ -46,7 +46,7 @@ export interface ICptRationChapter {
 export interface IBaseRationGljRef {
   consumeAmt: number;
   proportion?: number; // 配合比,暂时无需使用,默认0
-  type?: fromType; // 可能有数据没有
+  type?: FromType; // 可能有数据没有
 }
 
 export interface IStdRationGljRef extends IBaseRationGljRef {
@@ -165,7 +165,7 @@ export interface IBaseRation {
   rationAssList: IStdRationAss[];
   rationInstList: IStdRationInstall[];
   rationTemplateList: IStdRationTemp[];
-  fromType?: fromType; // 单条查找结果时用到
+  FromType?: FromType; // 单条查找结果时用到
 }
 export interface IStdRation extends IBaseRation {
   ID: number;
@@ -203,8 +203,8 @@ export interface IRationGlj {
   customQuantity?: number;
   rationQuantity?: number;
   tenderQuantity?: number; // 调整后消耗量
-  createType: gljCreateType; // normal、add、replace  正常、添加工料机、替换工料机
-  from: fromType; // std, cpt  来自标准工料机库、补充工料机库
+  createType: GljCreateType; // normal、add、replace  正常、添加工料机、替换工料机
+  from: FromType; // std, cpt  来自标准工料机库、补充工料机库
 }
 
 export interface IGljQtyCoe {
@@ -239,7 +239,7 @@ export interface ITemplateItem {
   billID?: string; // 记取位置对应的清单ID
 }
 export interface IRationTemplate {
-  createLocation: createLocation; // 提取位置
+  CreateLocation: CreateLocation; // 提取位置
   templateList: ITemplateItem[];
 }
 
@@ -278,7 +278,7 @@ export interface IRation {
   noAdjustPrice?: boolean; // { type: boolean; default: false }; // 不调价
   targetUnitFee?: string; // 目标单价
   targetTotalFee?: string; // 目标合价
-  from?: fromType; // { type: string; default: 'std' }; // std, cpt  来自标准、补充
+  from?: FromType; // { type: string; default: 'std' }; // std, cpt  来自标准、补充
   isSubcontract?: boolean; // 是否分包
   installationKey?: string; // 用来记录安装增加费的关联字段
   // 定额特有属性:
@@ -292,7 +292,7 @@ export interface IRation {
   content?: string; // 工作内容
   annotation?: string; // 附注
   ruleText?: string; // 计算规则
-  prefix?: prefix; // { type: string; default: '' }; // 定额是补充、借用时用  补 借
+  prefix?: RationPrefix; // { type: string; default: '' }; // 定额是补充、借用时用  补 借
   referenceRationID?: string; // 如果是通过模板关联子目生成的定额,这里记录对应的主定额ID
   jobContentText?: string; // 工作内容 (选择自清单)
   manageFeeRate?: string; // 管理费率