@things-factory/operato-wms 4.0.22 → 4.0.26
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/client/bootstrap.js +13 -6
- package/client/pages/adjustment/transfer-inventory.js +32 -6
- package/client/pages/billing/claim-chit/claim-chit-detail.js +32 -35
- package/client/pages/billing/claim-chit/claim-chit-list.js +17 -17
- package/client/pages/billing/claim-chit/create-claim-chit.js +39 -30
- package/client/pages/billing/transport-summary-report.js +21 -23
- package/client/pages/bulk-operation/bulk-operation.js +189 -64
- package/client/pages/bulk-operation/validate-gan-popup.js +391 -0
- package/client/pages/bulk-operation/validate-ro-popup.js +44 -54
- package/client/pages/components/popup-unloading.js +47 -34
- package/client/pages/components/select-product-popup.js +74 -27
- package/client/pages/components/worksheet-information-popup.js +100 -0
- package/client/pages/inbound/expiry-date-popup.js +2 -2
- package/client/pages/inbound/inbound-reusable-pallet.js +21 -19
- package/client/pages/inbound/palletizing-pallets-popup.js +10 -9
- package/client/pages/inbound/putaway-product.js +196 -235
- package/client/pages/inbound/putaway-worksheet-generate-popup.js +4 -4
- package/client/pages/inbound/undo-unload-popup.js +295 -0
- package/client/pages/inbound/unload-product.js +236 -646
- package/client/pages/inbound/unloaded-inventories-popup.js +129 -0
- package/client/pages/inbound/vas-selector.js +9 -8
- package/client/pages/inbound/worksheet-unloading.js +15 -11
- package/client/pages/inventory/inventory-adjustment.js +9 -10
- package/client/pages/inventory-check/check-inventory-popup.js +20 -18
- package/client/pages/inventory-check/cycle-count-recheck-popup.js +25 -15
- package/client/pages/inventory-check/inspecting-product.js +2 -2
- package/client/pages/inventory-check/inventory-check-list.js +30 -19
- package/client/pages/inventory-check/search-popup.js +15 -14
- package/client/pages/inventory-check/worksheet-cycle-count.js +17 -15
- package/client/pages/master/location-list.js +60 -52
- package/client/pages/master/pallet-list.js +34 -30
- package/client/pages/master/print-location-label.js +37 -36
- package/client/pages/master/product/product-list.js +1 -1
- package/client/pages/master/warehouse-list.js +33 -29
- package/client/pages/master/worker-list.js +30 -30
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +409 -21
- package/client/pages/order/arrival-notice/assign-buffer-location.js +1 -1
- package/client/pages/order/arrival-notice/create-arrival-notice.js +89 -13
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +90 -10
- package/client/pages/order/arrival-notice/edit-product-popup.js +2 -2
- package/client/pages/order/goods-received-note/customer-grn-list.js +9 -8
- package/client/pages/order/goods-received-note/customer-received-note.js +8 -7
- package/client/pages/order/goods-received-note/received-note-list.js +9 -8
- package/client/pages/order/release-order/b2b/b2b-order-list.js +78 -2
- package/client/pages/order/release-order/b2b/b2b-order-requests.js +32 -16
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +49 -5
- package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +314 -0
- package/client/pages/order/release-order/batch-picking-popup.js +19 -2
- package/client/pages/order/release-order/create-release-order.js +194 -89
- package/client/pages/order/release-order/release-extra-product-popup.js +3 -7
- package/client/pages/order/release-order/release-order-detail.js +390 -107
- package/client/pages/order/return-order/check-return-order.js +15 -13
- package/client/pages/order/return-order/create-return-order.js +3 -3
- package/client/pages/order/return-order/receive-return-order-requests.js +25 -22
- package/client/pages/order/return-order/rejected-return-order.js +8 -14
- package/client/pages/order/return-order/return-order-assign-buffer-location.js +16 -14
- package/client/pages/order/return-order/return-order-detail.js +35 -31
- package/client/pages/order/return-order/return-order-list.js +9 -8
- package/client/pages/order/return-order/return-order-requests.js +20 -18
- package/client/pages/order/reverse-kitting-order/reverse-kitting-order-list.js +9 -8
- package/client/pages/order/transfer-order/receive-transfer-order-request.js +67 -66
- package/client/pages/order/transfer-order/rejected-transfer-order.js +7 -6
- package/client/pages/order/transfer-order/transfer-order-detail.js +7 -6
- package/client/pages/order/transfer-order/transfer-order-requests.js +20 -18
- package/client/pages/order/transport-order/contact-point-selector-popup.js +20 -20
- package/client/pages/order/transport-order/create-delivery-order.js +1 -1
- package/client/pages/order/transport-order/delivery-note-popup.js +52 -46
- package/client/pages/order/transport-order/delivery-order-list.js +1 -1
- package/client/pages/order/transport-order/print-delivery-note.js +17 -16
- package/client/pages/order/transport-order/upload-delivery-note.js +21 -18
- package/client/pages/order/transport-order/view-delivery-note.js +19 -22
- package/client/pages/order/vas-order/create-vas-order.js +12 -11
- package/client/pages/order/vas-order/receive-vas-order.js +25 -22
- package/client/pages/order/vas-order/vas-order-detail.js +26 -23
- package/client/pages/order/vas-order/vas-order-list.js +9 -8
- package/client/pages/order/vas-order/vas-order-requests.js +11 -12
- package/client/pages/outbound/outbound-reusable-pallet.js +25 -33
- package/client/pages/outbound/packing-product.js +111 -236
- package/client/pages/outbound/picking-product.js +287 -380
- package/client/pages/outbound/single-outbound-worksheet.js +9 -8
- package/client/pages/outbound/sorting-product.js +66 -63
- package/client/pages/outbound/worksheet-loading.js +7 -3
- package/client/pages/outbound/worksheet-packing.js +3 -3
- package/client/pages/outbound/worksheet-picking.js +22 -18
- package/client/pages/report/job-sheet-list.js +9 -8
- package/client/pages/vas/print-product-label.js +17 -9
- package/client/route.js +16 -32
- package/dist-server/graphql/resolvers/reports/product-label-report.js +1 -0
- package/dist-server/graphql/resolvers/reports/product-label-report.js.map +1 -1
- package/package.json +65 -65
- package/server/graphql/resolvers/reports/product-label-report.ts +1 -0
- package/things-factory.config.js +0 -16
- package/translations/en.json +34 -2
- package/translations/ko.json +34 -3
- package/translations/ms.json +34 -3
- package/translations/zh.json +34 -3
- package/client/pages/inbound/location-selector.js +0 -224
- package/client/pages/master/picking-bin-list.js +0 -354
- package/client/pages/order/retail-replenishment-order/retail-replenishment-order-detail.js +0 -315
- package/client/pages/order/retail-replenishment-order/retail-replenishment-order-requests.js +0 -307
- package/client/pages/order/vas-order/rejected-vas-order.js +0 -300
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '@things-factory/biz-ui'
|
|
2
|
+
import './validate-gan-popup'
|
|
2
3
|
import './validate-ro-popup'
|
|
3
4
|
|
|
4
5
|
import { css, html } from 'lit-element'
|
|
@@ -134,19 +135,16 @@ class BulkOperation extends localize(i18next)(PageView) {
|
|
|
134
135
|
|
|
135
136
|
static get properties() {
|
|
136
137
|
return {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
_ganBizplaceId: String,
|
|
139
|
+
_ganBizplaceName: String,
|
|
140
|
+
_ganDocument: Object,
|
|
141
|
+
_roDocument: Object,
|
|
142
|
+
_rawData: Array,
|
|
143
|
+
_roBizplaceId: String,
|
|
144
|
+
_roBizplaceName: String
|
|
141
145
|
}
|
|
142
146
|
}
|
|
143
147
|
|
|
144
|
-
constructor() {
|
|
145
|
-
super()
|
|
146
|
-
// initially act as placeholder
|
|
147
|
-
this._bizplaceName = i18next.t('label.company')
|
|
148
|
-
}
|
|
149
|
-
|
|
150
148
|
firstUpdated() {}
|
|
151
149
|
|
|
152
150
|
get context() {
|
|
@@ -155,37 +153,112 @@ class BulkOperation extends localize(i18next)(PageView) {
|
|
|
155
153
|
}
|
|
156
154
|
}
|
|
157
155
|
|
|
158
|
-
get
|
|
159
|
-
return this.shadowRoot.querySelector('#upload-document')
|
|
156
|
+
get _ganDocument() {
|
|
157
|
+
return this.shadowRoot.querySelector('#upload-gan-document')
|
|
160
158
|
}
|
|
161
159
|
|
|
162
|
-
get
|
|
163
|
-
return this.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
160
|
+
get _roDocument() {
|
|
161
|
+
return this.shadowRoot.querySelector('#upload-ro-document')
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
get _ganData() {
|
|
165
|
+
return [
|
|
166
|
+
{
|
|
167
|
+
refNo: '',
|
|
168
|
+
refNo2: '',
|
|
169
|
+
refNo3: '',
|
|
170
|
+
etaDate: '',
|
|
171
|
+
truckNo: '',
|
|
172
|
+
containerNo: '',
|
|
173
|
+
containerSize: '',
|
|
174
|
+
looseItem: false,
|
|
175
|
+
importCargo: false,
|
|
176
|
+
sku: '',
|
|
177
|
+
batchId: '',
|
|
178
|
+
batchRefNo: '',
|
|
179
|
+
packingType: '',
|
|
180
|
+
packingSize: 0,
|
|
181
|
+
uom: '',
|
|
182
|
+
packQty: 0,
|
|
183
|
+
palletQty: 0,
|
|
184
|
+
manufactureYear: 0,
|
|
185
|
+
unitPrice: ''
|
|
173
186
|
}
|
|
174
|
-
|
|
187
|
+
]
|
|
175
188
|
}
|
|
176
189
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
190
|
+
get _roData() {
|
|
191
|
+
return [
|
|
192
|
+
{
|
|
193
|
+
refNo: '',
|
|
194
|
+
refNo2: '',
|
|
195
|
+
refNo3: '',
|
|
196
|
+
releaseDate: '',
|
|
197
|
+
attentionTo: '',
|
|
198
|
+
deliveryAddress1: '',
|
|
199
|
+
deliveryAddress2: '',
|
|
200
|
+
deliveryAddress3: '',
|
|
201
|
+
deliveryAddress4: '',
|
|
202
|
+
postalCode: '',
|
|
203
|
+
city: '',
|
|
204
|
+
state: '',
|
|
205
|
+
country: '',
|
|
206
|
+
phone1: '',
|
|
207
|
+
sku: '',
|
|
208
|
+
packingType: '',
|
|
209
|
+
packingSize: 0,
|
|
210
|
+
uom: '',
|
|
211
|
+
releaseQty: 0
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
}
|
|
182
215
|
|
|
216
|
+
render() {
|
|
183
217
|
return html`
|
|
184
218
|
<ul export-form>
|
|
185
219
|
<li>
|
|
186
220
|
<div subtitle>
|
|
187
|
-
|
|
188
|
-
<a
|
|
221
|
+
Arrival Notice
|
|
222
|
+
<a @click=${async () => await this._downloadOrderTemplate(this._ganData, 'Bulk Arrival Notices')} download>
|
|
223
|
+
<mwc-icon>file_download</mwc-icon>
|
|
224
|
+
</a>
|
|
225
|
+
</div>
|
|
226
|
+
<form name="input-form" class="multi-column-form" autocomplete="off">
|
|
227
|
+
<fieldset>
|
|
228
|
+
<div attachment-wrap>
|
|
229
|
+
<input type="hidden" name="bizplaceId" value="${this._ganBizplaceId}" />
|
|
230
|
+
<input
|
|
231
|
+
type="text"
|
|
232
|
+
name="ganBizplaceName"
|
|
233
|
+
placeholder="${i18next.t('label.company')}"
|
|
234
|
+
value="${this._ganBizplaceName}"
|
|
235
|
+
@click="${() => {
|
|
236
|
+
this._openBizplacesSelector('GAN')
|
|
237
|
+
}}"
|
|
238
|
+
/>
|
|
239
|
+
</div>
|
|
240
|
+
<div attachment-wrap>
|
|
241
|
+
<file-uploader
|
|
242
|
+
name="attachments"
|
|
243
|
+
id="upload-gan-document"
|
|
244
|
+
label="${i18next.t('label.select_file')}"
|
|
245
|
+
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
246
|
+
custom-input
|
|
247
|
+
></file-uploader>
|
|
248
|
+
</div>
|
|
249
|
+
</fieldset>
|
|
250
|
+
</form>
|
|
251
|
+
<div class="button-container">
|
|
252
|
+
<mwc-button raised @click=${async () => await this._extractRawDataFromExcel(this._ganDocument, 'GAN')}
|
|
253
|
+
>${i18next.t('button.validate')}</mwc-button
|
|
254
|
+
>
|
|
255
|
+
</div>
|
|
256
|
+
</li>
|
|
257
|
+
|
|
258
|
+
<li>
|
|
259
|
+
<div subtitle>
|
|
260
|
+
Release Order
|
|
261
|
+
<a @click=${async () => await this._downloadOrderTemplate(this._roData, 'Bulk Release Orders')} download>
|
|
189
262
|
<mwc-icon>file_download</mwc-icon>
|
|
190
263
|
</a>
|
|
191
264
|
</div>
|
|
@@ -193,18 +266,21 @@ class BulkOperation extends localize(i18next)(PageView) {
|
|
|
193
266
|
<form name="input-form" class="multi-column-form" autocomplete="off">
|
|
194
267
|
<fieldset>
|
|
195
268
|
<div attachment-wrap>
|
|
196
|
-
<input type="hidden" name="bizplaceId" value="${this.
|
|
269
|
+
<input type="hidden" name="bizplaceId" value="${this._roBizplaceId}" />
|
|
197
270
|
<input
|
|
198
271
|
type="text"
|
|
199
|
-
name="
|
|
200
|
-
|
|
201
|
-
|
|
272
|
+
name="roBizplaceName"
|
|
273
|
+
placeholder="${i18next.t('label.company')}"
|
|
274
|
+
value="${this._roBizplaceName}"
|
|
275
|
+
@click="${() => {
|
|
276
|
+
this._openBizplacesSelector('RO')
|
|
277
|
+
}}"
|
|
202
278
|
/>
|
|
203
279
|
</div>
|
|
204
280
|
<div attachment-wrap>
|
|
205
281
|
<file-uploader
|
|
206
282
|
name="attachments"
|
|
207
|
-
id="upload-document"
|
|
283
|
+
id="upload-ro-document"
|
|
208
284
|
label="${i18next.t('label.select_file')}"
|
|
209
285
|
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
210
286
|
custom-input
|
|
@@ -214,7 +290,7 @@ class BulkOperation extends localize(i18next)(PageView) {
|
|
|
214
290
|
</form>
|
|
215
291
|
|
|
216
292
|
<div class="button-container">
|
|
217
|
-
<mwc-button raised @click
|
|
293
|
+
<mwc-button raised @click=${async () => await this._extractRawDataFromExcel(this._roDocument, 'RO')}
|
|
218
294
|
>${i18next.t('button.validate')}</mwc-button
|
|
219
295
|
>
|
|
220
296
|
</div>
|
|
@@ -223,27 +299,19 @@ class BulkOperation extends localize(i18next)(PageView) {
|
|
|
223
299
|
`
|
|
224
300
|
}
|
|
225
301
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
_getReleaseOrderTemplate() {
|
|
236
|
-
/* download excel template for Create RO */
|
|
302
|
+
async _downloadOrderTemplate(data, fileName) {
|
|
303
|
+
const ws = XLSX.utils.json_to_sheet(data)
|
|
304
|
+
const wb = XLSX.utils.book_new()
|
|
305
|
+
XLSX.utils.book_append_sheet(wb, ws)
|
|
306
|
+
XLSX.writeFile(wb, `${fileName}.xlsx`)
|
|
237
307
|
}
|
|
238
308
|
|
|
239
|
-
async _extractRawDataFromExcel() {
|
|
240
|
-
if (!this.
|
|
309
|
+
async _extractRawDataFromExcel(_docs, sourceFn) {
|
|
310
|
+
if ((sourceFn == 'GAN' && !this._ganBizplaceId) || (sourceFn == 'RO' && !this._roBizplaceId)) {
|
|
241
311
|
this._showToast({ level: 'error', message: `${i18next.t('text.please_select_the_company')}` })
|
|
242
312
|
return
|
|
243
313
|
}
|
|
244
314
|
|
|
245
|
-
const _docs = this._document
|
|
246
|
-
|
|
247
315
|
if (_docs && _docs.files) {
|
|
248
316
|
if (_docs.files.length == 1) {
|
|
249
317
|
const file = _docs.files[0]
|
|
@@ -259,37 +327,86 @@ class BulkOperation extends localize(i18next)(PageView) {
|
|
|
259
327
|
const worksheet = workbook.Sheets[firstWorksheetName]
|
|
260
328
|
|
|
261
329
|
let rawData = XLSX.utils.sheet_to_json(worksheet)
|
|
330
|
+
|
|
262
331
|
rawData = rawData.map(raw => {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
return raw
|
|
332
|
+
//return entries without empty strings
|
|
333
|
+
return Object.fromEntries(Object.entries(raw).filter(([_, val]) => !/^\s*$/.test(val)))
|
|
266
334
|
})
|
|
267
|
-
|
|
268
|
-
this.
|
|
335
|
+
|
|
336
|
+
if (sourceFn == 'GAN') this._validateArrivalNotice(rawData)
|
|
337
|
+
else if (sourceFn == 'RO') this._validateReleaseOrder(rawData)
|
|
269
338
|
}
|
|
270
339
|
} else if (_docs.files.length > 1)
|
|
271
|
-
this._showToast({ level: 'error', message: i18next.t('text.
|
|
340
|
+
this._showToast({ level: 'error', message: i18next.t('text.you_can_only_upload_one_file_max') })
|
|
272
341
|
else this._showToast({ level: 'error', message: i18next.t('text.please_attach_the_file') })
|
|
273
342
|
} else this._showToast({ level: 'error', message: i18next.t('text.please_attach_the_file') })
|
|
274
343
|
}
|
|
275
344
|
|
|
276
|
-
|
|
345
|
+
_validateArrivalNotice(records) {
|
|
346
|
+
/* validate excel that user uploaded */
|
|
347
|
+
openPopup(
|
|
348
|
+
html`
|
|
349
|
+
<validate-gan-popup
|
|
350
|
+
.records=${records.map(raw => {
|
|
351
|
+
let etaDate = new Date(String(raw.etaDate || ''))
|
|
352
|
+
|
|
353
|
+
return {
|
|
354
|
+
refNo: String(raw.refNo || ''),
|
|
355
|
+
refNo2: String(raw.refNo2 || ''),
|
|
356
|
+
refNo3: String(raw.refNo3 || ''),
|
|
357
|
+
truckNo: String(raw.truckNo || ''),
|
|
358
|
+
ownTransport: !!raw.truckNo,
|
|
359
|
+
looseItem: !!raw.looseItem,
|
|
360
|
+
importCargo: !!raw.importCargo,
|
|
361
|
+
containerNo: String(raw.containerNo || ''),
|
|
362
|
+
containerSize: String(raw.containerSize || ''),
|
|
363
|
+
sku: String(raw.sku || ''),
|
|
364
|
+
batchId: String(raw.batchId || ''),
|
|
365
|
+
packingType: String(raw.packingType || ''),
|
|
366
|
+
packingSize: raw.packingSize,
|
|
367
|
+
uom: String(raw.uom || ''),
|
|
368
|
+
packQty: parseInt(raw.packQty || 0),
|
|
369
|
+
palletQty: parseInt(raw.palletQty || 0),
|
|
370
|
+
unitPrice: Number(raw.unitPrice || 0),
|
|
371
|
+
manufactureYear: parseInt(raw.manufactureYear || 0),
|
|
372
|
+
etaDate: this._getStdDateStr(etaDate)
|
|
373
|
+
}
|
|
374
|
+
})}
|
|
375
|
+
.bizplaceId=${this._ganBizplaceId}
|
|
376
|
+
></validate-gan-popup>
|
|
377
|
+
`,
|
|
378
|
+
{
|
|
379
|
+
backdrop: true,
|
|
380
|
+
escapable: false,
|
|
381
|
+
size: 'large',
|
|
382
|
+
title: i18next.t('title.bulk_arrival_notices')
|
|
383
|
+
}
|
|
384
|
+
)
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
_validateReleaseOrder(records) {
|
|
277
388
|
/* validate excel that user uploaded */
|
|
278
|
-
openPopup(html` <validate-ro-popup .records=${records} .bizplaceId=${this.
|
|
389
|
+
openPopup(html` <validate-ro-popup .records=${records} .bizplaceId=${this._roBizplaceId}></validate-ro-popup> `, {
|
|
279
390
|
backdrop: true,
|
|
280
391
|
escapable: false,
|
|
281
392
|
size: 'large',
|
|
282
|
-
title: i18next.t('title.
|
|
393
|
+
title: i18next.t('title.bulk_release_orders')
|
|
283
394
|
})
|
|
284
395
|
}
|
|
285
396
|
|
|
286
|
-
_openBizplacesSelector() {
|
|
397
|
+
_openBizplacesSelector(source) {
|
|
287
398
|
openPopup(
|
|
288
399
|
html`
|
|
289
400
|
<popup-partner-bizplaces-selector
|
|
290
401
|
@selected="${e => {
|
|
291
|
-
|
|
292
|
-
|
|
402
|
+
let { id, name } = e.detail
|
|
403
|
+
if (source == 'GAN') {
|
|
404
|
+
this._ganBizplaceId = id
|
|
405
|
+
this._ganBizplaceName = name
|
|
406
|
+
} else if (source == 'RO') {
|
|
407
|
+
this._roBizplaceId = id
|
|
408
|
+
this._roBizplaceName = name
|
|
409
|
+
}
|
|
293
410
|
}}"
|
|
294
411
|
></popup-partner-bizplaces-selector>
|
|
295
412
|
`,
|
|
@@ -301,6 +418,14 @@ class BulkOperation extends localize(i18next)(PageView) {
|
|
|
301
418
|
)
|
|
302
419
|
}
|
|
303
420
|
|
|
421
|
+
_getStdDateStr(date) {
|
|
422
|
+
if (isNaN(date.getFullYear())) return ''
|
|
423
|
+
else {
|
|
424
|
+
date.setHours(date.getHours() + 8)
|
|
425
|
+
return date.toISOString().split('T')[0]
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
304
429
|
_showToast({ level, message }) {
|
|
305
430
|
document.dispatchEvent(
|
|
306
431
|
new CustomEvent('notify', {
|