@ningboyz/types 1.0.22 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/index.ts +8 -0
  2. package/package.json +1 -1
  3. package/src/antv/IAntvCnfgResponse.ts +69 -0
  4. package/src/antv/IAntvMainResponse.ts +67 -0
  5. package/src/antv/IAntvParaResponse.ts +48 -0
  6. package/src/antv/index.ts +5 -0
  7. package/src/card/ICardMainFindResponse.ts +21 -0
  8. package/src/card/ICardMainResponse.ts +265 -130
  9. package/src/card/IGblbResponse.ts +64 -5
  10. package/src/card/IP4pzResponse.ts +68 -0
  11. package/src/card/IZcbdResponse.ts +108 -9
  12. package/src/card/IZccfResponse.ts +145 -3
  13. package/src/card/IZcczResponse.ts +139 -0
  14. package/src/card/IZcdbResponse.ts +154 -0
  15. package/src/card/IZclbResponse.ts +138 -0
  16. package/src/card/IZczjPropResponse.ts +94 -0
  17. package/src/card/IZczjResponse.ts +121 -0
  18. package/src/card/index.ts +23 -6
  19. package/src/conf/IConfig.ts +2 -0
  20. package/src/conf/index.ts +1 -1
  21. package/src/const/const_bizCode.ts +3 -0
  22. package/src/const/const_module.ts +72 -0
  23. package/src/const/const_p4pt.ts +8 -0
  24. package/src/const/const_stat.ts +11 -2
  25. package/src/const/const_todo.ts +5 -0
  26. package/src/const/const_type_name.ts +10 -0
  27. package/src/const/const_wldy_item_type.ts +4 -0
  28. package/src/const/const_wtui_item_type.ts +20 -0
  29. package/src/const/index.ts +7 -1
  30. package/src/core/ICoreValidResponse.ts +21 -0
  31. package/src/core/IDeptLiteResponse.ts +0 -1
  32. package/src/core/IDeptResponse.ts +60 -0
  33. package/src/core/IDictResponse.ts +45 -2
  34. package/src/core/IDictResponseDictPara.ts +2 -0
  35. package/src/core/ILaidResponse.ts +34 -1
  36. package/src/core/IPartResponse.ts +30 -0
  37. package/src/core/ISysMenuWithCoreResponse.ts +3 -2
  38. package/src/core/ISysTravelResponse.ts +135 -0
  39. package/src/core/ITypeResponse.ts +27 -0
  40. package/src/core/IUnitResponse.ts +101 -6
  41. package/src/core/IUserLiteResponse.ts +2 -0
  42. package/src/core/IUserResponse.ts +30 -0
  43. package/src/core/index.ts +8 -0
  44. package/src/enums/btnMode.ts +84 -3
  45. package/src/enums/emitterType.ts +5 -0
  46. package/src/enums/index.ts +2 -2
  47. package/src/enums/storeId.ts +4 -1
  48. package/src/enums/usesStat.ts +13 -0
  49. package/src/enums/whatDone.ts +29 -0
  50. package/src/flow/IFlowCnfgResponse.ts +0 -2
  51. package/src/flow/IFlowDataResponse.ts +34 -0
  52. package/src/flow/IFlowDutyResponse.ts +3 -2
  53. package/src/flow/IFlowNodeResponse.ts +15 -1
  54. package/src/flow/index.ts +0 -1
  55. package/src/gzjg/IGzjgGzlmResponse.ts +3 -2
  56. package/src/gzjg/IGzjgGzlmResponseGzlmPara.ts +2 -0
  57. package/src/gzjg/IGzjgMainResponse.ts +5 -2
  58. package/src/gztb/IGztbMainResponse.ts +103 -0
  59. package/src/gztb/index.ts +3 -0
  60. package/src/load/index.ts +2 -2
  61. package/src/micro/appName.ts +2 -1
  62. package/src/noti/INotiMainResponse.ts +278 -0
  63. package/src/noti/index.ts +3 -0
  64. package/src/pzpt/IPzptItemResponse.ts +0 -2
  65. package/src/response/IResponse.ts +31 -0
  66. package/src/store/dateState.ts +48 -0
  67. package/src/store/index.ts +4 -2
  68. package/src/store/menuState.ts +9 -0
  69. package/src/store/userState.ts +3 -0
  70. package/src/tabl/ITablDataResponse.ts +2 -0
  71. package/src/tabl/ITablMainResponse.ts +2 -0
  72. package/src/task/ITaskMainResponse.ts +121 -0
  73. package/src/task/index.ts +3 -0
  74. package/src/wldy/IWldyPageResponse.ts +4 -3
  75. package/src/wldy/index.ts +5 -5
  76. package/src/wtui/ITodoResponse.ts +15 -0
  77. package/src/wtui/IViewCtrlResponse.ts +15 -7
  78. package/src/wtui/IWtuiColWidthResponse.ts +53 -0
  79. package/src/wtui/IWtuiFormParaResponse.ts +17 -0
  80. package/src/wtui/IWtuiFormResponse.ts +95 -0
  81. package/src/wtui/IWtuiItemCalc.ts +36 -0
  82. package/src/wtui/IWtuiItemEffect.ts +43 -0
  83. package/src/wtui/IWtuiItemParaResponse.ts +59 -0
  84. package/src/wtui/IWtuiItemResponse.ts +119 -0
  85. package/src/wtui/IWtuiMainResponse.ts +3 -0
  86. package/src/wtui/IWtuiNodeResponse.ts +71 -0
  87. package/src/wtui/IWtuiTodoResponse.ts +36 -0
  88. package/src/wtui/IWtuiTodoResponseTodoPara.ts +7 -0
  89. package/src/wtui/IWtuiTodoResponseWithPara.ts +32 -0
  90. package/src/wtui/IWtuiUserCnfgResponse.ts +100 -0
  91. package/src/wtui/IWtuiZoneResponse.ts +61 -0
  92. package/src/wtui/index.ts +46 -1
  93. package/src/enums/wldyItemType.ts +0 -5
