@kengic/uni 0.7.14-beta.2 → 0.7.14-beta.5
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/api/WMS/Controllers/CommonController/GetLatestApkVersion.ts +21 -21
- package/api/WMS/Controllers/CommonController/index.ts +1 -1
- package/api/WMS/Controllers/LoginController/GetUserInfo.ts +21 -21
- package/api/WMS/Controllers/LoginController/Logout.ts +21 -21
- package/api/WMS/Controllers/LoginController/index.ts +2 -2
- package/api/WMS/Controllers/WorkstationController/List.ts +45 -45
- package/api/WMS/Controllers/WorkstationController/index.ts +1 -1
- package/api/WMS/index.ts +2 -2
- package/api/api.ts +1 -1
- package/api/def.ts +1 -1
- package/api/index.ts +2 -2
- package/component/KgLocaleSelector/KgLocaleSelector.vue +110 -0
- package/component/KgLocaleSelector/index.ts +1 -0
- package/component/KgNavBar/KgNavBar.vue +1 -1
- package/component/{KgUpdatePopup/KgUpdatePopup.vue → KgUpdateNotice/KgUpdateNotice.vue} +7 -6
- package/component/KgUpdateNotice/index.ts +6 -0
- package/component/{KgWarehouse/KgWarehouse.vue → KgWarehouseSelector/KgWarehouseSelector.vue} +32 -19
- package/component/{KgWarehouse → KgWarehouseSelector}/index.hooks.ts +1 -2
- package/component/KgWarehouseSelector/index.ts +9 -0
- package/component/{KgStation/KgStation.vue → KgWorkStationSelector/KgWorkStationSelector.vue} +7 -8
- package/component/{KgStation → KgWorkStationSelector}/index.hooks.ts +1 -1
- package/component/KgWorkStationSelector/index.ts +9 -0
- package/component/index.ts +4 -3
- package/{store → config}/app.store.ts +7 -6
- package/config/config.hooks.ts +9 -20
- package/config/config.store.ts +67 -68
- package/config/index.ts +23 -3
- package/index.ts +0 -1
- package/model/index.ts +17 -6
- package/package.json +2 -2
- package/page/KgPageMy.vue +14 -71
- package/service/http-client.ts +3 -5
- package/util/kg.util.ts +1 -1
- package/component/KgStation/index.ts +0 -4
- package/component/KgUpdatePopup/index.ts +0 -1
- package/component/KgWarehouse/index.ts +0 -4
- /package/component/{KgWarehouse → KgWarehouseSelector}/index.store.ts +0 -0
- /package/component/{KgStation → KgWorkStationSelector}/index.store.ts +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
// noinspection ES6UnusedImports
|
|
2
|
-
|
|
3
|
-
import { httpClient, IRequestConfig, IRequestOptions } from '../../../../service';
|
|
4
|
-
import * as DEF from '../../../def';
|
|
5
|
-
import { keys } from '../../models';
|
|
6
|
-
|
|
7
|
-
/** 请求参数. */
|
|
8
|
-
export class GetLatestApkVersionQuery {}
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 获取 APK 最新的版本号.
|
|
12
|
-
*
|
|
13
|
-
* @param config 请求配置.
|
|
14
|
-
* @param option 请求选项.
|
|
15
|
-
*/
|
|
16
|
-
export function GetLatestApkVersion(config?: IRequestConfig<GetLatestApkVersionQuery, {}>, option?: IRequestOptions): Promise<string> {
|
|
17
|
-
return httpClient().request({ method: GetLatestApkVersion.method, url: GetLatestApkVersion.url, ...(config ?? {}) }, option);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
GetLatestApkVersion.method = 'GET' as const;
|
|
21
|
-
GetLatestApkVersion.url = '/sys/common/getLatestApkVersion';
|
|
1
|
+
// noinspection ES6UnusedImports
|
|
2
|
+
|
|
3
|
+
import { httpClient, IRequestConfig, IRequestOptions } from '../../../../service';
|
|
4
|
+
import * as DEF from '../../../def';
|
|
5
|
+
import { keys } from '../../models';
|
|
6
|
+
|
|
7
|
+
/** 请求参数. */
|
|
8
|
+
export class GetLatestApkVersionQuery {}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 获取 APK 最新的版本号.
|
|
12
|
+
*
|
|
13
|
+
* @param config 请求配置.
|
|
14
|
+
* @param option 请求选项.
|
|
15
|
+
*/
|
|
16
|
+
export function GetLatestApkVersion(config?: IRequestConfig<GetLatestApkVersionQuery, {}>, option?: IRequestOptions): Promise<string> {
|
|
17
|
+
return httpClient().request({ method: GetLatestApkVersion.method, url: GetLatestApkVersion.url, ...(config ?? {}) }, option);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
GetLatestApkVersion.method = 'GET' as const;
|
|
21
|
+
GetLatestApkVersion.url = '/sys/common/getLatestApkVersion';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { GetLatestApkVersion, GetLatestApkVersionQuery } from './GetLatestApkVersion';
|
|
1
|
+
export { GetLatestApkVersion, GetLatestApkVersionQuery } from './GetLatestApkVersion';
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
// noinspection ES6UnusedImports
|
|
2
|
-
|
|
3
|
-
import { httpClient, IRequestConfig, IRequestOptions } from '../../../../service';
|
|
4
|
-
import * as DEF from '../../../def';
|
|
5
|
-
import { keys } from '../../models';
|
|
6
|
-
|
|
7
|
-
/** 请求参数. */
|
|
8
|
-
export class GetUserInfoQuery {}
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 获取用户信息.
|
|
12
|
-
*
|
|
13
|
-
* @param config 请求配置.
|
|
14
|
-
* @param option 请求选项.
|
|
15
|
-
*/
|
|
16
|
-
export function GetUserInfo(config?: IRequestConfig<GetUserInfoQuery, {}>, option?: IRequestOptions): Promise<Record<any, any>> {
|
|
17
|
-
return httpClient().request({ method: GetUserInfo.method, url: GetUserInfo.url, ...(config ?? {}) }, option);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
GetUserInfo.method = 'GET' as const;
|
|
21
|
-
GetUserInfo.url = '/sys/getUserInfo';
|
|
1
|
+
// noinspection ES6UnusedImports
|
|
2
|
+
|
|
3
|
+
import { httpClient, IRequestConfig, IRequestOptions } from '../../../../service';
|
|
4
|
+
import * as DEF from '../../../def';
|
|
5
|
+
import { keys } from '../../models';
|
|
6
|
+
|
|
7
|
+
/** 请求参数. */
|
|
8
|
+
export class GetUserInfoQuery {}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 获取用户信息.
|
|
12
|
+
*
|
|
13
|
+
* @param config 请求配置.
|
|
14
|
+
* @param option 请求选项.
|
|
15
|
+
*/
|
|
16
|
+
export function GetUserInfo(config?: IRequestConfig<GetUserInfoQuery, {}>, option?: IRequestOptions): Promise<Record<any, any>> {
|
|
17
|
+
return httpClient().request({ method: GetUserInfo.method, url: GetUserInfo.url, ...(config ?? {}) }, option);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
GetUserInfo.method = 'GET' as const;
|
|
21
|
+
GetUserInfo.url = '/sys/getUserInfo';
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
// noinspection ES6UnusedImports
|
|
2
|
-
|
|
3
|
-
import { httpClient, IRequestConfig, IRequestOptions } from '../../../../service';
|
|
4
|
-
import * as DEF from '../../../def';
|
|
5
|
-
import { keys } from '../../models';
|
|
6
|
-
|
|
7
|
-
/** 请求参数. */
|
|
8
|
-
export class LogoutQuery {}
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 退出登录.
|
|
12
|
-
*
|
|
13
|
-
* @param config 请求配置.
|
|
14
|
-
* @param option 请求选项.
|
|
15
|
-
*/
|
|
16
|
-
export function Logout(config?: IRequestConfig<LogoutQuery, {}>, option?: IRequestOptions): Promise<Record<any, any>> {
|
|
17
|
-
return httpClient().request({ method: Logout.method, url: Logout.url, ...(config ?? {}) }, option);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
Logout.method = 'GET' as const;
|
|
21
|
-
Logout.url = '/sys/logout';
|
|
1
|
+
// noinspection ES6UnusedImports
|
|
2
|
+
|
|
3
|
+
import { httpClient, IRequestConfig, IRequestOptions } from '../../../../service';
|
|
4
|
+
import * as DEF from '../../../def';
|
|
5
|
+
import { keys } from '../../models';
|
|
6
|
+
|
|
7
|
+
/** 请求参数. */
|
|
8
|
+
export class LogoutQuery {}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 退出登录.
|
|
12
|
+
*
|
|
13
|
+
* @param config 请求配置.
|
|
14
|
+
* @param option 请求选项.
|
|
15
|
+
*/
|
|
16
|
+
export function Logout(config?: IRequestConfig<LogoutQuery, {}>, option?: IRequestOptions): Promise<Record<any, any>> {
|
|
17
|
+
return httpClient().request({ method: Logout.method, url: Logout.url, ...(config ?? {}) }, option);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
Logout.method = 'GET' as const;
|
|
21
|
+
Logout.url = '/sys/logout';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { GetUserInfo, GetUserInfoQuery } from './GetUserInfo';
|
|
2
|
-
export { Logout, LogoutQuery } from './Logout';
|
|
1
|
+
export { GetUserInfo, GetUserInfoQuery } from './GetUserInfo';
|
|
2
|
+
export { Logout, LogoutQuery } from './Logout';
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
// noinspection ES6UnusedImports
|
|
2
|
-
|
|
3
|
-
import { httpClient, IRequestConfig, IRequestOptions } from '../../../../service';
|
|
4
|
-
import * as DEF from '../../../def';
|
|
5
|
-
import { keys } from '../../models';
|
|
6
|
-
|
|
7
|
-
/** 请求参数. */
|
|
8
|
-
export class ListQuery {
|
|
9
|
-
/** 排序字段. */
|
|
10
|
-
public column?: string | null;
|
|
11
|
-
/** 排序方式. */
|
|
12
|
-
public order?: 'asc' | 'desc' | null;
|
|
13
|
-
/** 当前页数. */
|
|
14
|
-
public pageNo?: number | null;
|
|
15
|
-
/** 每页条数. */
|
|
16
|
-
public pageSize?: number | null;
|
|
17
|
-
|
|
18
|
-
public constructor(obj?: ListQuery) {
|
|
19
|
-
keys(obj ?? {}).forEach((key: PropertyKey) => {
|
|
20
|
-
switch (key) {
|
|
21
|
-
case 'column':
|
|
22
|
-
case 'order':
|
|
23
|
-
case 'pageNo':
|
|
24
|
-
case 'pageSize':
|
|
25
|
-
Reflect.set(this, key, Reflect.get(obj ?? {}, key));
|
|
26
|
-
break;
|
|
27
|
-
default:
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* 工作站-分页列表查询.
|
|
36
|
-
*
|
|
37
|
-
* @param config 请求配置.
|
|
38
|
-
* @param option 请求选项.
|
|
39
|
-
*/
|
|
40
|
-
export function List(config?: IRequestConfig<ListQuery, {}>, option?: IRequestOptions): Promise<DEF.WMS.IPage<DEF.WMS.WorkstationDTO>> {
|
|
41
|
-
return httpClient().request({ method: List.method, url: List.url, ...(config ?? {}) }, option);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
List.method = 'GET' as const;
|
|
45
|
-
List.url = '/workstation/workstation/list';
|
|
1
|
+
// noinspection ES6UnusedImports
|
|
2
|
+
|
|
3
|
+
import { httpClient, IRequestConfig, IRequestOptions } from '../../../../service';
|
|
4
|
+
import * as DEF from '../../../def';
|
|
5
|
+
import { keys } from '../../models';
|
|
6
|
+
|
|
7
|
+
/** 请求参数. */
|
|
8
|
+
export class ListQuery {
|
|
9
|
+
/** 排序字段. */
|
|
10
|
+
public column?: string | null;
|
|
11
|
+
/** 排序方式. */
|
|
12
|
+
public order?: 'asc' | 'desc' | null;
|
|
13
|
+
/** 当前页数. */
|
|
14
|
+
public pageNo?: number | null;
|
|
15
|
+
/** 每页条数. */
|
|
16
|
+
public pageSize?: number | null;
|
|
17
|
+
|
|
18
|
+
public constructor(obj?: ListQuery) {
|
|
19
|
+
keys(obj ?? {}).forEach((key: PropertyKey) => {
|
|
20
|
+
switch (key) {
|
|
21
|
+
case 'column':
|
|
22
|
+
case 'order':
|
|
23
|
+
case 'pageNo':
|
|
24
|
+
case 'pageSize':
|
|
25
|
+
Reflect.set(this, key, Reflect.get(obj ?? {}, key));
|
|
26
|
+
break;
|
|
27
|
+
default:
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 工作站-分页列表查询.
|
|
36
|
+
*
|
|
37
|
+
* @param config 请求配置.
|
|
38
|
+
* @param option 请求选项.
|
|
39
|
+
*/
|
|
40
|
+
export function List(config?: IRequestConfig<ListQuery, {}>, option?: IRequestOptions): Promise<DEF.WMS.IPage<DEF.WMS.WorkstationDTO>> {
|
|
41
|
+
return httpClient().request({ method: List.method, url: List.url, ...(config ?? {}) }, option);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
List.method = 'GET' as const;
|
|
45
|
+
List.url = '/workstation/workstation/list';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { List, ListQuery } from './List';
|
|
1
|
+
export { List, ListQuery } from './List';
|
package/api/WMS/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * as WMSAPI from './Controllers';
|
|
2
|
-
export * as WMSDEF from './models';
|
|
1
|
+
export * as WMSAPI from './Controllers';
|
|
2
|
+
export * as WMSDEF from './models';
|
package/api/api.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { WMSAPI as WMS } from './WMS';
|
|
1
|
+
export { WMSAPI as WMS } from './WMS';
|
package/api/def.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { WMSDEF as WMS } from './WMS';
|
|
1
|
+
export { WMSDEF as WMS } from './WMS';
|
package/api/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * as API from './api';
|
|
2
|
-
export * as DEF from './def';
|
|
1
|
+
export * as API from './api';
|
|
2
|
+
export * as DEF from './def';
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<UniPopup ref="popupRef$" :type="'bottom'" class="kg-locale-selector">
|
|
3
|
+
<UniCard :isFull="true" :title="'选择语言'">
|
|
4
|
+
<view>
|
|
5
|
+
<view class="body">
|
|
6
|
+
<UniDataCheckbox :localdata="localeDataList$$" :modelValue="kg.locale" @update:modelValue="kg.setLocale($event)" />
|
|
7
|
+
</view>
|
|
8
|
+
<view class="buttons">
|
|
9
|
+
<button class="btn btn-cancel" @tap.stop="onCancel()">取消</button>
|
|
10
|
+
<button :type="'primary' as any" class="btn btn-ok" @tap.stop="onOk">确认</button>
|
|
11
|
+
</view>
|
|
12
|
+
</view>
|
|
13
|
+
</UniCard>
|
|
14
|
+
</UniPopup>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<!--语言选择-->
|
|
18
|
+
<script lang="ts" setup>
|
|
19
|
+
import { UniCard, UniDataCheckbox, UniPopup } from '../../uni-ui';
|
|
20
|
+
import { computed, ref } from 'vue';
|
|
21
|
+
import { KG } from '../../model';
|
|
22
|
+
import { useKg } from '../../config';
|
|
23
|
+
|
|
24
|
+
const kg = useKg();
|
|
25
|
+
|
|
26
|
+
//region DATA
|
|
27
|
+
//----------------------------------------------------------------------------------------------------
|
|
28
|
+
const popupRef$ = ref<any>(null);
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 语言数据列表.
|
|
32
|
+
*/
|
|
33
|
+
const localeDataList$$ = computed<Array<{ text: string; value: string }>>(() => {
|
|
34
|
+
return KG.LOCALE_DATA_LIST.map((i) => ({ text: i.text, value: i.code }));
|
|
35
|
+
});
|
|
36
|
+
//----------------------------------------------------------------------------------------------------
|
|
37
|
+
//endregion
|
|
38
|
+
|
|
39
|
+
//region FUNCTION
|
|
40
|
+
//----------------------------------------------------------------------------------------------------
|
|
41
|
+
/**
|
|
42
|
+
* 语言选择--取消.
|
|
43
|
+
*/
|
|
44
|
+
function onCancel() {
|
|
45
|
+
popupRef$.value?.close();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 语言选择--确定.
|
|
50
|
+
*/
|
|
51
|
+
function onOk() {
|
|
52
|
+
popupRef$.value?.close();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 打开弹窗.
|
|
57
|
+
*/
|
|
58
|
+
function open() {
|
|
59
|
+
popupRef$.value?.open();
|
|
60
|
+
}
|
|
61
|
+
//----------------------------------------------------------------------------------------------------
|
|
62
|
+
//endregion
|
|
63
|
+
|
|
64
|
+
defineExpose({ open });
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<style>
|
|
68
|
+
.kg-locale-selector :deep(.uni-card) {
|
|
69
|
+
margin: 0 2px 1px 1px !important;
|
|
70
|
+
box-shadow: none !important;
|
|
71
|
+
border-radius: 3px !important;
|
|
72
|
+
border-left-width: 1px !important;
|
|
73
|
+
padding: 0px !important;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.kg-locale-selector :deep(.uni-card) .uni-card__header {
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.kg-locale-selector :deep(.uni-card) .uni-card__content {
|
|
80
|
+
padding: 0px !important;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.kg-locale-selector :deep(.uni-card) .body {
|
|
84
|
+
border-bottom: 1px solid #eeeeee;
|
|
85
|
+
margin-bottom: 1px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.kg-locale-selector :deep(.uni-card) .body .uni-data-checklist .checklist-group {
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.kg-locale-selector :deep(.uni-card) .body .uni-data-checklist .checklist-group .checklist-box {
|
|
93
|
+
margin: 0;
|
|
94
|
+
padding: 12px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.kg-locale-selector :deep(.uni-card) .buttons {
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
justify-content: space-between;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.kg-locale-selector :deep(.uni-card) .buttons uni-button {
|
|
104
|
+
flex: 1;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.kg-locale-selector :deep(.uni-card) .buttons uni-button + uni-button {
|
|
108
|
+
margin-left: 1px;
|
|
109
|
+
}
|
|
110
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as KgLocaleSelector } from './KgLocaleSelector.vue';
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { computed, ref } from 'vue';
|
|
18
18
|
import { UniIcons, UniNavBar } from '../../uni-ui';
|
|
19
19
|
import { KgUtil } from '../../util';
|
|
20
|
-
import { KgUpdatePopup } from '../
|
|
20
|
+
import { KgUpdatePopup } from '../KgUpdateNotice';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* 顶部标题栏.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view :class="getClass">
|
|
3
|
-
<UniPopup ref="popupRef" type="dialog">
|
|
3
|
+
<UniPopup ref="popupRef$" type="dialog">
|
|
4
4
|
<UniPopupDialog
|
|
5
5
|
:beforeClose="true"
|
|
6
6
|
:cancelText="downloadTask ? '取消升级' : '以后再说'"
|
|
@@ -18,10 +18,11 @@
|
|
|
18
18
|
</view>
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
|
+
<!--升级提示-->
|
|
21
22
|
<script lang="ts" name="KgUpdatePopup" setup>
|
|
22
23
|
import { computed, onMounted, onUnmounted, PropType, ref } from 'vue';
|
|
23
24
|
import { UniPopup, UniPopupDialog } from '../../uni-ui';
|
|
24
|
-
import { useAppStore } from '../../
|
|
25
|
+
import { useAppStore } from '../../config/app.store';
|
|
25
26
|
import { KgUtil } from '../../util';
|
|
26
27
|
|
|
27
28
|
/**
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
|
|
40
41
|
//region DATA
|
|
41
42
|
// ----------------------------------------------------------------------------------------------------
|
|
42
|
-
const popupRef = ref<any>(null);
|
|
43
|
+
const popupRef$ = ref<any>(null);
|
|
43
44
|
/** 下载任务. */
|
|
44
45
|
const downloadTask = ref<UniNamespace.DownloadTask | null>(null);
|
|
45
46
|
/** 下载进度. [0, 100] 之间的某个数值, 表示百分比的分子. */
|
|
@@ -117,7 +118,7 @@
|
|
|
117
118
|
|
|
118
119
|
clearInterval(downloadProgressTimer.value);
|
|
119
120
|
|
|
120
|
-
popupRef
|
|
121
|
+
popupRef$.value?.close();
|
|
121
122
|
}
|
|
122
123
|
|
|
123
124
|
/**
|
|
@@ -130,7 +131,7 @@
|
|
|
130
131
|
|
|
131
132
|
clearInterval(downloadProgressTimer.value);
|
|
132
133
|
|
|
133
|
-
popupRef
|
|
134
|
+
popupRef$.value?.close();
|
|
134
135
|
}
|
|
135
136
|
//endregion
|
|
136
137
|
|
|
@@ -141,7 +142,7 @@
|
|
|
141
142
|
switch (name) {
|
|
142
143
|
case 'openKgUpdatePopup':
|
|
143
144
|
version.value = args[0];
|
|
144
|
-
popupRef
|
|
145
|
+
popupRef$.value?.open();
|
|
145
146
|
break;
|
|
146
147
|
}
|
|
147
148
|
});
|
package/component/{KgWarehouse/KgWarehouse.vue → KgWarehouseSelector/KgWarehouseSelector.vue}
RENAMED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<UniPopup ref="popupRef" :type="'dialog'">
|
|
2
|
+
<UniPopup ref="popupRef$" :type="'dialog'">
|
|
3
3
|
<UniPopupDialog :before-close="true" title="选择仓库" @confirm="onOk">
|
|
4
|
-
<UniDataCheckbox v-model="currentWhId" :localdata="
|
|
4
|
+
<UniDataCheckbox v-model="currentWhId$" :localdata="warehouseDataList$" />
|
|
5
5
|
</UniPopupDialog>
|
|
6
6
|
</UniPopup>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
|
+
<!--仓库选择-->
|
|
9
10
|
<script lang="ts" setup>
|
|
10
11
|
import { UniDataCheckbox, UniPopup, UniPopupDialog } from '../../uni-ui';
|
|
11
12
|
import { API } from '../../api';
|
|
12
13
|
import { computed, ref } from 'vue';
|
|
13
14
|
import { SysUserWarehouseDTO, WarehouseDTO } from '../../api/WMS/models';
|
|
14
15
|
import { useKgWarehouse } from './index.hooks';
|
|
15
|
-
import { useAppStore } from '../../
|
|
16
|
+
import { useAppStore } from '../../config/app.store';
|
|
16
17
|
import { KgUtil } from '../../util';
|
|
17
18
|
|
|
18
19
|
const emit = defineEmits(['ok']);
|
|
@@ -20,26 +21,38 @@
|
|
|
20
21
|
const appStore = useAppStore();
|
|
21
22
|
const kgWarehouse = useKgWarehouse();
|
|
22
23
|
|
|
23
|
-
const popupRef = ref<any>(null);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/**
|
|
24
|
+
const popupRef$ = ref<any>(null);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 当前选择的仓库编号.
|
|
28
|
+
*/
|
|
29
|
+
const currentWhId$ = ref<string>('');
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 仓库列表.
|
|
33
|
+
**/
|
|
34
|
+
const warehouseList$ = ref<Array<WarehouseDTO>>([]);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 选项列表.
|
|
38
|
+
*/
|
|
39
|
+
const warehouseDataList$ = ref<Array<{ text: string; value: string }>>([]);
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 用户仓库列表.
|
|
43
|
+
*/
|
|
31
44
|
const userWarehouses = computed<Array<SysUserWarehouseDTO> | undefined>(() => appStore.getUserWarehouses);
|
|
32
45
|
|
|
33
46
|
/** 确定. */
|
|
34
47
|
function onOk() {
|
|
35
|
-
kgWarehouse.store.setWarehouse(
|
|
36
|
-
popupRef
|
|
48
|
+
kgWarehouse.store.setWarehouse(warehouseList$.value.find((i) => i.whId === currentWhId$.value));
|
|
49
|
+
popupRef$.value?.close();
|
|
37
50
|
emit('ok');
|
|
38
51
|
}
|
|
39
52
|
|
|
40
53
|
/** 打开弹窗. */
|
|
41
54
|
function open() {
|
|
42
|
-
popupRef
|
|
55
|
+
popupRef$.value?.open();
|
|
43
56
|
requestWarehouses();
|
|
44
57
|
}
|
|
45
58
|
|
|
@@ -47,7 +60,7 @@
|
|
|
47
60
|
async function requestWarehouses(): Promise<void> {
|
|
48
61
|
try {
|
|
49
62
|
const { records } = await API.WMS.WarehouseController.ListVO({ params: { pageNo: 1, pageSize: 999 } });
|
|
50
|
-
|
|
63
|
+
warehouseList$.value = (records ?? []).filter((i) => {
|
|
51
64
|
// 管理员拥有所有仓库
|
|
52
65
|
if (KgUtil.isAdminUser()) {
|
|
53
66
|
return true;
|
|
@@ -56,20 +69,20 @@
|
|
|
56
69
|
return userWarehouses.value?.find((j) => j.wh_id === i.whId);
|
|
57
70
|
});
|
|
58
71
|
|
|
59
|
-
|
|
72
|
+
warehouseDataList$.value = warehouseList$.value.map((i: WarehouseDTO) => ({
|
|
60
73
|
text: `${i.whDsc ?? ' '} - ${i.whId ?? ' '}`,
|
|
61
74
|
value: i.whId ?? '',
|
|
62
75
|
}));
|
|
63
76
|
|
|
64
|
-
const currentWarehouse =
|
|
77
|
+
const currentWarehouse = warehouseList$.value.find((i) => i.whId === kgWarehouse.warehouse.value?.whId) ?? null;
|
|
65
78
|
// 如果当前仓库不为空, 且有效(存在于当前仓库列表中), 则继续使用
|
|
66
79
|
if (currentWarehouse) {
|
|
67
|
-
currentWhId
|
|
80
|
+
currentWhId$.value = currentWarehouse.whId ?? '';
|
|
68
81
|
}
|
|
69
82
|
// 否则, 清空当前仓库, 并默认选中第一个仓库
|
|
70
83
|
else {
|
|
71
84
|
kgWarehouse.store.setWarehouse(null);
|
|
72
|
-
currentWhId
|
|
85
|
+
currentWhId$.value = warehouseList$.value[0]?.whId ?? '';
|
|
73
86
|
}
|
|
74
87
|
} catch (e) {
|
|
75
88
|
console.error(e);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed, ComputedRef } from 'vue';
|
|
2
2
|
import { IKgWarehouseStore, useKgWarehouseStore } from './index.store';
|
|
3
3
|
import { WarehouseDTO } from '../../api/WMS/models';
|
|
4
|
-
import { useAppStore } from '../../
|
|
4
|
+
import { useAppStore } from '../../config/app.store';
|
|
5
5
|
|
|
6
6
|
export type IUseKgWarehouse = {
|
|
7
7
|
store: IKgWarehouseStore;
|
|
@@ -35,7 +35,6 @@ export function useKgWarehouse(): IUseKgWarehouse {
|
|
|
35
35
|
return store.getWarehouse;
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
|
|
39
38
|
return {
|
|
40
39
|
store,
|
|
41
40
|
warehouse,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as KgWarehouseSelector } from './KgWarehouseSelector.vue';
|
|
2
|
+
|
|
3
|
+
/** @deprecated 已废弃, 请使用 {@link KgWarehouseSelector} */
|
|
4
|
+
const KgWarehouse = KgWarehouseSelector;
|
|
5
|
+
|
|
6
|
+
export { KgWarehouseSelector, KgWarehouse };
|
|
7
|
+
|
|
8
|
+
export * from './index.hooks';
|
|
9
|
+
export * from './index.store';
|
package/component/{KgStation/KgStation.vue → KgWorkStationSelector/KgWorkStationSelector.vue}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<UniPopup ref="popupRef" :type="'dialog'">
|
|
2
|
+
<UniPopup ref="popupRef$" :type="'dialog'">
|
|
3
3
|
<UniPopupDialog :before-close="true" title="选择工作站" @close="onClose" @confirm="onOk">
|
|
4
4
|
<div class="row">
|
|
5
5
|
<div class="label">工作站:</div>
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
</UniPopup>
|
|
28
28
|
</template>
|
|
29
29
|
|
|
30
|
+
<!--工作站过工作区选择-->
|
|
30
31
|
<script lang="ts" setup>
|
|
31
32
|
import { UniDataSelect, UniEasyinput, UniPopup, UniPopupDialog } from '../../uni-ui';
|
|
32
33
|
import { computed, nextTick, ref, watch } from 'vue';
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
|
|
41
42
|
//region DATA
|
|
42
43
|
// ----------------------------------------------------------------------------------------------------
|
|
43
|
-
const popupRef = ref<any>(null);
|
|
44
|
+
const popupRef$ = ref<any>(null);
|
|
44
45
|
|
|
45
46
|
/** 当前选择的工作站编号. */
|
|
46
47
|
const currentDevcod = ref<string>('');
|
|
@@ -64,9 +65,7 @@
|
|
|
64
65
|
/**
|
|
65
66
|
* 工作站下拉列表.
|
|
66
67
|
*/
|
|
67
|
-
const stationDatas = computed<Array<{ text: string; value: string }>>(() =>
|
|
68
|
-
stations.value.map((i) => ({ text: i.devcodDsc ?? i.devcod ?? '', value: i.devcod ?? '' })),
|
|
69
|
-
);
|
|
68
|
+
const stationDatas = computed<Array<{ text: string; value: string }>>(() => stations.value.map((i) => ({ text: i.devcodDsc ?? i.devcod ?? '', value: i.devcod ?? '' })));
|
|
70
69
|
|
|
71
70
|
/**
|
|
72
71
|
* 工作区下拉列表.
|
|
@@ -168,7 +167,7 @@
|
|
|
168
167
|
* 取消.
|
|
169
168
|
*/
|
|
170
169
|
function onClose() {
|
|
171
|
-
popupRef
|
|
170
|
+
popupRef$.value?.close();
|
|
172
171
|
}
|
|
173
172
|
|
|
174
173
|
/**
|
|
@@ -183,13 +182,13 @@
|
|
|
183
182
|
kgStation.store.setStation(null);
|
|
184
183
|
}
|
|
185
184
|
|
|
186
|
-
popupRef
|
|
185
|
+
popupRef$.value?.close();
|
|
187
186
|
emit('ok');
|
|
188
187
|
}
|
|
189
188
|
|
|
190
189
|
/** 打开弹窗. */
|
|
191
190
|
function open() {
|
|
192
|
-
popupRef
|
|
191
|
+
popupRef$.value?.open();
|
|
193
192
|
|
|
194
193
|
currentDevcod.value = kgStation.station.value?.devcod ?? '';
|
|
195
194
|
currentHmewrkare.value = kgStation.station.value?.hmewrkare ?? '';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, ComputedRef } from 'vue';
|
|
2
2
|
import { IKgStationStore, useKgStationStore } from './index.store';
|
|
3
|
-
import { useKgWarehouse } from '../
|
|
3
|
+
import { useKgWarehouse } from '../KgWarehouseSelector';
|
|
4
4
|
import { WorkstationAreaDTO, WorkstationDTO } from '../../api/WMS/models';
|
|
5
5
|
|
|
6
6
|
export type IUseKgStation = {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as KgWorkStationSelector } from './KgWorkStationSelector.vue';
|
|
2
|
+
|
|
3
|
+
/** @deprecated 已废弃, 请使用 {@link KgWorkStationSelector} */
|
|
4
|
+
const KgStation = KgWorkStationSelector;
|
|
5
|
+
|
|
6
|
+
export { KgWorkStationSelector, KgStation };
|
|
7
|
+
|
|
8
|
+
export * from './index.hooks';
|
|
9
|
+
export * from './index.store';
|