@things-factory/operato-wms 4.1.40 → 4.1.41
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/outbound/merged-outbound-worksheet.js +80 -2
- package/client/pages/outbound/select-operator-popup.js +1 -1
- package/client/pages/outbound/worksheet-batch-picking.js +10 -2
- 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 +5 -5
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import '@things-factory/form-ui'
|
|
2
2
|
import '@things-factory/grist-ui'
|
|
3
|
+
import './select-operator-popup'
|
|
3
4
|
|
|
4
5
|
import gql from 'graphql-tag'
|
|
5
6
|
import { css, html } from 'lit-element'
|
|
7
|
+
import { openPopup } from '@things-factory/layout-base'
|
|
6
8
|
|
|
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'
|
|
12
14
|
|
|
13
15
|
import { WORKSHEET_TYPE } from '../constants'
|
|
@@ -63,6 +65,13 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
63
65
|
name: i18next.t('title.merged_outbound_worksheet'),
|
|
64
66
|
data: this._exportableData.bind(this)
|
|
65
67
|
},
|
|
68
|
+
actions: [
|
|
69
|
+
{
|
|
70
|
+
title: i18next.t('button.assign_picker'),
|
|
71
|
+
action: this._assignPicker.bind(this),
|
|
72
|
+
...CommonButtonStyles.activate
|
|
73
|
+
}
|
|
74
|
+
],
|
|
66
75
|
help: 'operato-wms/outbound/merged-outbound-worksheet'
|
|
67
76
|
}
|
|
68
77
|
}
|
|
@@ -164,10 +173,11 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
164
173
|
list: {
|
|
165
174
|
fields: ['name', 'bizplace', 'type', 'status', 'startedAt', 'endedAt']
|
|
166
175
|
},
|
|
167
|
-
rows: { appendable: false },
|
|
176
|
+
rows: { appendable: false, selectable: { multiple: true } },
|
|
168
177
|
pagination: { limit: 100, pages: [20, 50, 100, 200, 500] },
|
|
169
178
|
columns: [
|
|
170
179
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
180
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
171
181
|
{
|
|
172
182
|
type: 'gutter',
|
|
173
183
|
gutterName: 'button',
|
|
@@ -225,6 +235,14 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
225
235
|
sortable: true,
|
|
226
236
|
width: 100
|
|
227
237
|
},
|
|
238
|
+
{
|
|
239
|
+
type: 'object',
|
|
240
|
+
name: 'assignee',
|
|
241
|
+
header: i18next.t('field.assigned_picker'),
|
|
242
|
+
imex: { header: i18next.t('field.assigned_picker'), key: 'assignee.name', width: 20, type: 'string' },
|
|
243
|
+
sortable: true,
|
|
244
|
+
width: 100
|
|
245
|
+
},
|
|
228
246
|
{
|
|
229
247
|
type: 'datetime',
|
|
230
248
|
name: 'createdAt',
|
|
@@ -301,6 +319,10 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
301
319
|
id
|
|
302
320
|
name
|
|
303
321
|
taskNo
|
|
322
|
+
assignee{
|
|
323
|
+
id
|
|
324
|
+
name
|
|
325
|
+
}
|
|
304
326
|
bizplace {
|
|
305
327
|
id
|
|
306
328
|
name
|
|
@@ -404,6 +426,62 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
404
426
|
}
|
|
405
427
|
}
|
|
406
428
|
|
|
429
|
+
_assignPicker() {
|
|
430
|
+
try {
|
|
431
|
+
|
|
432
|
+
let selectedData = this.dataGrist.selected.filter((item)=>{return item.status =="DEACTIVATED"})
|
|
433
|
+
|
|
434
|
+
if(selectedData.length <= 0) throw new Error('No available worksheet selected')
|
|
435
|
+
|
|
436
|
+
openPopup(
|
|
437
|
+
html`
|
|
438
|
+
<select-operator-popup
|
|
439
|
+
@updateOperator="${async e => {
|
|
440
|
+
let assignee = e.detail
|
|
441
|
+
|
|
442
|
+
const response = await client.mutate({
|
|
443
|
+
mutation: gql`
|
|
444
|
+
mutation assignPickingWorker($worksheetId: [String]!, $userId: String!) {
|
|
445
|
+
assignPickingWorker(worksheetId: $worksheetId, userId: $userId)
|
|
446
|
+
}
|
|
447
|
+
`,
|
|
448
|
+
variables: { worksheetId: selectedData.map(itm => itm.id), userId: assignee.id }
|
|
449
|
+
})
|
|
450
|
+
|
|
451
|
+
if (!response.errors) {
|
|
452
|
+
this.dataGrist.fetch()
|
|
453
|
+
return this._showToast({ message: i18next.t('text.updated_successfully') })
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
if (this.activatable) {
|
|
457
|
+
if (this.orderNo) {
|
|
458
|
+
history.back()
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}}"
|
|
462
|
+
></select-operator-popup>
|
|
463
|
+
`,
|
|
464
|
+
{
|
|
465
|
+
backdrop: true,
|
|
466
|
+
size: 'medium',
|
|
467
|
+
title: 'select operator'
|
|
468
|
+
}
|
|
469
|
+
)
|
|
470
|
+
} catch (error) {
|
|
471
|
+
return this._showToast(error)
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
_showToast({ type, message }) {
|
|
475
|
+
document.dispatchEvent(
|
|
476
|
+
new CustomEvent('notify', {
|
|
477
|
+
detail: {
|
|
478
|
+
type,
|
|
479
|
+
message
|
|
480
|
+
}
|
|
481
|
+
})
|
|
482
|
+
)
|
|
483
|
+
}
|
|
484
|
+
|
|
407
485
|
_exportableData() {
|
|
408
486
|
let records = []
|
|
409
487
|
if (this.dataGrist.selected && this.dataGrist.selected.length > 0) {
|
|
@@ -120,7 +120,7 @@ class SelectOperatorPopup extends localize(i18next)(LitElement) {
|
|
|
120
120
|
|
|
121
121
|
const response = await client.query({
|
|
122
122
|
query: gql`
|
|
123
|
-
query(
|
|
123
|
+
query pickingAssignmentStatusByUsers($name: String, $email: String) {
|
|
124
124
|
pickingAssignmentStatusByUsers(name: $name, email: $email) {
|
|
125
125
|
user {
|
|
126
126
|
id
|
|
@@ -124,6 +124,14 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
|
|
|
124
124
|
})
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
if (this.activatable || this.assignable) {
|
|
128
|
+
actions.push({
|
|
129
|
+
title: i18next.t('button.select_operator'),
|
|
130
|
+
action: this._selectOperator.bind(this),
|
|
131
|
+
...CommonButtonStyles.add
|
|
132
|
+
})
|
|
133
|
+
}
|
|
134
|
+
|
|
127
135
|
if (this.activatable) {
|
|
128
136
|
actions.push({
|
|
129
137
|
title: i18next.t('button.activate'),
|
|
@@ -1206,11 +1214,11 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
|
|
|
1206
1214
|
async assignWorker() {
|
|
1207
1215
|
const response = await client.mutate({
|
|
1208
1216
|
mutation: gql`
|
|
1209
|
-
mutation
|
|
1217
|
+
mutation assignBatchPickingWorker($worksheetId: [String]!, $userId: String!) {
|
|
1210
1218
|
assignPickingWorker(worksheetId: $worksheetId, userId: $userId)
|
|
1211
1219
|
}
|
|
1212
1220
|
`,
|
|
1213
|
-
variables: { worksheetId: [this.
|
|
1221
|
+
variables: { worksheetId: [this._worksheetId], userId: this.assignee.id }
|
|
1214
1222
|
})
|
|
1215
1223
|
|
|
1216
1224
|
if (!response.errors) {
|
package/helps/release-note.ko.md
CHANGED
package/helps/release-note.md
CHANGED
package/helps/release-note.ms.md
CHANGED
package/helps/release-note.zh.md
CHANGED
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.41",
|
|
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.40",
|
|
87
87
|
"@things-factory/product-base": "^4.1.40",
|
|
88
88
|
"@things-factory/resource-ui": "^4.1.40",
|
|
89
|
-
"@things-factory/sales-ui": "^4.1.
|
|
89
|
+
"@things-factory/sales-ui": "^4.1.41",
|
|
90
90
|
"@things-factory/scene-data-transform": "^4.1.40",
|
|
91
91
|
"@things-factory/scene-excel": "^4.1.40",
|
|
92
92
|
"@things-factory/scene-firebase": "^4.1.40",
|
|
@@ -102,11 +102,11 @@
|
|
|
102
102
|
"@things-factory/system-ui": "^4.1.40",
|
|
103
103
|
"@things-factory/transport-base": "^4.1.40",
|
|
104
104
|
"@things-factory/tutorial-ui": "^4.1.40",
|
|
105
|
-
"@things-factory/warehouse-base": "^4.1.
|
|
106
|
-
"@things-factory/worksheet-base": "^4.1.
|
|
105
|
+
"@things-factory/warehouse-base": "^4.1.41",
|
|
106
|
+
"@things-factory/worksheet-base": "^4.1.41"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@things-factory/builder": "^4.1.40"
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "980df4303a7b3946466c531260634dd1e1a62e64"
|
|
112
112
|
}
|