@things-factory/operato-wms 4.0.26 → 4.0.30
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/fetch-setting-value.js +10 -2
- package/client/pages/bulk-operation/bulk-operation.js +33 -10
- package/client/pages/components/vas-templates/vas-pallet-add-popup.js +12 -11
- package/client/pages/components/vas-templates/vas-relabel.js +57 -34
- package/client/pages/components/vas-templates/vas-repack-relabel.js +56 -36
- package/client/pages/components/vas-templates/vas-repack.js +45 -31
- package/client/pages/components/vas-templates/vas-repalletizing.js +58 -39
- package/client/pages/components/vas-templates/vas-unpack.js +38 -24
- package/client/pages/master/location-list.js +1 -0
- package/client/pages/master/print-location-label.js +131 -146
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +36 -44
- package/client/pages/order/arrival-notice/arrival-notice-list.js +2 -5
- package/client/pages/order/goods-received-note/received-note-detail.js +7 -6
- package/client/pages/order/release-order/b2b/b2b-order-list.js +1 -5
- package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +1 -1
- package/client/pages/order/release-order/batch-picking-popup.js +3 -2
- package/client/pages/order/release-order/release-extra-product-popup.js +7 -5
- package/client/pages/order/release-order/release-order-detail.js +30 -13
- package/client/pages/order/transport-order/delivery-note-popup.js +2 -2
- package/client/pages/outbound/packing-product.js +6 -0
- package/client/pages/outbound/packing-worksheet-list.js +64 -4
- package/client/pages/outbound/picking-product.js +10 -5
- package/client/pages/outbound/worksheet-batch-picking.js +1 -1
- package/client/pages/outbound/worksheet-loading.js +16 -14
- package/client/pages/outbound/worksheet-packing.js +15 -13
- package/client/pages/outbound/worksheet-picking.js +2 -2
- package/client/pages/report/custom-elccl/elccl-daily-collection-report.js +8 -9
- package/client/pages/report/custom-elccl/elccl-daily-order-inventory-report.js +26 -25
- package/client/pages/report/custom-elccl/elccl-delivery-order-summary.js +10 -9
- package/client/pages/report/custom-elccl/elccl-inventory-pallet-detail-report.js +13 -8
- package/client/pages/report/custom-elccl/elccl-inventory-report.js +11 -10
- package/client/pages/report/inventory-pallet-report.js +13 -12
- package/client/pages/report/job-sheet-popup.js +9 -9
- package/client/pages/report/job-sheet-report.js +6 -6
- package/client/pages/system/location-sorting-rule.js +53 -46
- package/client/pages/vas/abstract-execute-vas.js +51 -35
- package/client/pages/vas/execute-pure-vas.js +63 -64
- package/client/pages/vas/execute-ref-vas.js +39 -41
- package/client/pages/vas/related-vas-list.js +7 -6
- package/client/pages/vas/target-inventory-assignment-popup.js +16 -14
- package/client/pages/vas/vas-pallet-label-popup.js +1 -1
- package/client/pages/vas/vas-worksheet-list.js +9 -8
- package/client/pages/vas/worksheet-ref-vas.js +7 -6
- package/client/pages/vas/worksheet-vas.js +16 -14
- package/package.json +65 -65
- package/translations/en.json +1 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +1 -0
- package/translations/zh.json +1 -0
|
@@ -173,6 +173,7 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
|
|
|
173
173
|
get context() {
|
|
174
174
|
var titleName = i18next.t('title.arrival_notice_detail')
|
|
175
175
|
this._vasExpanded = false
|
|
176
|
+
this._showAssignWarehouse = false
|
|
176
177
|
var actions = [
|
|
177
178
|
{
|
|
178
179
|
title: i18next.t('button.back'),
|
|
@@ -251,55 +252,46 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
|
|
|
251
252
|
action: this._assignBufferLocation.bind(this),
|
|
252
253
|
...CommonButtonStyles.warehouse
|
|
253
254
|
})
|
|
255
|
+
this._showAssignWarehouse = true
|
|
256
|
+
} else if (
|
|
257
|
+
this._status === ORDER_STATUS.PENDING_APPROVAL.value &&
|
|
258
|
+
this.productData.records.some(
|
|
259
|
+
product =>
|
|
260
|
+
product.status === ORDER_PRODUCT_STATUS.ADDED.value || product.status === ORDER_PRODUCT_STATUS.EDITED.value
|
|
261
|
+
)
|
|
262
|
+
) {
|
|
263
|
+
actions.push({
|
|
264
|
+
title: i18next.t('button.product_changes'),
|
|
265
|
+
action: this.openProductChangesPopup.bind(this),
|
|
266
|
+
...CommonButtonStyles.inspect
|
|
267
|
+
})
|
|
254
268
|
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
if (this._status === ORDER_STATUS.ARRIVED.value && this.isUserBelongsDomain) {
|
|
258
|
-
this._showAssignWarehouse = true
|
|
259
269
|
} else {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
action: this.openApproveProductPopup.bind(this),
|
|
274
|
-
...CommonButtonStyles.approve
|
|
275
|
-
})
|
|
276
|
-
}
|
|
270
|
+
if (
|
|
271
|
+
this._status === ORDER_STATUS.PENDING_APPROVAL.value &&
|
|
272
|
+
this.productData.records.some(
|
|
273
|
+
product =>
|
|
274
|
+
product.status === ORDER_PRODUCT_STATUS.ADDED.value || product.status === ORDER_PRODUCT_STATUS.EDITED.value
|
|
275
|
+
)
|
|
276
|
+
) {
|
|
277
|
+
actions.push({
|
|
278
|
+
title: i18next.t('button.inspect_changes'),
|
|
279
|
+
action: this.openApproveProductPopup.bind(this),
|
|
280
|
+
...CommonButtonStyles.approve
|
|
281
|
+
})
|
|
282
|
+
}
|
|
277
283
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
) {
|
|
286
|
-
actions.push({
|
|
287
|
-
title: i18next.t('button.product_changes'),
|
|
288
|
-
action: this.openProductChangesPopup.bind(this),
|
|
289
|
-
...CommonButtonStyles.inspect
|
|
290
|
-
})
|
|
284
|
+
if (this._status !== ORDER_STATUS.PENDING.value && this._status !== ORDER_STATUS.PENDING_APPROVAL.value) {
|
|
285
|
+
actions.push({
|
|
286
|
+
title: i18next.t('button.duplicate'),
|
|
287
|
+
action: () => window.open(`duplicate_arrival_notice/${this._ganNo}`),
|
|
288
|
+
...CommonButtonStyles.copy
|
|
289
|
+
})
|
|
290
|
+
}
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
-
if (
|
|
294
|
-
|
|
295
|
-
this._status !== ORDER_STATUS.PENDING.value &&
|
|
296
|
-
this._status !== ORDER_STATUS.PENDING_APPROVAL.value
|
|
297
|
-
) {
|
|
298
|
-
actions.push({
|
|
299
|
-
title: i18next.t('button.duplicate'),
|
|
300
|
-
action: () => window.open(`duplicate_arrival_notice/${this._ganNo}`),
|
|
301
|
-
...CommonButtonStyles.copy
|
|
302
|
-
})
|
|
293
|
+
if (this._status === ORDER_STATUS.REJECTED.value) {
|
|
294
|
+
titleName = i18next.t('title.rejected_arrival_notice_detail')
|
|
303
295
|
}
|
|
304
296
|
|
|
305
297
|
return {
|
|
@@ -234,11 +234,8 @@ class ArrivalNoticeList extends localize(i18next)(PageView) {
|
|
|
234
234
|
handlers: {
|
|
235
235
|
click: (columns, data, column, record, rowIndex) => {
|
|
236
236
|
const status = record.status
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
} else {
|
|
240
|
-
navigate(`arrival_notice_detail/${record.name}`)
|
|
241
|
-
}
|
|
237
|
+
|
|
238
|
+
navigate(`arrival_notice_detail/${record.name}`)
|
|
242
239
|
}
|
|
243
240
|
}
|
|
244
241
|
},
|
|
@@ -4,7 +4,7 @@ import { css, html } from 'lit-element'
|
|
|
4
4
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
5
|
import { client, navigate, PageView } from '@things-factory/shell'
|
|
6
6
|
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
7
|
-
import { getPathInfo
|
|
7
|
+
import { getPathInfo } from '@things-factory/utils'
|
|
8
8
|
|
|
9
9
|
class ReceivedNoteDetail extends localize(i18next)(PageView) {
|
|
10
10
|
static get properties() {
|
|
@@ -105,10 +105,8 @@ class ReceivedNoteDetail extends localize(i18next)(PageView) {
|
|
|
105
105
|
if (!this._grnNo) return
|
|
106
106
|
const response = await client.query({
|
|
107
107
|
query: gql`
|
|
108
|
-
query {
|
|
109
|
-
goodsReceivalNote(${
|
|
110
|
-
name: this._grnNo
|
|
111
|
-
})}) {
|
|
108
|
+
query goodsReceivalNote($name: String!) {
|
|
109
|
+
goodsReceivalNote(name: $name) {
|
|
112
110
|
id
|
|
113
111
|
name
|
|
114
112
|
status
|
|
@@ -118,7 +116,10 @@ class ReceivedNoteDetail extends localize(i18next)(PageView) {
|
|
|
118
116
|
}
|
|
119
117
|
}
|
|
120
118
|
}
|
|
121
|
-
|
|
119
|
+
`,
|
|
120
|
+
variables: {
|
|
121
|
+
name: this._grnNo
|
|
122
|
+
}
|
|
122
123
|
})
|
|
123
124
|
|
|
124
125
|
if (!response.errors) {
|
|
@@ -420,11 +420,7 @@ class B2bOrderList extends localize(i18next)(PageView) {
|
|
|
420
420
|
}
|
|
421
421
|
`,
|
|
422
422
|
variables: {
|
|
423
|
-
filters: [
|
|
424
|
-
...(await this.searchForm.getQueryFilters()),
|
|
425
|
-
{ name: 'type', operator: 'eq', value: 'b2b' },
|
|
426
|
-
{ name: 'status', operator: 'notin', value: '' }
|
|
427
|
-
],
|
|
423
|
+
filters: [...(await this.searchForm.getQueryFilters()), { name: 'type', operator: 'eq', value: 'b2b' }],
|
|
428
424
|
pagination: { page, limit },
|
|
429
425
|
sortings: sorters
|
|
430
426
|
}
|
|
@@ -217,7 +217,7 @@ class BatchGenerateSinglePickingWorksheetPopup extends localize(i18next)(LitElem
|
|
|
217
217
|
|
|
218
218
|
const response = await client.query({
|
|
219
219
|
query: gql`
|
|
220
|
-
query releaseGoodRequests($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
|
|
220
|
+
query releaseGoodRequests($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
221
221
|
releaseGoodRequests(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
222
222
|
items {
|
|
223
223
|
id
|
|
@@ -8,6 +8,7 @@ import { css, html, LitElement } from 'lit-element'
|
|
|
8
8
|
import gql from 'graphql-tag'
|
|
9
9
|
import { ScrollbarStyles } from '@things-factory/styles'
|
|
10
10
|
import { ORDER_STATUS, RO_TYPES } from '../../constants'
|
|
11
|
+
import { fetchSettingRule } from '../../../fetch-setting-value'
|
|
11
12
|
import '@things-factory/biz-ui'
|
|
12
13
|
|
|
13
14
|
class BatchPickingPopup extends localize(i18next)(LitElement) {
|
|
@@ -152,7 +153,6 @@ class BatchPickingPopup extends localize(i18next)(LitElement) {
|
|
|
152
153
|
name: 'type',
|
|
153
154
|
type: 'select',
|
|
154
155
|
options: Object.keys(RO_TYPES).map(map => {
|
|
155
|
-
debugger
|
|
156
156
|
return { name: RO_TYPES[map].name, value: RO_TYPES[map].value }
|
|
157
157
|
}),
|
|
158
158
|
props: { searchOper: 'eq' }
|
|
@@ -292,7 +292,8 @@ class BatchPickingPopup extends localize(i18next)(LitElement) {
|
|
|
292
292
|
{ name: 'bizplaceId', operator: 'eq', value: this.partnerBizplace.id }
|
|
293
293
|
]
|
|
294
294
|
|
|
295
|
-
|
|
295
|
+
let batchLimit = await fetchSettingRule('batch-picking-limit')
|
|
296
|
+
const pagination = { page, limit: batchLimit && !!parseInt(batchLimit) ? parseInt(batchLimit) : 20 }
|
|
296
297
|
const sortings = sorters
|
|
297
298
|
|
|
298
299
|
const response = await client.query({
|
|
@@ -120,7 +120,7 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
|
|
|
120
120
|
.mode="${isMobileDevice() ? 'LIST' : 'GRID'}"
|
|
121
121
|
.config="${this.existingInventoryGristConfig}"
|
|
122
122
|
.data="${this.existingInventoryData}"
|
|
123
|
-
@record-change="${this._onProductChangeHandler.bind(this)}"
|
|
123
|
+
@record-change="${this._onProductChangeHandler.bind(this, 'existing')}"
|
|
124
124
|
@field-change="${this._onExistingInventoryFieldChanged.bind(this)}"
|
|
125
125
|
></data-grist>
|
|
126
126
|
</div>
|
|
@@ -136,7 +136,7 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
|
|
|
136
136
|
.mode="${isMobileDevice() ? 'LIST' : 'GRID'}"
|
|
137
137
|
.config="${this.inventoryGristConfig}"
|
|
138
138
|
.data="${this.inventoryData}"
|
|
139
|
-
@record-change="${this._onProductChangeHandler.bind(this)}"
|
|
139
|
+
@record-change="${this._onProductChangeHandler.bind(this, 'new')}"
|
|
140
140
|
@field-change="${this._onInventoryFieldChanged.bind(this)}"
|
|
141
141
|
></data-grist>
|
|
142
142
|
</div>
|
|
@@ -700,15 +700,17 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
|
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
|
|
703
|
-
_onProductChangeHandler(event) {
|
|
703
|
+
_onProductChangeHandler(gristType, event) {
|
|
704
704
|
const changeRecord = event.detail.after
|
|
705
705
|
const beforeRecord = event.detail.before
|
|
706
706
|
const changedColumn = event.detail.column.name
|
|
707
707
|
var totalAvailableQty = 0
|
|
708
708
|
var totalAvailableUomValue = 0
|
|
709
709
|
|
|
710
|
-
|
|
711
|
-
|
|
710
|
+
if (gristType == 'existing') {
|
|
711
|
+
totalAvailableQty = beforeRecord.addableQty + beforeRecord.releaseQty
|
|
712
|
+
totalAvailableUomValue = beforeRecord.addableUomValue + beforeRecord.releaseUomValue
|
|
713
|
+
}
|
|
712
714
|
|
|
713
715
|
try {
|
|
714
716
|
if (changedColumn === 'releaseQty') {
|
|
@@ -195,6 +195,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
195
195
|
} else {
|
|
196
196
|
this._warehouseTransportInput.checked = true
|
|
197
197
|
this._warehouseTransport = true
|
|
198
|
+
this._exportInput = false
|
|
199
|
+
this._exportOption = false
|
|
198
200
|
}
|
|
199
201
|
this._validateTransport()
|
|
200
202
|
}}"
|
|
@@ -212,6 +214,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
212
214
|
if (this._warehouseTransport) {
|
|
213
215
|
this._ownTransportInput.checked = false
|
|
214
216
|
this._ownTransport = false
|
|
217
|
+
this._exportInput.checked = false
|
|
218
|
+
this._exportOption = false
|
|
215
219
|
} else {
|
|
216
220
|
this._ownTransportInput.checked = true
|
|
217
221
|
this._ownTransport = true
|
|
@@ -247,6 +251,16 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
247
251
|
?disabled="${!this?._editable}"
|
|
248
252
|
@change="${e => {
|
|
249
253
|
this._exportOption = e.currentTarget.checked
|
|
254
|
+
if (this._exportOption == true) {
|
|
255
|
+
this._warehouseTransportInput.checked = false
|
|
256
|
+
this._warehouseTransport = false
|
|
257
|
+
this._ownTransportInput.checked = true
|
|
258
|
+
this._ownTransport = true
|
|
259
|
+
}
|
|
260
|
+
if (this._warehouseTransport) {
|
|
261
|
+
this._exportInput.checked = false
|
|
262
|
+
this._exportOption = false
|
|
263
|
+
}
|
|
250
264
|
}}"
|
|
251
265
|
/>
|
|
252
266
|
<label for="exportOption">${i18next.t('label.export')}</label>
|
|
@@ -345,8 +359,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
345
359
|
.value="${this._containerArrivalDate}"
|
|
346
360
|
@change="${e => {
|
|
347
361
|
this._containerLeavingDateInput.setAttribute('min', e.currentTarget.value)
|
|
348
|
-
required
|
|
349
362
|
}}"
|
|
363
|
+
required
|
|
350
364
|
/>
|
|
351
365
|
|
|
352
366
|
<label>${i18next.t('label.container_leaving_date')}</label>
|
|
@@ -357,8 +371,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
357
371
|
.value="${this._containerLeavingDate}"
|
|
358
372
|
@change="${e => {
|
|
359
373
|
this._containerArrivalDateInput.setAttribute('max', e.currentTarget.value)
|
|
360
|
-
required
|
|
361
374
|
}}"
|
|
375
|
+
required
|
|
362
376
|
/>
|
|
363
377
|
|
|
364
378
|
<label>${i18next.t('label.ship_name')}</label>
|
|
@@ -415,10 +429,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
415
429
|
}
|
|
416
430
|
|
|
417
431
|
get context() {
|
|
418
|
-
this._vasExpanded = false
|
|
419
|
-
let userIsOfficeAdmin = this._userRoles
|
|
420
|
-
? this._userRoles.find(x => x.name?.toLowerCase() === 'office admin')
|
|
421
|
-
: false
|
|
432
|
+
this._vasExpanded = false ? this._userRoles.find(x => x.name?.toLowerCase() === 'office admin') : false
|
|
422
433
|
|
|
423
434
|
var actions = [
|
|
424
435
|
{
|
|
@@ -545,6 +556,10 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
545
556
|
return this.shadowRoot.querySelector('input[name=warehouseTransport]')
|
|
546
557
|
}
|
|
547
558
|
|
|
559
|
+
get _exportInput() {
|
|
560
|
+
return this.shadowRoot.querySelector('input[name=exportOption]')
|
|
561
|
+
}
|
|
562
|
+
|
|
548
563
|
get _containerArrivalDateInput() {
|
|
549
564
|
return this.shadowRoot.querySelector('input[name=containerArrivalDate]')
|
|
550
565
|
}
|
|
@@ -907,8 +922,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
907
922
|
status: inventoryInfo.status,
|
|
908
923
|
existing: true,
|
|
909
924
|
roundedUomValue: `${roundedUomValue} ${inventoryInfo.uom}`,
|
|
910
|
-
addableQty: inventoryInfo.qty - inventoryInfo.lockedQty,
|
|
911
|
-
addableUomValue: inventoryInfo.uomValue - inventoryInfo.lockedUomValue
|
|
925
|
+
addableQty: inventoryInfo.qty - inventoryInfo.lockedQty - inventoryInfo.releaseQty,
|
|
926
|
+
addableUomValue: inventoryInfo.uomValue - inventoryInfo.lockedUomValue - inventoryInfo.releaseUomValue
|
|
912
927
|
}
|
|
913
928
|
})
|
|
914
929
|
|
|
@@ -917,11 +932,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
917
932
|
this._releaseOrderId = releaseOrder.id
|
|
918
933
|
this.partnerBizplaceId = releaseOrder.bizplace.id
|
|
919
934
|
this._exportOption = releaseOrder.exportOption
|
|
920
|
-
if (this._exportOption) {
|
|
921
|
-
this._ownTransport = true
|
|
922
|
-
} else if (!this._exportOption) {
|
|
923
|
-
this._ownTransport = releaseOrder.ownTransport
|
|
924
|
-
}
|
|
925
935
|
|
|
926
936
|
this._courierOption = releaseOrder.courierOption
|
|
927
937
|
this._packingOption = releaseOrder.packingOption
|
|
@@ -942,6 +952,13 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
942
952
|
this._fillupSOForm(shippingOrder)
|
|
943
953
|
}
|
|
944
954
|
|
|
955
|
+
if (this._exportOption) {
|
|
956
|
+
this._ownTransport = true
|
|
957
|
+
this._ownTransportInput.checked = true
|
|
958
|
+
} else if (!this._exportOption) {
|
|
959
|
+
this._ownTransport = releaseOrder.ownTransport
|
|
960
|
+
}
|
|
961
|
+
|
|
945
962
|
if (releaseOrder && releaseOrder?.attachment) {
|
|
946
963
|
this._attachments = releaseOrder && releaseOrder.attachment
|
|
947
964
|
}
|
|
@@ -520,7 +520,7 @@ class DeliveryNotePopup extends localize(i18next)(LitElement) {
|
|
|
520
520
|
if (this.manualDo) {
|
|
521
521
|
response = await client.mutate({
|
|
522
522
|
mutation: gql`
|
|
523
|
-
mutation dispatchManualDeliveryOrder($orderInfo: DeliveryOrderPatch, $orderItems: [OrderInventoryPatch]) {
|
|
523
|
+
mutation dispatchManualDeliveryOrder($orderInfo: DeliveryOrderPatch, $orderItems: [OrderInventoryPatch!]) {
|
|
524
524
|
dispatchManualDeliveryOrder(orderInfo: $orderInfo, orderItems: $orderItems) {
|
|
525
525
|
id
|
|
526
526
|
name
|
|
@@ -537,7 +537,7 @@ class DeliveryNotePopup extends localize(i18next)(LitElement) {
|
|
|
537
537
|
} else {
|
|
538
538
|
response = await client.mutate({
|
|
539
539
|
mutation: gql`
|
|
540
|
-
mutation dispatchDeliveryOrder($orderInfo: DeliveryOrderPatch, $orderItems: [OrderInventoryPatch]) {
|
|
540
|
+
mutation dispatchDeliveryOrder($orderInfo: DeliveryOrderPatch, $orderItems: [OrderInventoryPatch!]) {
|
|
541
541
|
dispatchDeliveryOrder(orderInfo: $orderInfo, orderItems: $orderItems) {
|
|
542
542
|
id
|
|
543
543
|
name
|
|
@@ -537,6 +537,12 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
537
537
|
var decodedHTML = atob(orderDocInfo[0].file)
|
|
538
538
|
this._callPrintDialog(decodedHTML)
|
|
539
539
|
break
|
|
540
|
+
|
|
541
|
+
default:
|
|
542
|
+
let url = new URL(window.location)
|
|
543
|
+
|
|
544
|
+
convertedPdfUrl = `${url.origin}/proxy?url=${encodeURIComponent(orderDocInfo[0].airwayBill)}`
|
|
545
|
+
this._callPrintDialog(convertedPdfUrl)
|
|
540
546
|
}
|
|
541
547
|
}
|
|
542
548
|
}
|
|
@@ -6,8 +6,8 @@ import { css, html } from 'lit-element'
|
|
|
6
6
|
|
|
7
7
|
import { getCodeByName } from '@things-factory/code-base'
|
|
8
8
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
9
|
-
import { client, navigate, PageView } from '@things-factory/shell'
|
|
10
|
-
import { ScrollbarStyles } from '@things-factory/styles'
|
|
9
|
+
import { client, navigate, PageView, CustomAlert } from '@things-factory/shell'
|
|
10
|
+
import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
|
|
11
11
|
import { isMobileDevice } from '@things-factory/utils'
|
|
12
12
|
|
|
13
13
|
import { WORKSHEET_TYPE } from '../constants'
|
|
@@ -57,6 +57,13 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
|
|
|
57
57
|
get context() {
|
|
58
58
|
return {
|
|
59
59
|
title: i18next.t('title.packing_worksheet_list'),
|
|
60
|
+
actions: [
|
|
61
|
+
{
|
|
62
|
+
title: i18next.t('button.activate'),
|
|
63
|
+
action: this._activateWorksheet.bind(this),
|
|
64
|
+
...CommonButtonStyles.activate
|
|
65
|
+
}
|
|
66
|
+
],
|
|
60
67
|
exportable: {
|
|
61
68
|
name: i18next.t('title.packing_worksheet_list'),
|
|
62
69
|
data: this._exportableData.bind(this)
|
|
@@ -159,11 +166,11 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
|
|
|
159
166
|
list: {
|
|
160
167
|
fields: ['releaseGood', 'bizplace', 'type', 'releaseRefNo', 'status', 'startedAt', 'endedAt']
|
|
161
168
|
},
|
|
162
|
-
rows: { appendable: false },
|
|
169
|
+
rows: { appendable: false, selectable: { multiple: true } },
|
|
163
170
|
pagination: { limit: 100, pages: [20, 50, 100, 200, 500] },
|
|
164
171
|
columns: [
|
|
165
|
-
{ type: 'gutter', gutterName: 'dirty' },
|
|
166
172
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
173
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
167
174
|
{
|
|
168
175
|
type: 'gutter',
|
|
169
176
|
gutterName: 'button',
|
|
@@ -344,6 +351,48 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
|
|
|
344
351
|
}
|
|
345
352
|
}
|
|
346
353
|
|
|
354
|
+
async _activateWorksheet() {
|
|
355
|
+
try {
|
|
356
|
+
let selectedItem = this.dataGrist.selected.filter(i => i.status == 'DEACTIVATED')
|
|
357
|
+
if (selectedItem.length > 0) {
|
|
358
|
+
const result = await CustomAlert({
|
|
359
|
+
title: i18next.t('title.are_you_sure'),
|
|
360
|
+
text: i18next.t('text.activate_packing_worksheet'),
|
|
361
|
+
confirmButton: { text: i18next.t('button.confirm') },
|
|
362
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
363
|
+
})
|
|
364
|
+
|
|
365
|
+
if (!result.value) {
|
|
366
|
+
return
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
const response = await client.mutate({
|
|
370
|
+
mutation: gql`
|
|
371
|
+
mutation activatePacking($worksheetNo: [String!]!) {
|
|
372
|
+
activatePacking(worksheetNo: $worksheetNo) {
|
|
373
|
+
id
|
|
374
|
+
name
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
`,
|
|
378
|
+
variables: {
|
|
379
|
+
worksheetNo: selectedItem.map(itm => {
|
|
380
|
+
return itm.name
|
|
381
|
+
})
|
|
382
|
+
}
|
|
383
|
+
})
|
|
384
|
+
|
|
385
|
+
if (!response.errors) {
|
|
386
|
+
this._showToast({ message: i18next.t('text.worksheet_activated') })
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
} catch (e) {
|
|
390
|
+
this._showToast(e)
|
|
391
|
+
} finally {
|
|
392
|
+
this.dataGrist.fetch()
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
347
396
|
_modifyDateRange(e) {
|
|
348
397
|
const fromDate = e.currentTarget.value
|
|
349
398
|
|
|
@@ -409,6 +458,17 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
|
|
|
409
458
|
})
|
|
410
459
|
return { header: headerSetting, data: data }
|
|
411
460
|
}
|
|
461
|
+
|
|
462
|
+
_showToast({ type, message }) {
|
|
463
|
+
document.dispatchEvent(
|
|
464
|
+
new CustomEvent('notify', {
|
|
465
|
+
detail: {
|
|
466
|
+
type,
|
|
467
|
+
message
|
|
468
|
+
}
|
|
469
|
+
})
|
|
470
|
+
)
|
|
471
|
+
}
|
|
412
472
|
}
|
|
413
473
|
|
|
414
474
|
window.customElements.define('packing-worksheet-list', PackingWorksheetList)
|
|
@@ -591,6 +591,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
591
591
|
worksheetInfo {
|
|
592
592
|
releaseGood {
|
|
593
593
|
name
|
|
594
|
+
crossDocking
|
|
594
595
|
}
|
|
595
596
|
bizplaceName
|
|
596
597
|
partnerDomainId
|
|
@@ -598,9 +599,10 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
598
599
|
refNo2
|
|
599
600
|
refNo3
|
|
600
601
|
startedAt
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
602
|
+
containerNo
|
|
603
|
+
marketplaceStatus
|
|
604
|
+
shippingProvider
|
|
605
|
+
trackingNo
|
|
604
606
|
}
|
|
605
607
|
worksheetDetailInfos {
|
|
606
608
|
name
|
|
@@ -762,7 +764,9 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
762
764
|
|
|
763
765
|
if (this._selectedOrderInventory) {
|
|
764
766
|
const record = this.data.records.find(
|
|
765
|
-
record =>
|
|
767
|
+
record =>
|
|
768
|
+
record.product.sku === this._selectedOrderInventory.product.sku &&
|
|
769
|
+
record.palletId === this._selectedOrderInventory.palletId
|
|
766
770
|
)
|
|
767
771
|
|
|
768
772
|
this.updateSelectedItemProp(record)
|
|
@@ -772,7 +776,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
772
776
|
this.cartonInput.value = ''
|
|
773
777
|
this.productBarcodeInput.value = ''
|
|
774
778
|
}
|
|
775
|
-
this.inputForm
|
|
779
|
+
this.fillUpForm(this.inputForm, record)
|
|
776
780
|
} else {
|
|
777
781
|
this.fillUpForm(this.inputForm, record)
|
|
778
782
|
this.focusOnInput()
|
|
@@ -889,6 +893,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
889
893
|
|
|
890
894
|
async picking(e) {
|
|
891
895
|
if (e.keyCode === 13) {
|
|
896
|
+
e.preventDefault()
|
|
892
897
|
try {
|
|
893
898
|
await this.validatePicking()
|
|
894
899
|
|
|
@@ -4,7 +4,7 @@ import '@things-factory/grist-ui'
|
|
|
4
4
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
5
|
import { getRenderer } from '@things-factory/grist-ui'
|
|
6
6
|
import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
|
|
7
|
-
import {
|
|
7
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
8
8
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
9
9
|
import gql from 'graphql-tag'
|
|
10
10
|
import { css, html } from 'lit-element'
|
|
@@ -367,10 +367,8 @@ class WorksheetLoading extends localize(i18next)(PageView) {
|
|
|
367
367
|
if (!this._worksheetNo) return
|
|
368
368
|
const response = await client.query({
|
|
369
369
|
query: gql`
|
|
370
|
-
query {
|
|
371
|
-
worksheet(${
|
|
372
|
-
name: this._worksheetNo
|
|
373
|
-
})}) {
|
|
370
|
+
query worksheet($name: String!) {
|
|
371
|
+
worksheet(name: $name) {
|
|
374
372
|
status
|
|
375
373
|
releaseGood {
|
|
376
374
|
name
|
|
@@ -434,7 +432,10 @@ class WorksheetLoading extends localize(i18next)(PageView) {
|
|
|
434
432
|
}
|
|
435
433
|
}
|
|
436
434
|
}
|
|
437
|
-
|
|
435
|
+
`,
|
|
436
|
+
variables: {
|
|
437
|
+
name: this._worksheetNo
|
|
438
|
+
}
|
|
438
439
|
})
|
|
439
440
|
|
|
440
441
|
if (!response.errors) {
|
|
@@ -541,17 +542,18 @@ class WorksheetLoading extends localize(i18next)(PageView) {
|
|
|
541
542
|
return
|
|
542
543
|
}
|
|
543
544
|
|
|
544
|
-
const response = await client.
|
|
545
|
-
|
|
546
|
-
mutation {
|
|
547
|
-
activateLoading(${
|
|
548
|
-
worksheetNo: this._worksheetNo,
|
|
549
|
-
loadingWorksheetDetails: this._getLoadingWorksheetDetails()
|
|
550
|
-
})}) {
|
|
545
|
+
const response = await client.mutate({
|
|
546
|
+
mutation: gql`
|
|
547
|
+
mutation activateLoading($worksheetNo: String!, $loadingWorksheetDetails: [WorksheetDetailPatch]) {
|
|
548
|
+
activateLoading(worksheetNo: $worksheetNo, loadingWorksheetDetails: $loadingWorksheetDetails) {
|
|
551
549
|
name
|
|
552
550
|
}
|
|
553
551
|
}
|
|
554
|
-
|
|
552
|
+
`,
|
|
553
|
+
variables: {
|
|
554
|
+
worksheetNo: this._worksheetNo,
|
|
555
|
+
loadingWorksheetDetails: this._getLoadingWorksheetDetails()
|
|
556
|
+
}
|
|
555
557
|
})
|
|
556
558
|
if (!response.errors) {
|
|
557
559
|
this._showToast({ message: i18next.t('text.worksheet_activated') })
|
|
@@ -10,7 +10,7 @@ import { i18next, localize } from '@things-factory/i18n-base'
|
|
|
10
10
|
import { openPopup } from '@things-factory/layout-base'
|
|
11
11
|
import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
|
|
12
12
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
13
|
-
import {
|
|
13
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
14
14
|
|
|
15
15
|
import { MARKETPLACE_STATUS, WORKSHEET_STATUS } from '../constants'
|
|
16
16
|
|
|
@@ -298,10 +298,8 @@ class WorksheetPacking extends localize(i18next)(PageView) {
|
|
|
298
298
|
if (!this._worksheetNo) return
|
|
299
299
|
const response = await client.query({
|
|
300
300
|
query: gql`
|
|
301
|
-
query {
|
|
302
|
-
worksheet(${
|
|
303
|
-
name: this._worksheetNo
|
|
304
|
-
})}) {
|
|
301
|
+
query worksheet($name: String!) {
|
|
302
|
+
worksheet(name: $name) {
|
|
305
303
|
status
|
|
306
304
|
releaseGood {
|
|
307
305
|
name
|
|
@@ -384,7 +382,10 @@ class WorksheetPacking extends localize(i18next)(PageView) {
|
|
|
384
382
|
}
|
|
385
383
|
}
|
|
386
384
|
}
|
|
387
|
-
|
|
385
|
+
`,
|
|
386
|
+
variables: {
|
|
387
|
+
name: this._worksheetNo
|
|
388
|
+
}
|
|
388
389
|
})
|
|
389
390
|
|
|
390
391
|
if (!response.errors) {
|
|
@@ -486,16 +487,17 @@ class WorksheetPacking extends localize(i18next)(PageView) {
|
|
|
486
487
|
return
|
|
487
488
|
}
|
|
488
489
|
|
|
489
|
-
const response = await client.
|
|
490
|
-
|
|
491
|
-
mutation {
|
|
492
|
-
activatePacking(${
|
|
493
|
-
worksheetNo: this._worksheetNo
|
|
494
|
-
})}) {
|
|
490
|
+
const response = await client.mutate({
|
|
491
|
+
mutation: gql`
|
|
492
|
+
mutation activatePacking($worksheetNo: String!) {
|
|
493
|
+
activatePacking(worksheetNo: $worksheetNo) {
|
|
495
494
|
name
|
|
496
495
|
}
|
|
497
496
|
}
|
|
498
|
-
|
|
497
|
+
`,
|
|
498
|
+
variables: {
|
|
499
|
+
worksheetNo: this._worksheetNo
|
|
500
|
+
}
|
|
499
501
|
})
|
|
500
502
|
if (!response.errors) {
|
|
501
503
|
this._showToast({ message: i18next.t('text.worksheet_activated') })
|