@ningboyz/types 1.4.183 → 1.4.184

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ningboyz/types",
3
3
  "type": "module",
4
- "version": "1.4.183",
4
+ "version": "1.4.184",
5
5
  "private": false,
6
6
  "description": "宁波甬政类型库",
7
7
  "author": "nbyt-syq",
@@ -3,7 +3,9 @@ import { IPathResponse } from "../core/IPathResponse";
3
3
  import { IUserLiteResponse } from "../core/IUserLiteResponse";
4
4
  import { IUserResponse } from "../core/IUserResponse";
5
5
  import { ITakeBillResponse } from "./ITakeBillResponse";
6
+ import _ from "lodash";
6
7
 
8
+ import { TStim } from "..";
7
9
  export interface ITakeMainResponse {
8
10
  whoBuild: number;
9
11
  userIndx: number;
@@ -105,6 +107,8 @@ export interface ITakeMainResponse {
105
107
  listLock: ITakeMainResponse[]; //#关连单据
106
108
  }
107
109
 
110
+ type Type = ITakeMainResponse
111
+
108
112
  export class TTakeMainResponse implements ITakeMainResponse {
109
113
  whoBuild: number = 0;
110
114
  userIndx: number = 0;
@@ -202,4 +206,21 @@ export class TTakeMainResponse implements ITakeMainResponse {
202
206
  listBill: ITakeBillResponse[] = [];
203
207
  listLYYH: IUserResponse[] = [];
204
208
  listLock: ITakeMainResponse[] = [];
209
+
210
+ constructor(data: Partial<Type> = {}) {
211
+ if (data) {
212
+ _.merge(this, _.pick(data, Object.keys(this)));
213
+ }
214
+ }
215
+
216
+ static toWldyPrintData(noti: Type) {
217
+ const data = new TStim.TStimulsoftPrintData();
218
+ data.billMain = noti.takeIndx;
219
+ data.menuUUID = noti.menuUUID;
220
+ return data;
221
+ }
222
+
223
+ static toWldyPrintDatas(listNoti: Type[]) {
224
+ return listNoti.map((u) => this.toWldyPrintData(u));
225
+ }
205
226
  }