Parcourir la source

feat(types): 添加列设置,工料机类型缩写定义

zhangweicheng il y a 5 ans
Parent
commit
1570fa671f

+ 13 - 0
types/src/interface/base.ts

@@ -131,3 +131,16 @@ export interface ISetData<T = any> {
   odocs?: any[]; // 存放撤销的原始数据?
   result?: any; // 特殊的返回结果
 }
+
+export interface IColumnMeta {
+  title: string;
+  data: string;
+  renderer?: string;
+  editor?: string;
+  readOnly?: boolean;
+  width: number;
+  type?: string;
+  numericFormat?: { pattern?: string; zeroFormat?: string };
+  visible?: boolean;
+  source?: string[];
+}

+ 1 - 0
types/src/interface/bill.ts

@@ -20,6 +20,7 @@ export interface IBill {
   parentID: string;
   seq: number;
   kind: BRType;
+  stdID?: string;
   unit?: string;
   code?: string;
   name?: string;

+ 34 - 0
types/src/interface/glj.ts

@@ -39,3 +39,37 @@ export interface IBaseGlj {
   unit: string;
   [key: string]: any;
 }
+
+export interface IDisplayType {
+  [type: number]: string;
+}
+
+export const DisplayType: IDisplayType = {
+  1: '人',
+  201: '材',
+  202: '砼',
+  203: '浆',
+  204: '配比',
+  205: '商砼',
+  206: '商浆',
+  207: '材',
+  208: '外购',
+  209: '苗木',
+  301: '机',
+  302: '机',
+  303: '机人',
+  304: '仪',
+  305: '动',
+  306: '折',
+  307: '检',
+  308: '维',
+  309: '安',
+  310: '校',
+  311: '机',
+  312: '机',
+  4: '主',
+  5: '设',
+  6: '管',
+  7: '利',
+  8: '险',
+};

+ 9 - 2
types/src/interface/project.ts

@@ -1,6 +1,12 @@
 import { ILabourCoeFile } from './labourCoe';
 import { IIncreaseSetting } from './increaseFee';
-import { ITreeScm, IFileRef, DeleteEnum, INumFileRef } from './base';
+import {
+  ITreeScm,
+  IFileRef,
+  DeleteEnum,
+  INumFileRef,
+  IColumnMeta,
+} from './base';
 import { ICalcOption, ITenderSetting } from './calculation';
 
 export enum ProjectType {
@@ -199,6 +205,7 @@ export interface IProperty {
   economics?: IEconomicIndex[];
 }
 
+// 原来的列设置太复杂了,没什么必要
 export interface IMainTreeCol {
   cols: Array<any>;
   headRowHeight: Array<number>;
@@ -221,7 +228,7 @@ export interface IProject extends ITreeScm {
   code?: string;
   createDate: number;
   property?: IProperty;
-  mainTreeCol?: IMainTreeCol;
+  ColMetas?: IColumnMeta[];
   gljCol?: IGLJCol;
   changeMark?: string;
   remark?: string;