@@ -1,4 +1,8 @@
1
+ import { Const, TCore } from "../..";
1
2
  import { IPathResponse } from "../core";
3
+ import { TFlowDataResponse } from "../flow";
4
+ import { ICardMainResponse } from "./ICardMainResponse";
5
+ import _ from "lodash";
2
6
 
3
7
  export interface IZcbdResponse {
4
8
  whoBuild: number;
@@ -37,21 +41,47 @@ export interface IZcbdResponse {
37
41
  flowUndo: number;
38
42
  flowText: string;
39
43
  flowUser: string;
40
- cardMain: number;
41
- cardExid: number;
42
- valueNew: number;
44
+ /** 变动时间 */
43
45
  zcbdDate: number;
46
+ /** 流程状态:(0:制单;1:送审;2:终审) */
44
47
  zcbdStat: number;
48
+ /** 变动方式(字典) */
45
49
  zcbdType: number;
46
- /** 变动编码 */
50
+ /** 变动方式(字典)文字信息 */
51
+ zcbdTypeText: string;
52
+ /** 单据编号 */
47
53
  zcbdCode: string;
48
- /** 变动名称 */
54
+ /** 资产变动关联的资产名称 */
49
55
  zcbdName: string;
56
+ /** 变动原因 */
50
57
  zcbdUses: string;
51
- /** 变动备注 */
58
+ /** 备注说明 */
52
59
  zcbdMemo: string;
53
60
 
61
+ /** 单位名称 */
62
+ unitText: string;
63
+
64
+ /** 挂起状态 */
65
+ hideStat: number;
66
+
67
+ lastDate: number;
68
+ lastTime: number;
69
+ flowMain: number;
70
+ flowNode: number;
71
+ flowStat: number;
72
+ didFirst: number;
73
+ lastMemo: string;
74
+ userName: string;
75
+ userGUID: string;
76
+
77
+ /** 变动前卡片 */
78
+ listBeforeBill: ICardMainResponse[];
79
+ /** 变动后卡片 */
80
+ listAfterBill: ICardMainResponse[];
54
81
  listPath: IPathResponse[];
82
+
83
+ /** 虚拟字段 */
84
+ cardIndx: ICardMainResponse[] | undefined; // 用以选择资产名称时获取cardList,就前段使用
55
85
  }
56
86
 
57
87
  export class TZcbdResponse implements IZcbdResponse {
@@ -91,16 +121,85 @@ export class TZcbdResponse implements IZcbdResponse {
91
121
  flowUndo: number = 0;
92
122
  flowText: string = "";
93
123
  flowUser: string = "";
94
- cardMain: number = 0;
95
- cardExid: number = 0;
96
- valueNew: number = 0;
97
124
  zcbdDate: number = 0;
98
125
  zcbdStat: number = 0;
99
126
  zcbdType: number = 0;
127
+ zcbdTypeText: string = "";
128
+
100
129
  zcbdCode: string = "";
101
130
  zcbdName: string = "";
102
131
  zcbdUses: string = "";
103
132
  zcbdMemo: string = "";
104
133
 
134
+ hideStat: number = 0;
135
+
136
+ unitText: string = "";
137
+
138
+ lastDate: number = 0;
139
+ lastTime: number = 0;
140
+ flowMain: number = 0;
141
+ flowNode: number = 0;
142
+ flowStat: number = 0;
143
+ didFirst: number = 0;
144
+ lastMemo: string = "";
145
+ userName: string = "";
146
+ userGUID: string = "";
147
+
148
+ listBeforeBill: ICardMainResponse[] = [];
149
+ listAfterBill: ICardMainResponse[] = [];
105
150
  listPath: IPathResponse[] = [];
151
+ /** 虚拟字段 */
152
+ cardIndx: ICardMainResponse[] | undefined = undefined;
153
+
154
+ static toFlowData(zcbd: TZcbdResponse): TFlowDataResponse {
155
+ const result = new TFlowDataResponse();
156
+ result.whoBuild = zcbd.whoBuild;
157
+ result.userIndx = zcbd.userIndx;
158
+ result.flowMain = zcbd.flowMain;
159
+ result.flowNode = zcbd.flowNode;
160
+ result.notified = Const.Todo.CONST_STR_TODO_TYPE_TO_ZCBD_WAIT;
161
+ result.entityID = zcbd.entityID;
162
+ result.billMain = zcbd.zcbdIndx;
163
+ result.billCode = zcbd.zcbdCode;
164
+ result.billMemo = zcbd.zcbdMemo;
165
+ result.createAt = zcbd.createAt;
166
+ result.mastName = zcbd.mastName;
167
+ result.createBy = zcbd.createBy;
168
+ result.unitMain = zcbd.unitMain;
169
+ result.deptMain = zcbd.deptMain;
170
+ result.menuUUID = zcbd.menuUUID;
171
+ result.flowStat = zcbd.zcbdStat;
172
+ return result;
173
+ }
174
+
175
+ static toFlowDatas(zcbds: TZcbdResponse[]): TFlowDataResponse[] {
176
+ return zcbds.map((u) => this.toFlowData(u));
177
+ }
178
+
179
+ static toTravel(card: TZcbdResponse): TCore.ISysTravelResponse {
180
+ const travel = new TCore.TSysTravelResponse();
181
+ travel.whoBuild = card.whoBuild;
182
+ travel.flowMain = card.flowMain;
183
+ travel.flowNode = card.flowNode;
184
+ travel.billUUID = card.entityID;
185
+ travel.billMain = card.zcbdIndx;
186
+ travel.billCode = card.zcbdCode;
187
+ travel.mastName = card.mastName;
188
+ travel.createBy = card.createBy;
189
+ travel.menuUUID = card.menuUUID;
190
+ return travel;
191
+ }
192
+
193
+ /** 转换成记录日志需要的数据(第一层,不包含菜单) */
194
+ static toTravelData(card?: TZcbdResponse | TZcbdResponse[]): TCore.ISysTravelResponse[] {
195
+ if (_.isNil(card)) {
196
+ return [];
197
+ }
198
+ if (_.isArray(card)) {
199
+ return card.map((u) => {
200
+ return this.toTravel(u);
201
+ });
202
+ }
203
+ return [this.toTravel(card)];
204
+ }
106
205
  }
@@ -1,8 +1,9 @@
1
+ import { Const, TCore } from "../..";
1
2
  import { IPathResponse } from "../core";
3
+ import { TFlowDataResponse } from "../flow";
4
+ import { ICardMainResponse } from "./ICardMainResponse";
5
+ import _ from "lodash";
2
6
 
3
- /**
4
- * 资产拆分类型
5
- */
6
7
  export interface IZccfResponse {
7
8
  whoBuild: number;
8
9
  userIndx: number;
@@ -40,9 +41,63 @@ export interface IZccfResponse {
40
41
  flowUndo: number;
41
42
  flowText: string;
42
43
  flowUser: string;
44
+ /** 拆分前的card_indx(母卡) */
43
45
  cardMain: number;
46
+ /** 拆分前的card_exid(母卡) */
44
47
  cardExid: number;
48
+ /** 拆分后的card_exid(母卡) */
49
+ valueNew: number;
50
+ /** 申请日期 */
51
+ zccfDate: number;
52
+ /** 流程状态:(0:制单;1:送审;2:终审) */
53
+ zccfStat: number;
54
+ /** 单据类型 */
55
+ zccfType: number;
56
+ /** 单据编号 */
57
+ zccfCode: string;
58
+ /** 待定 */
59
+ zccfName: string;
60
+ /** 申请用途 */
61
+ zccfUses: string;
62
+ /** 备注说明 */
63
+ zccfMemo: string;
64
+ /** 拆分数量 */
65
+ zccfSize: number;
66
+ /** 拆分原值 */
67
+ zccfZcyz: number;
68
+ /** 单位名称 */
69
+ unitText: string;
70
+ /** 资产编码 */
71
+ cardCode: string;
72
+ /** 资产名称 */
73
+ cardName: string;
74
+ /** 资产数量 */
75
+ cardSize: number;
76
+ /** 资产原值 */
77
+ cardZcyz: number;
78
+ /** 资产净值 */
79
+ zccfZcjz: number;
80
+ /** 累计折旧 */
81
+ zccfLjzj: number;
45
82
 
83
+ /** 挂起状态 */
84
+ hideStat: number;
85
+
86
+ lastDate: number;
87
+ lastTime: number;
88
+ flowMain: number;
89
+ flowNode: number;
90
+ flowStat: number;
91
+ didFirst: number;
92
+ lastMemo: string;
93
+ userName: string;
94
+ userGUID: string;
95
+
96
+ /**
97
+ * 资产卡片,拆分明细中新增了几条明细,就复制几条原资产卡片进来,然后修改这里面的几条的资产数量和资产原值
98
+ */
99
+ listParentBill: ICardMainResponse[];
100
+ listChildBill: ICardMainResponse[];
46
101
  listPath: IPathResponse[];
47
102
  }
48
103
 
@@ -85,6 +140,93 @@ export class TZccfResponse implements IZccfResponse {
85
140
  flowUser: string = "";
86
141
  cardMain: number = 0;
87
142
  cardExid: number = 0;
143
+ valueNew: number = 0;
144
+ zccfDate: number = 0;
145
+ zccfStat: number = 0;
146
+ zccfType: number = 0;
147
+ zccfCode: string = "";
148
+ zccfName: string = "";
149
+ zccfUses: string = "";
150
+ zccfMemo: string = "";
151
+ /** 拆分数量 */
152
+ zccfSize: number = 0;
153
+ /** 拆分原值 */
154
+ zccfZcyz: number = 0;
155
+
156
+ unitText: string = "";
157
+ cardCode: string = "";
158
+ cardName: string = "";
159
+ cardSize: number = 0;
160
+ cardZcyz: number = 0;
161
+ /** 资产净值 */
162
+ zccfZcjz: number = 0;
163
+ /** 累计折旧 */
164
+ zccfLjzj: number = 0;
165
+ hideStat: number = 0;
166
+
167
+ lastDate: number = 0;
168
+ lastTime: number = 0;
169
+ flowMain: number = 0;
170
+ flowNode: number = 0;
171
+ flowStat: number = 0;
172
+ didFirst: number = 0;
173
+ lastMemo: string = "";
174
+ userName: string = "";
175
+ userGUID: string = "";
88
176
 
177
+ listParentBill: ICardMainResponse[] = [];
178
+ listChildBill: ICardMainResponse[] = [];
89
179
  listPath: IPathResponse[] = [];
180
+
181
+ static toFlowData(zccf: TZccfResponse): TFlowDataResponse {
182
+ const result = new TFlowDataResponse();
183
+ result.whoBuild = zccf.whoBuild;
184
+ result.userIndx = zccf.userIndx;
185
+ result.flowMain = zccf.flowMain;
186
+ result.flowNode = zccf.flowNode;
187
+ result.notified = Const.Todo.CONST_STR_TODO_TYPE_TO_ZCCF_WAIT;
188
+ result.entityID = zccf.entityID;
189
+ result.billMain = zccf.zccfIndx;
190
+ result.billCode = zccf.zccfCode;
191
+ result.billMemo = zccf.zccfMemo;
192
+ result.createAt = zccf.createAt;
193
+ result.mastName = zccf.mastName;
194
+ result.createBy = zccf.createBy;
195
+ result.unitMain = zccf.unitMain;
196
+ result.deptMain = zccf.deptMain;
197
+ result.menuUUID = zccf.menuUUID;
198
+ result.flowStat = zccf.zccfStat;
199
+ return result;
200
+ }
201
+
202
+ static toFlowDatas(zccfs: TZccfResponse[]): TFlowDataResponse[] {
203
+ return zccfs.map((u) => this.toFlowData(u));
204
+ }
205
+
206
+ static toTravel(card: TZccfResponse): TCore.ISysTravelResponse {
207
+ const travel = new TCore.TSysTravelResponse();
208
+ travel.whoBuild = card.whoBuild;
209
+ travel.flowMain = card.flowMain;
210
+ travel.flowNode = card.flowNode;
211
+ travel.billUUID = card.entityID;
212
+ travel.billMain = card.zccfIndx;
213
+ travel.billCode = card.zccfCode;
214
+ travel.mastName = card.mastName;
215
+ travel.createBy = card.createBy;
216
+ travel.menuUUID = card.menuUUID;
217
+ return travel;
218
+ }
219
+
220
+ /** 转换成记录日志需要的数据(第一层,不包含菜单) */
221
+ static toTravelData(card?: TZccfResponse | TZccfResponse[]): TCore.ISysTravelResponse[] {
222
+ if (_.isNil(card)) {
223
+ return [];
224
+ }
225
+ if (_.isArray(card)) {
226
+ return card.map((u) => {
227
+ return this.toTravel(u);
228
+ });
229
+ }
230
+ return [this.toTravel(card)];
231
+ }
90
232
  }
@@ -1,4 +1,8 @@
1
+ import _ from "lodash";
2
+ import { Const, TCore } from "../..";
1
3
  import { IPathResponse } from "../core";
4
+ import { TFlowDataResponse } from "../flow";
5
+ import { ICardMainResponse } from "./ICardMainResponse";
2
6
 
3
7
  export interface IZcczResponse {
4
8
  whoBuild: number;
@@ -37,8 +41,53 @@ export interface IZcczResponse {
37
41
  flowUndo: number;
38
42
  flowText: string;
39
43
  flowUser: string;
44
+ /** 申请日期 */
45
+ zcczDate: number;
46
+ /** 流程状态:(0:制单;1:送审;2:终审) */
47
+ zcczStat: number;
48
+ /** 单据类型 */
49
+ zcczType: number;
50
+ /** 单据编号 */
51
+ zcczCode: string;
52
+ /** 待定 */
53
+ zcczName: string;
54
+ /** 申请用途 */
55
+ zcczUses: string;
56
+ /** 备注说明 */
57
+ zcczMemo: string;
40
58
 
59
+ /** 资产数量 */
60
+ zcczSize: number;
61
+ /** 资产原值 */
62
+ zcczZcyz: number;
63
+ /** 累计折旧 */
64
+ zcczLjzj: number;
65
+ /** 资产净值 */
66
+ zcczZcjz: number;
67
+
68
+ /** 单位名称 */
69
+ unitText: string;
70
+
71
+ /** 挂起状态 */
72
+ hideStat: number;
73
+
74
+ lastDate: number;
75
+ lastTime: number;
76
+ flowMain: number;
77
+ flowNode: number;
78
+ flowStat: number;
79
+ didFirst: number;
80
+ lastMemo: string;
81
+ userName: string;
82
+ userGUID: string;
83
+
84
+ listCard: ICardMainResponse[];
41
85
  listPath: IPathResponse[];
86
+
87
+ /** 虚拟字段 */
88
+ cardIndx: ICardMainResponse[] | undefined;
89
+ validVal: boolean;
90
+ validMsg: string;
42
91
  }
43
92
 
44
93
  export class TZcczResponse implements IZcczResponse {
@@ -78,6 +127,96 @@ export class TZcczResponse implements IZcczResponse {
78
127
  flowUndo: number = 0;
79
128
  flowText: string = "";
80
129
  flowUser: string = "";
130
+ zcczDate: number = 0;
131
+ zcczStat: number = 0;
132
+ zcczType: number = 0;
133
+ zcczCode: string = "";
134
+ zcczName: string = "";
135
+ zcczUses: string = "";
136
+ zcczMemo: string = "";
137
+
138
+ zcczSize: number = 0;
139
+ zcczZcyz: number = 0;
140
+ zcczLjzj: number = 0;
141
+ zcczZcjz: number = 0;
142
+
143
+ unitText: string = "";
81
144
 
145
+ hideStat: number = 0;
146
+
147
+ lastDate: number = 0;
148
+ lastTime: number = 0;
149
+ flowMain: number = 0;
150
+ flowNode: number = 0;
151
+ flowStat: number = 0;
152
+ didFirst: number = 0;
153
+ lastMemo: string = "";
154
+ userName: string = "";
155
+ userGUID: string = "";
156
+
157
+ /** 处置卡片 */
158
+ listCard: ICardMainResponse[] = [];
82
159
  listPath: IPathResponse[] = [];
160
+ /** 虚拟字段 */
161
+ cardIndx: ICardMainResponse[] | undefined = undefined;
162
+ validVal: boolean = false;
163
+ validMsg: string = "";
164
+
165
+ static toFlowData(zccz: TZcczResponse): TFlowDataResponse {
166
+ const result = new TFlowDataResponse();
167
+ result.whoBuild = zccz.whoBuild;
168
+ result.userIndx = zccz.userIndx;
169
+ result.flowMain = zccz.flowMain;
170
+ result.flowNode = zccz.flowNode;
171
+ result.notified = Const.Todo.CONST_STR_TODO_TYPE_TO_ZCCZ_WAIT;
172
+ result.entityID = zccz.entityID;
173
+ result.billMain = zccz.zcczIndx;
174
+ result.billCode = zccz.zcczCode;
175
+ result.billMemo = zccz.zcczMemo;
176
+ result.createAt = zccz.createAt;
177
+ result.mastName = zccz.mastName;
178
+ result.createBy = zccz.createBy;
179
+ result.unitMain = zccz.unitMain;
180
+ result.deptMain = zccz.deptMain;
181
+ result.menuUUID = zccz.menuUUID;
182
+ result.flowStat = zccz.zcczStat;
183
+ return result;
184
+ }
185
+
186
+ constructor(card: any = {}) {
187
+ if (card) {
188
+ _.merge(this, _.pick(card, Object.keys(this)));
189
+ }
190
+ }
191
+
192
+ static toFlowDatas(zcczs: TZcczResponse[]): TFlowDataResponse[] {
193
+ return zcczs.map((u) => this.toFlowData(u));
194
+ }
195
+
196
+ static toTravel(card: TZcczResponse): TCore.ISysTravelResponse {
197
+ const travel = new TCore.TSysTravelResponse();
198
+ travel.whoBuild = card.whoBuild;
199
+ travel.flowMain = card.flowMain;
200
+ travel.flowNode = card.flowNode;
201
+ travel.billUUID = card.entityID;
202
+ travel.billMain = card.zcczIndx;
203
+ travel.billCode = card.zcczCode;
204
+ travel.mastName = card.mastName;
205
+ travel.createBy = card.createBy;
206
+ travel.menuUUID = card.menuUUID;
207
+ return travel;
208
+ }
209
+
210
+ /** 转换成记录日志需要的数据(第一层,不包含菜单) */
211
+ static toTravelData(card?: TZcczResponse | TZcczResponse[]): TCore.ISysTravelResponse[] {
212
+ if (_.isNil(card)) {
213
+ return [];
214
+ }
215
+ if (_.isArray(card)) {
216
+ return card.map((u) => {
217
+ return this.toTravel(u);
218
+ });
219
+ }
220
+ return [this.toTravel(card)];
221
+ }
83
222
  }
@@ -1,4 +1,8 @@
1
+ import { Const, TCore } from "../..";
1
2
  import { IPathResponse } from "../core";
3
+ import { TFlowDataResponse } from "../flow";
4
+ import { ICardMainResponse } from "./ICardMainResponse";
5
+ import _ from "lodash";
2
6
 
3
7
  export interface IZcdbResponse {
4
8
  whoBuild: number;
@@ -34,10 +38,65 @@ export interface IZcdbResponse {
34
38
  deptMain: number;
35
39
  sqyhText: string;
36
40
  sqbmText: string;
41
+ /** 调入单位.标识 */
42
+ unitFrom: number;
43
+ /** 调入单位使用部门.标识(待定) */
44
+ deptFrom: number;
45
+ /** 调入单位存放地点.标识(待定) */
46
+ laidFrom: number;
47
+ /** 调入单位.名称 系统内;根据unitFrom获取;系统外:自行填写 */
48
+ unitFromText: string;
49
+ /** 调入单位使用部门.名称(待定) */
50
+ deptFromText: string;
51
+ /** 调入单位存放地点.名称(待定) */
52
+ laidFromText: string;
37
53
  flowUndo: number;
38
54
  flowText: string;
39
55
  flowUser: string;
56
+ /** 申请日期 */
57
+ zcdbDate: number;
58
+ /** 流程状态:(0:制单;1:送审;2:终审) */
59
+ zcdbStat: number;
60
+ /** 单据类型:0:系统内;1:系统外 */
61
+ zcdbType: number;
62
+ /** 单据编号 */
63
+ zcdbCode: string;
64
+ /** 待定 */
65
+ zcdbName: string;
66
+ /** 申请用途 */
67
+ zcdbUses: string;
68
+ /** 备注说明 */
69
+ zcdbMemo: string;
70
+ /** 资产数量 */
71
+ zcdbSize: number;
72
+ /** 资产原值 */
73
+ zcdbZcyz: number;
74
+ /** 累计折旧 */
75
+ zcdbLjzj: number;
76
+ /** 资产净值 */
77
+ zcdbZcjz: number;
40
78
 
79
+ /** 1:已确认;0:未确认*/
80
+ mrokStat: number;
81
+
82
+ /** 单位名称 */
83
+ unitText: string;
84
+
85
+ /** 挂起状态 */
86
+ hideStat: number;
87
+
88
+ lastDate: number;
89
+ lastTime: number;
90
+ flowMain: number;
91
+ flowNode: number;
92
+ flowStat: number;
93
+ didFirst: number;
94
+ lastMemo: string;
95
+ userName: string;
96
+ userGUID: string;
97
+
98
+ listBeforeBill: ICardMainResponse[];
99
+ listAfterBill: ICardMainResponse[];
41
100
  listPath: IPathResponse[];
42
101
  }
43
102
 
@@ -75,9 +134,104 @@ export class TZcdbResponse implements IZcdbResponse {
75
134
  deptMain: number = 0;
76
135
  sqyhText: string = "";
77
136
  sqbmText: string = "";
137
+ unitFrom: number = 0;
138
+ deptFrom: number = 0;
139
+ laidFrom: number = 0;
140
+ unitFromText: string = "";
141
+ deptFromText: string = "";
142
+ laidFromText: string = "";
78
143
  flowUndo: number = 0;
79
144
  flowText: string = "";
80
145
  flowUser: string = "";
146
+ zcdbDate: number = 0;
147
+ zcdbStat: number = 0;
148
+ zcdbType: number = 0;
149
+ zcdbCode: string = "";
150
+ zcdbName: string = "";
151
+ zcdbUses: string = "";
152
+ zcdbMemo: string = "";
153
+
154
+ zcdbSize: number = 0;
155
+ zcdbZcyz: number = 0;
156
+ zcdbLjzj: number = 0;
157
+ zcdbZcjz: number = 0;
158
+
159
+ unitText: string = "";
160
+
161
+ hideStat: number = 0;
81
162
 
163
+ lastDate: number = 0;
164
+ lastTime: number = 0;
165
+ flowMain: number = 0;
166
+ flowNode: number = 0;
167
+ flowStat: number = 0;
168
+ didFirst: number = 0;
169
+ mrokStat: number = 0;
170
+ lastMemo: string = "";
171
+ userName: string = "";
172
+ userGUID: string = "";
173
+
174
+ /** 调出卡片 */
175
+ listBeforeBill: ICardMainResponse[] = [];
176
+ /** 调入卡片 */
177
+ listAfterBill: ICardMainResponse[] = [];
82
178
  listPath: IPathResponse[] = [];
179
+
180
+ static toFlowData(zcdb: TZcdbResponse): TFlowDataResponse {
181
+ const result = new TFlowDataResponse();
182
+ result.whoBuild = zcdb.whoBuild;
183
+ result.userIndx = zcdb.userIndx;
184
+ result.flowMain = zcdb.flowMain;
185
+ result.flowNode = zcdb.flowNode;
186
+ result.notified = Const.Todo.CONST_STR_TODO_TYPE_TO_ZCDB_WAIT;
187
+ result.entityID = zcdb.entityID;
188
+ result.billMain = zcdb.zcdbIndx;
189
+ result.billCode = zcdb.zcdbCode;
190
+ result.billMemo = zcdb.zcdbMemo;
191
+ result.createAt = zcdb.createAt;
192
+ result.mastName = zcdb.mastName;
193
+ result.createBy = zcdb.createBy;
194
+ result.unitMain = zcdb.unitMain;
195
+ result.deptMain = zcdb.deptMain;
196
+ result.menuUUID = zcdb.menuUUID;
197
+ result.flowStat = zcdb.zcdbStat;
198
+ return result;
199
+ }
200
+
201
+ constructor(card: Partial<IZcdbResponse> = {}) {
202
+ if (card) {
203
+ _.merge(this, _.pick(card, Object.keys(this)));
204
+ }
205
+ }
206
+
207
+ static toFlowDatas(zcdbs: TZcdbResponse[]): TFlowDataResponse[] {
208
+ return zcdbs.map((u) => this.toFlowData(u));
209
+ }
210
+
211
+ static toTravel(card: TZcdbResponse): TCore.ISysTravelResponse {
212
+ const travel = new TCore.TSysTravelResponse();
213
+ travel.whoBuild = card.whoBuild;
214
+ travel.flowMain = card.flowMain;
215
+ travel.flowNode = card.flowNode;
216
+ travel.billUUID = card.entityID;
217
+ travel.billMain = card.zcdbIndx;
218
+ travel.billCode = card.zcdbCode;
219
+ travel.mastName = card.mastName;
220
+ travel.createBy = card.createBy;
221
+ travel.menuUUID = card.menuUUID;
222
+ return travel;
223
+ }
224
+
225
+ /** 转换成记录日志需要的数据(第一层,不包含菜单) */
226
+ static toTravelData(card?: TZcdbResponse | TZcdbResponse[]): TCore.ISysTravelResponse[] {
227
+ if (_.isNil(card)) {
228
+ return [];
229
+ }
230
+ if (_.isArray(card)) {
231
+ return card.map((u) => {
232
+ return this.toTravel(u);
233
+ });
234
+ }
235
+ return [this.toTravel(card)];
236
+ }
83
237
  }