@things-factory/operato-wms 4.0.9 → 4.0.13
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/pages/adjustment/transfer-inventory.js +368 -165
- package/client/pages/billing/claim-chit/claim-chit-list.js +7 -6
- package/client/pages/bulk-operation/bulk-operation.js +316 -0
- package/client/pages/bulk-operation/validate-ro-popup.js +445 -0
- package/client/pages/components/select-product-popup.js +15 -2
- package/client/pages/constants/inventory.js +1 -0
- package/client/pages/constants/location.js +33 -6
- package/client/pages/constants/order.js +10 -0
- package/client/pages/constants/worksheet.js +2 -2
- package/client/pages/inbound/inbound-worksheet.js +78 -9
- package/client/pages/inbound/putaway-product.js +214 -139
- package/client/pages/inbound/putaway-worksheet-generate-popup.js +24 -2
- package/client/pages/inbound/unload-product.js +149 -76
- package/client/pages/inbound/worksheet-putaway-return.js +22 -5
- package/client/pages/inbound/worksheet-putaway.js +21 -8
- package/client/pages/inbound/worksheet-unloading-return.js +22 -5
- package/client/pages/inbound/worksheet-unloading.js +8 -0
- package/client/pages/inventory/inventory-adjustment-approval.js +11 -19
- package/client/pages/inventory/inventory-adjustment.js +136 -101
- package/client/pages/inventory/inventory-by-product-detail.js +3 -5
- package/client/pages/inventory/inventory-by-product.js +8 -0
- package/client/pages/inventory/inventory-history-by-pallet.js +12 -5
- package/client/pages/inventory/inventory-history.js +14 -5
- package/client/pages/inventory/onhand-inventory.js +11 -2
- package/client/pages/inventory-check/create-cycle-count.js +12 -6
- package/client/pages/inventory-check/cycle-count-report.js +8 -0
- package/client/pages/inventory-check/inspecting-product.js +146 -80
- package/client/pages/inventory-check/worksheet-cycle-count.js +14 -0
- package/client/pages/manifest/create-loading-manifest.js +314 -0
- package/client/pages/manifest/dispatcher-verification-popup.js +86 -0
- package/client/pages/manifest/loading-manifest-detail.js +345 -0
- package/client/pages/manifest/loading-manifest-list.js +305 -0
- package/client/pages/master/location-list.js +58 -17
- package/client/pages/master/product/product-detail-bizplace-setting-popup.js +2 -2
- package/client/pages/master/product/product-details-popup.js +2 -2
- package/client/pages/master/product/product-list.js +5 -5
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +134 -115
- package/client/pages/order/arrival-notice/arrival-notice-list.js +87 -6
- package/client/pages/order/arrival-notice/arrival-notice-requests.js +83 -6
- package/client/pages/order/arrival-notice/assign-buffer-location.js +8 -1
- package/client/pages/order/arrival-notice/check-arrived-notice.js +9 -1
- package/client/pages/order/arrival-notice/create-arrival-notice.js +38 -3
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +290 -25
- package/client/pages/order/arrival-notice/edit-product-popup.js +36 -5
- package/client/pages/order/arrival-notice/receive-arrival-notice.js +8 -1
- package/client/pages/order/goods-received-note/received-note-list.js +138 -6
- package/client/pages/order/release-order/b2b/b2b-order-list.js +45 -5
- package/client/pages/order/release-order/b2b/b2b-order-requests.js +52 -12
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +244 -24
- package/client/pages/order/release-order/bulk-print-packing-list.js +23 -0
- package/client/pages/order/release-order/create-release-order.js +55 -8
- package/client/pages/order/release-order/receive-release-order-request.js +35 -24
- package/client/pages/order/release-order/release-extra-product-popup.js +204 -63
- package/client/pages/order/release-order/release-order-detail.js +301 -74
- package/client/pages/order/return-order/check-return-order.js +9 -1
- package/client/pages/order/return-order/create-return-order.js +14 -2
- package/client/pages/order/return-order/receive-return-order-requests.js +9 -1
- package/client/pages/order/return-order/return-order-detail.js +15 -6
- package/client/pages/order/return-order/return-order-inventory-popup.js +7 -0
- package/client/pages/order/reverse-kitting-order/reverse-kitting-order-detail.js +124 -59
- package/client/pages/order/reverse-kitting-order/reverse-kitting-order-list.js +1 -6
- package/client/pages/order/reverse-kitting-order/reverse-kitting-pallet-label-popup.js +239 -0
- package/client/pages/order/transport-order/delivery-order-list.js +102 -59
- package/client/pages/outbound/inventory-assign-popup.js +23 -6
- package/client/pages/outbound/inventory-auto-assign-popup.js +22 -6
- package/client/pages/outbound/loading-product.js +4 -1
- package/client/pages/outbound/merged-outbound-worksheet.js +43 -1
- package/client/pages/outbound/packing-product.js +4 -1
- package/client/pages/outbound/packing-worksheet-list.js +39 -1
- package/client/pages/outbound/picking-product.js +803 -431
- package/client/pages/outbound/picking-replacement-popup.js +1 -1
- package/client/pages/outbound/serial-number-popup.js +280 -0
- package/client/pages/outbound/single-outbound-worksheet.js +47 -1
- package/client/pages/outbound/worksheet-batch-picking.js +22 -8
- package/client/pages/outbound/worksheet-loading.js +22 -5
- package/client/pages/outbound/worksheet-packing.js +8 -0
- package/client/pages/outbound/worksheet-picking.js +62 -8
- package/client/pages/outbound/worksheet-return.js +9 -1
- package/client/pages/outbound/worksheet-sorting.js +9 -1
- package/client/pages/report/custom-elccl/elccl-inventory-report.js +31 -30
- package/client/pages/report/custom-elccl/elccl-inventory-summary-report.js +23 -26
- package/client/pages/report/inventory-pallet-storage-report.js +11 -10
- package/client/pages/report/inventory-report.js +41 -43
- package/client/pages/report/inventory-summary-report.js +25 -28
- package/client/pages/report/product-label-report.js +401 -0
- package/client/pages/support/inventory-comparison.js +296 -0
- package/client/pages/vas/print-product-label.js +298 -132
- package/client/pages/vas/reverse-kitting/execute-reverse-kitting.js +38 -23
- package/client/pages/vas/reverse-kitting/popup-combination-sets.js +98 -15
- package/client/pages/vas/reverse-kitting/popup-reverse-kitting-template.js +129 -21
- package/client/pages/vas/vas-pallet-label-popup.js +5 -8
- package/client/route.js +28 -0
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js.map +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.js +64 -54
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.js.map +1 -1
- package/dist-server/graphql/resolvers/extra/add-release-good-products.js +34 -9
- package/dist-server/graphql/resolvers/extra/add-release-good-products.js.map +1 -1
- package/dist-server/graphql/resolvers/index.js +5 -1
- package/dist-server/graphql/resolvers/index.js.map +1 -1
- package/dist-server/graphql/resolvers/inventory-comparison/index.js +6 -0
- package/dist-server/graphql/resolvers/inventory-comparison/index.js.map +1 -0
- package/dist-server/graphql/resolvers/inventory-comparison/inventory-comparison-list.js +78 -0
- package/dist-server/graphql/resolvers/inventory-comparison/inventory-comparison-list.js.map +1 -0
- package/dist-server/graphql/resolvers/reports/index.js +2 -1
- package/dist-server/graphql/resolvers/reports/index.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/product-label-report.js +56 -0
- package/dist-server/graphql/resolvers/reports/product-label-report.js.map +1 -0
- package/dist-server/graphql/resolvers/shipping-provider/index.js +6 -0
- package/dist-server/graphql/resolvers/shipping-provider/index.js.map +1 -0
- package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js +20 -0
- package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js.map +1 -0
- package/dist-server/graphql/types/custom/elccl/elccl-inventory-report.js +1 -1
- package/dist-server/graphql/types/index.js +8 -2
- package/dist-server/graphql/types/index.js.map +1 -1
- package/dist-server/graphql/types/inventory-comparison/index.js +13 -0
- package/dist-server/graphql/types/inventory-comparison/index.js.map +1 -0
- package/dist-server/graphql/types/inventory-comparison/inventory-comparison-list.js +14 -0
- package/dist-server/graphql/types/inventory-comparison/inventory-comparison-list.js.map +1 -0
- package/dist-server/graphql/types/inventory-comparison/inventory-comparison.js +18 -0
- package/dist-server/graphql/types/inventory-comparison/inventory-comparison.js.map +1 -0
- package/dist-server/graphql/types/reports/index.js +6 -1
- package/dist-server/graphql/types/reports/index.js.map +1 -1
- package/dist-server/graphql/types/reports/product-label-report-list.js +14 -0
- package/dist-server/graphql/types/reports/product-label-report-list.js.map +1 -0
- package/dist-server/graphql/types/reports/product-label-report.js +16 -0
- package/dist-server/graphql/types/reports/product-label-report.js.map +1 -0
- package/dist-server/graphql/types/shipping-provider/index.js +10 -0
- package/dist-server/graphql/types/shipping-provider/index.js.map +1 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider-list.js +13 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider-list.js.map +1 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider.js +13 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider.js.map +1 -0
- package/package.json +65 -65
- package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts +4 -2
- package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.ts +75 -65
- package/server/graphql/resolvers/extra/add-release-good-products.ts +57 -15
- package/server/graphql/resolvers/index.ts +5 -1
- package/server/graphql/resolvers/inventory-comparison/index.ts +5 -0
- package/server/graphql/resolvers/inventory-comparison/inventory-comparison-list.ts +99 -0
- package/server/graphql/resolvers/reports/index.ts +3 -1
- package/server/graphql/resolvers/reports/product-label-report.ts +56 -0
- package/server/graphql/resolvers/shipping-provider/index.ts +5 -0
- package/server/graphql/resolvers/shipping-provider/shipping-providers.ts +20 -0
- package/server/graphql/types/custom/elccl/elccl-inventory-report.ts +1 -1
- package/server/graphql/types/index.ts +8 -2
- package/server/graphql/types/inventory-comparison/index.ts +11 -0
- package/server/graphql/types/inventory-comparison/inventory-comparison-list.ts +8 -0
- package/server/graphql/types/inventory-comparison/inventory-comparison.ts +12 -0
- package/server/graphql/types/reports/index.ts +6 -1
- package/server/graphql/types/reports/product-label-report-list.ts +8 -0
- package/server/graphql/types/reports/product-label-report.ts +10 -0
- package/server/graphql/types/shipping-provider/index.ts +8 -0
- package/server/graphql/types/shipping-provider/shipping-provider-list.ts +7 -0
- package/server/graphql/types/shipping-provider/shipping-provider.ts +7 -0
- package/things-factory.config.js +30 -0
- package/translations/en.json +91 -11
- package/translations/ko.json +109 -11
- package/translations/ms.json +111 -12
- package/translations/zh.json +123 -26
|
@@ -277,6 +277,12 @@ class ReceiveReturnOrderRequests extends connect(store)(localize(i18next)(PageVi
|
|
|
277
277
|
header: i18next.t('field.product'),
|
|
278
278
|
width: 150
|
|
279
279
|
},
|
|
280
|
+
{
|
|
281
|
+
type: 'string',
|
|
282
|
+
name: 'brand',
|
|
283
|
+
header: i18next.t('field.brand'),
|
|
284
|
+
width: 150
|
|
285
|
+
},
|
|
280
286
|
{
|
|
281
287
|
type: 'string',
|
|
282
288
|
name: 'packingType',
|
|
@@ -349,6 +355,7 @@ class ReceiveReturnOrderRequests extends connect(store)(localize(i18next)(PageVi
|
|
|
349
355
|
name
|
|
350
356
|
description
|
|
351
357
|
sku
|
|
358
|
+
brand
|
|
352
359
|
}
|
|
353
360
|
productName
|
|
354
361
|
packingType
|
|
@@ -381,7 +388,8 @@ class ReceiveReturnOrderRequests extends connect(store)(localize(i18next)(PageVi
|
|
|
381
388
|
records: orderInventories.map(orderInventory => {
|
|
382
389
|
return {
|
|
383
390
|
...orderInventory,
|
|
384
|
-
sku: orderInventory.product.sku
|
|
391
|
+
sku: orderInventory.product.sku,
|
|
392
|
+
brand: orderInventory.product.brand
|
|
385
393
|
}
|
|
386
394
|
})
|
|
387
395
|
}
|
|
@@ -227,11 +227,12 @@ class ReturnOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
227
227
|
]
|
|
228
228
|
if (this._status === ORDER_STATUS.PENDING.value) {
|
|
229
229
|
actions.push(
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
230
|
+
// Issue with deletion, temporarily disable this feature
|
|
231
|
+
// {
|
|
232
|
+
// title: i18next.t('button.delete'),
|
|
233
|
+
// action: this._deleteReturnOrder.bind(this),
|
|
234
|
+
// ...CommonButtonStyles.delete
|
|
235
|
+
// },
|
|
235
236
|
{
|
|
236
237
|
title: i18next.t('button.confirm'),
|
|
237
238
|
action: this._confirmReturnOrder.bind(this),
|
|
@@ -312,6 +313,12 @@ class ReturnOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
312
313
|
header: i18next.t('field.product'),
|
|
313
314
|
width: 150
|
|
314
315
|
},
|
|
316
|
+
{
|
|
317
|
+
type: 'string',
|
|
318
|
+
name: 'brand',
|
|
319
|
+
header: i18next.t('field.brand'),
|
|
320
|
+
width: 150
|
|
321
|
+
},
|
|
315
322
|
{
|
|
316
323
|
type: 'string',
|
|
317
324
|
name: 'packingType',
|
|
@@ -384,6 +391,7 @@ class ReturnOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
384
391
|
name
|
|
385
392
|
description
|
|
386
393
|
sku
|
|
394
|
+
brand
|
|
387
395
|
}
|
|
388
396
|
productName
|
|
389
397
|
packingType
|
|
@@ -417,7 +425,8 @@ class ReturnOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
417
425
|
records: orderInventories.map(orderInventory => {
|
|
418
426
|
return {
|
|
419
427
|
...orderInventory,
|
|
420
|
-
sku: orderInventory.product.sku
|
|
428
|
+
sku: orderInventory.product.sku,
|
|
429
|
+
brand: orderInventory.product.brand
|
|
421
430
|
}
|
|
422
431
|
})
|
|
423
432
|
}
|
|
@@ -154,6 +154,12 @@ class ReturnOrderInventoryPopup extends localize(i18next)(LitElement) {
|
|
|
154
154
|
header: i18next.t('field.product_name'),
|
|
155
155
|
width: 220
|
|
156
156
|
},
|
|
157
|
+
{
|
|
158
|
+
type: 'string',
|
|
159
|
+
name: 'productBrand',
|
|
160
|
+
header: i18next.t('field.brand'),
|
|
161
|
+
width: 120
|
|
162
|
+
},
|
|
157
163
|
{
|
|
158
164
|
type: 'code',
|
|
159
165
|
name: 'packingType',
|
|
@@ -233,6 +239,7 @@ class ReturnOrderInventoryPopup extends localize(i18next)(LitElement) {
|
|
|
233
239
|
id
|
|
234
240
|
}
|
|
235
241
|
productName
|
|
242
|
+
productBrand
|
|
236
243
|
packingType
|
|
237
244
|
packingSize
|
|
238
245
|
releaseUomValueWithUom
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import '@things-factory/biz-ui'
|
|
2
|
+
import '@things-factory/barcode-ui'
|
|
2
3
|
import '@things-factory/grist-ui'
|
|
3
4
|
import '@things-factory/product-ui'
|
|
5
|
+
import '../../order/reverse-kitting-order/reverse-kitting-pallet-label-popup'
|
|
4
6
|
|
|
5
7
|
import gql from 'graphql-tag'
|
|
6
8
|
import { css, html } from 'lit-element'
|
|
@@ -26,6 +28,12 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
|
|
|
26
28
|
flex-direction: column;
|
|
27
29
|
overflow-x: auto;
|
|
28
30
|
}
|
|
31
|
+
.form-container {
|
|
32
|
+
display: flex;
|
|
33
|
+
}
|
|
34
|
+
.form-container > form {
|
|
35
|
+
flex: 1;
|
|
36
|
+
}
|
|
29
37
|
.container {
|
|
30
38
|
flex: 1;
|
|
31
39
|
display: flex;
|
|
@@ -80,6 +88,7 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
|
|
|
80
88
|
inventoryGristConfig: Object,
|
|
81
89
|
inventoryData: Object,
|
|
82
90
|
_bizplaces: Object,
|
|
91
|
+
_bizplace: Object,
|
|
83
92
|
_bizplaceId: String,
|
|
84
93
|
_bizplaceName: String,
|
|
85
94
|
locationSortingRules: Object,
|
|
@@ -99,24 +108,28 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
|
|
|
99
108
|
|
|
100
109
|
render() {
|
|
101
110
|
return html`
|
|
102
|
-
<
|
|
103
|
-
<
|
|
104
|
-
<
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
111
|
+
<div class="form-container">
|
|
112
|
+
<form name="reverseKittingOrder" class="multi-column-form" autocomplete="off">
|
|
113
|
+
<fieldset>
|
|
114
|
+
<legend>${i18next.t('title.reverse_kitting_no')}: ${this._reverseKittingNo}</legend>
|
|
115
|
+
<label>${i18next.t('label.company')}</label>
|
|
116
|
+
<input type="hidden" name="bizplaceId" value="${this._bizplaceId}" />
|
|
117
|
+
<input
|
|
118
|
+
readonly
|
|
119
|
+
type="text"
|
|
120
|
+
name="bizplaceName"
|
|
121
|
+
value="${this._bizplaceName}"
|
|
122
|
+
@click="${this._openBizplacesSelector.bind(this)}"
|
|
123
|
+
/>
|
|
124
|
+
|
|
125
|
+
${!this._newOrder
|
|
126
|
+
? html`<label>${i18next.t('label.status')}</label><input readonly type="text" name="status" />`
|
|
127
|
+
: ''}
|
|
128
|
+
</fieldset>
|
|
129
|
+
</form>
|
|
130
|
+
|
|
131
|
+
${!this._newOrder ? html`<barcode-tag bcid="qrcode" .value=${this._reverseKittingNo}></barcode-tag>` : ''}
|
|
132
|
+
</div>
|
|
120
133
|
<div class="container">
|
|
121
134
|
<div class="grist">
|
|
122
135
|
<h2><mwc-icon>list_alt</mwc-icon>${i18next.t('title.target_products')}</h2>
|
|
@@ -188,12 +201,19 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
|
|
|
188
201
|
...CommonButtonStyles.activate
|
|
189
202
|
}
|
|
190
203
|
]
|
|
204
|
+
} else if (this._status === ORDER_STATUS.EXECUTING.value) {
|
|
205
|
+
actions.push({
|
|
206
|
+
title: i18next.t('button.lot_label_print'),
|
|
207
|
+
action: this._openLotLabelPrintPopup.bind(this),
|
|
208
|
+
...CommonButtonStyles.label
|
|
209
|
+
})
|
|
191
210
|
}
|
|
192
211
|
}
|
|
193
212
|
|
|
194
213
|
return {
|
|
195
214
|
title: i18next.t('title.reverse_kitting_order_detail'),
|
|
196
215
|
actions,
|
|
216
|
+
printable: { accept: ['preview'], content: this },
|
|
197
217
|
help: 'operato-wms/reverse-kitting-order/reverse-kitting-order-detail'
|
|
198
218
|
}
|
|
199
219
|
}
|
|
@@ -203,6 +223,8 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
|
|
|
203
223
|
if (this.active) {
|
|
204
224
|
if (changes.resourceId) {
|
|
205
225
|
this._reverseKittingNo = changes.resourceId
|
|
226
|
+
} else {
|
|
227
|
+
this._reverseKittingNo = 'new'
|
|
206
228
|
}
|
|
207
229
|
|
|
208
230
|
this._newOrder = this._reverseKittingNo == 'new' ? true : false
|
|
@@ -226,7 +248,7 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
|
|
|
226
248
|
}
|
|
227
249
|
|
|
228
250
|
_configureInventoryGrist() {
|
|
229
|
-
let editable = this._bizplaceId ? true : false
|
|
251
|
+
let editable = this._bizplaceId ? (this._newOrder ? true : false) : false
|
|
230
252
|
|
|
231
253
|
this.inventoryGristConfig = {
|
|
232
254
|
pagination: { infinite: true },
|
|
@@ -304,6 +326,7 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
|
|
|
304
326
|
},
|
|
305
327
|
width: 250
|
|
306
328
|
},
|
|
329
|
+
{ name: 'batchId', hidden: true },
|
|
307
330
|
{
|
|
308
331
|
type: 'string',
|
|
309
332
|
name: 'productSKU',
|
|
@@ -452,9 +475,11 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
|
|
|
452
475
|
if (!response.errors) {
|
|
453
476
|
const bizplaces = response.data.partnersBizplaces.items
|
|
454
477
|
if (bizplaces.length == 1) {
|
|
478
|
+
this._bizplace = bizplaces[0]
|
|
455
479
|
this._bizplaceId = bizplaces[0].id
|
|
456
480
|
this._bizplaceName = bizplaces[0].name
|
|
457
481
|
} else {
|
|
482
|
+
this._bizplace = null
|
|
458
483
|
this._bizplaceId = ''
|
|
459
484
|
this._bizplaceName = ''
|
|
460
485
|
}
|
|
@@ -480,7 +505,9 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
|
|
|
480
505
|
name
|
|
481
506
|
description
|
|
482
507
|
}
|
|
483
|
-
|
|
508
|
+
reverseKittingOrderInventories {
|
|
509
|
+
id
|
|
510
|
+
name
|
|
484
511
|
set
|
|
485
512
|
targetType
|
|
486
513
|
targetBatchId
|
|
@@ -531,13 +558,14 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
|
|
|
531
558
|
this._bizplaceName = reverseKittingOrder.bizplace.name
|
|
532
559
|
this._status = reverseKittingOrder.status
|
|
533
560
|
this.inventoryData = {
|
|
534
|
-
records: reverseKittingOrder.
|
|
561
|
+
records: reverseKittingOrder.reverseKittingOrderInventories.map(reverseKittingOI => {
|
|
535
562
|
return {
|
|
536
|
-
...
|
|
537
|
-
...
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
563
|
+
...reverseKittingOI,
|
|
564
|
+
...reverseKittingOI.inventory,
|
|
565
|
+
orderReverseKittingId: reverseKittingOI.id,
|
|
566
|
+
productSKU: reverseKittingOI.inventory.product.sku,
|
|
567
|
+
productName: reverseKittingOI.inventory.product.name,
|
|
568
|
+
productCombination: this.displayProductCombination(JSON.parse(reverseKittingOI.operationGuide))
|
|
541
569
|
}
|
|
542
570
|
})
|
|
543
571
|
}
|
|
@@ -776,12 +804,12 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
|
|
|
776
804
|
|
|
777
805
|
_getReverseKittingOrder() {
|
|
778
806
|
return {
|
|
779
|
-
orderReverseKittings: this.
|
|
807
|
+
orderReverseKittings: this._getReverseKittingOrderInventories(),
|
|
780
808
|
customerBizplaceId: this._bizplaceId
|
|
781
809
|
}
|
|
782
810
|
}
|
|
783
811
|
|
|
784
|
-
|
|
812
|
+
_getReverseKittingOrderInventories() {
|
|
785
813
|
if (
|
|
786
814
|
!this.inventoryGrist.dirtyData ||
|
|
787
815
|
!this.inventoryGrist.dirtyData.records ||
|
|
@@ -838,40 +866,77 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
|
|
|
838
866
|
)
|
|
839
867
|
}
|
|
840
868
|
|
|
869
|
+
_openLotLabelPrintPopup() {
|
|
870
|
+
const _pallets = {
|
|
871
|
+
records: this.inventoryData.records.map(record => {
|
|
872
|
+
const operationGuide = JSON.parse(record.operationGuide)
|
|
873
|
+
let qty = operationGuide.data.productCombinationSets?.length || 0
|
|
874
|
+
|
|
875
|
+
return {
|
|
876
|
+
id: record.orderReverseKittingId,
|
|
877
|
+
palletId: record.palletId,
|
|
878
|
+
batchId: record.batchId,
|
|
879
|
+
product: record.product,
|
|
880
|
+
qty,
|
|
881
|
+
printQty: qty,
|
|
882
|
+
packingType: record.packingType,
|
|
883
|
+
bizplace: this._bizplace
|
|
884
|
+
}
|
|
885
|
+
})
|
|
886
|
+
}
|
|
887
|
+
openPopup(
|
|
888
|
+
html` <reverse-kitting-pallet-label-popup .pallets="${_pallets}"></reverse-kitting-pallet-label-popup> `,
|
|
889
|
+
{
|
|
890
|
+
backdrop: true,
|
|
891
|
+
size: 'large',
|
|
892
|
+
title: i18next.t('title.lot_label')
|
|
893
|
+
}
|
|
894
|
+
)
|
|
895
|
+
}
|
|
896
|
+
|
|
841
897
|
_openProductCombinations(columns, data, column, record, rowIndex) {
|
|
842
|
-
if (
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
898
|
+
if (this._newOrder) {
|
|
899
|
+
if (record.inventory.product.id) {
|
|
900
|
+
openPopup(
|
|
901
|
+
html`
|
|
902
|
+
<product-combination-selection-popup
|
|
903
|
+
.productId="${record.inventory.product.id}"
|
|
904
|
+
.packingType="${record.packingType}"
|
|
905
|
+
.packingSize="${record.packingSize}"
|
|
906
|
+
.bizplaceId="${this._bizplaceId}"
|
|
907
|
+
@selected="${e => {
|
|
908
|
+
let operationGuide = { data: { ...e.detail } }
|
|
909
|
+
let productCombinationSets = operationGuide.data.productCombinationSets.map(item => {
|
|
910
|
+
return {
|
|
911
|
+
...item,
|
|
912
|
+
qty: item.qty * record.qty
|
|
913
|
+
}
|
|
914
|
+
})
|
|
915
|
+
operationGuide.data.productCombinationSets = productCombinationSets
|
|
916
|
+
|
|
917
|
+
this.inventoryGrist.dirtyData.records = this.inventoryGrist.dirtyData.records.map(item => {
|
|
918
|
+
if (item.id == record.id) {
|
|
919
|
+
item.operationGuide = operationGuide
|
|
920
|
+
item.productCombination = this.displayProductCombination(operationGuide)
|
|
921
|
+
}
|
|
858
922
|
|
|
859
|
-
|
|
860
|
-
|
|
923
|
+
return item
|
|
924
|
+
})
|
|
861
925
|
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
926
|
+
this.inventoryData = {
|
|
927
|
+
...this.inventoryData,
|
|
928
|
+
records: [...this.inventoryGrist.dirtyData.records]
|
|
929
|
+
}
|
|
930
|
+
}}"
|
|
931
|
+
></product-combination-selection-popup>
|
|
932
|
+
`,
|
|
933
|
+
{
|
|
934
|
+
backdrop: true,
|
|
935
|
+
size: 'large',
|
|
936
|
+
title: `${record.productSKU}`
|
|
937
|
+
}
|
|
938
|
+
)
|
|
939
|
+
}
|
|
875
940
|
}
|
|
876
941
|
}
|
|
877
942
|
|
|
@@ -122,12 +122,7 @@ class ReverseKittingOrderList extends localize(i18next)(PageView) {
|
|
|
122
122
|
icon: 'reorder',
|
|
123
123
|
handlers: {
|
|
124
124
|
click: (columns, data, column, record, rowIndex) => {
|
|
125
|
-
|
|
126
|
-
if (status === ORDER_STATUS.REJECTED.value) {
|
|
127
|
-
navigate(`rejected_vas_order/${record.name}`) // 1. move to rejected detail page
|
|
128
|
-
} else {
|
|
129
|
-
navigate(`reverse_kitting_order_detail/${record.name}`)
|
|
130
|
-
}
|
|
125
|
+
navigate(`reverse_kitting_order_detail/${record.name}`)
|
|
131
126
|
}
|
|
132
127
|
}
|
|
133
128
|
},
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import '@things-factory/grist-ui'
|
|
2
|
+
|
|
3
|
+
import gql from 'graphql-tag'
|
|
4
|
+
import { css, html, LitElement } from 'lit-element'
|
|
5
|
+
import { connect } from 'pwa-helpers/connect-mixin'
|
|
6
|
+
|
|
7
|
+
import { DirectPrinter } from '@things-factory/barcode-base'
|
|
8
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
9
|
+
import { client, store } from '@things-factory/shell'
|
|
10
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
11
|
+
|
|
12
|
+
import { PALLET_LABEL_SETTING_KEY } from '../../constants'
|
|
13
|
+
|
|
14
|
+
class ReverseKittingPalletLabelPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
15
|
+
static get properties() {
|
|
16
|
+
return {
|
|
17
|
+
config: Object,
|
|
18
|
+
data: Object,
|
|
19
|
+
pallets: Object,
|
|
20
|
+
_palletLabel: Object
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static get styles() {
|
|
25
|
+
return [
|
|
26
|
+
css`
|
|
27
|
+
:host {
|
|
28
|
+
padding: 10px;
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
overflow-x: overlay;
|
|
32
|
+
background-color: var(--main-section-background-color);
|
|
33
|
+
}
|
|
34
|
+
.grist {
|
|
35
|
+
background-color: var(--main-section-background-color);
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
flex: 1;
|
|
39
|
+
overflow-y: auto;
|
|
40
|
+
}
|
|
41
|
+
data-grist {
|
|
42
|
+
overflow-y: hidden;
|
|
43
|
+
flex: 1;
|
|
44
|
+
}
|
|
45
|
+
.button-container {
|
|
46
|
+
padding: var(--button-container-padding);
|
|
47
|
+
margin: var(--button-container-margin);
|
|
48
|
+
text-align: var(--button-container-align);
|
|
49
|
+
background-color: var(--button-container-background);
|
|
50
|
+
height: var(--button-container-height);
|
|
51
|
+
}
|
|
52
|
+
`
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
firstUpdated() {
|
|
57
|
+
this.config = {
|
|
58
|
+
pagination: { infinite: true },
|
|
59
|
+
rows: { selectable: { multiple: true }, appendable: false },
|
|
60
|
+
list: { fields: ['batchId', 'palletQty', 'printQty'] },
|
|
61
|
+
columns: [
|
|
62
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
63
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
64
|
+
{
|
|
65
|
+
type: 'string',
|
|
66
|
+
name: 'batchId',
|
|
67
|
+
header: i18next.t('field.batch_id'),
|
|
68
|
+
width: 150
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: 'object',
|
|
72
|
+
name: 'product',
|
|
73
|
+
header: i18next.t('field.product'),
|
|
74
|
+
width: 250
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: 'integer',
|
|
78
|
+
name: 'qty',
|
|
79
|
+
header: i18next.t('field.qty'),
|
|
80
|
+
width: 80
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
type: 'integer',
|
|
84
|
+
name: 'printQty',
|
|
85
|
+
header: i18next.t('field.print_qty'),
|
|
86
|
+
record: { editable: true },
|
|
87
|
+
width: 80
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
get dataGrist() {
|
|
94
|
+
return this.shadowRoot.querySelector('data-grist')
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
render() {
|
|
98
|
+
return html`
|
|
99
|
+
<div class="grist">
|
|
100
|
+
<data-grist
|
|
101
|
+
id="grist"
|
|
102
|
+
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
103
|
+
.config=${this.config}
|
|
104
|
+
.data="${this.data}"
|
|
105
|
+
></data-grist>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<div class="button-container">
|
|
109
|
+
<mwc-button raised @click="${this._printLabel.bind(this)}" label="${i18next.t('button.print')}"></mwc-button>
|
|
110
|
+
</div>
|
|
111
|
+
`
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
updated(changeProps) {
|
|
115
|
+
if (changeProps.has('pallets')) {
|
|
116
|
+
if (this.pallets && this.pallets.records && this.pallets.records.length) {
|
|
117
|
+
this.data = {
|
|
118
|
+
records: this.pallets.records.map(record => {
|
|
119
|
+
return {
|
|
120
|
+
...record,
|
|
121
|
+
startSeq: 1
|
|
122
|
+
}
|
|
123
|
+
})
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
async _printLabel() {
|
|
130
|
+
try {
|
|
131
|
+
let labelId = this._palletLabel && this._palletLabel.id
|
|
132
|
+
let dateStr = new Date().toJSON().slice(0, 10).replace(/-/g, '/')
|
|
133
|
+
let _targetRows = this._validate()
|
|
134
|
+
const palletRuleType = 'vas_pallet_id' // pallet id rule type
|
|
135
|
+
const targets = _targetRows.map(target => {
|
|
136
|
+
return {
|
|
137
|
+
id: target.id,
|
|
138
|
+
printQty: target.printQty
|
|
139
|
+
}
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
const response = await client.query({
|
|
143
|
+
query: gql`
|
|
144
|
+
query generateReverseKittingLotId($targets: [LotInfo], $type: String!) {
|
|
145
|
+
generateReverseKittingLotId(targets: $targets, type: $type) {
|
|
146
|
+
product {
|
|
147
|
+
sku
|
|
148
|
+
name
|
|
149
|
+
type
|
|
150
|
+
description
|
|
151
|
+
movement
|
|
152
|
+
auxUnit1
|
|
153
|
+
auxValue1
|
|
154
|
+
}
|
|
155
|
+
bizplace {
|
|
156
|
+
name
|
|
157
|
+
}
|
|
158
|
+
batchId
|
|
159
|
+
batchIdRef
|
|
160
|
+
packingType
|
|
161
|
+
palletId
|
|
162
|
+
remark
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
`,
|
|
166
|
+
variables: { targets, type: palletRuleType }
|
|
167
|
+
})
|
|
168
|
+
|
|
169
|
+
if (!response.errors) {
|
|
170
|
+
const results = response.data.generateReverseKittingLotId
|
|
171
|
+
|
|
172
|
+
for (let i = 0; i < results.length; i++) {
|
|
173
|
+
let searchParams = new URLSearchParams()
|
|
174
|
+
|
|
175
|
+
searchParams.append('pallet', results[i].palletId)
|
|
176
|
+
searchParams.append('batch', results[i].batchId)
|
|
177
|
+
searchParams.append('product', results[i].product?.name)
|
|
178
|
+
searchParams.append('sku', results[i].product?.sku)
|
|
179
|
+
searchParams.append('auxUnit1', results[i].product?.auxUnit1)
|
|
180
|
+
searchParams.append('auxValue1', results[i].product?.auxValue1)
|
|
181
|
+
searchParams.append('type', results[i].product?.type)
|
|
182
|
+
searchParams.append('description', results[i].product?.description)
|
|
183
|
+
searchParams.append('packing', results[i].packingType)
|
|
184
|
+
searchParams.append('customer', results[i].bizplace?.name)
|
|
185
|
+
searchParams.append('date', dateStr)
|
|
186
|
+
searchParams.append('remark', results[i].remark)
|
|
187
|
+
searchParams.append('batchRef', results[i].batchIdRef)
|
|
188
|
+
searchParams.append('expirationDate', '')
|
|
189
|
+
try {
|
|
190
|
+
const response = await fetch(`label-command/${labelId}?${searchParams.toString()}`, {
|
|
191
|
+
method: 'GET'
|
|
192
|
+
})
|
|
193
|
+
|
|
194
|
+
if (response.status !== 200) {
|
|
195
|
+
throw `Error : Can't get label command from server (response: ${response.status})`
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
let command = await response.text()
|
|
199
|
+
|
|
200
|
+
if (!this.printer) {
|
|
201
|
+
this.printer = new DirectPrinter()
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
await this.printer.print(command)
|
|
205
|
+
} catch (ex) {
|
|
206
|
+
delete this.printer
|
|
207
|
+
throw ex
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
} catch (e) {
|
|
212
|
+
this._showToast(e)
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
_validate() {
|
|
217
|
+
let _targetRows = this.dataGrist.selected.length > 0 ? this.dataGrist.selected : this.dataGrist.dirtyData.records
|
|
218
|
+
if (!_targetRows.every(row => row.printQty)) throw new Error(i18next.t('text.print_qty_is_empty'))
|
|
219
|
+
return _targetRows
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
stateChanged(state) {
|
|
223
|
+
let palletLabelSetting = state.dashboard[PALLET_LABEL_SETTING_KEY]
|
|
224
|
+
this._palletLabel = (palletLabelSetting && palletLabelSetting.board) || {}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
_showToast({ type, message }) {
|
|
228
|
+
document.dispatchEvent(
|
|
229
|
+
new CustomEvent('notify', {
|
|
230
|
+
detail: {
|
|
231
|
+
type,
|
|
232
|
+
message
|
|
233
|
+
}
|
|
234
|
+
})
|
|
235
|
+
)
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
window.customElements.define('reverse-kitting-pallet-label-popup', ReverseKittingPalletLabelPopup)
|