@things-factory/operato-wms 5.0.0-alpha.38 → 5.0.0-alpha.40
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/inbound/unload-product.js +11 -7
- package/client/pages/inventory/inventory-adjustment.js +8 -8
- package/client/pages/inventory-check/inspecting-product.js +13 -7
- package/client/pages/order/goods-received-note/customer-received-note.js +3 -0
- package/client/pages/order/goods-received-note/received-note-detail.js +3 -0
- package/client/pages/order/release-order/release-extra-product-popup.js +15 -10
- package/client/pages/outbound/merged-outbound-worksheet.js +7 -1
- package/client/pages/outbound/picking-product.js +1 -1
- package/client/pages/outbound/select-operator-popup.js +86 -14
- package/client/pages/outbound/single-outbound-worksheet.js +22 -14
- package/client/pages/outbound/worksheet-batch-picking.js +1 -1
- package/client/pages/outbound/worksheet-picking.js +1 -1
- package/client/pages/report/costing-report.js +453 -0
- package/client/pages/report/inbound-order-details-report.js +14 -0
- package/client/pages/report/outbound-order-details-report.js +12 -0
- package/client/pages/vas/print-product-label.js +15 -6
- package/client/route.js +4 -0
- package/dist-server/graphql/resolvers/reports/costing-report.js +172 -0
- package/dist-server/graphql/resolvers/reports/costing-report.js.map +1 -0
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +2 -0
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js.map +1 -1
- 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/outbound-order-details-report.js +10 -3
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/types/reports/costing-report-list.js +14 -0
- package/dist-server/graphql/types/reports/costing-report-list.js.map +1 -0
- package/dist-server/graphql/types/reports/costing-report.js +19 -0
- package/dist-server/graphql/types/reports/costing-report.js.map +1 -0
- package/dist-server/graphql/types/reports/inbound-order-details-report.js +1 -0
- package/dist-server/graphql/types/reports/inbound-order-details-report.js.map +1 -1
- 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/outbound-order-details-report.js +1 -0
- package/dist-server/graphql/types/reports/outbound-order-details-report.js.map +1 -1
- package/helps/release-note.ko.md +22 -19
- package/helps/release-note.md +22 -19
- package/helps/release-note.ms.md +22 -19
- package/helps/release-note.zh.md +22 -19
- package/package.json +65 -65
- package/server/graphql/resolvers/reports/costing-report.ts +196 -0
- package/server/graphql/resolvers/reports/inbound-order-details-report.ts +2 -0
- package/server/graphql/resolvers/reports/index.ts +2 -0
- package/server/graphql/resolvers/reports/outbound-order-details-report.ts +10 -3
- package/server/graphql/types/reports/costing-report-list.ts +8 -0
- package/server/graphql/types/reports/costing-report.ts +13 -0
- package/server/graphql/types/reports/inbound-order-details-report.ts +1 -0
- package/server/graphql/types/reports/index.ts +7 -1
- package/server/graphql/types/reports/outbound-order-details-report.ts +1 -0
- package/things-factory.config.js +4 -0
- package/translations/en.json +8 -2
- package/translations/ko.json +2 -0
- package/translations/ms.json +2 -0
- package/translations/zh.json +2 -0
|
@@ -372,7 +372,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
372
372
|
this.productBarcodeInput.readOnly = false
|
|
373
373
|
this.productBarcodeInput.value = ''
|
|
374
374
|
}
|
|
375
|
-
if (
|
|
375
|
+
if (record.product?.isRequireSerialNumberScanningInbound) {
|
|
376
376
|
this.serialNumberInput.value = ''
|
|
377
377
|
}
|
|
378
378
|
this.cartonInput.value = ''
|
|
@@ -859,6 +859,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
859
859
|
this._showToast(e)
|
|
860
860
|
}
|
|
861
861
|
}
|
|
862
|
+
|
|
862
863
|
async _scanProductUnload() {
|
|
863
864
|
if (this._scanning) return this._showToast({ message: i18next.t('text.previous_scan_is_executing') })
|
|
864
865
|
this._scanning = true
|
|
@@ -1010,9 +1011,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1010
1011
|
}
|
|
1011
1012
|
} catch (e) {
|
|
1012
1013
|
this._showToast(e)
|
|
1013
|
-
} finally {
|
|
1014
|
-
this._scanning = false
|
|
1015
1014
|
}
|
|
1015
|
+
this._scanning = false
|
|
1016
1016
|
}
|
|
1017
1017
|
|
|
1018
1018
|
async fetchProductDetail(gtin, productId) {
|
|
@@ -1090,10 +1090,14 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1090
1090
|
if (this._selectedOrderProduct && this._selectedOrderProduct.product.sku !== product.sku)
|
|
1091
1091
|
this._selectedOrderProduct = null
|
|
1092
1092
|
|
|
1093
|
-
if (
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1093
|
+
if (!this._selectedOrderProduct) {
|
|
1094
|
+
if (foundOrderProducts?.length > 1) {
|
|
1095
|
+
this.selectOrderProduct(foundOrderProducts)
|
|
1096
|
+
} else if (foundOrderProducts?.length == 1) {
|
|
1097
|
+
this._selectedOrderProduct = foundOrderProducts[0]
|
|
1098
|
+
} else if (foundOrderProducts?.length == 0 && foundParentProducts?.length > 0) {
|
|
1099
|
+
this._selectedOrderProduct = foundParentProducts[0]
|
|
1100
|
+
}
|
|
1097
1101
|
}
|
|
1098
1102
|
}
|
|
1099
1103
|
} catch (e) {
|
|
@@ -103,7 +103,6 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
103
103
|
<data-grist
|
|
104
104
|
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
105
105
|
.config=${this.config}
|
|
106
|
-
.data=${this._data}
|
|
107
106
|
.fetchHandler="${this.fetchHandler.bind(this)}"
|
|
108
107
|
@record-change="${this.customerChange.bind(this)}"
|
|
109
108
|
@field-change="${this.fieldChange.bind(this)}"
|
|
@@ -379,7 +378,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
379
378
|
sortable: false,
|
|
380
379
|
handlers: {
|
|
381
380
|
click: (columns, data, column, record, rowIndex) => {
|
|
382
|
-
if (record.qty > 0) this._openSerialNumberPopup(record, rowIndex)
|
|
381
|
+
if (record.qty > 0) this._openSerialNumberPopup(record, rowIndex, data.records)
|
|
383
382
|
}
|
|
384
383
|
},
|
|
385
384
|
width: 80
|
|
@@ -600,7 +599,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
600
599
|
}
|
|
601
600
|
})
|
|
602
601
|
|
|
603
|
-
|
|
602
|
+
return {
|
|
604
603
|
total: response.data.inventories.total || 0,
|
|
605
604
|
records: response.data.inventories.items || []
|
|
606
605
|
}
|
|
@@ -1129,7 +1128,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1129
1128
|
)
|
|
1130
1129
|
}
|
|
1131
1130
|
|
|
1132
|
-
_openSerialNumberPopup(inventory, rowIndex) {
|
|
1131
|
+
_openSerialNumberPopup(inventory, rowIndex, records) {
|
|
1133
1132
|
const removable =
|
|
1134
1133
|
inventory?.product?.isRequireSerialNumberScanningOutbound &&
|
|
1135
1134
|
inventory?.product?.isRequireSerialNumberScanningInbound
|
|
@@ -1141,6 +1140,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1141
1140
|
inventory?.product?.isRequireSerialNumberScanningInbound
|
|
1142
1141
|
? true
|
|
1143
1142
|
: false
|
|
1143
|
+
|
|
1144
1144
|
openPopup(
|
|
1145
1145
|
html`
|
|
1146
1146
|
<serial-number-list-popup
|
|
@@ -1162,7 +1162,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1162
1162
|
}
|
|
1163
1163
|
|
|
1164
1164
|
let inventoryItemChangesJson = JSON.stringify(newRecords)
|
|
1165
|
-
let currentInventoryItemCount =
|
|
1165
|
+
let currentInventoryItemCount = records[rowIndex]?.inventoryItemCount || 0
|
|
1166
1166
|
|
|
1167
1167
|
this.dataGrist.dirtyData.records[rowIndex].inventoryItemChanges = inventoryItemChangesJson
|
|
1168
1168
|
this.dataGrist.dirtyData.records[rowIndex].inventoryItemCount =
|
|
@@ -1182,9 +1182,9 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1182
1182
|
}
|
|
1183
1183
|
this.dataGrist.dirtyData.records[rowIndex].__dirty__ = 'M'
|
|
1184
1184
|
|
|
1185
|
-
if (
|
|
1186
|
-
|
|
1187
|
-
|
|
1185
|
+
if (records[rowIndex]) {
|
|
1186
|
+
records[rowIndex].inventoryItemChanges = inventoryItemChangesJson
|
|
1187
|
+
records[rowIndex].inventoryItemCount = currentInventoryItemCount + totalSerialNumber
|
|
1188
1188
|
}
|
|
1189
1189
|
}}"
|
|
1190
1190
|
></serial-number-list-popup>
|
|
@@ -654,7 +654,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
654
654
|
this.locationData = { records: [] }
|
|
655
655
|
this.inventoryData = { records: [] }
|
|
656
656
|
|
|
657
|
-
const selectedWarehouseName = this.warehouseSelector.
|
|
657
|
+
const selectedWarehouseName = this.warehouseSelector?.value.trim()
|
|
658
658
|
const selectedZone = this.zoneSelector.value
|
|
659
659
|
this.selectedRow = this.rowSelector.value
|
|
660
660
|
this.selectedColumn = this.columnSelector.value
|
|
@@ -665,7 +665,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
665
665
|
this.zones = Array.from(
|
|
666
666
|
new Set(
|
|
667
667
|
this.formattedLocations
|
|
668
|
-
.filter(loc => loc.warehouse.name === selectedWarehouseName)
|
|
668
|
+
.filter(loc => loc.warehouse.name.replace(/\s{2,}/g, ' ').trim() === selectedWarehouseName)
|
|
669
669
|
.map(loc => loc.zone)
|
|
670
670
|
.sort()
|
|
671
671
|
)
|
|
@@ -681,7 +681,10 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
681
681
|
rows = Array.from(
|
|
682
682
|
new Set(
|
|
683
683
|
this.formattedLocations
|
|
684
|
-
.filter(
|
|
684
|
+
.filter(
|
|
685
|
+
loc =>
|
|
686
|
+
loc.warehouse.name.replace(/\s{2,}/g, ' ').trim() === selectedWarehouseName && loc.zone === selectedZone
|
|
687
|
+
)
|
|
685
688
|
.map(loc => loc.row)
|
|
686
689
|
.sort()
|
|
687
690
|
)
|
|
@@ -690,7 +693,10 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
690
693
|
columns = Array.from(
|
|
691
694
|
new Set(
|
|
692
695
|
this.formattedLocations
|
|
693
|
-
.filter(
|
|
696
|
+
.filter(
|
|
697
|
+
loc =>
|
|
698
|
+
loc.warehouse.name.replace(/\s{2,}/g, ' ').trim() === selectedWarehouseName && loc.zone === selectedZone
|
|
699
|
+
)
|
|
694
700
|
.map(loc => loc.column)
|
|
695
701
|
.sort()
|
|
696
702
|
)
|
|
@@ -703,7 +709,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
703
709
|
this.formattedLocations
|
|
704
710
|
.filter(
|
|
705
711
|
loc =>
|
|
706
|
-
loc.warehouse.name === selectedWarehouseName &&
|
|
712
|
+
loc.warehouse.name.replace(/\s{2,}/g, ' ').trim() === selectedWarehouseName &&
|
|
707
713
|
loc.zone === selectedZone &&
|
|
708
714
|
loc.row === this.selectedRow
|
|
709
715
|
)
|
|
@@ -719,7 +725,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
719
725
|
this.formattedLocations
|
|
720
726
|
.filter(
|
|
721
727
|
loc =>
|
|
722
|
-
loc.warehouse.name === selectedWarehouseName &&
|
|
728
|
+
loc.warehouse.name.replace(/\s{2,}/g, ' ').trim() === selectedWarehouseName &&
|
|
723
729
|
loc.zone === selectedZone &&
|
|
724
730
|
loc.column === this.selectedColumn
|
|
725
731
|
)
|
|
@@ -733,7 +739,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
733
739
|
if (selectedWarehouseName && selectedZone && (this.selectedRow || this.selectedColumn)) {
|
|
734
740
|
records = this.formattedLocations
|
|
735
741
|
.filter(({ warehouse, zone, row, column }) => {
|
|
736
|
-
if (warehouse.name === selectedWarehouseName && zone === selectedZone) {
|
|
742
|
+
if (warehouse.name.replace(/\s{2,}/g, ' ').trim() === selectedWarehouseName && zone === selectedZone) {
|
|
737
743
|
if (this.selectedRow && this.selectedColumn)
|
|
738
744
|
return row === this.selectedRow && column === this.selectedColumn
|
|
739
745
|
if (this.selectedRow) return row === this.selectedRow
|
|
@@ -90,6 +90,9 @@ class CustomerReceivedNote extends localize(i18next)(PageView) {
|
|
|
90
90
|
case 'seebuu-warehouse':
|
|
91
91
|
this.shadowRoot.querySelector('#container').src = `/view_seebuu_grn/${this._grnNo}`
|
|
92
92
|
break
|
|
93
|
+
case 'freight-mark-warehouse':
|
|
94
|
+
this.shadowRoot.querySelector('#container').src = `/view_fm_grn/${this._grnNo}/${timezoneOffSet}`
|
|
95
|
+
break
|
|
93
96
|
case 'kimeda-warehouse':
|
|
94
97
|
this.shadowRoot.querySelector('#container').src = `/view_kimeda_grn/${this._grnNo}/${timezoneOffSet}`
|
|
95
98
|
break
|
|
@@ -92,6 +92,9 @@ class ReceivedNoteDetail extends localize(i18next)(PageView) {
|
|
|
92
92
|
case 'seebuu-warehouse':
|
|
93
93
|
this.shadowRoot.querySelector('#container').src = `/view_seebuu_grn/${this._grnNo}`
|
|
94
94
|
break
|
|
95
|
+
case 'freight-mark-warehouse':
|
|
96
|
+
this.shadowRoot.querySelector('#container').src = `/view_fm_grn/${this._grnNo}/${timezoneOffSet}`
|
|
97
|
+
break
|
|
95
98
|
case 'kimeda-warehouse':
|
|
96
99
|
this.shadowRoot.querySelector('#container').src = `/view_kimeda_grn/${this._grnNo}/${timezoneOffSet}`
|
|
97
100
|
break
|
|
@@ -609,7 +609,7 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
|
|
|
609
609
|
|
|
610
610
|
if (afterValue >= 0) {
|
|
611
611
|
if (columnName == 'releaseUomValue' || columnName == 'releaseQty') {
|
|
612
|
-
if (originQty) {
|
|
612
|
+
if (originQty >= 0) {
|
|
613
613
|
if (originQty == 0 || originUom == 0) {
|
|
614
614
|
packageUom = originAddableUom / originAddableQty
|
|
615
615
|
} else {
|
|
@@ -643,6 +643,7 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
|
|
|
643
643
|
|
|
644
644
|
return { releaseQty, roundedUom }
|
|
645
645
|
}
|
|
646
|
+
|
|
646
647
|
_onInventoryFieldChanged(e) {
|
|
647
648
|
let columnName = e.detail.column.name
|
|
648
649
|
let roundedUomValue = e.detail.record.roundedUomValue || 0
|
|
@@ -650,7 +651,7 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
|
|
|
650
651
|
let packageUomValue = 0
|
|
651
652
|
|
|
652
653
|
try {
|
|
653
|
-
if (e.detail.after
|
|
654
|
+
if (Number.isNaN(e.detail.after)) {
|
|
654
655
|
throw new Error(i18next.t('text.invalid_form_value'))
|
|
655
656
|
}
|
|
656
657
|
} catch (e) {
|
|
@@ -707,15 +708,19 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
|
|
|
707
708
|
var totalAvailableQty = 0
|
|
708
709
|
var totalAvailableUomValue = 0
|
|
709
710
|
|
|
710
|
-
if (gristType == 'existing') {
|
|
711
|
-
totalAvailableQty = beforeRecord.addableQty + beforeRecord.releaseQty
|
|
712
|
-
totalAvailableUomValue = beforeRecord.addableUomValue + beforeRecord.releaseUomValue
|
|
713
|
-
} else {
|
|
714
|
-
totalAvailableQty = changeRecord.remainQty
|
|
715
|
-
totalAvailableUomValue = changeRecord.remainUomValue
|
|
716
|
-
}
|
|
717
|
-
|
|
718
711
|
try {
|
|
712
|
+
if (Number.isNaN(changeRecord.releaseQty) || Number.isNaN(changeRecord.releaseUomValue)) {
|
|
713
|
+
throw new Error(i18next.t('text.invalid_form_value'))
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
if (gristType == 'existing') {
|
|
717
|
+
totalAvailableQty = beforeRecord.addableQty + beforeRecord.releaseQty
|
|
718
|
+
totalAvailableUomValue = beforeRecord.addableUomValue + beforeRecord.releaseUomValue
|
|
719
|
+
} else {
|
|
720
|
+
totalAvailableQty = changeRecord.remainQty
|
|
721
|
+
totalAvailableUomValue = changeRecord.remainUomValue
|
|
722
|
+
}
|
|
723
|
+
|
|
719
724
|
if (changedColumn === 'releaseQty') {
|
|
720
725
|
this._validateReleaseQty(changeRecord.releaseQty, changeRecord.remainQty, totalAvailableQty)
|
|
721
726
|
} else if (changedColumn === 'releaseUomValue') {
|
|
@@ -110,7 +110,7 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
110
110
|
async pageInitialized() {
|
|
111
111
|
const _worksheetStatus = await getCodeByName('WORKSHEET_STATUS')
|
|
112
112
|
const partners = [...(await this._fetchPartners())]
|
|
113
|
-
|
|
113
|
+
|
|
114
114
|
this._searchFields = [
|
|
115
115
|
{
|
|
116
116
|
name: 'name',
|
|
@@ -153,6 +153,12 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
153
153
|
],
|
|
154
154
|
props: { searchOper: 'eq' }
|
|
155
155
|
},
|
|
156
|
+
{
|
|
157
|
+
name: 'assignee',
|
|
158
|
+
label: i18next.t('field.picker'),
|
|
159
|
+
type: 'text',
|
|
160
|
+
props: { searchOper: 'i_like' }
|
|
161
|
+
},
|
|
156
162
|
{
|
|
157
163
|
label: i18next.t('field.from_date'),
|
|
158
164
|
name: 'fromDate',
|
|
@@ -97,7 +97,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
97
97
|
|
|
98
98
|
get context() {
|
|
99
99
|
var actions = []
|
|
100
|
-
if (this._hasBinPicking && this.refPickingType === PICKING_TYPES.PICKING.value) {
|
|
100
|
+
if (this._hasBinPicking && this.refPickingType === PICKING_TYPES.PICKING.value || PICKING_TYPES.BATCH_PICKING.value) {
|
|
101
101
|
actions.push({
|
|
102
102
|
title: i18next.t('button.get_task'),
|
|
103
103
|
action: this.getTask.bind(this),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
2
|
-
import { client } from '@things-factory/shell'
|
|
2
|
+
import { client,gqlContext } from '@things-factory/shell'
|
|
3
3
|
import { isMobileDevice } from '@things-factory/utils'
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html, LitElement } from 'lit-element'
|
|
@@ -61,7 +61,10 @@ class SelectOperatorPopup extends localize(i18next)(LitElement) {
|
|
|
61
61
|
return this.renderRoot.querySelector('data-grist')
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
firstUpdated() {
|
|
64
|
+
async firstUpdated() {
|
|
65
|
+
|
|
66
|
+
const roles = [...(await this.fetchRoles())]
|
|
67
|
+
|
|
65
68
|
this.searchFields = [
|
|
66
69
|
{
|
|
67
70
|
name: 'name',
|
|
@@ -74,6 +77,23 @@ class SelectOperatorPopup extends localize(i18next)(LitElement) {
|
|
|
74
77
|
label: i18next.t('field.email'),
|
|
75
78
|
type: 'text',
|
|
76
79
|
props: { searchOper: 'i_like' }
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: i18next.t('field.role'),
|
|
83
|
+
name: 'roles',
|
|
84
|
+
type: 'select',
|
|
85
|
+
options: [
|
|
86
|
+
{ value: '' },
|
|
87
|
+
...roles
|
|
88
|
+
.map(roles => {
|
|
89
|
+
return {
|
|
90
|
+
name: `${roles.name}`,
|
|
91
|
+
value: roles.name
|
|
92
|
+
}
|
|
93
|
+
})
|
|
94
|
+
.sort(this._compareValues('name', 'asc'))
|
|
95
|
+
],
|
|
96
|
+
props: { searchOper: 'eq' }
|
|
77
97
|
}
|
|
78
98
|
]
|
|
79
99
|
|
|
@@ -91,24 +111,34 @@ class SelectOperatorPopup extends localize(i18next)(LitElement) {
|
|
|
91
111
|
type: 'string',
|
|
92
112
|
name: 'name',
|
|
93
113
|
header: i18next.t('field.name'),
|
|
114
|
+
sortable: true,
|
|
115
|
+
width: 150
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
type: 'string',
|
|
119
|
+
name: 'roles',
|
|
120
|
+
header: i18next.t('field.role'),
|
|
94
121
|
width: 150
|
|
95
122
|
},
|
|
96
123
|
{
|
|
97
124
|
type: 'string',
|
|
98
125
|
name: 'email',
|
|
99
126
|
header: i18next.t('field.email'),
|
|
127
|
+
sortable: true,
|
|
100
128
|
width: 200
|
|
101
129
|
},
|
|
102
130
|
{
|
|
103
131
|
type: 'string',
|
|
104
132
|
name: 'pending',
|
|
105
133
|
header: i18next.t('label.pending'),
|
|
134
|
+
sortable: true,
|
|
106
135
|
width: 100
|
|
107
136
|
},
|
|
108
137
|
{
|
|
109
138
|
type: 'string',
|
|
110
139
|
name: 'picking',
|
|
111
140
|
header: i18next.t('label.picking'),
|
|
141
|
+
sortable: true,
|
|
112
142
|
width: 100
|
|
113
143
|
}
|
|
114
144
|
]
|
|
@@ -116,27 +146,26 @@ class SelectOperatorPopup extends localize(i18next)(LitElement) {
|
|
|
116
146
|
}
|
|
117
147
|
|
|
118
148
|
async fetchHandler({ page, limit, sorters }) {
|
|
119
|
-
const
|
|
149
|
+
const filters = await this.searchForm.getQueryFilters()
|
|
150
|
+
const pagination = { }
|
|
151
|
+
const sortings = sorters || []
|
|
120
152
|
|
|
121
153
|
const response = await client.query({
|
|
122
154
|
query: gql`
|
|
123
|
-
query pickingAssignmentStatusByUsers($
|
|
124
|
-
pickingAssignmentStatusByUsers(
|
|
155
|
+
query pickingAssignmentStatusByUsers($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
|
|
156
|
+
pickingAssignmentStatusByUsers(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
125
157
|
user {
|
|
126
158
|
id
|
|
127
159
|
name
|
|
128
160
|
email
|
|
161
|
+
description
|
|
129
162
|
}
|
|
130
|
-
pending
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
picking {
|
|
134
|
-
id
|
|
135
|
-
}
|
|
163
|
+
pending
|
|
164
|
+
picking
|
|
136
165
|
}
|
|
137
166
|
}
|
|
138
167
|
`,
|
|
139
|
-
variables: {
|
|
168
|
+
variables: { filters, pagination, sortings}
|
|
140
169
|
})
|
|
141
170
|
|
|
142
171
|
if (!response.errors) {
|
|
@@ -147,14 +176,57 @@ class SelectOperatorPopup extends localize(i18next)(LitElement) {
|
|
|
147
176
|
...item,
|
|
148
177
|
name: item.user.name,
|
|
149
178
|
email: item.user.email,
|
|
150
|
-
|
|
151
|
-
picking: item.picking?.length || 0
|
|
179
|
+
roles: item.user.description
|
|
152
180
|
}
|
|
153
181
|
})
|
|
154
182
|
}
|
|
155
183
|
}
|
|
156
184
|
}
|
|
157
185
|
|
|
186
|
+
async fetchRoles() {
|
|
187
|
+
const response = await client.query({
|
|
188
|
+
query: gql`
|
|
189
|
+
query roles($sortings: [Sorting!]) {
|
|
190
|
+
roles(sortings: $sortings) {
|
|
191
|
+
items {
|
|
192
|
+
id
|
|
193
|
+
name
|
|
194
|
+
description
|
|
195
|
+
privileges {
|
|
196
|
+
id
|
|
197
|
+
name
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
total
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
`,
|
|
204
|
+
variables: { sortings: [{ name: 'name' }] },
|
|
205
|
+
context: gqlContext()
|
|
206
|
+
})
|
|
207
|
+
|
|
208
|
+
return response.data.roles.items
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
_compareValues(key, order = 'asc') {
|
|
212
|
+
return function innerSort(a, b) {
|
|
213
|
+
if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {
|
|
214
|
+
return 0
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const varA = typeof a[key] === 'string' ? a[key].toUpperCase() : a[key]
|
|
218
|
+
const varB = typeof b[key] === 'string' ? b[key].toUpperCase() : b[key]
|
|
219
|
+
|
|
220
|
+
let comparison = 0
|
|
221
|
+
if (varA > varB) {
|
|
222
|
+
comparison = 1
|
|
223
|
+
} else if (varA < varB) {
|
|
224
|
+
comparison = -1
|
|
225
|
+
}
|
|
226
|
+
return order === 'desc' ? comparison * -1 : comparison
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
158
230
|
selectOperator() {
|
|
159
231
|
const selectedOperator = this.dataGrist.selected[0]
|
|
160
232
|
if (selectedOperator?.name) {
|
|
@@ -66,7 +66,13 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
get context() {
|
|
69
|
-
var actions = [
|
|
69
|
+
var actions = [
|
|
70
|
+
{
|
|
71
|
+
title: i18next.t('button.assign_picker'),
|
|
72
|
+
action: this._assignPicker.bind(this),
|
|
73
|
+
...CommonButtonStyles.activate
|
|
74
|
+
}
|
|
75
|
+
]
|
|
70
76
|
|
|
71
77
|
if (this._routeLabelSetting) {
|
|
72
78
|
actions.push({
|
|
@@ -78,19 +84,12 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
78
84
|
|
|
79
85
|
return {
|
|
80
86
|
title: i18next.t('title.outbound_worksheet'),
|
|
81
|
-
actions
|
|
82
|
-
{
|
|
83
|
-
title: i18next.t('button.assign_picker'),
|
|
84
|
-
action: this._assignPicker.bind(this),
|
|
85
|
-
...CommonButtonStyles.activate
|
|
86
|
-
}
|
|
87
|
-
],
|
|
87
|
+
actions,
|
|
88
88
|
exportable: {
|
|
89
89
|
name: i18next.t('title.outbound_worksheet'),
|
|
90
90
|
data: this._exportableData.bind(this)
|
|
91
91
|
},
|
|
92
|
-
help: 'operato-wms/outbound/single-outbound-worksheet'
|
|
93
|
-
actions
|
|
92
|
+
help: 'operato-wms/outbound/single-outbound-worksheet'
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
95
|
|
|
@@ -157,6 +156,12 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
157
156
|
],
|
|
158
157
|
props: { searchOper: 'eq' }
|
|
159
158
|
},
|
|
159
|
+
{
|
|
160
|
+
name: 'assignee',
|
|
161
|
+
label: i18next.t('field.picker'),
|
|
162
|
+
type: 'text',
|
|
163
|
+
props: { searchOper: 'i_like' }
|
|
164
|
+
},
|
|
160
165
|
{
|
|
161
166
|
label: i18next.t('field.from_date'),
|
|
162
167
|
name: 'fromDate',
|
|
@@ -187,7 +192,7 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
187
192
|
},
|
|
188
193
|
{
|
|
189
194
|
label: i18next.t('field.cross_docking'),
|
|
190
|
-
name: 'crossDocking',
|
|
195
|
+
name: 'crossDocking',
|
|
191
196
|
type: 'checkbox',
|
|
192
197
|
props: { searchOper: 'eq' },
|
|
193
198
|
attrs: ['indeterminate']
|
|
@@ -431,8 +436,11 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
431
436
|
})
|
|
432
437
|
|
|
433
438
|
if (!response.errors) {
|
|
434
|
-
let domain = response.data.worksheets.items[0]
|
|
435
|
-
|
|
439
|
+
let domain = response.data.worksheets.items[0]?.domain
|
|
440
|
+
|
|
441
|
+
if (domain)
|
|
442
|
+
this._routeLabelSetting = await fetchSettingRule('enable-print-route-label', domain.id)
|
|
443
|
+
|
|
436
444
|
this.updateContext()
|
|
437
445
|
return {
|
|
438
446
|
total: response.data.worksheets.total || 0,
|
|
@@ -487,7 +495,7 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
|
|
|
487
495
|
return item.status == 'DEACTIVATED'
|
|
488
496
|
})
|
|
489
497
|
|
|
490
|
-
if (selectedData.length <= 0) throw new Error('
|
|
498
|
+
if (selectedData.length <= 0) throw new Error(i18next.t('text.no_available_worksheet_selected'))
|
|
491
499
|
|
|
492
500
|
openPopup(
|
|
493
501
|
html`
|
|
@@ -174,7 +174,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
|
|
|
174
174
|
<label>${i18next.t('label.company')}</label>
|
|
175
175
|
<input name="bizplace" readonly />
|
|
176
176
|
|
|
177
|
-
<label>${i18next.t('label.
|
|
177
|
+
<label>${i18next.t('label.picker')}</label>
|
|
178
178
|
<input name="assignee" readonly />
|
|
179
179
|
|
|
180
180
|
<label>${i18next.t('label.status')}</label>
|