@kengic/uni 0.6.3-beta.0 → 0.6.3-beta.2
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/dist/api/WMS/Controllers/CommonController/GetLatestApkVersion.ts +21 -28
- package/dist/api/WMS/Controllers/CommonController/index.ts +1 -1
- package/dist/api/WMS/Controllers/LoginController/GetUserInfo.ts +21 -0
- package/dist/api/WMS/Controllers/LoginController/Logout.ts +21 -28
- package/dist/api/WMS/Controllers/LoginController/index.ts +2 -1
- package/dist/api/WMS/Controllers/WhController/ListVO.ts +88 -92
- package/dist/api/WMS/Controllers/WhController/index.ts +1 -1
- package/dist/api/WMS/Controllers/WorkstationController/List.ts +45 -0
- package/dist/api/WMS/Controllers/WorkstationController/index.ts +1 -0
- package/dist/api/WMS/Controllers/index.ts +4 -3
- package/dist/api/WMS/index.ts +2 -2
- package/dist/api/WMS/models.ts +318 -192
- package/dist/api/api.ts +1 -1
- package/dist/api/def.ts +1 -1
- package/dist/api/index.ts +2 -2
- package/dist/component/KgStation/KgStation.vue +176 -0
- package/dist/component/KgStation/index.hooks.ts +62 -0
- package/dist/component/KgStation/index.store.ts +76 -0
- package/dist/component/KgStation/index.ts +4 -0
- package/dist/component/KgTabBar/KgTabBar.vue +2 -2
- package/dist/component/KgWarehouse/KgWarehouse.vue +47 -30
- package/dist/component/KgWarehouse/index.hooks.ts +24 -1
- package/dist/component/KgWarehouse/index.store.ts +8 -8
- package/dist/component/index.ts +1 -0
- package/dist/index.css +5 -0
- package/dist/service/http-client.ts +9 -2
- package/dist/store/app.store.ts +68 -49
- package/dist/uni/uni-ui/uni-data-select/uni-data-select.vue +18 -13
- package/dist/uni/uni-ui/uni-icons/uniicons_file.ts +646 -646
- package/dist/uni/uni-ui/uni-icons/uniicons_file_vue.js +646 -646
- package/dist/uni/uni-ui/uni-list-item/uni-list-item.vue +507 -503
- package/dist/uni/uni-ui/uni-popup-dialog/keypress.js +42 -42
- package/dist/uni/uni-ui/uni-popup-dialog/uni-popup-dialog.vue +12 -7
- package/dist/uni/uni-ui/uni-rate/uni-rate.vue +1 -2
- package/dist/util/kg.ts +33 -7
- package/package.json +2 -2
package/dist/store/app.store.ts
CHANGED
|
@@ -1,72 +1,32 @@
|
|
|
1
1
|
import { defineStore } from 'pinia';
|
|
2
2
|
import { STORAGE_KEYS } from '../const';
|
|
3
|
-
import { SysUser } from '../api/WMS/models';
|
|
3
|
+
import { SysUser, SysUserWarehouseDTO } from '../api/WMS/models';
|
|
4
4
|
import { API } from '../api';
|
|
5
5
|
|
|
6
6
|
interface IAppState {
|
|
7
7
|
/** 后端接口地址. */
|
|
8
8
|
apiUrl: string;
|
|
9
9
|
|
|
10
|
+
/** 是否取消本次升级. 取消之后, 使用应用期间不会再提示升级, 直到下次重新打开应用才会提示升级. */
|
|
11
|
+
isUpdateCancel: boolean;
|
|
12
|
+
|
|
10
13
|
/** 登录令牌. */
|
|
11
14
|
token: string;
|
|
12
15
|
|
|
13
16
|
/** 当前登录用户. */
|
|
14
17
|
user: SysUser | null;
|
|
15
18
|
|
|
16
|
-
/**
|
|
17
|
-
|
|
19
|
+
/**
|
|
20
|
+
* 用户仓库.
|
|
21
|
+
*/
|
|
22
|
+
userWarehouses: Array<SysUserWarehouseDTO> | undefined;
|
|
18
23
|
}
|
|
19
24
|
|
|
20
25
|
export const useAppStore = defineStore('app', {
|
|
21
|
-
state: (): IAppState => ({
|
|
22
|
-
apiUrl: '',
|
|
23
|
-
token: '',
|
|
24
|
-
user: {},
|
|
25
|
-
isUpdateCancel: false,
|
|
26
|
-
}),
|
|
27
|
-
getters: {
|
|
28
|
-
/** 后端接口地址. */
|
|
29
|
-
getApiUrl(state) {
|
|
30
|
-
return state.apiUrl || uni.getStorageSync(STORAGE_KEYS.API_URL);
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
/** 登录令牌. */
|
|
34
|
-
getToken(state) {
|
|
35
|
-
return state.token || uni.getStorageSync(STORAGE_KEYS.TOKEN);
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
/** 当前登录用户. */
|
|
39
|
-
getUser(state) {
|
|
40
|
-
return state.user || uni.getStorageSync(STORAGE_KEYS.USER);
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
/** 是否取消本次升级. */
|
|
44
|
-
getIsUpdateCancel(state) {
|
|
45
|
-
return state.isUpdateCancel;
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
26
|
actions: {
|
|
49
|
-
setApiUrl(apiUrl: string) {
|
|
50
|
-
uni.setStorageSync(STORAGE_KEYS.API_URL, apiUrl);
|
|
51
|
-
this.apiUrl = apiUrl;
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
setToken(token: string) {
|
|
55
|
-
uni.setStorageSync(STORAGE_KEYS.TOKEN, token);
|
|
56
|
-
this.token = token;
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
setUser(user: SysUser | null) {
|
|
60
|
-
uni.setStorageSync(STORAGE_KEYS.USER, user);
|
|
61
|
-
this.user = user;
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
setIsUpdateCancel(value: boolean) {
|
|
65
|
-
this.isUpdateCancel = value;
|
|
66
|
-
},
|
|
67
|
-
|
|
68
27
|
/**
|
|
69
28
|
* 退出登录.
|
|
29
|
+
*
|
|
70
30
|
* @param param.isRequest 是否请求后端退出登录接口, 默认为 true.
|
|
71
31
|
*/
|
|
72
32
|
async logout(param: { isRequest?: boolean } = {}) {
|
|
@@ -95,5 +55,64 @@ export const useAppStore = defineStore('app', {
|
|
|
95
55
|
* @param version 最新版本.
|
|
96
56
|
*/
|
|
97
57
|
openKgUpdatePopup(version: string) {},
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 查询用户仓库.
|
|
61
|
+
*/
|
|
62
|
+
async requestUserWarehouses() {
|
|
63
|
+
const { userWarehouses } = await API.WMS.LoginController.GetUserInfo();
|
|
64
|
+
this.userWarehouses = userWarehouses ?? [];
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
setApiUrl(apiUrl: string) {
|
|
68
|
+
uni.setStorageSync(STORAGE_KEYS.API_URL, apiUrl);
|
|
69
|
+
this.apiUrl = apiUrl;
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
setIsUpdateCancel(value: boolean) {
|
|
73
|
+
this.isUpdateCancel = value;
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
setToken(token: string) {
|
|
77
|
+
uni.setStorageSync(STORAGE_KEYS.TOKEN, token);
|
|
78
|
+
this.token = token;
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
setUser(user: SysUser | null) {
|
|
82
|
+
uni.setStorageSync(STORAGE_KEYS.USER, user);
|
|
83
|
+
this.user = user;
|
|
84
|
+
},
|
|
98
85
|
},
|
|
86
|
+
getters: {
|
|
87
|
+
/** 后端接口地址. */
|
|
88
|
+
getApiUrl(state) {
|
|
89
|
+
return state.apiUrl;
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
/** 是否取消本次升级. */
|
|
93
|
+
getIsUpdateCancel(state) {
|
|
94
|
+
return state.isUpdateCancel;
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
/** 登录令牌. */
|
|
98
|
+
getToken(state) {
|
|
99
|
+
return state.token;
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
/** 当前登录用户. */
|
|
103
|
+
getUser(state) {
|
|
104
|
+
return state.user;
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
getUserWarehouses(): Array<SysUserWarehouseDTO> | undefined {
|
|
108
|
+
return this.userWarehouses;
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
state: (): IAppState => ({
|
|
112
|
+
apiUrl: uni.getStorageSync(STORAGE_KEYS.API_URL) ?? '',
|
|
113
|
+
isUpdateCancel: false,
|
|
114
|
+
token: uni.getStorageSync(STORAGE_KEYS.TOKEN) ?? '',
|
|
115
|
+
user: uni.getStorageSync(STORAGE_KEYS.USER) ?? {},
|
|
116
|
+
userWarehouses: undefined,
|
|
117
|
+
}),
|
|
99
118
|
});
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
<view class="uni-select" :class="{ 'uni-select--disabled': disabled }">
|
|
6
6
|
<view class="uni-select__input-box" @click="toggleSelector">
|
|
7
7
|
<view v-if="current" class="uni-select__input-text">{{ textShow }}</view>
|
|
8
|
-
<view v-else class="uni-select__input-text uni-select__input-placeholder">{{ typePlaceholder }}</view>
|
|
8
|
+
<view v-else class="uni-select__input-text uni-select__input-placeholder">{{ typePlaceholder }} </view>
|
|
9
9
|
<view v-if="current && clear && !disabled" @click.stop="clearVal">
|
|
10
|
-
<uni-icons type="clear" color="#c0c4cc" size="
|
|
10
|
+
<uni-icons type="clear" color="#c0c4cc" size="14" />
|
|
11
11
|
</view>
|
|
12
12
|
<view v-else style="display: flex; align-items: center; justify-content: center">
|
|
13
13
|
<view :class="showSelector ? 'ant-design--caret-up-filled' : 'ant-design--caret-down-filled'" />
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<text>{{ emptyTips }}</text>
|
|
22
22
|
</view>
|
|
23
23
|
<view v-else class="uni-select__selector-item" v-for="(item, index) in mixinDatacomResData" :key="index" @click="change(item)">
|
|
24
|
-
<text :class="{ 'uni-select__selector__disabled': item.disable }">{{ formatItemName(item) }}</text>
|
|
24
|
+
<text :class="{ 'uni-select__selector__disabled': item.disable }">{{ formatItemName(item) }} </text>
|
|
25
25
|
</view>
|
|
26
26
|
</scroll-view>
|
|
27
27
|
</view>
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
* @property {String} placeholder 输入框的提示文字
|
|
44
44
|
* @property {Boolean} disabled 是否禁用
|
|
45
45
|
* @property {String} placement 弹出位置
|
|
46
|
-
*
|
|
47
|
-
*
|
|
46
|
+
* @value top 顶部弹出
|
|
47
|
+
* @value bottom 底部弹出(default)
|
|
48
48
|
* @event {Function} change 选中发生变化触发
|
|
49
49
|
*/
|
|
50
50
|
|
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
.uni-label-text {
|
|
352
|
-
font-size:
|
|
352
|
+
font-size: 13px;
|
|
353
353
|
font-weight: bold;
|
|
354
354
|
color: $uni-base-color;
|
|
355
355
|
margin: auto 0;
|
|
@@ -357,12 +357,12 @@
|
|
|
357
357
|
}
|
|
358
358
|
|
|
359
359
|
.uni-select {
|
|
360
|
-
font-size:
|
|
360
|
+
font-size: 13px;
|
|
361
361
|
border: 1px solid $uni-border-3;
|
|
362
362
|
box-sizing: border-box;
|
|
363
363
|
border-radius: 3px;
|
|
364
364
|
padding: 0 5px;
|
|
365
|
-
padding-left:
|
|
365
|
+
padding-left: 6px;
|
|
366
366
|
position: relative;
|
|
367
367
|
/* #ifndef APP-NVUE */
|
|
368
368
|
display: flex;
|
|
@@ -391,6 +391,7 @@
|
|
|
391
391
|
|
|
392
392
|
.uni-select__input-box {
|
|
393
393
|
height: 26px;
|
|
394
|
+
line-height: 26px;
|
|
394
395
|
position: relative;
|
|
395
396
|
/* #ifndef APP-NVUE */
|
|
396
397
|
display: flex;
|
|
@@ -402,13 +403,13 @@
|
|
|
402
403
|
|
|
403
404
|
.uni-select__input {
|
|
404
405
|
flex: 1;
|
|
405
|
-
font-size:
|
|
406
|
+
font-size: 13px;
|
|
406
407
|
height: 22px;
|
|
407
408
|
line-height: 22px;
|
|
408
409
|
}
|
|
409
410
|
|
|
410
411
|
.uni-select__input-plac {
|
|
411
|
-
font-size:
|
|
412
|
+
font-size: 13px;
|
|
412
413
|
color: $uni-secondary-color;
|
|
413
414
|
}
|
|
414
415
|
|
|
@@ -460,10 +461,10 @@
|
|
|
460
461
|
cursor: pointer;
|
|
461
462
|
/* #endif */
|
|
462
463
|
line-height: 25px;
|
|
463
|
-
font-size:
|
|
464
|
+
font-size: 13px;
|
|
464
465
|
text-align: center;
|
|
465
466
|
/* border-bottom: solid 1px $uni-border-3; */
|
|
466
|
-
padding: 0px
|
|
467
|
+
padding: 0px 5px;
|
|
467
468
|
margin-bottom: 1px;
|
|
468
469
|
border-radius: 2px;
|
|
469
470
|
}
|
|
@@ -547,7 +548,7 @@
|
|
|
547
548
|
|
|
548
549
|
.uni-select__input-placeholder {
|
|
549
550
|
color: $uni-base-color;
|
|
550
|
-
font-size:
|
|
551
|
+
font-size: 13px;
|
|
551
552
|
}
|
|
552
553
|
|
|
553
554
|
.uni-select--mask {
|
|
@@ -576,4 +577,8 @@
|
|
|
576
577
|
background-size: 100% 100%;
|
|
577
578
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'%3E%3Cpath fill='%2300000040' d='M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35'/%3E%3C/svg%3E");
|
|
578
579
|
}
|
|
580
|
+
|
|
581
|
+
.uni-icons.uniui-clear {
|
|
582
|
+
margin-right: -1px;
|
|
583
|
+
}
|
|
579
584
|
</style>
|