tplus-components-touch 1.27.1 → 1.27.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/components/addLog/AddLogProcessor.js +53 -0
- package/dist/components/addLog/AddLogProcessor.js.map +1 -0
- package/dist/components/addLog/OperationLogApi.js +164 -0
- package/dist/components/addLog/OperationLogApi.js.map +1 -0
- package/dist/components/autoComplete/index.js +259 -0
- package/dist/components/autoComplete/index.js.map +1 -0
- package/dist/components/autoComplete/index.less +89 -0
- package/dist/components/autoComplete/option.js +75 -0
- package/dist/components/autoComplete/option.js.map +1 -0
- package/dist/components/autoCompleteWithKeyboard/index.js +206 -0
- package/dist/components/autoCompleteWithKeyboard/index.js.map +1 -0
- package/dist/components/autoCompleteWithKeyboard/index.less +5 -0
- package/dist/components/billSearch/api.js +425 -0
- package/dist/components/billSearch/api.js.map +1 -0
- package/dist/components/billSearch/index.js +2030 -0
- package/dist/components/billSearch/index.js.map +1 -0
- package/dist/components/billSearch/index.less +573 -0
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +568 -0
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -0
- package/dist/components/cloudPrint/api.js +454 -0
- package/dist/components/cloudPrint/api.js.map +1 -0
- package/dist/components/cloudPrint/index.js +974 -0
- package/dist/components/cloudPrint/index.js.map +1 -0
- package/dist/components/cloudPrint/printDispatch.js +336 -0
- package/dist/components/cloudPrint/printDispatch.js.map +1 -0
- package/dist/components/commonForm/autoComplete/index.js +272 -0
- package/dist/components/commonForm/autoComplete/index.js.map +1 -0
- package/dist/components/commonForm/autoComplete/style.less +8 -0
- package/dist/components/commonForm/datePicker/index.js +117 -0
- package/dist/components/commonForm/datePicker/index.js.map +1 -0
- package/dist/components/commonForm/datePicker/style.less +11 -0
- package/dist/components/commonForm/formControl/index.js +183 -0
- package/dist/components/commonForm/formControl/index.js.map +1 -0
- package/dist/components/commonForm/formControl/style.less +8 -0
- package/dist/components/commonForm/index.js +208 -0
- package/dist/components/commonForm/index.js.map +1 -0
- package/dist/components/commonForm/inputNumber/index.js +291 -0
- package/dist/components/commonForm/inputNumber/index.js.map +1 -0
- package/dist/components/commonForm/inputNumber/style.less +17 -0
- package/dist/components/commonForm/radio/index.js +157 -0
- package/dist/components/commonForm/radio/index.js.map +1 -0
- package/dist/components/commonForm/radio/style.less +11 -0
- package/dist/components/commonForm/style.less +12 -0
- package/dist/components/deliverySearch/api.js +355 -0
- package/dist/components/deliverySearch/api.js.map +1 -0
- package/dist/components/deliverySearch/index.js +1254 -0
- package/dist/components/deliverySearch/index.js.map +1 -0
- package/dist/components/deliverySearch/index.less +624 -0
- package/dist/components/form/index.js +325 -0
- package/dist/components/form/index.js.map +1 -0
- package/dist/components/hardwareAPI/index.js +181 -0
- package/dist/components/hardwareAPI/index.js.map +1 -0
- package/dist/components/hotKey/config.js +306 -0
- package/dist/components/hotKey/config.js.map +1 -0
- package/dist/components/hotKey/hotKeyModal.js +479 -0
- package/dist/components/hotKey/hotKeyModal.js.map +1 -0
- package/dist/components/hotKey/index.js +782 -0
- package/dist/components/hotKey/index.js.map +1 -0
- package/dist/components/hotKey/localConfig.js +3831 -0
- package/dist/components/hotKey/localConfig.js.map +1 -0
- package/dist/components/hotKey/style.less +99 -0
- package/dist/components/hotKey/utils.js +135 -0
- package/dist/components/hotKey/utils.js.map +1 -0
- package/dist/components/input/index.js +257 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input/style.less +107 -0
- package/dist/components/input/tplusInput/index.js +89 -0
- package/dist/components/input/tplusInput/index.js.map +1 -0
- package/dist/components/input/tplusInput/inputContent.js +130 -0
- package/dist/components/input/tplusInput/inputContent.js.map +1 -0
- package/dist/components/input/tplusInput/inputs.js +201 -0
- package/dist/components/input/tplusInput/inputs.js.map +1 -0
- package/dist/components/input/tplusInput/style.less +194 -0
- package/dist/components/input/utils/index.js +26 -0
- package/dist/components/input/utils/index.js.map +1 -0
- package/dist/components/inventorySearch/api.js +214 -0
- package/dist/components/inventorySearch/api.js.map +1 -0
- package/dist/components/inventorySearch/index.js +303 -0
- package/dist/components/inventorySearch/index.js.map +1 -0
- package/dist/components/inventorySearch/index.less +244 -0
- package/dist/components/inventorySearch/store.js +344 -0
- package/dist/components/inventorySearch/store.js.map +1 -0
- package/dist/components/inventorySearch/tab.js +255 -0
- package/dist/components/inventorySearch/tab.js.map +1 -0
- package/dist/components/keyboard/index.js +258 -0
- package/dist/components/keyboard/index.js.map +1 -0
- package/dist/components/keyboard/index.less +556 -0
- package/dist/components/keyboard/letterKeyboard.js +222 -0
- package/dist/components/keyboard/letterKeyboard.js.map +1 -0
- package/dist/components/keyboard/numKeyboard.js +458 -0
- package/dist/components/keyboard/numKeyboard.js.map +1 -0
- package/dist/components/keyboard/numKeyboardDigit.js +502 -0
- package/dist/components/keyboard/numKeyboardDigit.js.map +1 -0
- package/dist/components/keyboard/numKeyboardScan.js +215 -0
- package/dist/components/keyboard/numKeyboardScan.js.map +1 -0
- package/dist/components/keyboard/numberButtonInteger.js +296 -0
- package/dist/components/keyboard/numberButtonInteger.js.map +1 -0
- package/dist/components/keyboard/numberButton_input.js +300 -0
- package/dist/components/keyboard/numberButton_input.js.map +1 -0
- package/dist/components/keyboard/onlyKeyboard.js +90 -0
- package/dist/components/keyboard/onlyKeyboard.js.map +1 -0
- package/dist/components/keyboard/onlyLetterButton.js +187 -0
- package/dist/components/keyboard/onlyLetterButton.js.map +1 -0
- package/dist/components/keyboard/onlyLetterButton2.js +235 -0
- package/dist/components/keyboard/onlyLetterButton2.js.map +1 -0
- package/dist/components/keyboard/onlyLetterButton2.less +184 -0
- package/dist/components/keyboard/onlyNumberButton.js +128 -0
- package/dist/components/keyboard/onlyNumberButton.js.map +1 -0
- package/dist/components/keyboard/onlyNumberButton2.js +115 -0
- package/dist/components/keyboard/onlyNumberButton2.js.map +1 -0
- package/dist/components/keyboard/textKeyboard.js +50 -0
- package/dist/components/keyboard/textKeyboard.js.map +1 -0
- package/dist/components/layout/hamburger.js +29 -0
- package/dist/components/layout/hamburger.js.map +1 -0
- package/dist/components/layout/index.js +31 -0
- package/dist/components/layout/index.js.map +1 -0
- package/dist/components/layout/layout.js +182 -0
- package/dist/components/layout/layout.js.map +1 -0
- package/dist/components/layout/sider.js +165 -0
- package/dist/components/layout/sider.js.map +1 -0
- package/dist/components/layout/style.less +83 -0
- package/dist/components/loading/index.js +193 -0
- package/dist/components/loading/index.js.map +1 -0
- package/dist/components/loading/loadingContent.js +159 -0
- package/dist/components/loading/loadingContent.js.map +1 -0
- package/dist/components/loading/style.less +51 -0
- package/dist/components/loading/utils.js +29 -0
- package/dist/components/loading/utils.js.map +1 -0
- package/dist/components/message/index.js +286 -0
- package/dist/components/message/index.js.map +1 -0
- package/dist/components/message/index.less +150 -0
- package/dist/components/modal/index.js +93 -0
- package/dist/components/modal/index.js.map +1 -0
- package/dist/components/modal/index.less +19 -0
- package/dist/components/modalVertical/index.js +338 -0
- package/dist/components/modalVertical/index.js.map +1 -0
- package/dist/components/modalVertical/style.less +114 -0
- package/dist/components/modalWraper/index.js +482 -0
- package/dist/components/modalWraper/index.js.map +1 -0
- package/dist/components/modalWraper/style.less +363 -0
- package/dist/components/modalWraper/utils.js +49 -0
- package/dist/components/modalWraper/utils.js.map +1 -0
- package/dist/components/notification/index.js +124 -0
- package/dist/components/notification/index.js.map +1 -0
- package/dist/components/notification/index.less +58 -0
- package/dist/components/overflowTip/index.js +269 -0
- package/dist/components/overflowTip/index.js.map +1 -0
- package/dist/components/overflowTip/style.less +66 -0
- package/dist/components/page/index.js +49 -0
- package/dist/components/page/index.js.map +1 -0
- package/dist/components/page/index.less +26 -0
- package/dist/components/product/detail.js +97 -0
- package/dist/components/product/detail.js.map +1 -0
- package/dist/components/product/getCard.js +145 -0
- package/dist/components/product/getCard.js.map +1 -0
- package/dist/components/product/index.less +354 -0
- package/dist/components/progressState/EmptyAndErrorView.js +143 -0
- package/dist/components/progressState/EmptyAndErrorView.js.map +1 -0
- package/dist/components/progressState/ProgressState.js +157 -0
- package/dist/components/progressState/ProgressState.js.map +1 -0
- package/dist/components/progressState/index.js +14 -0
- package/dist/components/progressState/index.js.map +1 -0
- package/dist/components/progressState/style.less +65 -0
- package/dist/components/scan/index.js +219 -0
- package/dist/components/scan/index.js.map +1 -0
- package/dist/components/scan/index.less +34 -0
- package/dist/components/select/index.js +28 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/select/index.less +12 -0
- package/dist/components/settlement/asyncModal.js +178 -0
- package/dist/components/settlement/asyncModal.js.map +1 -0
- package/dist/components/settlement/index.js +16 -0
- package/dist/components/settlement/index.js.map +1 -0
- package/dist/components/settlement/settlement.js +5488 -0
- package/dist/components/settlement/settlement.js.map +1 -0
- package/dist/components/settlement/settlement.less +1604 -0
- package/dist/components/settlement/settlementStore.js +1460 -0
- package/dist/components/settlement/settlementStore.js.map +1 -0
- package/dist/components/settlement/utils.js +295 -0
- package/dist/components/settlement/utils.js.map +1 -0
- package/dist/components/socket/index.js +220 -0
- package/dist/components/socket/index.js.map +1 -0
- package/dist/components/spin/index.js +95 -0
- package/dist/components/spin/index.js.map +1 -0
- package/dist/components/spin/spin-style.less +436 -0
- package/dist/components/test/index.js +338 -0
- package/dist/components/test/index.js.map +1 -0
- package/dist/components/ticon/iconfont/demo.css +539 -0
- package/dist/components/ticon/iconfont/demo_index.html +4765 -0
- package/dist/components/ticon/iconfont/iconfont.css +811 -0
- package/dist/components/ticon/iconfont/iconfont.eot +0 -0
- package/dist/components/ticon/iconfont/iconfont.js +33 -0
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -0
- package/dist/components/ticon/iconfont/iconfont.json +1402 -0
- package/dist/components/ticon/iconfont/iconfont.svg +572 -0
- 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 +60 -0
- package/dist/components/ticon/index.js.map +1 -0
- package/dist/components/touchScroll/index.js +182 -0
- package/dist/components/touchScroll/index.js.map +1 -0
- package/dist/components/touchTable/AuthProcess.js +42 -0
- package/dist/components/touchTable/AuthProcess.js.map +1 -0
- package/dist/components/touchTable/generateWater.js +59 -0
- package/dist/components/touchTable/generateWater.js.map +1 -0
- package/dist/components/touchTable/index.js +958 -0
- package/dist/components/touchTable/index.js.map +1 -0
- package/dist/components/touchTable/index.less +190 -0
- package/dist/components/touchTable/utils.js +14 -0
- package/dist/components/touchTable/utils.js.map +1 -0
- package/dist/demo/PopOverDemo.js +126 -0
- package/dist/demo/PopOverDemo.js.map +1 -0
- package/dist/index.js +246 -0
- package/dist/index.js.map +1 -0
- package/dist/util/tools.js +210 -0
- package/dist/util/tools.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,244 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,344 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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';\nimport InventorySearchApi from './api';\nimport Message from '../message';\n\nexport default class InventoryStore {\n\n constructor() {\n }\n @action init({ IdStore }) {\n this.getSearchDesigns();\n // this.getList1(this.params);\n // this.getList2({...this.params, IsQueryAround: true});\n this.params.IdStore = IdStore;\n }\n\n @observable list1 = []; // 自家门店 的库存\n @observable list2 = []; // 周边门店 的库存\n @observable TotalPage1 = 0;\n @observable TotalPage2 = 0;\n @observable loading = false;\n @observable searchDesigns = [];\n\n params = {\n Key: '',\n IsQueryAround: false,\n IsInCludeZero: false,\n CurrentPage: 1,\n PageSize: 15,\n IdStore: ''\n }\n\n @action async getSearchDesigns() {\n let {list} = await InventorySearchApi.getPOSSearchDesigns('Inventory');\n runInAction(() => {\n this.searchDesigns = list.sort((a, b) => a.ShowIndex - b.ShowIndex);;\n })\n }\n\n search1(key, IsInCludeZero) {\n // if (tabNumber == 1) {\n this.params.IsInCludeZero = IsInCludeZero;\n this.getList1({ ...this.params, Key: key, IsInCludeZero: IsInCludeZero });\n // } else if (tabNumber == 2) {\n // }\n }\n\n search2(key, IsInCludeZero) {\n this.params.IsInCludeZero = IsInCludeZero;\n this.getList2({ ...this.params, Key: key, IsQueryAround: true, IsInCludeZero: IsInCludeZero });\n }\n\n\n searchMore(key, pageNo, pageSize = 15, type) {\n if (type == 1) {\n this.getList1({ ...this.params, Key: key, CurrentPage: pageNo, PageSize: pageSize });\n } else if (type == 2) {\n this.getList2({ ...this.params, Key: key, IsQueryAround: true, CurrentPage: pageNo, PageSize: pageSize });\n }\n }\n\n @action async getList1(params) {\n this.loading = true;\n let { TotalPage, Data, TotalCount } = await InventorySearchApi.searchInventoryAvailableQuantity(params);\n if (!TotalCount || TotalCount == 0) {\n Message.error('无库存信息')\n }\n runInAction(() => {\n this.list1 = Data;\n this.TotalPage1 = TotalPage;\n this.loading = false;\n })\n }\n\n @action async getList2(params) {\n this.loading = true;\n let { TotalPage, Data, TotalCount } = await InventorySearchApi.searchInventoryAvailableQuantity(params);\n if (!TotalCount || TotalCount == 0) {\n Message.error('无库存信息')\n }\n runInAction(() => {\n this.list2 = Data.map((item, i) => {\n item.key = i;\n item.WarehouseName = item.StoreName;\n return item;\n })\n this.TotalPage2 = TotalPage;\n this.loading = false;\n })\n }\n\n @computed get toJSList1() {\n return toJS(this.list1).map((item, i) => {\n item.key = i;\n return item;\n });\n // return [];\n }\n\n @computed get toJSList2() {\n return toJS(this.list2);\n }\n\n @computed get toJSSearchDesigns() {\n return toJS(this.searchDesigns);\n }\n}"]}
|