@etsoo/smarterp-core 1.1.48 → 1.1.50
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/lib/cjs/CoreApp.d.ts +28 -1
- package/lib/cjs/CoreApp.js +21 -0
- package/lib/cjs/DocumentApi.d.ts +38 -6
- package/lib/cjs/DocumentApi.js +36 -0
- package/lib/cjs/components/document/DocumentKindList.d.ts +8 -0
- package/lib/cjs/components/document/DocumentKindList.js +19 -0
- package/lib/cjs/components/document/DocumentTiplist.d.ts +37 -0
- package/lib/cjs/components/document/{SystemDocumentTiplist.js → DocumentTiplist.js} +6 -5
- package/lib/cjs/components/index.d.ts +2 -1
- package/lib/cjs/components/index.js +2 -1
- package/lib/cjs/dto/document/DocumentKind.d.ts +36 -0
- package/lib/cjs/dto/document/DocumentKind.js +40 -0
- package/lib/{mjs/dto/document/SystemDocumentListData.d.ts → cjs/dto/document/DocumentListData.d.ts} +3 -3
- package/lib/cjs/dto/document/DocumentQueryData.d.ts +31 -0
- package/lib/{mjs/dto/document/SystemDocumentViewData.d.ts → cjs/dto/document/DocumentReadData.d.ts} +4 -4
- package/lib/cjs/i18n/en.json +7 -0
- package/lib/cjs/i18n/zh-Hans.json +7 -0
- package/lib/cjs/i18n/zh-Hant.json +7 -0
- package/lib/cjs/index.d.ts +8 -3
- package/lib/cjs/index.js +8 -3
- package/lib/cjs/rq/document/DocumentCreateRQ.d.ts +31 -0
- package/lib/cjs/rq/document/DocumentCreateRQ.js +2 -0
- package/lib/cjs/rq/document/DocumentListRQ.d.ts +22 -0
- package/lib/cjs/rq/document/DocumentListRQ.js +2 -0
- package/lib/cjs/rq/document/DocumentQueryRQ.d.ts +27 -0
- package/lib/cjs/rq/document/DocumentQueryRQ.js +2 -0
- package/lib/cjs/rq/document/DocumentUpdateRQ.d.ts +7 -0
- package/lib/cjs/rq/document/DocumentUpdateRQ.js +2 -0
- package/lib/mjs/CoreApp.d.ts +28 -1
- package/lib/mjs/CoreApp.js +21 -0
- package/lib/mjs/DocumentApi.d.ts +38 -6
- package/lib/mjs/DocumentApi.js +36 -0
- package/lib/mjs/components/document/DocumentKindList.d.ts +8 -0
- package/lib/mjs/components/document/DocumentKindList.js +16 -0
- package/lib/mjs/components/document/DocumentTiplist.d.ts +37 -0
- package/lib/mjs/components/document/{SystemDocumentTiplist.js → DocumentTiplist.js} +5 -4
- package/lib/mjs/components/index.d.ts +2 -1
- package/lib/mjs/components/index.js +2 -1
- package/lib/mjs/dto/document/DocumentKind.d.ts +36 -0
- package/lib/mjs/dto/document/DocumentKind.js +37 -0
- package/lib/{cjs/dto/document/SystemDocumentListData.d.ts → mjs/dto/document/DocumentListData.d.ts} +3 -3
- package/lib/mjs/dto/document/DocumentQueryData.d.ts +31 -0
- package/lib/{cjs/dto/document/SystemDocumentViewData.d.ts → mjs/dto/document/DocumentReadData.d.ts} +4 -4
- package/lib/mjs/i18n/en.json +7 -0
- package/lib/mjs/i18n/zh-Hans.json +7 -0
- package/lib/mjs/i18n/zh-Hant.json +7 -0
- package/lib/mjs/index.d.ts +8 -3
- package/lib/mjs/index.js +8 -3
- package/lib/mjs/rq/document/DocumentCreateRQ.d.ts +31 -0
- package/lib/mjs/rq/document/DocumentCreateRQ.js +1 -0
- package/lib/mjs/rq/document/DocumentListRQ.d.ts +22 -0
- package/lib/mjs/rq/document/DocumentListRQ.js +1 -0
- package/lib/mjs/rq/document/DocumentQueryRQ.d.ts +27 -0
- package/lib/mjs/rq/document/DocumentQueryRQ.js +1 -0
- package/lib/mjs/rq/document/DocumentUpdateRQ.d.ts +7 -0
- package/lib/mjs/rq/document/DocumentUpdateRQ.js +1 -0
- package/package.json +5 -5
- package/src/CoreApp.ts +39 -1
- package/src/DocumentApi.ts +56 -9
- package/src/components/document/DocumentKindList.tsx +28 -0
- package/src/components/document/{SystemDocumentTiplist.tsx → DocumentTiplist.tsx} +20 -13
- package/src/components/index.ts +2 -1
- package/src/dto/document/DocumentKind.ts +41 -0
- package/src/dto/document/{SystemDocumentListData.ts → DocumentListData.ts} +4 -3
- package/src/dto/document/DocumentQueryData.ts +35 -0
- package/src/dto/document/{SystemDocumentViewData.ts → DocumentReadData.ts} +9 -4
- package/src/i18n/en.json +7 -0
- package/src/i18n/zh-Hans.json +7 -0
- package/src/i18n/zh-Hant.json +7 -0
- package/src/index.ts +9 -4
- package/src/rq/document/DocumentCreateRQ.ts +35 -0
- package/src/rq/document/DocumentListRQ.ts +25 -0
- package/src/rq/document/DocumentQueryRQ.ts +31 -0
- package/src/rq/document/DocumentUpdateRQ.ts +8 -0
- package/lib/cjs/components/document/SystemDocumentTiplist.d.ts +0 -33
- package/lib/cjs/rq/document/SystemDocumentListRQ.d.ts +0 -17
- package/lib/mjs/components/document/SystemDocumentTiplist.d.ts +0 -33
- package/lib/mjs/rq/document/SystemDocumentListRQ.d.ts +0 -17
- package/src/rq/document/SystemDocumentListRQ.ts +0 -19
- /package/lib/cjs/dto/document/{SystemDocumentListData.js → DocumentListData.js} +0 -0
- /package/lib/cjs/dto/document/{SystemDocumentViewData.js → DocumentQueryData.js} +0 -0
- /package/lib/cjs/{rq/document/SystemDocumentListRQ.js → dto/document/DocumentReadData.js} +0 -0
- /package/lib/mjs/dto/document/{SystemDocumentListData.js → DocumentListData.js} +0 -0
- /package/lib/mjs/dto/document/{SystemDocumentViewData.js → DocumentQueryData.js} +0 -0
- /package/lib/mjs/{rq/document/SystemDocumentListRQ.js → dto/document/DocumentReadData.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/smarterp-core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.50",
|
|
4
4
|
"description": "TypeScript APIs for SmartERP Core",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"license": "MIT",
|
|
41
41
|
"homepage": "https://github.com/ETSOO/smarterp-core#readme",
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@babel/core": "^7.29.
|
|
44
|
-
"@babel/plugin-transform-runtime": "^7.29.
|
|
45
|
-
"@babel/preset-env": "^7.29.
|
|
46
|
-
"@babel/runtime-corejs3": "^7.29.
|
|
43
|
+
"@babel/core": "^7.29.7",
|
|
44
|
+
"@babel/plugin-transform-runtime": "^7.29.7",
|
|
45
|
+
"@babel/preset-env": "^7.29.7",
|
|
46
|
+
"@babel/runtime-corejs3": "^7.29.7",
|
|
47
47
|
"@types/react": "^19.2.15",
|
|
48
48
|
"@types/react-dom": "^19.2.3",
|
|
49
49
|
"@vitejs/plugin-react": "^6.0.2",
|
package/src/CoreApp.ts
CHANGED
|
@@ -12,9 +12,10 @@ import {
|
|
|
12
12
|
UserIdentifierType
|
|
13
13
|
} from "@etsoo/appscript";
|
|
14
14
|
import { AuthCodeApi } from "./AuthCodeApi";
|
|
15
|
-
import { DataTypes, ListType } from "@etsoo/shared";
|
|
15
|
+
import { DataTypes, ListType, ListType1 } from "@etsoo/shared";
|
|
16
16
|
import { CoreApiService } from "./dto/org/CoreApiService";
|
|
17
17
|
import { DocumentApi } from "./DocumentApi";
|
|
18
|
+
import { DocumentKind } from "./dto/document/DocumentKind";
|
|
18
19
|
|
|
19
20
|
type AppData = { id: number; appId?: number; name: string; localName?: string };
|
|
20
21
|
|
|
@@ -86,6 +87,21 @@ export interface ICoreApp {
|
|
|
86
87
|
*/
|
|
87
88
|
getAppName(data: AppData): string;
|
|
88
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Get document kind label
|
|
92
|
+
* 获取文档类型标签
|
|
93
|
+
* @param kind Kind
|
|
94
|
+
* @returns Label
|
|
95
|
+
*/
|
|
96
|
+
getDocumentKind(kind?: DocumentKind): string | undefined;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Get document kinds
|
|
100
|
+
* 获取文档类型列表
|
|
101
|
+
* @returns List
|
|
102
|
+
*/
|
|
103
|
+
getDocumentKinds(): ListType1[];
|
|
104
|
+
|
|
89
105
|
/**
|
|
90
106
|
* Get user identifier type label
|
|
91
107
|
* 获取用户标识类型标签
|
|
@@ -257,6 +273,28 @@ export class CoreApp implements ICoreApp {
|
|
|
257
273
|
);
|
|
258
274
|
}
|
|
259
275
|
|
|
276
|
+
/**
|
|
277
|
+
* Get document kind label
|
|
278
|
+
* 获取文档类型标签
|
|
279
|
+
* @param kind Kind
|
|
280
|
+
* @returns Label
|
|
281
|
+
*/
|
|
282
|
+
getDocumentKind(kind?: DocumentKind) {
|
|
283
|
+
if (kind == null) return undefined;
|
|
284
|
+
|
|
285
|
+
const key = DocumentKind[kind];
|
|
286
|
+
return this.app.get("template" + key) ?? key;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Get document kinds
|
|
291
|
+
* 获取文档类型列表
|
|
292
|
+
* @returns List
|
|
293
|
+
*/
|
|
294
|
+
getDocumentKinds() {
|
|
295
|
+
return this.app.getEnumStrList(DocumentKind, "template");
|
|
296
|
+
}
|
|
297
|
+
|
|
260
298
|
/**
|
|
261
299
|
* Get user identifier type label
|
|
262
300
|
* 获取用户标识类型标签
|
package/src/DocumentApi.ts
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import {
|
|
2
|
+
EntityApi,
|
|
3
|
+
IApi,
|
|
4
|
+
IApiPayload,
|
|
5
|
+
IApp,
|
|
6
|
+
IdResultPayload
|
|
7
|
+
} from "@etsoo/appscript";
|
|
8
|
+
import { DocumentListData } from "./dto/document/DocumentListData";
|
|
9
|
+
import { DocumentListRQ } from "./rq/document/DocumentListRQ";
|
|
10
|
+
import { DocumentReadData } from "./dto/document/DocumentReadData";
|
|
11
|
+
import { DocumentCreateRQ } from "./rq/document/DocumentCreateRQ";
|
|
12
|
+
import { DocumentQueryRQ } from "./rq/document/DocumentQueryRQ";
|
|
13
|
+
import { DocumentQueryData } from "./dto/document/DocumentQueryData";
|
|
14
|
+
import { DocumentUpdateRQ } from "./rq/document/DocumentUpdateRQ";
|
|
5
15
|
|
|
6
16
|
/**
|
|
7
17
|
* Document API
|
|
@@ -16,26 +26,63 @@ export class DocumentApi extends EntityApi {
|
|
|
16
26
|
super("Document", app, api);
|
|
17
27
|
}
|
|
18
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Create
|
|
31
|
+
* @param rq Request data
|
|
32
|
+
* @param payload Payload
|
|
33
|
+
* @returns Result
|
|
34
|
+
*/
|
|
35
|
+
create(rq: DocumentCreateRQ, payload?: IdResultPayload) {
|
|
36
|
+
return this.createBase(rq, payload);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Delete
|
|
41
|
+
* @param id Id
|
|
42
|
+
* @param payload Payload
|
|
43
|
+
* @returns Result
|
|
44
|
+
*/
|
|
45
|
+
delete(id: number, payload?: IdResultPayload) {
|
|
46
|
+
return this.deleteBase(id, payload);
|
|
47
|
+
}
|
|
48
|
+
|
|
19
49
|
/**
|
|
20
50
|
* List
|
|
21
51
|
* @param rq Request data
|
|
22
52
|
* @param payload Payload
|
|
23
53
|
* @returns Result
|
|
24
54
|
*/
|
|
25
|
-
list(
|
|
26
|
-
rq: SystemDocumentListRQ,
|
|
27
|
-
payload: IApiPayload<SystemDocumentListData[]>
|
|
28
|
-
) {
|
|
55
|
+
list(rq: DocumentListRQ, payload: IApiPayload<DocumentListData[]>) {
|
|
29
56
|
return this.listBase(rq, payload);
|
|
30
57
|
}
|
|
31
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Query
|
|
61
|
+
* @param rq Request data
|
|
62
|
+
* @param payload Payload
|
|
63
|
+
* @returns Result
|
|
64
|
+
*/
|
|
65
|
+
query(rq: DocumentQueryRQ, payload?: IApiPayload<DocumentQueryData[]>) {
|
|
66
|
+
return this.queryBase(rq, payload);
|
|
67
|
+
}
|
|
68
|
+
|
|
32
69
|
/**
|
|
33
70
|
* Read
|
|
34
71
|
* @param id Id
|
|
35
72
|
* @param payload Payload
|
|
36
73
|
* @returns Result
|
|
37
74
|
*/
|
|
38
|
-
read(id: number, payload?: IApiPayload<
|
|
75
|
+
read(id: number, payload?: IApiPayload<DocumentReadData>) {
|
|
39
76
|
return this.readBase(id, payload);
|
|
40
77
|
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Update
|
|
81
|
+
* @param rq Request data
|
|
82
|
+
* @param payload Payload
|
|
83
|
+
* @returns Result
|
|
84
|
+
*/
|
|
85
|
+
update(rq: DocumentUpdateRQ, payload?: IdResultPayload) {
|
|
86
|
+
return this.updateBase(rq, payload);
|
|
87
|
+
}
|
|
41
88
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SelectEx, SelectExProps } from "@etsoo/materialui";
|
|
2
|
+
import { useRequiredAppContext } from "../../ICoreServiceApp";
|
|
3
|
+
import { ListType1 } from "@etsoo/shared";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Document kind list component
|
|
7
|
+
* @param props Props
|
|
8
|
+
* @returns Component
|
|
9
|
+
*/
|
|
10
|
+
export function DocumentKindList(
|
|
11
|
+
props: Omit<SelectExProps<ListType1>, "options">
|
|
12
|
+
) {
|
|
13
|
+
// App
|
|
14
|
+
const app = useRequiredAppContext();
|
|
15
|
+
|
|
16
|
+
// Destruct
|
|
17
|
+
const { label = app.get("templateKind"), name = "kind", ...rest } = props;
|
|
18
|
+
|
|
19
|
+
// Layout
|
|
20
|
+
return (
|
|
21
|
+
<SelectEx
|
|
22
|
+
label={label}
|
|
23
|
+
name={name}
|
|
24
|
+
options={app.core.getDocumentKinds()}
|
|
25
|
+
{...rest}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Tiplist, TiplistProps } from "@etsoo/materialui";
|
|
2
2
|
import { useRequiredAppContext } from "../../ICoreServiceApp";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { DocumentListData } from "../../dto/document/DocumentListData";
|
|
4
|
+
import { DocumentListRQ } from "../../rq/document/DocumentListRQ";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Document tiplist properties
|
|
8
|
+
* 文档提示列表属性
|
|
9
9
|
*/
|
|
10
|
-
export type
|
|
11
|
-
TiplistProps<
|
|
10
|
+
export type DocumentTiplistProps = Omit<
|
|
11
|
+
TiplistProps<DocumentListData, "id">,
|
|
12
12
|
"loadData" | "label" | "name"
|
|
13
13
|
> & {
|
|
14
14
|
/**
|
|
@@ -21,25 +21,30 @@ export type SystemDocumentTiplistProps = Omit<
|
|
|
21
21
|
*/
|
|
22
22
|
name?: string;
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Kind
|
|
26
|
+
*/
|
|
27
|
+
kind: string;
|
|
28
|
+
|
|
24
29
|
/**
|
|
25
30
|
* Default request data
|
|
26
31
|
*/
|
|
27
|
-
rq?: Partial<
|
|
32
|
+
rq?: Partial<DocumentListRQ>;
|
|
28
33
|
|
|
29
34
|
/**
|
|
30
35
|
* Load data handler
|
|
31
36
|
* @param rq Request data
|
|
32
37
|
*/
|
|
33
|
-
onLoadData?: (rq:
|
|
38
|
+
onLoadData?: (rq: DocumentListRQ) => DocumentListRQ;
|
|
34
39
|
};
|
|
35
40
|
|
|
36
41
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
42
|
+
* Document tiplist
|
|
43
|
+
* 文档提示列表
|
|
39
44
|
* @param props Properties
|
|
40
45
|
* @returns Component
|
|
41
46
|
*/
|
|
42
|
-
export function
|
|
47
|
+
export function DocumentTiplist(props: DocumentTiplistProps) {
|
|
43
48
|
// App
|
|
44
49
|
const app = useRequiredAppContext();
|
|
45
50
|
|
|
@@ -50,14 +55,15 @@ export function SystemDocumentTiplist(props: SystemDocumentTiplistProps) {
|
|
|
50
55
|
maxItems = 10,
|
|
51
56
|
getOptionLabel = (data) => data.title,
|
|
52
57
|
onLoadData = (rq) => rq,
|
|
53
|
-
name = "
|
|
58
|
+
name = "DocumentId",
|
|
59
|
+
kind,
|
|
54
60
|
rq = { enabled: true },
|
|
55
61
|
...rest
|
|
56
62
|
} = props;
|
|
57
63
|
|
|
58
64
|
// Layout
|
|
59
65
|
return (
|
|
60
|
-
<Tiplist<
|
|
66
|
+
<Tiplist<DocumentListData, "id">
|
|
61
67
|
label={label}
|
|
62
68
|
getOptionLabel={getOptionLabel}
|
|
63
69
|
name={name}
|
|
@@ -69,6 +75,7 @@ export function SystemDocumentTiplist(props: SystemDocumentTiplistProps) {
|
|
|
69
75
|
...rq,
|
|
70
76
|
keyword,
|
|
71
77
|
id,
|
|
78
|
+
kind,
|
|
72
79
|
queryPaging: {
|
|
73
80
|
batchSize: maxItems
|
|
74
81
|
}
|
package/src/components/index.ts
CHANGED
|
@@ -11,7 +11,8 @@ export * from "./app/StatusList";
|
|
|
11
11
|
export * from "./app/UserRoleList";
|
|
12
12
|
|
|
13
13
|
// document
|
|
14
|
-
export * from "./document/
|
|
14
|
+
export * from "./document/DocumentKindList";
|
|
15
|
+
export * from "./document/DocumentTiplist";
|
|
15
16
|
|
|
16
17
|
// org
|
|
17
18
|
export * from "./org/ButtonApiServices";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template document kind, the value should not exceed 20 characters
|
|
3
|
+
* 模板文档类型,值不能超过20个字符
|
|
4
|
+
*/
|
|
5
|
+
export enum DocumentKind {
|
|
6
|
+
/**
|
|
7
|
+
* CMS asset check alert
|
|
8
|
+
* CMS资产检查警告
|
|
9
|
+
*/
|
|
10
|
+
CMSASSETCHECKALERT = "CMSASSETCHECKALERT",
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* CMS asset expiry alert
|
|
14
|
+
* CMS资产过期警告
|
|
15
|
+
*/
|
|
16
|
+
CMSASSETEXPIRYALERT = "CMSASSETEXPIRYALERT",
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* CMS customer data
|
|
20
|
+
* CMS客户数据
|
|
21
|
+
*/
|
|
22
|
+
CMSCUSTOMERDATA = "CMSCUSTOMERDATA",
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* CMS order data
|
|
26
|
+
* CMS订单数据
|
|
27
|
+
*/
|
|
28
|
+
CMSORDERDATA = "CMSORDERDATA",
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* CMS PO data
|
|
32
|
+
* CMS采购数据
|
|
33
|
+
*/
|
|
34
|
+
CMSPODATA = "CMSPODATA",
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* CMS stock data
|
|
38
|
+
* CMS库存数据
|
|
39
|
+
*/
|
|
40
|
+
CMSSTOCKDATA = "CMSSTOCKDATA"
|
|
41
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Document query data
|
|
3
|
+
* 文档查询数据
|
|
4
|
+
*/
|
|
5
|
+
export type DocumentQueryData = {
|
|
6
|
+
/**
|
|
7
|
+
* Id
|
|
8
|
+
* 编号
|
|
9
|
+
*/
|
|
10
|
+
id: number;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Kind
|
|
14
|
+
* 类型
|
|
15
|
+
*/
|
|
16
|
+
kind: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Title
|
|
20
|
+
* 标题
|
|
21
|
+
*/
|
|
22
|
+
title: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Has parameters or not
|
|
26
|
+
* 是否有参数
|
|
27
|
+
*/
|
|
28
|
+
hasParameters: boolean;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Refresh time
|
|
32
|
+
* 刷新时间
|
|
33
|
+
*/
|
|
34
|
+
refreshTime: Date | string;
|
|
35
|
+
};
|
|
@@ -1,33 +1,38 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Document read data
|
|
3
|
+
* 文档浏览数据
|
|
4
4
|
*/
|
|
5
|
-
export type
|
|
5
|
+
export type DocumentReadData = {
|
|
6
6
|
/**
|
|
7
7
|
* Id
|
|
8
8
|
* 编号
|
|
9
9
|
*/
|
|
10
10
|
id: number;
|
|
11
|
+
|
|
11
12
|
/**
|
|
12
13
|
* Kind
|
|
13
14
|
* 类型
|
|
14
15
|
*/
|
|
15
16
|
kind: string;
|
|
17
|
+
|
|
16
18
|
/**
|
|
17
19
|
* Title
|
|
18
20
|
* 标题
|
|
19
21
|
*/
|
|
20
22
|
title: string;
|
|
23
|
+
|
|
21
24
|
/**
|
|
22
25
|
* Parameters
|
|
23
26
|
* 参数
|
|
24
27
|
*/
|
|
25
|
-
parameters?: unknown
|
|
28
|
+
parameters?: Record<string, unknown>;
|
|
29
|
+
|
|
26
30
|
/**
|
|
27
31
|
* Template
|
|
28
32
|
* 模板
|
|
29
33
|
*/
|
|
30
34
|
template: string;
|
|
35
|
+
|
|
31
36
|
/**
|
|
32
37
|
* Refresh time
|
|
33
38
|
* 刷新时间
|
package/src/i18n/en.json
CHANGED
|
@@ -124,6 +124,13 @@
|
|
|
124
124
|
"target": "Target",
|
|
125
125
|
"targetId": "Target id",
|
|
126
126
|
"template": "Template",
|
|
127
|
+
"templateCMSASSETCHECKALERT": "CMS asset check alert",
|
|
128
|
+
"templateCMSASSETEXPIRYALERT": "CMS asset expiry alert",
|
|
129
|
+
"templateCMSCUSTOMERDATA": "CMS customer data",
|
|
130
|
+
"templateCMSORDERDATA": "CMS order data",
|
|
131
|
+
"templateCMSPODATA": "CMS PO data",
|
|
132
|
+
"templateCMSSTOCKDATA": "CMS stock data",
|
|
133
|
+
"templateKind": "Template kind",
|
|
127
134
|
"years5": ["1 year", "2 years", "3 years", "4 years", "5 years"],
|
|
128
135
|
"uiTypeEmail": "Email",
|
|
129
136
|
"uiTypeMobile": "Mobile",
|
package/src/i18n/zh-Hans.json
CHANGED
|
@@ -124,6 +124,13 @@
|
|
|
124
124
|
"target": "目标",
|
|
125
125
|
"targetId": "目标编号",
|
|
126
126
|
"template": "模板",
|
|
127
|
+
"templateCMSASSETCHECKALERT": "CMS资产检查警告",
|
|
128
|
+
"templateCMSASSETEXPIRYALERT": "CMS资产过期警告",
|
|
129
|
+
"templateCMSCUSTOMERDATA": "CMS客户数据",
|
|
130
|
+
"templateCMSORDERDATA": "CMS订单数据",
|
|
131
|
+
"templateCMSPODATA": "CMS采购数据",
|
|
132
|
+
"templateCMSSTOCKDATA": "CMS库存数据",
|
|
133
|
+
"templateKind": "模板类型",
|
|
127
134
|
"years5": ["1年", "2年", "3年", "4年", "5年"],
|
|
128
135
|
"uiTypeEmail": "电子邮箱",
|
|
129
136
|
"uiTypeMobile": "手机号",
|
package/src/i18n/zh-Hant.json
CHANGED
|
@@ -124,6 +124,13 @@
|
|
|
124
124
|
"target": "目標",
|
|
125
125
|
"targetId": "目標編號",
|
|
126
126
|
"template": "模板",
|
|
127
|
+
"templateCMSASSETCHECKALERT": "CMS資產檢查警告",
|
|
128
|
+
"templateCMSASSETEXPIRYALERT": "CMS資產過期警告",
|
|
129
|
+
"templateCMSCUSTOMERDATA": "CMS客戶數據",
|
|
130
|
+
"templateCMSORDERDATA": "CMS訂單數據",
|
|
131
|
+
"templateCMSPODATA": "CMS採購數據",
|
|
132
|
+
"templateCMSSTOCKDATA": "CMS庫存數據",
|
|
133
|
+
"templateKind": "模板類型",
|
|
127
134
|
"years5": ["1年", "2年", "3年", "4年", "5年"],
|
|
128
135
|
"uiTypeEmail": "電子郵件",
|
|
129
136
|
"uiTypeMobile": "手機號碼",
|
package/src/index.ts
CHANGED
|
@@ -9,10 +9,10 @@ export * from "./dto/app/CreateApiKeyData";
|
|
|
9
9
|
|
|
10
10
|
export * from "./dto/authCode/AuthCodeAction";
|
|
11
11
|
|
|
12
|
-
export * from "./
|
|
13
|
-
|
|
14
|
-
export * from "./dto/document/
|
|
15
|
-
export * from "./dto/document/
|
|
12
|
+
export * from "./dto/document/DocumentKind";
|
|
13
|
+
export * from "./dto/document/DocumentListData";
|
|
14
|
+
export * from "./dto/document/DocumentQueryData";
|
|
15
|
+
export * from "./dto/document/DocumentReadData";
|
|
16
16
|
|
|
17
17
|
export * from "./dto/member/MemberListDto";
|
|
18
18
|
export * from "./dto/member/MemberQueryDto";
|
|
@@ -63,6 +63,11 @@ export * from "./rq/authCode/SendEmailRQ";
|
|
|
63
63
|
export * from "./rq/authCode/SendSMSRQ";
|
|
64
64
|
export * from "./rq/authCode/ValidateRQ";
|
|
65
65
|
|
|
66
|
+
export * from "./rq/document/DocumentCreateRQ";
|
|
67
|
+
export * from "./rq/document/DocumentListRQ";
|
|
68
|
+
export * from "./rq/document/DocumentQueryRQ";
|
|
69
|
+
export * from "./rq/document/DocumentUpdateRQ";
|
|
70
|
+
|
|
66
71
|
export * from "./rq/member/MemberInviteRQ";
|
|
67
72
|
export * from "./rq/member/MemberListRQ";
|
|
68
73
|
export * from "./rq/member/MemberQueryRQ";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Document create request data
|
|
3
|
+
* 文档创建请求数据
|
|
4
|
+
*/
|
|
5
|
+
export type DocumentCreateRQ = {
|
|
6
|
+
/**
|
|
7
|
+
* Kind
|
|
8
|
+
* 类型
|
|
9
|
+
*/
|
|
10
|
+
kind: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Title
|
|
14
|
+
* 标题
|
|
15
|
+
*/
|
|
16
|
+
title: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Parameters
|
|
20
|
+
* 参数
|
|
21
|
+
*/
|
|
22
|
+
parameters?: unknown;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Template
|
|
26
|
+
* 模板
|
|
27
|
+
*/
|
|
28
|
+
template: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Cultures
|
|
32
|
+
* 语言文化
|
|
33
|
+
*/
|
|
34
|
+
cultures?: string[];
|
|
35
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { QueryRQ } from "@etsoo/appscript";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Document list request data
|
|
5
|
+
* 文档列表请求数据
|
|
6
|
+
*/
|
|
7
|
+
export type DocumentListRQ = QueryRQ<number> & {
|
|
8
|
+
/**
|
|
9
|
+
* Kind
|
|
10
|
+
* 类型
|
|
11
|
+
*/
|
|
12
|
+
kind: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Culture
|
|
16
|
+
* 语言文化
|
|
17
|
+
*/
|
|
18
|
+
culture?: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* System template or not
|
|
22
|
+
* 系统模板与否
|
|
23
|
+
*/
|
|
24
|
+
isSystem?: boolean;
|
|
25
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { QueryRQ } from "@etsoo/appscript";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Document query request data
|
|
5
|
+
* 文档查询请求数据
|
|
6
|
+
*/
|
|
7
|
+
export type DocumentQueryRQ = QueryRQ & {
|
|
8
|
+
/**
|
|
9
|
+
* Kind
|
|
10
|
+
* 类型
|
|
11
|
+
*/
|
|
12
|
+
kind?: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Culture
|
|
16
|
+
* 文化
|
|
17
|
+
*/
|
|
18
|
+
culture?: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* System template or not
|
|
22
|
+
* 是否为系统模板
|
|
23
|
+
*/
|
|
24
|
+
isSystem?: boolean;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Has parameters or not
|
|
28
|
+
* 是否有参数
|
|
29
|
+
*/
|
|
30
|
+
hasParameters?: boolean;
|
|
31
|
+
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { TiplistProps } from "@etsoo/materialui";
|
|
2
|
-
import { SystemDocumentListData } from "../../dto/document/SystemDocumentListData";
|
|
3
|
-
import { SystemDocumentListRQ } from "../../rq/document/SystemDocumentListRQ";
|
|
4
|
-
/**
|
|
5
|
-
* System document tiplist properties
|
|
6
|
-
* 系统文档提示列表属性
|
|
7
|
-
*/
|
|
8
|
-
export type SystemDocumentTiplistProps = Omit<TiplistProps<SystemDocumentListData, "id">, "loadData" | "label" | "name"> & {
|
|
9
|
-
/**
|
|
10
|
-
* Label
|
|
11
|
-
*/
|
|
12
|
-
label?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Name
|
|
15
|
-
*/
|
|
16
|
-
name?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Default request data
|
|
19
|
-
*/
|
|
20
|
-
rq?: Partial<SystemDocumentListRQ>;
|
|
21
|
-
/**
|
|
22
|
-
* Load data handler
|
|
23
|
-
* @param rq Request data
|
|
24
|
-
*/
|
|
25
|
-
onLoadData?: (rq: SystemDocumentListRQ) => SystemDocumentListRQ;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* System document tiplist
|
|
29
|
-
* 系统文档提示列表
|
|
30
|
-
* @param props Properties
|
|
31
|
-
* @returns Component
|
|
32
|
-
*/
|
|
33
|
-
export declare function SystemDocumentTiplist(props: SystemDocumentTiplistProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { QueryRQ } from "@etsoo/appscript";
|
|
2
|
-
/**
|
|
3
|
-
* System Document list request data
|
|
4
|
-
* 系统文档列表请求数据
|
|
5
|
-
*/
|
|
6
|
-
export type SystemDocumentListRQ = QueryRQ<number> & {
|
|
7
|
-
/**
|
|
8
|
-
* Kind
|
|
9
|
-
* 类型
|
|
10
|
-
*/
|
|
11
|
-
kind?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Culture
|
|
14
|
-
* 语言文化
|
|
15
|
-
*/
|
|
16
|
-
culture?: string;
|
|
17
|
-
};
|