@things-factory/operato-wms 4.1.34 → 4.1.35
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.
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import '@things-factory/form-ui'
|
|
2
|
+
import '@things-factory/grist-ui'
|
|
3
|
+
|
|
4
|
+
import gql from 'graphql-tag'
|
|
5
|
+
import { css, html } from 'lit-element'
|
|
6
|
+
import { connect } from 'pwa-helpers/connect-mixin'
|
|
7
|
+
|
|
8
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
9
|
+
import { client, PageView, store } from '@things-factory/shell'
|
|
10
|
+
import { ScrollbarStyles } from '@things-factory/styles'
|
|
11
|
+
import { flattenObject, isMobileDevice } from '@things-factory/utils'
|
|
12
|
+
|
|
13
|
+
class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
14
|
+
static get styles() {
|
|
15
|
+
return [
|
|
16
|
+
ScrollbarStyles,
|
|
17
|
+
css`
|
|
18
|
+
:host {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
}
|
|
23
|
+
search-form {
|
|
24
|
+
overflow: visible;
|
|
25
|
+
}
|
|
26
|
+
data-grist {
|
|
27
|
+
overflow-y: auto;
|
|
28
|
+
flex: 1;
|
|
29
|
+
}
|
|
30
|
+
`
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
static get properties() {
|
|
35
|
+
return {
|
|
36
|
+
_email: String,
|
|
37
|
+
_searchFields: Array,
|
|
38
|
+
_expSearchFields: Array,
|
|
39
|
+
_showExpiration: Boolean,
|
|
40
|
+
config: Object,
|
|
41
|
+
data: Object
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
render() {
|
|
46
|
+
return html`
|
|
47
|
+
<search-form id="search-form" .fields=${this._searchFields} @submit=${e => this.dataGrist.fetch()}></search-form>
|
|
48
|
+
|
|
49
|
+
${this._showExpiration
|
|
50
|
+
? html`<search-form
|
|
51
|
+
id="search-exp-form"
|
|
52
|
+
.fields=${this._expSearchFields}
|
|
53
|
+
.hideSearchButton=${true}
|
|
54
|
+
@submit=${e => this.dataGrist.fetch()}
|
|
55
|
+
></search-form>`
|
|
56
|
+
: html``}
|
|
57
|
+
|
|
58
|
+
<data-grist
|
|
59
|
+
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
60
|
+
.config=${this.config}
|
|
61
|
+
.fetchHandler="${this.fetchHandler.bind(this)}"
|
|
62
|
+
></data-grist>
|
|
63
|
+
`
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
get context() {
|
|
67
|
+
return {
|
|
68
|
+
title: i18next.t('title.non_loaded_inventory')
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
async pageInitialized() {
|
|
73
|
+
this.config = {
|
|
74
|
+
list: {
|
|
75
|
+
fields: [
|
|
76
|
+
'roNo',
|
|
77
|
+
'palletId',
|
|
78
|
+
'cartonId',
|
|
79
|
+
'batchId',
|
|
80
|
+
'productSku',
|
|
81
|
+
'productInformation',
|
|
82
|
+
'product_brand',
|
|
83
|
+
'packingType',
|
|
84
|
+
'qty',
|
|
85
|
+
'uomValue',
|
|
86
|
+
'uom',
|
|
87
|
+
'binLocation'
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
pagination: { pages: [20, 50, 100, 500, 999] },
|
|
91
|
+
rows: {
|
|
92
|
+
appendable: false
|
|
93
|
+
},
|
|
94
|
+
columns: [
|
|
95
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
96
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
97
|
+
{
|
|
98
|
+
type: 'string',
|
|
99
|
+
name: 'orderNo',
|
|
100
|
+
header: i18next.t('field.ro_no'),
|
|
101
|
+
sortable: true,
|
|
102
|
+
width: 150
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: 'string',
|
|
106
|
+
name: 'palletId',
|
|
107
|
+
header: i18next.t('field.lot_id'),
|
|
108
|
+
sortable: true,
|
|
109
|
+
width: 150
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: 'string',
|
|
113
|
+
name: 'cartonId',
|
|
114
|
+
header: i18next.t('field.carton_id'),
|
|
115
|
+
sortable: true,
|
|
116
|
+
width: 120
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
type: 'string',
|
|
120
|
+
name: 'batchId',
|
|
121
|
+
header: i18next.t('field.batch_id'),
|
|
122
|
+
imex: { header: i18next.t('field.batch_id'), key: 'batchId', width: 30, type: 'string' },
|
|
123
|
+
sortable: true,
|
|
124
|
+
width: 120
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
type: 'string',
|
|
128
|
+
name: 'product_sku',
|
|
129
|
+
header: i18next.t('field.sku'),
|
|
130
|
+
sortable: true,
|
|
131
|
+
width: 150
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'string',
|
|
135
|
+
name: 'product_name',
|
|
136
|
+
header: i18next.t('field.product'),
|
|
137
|
+
sortable: true,
|
|
138
|
+
width: 250
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
type: 'string',
|
|
142
|
+
name: 'product_brand',
|
|
143
|
+
header: i18next.t('field.brand'),
|
|
144
|
+
sortable: true,
|
|
145
|
+
width: 150
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
type: 'code',
|
|
149
|
+
name: 'packingType',
|
|
150
|
+
header: i18next.t('field.packing_type'),
|
|
151
|
+
record: { codeName: 'PACKING_TYPES' },
|
|
152
|
+
sortable: true,
|
|
153
|
+
width: 150
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
type: 'number',
|
|
157
|
+
name: 'qty',
|
|
158
|
+
header: i18next.t('field.qty'),
|
|
159
|
+
width: 80
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
type: 'float',
|
|
163
|
+
name: 'uomValue',
|
|
164
|
+
header: i18next.t('field.total_uom_value'),
|
|
165
|
+
width: 110
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
type: 'string',
|
|
169
|
+
name: 'uom',
|
|
170
|
+
header: i18next.t('field.uom'),
|
|
171
|
+
sortable: true,
|
|
172
|
+
width: 80
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
type: 'string',
|
|
176
|
+
name: 'binLocation',
|
|
177
|
+
header: i18next.t('field.bin_location'),
|
|
178
|
+
sortable: true,
|
|
179
|
+
width: 120
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
this._searchFields = [
|
|
185
|
+
{
|
|
186
|
+
label: i18next.t('field.product_info'),
|
|
187
|
+
name: 'product_info',
|
|
188
|
+
type: 'text',
|
|
189
|
+
props: { searchOper: 'eq' }
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
label: i18next.t('field.batch_id'),
|
|
193
|
+
name: 'batchId',
|
|
194
|
+
type: 'text',
|
|
195
|
+
props: { searchOper: 'i_like' }
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
label: i18next.t('field.lot_id'),
|
|
199
|
+
name: 'palletId',
|
|
200
|
+
type: 'text',
|
|
201
|
+
props: { searchOper: 'i_like' }
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
label: i18next.t('field.carton_id'),
|
|
205
|
+
name: 'cartonId',
|
|
206
|
+
type: 'text',
|
|
207
|
+
props: { searchOper: 'i_like' }
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
label: i18next.t('field.ro_no'),
|
|
211
|
+
name: 'ro_no',
|
|
212
|
+
type: 'text',
|
|
213
|
+
props: { searchOper: 'i_like' }
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
label: i18next.t('field.bin_location'),
|
|
217
|
+
name: 'bin_location',
|
|
218
|
+
type: 'text',
|
|
219
|
+
props: { searchOper: 'i_like' }
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
async pageUpdated(changes, lifecycle) {
|
|
225
|
+
if (this.active) {
|
|
226
|
+
this.dataGrist.fetch()
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
get dataGrist() {
|
|
231
|
+
return this.shadowRoot.querySelector('data-grist')
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
get searchForm() {
|
|
235
|
+
return this.shadowRoot.querySelector('#search-form')
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
async fetchHandler({ page, limit, sorters = [] }) {
|
|
239
|
+
const filters = await this.searchForm.getQueryFilters()
|
|
240
|
+
const response = await client.query({
|
|
241
|
+
query: gql`
|
|
242
|
+
query nonLoadedInventories($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
243
|
+
nonLoadedInventories(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
244
|
+
items {
|
|
245
|
+
orderNo
|
|
246
|
+
palletId
|
|
247
|
+
cartonId
|
|
248
|
+
batchId
|
|
249
|
+
batchIdRef
|
|
250
|
+
packingType
|
|
251
|
+
qty
|
|
252
|
+
uomValue
|
|
253
|
+
uom
|
|
254
|
+
product {
|
|
255
|
+
sku
|
|
256
|
+
name
|
|
257
|
+
brand
|
|
258
|
+
description
|
|
259
|
+
}
|
|
260
|
+
binLocation
|
|
261
|
+
updatedAt
|
|
262
|
+
}
|
|
263
|
+
total
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
`,
|
|
267
|
+
variables: {
|
|
268
|
+
filters,
|
|
269
|
+
pagination: { page, limit },
|
|
270
|
+
sortings: sorters
|
|
271
|
+
}
|
|
272
|
+
})
|
|
273
|
+
|
|
274
|
+
return {
|
|
275
|
+
total: response.data.nonLoadedInventories.total || 0,
|
|
276
|
+
records:
|
|
277
|
+
response.data.nonLoadedInventories.items.map(item => {
|
|
278
|
+
return flattenObject(
|
|
279
|
+
{
|
|
280
|
+
...item,
|
|
281
|
+
product: {
|
|
282
|
+
...item.product,
|
|
283
|
+
name: `${item.product.name} ${item.product.description}`
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
'_'
|
|
287
|
+
)
|
|
288
|
+
}) || []
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
window.customElements.define('non-loaded-inventory', NonLoadedInventory)
|
package/client/route.js
CHANGED
|
@@ -265,6 +265,10 @@ export default function route(page) {
|
|
|
265
265
|
import('./pages/inventory/inventory-adjustment-approval')
|
|
266
266
|
return page
|
|
267
267
|
|
|
268
|
+
case 'non_loaded_inventory':
|
|
269
|
+
import('./pages/inventory/non-loaded-inventory')
|
|
270
|
+
return page
|
|
271
|
+
|
|
268
272
|
case 'create_cycle_count':
|
|
269
273
|
import('./pages/inventory-check/create-cycle-count')
|
|
270
274
|
return page
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-wms",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.35",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"@things-factory/print-ui": "^4.1.28",
|
|
87
87
|
"@things-factory/product-base": "^4.1.34",
|
|
88
88
|
"@things-factory/resource-ui": "^4.1.28",
|
|
89
|
-
"@things-factory/sales-ui": "^4.1.
|
|
89
|
+
"@things-factory/sales-ui": "^4.1.35",
|
|
90
90
|
"@things-factory/scene-data-transform": "^4.1.28",
|
|
91
91
|
"@things-factory/scene-excel": "^4.1.28",
|
|
92
92
|
"@things-factory/scene-firebase": "^4.1.28",
|
|
@@ -102,11 +102,11 @@
|
|
|
102
102
|
"@things-factory/system-ui": "^4.1.28",
|
|
103
103
|
"@things-factory/transport-base": "^4.1.28",
|
|
104
104
|
"@things-factory/tutorial-ui": "^4.1.28",
|
|
105
|
-
"@things-factory/warehouse-base": "^4.1.
|
|
106
|
-
"@things-factory/worksheet-base": "^4.1.
|
|
105
|
+
"@things-factory/warehouse-base": "^4.1.35",
|
|
106
|
+
"@things-factory/worksheet-base": "^4.1.35"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@things-factory/builder": "^4.1.28"
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "a7e4a62c6ab05d18879ab945ac0f10be440a5f34"
|
|
112
112
|
}
|
package/things-factory.config.js
CHANGED
|
@@ -265,6 +265,10 @@ export default {
|
|
|
265
265
|
tagname: 'inventory-adjustment-approval',
|
|
266
266
|
page: 'inventory_adjustment_approval'
|
|
267
267
|
},
|
|
268
|
+
{
|
|
269
|
+
tagname: 'non-loaded-inventory',
|
|
270
|
+
page: 'non_loaded_inventory'
|
|
271
|
+
},
|
|
268
272
|
{
|
|
269
273
|
tagname: 'create-cycle-count',
|
|
270
274
|
page: 'create_cycle_count'
|
package/translations/en.json
CHANGED
|
@@ -151,6 +151,7 @@
|
|
|
151
151
|
"field.batch_no": "batch no.",
|
|
152
152
|
"field.before": "before",
|
|
153
153
|
"field.billing_mode": "billing mode",
|
|
154
|
+
"field.bin_location": "bin location",
|
|
154
155
|
"field.branch": "branch",
|
|
155
156
|
"field.brand_sku": "brand sku",
|
|
156
157
|
"field.brand": "brand",
|
|
@@ -1540,6 +1541,7 @@
|
|
|
1540
1541
|
"title.my_worksheet_list": "my worksheet list",
|
|
1541
1542
|
"title.new_release_product_list": "new release product list",
|
|
1542
1543
|
"title.non_assigned_vas": "unassigned vas",
|
|
1544
|
+
"title.non_loaded_inventory": "non loaded inventory",
|
|
1543
1545
|
"title.onhand_inventory": "onhand inventory",
|
|
1544
1546
|
"title.operation_type": "operation type",
|
|
1545
1547
|
"title.order_information": "order information",
|
package/translations/ko.json
CHANGED
|
@@ -161,6 +161,7 @@
|
|
|
161
161
|
"field.batch_no": "[ko]batch no.",
|
|
162
162
|
"field.before": "이전",
|
|
163
163
|
"field.billing_mode": "청구 유형",
|
|
164
|
+
"field.bin_location": "[ko]bin location",
|
|
164
165
|
"field.branch": "지점",
|
|
165
166
|
"field.brand_image": "[ko]brand image",
|
|
166
167
|
"field.brand_name": "[ko]brand name",
|
|
@@ -1667,6 +1668,7 @@
|
|
|
1667
1668
|
"title.my_worksheet_list": "내 작업리스트",
|
|
1668
1669
|
"title.new_release_product_list": "새 출고 상품 목록",
|
|
1669
1670
|
"title.non_assigned_vas": "미할당 부가서비스",
|
|
1671
|
+
"title.non_loaded_inventory": "[ko]non loaded inventory",
|
|
1670
1672
|
"title.onhand_inventory": "관리중 재고",
|
|
1671
1673
|
"title.operation_type": "작업 유형",
|
|
1672
1674
|
"title.order_information": "[ko] order information",
|
package/translations/ms.json
CHANGED
|
@@ -155,6 +155,7 @@
|
|
|
155
155
|
"field.batch_no": "[ms]batch no.",
|
|
156
156
|
"field.before": "before",
|
|
157
157
|
"field.billing_mode": "mod pengiraan bil",
|
|
158
|
+
"field.bin_location": "[ms]bin location",
|
|
158
159
|
"field.branch": "cawangan",
|
|
159
160
|
"field.brand_sku": "[ms]brand sku",
|
|
160
161
|
"field.brand": "[ms] brand",
|
|
@@ -1561,6 +1562,7 @@
|
|
|
1561
1562
|
"title.my_worksheet_list": "[ms] my worksheet list",
|
|
1562
1563
|
"title.new_release_product_list": "new release product list",
|
|
1563
1564
|
"title.non_assigned_vas": "unassigned vas",
|
|
1565
|
+
"title.non_loaded_inventory": "[ms]non loaded inventory",
|
|
1564
1566
|
"title.onhand_inventory": "inventori yang diperoleh",
|
|
1565
1567
|
"title.operation_type": "jenis operasi",
|
|
1566
1568
|
"title.order_information": "[ms] order information",
|
package/translations/zh.json
CHANGED
|
@@ -152,6 +152,7 @@
|
|
|
152
152
|
"field.batch_no": "[zh]batch no.",
|
|
153
153
|
"field.before": "before",
|
|
154
154
|
"field.billing_mode": "billing mode",
|
|
155
|
+
"field.bin_location": "[zh]bin location",
|
|
155
156
|
"field.branch": "branch",
|
|
156
157
|
"field.brand_sku": "[zh]brand sku",
|
|
157
158
|
"field.brand": "[zh] brand",
|
|
@@ -1518,6 +1519,7 @@
|
|
|
1518
1519
|
"title.my_worksheet_list": "[zh] my worksheet list",
|
|
1519
1520
|
"title.new_release_product_list": "[zh] new release product list",
|
|
1520
1521
|
"title.non_assigned_vas": "[zh] unassigned vas",
|
|
1522
|
+
"title.non_loaded_inventory": "[zh]non loaded inventory",
|
|
1521
1523
|
"title.onhand_inventory": "[zh] onhand inventory",
|
|
1522
1524
|
"title.operation_type": "[zh] operation type",
|
|
1523
1525
|
"title.order_information": "[zh] order information",
|