@things-factory/operato-wms 4.0.23 → 4.0.27
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/bootstrap.js +1 -1
- package/client/pages/adjustment/transfer-inventory.js +32 -6
- package/client/pages/billing/claim-chit/claim-chit-detail.js +32 -35
- package/client/pages/billing/claim-chit/claim-chit-list.js +17 -17
- package/client/pages/billing/claim-chit/create-claim-chit.js +39 -30
- package/client/pages/billing/transport-summary-report.js +21 -23
- package/client/pages/bulk-operation/bulk-operation.js +189 -64
- package/client/pages/bulk-operation/validate-gan-popup.js +391 -0
- package/client/pages/bulk-operation/validate-ro-popup.js +44 -54
- package/client/pages/components/popup-unloading.js +47 -34
- package/client/pages/components/select-product-popup.js +74 -27
- package/client/pages/components/worksheet-information-popup.js +100 -0
- package/client/pages/inbound/expiry-date-popup.js +2 -2
- package/client/pages/inbound/inbound-reusable-pallet.js +21 -19
- package/client/pages/inbound/palletizing-pallets-popup.js +10 -9
- package/client/pages/inbound/putaway-product.js +196 -235
- package/client/pages/inbound/putaway-worksheet-generate-popup.js +4 -4
- package/client/pages/inbound/undo-unload-popup.js +295 -0
- package/client/pages/inbound/unload-product.js +236 -646
- package/client/pages/inbound/unloaded-inventories-popup.js +129 -0
- package/client/pages/inbound/vas-selector.js +9 -8
- package/client/pages/inbound/worksheet-unloading.js +15 -11
- package/client/pages/inventory/inventory-adjustment.js +9 -10
- package/client/pages/inventory-check/check-inventory-popup.js +20 -18
- package/client/pages/inventory-check/cycle-count-recheck-popup.js +25 -15
- package/client/pages/inventory-check/inspecting-product.js +2 -2
- package/client/pages/inventory-check/inventory-check-list.js +30 -19
- package/client/pages/inventory-check/search-popup.js +15 -14
- package/client/pages/inventory-check/worksheet-cycle-count.js +17 -15
- package/client/pages/master/location-list.js +60 -52
- package/client/pages/master/pallet-list.js +34 -30
- package/client/pages/master/print-location-label.js +37 -36
- package/client/pages/master/product/product-list.js +1 -1
- package/client/pages/master/warehouse-list.js +33 -29
- package/client/pages/master/worker-list.js +30 -30
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +409 -21
- package/client/pages/order/arrival-notice/assign-buffer-location.js +1 -1
- package/client/pages/order/arrival-notice/create-arrival-notice.js +89 -13
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +90 -10
- package/client/pages/order/arrival-notice/edit-product-popup.js +2 -2
- package/client/pages/order/goods-received-note/customer-grn-list.js +9 -8
- package/client/pages/order/goods-received-note/customer-received-note.js +8 -7
- package/client/pages/order/goods-received-note/received-note-list.js +9 -8
- package/client/pages/order/release-order/b2b/b2b-order-list.js +78 -2
- package/client/pages/order/release-order/b2b/b2b-order-requests.js +32 -16
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +49 -5
- package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +314 -0
- package/client/pages/order/release-order/batch-picking-popup.js +19 -2
- package/client/pages/order/release-order/create-release-order.js +194 -89
- package/client/pages/order/release-order/release-extra-product-popup.js +3 -7
- package/client/pages/order/release-order/release-order-detail.js +390 -107
- package/client/pages/order/return-order/check-return-order.js +15 -13
- package/client/pages/order/return-order/create-return-order.js +3 -3
- package/client/pages/order/return-order/receive-return-order-requests.js +25 -22
- package/client/pages/order/return-order/rejected-return-order.js +8 -14
- package/client/pages/order/return-order/return-order-assign-buffer-location.js +16 -14
- package/client/pages/order/return-order/return-order-detail.js +35 -31
- package/client/pages/order/return-order/return-order-list.js +9 -8
- package/client/pages/order/return-order/return-order-requests.js +20 -18
- package/client/pages/order/reverse-kitting-order/reverse-kitting-order-list.js +9 -8
- package/client/pages/order/transfer-order/receive-transfer-order-request.js +67 -66
- package/client/pages/order/transfer-order/rejected-transfer-order.js +7 -6
- package/client/pages/order/transfer-order/transfer-order-detail.js +7 -6
- package/client/pages/order/transfer-order/transfer-order-requests.js +20 -18
- package/client/pages/order/transport-order/contact-point-selector-popup.js +20 -20
- package/client/pages/order/transport-order/create-delivery-order.js +1 -1
- package/client/pages/order/transport-order/delivery-note-popup.js +52 -46
- package/client/pages/order/transport-order/delivery-order-list.js +1 -1
- package/client/pages/order/transport-order/print-delivery-note.js +17 -16
- package/client/pages/order/transport-order/upload-delivery-note.js +21 -18
- package/client/pages/order/transport-order/view-delivery-note.js +19 -22
- package/client/pages/order/vas-order/create-vas-order.js +12 -11
- package/client/pages/order/vas-order/receive-vas-order.js +25 -22
- package/client/pages/order/vas-order/vas-order-detail.js +26 -23
- package/client/pages/order/vas-order/vas-order-list.js +9 -8
- package/client/pages/order/vas-order/vas-order-requests.js +11 -12
- package/client/pages/outbound/outbound-reusable-pallet.js +25 -33
- package/client/pages/outbound/packing-product.js +111 -236
- package/client/pages/outbound/picking-product.js +288 -380
- package/client/pages/outbound/single-outbound-worksheet.js +9 -8
- package/client/pages/outbound/sorting-product.js +66 -63
- package/client/pages/outbound/worksheet-loading.js +7 -3
- package/client/pages/outbound/worksheet-packing.js +3 -3
- package/client/pages/outbound/worksheet-picking.js +22 -18
- package/client/pages/report/job-sheet-list.js +9 -8
- package/client/pages/vas/print-product-label.js +17 -9
- package/client/route.js +16 -32
- package/dist-server/graphql/resolvers/reports/product-label-report.js +1 -0
- package/dist-server/graphql/resolvers/reports/product-label-report.js.map +1 -1
- package/package.json +65 -65
- package/server/graphql/resolvers/reports/product-label-report.ts +1 -0
- package/things-factory.config.js +0 -16
- package/translations/en.json +34 -2
- package/translations/ko.json +34 -3
- package/translations/ms.json +34 -3
- package/translations/zh.json +34 -3
- package/client/pages/inbound/location-selector.js +0 -224
- package/client/pages/master/picking-bin-list.js +0 -354
- package/client/pages/order/retail-replenishment-order/retail-replenishment-order-detail.js +0 -315
- package/client/pages/order/retail-replenishment-order/retail-replenishment-order-requests.js +0 -307
- package/client/pages/order/vas-order/rejected-vas-order.js +0 -300
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '@things-factory/form-ui'
|
|
2
2
|
import '@things-factory/grist-ui'
|
|
3
3
|
import '../batch-picking-popup'
|
|
4
|
+
import '../batch-generate-single-picking-worksheet-popup'
|
|
4
5
|
|
|
5
6
|
import gql from 'graphql-tag'
|
|
6
7
|
import { css, html } from 'lit-element'
|
|
@@ -65,12 +66,17 @@ class B2cOrderRequests extends localize(i18next)(PageView) {
|
|
|
65
66
|
title: i18next.t('button.generate_packing_list'),
|
|
66
67
|
action: this._generatePackingList.bind(this),
|
|
67
68
|
...CommonButtonStyles.label
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
title: i18next.t('button.batch_picking'),
|
|
72
|
+
action: this._openBatchPickingPopup.bind(this),
|
|
73
|
+
...CommonButtonStyles.activate
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: i18next.t('button.generate_worksheet'),
|
|
77
|
+
action: this._openBatchGenerateSinglePickingWorksheetPopup.bind(this),
|
|
78
|
+
...CommonButtonStyles.activate
|
|
68
79
|
}
|
|
69
|
-
// {
|
|
70
|
-
// title: i18next.t('button.batch_picking'),
|
|
71
|
-
// action: this._openBatchPickingPopup.bind(this),
|
|
72
|
-
// ...CommonButtonStyles.activate
|
|
73
|
-
// }
|
|
74
80
|
],
|
|
75
81
|
exportable: {
|
|
76
82
|
name: i18next.t('title.release_order_requests'),
|
|
@@ -209,6 +215,7 @@ class B2cOrderRequests extends localize(i18next)(PageView) {
|
|
|
209
215
|
this.config = {
|
|
210
216
|
rows: { selectable: { multiple: true }, appendable: false },
|
|
211
217
|
list: { fields: ['name', 'bizplace', 'releaseDate', 'status', 'updatedAt'] },
|
|
218
|
+
pagination: { limit: 100, pages: [20, 50, 100, 200, 500] },
|
|
212
219
|
columns: [
|
|
213
220
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
214
221
|
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
@@ -562,6 +569,43 @@ class B2cOrderRequests extends localize(i18next)(PageView) {
|
|
|
562
569
|
}
|
|
563
570
|
}
|
|
564
571
|
|
|
572
|
+
_openBatchGenerateSinglePickingWorksheetPopup() {
|
|
573
|
+
openPopup(
|
|
574
|
+
html`
|
|
575
|
+
<batch-generate-single-picking-worksheet-popup
|
|
576
|
+
@generated="${() => {
|
|
577
|
+
this._showToast({ message: i18next.t('text.orders_has_been_activated') })
|
|
578
|
+
this.dataGrist.fetch()
|
|
579
|
+
}}"
|
|
580
|
+
></batch-generate-single-picking-worksheet-popup>
|
|
581
|
+
`,
|
|
582
|
+
{
|
|
583
|
+
backdrop: true,
|
|
584
|
+
size: 'large',
|
|
585
|
+
title: i18next.t('title.generate_picking_worksheet')
|
|
586
|
+
}
|
|
587
|
+
)
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
_compareValues(key, order = 'asc') {
|
|
591
|
+
return function innerSort(a, b) {
|
|
592
|
+
if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {
|
|
593
|
+
return 0
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
const varA = typeof a[key] === 'string' ? a[key].toUpperCase() : a[key]
|
|
597
|
+
const varB = typeof b[key] === 'string' ? b[key].toUpperCase() : b[key]
|
|
598
|
+
|
|
599
|
+
let comparison = 0
|
|
600
|
+
if (varA > varB) {
|
|
601
|
+
comparison = 1
|
|
602
|
+
} else if (varA < varB) {
|
|
603
|
+
comparison = -1
|
|
604
|
+
}
|
|
605
|
+
return order === 'desc' ? comparison * -1 : comparison
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
|
|
565
609
|
_modifyDateRange(e) {
|
|
566
610
|
const fromDate = e.currentTarget.value
|
|
567
611
|
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import '@things-factory/grist-ui'
|
|
2
|
+
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
3
|
+
import { openPopup } from '@things-factory/layout-base'
|
|
4
|
+
import { client, CustomAlert } from '@things-factory/shell'
|
|
5
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
6
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
7
|
+
import { css, html, LitElement } from 'lit-element'
|
|
8
|
+
import gql from 'graphql-tag'
|
|
9
|
+
import { ScrollbarStyles } from '@things-factory/styles'
|
|
10
|
+
import { ORDER_STATUS } from '../../constants'
|
|
11
|
+
import '@things-factory/biz-ui'
|
|
12
|
+
|
|
13
|
+
class BatchGenerateSinglePickingWorksheetPopup extends localize(i18next)(LitElement) {
|
|
14
|
+
static get properties() {
|
|
15
|
+
return {
|
|
16
|
+
_searchFields: Array,
|
|
17
|
+
config: Object,
|
|
18
|
+
data: Object
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static get styles() {
|
|
23
|
+
return [
|
|
24
|
+
MultiColumnFormStyles,
|
|
25
|
+
ScrollbarStyles,
|
|
26
|
+
css`
|
|
27
|
+
:host {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
background-color: white;
|
|
32
|
+
padding: var(--padding-default);
|
|
33
|
+
}
|
|
34
|
+
search-form {
|
|
35
|
+
overflow: visible;
|
|
36
|
+
}
|
|
37
|
+
.grist {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
flex: 1;
|
|
41
|
+
overflow-y: auto;
|
|
42
|
+
}
|
|
43
|
+
.grist-container {
|
|
44
|
+
overflow-y: hidden;
|
|
45
|
+
display: flex;
|
|
46
|
+
flex: 1;
|
|
47
|
+
}
|
|
48
|
+
data-grist {
|
|
49
|
+
overflow-y: hidden;
|
|
50
|
+
flex: 1;
|
|
51
|
+
}
|
|
52
|
+
h2 {
|
|
53
|
+
padding: var(--subtitle-padding);
|
|
54
|
+
font: var(--subtitle-font);
|
|
55
|
+
color: var(--subtitle-text-color);
|
|
56
|
+
border-bottom: var(--subtitle-border-bottom);
|
|
57
|
+
}
|
|
58
|
+
.grist h2 {
|
|
59
|
+
font: var(--grist-title-font);
|
|
60
|
+
}
|
|
61
|
+
.button-container {
|
|
62
|
+
padding: var(--button-container-padding);
|
|
63
|
+
margin: var(--button-container-margin);
|
|
64
|
+
text-align: var(--button-container-align);
|
|
65
|
+
background-color: var(--button-container-background);
|
|
66
|
+
height: var(--button-container-height);
|
|
67
|
+
}
|
|
68
|
+
`
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
submit() {
|
|
73
|
+
this.dispatchEvent(new CustomEvent('submit'))
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
render() {
|
|
77
|
+
return html`
|
|
78
|
+
<search-form .fields=${this._searchFields} @submit=${() => this.releaseOrderGrist.fetch()}></search-form>
|
|
79
|
+
|
|
80
|
+
<div class="grist-container">
|
|
81
|
+
<div class="grist">
|
|
82
|
+
<h2>${i18next.t('title.release_order')}</h2>
|
|
83
|
+
<data-grist
|
|
84
|
+
id="releaseOrder"
|
|
85
|
+
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
86
|
+
.config=${this.roConfig}
|
|
87
|
+
.fetchHandler="${this.fetchReadyToPickOrders.bind(this)}"
|
|
88
|
+
></data-grist>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div class="button-container">
|
|
93
|
+
<mwc-button
|
|
94
|
+
@click="${this.generatePickingWorksheet.bind(this)}"
|
|
95
|
+
raised
|
|
96
|
+
label="${i18next.t('button.generate_worksheet')}"
|
|
97
|
+
></mwc-button>
|
|
98
|
+
</div>
|
|
99
|
+
`
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
async firstUpdated() {
|
|
103
|
+
const partners = await this._fetchPartners()
|
|
104
|
+
this._searchFields = [
|
|
105
|
+
{
|
|
106
|
+
label: i18next.t('field.company'),
|
|
107
|
+
name: 'bizplace',
|
|
108
|
+
type: 'select',
|
|
109
|
+
options: [
|
|
110
|
+
{ value: '' },
|
|
111
|
+
...partners
|
|
112
|
+
.map(partner => {
|
|
113
|
+
return {
|
|
114
|
+
name: `${partner.name} ${partner.description ? `(${partner.description})` : ''}`,
|
|
115
|
+
value: partner.id
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
.sort(this._compareValues('name', 'asc'))
|
|
119
|
+
],
|
|
120
|
+
props: { searchOper: 'eq' }
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
label: i18next.t('field.release_date'),
|
|
124
|
+
name: 'releaseDate',
|
|
125
|
+
type: 'date',
|
|
126
|
+
props: { searchOper: 'lte' }
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
|
|
130
|
+
this.roConfig = {
|
|
131
|
+
pagination: { pages: [100, 200, 300, 500], limit: 200 },
|
|
132
|
+
rows: {
|
|
133
|
+
selectable: { multiple: true },
|
|
134
|
+
appendable: false
|
|
135
|
+
},
|
|
136
|
+
list: { fields: ['name', 'refNo', 'bizplace', 'releaseDate'] },
|
|
137
|
+
columns: [
|
|
138
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
139
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
140
|
+
{
|
|
141
|
+
type: 'string',
|
|
142
|
+
name: 'name',
|
|
143
|
+
header: i18next.t('field.release_good_no'),
|
|
144
|
+
width: 150
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
type: 'string',
|
|
148
|
+
name: 'refNo',
|
|
149
|
+
header: i18next.t('field.ref_no'),
|
|
150
|
+
width: 130
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
type: 'object',
|
|
154
|
+
name: 'bizplace',
|
|
155
|
+
header: i18next.t('field.company'),
|
|
156
|
+
width: 200
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
type: 'date',
|
|
160
|
+
name: 'releaseDate',
|
|
161
|
+
header: i18next.t('field.release_date'),
|
|
162
|
+
sortable: true,
|
|
163
|
+
width: 150
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
get searchForm() {
|
|
170
|
+
return this.renderRoot.querySelector('search-form')
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
get releaseOrderGrist() {
|
|
174
|
+
return this.shadowRoot.querySelector('data-grist#releaseOrder')
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
get orderInventoryGrist() {
|
|
178
|
+
return this.shadowRoot.querySelector('data-grist#orderInventory')
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
async _fetchPartners() {
|
|
182
|
+
const response = await client.query({
|
|
183
|
+
query: gql`
|
|
184
|
+
query partnersBizplaces($filters: [Filter!]) {
|
|
185
|
+
partnersBizplaces(filters: $filters) {
|
|
186
|
+
items {
|
|
187
|
+
id
|
|
188
|
+
name
|
|
189
|
+
description
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
`,
|
|
194
|
+
variables: { filters: [] }
|
|
195
|
+
})
|
|
196
|
+
|
|
197
|
+
if (!response.errors) {
|
|
198
|
+
return response.data.partnersBizplaces.items
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
async fetchReadyToPickOrders({ page, limit, sorters = [{ name: 'releaseDate' }] }) {
|
|
203
|
+
// if (!this.partnerBizplace) return { total: 0, records: [] }
|
|
204
|
+
|
|
205
|
+
const filters = [
|
|
206
|
+
...(await this.searchForm.getQueryFilters()).filter(x => x.name != 'partnerBizplace'),
|
|
207
|
+
{ name: 'status', operator: 'eq', value: ORDER_STATUS.PENDING_WORKSHEET.value },
|
|
208
|
+
{ name: 'crossDocking', operator: 'eq', value: false }
|
|
209
|
+
]
|
|
210
|
+
|
|
211
|
+
if (this.partnerBizplace) {
|
|
212
|
+
filters.push({ name: 'bizplaceId', operator: 'eq', value: this.partnerBizplace.id })
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const pagination = { page, limit }
|
|
216
|
+
const sortings = sorters
|
|
217
|
+
|
|
218
|
+
const response = await client.query({
|
|
219
|
+
query: gql`
|
|
220
|
+
query releaseGoodRequests($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
|
|
221
|
+
releaseGoodRequests(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
222
|
+
items {
|
|
223
|
+
id
|
|
224
|
+
name
|
|
225
|
+
refNo
|
|
226
|
+
releaseDate
|
|
227
|
+
type
|
|
228
|
+
bizplace {
|
|
229
|
+
id
|
|
230
|
+
name
|
|
231
|
+
description
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
total
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
`,
|
|
238
|
+
variables: { filters, pagination, sortings }
|
|
239
|
+
})
|
|
240
|
+
if (!response.errors) {
|
|
241
|
+
return {
|
|
242
|
+
total: response.data.releaseGoodRequests.total || 0,
|
|
243
|
+
records: response.data.releaseGoodRequests.items || []
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
async generatePickingWorksheet() {
|
|
249
|
+
try {
|
|
250
|
+
let releaseGoodNos = []
|
|
251
|
+
releaseGoodNos = this.releaseOrderGrist.selected.map(record => record.name)
|
|
252
|
+
|
|
253
|
+
if (releaseGoodNos.length <= 0) throw new Error('Please select one or more order to generate worksheet')
|
|
254
|
+
|
|
255
|
+
let result = await CustomAlert({
|
|
256
|
+
title: i18next.t('title.are_you_sure'),
|
|
257
|
+
text: i18next.t('text.generate_worksheet'),
|
|
258
|
+
confirmButton: { text: i18next.t('button.submit') },
|
|
259
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
260
|
+
})
|
|
261
|
+
|
|
262
|
+
if (!result.value) return
|
|
263
|
+
|
|
264
|
+
const response = await client.mutate({
|
|
265
|
+
mutation: gql`
|
|
266
|
+
mutation generateMultipleReleaseGoodWorksheet($releaseGoodNos: [String!]) {
|
|
267
|
+
generateMultipleReleaseGoodWorksheet(releaseGoodNos: $releaseGoodNos)
|
|
268
|
+
}
|
|
269
|
+
`,
|
|
270
|
+
variables: {
|
|
271
|
+
releaseGoodNos
|
|
272
|
+
}
|
|
273
|
+
})
|
|
274
|
+
|
|
275
|
+
if (!response.errors) {
|
|
276
|
+
this.dispatchEvent(new CustomEvent('generated'))
|
|
277
|
+
history.back()
|
|
278
|
+
}
|
|
279
|
+
} catch (e) {
|
|
280
|
+
this._showToast(e)
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
_compareValues(key, order = 'asc') {
|
|
285
|
+
return function innerSort(a, b) {
|
|
286
|
+
if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {
|
|
287
|
+
return 0
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
const varA = typeof a[key] === 'string' ? a[key].toUpperCase() : a[key]
|
|
291
|
+
const varB = typeof b[key] === 'string' ? b[key].toUpperCase() : b[key]
|
|
292
|
+
|
|
293
|
+
let comparison = 0
|
|
294
|
+
if (varA > varB) {
|
|
295
|
+
comparison = 1
|
|
296
|
+
} else if (varA < varB) {
|
|
297
|
+
comparison = -1
|
|
298
|
+
}
|
|
299
|
+
return order === 'desc' ? comparison * -1 : comparison
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
_showToast({ type, message }) {
|
|
304
|
+
document.dispatchEvent(
|
|
305
|
+
new CustomEvent('notify', {
|
|
306
|
+
detail: {
|
|
307
|
+
type,
|
|
308
|
+
message
|
|
309
|
+
}
|
|
310
|
+
})
|
|
311
|
+
)
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
window.customElements.define('batch-generate-single-picking-worksheet-popup', BatchGenerateSinglePickingWorksheetPopup)
|
|
@@ -7,7 +7,7 @@ import { isMobileDevice } from '@things-factory/utils'
|
|
|
7
7
|
import { css, html, LitElement } from 'lit-element'
|
|
8
8
|
import gql from 'graphql-tag'
|
|
9
9
|
import { ScrollbarStyles } from '@things-factory/styles'
|
|
10
|
-
import { ORDER_STATUS } from '../../constants'
|
|
10
|
+
import { ORDER_STATUS, RO_TYPES } from '../../constants'
|
|
11
11
|
import '@things-factory/biz-ui'
|
|
12
12
|
|
|
13
13
|
class BatchPickingPopup extends localize(i18next)(LitElement) {
|
|
@@ -146,6 +146,16 @@ class BatchPickingPopup extends localize(i18next)(LitElement) {
|
|
|
146
146
|
name: 'releaseDate',
|
|
147
147
|
type: 'date',
|
|
148
148
|
props: { searchOper: 'lte' }
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
label: i18next.t('field.type'),
|
|
152
|
+
name: 'type',
|
|
153
|
+
type: 'select',
|
|
154
|
+
options: Object.keys(RO_TYPES).map(map => {
|
|
155
|
+
debugger
|
|
156
|
+
return { name: RO_TYPES[map].name, value: RO_TYPES[map].value }
|
|
157
|
+
}),
|
|
158
|
+
props: { searchOper: 'eq' }
|
|
149
159
|
}
|
|
150
160
|
]
|
|
151
161
|
|
|
@@ -165,6 +175,12 @@ class BatchPickingPopup extends localize(i18next)(LitElement) {
|
|
|
165
175
|
header: i18next.t('field.release_good_no'),
|
|
166
176
|
width: 150
|
|
167
177
|
},
|
|
178
|
+
{
|
|
179
|
+
type: 'string',
|
|
180
|
+
name: 'type',
|
|
181
|
+
header: i18next.t('field.type'),
|
|
182
|
+
width: 100
|
|
183
|
+
},
|
|
168
184
|
{
|
|
169
185
|
type: 'string',
|
|
170
186
|
name: 'refNo',
|
|
@@ -288,6 +304,7 @@ class BatchPickingPopup extends localize(i18next)(LitElement) {
|
|
|
288
304
|
name
|
|
289
305
|
refNo
|
|
290
306
|
releaseDate
|
|
307
|
+
type
|
|
291
308
|
bizplace {
|
|
292
309
|
id
|
|
293
310
|
name
|
|
@@ -323,7 +340,7 @@ class BatchPickingPopup extends localize(i18next)(LitElement) {
|
|
|
323
340
|
|
|
324
341
|
const response = await client.query({
|
|
325
342
|
query: gql`
|
|
326
|
-
query mergedProductOrderInventories($filters: [Filter
|
|
343
|
+
query mergedProductOrderInventories($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
|
|
327
344
|
mergedProductOrderInventories(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
328
345
|
items {
|
|
329
346
|
productName
|