@things-factory/operato-wms 4.0.27 → 4.0.31
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 +44 -10
- package/client/pages/bulk-operation/validate-gan-popup.js +5 -4
- package/client/pages/bulk-operation/validate-ro-popup.js +7 -39
- package/client/pages/components/popup-reusable-pallet.js +145 -0
- 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/components/worksheet-information-popup.js +4 -1
- package/client/pages/inbound/unload-product.js +116 -91
- package/client/pages/inventory/onhand-inventory.js +1 -0
- 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 +52 -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 +4 -3
- package/client/pages/order/release-order/create-release-order.js +1 -1
- package/client/pages/order/release-order/release-extra-product-popup.js +10 -5
- package/client/pages/order/release-order/release-order-detail.js +29 -12
- package/client/pages/order/return-order/create-return-order.js +41 -52
- package/client/pages/order/reverse-kitting-order/reverse-kitting-order-detail.js +2 -2
- package/client/pages/order/transport-order/create-delivery-order.js +4 -2
- 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 +12 -7
- 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/custom-elccl/elccl-inventory-summary-report.js +5 -1
- package/client/pages/report/inbound-order-details-report.js +3 -5
- 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/reverse-kitting/execute-reverse-kitting.js +3 -3
- package/client/pages/vas/reverse-kitting/popup-combination-sets.js +3 -3
- package/client/pages/vas/reverse-kitting/popup-reverse-kitting-template.js +1 -1
- 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/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +2 -4
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/types/reports/inbound-order-details-report.js +2 -1
- package/dist-server/graphql/types/reports/inbound-order-details-report.js.map +1 -1
- package/package.json +65 -65
- package/server/graphql/resolvers/reports/inbound-order-details-report.ts +2 -4
- package/server/graphql/types/reports/inbound-order-details-report.ts +2 -1
- package/translations/en.json +15 -1
- package/translations/ko.json +20 -7
- package/translations/ms.json +21 -8
- package/translations/zh.json +21 -8
- package/client/pages/components/popup-unloading.js +0 -610
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import '@things-factory/form-ui'
|
|
2
|
-
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
3
2
|
import '@things-factory/grist-ui'
|
|
3
|
+
|
|
4
|
+
import gql from 'graphql-tag'
|
|
5
|
+
import { css, html, LitElement } from 'lit-element'
|
|
6
|
+
|
|
7
|
+
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
4
8
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
9
|
import { client } from '@things-factory/shell'
|
|
6
10
|
import { ScrollbarStyles } from '@things-factory/styles'
|
|
7
11
|
import { isMobileDevice } from '@things-factory/utils'
|
|
8
|
-
import gql from 'graphql-tag'
|
|
9
|
-
import { css, html, LitElement } from 'lit-element'
|
|
10
12
|
|
|
11
13
|
export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
12
14
|
static get properties() {
|
|
@@ -94,9 +96,7 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
94
96
|
name="labelFormat"
|
|
95
97
|
@change="${e => {
|
|
96
98
|
this._fullLocationFormat = e.currentTarget.value === 'full_format' ? true : false
|
|
97
|
-
if (this._labelIndicator.value != '')
|
|
98
|
-
this._getPrintPreview(this._labelIndicator.value)
|
|
99
|
-
}
|
|
99
|
+
if (this._labelIndicator.value != '') this.dataGrist.fetch()
|
|
100
100
|
}}"
|
|
101
101
|
>
|
|
102
102
|
<option value="full_format">A-01-01-01 (${i18next.t('text.full_format')})</option>
|
|
@@ -108,7 +108,7 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
108
108
|
name="labelIndicator"
|
|
109
109
|
@change="${e => {
|
|
110
110
|
let indicator = e.currentTarget.value
|
|
111
|
-
if (indicator !== '') this.
|
|
111
|
+
if (indicator !== '') this.dataGrist.fetch()
|
|
112
112
|
}}"
|
|
113
113
|
>
|
|
114
114
|
<option value="">-- ${i18next.t('text.please_select_label_indicator')} --</option>
|
|
@@ -150,6 +150,12 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
150
150
|
header: i18next.t('field.name'),
|
|
151
151
|
width: 250
|
|
152
152
|
},
|
|
153
|
+
{
|
|
154
|
+
type: 'string',
|
|
155
|
+
name: 'originalName',
|
|
156
|
+
header: i18next.t('field.original_name'),
|
|
157
|
+
width: 250
|
|
158
|
+
},
|
|
153
159
|
{
|
|
154
160
|
type: 'string',
|
|
155
161
|
name: 'indicator',
|
|
@@ -158,11 +164,6 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
158
164
|
}
|
|
159
165
|
]
|
|
160
166
|
}
|
|
161
|
-
|
|
162
|
-
if (this.selectedLocations && this.selectedLocations.length > 0) {
|
|
163
|
-
this._records = []
|
|
164
|
-
this._total = 0
|
|
165
|
-
}
|
|
166
167
|
}
|
|
167
168
|
|
|
168
169
|
get _labelIndicator() {
|
|
@@ -173,173 +174,157 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
173
174
|
return this.shadowRoot.querySelector('data-grist')
|
|
174
175
|
}
|
|
175
176
|
|
|
176
|
-
async fetchHandler() {
|
|
177
|
-
return
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
}
|
|
177
|
+
async fetchHandler({ page, limit, sorters = [{ name: 'name' }] }) {
|
|
178
|
+
if (this._labelIndicator.value == '') return
|
|
179
|
+
const fetcherDetail = { page, limit, sorters }
|
|
180
|
+
const indicator = this._labelIndicator.value || ''
|
|
182
181
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
182
|
+
let filters = [
|
|
183
|
+
{
|
|
184
|
+
name: 'warehouse_id',
|
|
185
|
+
operator: 'eq',
|
|
186
|
+
value: this.warehouseId
|
|
187
|
+
}
|
|
188
|
+
]
|
|
186
189
|
|
|
187
|
-
|
|
188
|
-
|
|
190
|
+
let locations = [],
|
|
191
|
+
totalLocations = 0
|
|
192
|
+
|
|
193
|
+
if (this.selectedLocations && this.selectedLocations.length) {
|
|
194
|
+
filters.push({
|
|
195
|
+
name: 'name',
|
|
196
|
+
operator: 'in',
|
|
197
|
+
value: this.selectedLocations.map(location => location.name)
|
|
198
|
+
})
|
|
199
|
+
const { records, total } = await this._fetchLocations(filters, fetcherDetail)
|
|
200
|
+
locations = records
|
|
201
|
+
totalLocations = total
|
|
189
202
|
} else {
|
|
190
|
-
if (this.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
operator: 'noteq',
|
|
201
|
-
value: 'BUFFER'
|
|
202
|
-
}
|
|
203
|
-
]
|
|
204
|
-
locations = await this._fetchLocations(filters)
|
|
205
|
-
}
|
|
203
|
+
if (this._fullLocationFormat) {
|
|
204
|
+
filters.push({
|
|
205
|
+
name: 'type',
|
|
206
|
+
operator: 'noteq',
|
|
207
|
+
value: 'BUFFER'
|
|
208
|
+
})
|
|
209
|
+
const { records, total } = await this._fetchLocations(filters, fetcherDetail)
|
|
210
|
+
locations = records
|
|
211
|
+
totalLocations = total
|
|
212
|
+
} else {
|
|
206
213
|
// if partial format:
|
|
207
|
-
// prevent from printing same location label. eg: A-01-01-01, A-01-01-02 > will print A-01-01 twice
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
name: 'warehouse_id',
|
|
219
|
-
operator: 'eq',
|
|
220
|
-
value: this.warehouseId
|
|
221
|
-
}
|
|
222
|
-
]
|
|
223
|
-
locations = await this._fetchLocationsByGroup(filters)
|
|
224
|
-
}
|
|
214
|
+
// prevent from printing same location label. eg: A-01-01-01, A-01-01-02 > will print A-01-01 twice{
|
|
215
|
+
if (indicator == 'shelf') {
|
|
216
|
+
this._showToast({
|
|
217
|
+
level: 'error',
|
|
218
|
+
message: i18next.t('text.shelf_is_not_allowed_as_an_indicator_for_partial_format')
|
|
219
|
+
})
|
|
220
|
+
return
|
|
221
|
+
} else {
|
|
222
|
+
const { records, total } = await this._fetchLocationsByGroup(filters, fetcherDetail)
|
|
223
|
+
locations = records
|
|
224
|
+
totalLocations = total
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
...location,
|
|
233
|
-
indicator: location[indicator]
|
|
234
|
-
}
|
|
235
|
-
} else {
|
|
229
|
+
return {
|
|
230
|
+
total: totalLocations,
|
|
231
|
+
records: locations.map(location => {
|
|
236
232
|
return {
|
|
237
233
|
...location,
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
234
|
+
indicator: location[indicator],
|
|
235
|
+
originalName: location.name,
|
|
236
|
+
name:
|
|
237
|
+
location.type === 'BUFFER'
|
|
238
|
+
? ''
|
|
239
|
+
: this._fullLocationFormat // check if full location format is true
|
|
240
|
+
? `${location.zone}-${location.row}-${location.column}-${location.shelf}`
|
|
241
|
+
: `${location.zone}-${location.row}-${location.column}`
|
|
242
242
|
}
|
|
243
|
-
}
|
|
244
|
-
})
|
|
245
|
-
|
|
246
|
-
this._records = locations
|
|
247
|
-
this._total = locations.length
|
|
248
|
-
|
|
249
|
-
this._config = {
|
|
250
|
-
...this._config,
|
|
251
|
-
pagination: { pages: [20, 50, 100, 200] }
|
|
243
|
+
})
|
|
252
244
|
}
|
|
253
|
-
|
|
254
|
-
this.dataGrist.fetch()
|
|
255
245
|
}
|
|
256
246
|
|
|
257
|
-
async _fetchLocations(filters) {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
zone
|
|
271
|
-
row
|
|
272
|
-
column
|
|
273
|
-
shelf
|
|
274
|
-
}
|
|
275
|
-
total
|
|
247
|
+
async _fetchLocations(filters, fetcherDetail) {
|
|
248
|
+
try {
|
|
249
|
+
const response = await client.query({
|
|
250
|
+
query: gql`
|
|
251
|
+
query locations($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
252
|
+
locations(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
253
|
+
items {
|
|
254
|
+
name
|
|
255
|
+
zone
|
|
256
|
+
row
|
|
257
|
+
column
|
|
258
|
+
shelf
|
|
259
|
+
type
|
|
276
260
|
}
|
|
261
|
+
total
|
|
277
262
|
}
|
|
278
|
-
`,
|
|
279
|
-
variables: {
|
|
280
|
-
filters,
|
|
281
|
-
sortings: sorters
|
|
282
263
|
}
|
|
283
|
-
|
|
264
|
+
`,
|
|
265
|
+
variables: {
|
|
266
|
+
filters,
|
|
267
|
+
paginations: { page: fetcherDetail.page, limit: fetcherDetail.limit },
|
|
268
|
+
sortings: fetcherDetail.sorters
|
|
269
|
+
}
|
|
270
|
+
})
|
|
284
271
|
|
|
285
|
-
|
|
286
|
-
|
|
272
|
+
if (!response.errors) {
|
|
273
|
+
return {
|
|
274
|
+
records: response.data.locations.items || [],
|
|
275
|
+
total: response.data.locations.total || 0
|
|
287
276
|
}
|
|
288
|
-
} catch (e) {
|
|
289
|
-
this._showToast({
|
|
290
|
-
level: 'error',
|
|
291
|
-
message: e
|
|
292
|
-
})
|
|
293
|
-
} finally {
|
|
294
|
-
this.dataGrist.hideSpinner()
|
|
295
277
|
}
|
|
278
|
+
} catch (e) {
|
|
279
|
+
this._showToast({
|
|
280
|
+
level: 'error',
|
|
281
|
+
message: e
|
|
282
|
+
})
|
|
296
283
|
}
|
|
297
284
|
}
|
|
298
285
|
|
|
299
|
-
async _fetchLocationsByGroup(filters) {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
name
|
|
312
|
-
zone
|
|
313
|
-
row
|
|
314
|
-
column
|
|
315
|
-
}
|
|
316
|
-
total
|
|
286
|
+
async _fetchLocationsByGroup(filters, fetcherDetail) {
|
|
287
|
+
try {
|
|
288
|
+
const response = await client.query({
|
|
289
|
+
query: gql`
|
|
290
|
+
query locationsByGroup($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
291
|
+
locationsByGroup(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
292
|
+
items {
|
|
293
|
+
name
|
|
294
|
+
zone
|
|
295
|
+
row
|
|
296
|
+
column
|
|
297
|
+
type
|
|
317
298
|
}
|
|
299
|
+
total
|
|
318
300
|
}
|
|
319
|
-
`,
|
|
320
|
-
variables: {
|
|
321
|
-
filters,
|
|
322
|
-
sortings: sorters
|
|
323
301
|
}
|
|
324
|
-
|
|
302
|
+
`,
|
|
303
|
+
variables: {
|
|
304
|
+
filters,
|
|
305
|
+
paginations: { page: fetcherDetail.page, limit: fetcherDetail.limit },
|
|
306
|
+
sortings: fetcherDetail.sorters
|
|
307
|
+
}
|
|
308
|
+
})
|
|
325
309
|
|
|
326
|
-
|
|
327
|
-
|
|
310
|
+
if (!response.errors) {
|
|
311
|
+
return {
|
|
312
|
+
records: response.data.locationsByGroup.items || [],
|
|
313
|
+
total: response.data.locationsByGroup.total || 0
|
|
328
314
|
}
|
|
329
|
-
} catch (e) {
|
|
330
|
-
this._showToast({
|
|
331
|
-
level: 'error',
|
|
332
|
-
message: e
|
|
333
|
-
})
|
|
334
|
-
} finally {
|
|
335
|
-
this.dataGrist.hideSpinner()
|
|
336
315
|
}
|
|
316
|
+
} catch (e) {
|
|
317
|
+
this._showToast({
|
|
318
|
+
level: 'error',
|
|
319
|
+
message: e
|
|
320
|
+
})
|
|
337
321
|
}
|
|
338
322
|
}
|
|
339
323
|
|
|
340
324
|
_printLocations() {
|
|
341
|
-
|
|
342
|
-
|
|
325
|
+
const records = this.dataGrist.data && this.dataGrist.data.records
|
|
326
|
+
if (records && records.length) {
|
|
327
|
+
this.dispatchEvent(new CustomEvent(i18next.t('text.printing'), { detail: records }))
|
|
343
328
|
history.back()
|
|
344
329
|
} else {
|
|
345
330
|
this._showToast({
|
|
@@ -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 {
|
|
@@ -844,6 +836,15 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
|
|
|
844
836
|
status
|
|
845
837
|
operationGuide
|
|
846
838
|
}
|
|
839
|
+
purchaseOrder {
|
|
840
|
+
id
|
|
841
|
+
name
|
|
842
|
+
bufferLocation {
|
|
843
|
+
id
|
|
844
|
+
name
|
|
845
|
+
description
|
|
846
|
+
}
|
|
847
|
+
}
|
|
847
848
|
}
|
|
848
849
|
}
|
|
849
850
|
`,
|
|
@@ -917,6 +918,13 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
|
|
|
917
918
|
|
|
918
919
|
_fillupANForm(data) {
|
|
919
920
|
this._fillupForm(this.arrivalNoticeForm, data)
|
|
921
|
+
|
|
922
|
+
if (data?.purchaseOrder?.bufferLocation) {
|
|
923
|
+
this.bufferLocationField.value = `${data.purchaseOrder.bufferLocation.name} ${
|
|
924
|
+
data.purchaseOrder.bufferLocation.description ? `(${data.purchaseOrder.bufferLocation.description})` : ''
|
|
925
|
+
}`
|
|
926
|
+
this.bufferLocationField.setAttribute('location-id', data.purchaseOrder.bufferLocation.id)
|
|
927
|
+
}
|
|
920
928
|
}
|
|
921
929
|
|
|
922
930
|
_fillupForm(form, data) {
|
|
@@ -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({
|
|
@@ -340,7 +341,7 @@ class BatchPickingPopup extends localize(i18next)(LitElement) {
|
|
|
340
341
|
|
|
341
342
|
const response = await client.query({
|
|
342
343
|
query: gql`
|
|
343
|
-
query mergedProductOrderInventories($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
|
|
344
|
+
query mergedProductOrderInventories($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
344
345
|
mergedProductOrderInventories(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
345
346
|
items {
|
|
346
347
|
productName
|
|
@@ -2258,7 +2258,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
2258
2258
|
const response = await client.query({
|
|
2259
2259
|
query: gql`
|
|
2260
2260
|
query bulkUploadValidateWarehousePartnersProductsQuantity(
|
|
2261
|
-
$orderInventories: [NewOrderInventory]
|
|
2261
|
+
$orderInventories: [NewOrderInventory!]
|
|
2262
2262
|
$partnerBizplaceId: String!
|
|
2263
2263
|
) {
|
|
2264
2264
|
bulkUploadValidateWarehousePartnersProductsQuantity(
|
|
@@ -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,20 @@ 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
|
+
} else {
|
|
714
|
+
totalAvailableQty = changeRecord.remainQty
|
|
715
|
+
totalAvailableUomValue = changeRecord.remainUomValue
|
|
716
|
+
}
|
|
712
717
|
|
|
713
718
|
try {
|
|
714
719
|
if (changedColumn === 'releaseQty') {
|