tplus-components-touch 1.26.1 → 1.27.1
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/README.md +16 -16
- package/locales/zh/tplus-components-touch.json +1 -1
- package/locales/zh-CN/tplus-components-touch.json +1 -1
- package/mocks/memberInfo.json +79 -79
- package/package.json +2 -2
- package/tsconfig.json +26 -26
- package/dist/components/addLog/AddLogProcessor.js +0 -53
- package/dist/components/addLog/AddLogProcessor.js.map +0 -1
- package/dist/components/addLog/OperationLogApi.js +0 -164
- package/dist/components/addLog/OperationLogApi.js.map +0 -1
- package/dist/components/autoComplete/index.js +0 -259
- package/dist/components/autoComplete/index.js.map +0 -1
- package/dist/components/autoComplete/index.less +0 -89
- package/dist/components/autoComplete/option.js +0 -75
- package/dist/components/autoComplete/option.js.map +0 -1
- package/dist/components/autoCompleteWithKeyboard/index.js +0 -206
- package/dist/components/autoCompleteWithKeyboard/index.js.map +0 -1
- package/dist/components/autoCompleteWithKeyboard/index.less +0 -5
- package/dist/components/billSearch/api.js +0 -425
- package/dist/components/billSearch/api.js.map +0 -1
- package/dist/components/billSearch/index.js +0 -2030
- package/dist/components/billSearch/index.js.map +0 -1
- package/dist/components/billSearch/index.less +0 -573
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +0 -568
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +0 -1
- package/dist/components/cloudPrint/api.js +0 -454
- package/dist/components/cloudPrint/api.js.map +0 -1
- package/dist/components/cloudPrint/index.js +0 -974
- package/dist/components/cloudPrint/index.js.map +0 -1
- package/dist/components/cloudPrint/printDispatch.js +0 -336
- package/dist/components/cloudPrint/printDispatch.js.map +0 -1
- package/dist/components/commonForm/autoComplete/index.js +0 -272
- package/dist/components/commonForm/autoComplete/index.js.map +0 -1
- package/dist/components/commonForm/autoComplete/style.less +0 -8
- package/dist/components/commonForm/datePicker/index.js +0 -117
- package/dist/components/commonForm/datePicker/index.js.map +0 -1
- package/dist/components/commonForm/datePicker/style.less +0 -11
- package/dist/components/commonForm/formControl/index.js +0 -183
- package/dist/components/commonForm/formControl/index.js.map +0 -1
- package/dist/components/commonForm/formControl/style.less +0 -8
- package/dist/components/commonForm/index.js +0 -208
- package/dist/components/commonForm/index.js.map +0 -1
- package/dist/components/commonForm/inputNumber/index.js +0 -291
- package/dist/components/commonForm/inputNumber/index.js.map +0 -1
- package/dist/components/commonForm/inputNumber/style.less +0 -17
- package/dist/components/commonForm/radio/index.js +0 -157
- package/dist/components/commonForm/radio/index.js.map +0 -1
- package/dist/components/commonForm/radio/style.less +0 -11
- package/dist/components/commonForm/style.less +0 -12
- package/dist/components/deliverySearch/api.js +0 -355
- package/dist/components/deliverySearch/api.js.map +0 -1
- package/dist/components/deliverySearch/index.js +0 -1254
- package/dist/components/deliverySearch/index.js.map +0 -1
- package/dist/components/deliverySearch/index.less +0 -624
- package/dist/components/form/index.js +0 -325
- package/dist/components/form/index.js.map +0 -1
- package/dist/components/hardwareAPI/index.js +0 -181
- package/dist/components/hardwareAPI/index.js.map +0 -1
- package/dist/components/hotKey/config.js +0 -306
- package/dist/components/hotKey/config.js.map +0 -1
- package/dist/components/hotKey/hotKeyModal.js +0 -479
- package/dist/components/hotKey/hotKeyModal.js.map +0 -1
- package/dist/components/hotKey/index.js +0 -782
- package/dist/components/hotKey/index.js.map +0 -1
- package/dist/components/hotKey/localConfig.js +0 -3831
- package/dist/components/hotKey/localConfig.js.map +0 -1
- package/dist/components/hotKey/style.less +0 -99
- package/dist/components/hotKey/utils.js +0 -135
- package/dist/components/hotKey/utils.js.map +0 -1
- package/dist/components/input/index.js +0 -257
- package/dist/components/input/index.js.map +0 -1
- package/dist/components/input/style.less +0 -107
- package/dist/components/input/tplusInput/index.js +0 -89
- package/dist/components/input/tplusInput/index.js.map +0 -1
- package/dist/components/input/tplusInput/inputContent.js +0 -130
- package/dist/components/input/tplusInput/inputContent.js.map +0 -1
- package/dist/components/input/tplusInput/inputs.js +0 -201
- package/dist/components/input/tplusInput/inputs.js.map +0 -1
- package/dist/components/input/tplusInput/style.less +0 -194
- package/dist/components/input/utils/index.js +0 -26
- package/dist/components/input/utils/index.js.map +0 -1
- package/dist/components/inventorySearch/api.js +0 -214
- package/dist/components/inventorySearch/api.js.map +0 -1
- package/dist/components/inventorySearch/index.js +0 -303
- package/dist/components/inventorySearch/index.js.map +0 -1
- package/dist/components/inventorySearch/index.less +0 -244
- package/dist/components/inventorySearch/store.js +0 -344
- package/dist/components/inventorySearch/store.js.map +0 -1
- package/dist/components/inventorySearch/tab.js +0 -255
- package/dist/components/inventorySearch/tab.js.map +0 -1
- package/dist/components/keyboard/index.js +0 -258
- package/dist/components/keyboard/index.js.map +0 -1
- package/dist/components/keyboard/index.less +0 -556
- package/dist/components/keyboard/letterKeyboard.js +0 -222
- package/dist/components/keyboard/letterKeyboard.js.map +0 -1
- package/dist/components/keyboard/numKeyboard.js +0 -458
- package/dist/components/keyboard/numKeyboard.js.map +0 -1
- package/dist/components/keyboard/numKeyboardDigit.js +0 -502
- package/dist/components/keyboard/numKeyboardDigit.js.map +0 -1
- package/dist/components/keyboard/numKeyboardScan.js +0 -215
- package/dist/components/keyboard/numKeyboardScan.js.map +0 -1
- package/dist/components/keyboard/numberButtonInteger.js +0 -296
- package/dist/components/keyboard/numberButtonInteger.js.map +0 -1
- package/dist/components/keyboard/numberButton_input.js +0 -300
- package/dist/components/keyboard/numberButton_input.js.map +0 -1
- package/dist/components/keyboard/onlyKeyboard.js +0 -90
- package/dist/components/keyboard/onlyKeyboard.js.map +0 -1
- package/dist/components/keyboard/onlyLetterButton.js +0 -187
- package/dist/components/keyboard/onlyLetterButton.js.map +0 -1
- package/dist/components/keyboard/onlyLetterButton2.js +0 -235
- package/dist/components/keyboard/onlyLetterButton2.js.map +0 -1
- package/dist/components/keyboard/onlyLetterButton2.less +0 -184
- package/dist/components/keyboard/onlyNumberButton.js +0 -128
- package/dist/components/keyboard/onlyNumberButton.js.map +0 -1
- package/dist/components/keyboard/onlyNumberButton2.js +0 -115
- package/dist/components/keyboard/onlyNumberButton2.js.map +0 -1
- package/dist/components/keyboard/textKeyboard.js +0 -50
- package/dist/components/keyboard/textKeyboard.js.map +0 -1
- package/dist/components/layout/hamburger.js +0 -29
- package/dist/components/layout/hamburger.js.map +0 -1
- package/dist/components/layout/index.js +0 -31
- package/dist/components/layout/index.js.map +0 -1
- package/dist/components/layout/layout.js +0 -182
- package/dist/components/layout/layout.js.map +0 -1
- package/dist/components/layout/sider.js +0 -165
- package/dist/components/layout/sider.js.map +0 -1
- package/dist/components/layout/style.less +0 -83
- package/dist/components/loading/index.js +0 -193
- package/dist/components/loading/index.js.map +0 -1
- package/dist/components/loading/loadingContent.js +0 -159
- package/dist/components/loading/loadingContent.js.map +0 -1
- package/dist/components/loading/style.less +0 -51
- package/dist/components/loading/utils.js +0 -29
- package/dist/components/loading/utils.js.map +0 -1
- package/dist/components/message/index.js +0 -286
- package/dist/components/message/index.js.map +0 -1
- package/dist/components/message/index.less +0 -150
- package/dist/components/modal/index.js +0 -93
- package/dist/components/modal/index.js.map +0 -1
- package/dist/components/modal/index.less +0 -19
- package/dist/components/modalVertical/index.js +0 -338
- package/dist/components/modalVertical/index.js.map +0 -1
- package/dist/components/modalVertical/style.less +0 -114
- package/dist/components/modalWraper/index.js +0 -482
- package/dist/components/modalWraper/index.js.map +0 -1
- package/dist/components/modalWraper/style.less +0 -363
- package/dist/components/modalWraper/utils.js +0 -49
- package/dist/components/modalWraper/utils.js.map +0 -1
- package/dist/components/notification/index.js +0 -124
- package/dist/components/notification/index.js.map +0 -1
- package/dist/components/notification/index.less +0 -58
- package/dist/components/overflowTip/index.js +0 -269
- package/dist/components/overflowTip/index.js.map +0 -1
- package/dist/components/overflowTip/style.less +0 -66
- package/dist/components/page/index.js +0 -49
- package/dist/components/page/index.js.map +0 -1
- package/dist/components/page/index.less +0 -26
- package/dist/components/product/detail.js +0 -97
- package/dist/components/product/detail.js.map +0 -1
- package/dist/components/product/getCard.js +0 -145
- package/dist/components/product/getCard.js.map +0 -1
- package/dist/components/product/index.less +0 -354
- package/dist/components/progressState/EmptyAndErrorView.js +0 -143
- package/dist/components/progressState/EmptyAndErrorView.js.map +0 -1
- package/dist/components/progressState/ProgressState.js +0 -157
- package/dist/components/progressState/ProgressState.js.map +0 -1
- package/dist/components/progressState/index.js +0 -14
- package/dist/components/progressState/index.js.map +0 -1
- package/dist/components/progressState/style.less +0 -65
- package/dist/components/scan/index.js +0 -219
- package/dist/components/scan/index.js.map +0 -1
- package/dist/components/scan/index.less +0 -34
- package/dist/components/select/index.js +0 -28
- package/dist/components/select/index.js.map +0 -1
- package/dist/components/select/index.less +0 -12
- package/dist/components/settlement/asyncModal.js +0 -178
- package/dist/components/settlement/asyncModal.js.map +0 -1
- package/dist/components/settlement/index.js +0 -16
- package/dist/components/settlement/index.js.map +0 -1
- package/dist/components/settlement/settlement.js +0 -5488
- package/dist/components/settlement/settlement.js.map +0 -1
- package/dist/components/settlement/settlement.less +0 -1604
- package/dist/components/settlement/settlementStore.js +0 -1459
- package/dist/components/settlement/settlementStore.js.map +0 -1
- package/dist/components/settlement/utils.js +0 -295
- package/dist/components/settlement/utils.js.map +0 -1
- package/dist/components/socket/index.js +0 -220
- package/dist/components/socket/index.js.map +0 -1
- package/dist/components/spin/index.js +0 -95
- package/dist/components/spin/index.js.map +0 -1
- package/dist/components/spin/spin-style.less +0 -436
- package/dist/components/test/index.js +0 -338
- package/dist/components/test/index.js.map +0 -1
- package/dist/components/ticon/iconfont/demo.css +0 -539
- package/dist/components/ticon/iconfont/demo_index.html +0 -4765
- package/dist/components/ticon/iconfont/iconfont.css +0 -811
- package/dist/components/ticon/iconfont/iconfont.eot +0 -0
- package/dist/components/ticon/iconfont/iconfont.js +0 -33
- package/dist/components/ticon/iconfont/iconfont.js.map +0 -1
- package/dist/components/ticon/iconfont/iconfont.json +0 -1402
- package/dist/components/ticon/iconfont/iconfont.svg +0 -572
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/components/ticon/index.js +0 -60
- package/dist/components/ticon/index.js.map +0 -1
- package/dist/components/touchScroll/index.js +0 -182
- package/dist/components/touchScroll/index.js.map +0 -1
- package/dist/components/touchTable/AuthProcess.js +0 -42
- package/dist/components/touchTable/AuthProcess.js.map +0 -1
- package/dist/components/touchTable/generateWater.js +0 -59
- package/dist/components/touchTable/generateWater.js.map +0 -1
- package/dist/components/touchTable/index.js +0 -958
- package/dist/components/touchTable/index.js.map +0 -1
- package/dist/components/touchTable/index.less +0 -190
- package/dist/components/touchTable/utils.js +0 -14
- package/dist/components/touchTable/utils.js.map +0 -1
- package/dist/demo/PopOverDemo.js +0 -126
- package/dist/demo/PopOverDemo.js.map +0 -1
- package/dist/index.js +0 -246
- package/dist/index.js.map +0 -1
- package/dist/util/tools.js +0 -210
- package/dist/util/tools.js.map +0 -1
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
.inventory {
|
|
2
|
-
width: 935px;
|
|
3
|
-
height: 100%;
|
|
4
|
-
padding: 16px 16px 0;
|
|
5
|
-
|
|
6
|
-
.u-table .u-table-fixed-left tr td {
|
|
7
|
-
text-overflow: ellipsis;
|
|
8
|
-
white-space: nowrap;
|
|
9
|
-
vertical-align: middle;
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.u-table-row-hover {
|
|
14
|
-
background: none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.line-overflow-1 {
|
|
18
|
-
text-overflow: ellipsis;
|
|
19
|
-
white-space: nowrap;
|
|
20
|
-
vertical-align: middle;
|
|
21
|
-
overflow: hidden;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.u-table-scroll {
|
|
25
|
-
.u-table-header {
|
|
26
|
-
margin-bottom: -9px !important;
|
|
27
|
-
height: 50px;
|
|
28
|
-
line-height: 50px;
|
|
29
|
-
overflow: hidden;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.u-table-row-hover {
|
|
34
|
-
background: rgb(221, 221, 221);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
td,
|
|
38
|
-
th {
|
|
39
|
-
font-size: 14px;
|
|
40
|
-
color: #333;
|
|
41
|
-
border-color: #C8C8CD;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.inventory-search {
|
|
45
|
-
font-size: 13px;
|
|
46
|
-
color: #75787B;
|
|
47
|
-
margin-bottom: 20px;
|
|
48
|
-
|
|
49
|
-
.inventory-xiancunliang {
|
|
50
|
-
margin-left: 20px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
>div {
|
|
54
|
-
vertical-align: middle;
|
|
55
|
-
display: inline-block;
|
|
56
|
-
|
|
57
|
-
.u-input-group {
|
|
58
|
-
width: 280px;
|
|
59
|
-
|
|
60
|
-
input {
|
|
61
|
-
padding-left: 30px;
|
|
62
|
-
border-radius: 4px !important;
|
|
63
|
-
border-color: #C8C8CD;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.inventory-search-icon-left {
|
|
67
|
-
z-index: 9;
|
|
68
|
-
left: 6px;
|
|
69
|
-
top: 2px;
|
|
70
|
-
|
|
71
|
-
.inventory-search-icon {
|
|
72
|
-
font-size: 18px;
|
|
73
|
-
color: #999;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.inventory-search-icon-right {
|
|
78
|
-
z-index: 9;
|
|
79
|
-
right: 0px;
|
|
80
|
-
top: 7px;
|
|
81
|
-
|
|
82
|
-
.inventory-close-icon {
|
|
83
|
-
font-size: 12px;
|
|
84
|
-
color: #999;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.inventory-search-button {
|
|
91
|
-
font-size: 12px;
|
|
92
|
-
color: #FFFFFF;
|
|
93
|
-
vertical-align: middle;
|
|
94
|
-
width: 64px;
|
|
95
|
-
height: 32px;
|
|
96
|
-
margin-left: 16px;
|
|
97
|
-
background: #FF8C25;
|
|
98
|
-
border-radius: 4px;
|
|
99
|
-
border: none;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.inventoryTable {
|
|
104
|
-
|
|
105
|
-
.row-selected>td {
|
|
106
|
-
background: #FFE8D3 !important;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.u-table-scroll {
|
|
110
|
-
>div {
|
|
111
|
-
height: 100%;
|
|
112
|
-
.u-table-body {
|
|
113
|
-
table {
|
|
114
|
-
table-layout: fixed;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
tr {}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.inventory-tabs {
|
|
124
|
-
height: calc(~'100% - 54px');
|
|
125
|
-
overflow: hidden;
|
|
126
|
-
|
|
127
|
-
.u-tabs-bar {
|
|
128
|
-
margin-bottom: 0 !important;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.u-tabs-tab-active {
|
|
132
|
-
color: #FF8C25;
|
|
133
|
-
font-weight: 700;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.u-tabs-tab {
|
|
137
|
-
font-size: 16px;
|
|
138
|
-
|
|
139
|
-
&:hover {
|
|
140
|
-
color: #FF8725;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.u-tabs-ink-bar {
|
|
145
|
-
background: #FF8C25;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.u-tabs-content {
|
|
149
|
-
height: calc(~'100% - 46px') !important;
|
|
150
|
-
|
|
151
|
-
.u-tabs-tabpane {
|
|
152
|
-
height: 100%;
|
|
153
|
-
|
|
154
|
-
>div {
|
|
155
|
-
height: 100%;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
//
|
|
159
|
-
.u-table {
|
|
160
|
-
height: calc(~'100% - 45px');
|
|
161
|
-
|
|
162
|
-
.u-table-content {
|
|
163
|
-
height: 100%;
|
|
164
|
-
|
|
165
|
-
.u-table-scroll {
|
|
166
|
-
height: 100%;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
.u-table-placeholder {
|
|
170
|
-
height: auto !important;
|
|
171
|
-
border-color: #FFF !important;
|
|
172
|
-
// border-left: 1px solid rgb(193, 199, 208);
|
|
173
|
-
// border-right: 1px solid rgb(193, 199, 208);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.u-table-fixed-left {
|
|
179
|
-
height: 100%;
|
|
180
|
-
|
|
181
|
-
>div {
|
|
182
|
-
height: 100%;
|
|
183
|
-
|
|
184
|
-
.u-table-body-outer {
|
|
185
|
-
height: calc(~'100% - 44px');
|
|
186
|
-
|
|
187
|
-
.u-table-body-inner {
|
|
188
|
-
height: calc(~'100% - 2px') !important;
|
|
189
|
-
max-height: initial !important;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
//
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.tab1 {
|
|
202
|
-
.u-table-body-inner {
|
|
203
|
-
max-height: calc(~'100% - 54px') !important;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.u-table-body {
|
|
207
|
-
max-height: calc(~'100% - 46px') !important;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.tab2 {}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.inventory-tab {
|
|
215
|
-
position: relative;
|
|
216
|
-
|
|
217
|
-
.inventory-page {
|
|
218
|
-
text-align: right;
|
|
219
|
-
position: absolute;
|
|
220
|
-
bottom: 5px;
|
|
221
|
-
right: 0px;
|
|
222
|
-
}
|
|
223
|
-
.text-2line-overflow{
|
|
224
|
-
display: -webkit-box;
|
|
225
|
-
-webkit-box-orient: vertical;
|
|
226
|
-
-webkit-line-clamp: 2;
|
|
227
|
-
overflow: hidden;
|
|
228
|
-
word-break: break-all;
|
|
229
|
-
white-space: initial;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.u-table .u-table-thead>tr:last-child {
|
|
234
|
-
border-color: #DDD;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
.table2 {
|
|
240
|
-
.u-table-fixed {
|
|
241
|
-
width: 100px;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = undefined;
|
|
7
|
-
|
|
8
|
-
var _defineProperty = require('babel-runtime/core-js/object/define-property');
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(_defineProperty);
|
|
11
|
-
|
|
12
|
-
var _getOwnPropertyDescriptor = require('babel-runtime/core-js/object/get-own-property-descriptor');
|
|
13
|
-
|
|
14
|
-
var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor);
|
|
15
|
-
|
|
16
|
-
var _extends2 = require('babel-runtime/helpers/extends');
|
|
17
|
-
|
|
18
|
-
var _extends3 = _interopRequireDefault(_extends2);
|
|
19
|
-
|
|
20
|
-
var _regenerator = require('babel-runtime/regenerator');
|
|
21
|
-
|
|
22
|
-
var _regenerator2 = _interopRequireDefault(_regenerator);
|
|
23
|
-
|
|
24
|
-
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
|
|
25
|
-
|
|
26
|
-
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
|
|
27
|
-
|
|
28
|
-
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
29
|
-
|
|
30
|
-
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
31
|
-
|
|
32
|
-
var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
33
|
-
|
|
34
|
-
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
35
|
-
|
|
36
|
-
var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
|
|
37
|
-
|
|
38
|
-
var _mobx = require('mobx');
|
|
39
|
-
|
|
40
|
-
var _api = require('./api');
|
|
41
|
-
|
|
42
|
-
var _api2 = _interopRequireDefault(_api);
|
|
43
|
-
|
|
44
|
-
var _message = require('../message');
|
|
45
|
-
|
|
46
|
-
var _message2 = _interopRequireDefault(_message);
|
|
47
|
-
|
|
48
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
49
|
-
|
|
50
|
-
function _initDefineProp(target, property, descriptor, context) {
|
|
51
|
-
if (!descriptor) return;
|
|
52
|
-
(0, _defineProperty2.default)(target, property, {
|
|
53
|
-
enumerable: descriptor.enumerable,
|
|
54
|
-
configurable: descriptor.configurable,
|
|
55
|
-
writable: descriptor.writable,
|
|
56
|
-
value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function _initializerWarningHelper(descriptor, context) {
|
|
61
|
-
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
|
65
|
-
var desc = {};
|
|
66
|
-
Object['ke' + 'ys'](descriptor).forEach(function (key) {
|
|
67
|
-
desc[key] = descriptor[key];
|
|
68
|
-
});
|
|
69
|
-
desc.enumerable = !!desc.enumerable;
|
|
70
|
-
desc.configurable = !!desc.configurable;
|
|
71
|
-
|
|
72
|
-
if ('value' in desc || desc.initializer) {
|
|
73
|
-
desc.writable = true;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
|
|
77
|
-
return decorator(target, property, desc) || desc;
|
|
78
|
-
}, desc);
|
|
79
|
-
|
|
80
|
-
if (context && desc.initializer !== void 0) {
|
|
81
|
-
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
|
|
82
|
-
desc.initializer = undefined;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (desc.initializer === void 0) {
|
|
86
|
-
Object['define' + 'Property'](target, property, desc);
|
|
87
|
-
desc = null;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return desc;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
var InventoryStore = (_class = function () {
|
|
94
|
-
function InventoryStore() {
|
|
95
|
-
(0, _classCallCheck3.default)(this, InventoryStore);
|
|
96
|
-
|
|
97
|
-
_initDefineProp(this, 'list1', _descriptor, this);
|
|
98
|
-
|
|
99
|
-
_initDefineProp(this, 'list2', _descriptor2, this);
|
|
100
|
-
|
|
101
|
-
_initDefineProp(this, 'TotalPage1', _descriptor3, this);
|
|
102
|
-
|
|
103
|
-
_initDefineProp(this, 'TotalPage2', _descriptor4, this);
|
|
104
|
-
|
|
105
|
-
_initDefineProp(this, 'loading', _descriptor5, this);
|
|
106
|
-
|
|
107
|
-
_initDefineProp(this, 'searchDesigns', _descriptor6, this);
|
|
108
|
-
|
|
109
|
-
this.params = {
|
|
110
|
-
Key: '',
|
|
111
|
-
IsQueryAround: false,
|
|
112
|
-
IsInCludeZero: false,
|
|
113
|
-
CurrentPage: 1,
|
|
114
|
-
PageSize: 15,
|
|
115
|
-
IdStore: ''
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
(0, _createClass3.default)(InventoryStore, [{
|
|
120
|
-
key: 'init',
|
|
121
|
-
value: function init(_ref) {
|
|
122
|
-
var IdStore = _ref.IdStore;
|
|
123
|
-
|
|
124
|
-
this.getSearchDesigns();
|
|
125
|
-
// this.getList1(this.params);
|
|
126
|
-
// this.getList2({...this.params, IsQueryAround: true});
|
|
127
|
-
this.params.IdStore = IdStore;
|
|
128
|
-
} // 自家门店 的库存
|
|
129
|
-
// 周边门店 的库存
|
|
130
|
-
|
|
131
|
-
}, {
|
|
132
|
-
key: 'getSearchDesigns',
|
|
133
|
-
value: function () {
|
|
134
|
-
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
|
|
135
|
-
var _this = this;
|
|
136
|
-
|
|
137
|
-
var _ref3, list;
|
|
138
|
-
|
|
139
|
-
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
140
|
-
while (1) {
|
|
141
|
-
switch (_context.prev = _context.next) {
|
|
142
|
-
case 0:
|
|
143
|
-
_context.next = 2;
|
|
144
|
-
return _api2.default.getPOSSearchDesigns('Inventory');
|
|
145
|
-
|
|
146
|
-
case 2:
|
|
147
|
-
_ref3 = _context.sent;
|
|
148
|
-
list = _ref3.list;
|
|
149
|
-
|
|
150
|
-
(0, _mobx.runInAction)(function () {
|
|
151
|
-
_this.searchDesigns = list.sort(function (a, b) {
|
|
152
|
-
return a.ShowIndex - b.ShowIndex;
|
|
153
|
-
});;
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
case 5:
|
|
157
|
-
case 'end':
|
|
158
|
-
return _context.stop();
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}, _callee, this);
|
|
162
|
-
}));
|
|
163
|
-
|
|
164
|
-
function getSearchDesigns() {
|
|
165
|
-
return _ref2.apply(this, arguments);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
return getSearchDesigns;
|
|
169
|
-
}()
|
|
170
|
-
}, {
|
|
171
|
-
key: 'search1',
|
|
172
|
-
value: function search1(key, IsInCludeZero) {
|
|
173
|
-
// if (tabNumber == 1) {
|
|
174
|
-
this.params.IsInCludeZero = IsInCludeZero;
|
|
175
|
-
this.getList1((0, _extends3.default)({}, this.params, { Key: key, IsInCludeZero: IsInCludeZero }));
|
|
176
|
-
// } else if (tabNumber == 2) {
|
|
177
|
-
// }
|
|
178
|
-
}
|
|
179
|
-
}, {
|
|
180
|
-
key: 'search2',
|
|
181
|
-
value: function search2(key, IsInCludeZero) {
|
|
182
|
-
this.params.IsInCludeZero = IsInCludeZero;
|
|
183
|
-
this.getList2((0, _extends3.default)({}, this.params, { Key: key, IsQueryAround: true, IsInCludeZero: IsInCludeZero }));
|
|
184
|
-
}
|
|
185
|
-
}, {
|
|
186
|
-
key: 'searchMore',
|
|
187
|
-
value: function searchMore(key, pageNo) {
|
|
188
|
-
var pageSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 15;
|
|
189
|
-
var type = arguments[3];
|
|
190
|
-
|
|
191
|
-
if (type == 1) {
|
|
192
|
-
this.getList1((0, _extends3.default)({}, this.params, { Key: key, CurrentPage: pageNo, PageSize: pageSize }));
|
|
193
|
-
} else if (type == 2) {
|
|
194
|
-
this.getList2((0, _extends3.default)({}, this.params, { Key: key, IsQueryAround: true, CurrentPage: pageNo, PageSize: pageSize }));
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}, {
|
|
198
|
-
key: 'getList1',
|
|
199
|
-
value: function () {
|
|
200
|
-
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(params) {
|
|
201
|
-
var _this2 = this;
|
|
202
|
-
|
|
203
|
-
var _ref5, TotalPage, Data, TotalCount;
|
|
204
|
-
|
|
205
|
-
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
206
|
-
while (1) {
|
|
207
|
-
switch (_context2.prev = _context2.next) {
|
|
208
|
-
case 0:
|
|
209
|
-
this.loading = true;
|
|
210
|
-
_context2.next = 3;
|
|
211
|
-
return _api2.default.searchInventoryAvailableQuantity(params);
|
|
212
|
-
|
|
213
|
-
case 3:
|
|
214
|
-
_ref5 = _context2.sent;
|
|
215
|
-
TotalPage = _ref5.TotalPage;
|
|
216
|
-
Data = _ref5.Data;
|
|
217
|
-
TotalCount = _ref5.TotalCount;
|
|
218
|
-
|
|
219
|
-
if (!TotalCount || TotalCount == 0) {
|
|
220
|
-
_message2.default.error('无库存信息');
|
|
221
|
-
}
|
|
222
|
-
(0, _mobx.runInAction)(function () {
|
|
223
|
-
_this2.list1 = Data;
|
|
224
|
-
_this2.TotalPage1 = TotalPage;
|
|
225
|
-
_this2.loading = false;
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
case 9:
|
|
229
|
-
case 'end':
|
|
230
|
-
return _context2.stop();
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}, _callee2, this);
|
|
234
|
-
}));
|
|
235
|
-
|
|
236
|
-
function getList1(_x2) {
|
|
237
|
-
return _ref4.apply(this, arguments);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
return getList1;
|
|
241
|
-
}()
|
|
242
|
-
}, {
|
|
243
|
-
key: 'getList2',
|
|
244
|
-
value: function () {
|
|
245
|
-
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(params) {
|
|
246
|
-
var _this3 = this;
|
|
247
|
-
|
|
248
|
-
var _ref7, TotalPage, Data, TotalCount;
|
|
249
|
-
|
|
250
|
-
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
251
|
-
while (1) {
|
|
252
|
-
switch (_context3.prev = _context3.next) {
|
|
253
|
-
case 0:
|
|
254
|
-
this.loading = true;
|
|
255
|
-
_context3.next = 3;
|
|
256
|
-
return _api2.default.searchInventoryAvailableQuantity(params);
|
|
257
|
-
|
|
258
|
-
case 3:
|
|
259
|
-
_ref7 = _context3.sent;
|
|
260
|
-
TotalPage = _ref7.TotalPage;
|
|
261
|
-
Data = _ref7.Data;
|
|
262
|
-
TotalCount = _ref7.TotalCount;
|
|
263
|
-
|
|
264
|
-
if (!TotalCount || TotalCount == 0) {
|
|
265
|
-
_message2.default.error('无库存信息');
|
|
266
|
-
}
|
|
267
|
-
(0, _mobx.runInAction)(function () {
|
|
268
|
-
_this3.list2 = Data.map(function (item, i) {
|
|
269
|
-
item.key = i;
|
|
270
|
-
item.WarehouseName = item.StoreName;
|
|
271
|
-
return item;
|
|
272
|
-
});
|
|
273
|
-
_this3.TotalPage2 = TotalPage;
|
|
274
|
-
_this3.loading = false;
|
|
275
|
-
});
|
|
276
|
-
|
|
277
|
-
case 9:
|
|
278
|
-
case 'end':
|
|
279
|
-
return _context3.stop();
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}, _callee3, this);
|
|
283
|
-
}));
|
|
284
|
-
|
|
285
|
-
function getList2(_x3) {
|
|
286
|
-
return _ref6.apply(this, arguments);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
return getList2;
|
|
290
|
-
}()
|
|
291
|
-
}, {
|
|
292
|
-
key: 'toJSList1',
|
|
293
|
-
get: function get() {
|
|
294
|
-
return (0, _mobx.toJS)(this.list1).map(function (item, i) {
|
|
295
|
-
item.key = i;
|
|
296
|
-
return item;
|
|
297
|
-
});
|
|
298
|
-
// return [];
|
|
299
|
-
}
|
|
300
|
-
}, {
|
|
301
|
-
key: 'toJSList2',
|
|
302
|
-
get: function get() {
|
|
303
|
-
return (0, _mobx.toJS)(this.list2);
|
|
304
|
-
}
|
|
305
|
-
}, {
|
|
306
|
-
key: 'toJSSearchDesigns',
|
|
307
|
-
get: function get() {
|
|
308
|
-
return (0, _mobx.toJS)(this.searchDesigns);
|
|
309
|
-
}
|
|
310
|
-
}]);
|
|
311
|
-
return InventoryStore;
|
|
312
|
-
}(), (_applyDecoratedDescriptor(_class.prototype, 'init', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'init'), _class.prototype), _descriptor = _applyDecoratedDescriptor(_class.prototype, 'list1', [_mobx.observable], {
|
|
313
|
-
enumerable: true,
|
|
314
|
-
initializer: function initializer() {
|
|
315
|
-
return [];
|
|
316
|
-
}
|
|
317
|
-
}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'list2', [_mobx.observable], {
|
|
318
|
-
enumerable: true,
|
|
319
|
-
initializer: function initializer() {
|
|
320
|
-
return [];
|
|
321
|
-
}
|
|
322
|
-
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'TotalPage1', [_mobx.observable], {
|
|
323
|
-
enumerable: true,
|
|
324
|
-
initializer: function initializer() {
|
|
325
|
-
return 0;
|
|
326
|
-
}
|
|
327
|
-
}), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'TotalPage2', [_mobx.observable], {
|
|
328
|
-
enumerable: true,
|
|
329
|
-
initializer: function initializer() {
|
|
330
|
-
return 0;
|
|
331
|
-
}
|
|
332
|
-
}), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, 'loading', [_mobx.observable], {
|
|
333
|
-
enumerable: true,
|
|
334
|
-
initializer: function initializer() {
|
|
335
|
-
return false;
|
|
336
|
-
}
|
|
337
|
-
}), _descriptor6 = _applyDecoratedDescriptor(_class.prototype, 'searchDesigns', [_mobx.observable], {
|
|
338
|
-
enumerable: true,
|
|
339
|
-
initializer: function initializer() {
|
|
340
|
-
return [];
|
|
341
|
-
}
|
|
342
|
-
}), _applyDecoratedDescriptor(_class.prototype, 'getSearchDesigns', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'getSearchDesigns'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'getList1', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'getList1'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'getList2', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'getList2'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'toJSList1', [_mobx.computed], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'toJSList1'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'toJSList2', [_mobx.computed], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'toJSList2'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'toJSSearchDesigns', [_mobx.computed], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'toJSSearchDesigns'), _class.prototype)), _class);
|
|
343
|
-
exports.default = InventoryStore;
|
|
344
|
-
//# sourceMappingURL=store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/inventorySearch/store.js"],"names":["InventoryStore","params","Key","IsQueryAround","IsInCludeZero","CurrentPage","PageSize","IdStore","getSearchDesigns","InventorySearchApi","getPOSSearchDesigns","list","searchDesigns","sort","a","b","ShowIndex","key","getList1","getList2","pageNo","pageSize","type","loading","searchInventoryAvailableQuantity","TotalPage","Data","TotalCount","Message","error","list1","TotalPage1","list2","map","item","i","WarehouseName","StoreName","TotalPage2","action","observable","computed"],"mappings":"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","file":"store.js","sourcesContent":["import { observable, transaction, map, computed, when, reaction, runInAction, action, toJS, autorun } from 'mobx';\r\nimport InventorySearchApi from './api';\r\nimport Message from '../message';\r\n\r\nexport default class InventoryStore {\r\n\r\n constructor() {\r\n }\r\n @action init({ IdStore }) {\r\n this.getSearchDesigns();\r\n // this.getList1(this.params);\r\n // this.getList2({...this.params, IsQueryAround: true});\r\n this.params.IdStore = IdStore;\r\n }\r\n\r\n @observable list1 = []; // 自家门店 的库存\r\n @observable list2 = []; // 周边门店 的库存\r\n @observable TotalPage1 = 0;\r\n @observable TotalPage2 = 0;\r\n @observable loading = false;\r\n @observable searchDesigns = [];\r\n\r\n params = {\r\n Key: '',\r\n IsQueryAround: false,\r\n IsInCludeZero: false,\r\n CurrentPage: 1,\r\n PageSize: 15,\r\n IdStore: ''\r\n }\r\n\r\n @action async getSearchDesigns() {\r\n let {list} = await InventorySearchApi.getPOSSearchDesigns('Inventory');\r\n runInAction(() => {\r\n this.searchDesigns = list.sort((a, b) => a.ShowIndex - b.ShowIndex);;\r\n })\r\n }\r\n\r\n search1(key, IsInCludeZero) {\r\n // if (tabNumber == 1) {\r\n this.params.IsInCludeZero = IsInCludeZero;\r\n this.getList1({ ...this.params, Key: key, IsInCludeZero: IsInCludeZero });\r\n // } else if (tabNumber == 2) {\r\n // }\r\n }\r\n\r\n search2(key, IsInCludeZero) {\r\n this.params.IsInCludeZero = IsInCludeZero;\r\n this.getList2({ ...this.params, Key: key, IsQueryAround: true, IsInCludeZero: IsInCludeZero });\r\n }\r\n\r\n\r\n searchMore(key, pageNo, pageSize = 15, type) {\r\n if (type == 1) {\r\n this.getList1({ ...this.params, Key: key, CurrentPage: pageNo, PageSize: pageSize });\r\n } else if (type == 2) {\r\n this.getList2({ ...this.params, Key: key, IsQueryAround: true, CurrentPage: pageNo, PageSize: pageSize });\r\n }\r\n }\r\n\r\n @action async getList1(params) {\r\n this.loading = true;\r\n let { TotalPage, Data, TotalCount } = await InventorySearchApi.searchInventoryAvailableQuantity(params);\r\n if (!TotalCount || TotalCount == 0) {\r\n Message.error('无库存信息')\r\n }\r\n runInAction(() => {\r\n this.list1 = Data;\r\n this.TotalPage1 = TotalPage;\r\n this.loading = false;\r\n })\r\n }\r\n\r\n @action async getList2(params) {\r\n this.loading = true;\r\n let { TotalPage, Data, TotalCount } = await InventorySearchApi.searchInventoryAvailableQuantity(params);\r\n if (!TotalCount || TotalCount == 0) {\r\n Message.error('无库存信息')\r\n }\r\n runInAction(() => {\r\n this.list2 = Data.map((item, i) => {\r\n item.key = i;\r\n item.WarehouseName = item.StoreName;\r\n return item;\r\n })\r\n this.TotalPage2 = TotalPage;\r\n this.loading = false;\r\n })\r\n }\r\n\r\n @computed get toJSList1() {\r\n return toJS(this.list1).map((item, i) => {\r\n item.key = i;\r\n return item;\r\n });\r\n // return [];\r\n }\r\n\r\n @computed get toJSList2() {\r\n return toJS(this.list2);\r\n }\r\n\r\n @computed get toJSSearchDesigns() {\r\n return toJS(this.searchDesigns);\r\n }\r\n}"]}
|