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

feat(types): 企业定额相关

vian 4 лет назад
Родитель
Сommit
bf40ba8636
2 измененных файлов с 30 добавлено и 6 удалено
  1. 1 0
      types/src/interface/base.ts
  2. 29 6
      types/src/interface/ration.ts

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

@@ -133,6 +133,7 @@ export enum CptModelName {
   importLogs = 'importLogs',
   cptGlj = 'cptGlj',
   cptGljTree = 'cptGljTree',
+  cptRationLib = 'cptRationLib',
   cptRationTree = 'cptRationTree',
   cptRation = 'cptRation',
   cptRationCoe = 'cptRationCoe',

+ 29 - 6
types/src/interface/ration.ts

@@ -1,4 +1,3 @@
-import { IReceivedShareLib } from './share';
 /* eslint-disable camelcase */
 import {
   RationPrefix,
@@ -156,7 +155,7 @@ export interface IOptionList {
 }
 export interface ICptCoeItem extends IBaseCoeItem {
   ID: string;
-  ownerID: string;
+  libID: string;
   compilationID: string;
   coes: ICptCoe[];
 }
@@ -212,7 +211,7 @@ export interface IStdRation extends IBaseRation {
 }
 
 export interface ICptRation extends IBaseRation {
-  ownerID: string;
+  libID: string;
   compilationID: string;
   ID: string;
   sectionId: string;
@@ -375,8 +374,9 @@ export interface ICptRationTree extends ITreeScm {
 
 // 补充定额章节树容器
 export interface ICptRationTreeData {
+  libID: string;
+  ID: string;
   compilationID: string;
-  ownerID: string; // 企业或用户
   treeData: ICptRationTree[];
 }
 
@@ -443,10 +443,33 @@ export enum RationSubProp {
   TPL = 'rationTemplate', // 定额子目模板
 }
 
+// 补充定额库选项
+export interface ICptRationLibOption {
+  ID: string;
+  name: string;
+  readOnly: boolean;
+}
+
 // 进入定额库需要准备的数据(一些状态)
 export interface IPrepareCptRationLib {
   // 定额库分享人数
   shareCount: number;
-  // 接收到的分享定额库数据
-  receiveLibs: IReceivedShareLib[];
+  // 库下拉选项
+  libOptions: ICptRationLibOption[];
+}
+
+// 补充定额库
+export interface ICptRationLib {
+  ID: string;
+  // 库名称,预留字段,以后可能允许自行新建补充库
+  name?: string;
+  // 费用定额ID
+  compilationID: string;
+  // 企业ID,可为空字符串
+  enterpriseID: string;
+  // 用户ID
+  userID: string;
+  // 是否为企业内部库
+  isEnterpriseInternal: boolean;
+  createDate: number;
 }