@ningboyz/types 1.1.54 → 1.1.55
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,4 +1,6 @@
|
|
|
1
|
+
import { TFlowDataResponse } from "../flow";
|
|
1
2
|
import type { ITablDataResponse } from "./ITablDataResponse";
|
|
3
|
+
import _ from "lodash";
|
|
2
4
|
|
|
3
5
|
export interface ITablMainResponse {
|
|
4
6
|
whoBuild: number;
|
|
@@ -145,4 +147,38 @@ export class TTablMainResponse implements ITablMainResponse {
|
|
|
145
147
|
taskMain: number = 0;
|
|
146
148
|
|
|
147
149
|
listData: Array<ITablDataResponse> = [];
|
|
150
|
+
|
|
151
|
+
constructor(card: keyof ITablMainResponse | object) {
|
|
152
|
+
if (card) {
|
|
153
|
+
_.merge(this, _.pick(card, Object.keys(this)));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
static toFlowDatas(card: ITablMainResponse[]): TFlowDataResponse[] {
|
|
158
|
+
return card.map((u) => this.toFlowData(u));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
//#进入流程
|
|
162
|
+
static toFlowData(myoa: ITablMainResponse): TFlowDataResponse {
|
|
163
|
+
const result = new TFlowDataResponse();
|
|
164
|
+
result.whoBuild = myoa.whoBuild;
|
|
165
|
+
result.userIndx = myoa.userIndx;
|
|
166
|
+
result.flowMain = myoa.flowMain;
|
|
167
|
+
result.flowNode = myoa.flowNode;
|
|
168
|
+
// result.notified = Const.Todo.CONST_STR_TODO_TYPE_TO_HTQD_WAIT;
|
|
169
|
+
result.entityID = myoa.entityID;
|
|
170
|
+
result.billMain = myoa.tablIndx;
|
|
171
|
+
result.billMemo = myoa.tablMemo;
|
|
172
|
+
result.billUses = "";
|
|
173
|
+
result.ysxmText = "";
|
|
174
|
+
result.outMoney = 0;
|
|
175
|
+
result.createAt = myoa.createAt;
|
|
176
|
+
result.mastName = myoa.mastName;
|
|
177
|
+
result.createBy = myoa.createBy;
|
|
178
|
+
result.unitMain = myoa.unitMain;
|
|
179
|
+
result.menuUUID = myoa.menuUUID;
|
|
180
|
+
result.deptMain = myoa.deptMain;
|
|
181
|
+
result.flowStat = myoa.tablStat;
|
|
182
|
+
return result;
|
|
183
|
+
}
|
|
148
184
|
}
|