Explorar el Código

feat(types): 添加三材类别相关

zhangweicheng hace 5 años
padre
commit
f7b888ed70
Se han modificado 3 ficheros con 22 adiciones y 4 borrados
  1. 1 1
      types/package.json
  2. 19 1
      types/src/interface/glj.ts
  3. 2 2
      types/src/interface/ration.ts

+ 1 - 1
types/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@sc/types",
-  "version": "1.0.20",
+  "version": "1.0.21",
   "description": "共用类型文件",
   "main": "./dist/index.cjs.js",
   "module": "./dist/index.esm.js",

+ 19 - 1
types/src/interface/glj.ts

@@ -89,6 +89,24 @@ export interface IComponent {
   from: fromType; // std, cpt  来自标准工料机库、补充工料机库
 }
 
+export enum MaterialType {
+  GC = 1,
+  GJ = 2,
+  MC = 3,
+  SN = 4,
+  ST = 5,
+  SS = 6,
+}
+
+export const MaterialDisplay = {
+  1: '钢材',
+  2: '钢筋',
+  3: '木材',
+  4: '水泥',
+  5: '商品砼',
+  6: '商品砂浆',
+};
+
 export interface IProjectGlj {
   ID: string;
   gljID: string; // 工料机ID
@@ -117,7 +135,7 @@ export interface IProjectGlj {
   techQuantity?: string; // 技术措施项目消耗量
   subdivisionQuantity?: string; // 分部分项消耗量
   tenderPrice?: string; // 调整后价格
-  materialType?: number; // 三材类别
+  materialType?: MaterialType; // 三材类别
   materialCoe?: number; // 三材系数
   // 经济指标数据
   materialIndexType?: string; // 工料指标类别

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

@@ -6,7 +6,7 @@ import {
   createLocation,
   BRType,
 } from './base';
-import { GljType } from './glj';
+import { GljType, MaterialType } from './glj';
 import { IQuantityDetail } from './quantityDetail';
 
 export interface IStdRationChapter {
@@ -185,7 +185,7 @@ export interface IBaseRationGlj {
   shortName: string;
   unit: string;
   adjCoe: number;
-  materialType: number; // 三材类别
+  materialType: MaterialType; // 三材类别
   materialCoe: number; // 三材系数
   // 经济指标数据
   materialIndexType: string; // 工料指标类别