@things-factory/operato-wms 4.1.38 → 4.2.0
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/.eslintrc.json +11 -0
- package/client/pages/constants/index.js +1 -0
- package/client/pages/constants/inventory-item-change.js +10 -0
- package/client/pages/constants/order.js +5 -0
- package/client/pages/constants/picking-strategy.js +4 -0
- package/client/pages/constants/setting.js +1 -0
- package/client/pages/inbound/serial-number-list-popup.js +0 -1
- package/client/pages/inventory/inventory-adjustment-approval.js +34 -3
- package/client/pages/inventory/inventory-adjustment.js +144 -5
- package/client/pages/inventory/serial-number-list-popup.js +468 -0
- package/client/pages/master/pallet-list.js +24 -0
- package/client/pages/order/arrival-notice/edit-product-popup.js +13 -0
- package/client/pages/order/release-order/b2b/b2b-order-list.js +24 -1
- package/client/pages/order/release-order/batch-picking-popup.js +8 -0
- package/client/pages/outbound/inventory-assign-popup.js +3 -24
- package/client/pages/outbound/inventory-auto-assign-popup.js +25 -50
- package/client/pages/outbound/loading-product.js +3 -3
- package/client/pages/outbound/merged-outbound-worksheet.js +148 -3
- package/client/pages/outbound/packing-product.js +109 -9
- package/client/pages/outbound/picking-product.js +21 -8
- package/client/pages/outbound/picking-replacement-popup.js +5 -0
- package/client/pages/outbound/return-pallet-check-popup.js +7 -1
- package/client/pages/outbound/route-label-popup.js +464 -0
- package/client/pages/outbound/select-operator-popup.js +3 -3
- package/client/pages/outbound/serial-number-popup.js +55 -26
- package/client/pages/outbound/single-outbound-worksheet.js +154 -5
- package/client/pages/outbound/sorting-product.js +125 -34
- package/client/pages/outbound/worksheet-batch-picking.js +13 -17
- package/client/pages/outbound/worksheet-picking.js +4 -8
- package/cypress/fixtures/globals.json +3 -0
- package/cypress/fixtures/master-data/location.json +31 -0
- package/cypress/fixtures/master-data/pallet.json +129 -0
- package/cypress/fixtures/master-data/palletImport.xlsx +0 -0
- package/cypress/fixtures/master-data/transport-driver.json +22 -0
- package/cypress/fixtures/master-data/transport-vehicle.json +24 -0
- package/cypress/fixtures/master-data/transportDriverDeletedImport.xlsx +0 -0
- package/cypress/fixtures/master-data/transportDriverImport.xlsx +0 -0
- package/cypress/fixtures/master-data/transportVehicleDeletedImport.xlsx +0 -0
- package/cypress/fixtures/master-data/transportVehicleImport.xlsx +0 -0
- package/cypress/fixtures/master-data/transportVehicleNameSizeImport.xlsx +0 -0
- package/cypress/fixtures/master-data/transportVehicleNameStatusImport.xlsx +0 -0
- package/cypress/fixtures/master-data/warehouse.json +20 -0
- package/cypress/fixtures/master-data/warehouseImport.xlsx +0 -0
- package/cypress/integration/master-data/location.spec.js +31 -0
- package/cypress/integration/master-data/pallet.spec.js +176 -0
- package/cypress/integration/master-data/transport-driver.spec.js +131 -0
- package/cypress/integration/master-data/transport-vehicle.spec.js +165 -0
- package/cypress/integration/master-data/warehouse.spec.js +135 -0
- package/cypress/plugins/index.js +22 -0
- package/cypress/support/commands.js +425 -0
- package/cypress/support/index.js +31 -0
- package/cypress.json +9 -0
- package/dist-server/graphql/resolvers/board-setting/board-settings.js +2 -1
- package/dist-server/graphql/resolvers/board-setting/board-settings.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js +7 -10
- package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js.map +1 -1
- package/dist-server/opa-app-setting-constants.js +2 -1
- package/dist-server/opa-app-setting-constants.js.map +1 -1
- package/helps/release-note.ko.md +0 -2
- package/helps/release-note.md +0 -2
- package/helps/release-note.ms.md +0 -2
- package/helps/release-note.zh.md +0 -2
- package/package.json +61 -51
- package/server/graphql/resolvers/board-setting/board-settings.ts +4 -2
- package/server/graphql/resolvers/dashboard/outbound-order-by-status.ts +7 -10
- package/server/opa-app-setting-constants.ts +2 -1
- package/translations/en.json +15 -4
- package/translations/ko.json +12 -2
- package/translations/ms.json +11 -2
- package/translations/zh.json +11 -2
|
@@ -9,7 +9,7 @@ import { i18next, localize } from '@things-factory/i18n-base'
|
|
|
9
9
|
import { client, CustomAlert } from '@things-factory/shell'
|
|
10
10
|
import { isMobileDevice } from '@things-factory/utils'
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import { WORKSHEET_TYPE } from '../constants'
|
|
13
13
|
|
|
14
14
|
class InventoryAutoAssignPopup extends localize(i18next)(LitElement) {
|
|
15
15
|
static get properties() {
|
|
@@ -58,24 +58,6 @@ class InventoryAutoAssignPopup extends localize(i18next)(LitElement) {
|
|
|
58
58
|
|
|
59
59
|
render() {
|
|
60
60
|
return html`
|
|
61
|
-
<form id="input-form" class="multi-column-form">
|
|
62
|
-
<fieldset>
|
|
63
|
-
<legend>${i18next.t('title.picking_strategy')}</legend>
|
|
64
|
-
${PICKING_STRATEGY.map(
|
|
65
|
-
(strategy, idx) => html`
|
|
66
|
-
<input
|
|
67
|
-
id="picking-strategy-${idx}"
|
|
68
|
-
type="radio"
|
|
69
|
-
name="pickingStrategy"
|
|
70
|
-
value="${strategy.value}"
|
|
71
|
-
?checked="${idx === 0}"
|
|
72
|
-
/>
|
|
73
|
-
<label for="picking-strategy-${idx}">${i18next.t(strategy.name)}</label>
|
|
74
|
-
`
|
|
75
|
-
)}
|
|
76
|
-
</fieldset>
|
|
77
|
-
</form>
|
|
78
|
-
|
|
79
61
|
<div class="grist">
|
|
80
62
|
<data-grist
|
|
81
63
|
id="grist"
|
|
@@ -95,11 +77,6 @@ class InventoryAutoAssignPopup extends localize(i18next)(LitElement) {
|
|
|
95
77
|
`
|
|
96
78
|
}
|
|
97
79
|
|
|
98
|
-
get selectedStrategy() {
|
|
99
|
-
return Array.from(this.shadowRoot.querySelectorAll('input[name=pickingStrategy]')).find(input => input.checked)
|
|
100
|
-
.value
|
|
101
|
-
}
|
|
102
|
-
|
|
103
80
|
get grist() {
|
|
104
81
|
return this.shadowRoot.querySelector('data-grist')
|
|
105
82
|
}
|
|
@@ -207,11 +184,11 @@ class InventoryAutoAssignPopup extends localize(i18next)(LitElement) {
|
|
|
207
184
|
//// Note: Picking and Batch picking has been moved to server side processing.
|
|
208
185
|
switch (this.worksheetType) {
|
|
209
186
|
case WORKSHEET_TYPE.PICKING.value:
|
|
210
|
-
await this._pickingAssignItem(this.worksheetNo, bizplaceId[0], selectedItems
|
|
187
|
+
await this._pickingAssignItem(this.worksheetNo, bizplaceId[0], selectedItems)
|
|
211
188
|
break
|
|
212
189
|
|
|
213
190
|
case WORKSHEET_TYPE.BATCH_PICKING.value:
|
|
214
|
-
await this._batchPickingAssignItem(this.worksheetId, bizplaceId[0], selectedItems
|
|
191
|
+
await this._batchPickingAssignItem(this.worksheetId, bizplaceId[0], selectedItems)
|
|
215
192
|
break
|
|
216
193
|
}
|
|
217
194
|
|
|
@@ -228,19 +205,17 @@ class InventoryAutoAssignPopup extends localize(i18next)(LitElement) {
|
|
|
228
205
|
}
|
|
229
206
|
}
|
|
230
207
|
|
|
231
|
-
async _pickingAssignItem(worksheetNo, bizplaceId, selectedItems
|
|
208
|
+
async _pickingAssignItem(worksheetNo, bizplaceId, selectedItems) {
|
|
232
209
|
await client.mutate({
|
|
233
210
|
mutation: gql`
|
|
234
211
|
mutation generatePickingWorksheetDetails(
|
|
235
212
|
$bizplaceId: String!
|
|
236
213
|
$selectedItems: [OrderInventoryPatch]!
|
|
237
|
-
$pickingStrategy: String!
|
|
238
214
|
$worksheetNo: String!
|
|
239
215
|
) {
|
|
240
216
|
generatePickingWorksheetDetails(
|
|
241
217
|
bizplaceId: $bizplaceId
|
|
242
218
|
selectedItems: $selectedItems
|
|
243
|
-
pickingStrategy: $pickingStrategy
|
|
244
219
|
worksheetNo: $worksheetNo
|
|
245
220
|
)
|
|
246
221
|
}
|
|
@@ -256,29 +231,15 @@ class InventoryAutoAssignPopup extends localize(i18next)(LitElement) {
|
|
|
256
231
|
productId: item.product.id,
|
|
257
232
|
uom: item.uom,
|
|
258
233
|
releaseQty: item.releaseQty,
|
|
259
|
-
releaseUomValue: item.releaseUomValue
|
|
234
|
+
releaseUomValue: item.releaseUomValue,
|
|
235
|
+
pickingStrategy: item.product.pickingStrategy
|
|
260
236
|
}
|
|
261
|
-
})
|
|
262
|
-
pickingStrategy
|
|
237
|
+
})
|
|
263
238
|
}
|
|
264
239
|
})
|
|
265
240
|
}
|
|
266
241
|
|
|
267
|
-
|
|
268
|
-
async _batchPickingAssignItem(worksheetId, bizplaceId, selectedItems, pickingStrategy) {
|
|
269
|
-
selectedItems = selectedItems.map(itm => {
|
|
270
|
-
return {
|
|
271
|
-
batchId: itm.batchId,
|
|
272
|
-
productId: itm.product.id,
|
|
273
|
-
packingType: itm.packingType,
|
|
274
|
-
packingSize: itm.packingSize,
|
|
275
|
-
uom: itm.uom,
|
|
276
|
-
releaseQty: itm.releaseQty,
|
|
277
|
-
releaseUomValue: itm.releaseUomValue,
|
|
278
|
-
extraJsonData: JSON.stringify(itm.extraJsonData)
|
|
279
|
-
}
|
|
280
|
-
})
|
|
281
|
-
|
|
242
|
+
async _batchPickingAssignItem(worksheetId, bizplaceId, selectedItems) {
|
|
282
243
|
try {
|
|
283
244
|
await client.mutate({
|
|
284
245
|
mutation: gql`
|
|
@@ -286,17 +247,31 @@ class InventoryAutoAssignPopup extends localize(i18next)(LitElement) {
|
|
|
286
247
|
$worksheetId: String!
|
|
287
248
|
$bizplaceId: String!
|
|
288
249
|
$selectedItems: [OrderInventoryPatch]!
|
|
289
|
-
$pickingStrategy: String!
|
|
290
250
|
) {
|
|
291
251
|
generateBatchPickingWorksheetDetailsByBulk(
|
|
292
252
|
worksheetId: $worksheetId
|
|
293
253
|
bizplaceId: $bizplaceId
|
|
294
254
|
selectedItems: $selectedItems
|
|
295
|
-
pickingStrategy: $pickingStrategy
|
|
296
255
|
)
|
|
297
256
|
}
|
|
298
257
|
`,
|
|
299
|
-
variables: {
|
|
258
|
+
variables: {
|
|
259
|
+
worksheetId,
|
|
260
|
+
bizplaceId,
|
|
261
|
+
selectedItems: selectedItems.map(itm => {
|
|
262
|
+
return {
|
|
263
|
+
batchId: itm.batchId,
|
|
264
|
+
productId: itm.product.id,
|
|
265
|
+
packingType: itm.packingType,
|
|
266
|
+
packingSize: itm.packingSize,
|
|
267
|
+
uom: itm.uom,
|
|
268
|
+
pickingStrategy: itm.product.pickingStrategy,
|
|
269
|
+
releaseQty: itm.releaseQty,
|
|
270
|
+
releaseUomValue: itm.releaseUomValue,
|
|
271
|
+
extraJsonData: JSON.stringify(itm.extraJsonData)
|
|
272
|
+
}
|
|
273
|
+
})
|
|
274
|
+
}
|
|
300
275
|
})
|
|
301
276
|
} catch (e) {
|
|
302
277
|
this._showToast(e)
|
|
@@ -183,7 +183,7 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
183
183
|
if (this.releaseGoodNoInput.value) {
|
|
184
184
|
this._clearView()
|
|
185
185
|
await this._fetchLoadingWorksheet(this.releaseGoodNoInput.value)
|
|
186
|
-
await this._fetchDeliveryOrders(this.
|
|
186
|
+
await this._fetchDeliveryOrders(this._releaseGoodNo)
|
|
187
187
|
if (!this._ownCollection) {
|
|
188
188
|
await this._fetchTransportVehicle()
|
|
189
189
|
}
|
|
@@ -655,7 +655,7 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
655
655
|
if (!response.errors) {
|
|
656
656
|
this._clearView()
|
|
657
657
|
await this._fetchLoadingWorksheet(this.releaseGoodNoInput.value)
|
|
658
|
-
await this._fetchDeliveryOrders(this.
|
|
658
|
+
await this._fetchDeliveryOrders(this._releaseGoodNo)
|
|
659
659
|
}
|
|
660
660
|
} catch (e) {
|
|
661
661
|
this._showToast(e)
|
|
@@ -701,7 +701,7 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
701
701
|
async _fetchTransportVehicle() {
|
|
702
702
|
const response = await client.query({
|
|
703
703
|
query: gql`
|
|
704
|
-
query($filters: [Filter!]) {
|
|
704
|
+
query transportVehicles($filters: [Filter!]) {
|
|
705
705
|
transportVehicles(filters: $filters) {
|
|
706
706
|
items {
|
|
707
707
|
id
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import '@things-factory/form-ui'
|
|
2
2
|
import '@things-factory/grist-ui'
|
|
3
|
+
import './route-label-popup'
|
|
4
|
+
import './select-operator-popup'
|
|
3
5
|
|
|
4
6
|
import gql from 'graphql-tag'
|
|
5
7
|
import { css, html } from 'lit-element'
|
|
@@ -7,8 +9,11 @@ import { css, html } from 'lit-element'
|
|
|
7
9
|
import { getCodeByName } from '@things-factory/code-base'
|
|
8
10
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
9
11
|
import { client, navigate, PageView } from '@things-factory/shell'
|
|
10
|
-
import { ScrollbarStyles } from '@things-factory/styles'
|
|
12
|
+
import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
|
|
11
13
|
import { isMobileDevice } from '@things-factory/utils'
|
|
14
|
+
import { openPopup } from '@things-factory/layout-base'
|
|
15
|
+
|
|
16
|
+
import { fetchSettingRule } from '../../fetch-setting-value'
|
|
12
17
|
|
|
13
18
|
import { WORKSHEET_TYPE } from '../constants'
|
|
14
19
|
|
|
@@ -36,7 +41,9 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
36
41
|
|
|
37
42
|
static get properties() {
|
|
38
43
|
return {
|
|
44
|
+
_partnersList: Array,
|
|
39
45
|
_searchFields: Array,
|
|
46
|
+
_routeLabelSetting: Boolean,
|
|
40
47
|
config: Object,
|
|
41
48
|
data: Object,
|
|
42
49
|
assignee: String,
|
|
@@ -57,13 +64,29 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
57
64
|
}
|
|
58
65
|
|
|
59
66
|
get context() {
|
|
67
|
+
var actions = []
|
|
68
|
+
if (this._routeLabelSetting) {
|
|
69
|
+
actions.push({
|
|
70
|
+
title: i18next.t('button.print_route_label'),
|
|
71
|
+
action: this._openPrintLabelPopup.bind(this),
|
|
72
|
+
...CommonButtonStyles.label
|
|
73
|
+
})
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
actions.push({
|
|
77
|
+
title: i18next.t('button.assign_picker'),
|
|
78
|
+
action: this._assignPicker.bind(this),
|
|
79
|
+
...CommonButtonStyles.activate
|
|
80
|
+
})
|
|
81
|
+
|
|
60
82
|
return {
|
|
61
83
|
title: i18next.t('title.merged_outbound_worksheet'),
|
|
62
84
|
exportable: {
|
|
63
85
|
name: i18next.t('title.merged_outbound_worksheet'),
|
|
64
86
|
data: this._exportableData.bind(this)
|
|
65
87
|
},
|
|
66
|
-
help: 'operato-wms/outbound/merged-outbound-worksheet'
|
|
88
|
+
help: 'operato-wms/outbound/merged-outbound-worksheet',
|
|
89
|
+
actions
|
|
67
90
|
}
|
|
68
91
|
}
|
|
69
92
|
|
|
@@ -164,10 +187,11 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
164
187
|
list: {
|
|
165
188
|
fields: ['name', 'bizplace', 'type', 'status', 'startedAt', 'endedAt']
|
|
166
189
|
},
|
|
167
|
-
rows: { appendable: false },
|
|
190
|
+
rows: { appendable: false, selectable: { multiple: true } },
|
|
168
191
|
pagination: { limit: 100, pages: [20, 50, 100, 200, 500] },
|
|
169
192
|
columns: [
|
|
170
193
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
194
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
171
195
|
{
|
|
172
196
|
type: 'gutter',
|
|
173
197
|
gutterName: 'button',
|
|
@@ -225,6 +249,14 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
225
249
|
sortable: true,
|
|
226
250
|
width: 100
|
|
227
251
|
},
|
|
252
|
+
{
|
|
253
|
+
type: 'object',
|
|
254
|
+
name: 'assignee',
|
|
255
|
+
header: i18next.t('field.assigned_picker'),
|
|
256
|
+
imex: { header: i18next.t('field.assigned_picker'), key: 'assignee.name', width: 20, type: 'string' },
|
|
257
|
+
sortable: true,
|
|
258
|
+
width: 100
|
|
259
|
+
},
|
|
228
260
|
{
|
|
229
261
|
type: 'datetime',
|
|
230
262
|
name: 'createdAt',
|
|
@@ -301,6 +333,10 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
301
333
|
id
|
|
302
334
|
name
|
|
303
335
|
taskNo
|
|
336
|
+
assignee {
|
|
337
|
+
id
|
|
338
|
+
name
|
|
339
|
+
}
|
|
304
340
|
bizplace {
|
|
305
341
|
id
|
|
306
342
|
name
|
|
@@ -315,6 +351,10 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
315
351
|
name
|
|
316
352
|
description
|
|
317
353
|
}
|
|
354
|
+
domain {
|
|
355
|
+
id
|
|
356
|
+
name
|
|
357
|
+
}
|
|
318
358
|
}
|
|
319
359
|
total
|
|
320
360
|
}
|
|
@@ -324,6 +364,9 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
324
364
|
})
|
|
325
365
|
|
|
326
366
|
if (!response.errors) {
|
|
367
|
+
let domain = response.data.worksheets.items[0]?.domain
|
|
368
|
+
this._routeLabelSetting = await fetchSettingRule('enable-print-route-label', domain.id)
|
|
369
|
+
this.updateContext()
|
|
327
370
|
return {
|
|
328
371
|
total: response.data.worksheets.total || 0,
|
|
329
372
|
records: response.data.worksheets.items || []
|
|
@@ -345,6 +388,10 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
345
388
|
id
|
|
346
389
|
name
|
|
347
390
|
description
|
|
391
|
+
domain {
|
|
392
|
+
id
|
|
393
|
+
name
|
|
394
|
+
}
|
|
348
395
|
}
|
|
349
396
|
}
|
|
350
397
|
}
|
|
@@ -353,10 +400,40 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
353
400
|
})
|
|
354
401
|
|
|
355
402
|
if (!response.errors) {
|
|
403
|
+
this._partnersList = response.data.partnersBizplaces
|
|
356
404
|
return response.data.partnersBizplaces.items
|
|
357
405
|
}
|
|
358
406
|
}
|
|
359
407
|
|
|
408
|
+
async _openPrintLabelPopup() {
|
|
409
|
+
try {
|
|
410
|
+
const bizplaceFilters = (await this.searchForm.getQueryFilters()).find(x => x.name === 'bizplaceId')
|
|
411
|
+
if (!bizplaceFilters) {
|
|
412
|
+
throw new Error(`Please select a customer to print route label.`)
|
|
413
|
+
} else {
|
|
414
|
+
let selectedPartnerDomain = this._partnersList.items.find(itm => itm.id == bizplaceFilters.value)
|
|
415
|
+
let partnerRouteLabelSetting = await fetchSettingRule(
|
|
416
|
+
'enable-print-route-label',
|
|
417
|
+
selectedPartnerDomain.domain.id
|
|
418
|
+
)
|
|
419
|
+
if (partnerRouteLabelSetting == false) throw new Error(`Partner setting not found`)
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
openPopup(
|
|
423
|
+
html`
|
|
424
|
+
<route-label-popup .partnerId="${bizplaceFilters.value}" .worksheetType="${'merged'}"></route-label-popup>
|
|
425
|
+
`,
|
|
426
|
+
{
|
|
427
|
+
backdrop: true,
|
|
428
|
+
size: 'large',
|
|
429
|
+
title: i18next.t('title.print_route_label')
|
|
430
|
+
}
|
|
431
|
+
)
|
|
432
|
+
} catch (e) {
|
|
433
|
+
this._showToast(e)
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
360
437
|
_modifyDateRange(e) {
|
|
361
438
|
const fromDate = e.currentTarget.value
|
|
362
439
|
|
|
@@ -404,6 +481,63 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
404
481
|
}
|
|
405
482
|
}
|
|
406
483
|
|
|
484
|
+
_assignPicker() {
|
|
485
|
+
try {
|
|
486
|
+
let selectedData = this.dataGrist.selected.filter(item => {
|
|
487
|
+
return item.status == 'DEACTIVATED'
|
|
488
|
+
})
|
|
489
|
+
|
|
490
|
+
if (selectedData.length <= 0) throw new Error('No available worksheet selected')
|
|
491
|
+
|
|
492
|
+
openPopup(
|
|
493
|
+
html`
|
|
494
|
+
<select-operator-popup
|
|
495
|
+
@updateOperator="${async e => {
|
|
496
|
+
let assignee = e.detail
|
|
497
|
+
|
|
498
|
+
const response = await client.mutate({
|
|
499
|
+
mutation: gql`
|
|
500
|
+
mutation assignPickingWorker($worksheetId: [String]!, $userId: String!) {
|
|
501
|
+
assignPickingWorker(worksheetId: $worksheetId, userId: $userId)
|
|
502
|
+
}
|
|
503
|
+
`,
|
|
504
|
+
variables: { worksheetId: selectedData.map(itm => itm.id), userId: assignee.id }
|
|
505
|
+
})
|
|
506
|
+
|
|
507
|
+
if (!response.errors) {
|
|
508
|
+
this.dataGrist.fetch()
|
|
509
|
+
return this._showToast({ message: i18next.t('text.updated_successfully') })
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
if (this.activatable) {
|
|
513
|
+
if (this.orderNo) {
|
|
514
|
+
history.back()
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}}"
|
|
518
|
+
></select-operator-popup>
|
|
519
|
+
`,
|
|
520
|
+
{
|
|
521
|
+
backdrop: true,
|
|
522
|
+
size: 'medium',
|
|
523
|
+
title: 'select operator'
|
|
524
|
+
}
|
|
525
|
+
)
|
|
526
|
+
} catch (error) {
|
|
527
|
+
return this._showToast(error)
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
_showToast({ type, message }) {
|
|
531
|
+
document.dispatchEvent(
|
|
532
|
+
new CustomEvent('notify', {
|
|
533
|
+
detail: {
|
|
534
|
+
type,
|
|
535
|
+
message
|
|
536
|
+
}
|
|
537
|
+
})
|
|
538
|
+
)
|
|
539
|
+
}
|
|
540
|
+
|
|
407
541
|
_exportableData() {
|
|
408
542
|
let records = []
|
|
409
543
|
if (this.dataGrist.selected && this.dataGrist.selected.length > 0) {
|
|
@@ -440,6 +574,17 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
440
574
|
|
|
441
575
|
return { header: headerSetting, data: data }
|
|
442
576
|
}
|
|
577
|
+
|
|
578
|
+
_showToast({ type, message }) {
|
|
579
|
+
document.dispatchEvent(
|
|
580
|
+
new CustomEvent('notify', {
|
|
581
|
+
detail: {
|
|
582
|
+
type,
|
|
583
|
+
message
|
|
584
|
+
}
|
|
585
|
+
})
|
|
586
|
+
)
|
|
587
|
+
}
|
|
443
588
|
}
|
|
444
589
|
|
|
445
590
|
window.customElements.define('merged-outbound-worksheet', MergedOutboundWorksheet)
|