Quellcode durchsuchen

Merge branch 'master' of http://192.168.1.41:3000/SmartCost/SCCommon

zhangweicheng vor 4 Jahren
Ursprung
Commit
d372280cf0
2 geänderte Dateien mit 113 neuen und 50 gelöschten Zeilen
  1. 102 1
      types/src/interface/glj.ts
  2. 11 49
      types/src/interface/ration.ts

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

@@ -1,4 +1,9 @@
-import { fromType, supplyType } from './base';
+/*
+ * @Descripttion:
+ * @Author: vian
+ * @Date: 2021-05-26 17:37:16
+ */
+import { fromType, ITreeScm, supplyType } from './base';
 
 // 工料机类型
 export enum GljType {
@@ -157,3 +162,99 @@ export interface IProjectGljs {
   projectID: string;
   projectGljs: IProjectGlj[];
 }
+
+/* 标准人材机相关 ↓ */
+// 标准、补充人材机共用属性(原始数据)
+export interface IBaseRationGlj {
+  code: string;
+  name: string;
+  specs?: string;
+  basePrice: number;
+  priceProperty: any; // 多单价的情况
+  gljClass: number;
+  model: number; // 机型
+  shortName: string;
+  unit: string;
+  adjCoe: number;
+  materialType: MaterialType; // 三材类别
+  materialCoe: number; // 三材系数
+  // 经济指标数据
+  materialIndexType: string; // 工料指标类别
+  materialIndexUnit: string; // 工料指标单位
+  materialIndexCoe: number; // 单位转换系数
+  taxRate: string; // 税率
+}
+
+// 标准人材机组成物
+export interface IStdComponent {
+  ID: number;
+  consumeAmt: number;
+  consumeAmtProperty: any; // 多消耗量的情况
+}
+
+// 标准人材机(原始数据)
+export interface IRawStdGlj extends IBaseRationGlj {
+  ID: number;
+  repositoryId: number;
+  gljType: number;
+  component: IStdComponent[];
+}
+
+// 标准人材机
+export interface IStdGlj extends IBaseRationGlj {
+  ID: number;
+  gljLibID: number;
+  type: number;
+  components: IStdComponent[];
+}
+
+// 标准人材机分类树(原始数据)
+export interface IRawStdGljTree {
+  ID: number;
+  ParentID: number;
+  NextSiblingID: number;
+  repositoryId: number;
+  Name: string;
+}
+
+// 标准人材机分类树
+export interface IStdGljTree extends ITreeScm {
+  gljLibID: number;
+  name: string;
+}
+/* 标准人材机相关 ↑ */
+
+/* 补充人材机相关 ↓ */
+export interface ICptComponent {
+  ID: string; // 补充的ID改成了UUID ,标准的不变,但是这里
+  consumeAmt: number;
+  consumeAmtProperty: any; // 多消耗量的情况
+  from: fromType;
+}
+
+export interface ICptGlj extends IBaseRationGlj {
+  ID: string;
+  ownerID: string;
+  type: number;
+  compilationID: string;
+  components: ICptComponent[];
+}
+/* 补充人材机相关 ↑ */
+
+/* 选择人材机相关 ↓ */
+// 库下拉项
+export interface ISelectGljLibItem {
+  name: string;
+  gljLibID: number | string;
+  key: string; // 与gljLibID拼接的形成的唯一值
+  isPrior: boolean; // 优先的
+  from: fromType;
+}
+
+// 选择人材机接口返回数据格式
+export interface ISelectGljResult {
+  libData: ISelectGljLibItem[]; // 库下拉项
+  treeData: IStdGljTree[]; // 人材机分类树
+}
+
+/* 选择人材机相关 ↑ */

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

@@ -7,9 +7,18 @@ import {
   BRType,
 } from './base';
 import { IBookmark } from './bill';
-import { GljType, MaterialType } from './glj';
+import { GljType, ICptGlj, IStdGlj, MaterialType } from './glj';
 import { IQuantityDetail } from './quantityDetail';
 
+// 标准定额库
+export interface IStdRationLib {
+  dispName: string;
+  compilationId: string;
+  compilationName: string;
+  gljLib: number;
+  ID: number;
+}
+
 export interface IStdRationChapter {
   rationRepId: number; // 标准库的属性
   ID: string; // 补充库的直接用新结构,所以有两种类型
@@ -176,40 +185,6 @@ export interface ICptRation extends IBaseRation {
   chapter?: ICptRationChapter;
 }
 
-export interface IStdComponent {
-  ID: number;
-  consumeAmt: number;
-  consumeAmtProperty: any; // 多消耗量的情况
-}
-export interface ICptComponent {
-  ID: string; // 补充的ID改成了UUID ,标准的不变,但是这里
-  consumeAmt: number;
-  consumeAmtProperty: any; // 多消耗量的情况
-  from: fromType;
-}
-
-export interface IBaseRationGlj {
-  code: string;
-  name: string;
-  specs?: string;
-  basePrice: number;
-  priceProperty: any; // 多单价的情况
-  gljClass: number;
-  type: number; // 这个要和项目工料机等统一,所以在查找项目工料机的时候转一下,
-  gljType: number;
-  model: number; // 机型
-  shortName: string;
-  unit: string;
-  adjCoe: number;
-  materialType: MaterialType; // 三材类别
-  materialCoe: number; // 三材系数
-  // 经济指标数据
-  materialIndexType: string; // 工料指标类别
-  materialIndexUnit: string; // 工料指标单位
-  materialIndexCoe: number; // 单位转换系数
-  taxRate: string; // 税率
-}
-
 // 保存到项目下的定额工料机
 export interface IRationGlj {
   ID: string;
@@ -234,19 +209,6 @@ export interface IRationGlj {
   from: fromType; // std, cpt  来自标准工料机库、补充工料机库
 }
 
-export interface IStdRationGlj extends IBaseRationGlj {
-  ID: number;
-  repositoryId: number;
-  components: IStdComponent[];
-}
-
-export interface ICptRationGlj extends IBaseRationGlj {
-  ID: string;
-  userID: string;
-  compilationID: string;
-  components: ICptComponent[];
-}
-
 export interface IGljQtyCoe {
   labour: number; // 人工
   material: number; // 材料
@@ -369,7 +331,7 @@ export interface IRations {
 
 export interface IStdRationsAndGljs {
   rations: (IStdRation | ICptRation)[];
-  rationGljs: (IStdRationGlj | ICptRationGlj)[];
+  rationGljs: (IStdGlj | ICptGlj)[];
 }
 
 export enum RationListType {