@things-factory/operato-wms 4.0.24 → 4.0.25
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/adjustment/transfer-inventory.js +32 -6
- 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 +52 -22
- 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/putaway-product.js +184 -231
- package/client/pages/inbound/undo-unload-popup.js +295 -0
- package/client/pages/inbound/unload-product.js +229 -567
- package/client/pages/inbound/unloaded-inventories-popup.js +129 -0
- package/client/pages/inbound/worksheet-unloading.js +15 -11
- package/client/pages/inventory/inventory-adjustment.js +9 -10
- package/client/pages/master/product/product-list.js +1 -1
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +409 -21
- 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/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-order-detail.js +390 -107
- package/client/pages/order/return-order/create-return-order.js +3 -3
- package/client/pages/order/transport-order/create-delivery-order.js +1 -1
- package/client/pages/order/transport-order/delivery-order-list.js +1 -1
- package/client/pages/outbound/packing-product.js +111 -236
- package/client/pages/outbound/picking-product.js +287 -380
- 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/vas/print-product-label.js +17 -9
- 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/translations/en.json +31 -2
- package/translations/ko.json +32 -3
- package/translations/ms.json +32 -3
- package/translations/zh.json +32 -3
|
@@ -2,6 +2,7 @@ import '@things-factory/grist-ui'
|
|
|
2
2
|
import '../../components/attachment-viewer'
|
|
3
3
|
import '../../components/vas-templates'
|
|
4
4
|
import './release-extra-product-popup'
|
|
5
|
+
import '../../components/popup-note'
|
|
5
6
|
|
|
6
7
|
import gql from 'graphql-tag'
|
|
7
8
|
import { css, html } from 'lit-element'
|
|
@@ -52,7 +53,9 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
52
53
|
_releaseOrder: Object,
|
|
53
54
|
_shippingOrder: Object,
|
|
54
55
|
_containerArrivalDate: Date,
|
|
55
|
-
_containerLeavingDate: Date
|
|
56
|
+
_containerLeavingDate: Date,
|
|
57
|
+
_vasExpanded: Boolean,
|
|
58
|
+
isUserBelongsDomain: Boolean
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
61
|
|
|
@@ -110,6 +113,20 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
110
113
|
padding-top: var(--grist-title-with-grid-padding);
|
|
111
114
|
}
|
|
112
115
|
|
|
116
|
+
.vas[collapsable] {
|
|
117
|
+
height: 40%;
|
|
118
|
+
}
|
|
119
|
+
.vas[collapsable][collapsed] {
|
|
120
|
+
display: none;
|
|
121
|
+
}
|
|
122
|
+
data-grist#vas-grist {
|
|
123
|
+
padding-top: 0px;
|
|
124
|
+
height: 100%;
|
|
125
|
+
}
|
|
126
|
+
h2.vas-title {
|
|
127
|
+
padding-bottom: 0px;
|
|
128
|
+
}
|
|
129
|
+
|
|
113
130
|
[options-wrap] *,
|
|
114
131
|
[attachment-wrap] a * {
|
|
115
132
|
vertical-align: middle;
|
|
@@ -234,18 +251,20 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
234
251
|
/>
|
|
235
252
|
<label for="exportOption">${i18next.t('label.export')}</label>
|
|
236
253
|
|
|
237
|
-
${
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
254
|
+
${
|
|
255
|
+
this._crossDocking
|
|
256
|
+
? html`
|
|
257
|
+
<input
|
|
258
|
+
id="crossDocking"
|
|
259
|
+
type="checkbox"
|
|
260
|
+
name="crossDocking"
|
|
261
|
+
?checked="${this._crossDocking}"
|
|
262
|
+
disabled
|
|
263
|
+
/>
|
|
264
|
+
<label for="crossDocking">${i18next.t('label.cross_docking')}</label>
|
|
265
|
+
`
|
|
266
|
+
: ''
|
|
267
|
+
}
|
|
249
268
|
</div>
|
|
250
269
|
|
|
251
270
|
<label>${i18next.t('label.company')}</label>
|
|
@@ -275,75 +294,81 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
275
294
|
<label ?hidden="${this.roType === 'b2b'}">${i18next.t('label.delivery_address')}</label>
|
|
276
295
|
<textarea name="deliveryAddress1" ?hidden="${this.roType === 'b2b'}" rows="5" readonly></textarea>
|
|
277
296
|
|
|
278
|
-
${
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
>
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
297
|
+
${
|
|
298
|
+
this._crossDocking
|
|
299
|
+
? html`
|
|
300
|
+
<label for="ganNo">${i18next.t('label.arrival_notice')}</label>
|
|
301
|
+
<input disabled name="ganNo" .value="${this._ganNo}" />
|
|
302
|
+
`
|
|
303
|
+
: ''
|
|
304
|
+
}
|
|
305
|
+
${
|
|
306
|
+
this._attachments?.length > 0
|
|
307
|
+
? html`
|
|
308
|
+
<label>${i18next.t('label.attachment')}</label>
|
|
309
|
+
<ul attachment-wrap>
|
|
310
|
+
${(this._attachments || []).map(
|
|
311
|
+
attachment =>
|
|
312
|
+
html`
|
|
313
|
+
<li>
|
|
314
|
+
<a href="${location.origin}/attachment/${attachment.path}" download
|
|
315
|
+
><mwc-icon>attach_file</mwc-icon> ${attachment.name}</a
|
|
316
|
+
>
|
|
317
|
+
</li>
|
|
318
|
+
`
|
|
319
|
+
)}
|
|
320
|
+
</ul>
|
|
321
|
+
`
|
|
322
|
+
: ''
|
|
323
|
+
}
|
|
301
324
|
</fieldset>
|
|
302
325
|
</form>
|
|
303
326
|
|
|
304
327
|
<barcode-tag bcid="qrcode" .value=${this._releaseOrderNo}></barcode-tag>
|
|
305
328
|
</div>
|
|
306
329
|
|
|
307
|
-
${
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
<
|
|
311
|
-
<
|
|
312
|
-
<
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
330
|
+
${
|
|
331
|
+
this._exportOption
|
|
332
|
+
? html`
|
|
333
|
+
<div class="so-form-container">
|
|
334
|
+
<form name="shippingOrder" class="multi-column-form">
|
|
335
|
+
<fieldset>
|
|
336
|
+
<legend>${i18next.t('title.export_order')}</legend>
|
|
337
|
+
<label>${i18next.t('label.container_no')}</label>
|
|
338
|
+
<input name="containerNo" ?readonly="${!this?._editable}" required />
|
|
339
|
+
|
|
340
|
+
<label>${i18next.t('label.container_arrival_date')}</label>
|
|
341
|
+
<input
|
|
342
|
+
name="containerArrivalDate"
|
|
343
|
+
type="date"
|
|
344
|
+
?readonly="${!this?._editable}"
|
|
345
|
+
.value="${this._containerArrivalDate}"
|
|
346
|
+
@change="${e => {
|
|
347
|
+
this._containerLeavingDateInput.setAttribute('min', e.currentTarget.value)
|
|
348
|
+
required
|
|
349
|
+
}}"
|
|
350
|
+
/>
|
|
351
|
+
|
|
352
|
+
<label>${i18next.t('label.container_leaving_date')}</label>
|
|
353
|
+
<input
|
|
354
|
+
name="containerLeavingDate"
|
|
355
|
+
type="date"
|
|
356
|
+
?readonly="${!this?._editable}"
|
|
357
|
+
.value="${this._containerLeavingDate}"
|
|
358
|
+
@change="${e => {
|
|
359
|
+
this._containerArrivalDateInput.setAttribute('max', e.currentTarget.value)
|
|
360
|
+
required
|
|
361
|
+
}}"
|
|
362
|
+
/>
|
|
363
|
+
|
|
364
|
+
<label>${i18next.t('label.ship_name')}</label>
|
|
365
|
+
<input name="shipName" ?readonly="${!this?._editable}" required />
|
|
366
|
+
</fieldset>
|
|
367
|
+
</form>
|
|
368
|
+
</div>
|
|
369
|
+
`
|
|
370
|
+
: ''
|
|
371
|
+
}
|
|
347
372
|
|
|
348
373
|
<div class="container">
|
|
349
374
|
<div class="grist">
|
|
@@ -355,13 +380,24 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
355
380
|
.data=${this.inventoryData}
|
|
356
381
|
></data-grist>
|
|
357
382
|
|
|
358
|
-
<h2
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
383
|
+
<h2
|
|
384
|
+
@click="${e => {
|
|
385
|
+
this._vasExpanded = !this._vasExpanded
|
|
386
|
+
}}"
|
|
387
|
+
>
|
|
388
|
+
<mwc-icon>list_alt</mwc-icon>${i18next.t('title.vas')}<mwc-icon
|
|
389
|
+
>${this._vasExpanded ? 'expand_less' : 'expand_more'}</mwc-icon
|
|
390
|
+
>
|
|
391
|
+
</h2>
|
|
392
|
+
<div class="vas" collapsable ?collapsed=${!this._vasExpanded}>
|
|
393
|
+
<data-grist
|
|
394
|
+
id="vas-grist"
|
|
395
|
+
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
396
|
+
.config=${this.vasGristConfig}
|
|
397
|
+
.data="${this.vasData}"
|
|
398
|
+
></data-grist>
|
|
399
|
+
</div>
|
|
400
|
+
</div>
|
|
365
401
|
</div>
|
|
366
402
|
|
|
367
403
|
<div class="guide-container">${this._template}</div>
|
|
@@ -375,9 +411,11 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
375
411
|
this._editable = false
|
|
376
412
|
this._disableTransport = false
|
|
377
413
|
this._shippingOrder = null
|
|
414
|
+
this._vasExpanded = false
|
|
378
415
|
}
|
|
379
416
|
|
|
380
417
|
get context() {
|
|
418
|
+
this._vasExpanded = false
|
|
381
419
|
let userIsOfficeAdmin = this._userRoles
|
|
382
420
|
? this._userRoles.find(x => x.name?.toLowerCase() === 'office admin')
|
|
383
421
|
: false
|
|
@@ -385,21 +423,74 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
385
423
|
var actions = [
|
|
386
424
|
{
|
|
387
425
|
title: i18next.t('button.back_to_list'),
|
|
388
|
-
action: () =>
|
|
389
|
-
this.roType === 'b2b'
|
|
390
|
-
? userIsOfficeAdmin
|
|
391
|
-
? navigate(`b2b_order_requests`)
|
|
392
|
-
: navigate(`b2b_orders`)
|
|
393
|
-
: navigate(`b2c_order_requests`),
|
|
426
|
+
action: () => (this.roType === 'b2b' ? navigate(`b2b_orders`) : navigate(`b2c_order_requests`)),
|
|
394
427
|
...CommonButtonStyles.back
|
|
395
428
|
}
|
|
396
429
|
]
|
|
397
|
-
if (this.
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
430
|
+
if (this.isUserBelongsDomain) {
|
|
431
|
+
if (this._status === ORDER_STATUS.PENDING_RECEIVE.value && !this._crossDocking) {
|
|
432
|
+
actions.push(
|
|
433
|
+
{
|
|
434
|
+
title: i18next.t('button.reject'),
|
|
435
|
+
action: this._rejectReleaseOrder.bind(this),
|
|
436
|
+
...CommonButtonStyles.reject
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
title: i18next.t('button.receive'),
|
|
440
|
+
action: this._receiveReleaseOrder.bind(this),
|
|
441
|
+
...CommonButtonStyles.confirm
|
|
442
|
+
}
|
|
443
|
+
)
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
if (this._status === ORDER_STATUS.PENDING_CANCEL.value && !this._crossDocking) {
|
|
447
|
+
actions.push(
|
|
448
|
+
{
|
|
449
|
+
title: i18next.t('button.approve_cancellation'),
|
|
450
|
+
action: this._confirmCancellationReleaseOrder.bind(this),
|
|
451
|
+
...CommonButtonStyles.cancel
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
title: i18next.t('button.reject_cancellation'),
|
|
455
|
+
action: this._rejectCancellationReleaseOrder.bind(this),
|
|
456
|
+
...CommonButtonStyles.reject
|
|
457
|
+
}
|
|
458
|
+
)
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
if (this._status === ORDER_STATUS.PENDING_WORKSHEET.value && !this._crossDocking) {
|
|
462
|
+
actions.push({
|
|
463
|
+
title: i18next.t('button.generate_picking_worksheet'),
|
|
464
|
+
action: this._generateSinglePickingWorksheet.bind(this),
|
|
465
|
+
...CommonButtonStyles.generate
|
|
466
|
+
})
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
if (this._crossDocking) {
|
|
470
|
+
const params = new URLSearchParams()
|
|
471
|
+
params.append('name', this._ganNo)
|
|
472
|
+
actions.push({
|
|
473
|
+
title: i18next.t('button.move_to_x', { state: { x: i18next.t('title.arrival_notice') } }),
|
|
474
|
+
action: () => navigate(`arrival_notice_requests?${params.toString()}`)
|
|
475
|
+
})
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
if (this._editable) {
|
|
479
|
+
actions.push({
|
|
480
|
+
title: i18next.t('button.update_order_details'),
|
|
481
|
+
action: this._updateReleaseGoodDetails.bind(this),
|
|
482
|
+
...CommonButtonStyles.add
|
|
483
|
+
})
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
let addProductStatus = [ORDER_STATUS.PICKING.value, ORDER_STATUS.LOADING.value]
|
|
487
|
+
if (addProductStatus.indexOf(this._status) >= 0 && this._allowROAddProductSetting) {
|
|
488
|
+
actions.push({
|
|
489
|
+
title: i18next.t('button.edit'),
|
|
490
|
+
action: this._openExtraProductPopup.bind(this),
|
|
491
|
+
...CommonButtonStyles.edit
|
|
492
|
+
})
|
|
493
|
+
}
|
|
403
494
|
}
|
|
404
495
|
|
|
405
496
|
if (this._status === ORDER_STATUS.PENDING.value) {
|
|
@@ -432,15 +523,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
432
523
|
})
|
|
433
524
|
}
|
|
434
525
|
|
|
435
|
-
let addProductStatus = [ORDER_STATUS.PICKING.value, ORDER_STATUS.LOADING.value]
|
|
436
|
-
if (addProductStatus.indexOf(this._status) >= 0 && this._allowROAddProductSetting) {
|
|
437
|
-
actions.push({
|
|
438
|
-
title: i18next.t('button.edit'),
|
|
439
|
-
action: this._openExtraProductPopup.bind(this),
|
|
440
|
-
...CommonButtonStyles.edit
|
|
441
|
-
})
|
|
442
|
-
}
|
|
443
|
-
|
|
444
526
|
return {
|
|
445
527
|
title: i18next.t('title.release_order_detail'),
|
|
446
528
|
actions
|
|
@@ -493,6 +575,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
493
575
|
}
|
|
494
576
|
|
|
495
577
|
async pageInitialized() {
|
|
578
|
+
this.isUserBelongsDomain = await this._checkUserBelongsDomain()
|
|
496
579
|
let [allowROAddProductSetting, userRoles] = [fetchSettingRule('allow-ro-add-product'), this.fetchUserRoleHandler()]
|
|
497
580
|
let [enableTransportationServiceSetting] = await Promise.all([fetchSettingRule('enable-transportation-service')])
|
|
498
581
|
|
|
@@ -882,6 +965,188 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
882
965
|
}
|
|
883
966
|
}
|
|
884
967
|
|
|
968
|
+
async _rejectReleaseOrder() {
|
|
969
|
+
const popup = openPopup(
|
|
970
|
+
html`
|
|
971
|
+
<popup-note
|
|
972
|
+
.title="${i18next.t('title.remark')}"
|
|
973
|
+
@submit="${async e => {
|
|
974
|
+
try {
|
|
975
|
+
if (!e.detail.value) throw new Error(i18next.t('text.remark_is_empty'))
|
|
976
|
+
const result = await CustomAlert({
|
|
977
|
+
title: i18next.t('title.are_you_sure'),
|
|
978
|
+
text: i18next.t('text.reject_release_order'),
|
|
979
|
+
confirmButton: { text: i18next.t('button.confirm') },
|
|
980
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
981
|
+
})
|
|
982
|
+
|
|
983
|
+
if (!result.value) {
|
|
984
|
+
return
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
if (this._crossDocking) {
|
|
988
|
+
const result = await CustomAlert({
|
|
989
|
+
title: i18next.t('title.cross_docking'),
|
|
990
|
+
text: i18next.t('text.related_order_will_be_rejected'),
|
|
991
|
+
confirmButton: { text: i18next.t('button.confirm') },
|
|
992
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
993
|
+
})
|
|
994
|
+
|
|
995
|
+
if (!result.value) return
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
const response = await client.mutate({
|
|
999
|
+
mutation: gql`
|
|
1000
|
+
mutation rejectReleaseGood($name: String!, $patch: ReleaseGoodPatch!) {
|
|
1001
|
+
rejectReleaseGood(name: $name, patch: $patch) {
|
|
1002
|
+
name
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
`,
|
|
1006
|
+
variables: { name: this._releaseOrderNo, patch: { remark: e.detail.value } }
|
|
1007
|
+
})
|
|
1008
|
+
|
|
1009
|
+
if (!response.errors) {
|
|
1010
|
+
if (this.roType === 'b2b') {
|
|
1011
|
+
navigate(`b2b_orders`)
|
|
1012
|
+
} else {
|
|
1013
|
+
navigate(`b2c_order_requests`)
|
|
1014
|
+
}
|
|
1015
|
+
this._showToast({ message: i18next.t('text.release_order_rejected') })
|
|
1016
|
+
}
|
|
1017
|
+
} catch (e) {
|
|
1018
|
+
this._showToast(e)
|
|
1019
|
+
}
|
|
1020
|
+
}}"
|
|
1021
|
+
></popup-note>
|
|
1022
|
+
`,
|
|
1023
|
+
{
|
|
1024
|
+
backdrop: true,
|
|
1025
|
+
size: 'medium',
|
|
1026
|
+
title: i18next.t('title.reject_release_order')
|
|
1027
|
+
}
|
|
1028
|
+
)
|
|
1029
|
+
|
|
1030
|
+
popup.onclosed
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
async _receiveReleaseOrder() {
|
|
1034
|
+
try {
|
|
1035
|
+
const result = await CustomAlert({
|
|
1036
|
+
title: i18next.t('title.are_you_sure'),
|
|
1037
|
+
text: i18next.t('text.accept_release_order'),
|
|
1038
|
+
confirmButton: { text: i18next.t('button.confirm') },
|
|
1039
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
1040
|
+
})
|
|
1041
|
+
|
|
1042
|
+
if (!result.value) {
|
|
1043
|
+
return
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
const response = await client.mutate({
|
|
1047
|
+
mutation: gql`
|
|
1048
|
+
mutation receiveReleaseGood($name: String!) {
|
|
1049
|
+
receiveReleaseGood(name: $name) {
|
|
1050
|
+
name
|
|
1051
|
+
status
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
`,
|
|
1055
|
+
variables: { name: this._releaseOrderNo }
|
|
1056
|
+
})
|
|
1057
|
+
|
|
1058
|
+
if (!response.errors) {
|
|
1059
|
+
this._status = response.data.receiveReleaseGood.status
|
|
1060
|
+
this.updateContext()
|
|
1061
|
+
this._showToast({ message: i18next.t('text.release_order_received') })
|
|
1062
|
+
}
|
|
1063
|
+
} catch (e) {
|
|
1064
|
+
this._showToast(e)
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
async _confirmCancellationReleaseOrder() {
|
|
1069
|
+
try {
|
|
1070
|
+
const result = await CustomAlert({
|
|
1071
|
+
title: i18next.t('title.are_you_sure'),
|
|
1072
|
+
text: i18next.t('text.you_wont_be_able_to_revert_this'),
|
|
1073
|
+
confirmButton: { text: i18next.t('button.confirm') },
|
|
1074
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
1075
|
+
})
|
|
1076
|
+
|
|
1077
|
+
if (!result.value) return
|
|
1078
|
+
|
|
1079
|
+
const response = await client.mutate({
|
|
1080
|
+
mutation: gql`
|
|
1081
|
+
mutation confirmCancellationReleaseOrder($name: String!) {
|
|
1082
|
+
confirmCancellationReleaseOrder(name: $name)
|
|
1083
|
+
}
|
|
1084
|
+
`,
|
|
1085
|
+
variables: { name: this._releaseOrderNo }
|
|
1086
|
+
})
|
|
1087
|
+
|
|
1088
|
+
if (!response.errors) {
|
|
1089
|
+
this._showToast({ message: i18next.t('text.release_order_has_been_cancelled') })
|
|
1090
|
+
this.roType === 'b2b' ? navigate(`b2b_orders`) : navigate(`b2c_order_requests`)
|
|
1091
|
+
}
|
|
1092
|
+
} catch (e) {
|
|
1093
|
+
throw e
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
async _rejectCancellationReleaseOrder() {
|
|
1098
|
+
try {
|
|
1099
|
+
const result = await CustomAlert({
|
|
1100
|
+
title: i18next.t('title.are_you_sure'),
|
|
1101
|
+
text: i18next.t('text.you_wont_be_able_to_revert_this'),
|
|
1102
|
+
confirmButton: { text: i18next.t('button.confirm') },
|
|
1103
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
1104
|
+
})
|
|
1105
|
+
|
|
1106
|
+
if (!result.value) return
|
|
1107
|
+
|
|
1108
|
+
const response = await client.mutate({
|
|
1109
|
+
mutation: gql`
|
|
1110
|
+
mutation rejectCancellationReleaseOrder($name: String!) {
|
|
1111
|
+
rejectCancellationReleaseOrder(name: $name)
|
|
1112
|
+
}
|
|
1113
|
+
`,
|
|
1114
|
+
variables: { name: this._releaseOrderNo }
|
|
1115
|
+
})
|
|
1116
|
+
|
|
1117
|
+
if (!response.errors) {
|
|
1118
|
+
this._showToast({ message: i18next.t('text.cancellation_request_has_been_rejected') })
|
|
1119
|
+
this.roType === 'b2b' ? navigate(`b2b_orders`) : navigate(`b2c_order_requests`)
|
|
1120
|
+
}
|
|
1121
|
+
} catch (e) {
|
|
1122
|
+
throw e
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
async _generateSinglePickingWorksheet() {
|
|
1127
|
+
try {
|
|
1128
|
+
const response = await client.mutate({
|
|
1129
|
+
mutation: gql`
|
|
1130
|
+
mutation generateReleaseGoodWorksheet($releaseGoodNo: String!) {
|
|
1131
|
+
generateReleaseGoodWorksheet(releaseGoodNo: $releaseGoodNo) {
|
|
1132
|
+
pickingWorksheet {
|
|
1133
|
+
name
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
`,
|
|
1138
|
+
variables: { releaseGoodNo: this._releaseOrderNo }
|
|
1139
|
+
})
|
|
1140
|
+
|
|
1141
|
+
if (!response.errors) {
|
|
1142
|
+
navigate('single_outbound_worksheets')
|
|
1143
|
+
this._showToast({ message: i18next.t('text.worksheet_has_been_generated') })
|
|
1144
|
+
}
|
|
1145
|
+
} catch (e) {
|
|
1146
|
+
this._showToast(e)
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
|
|
885
1150
|
get _isDownloadable() {
|
|
886
1151
|
return this._status !== ORDER_STATUS.PENDING.value
|
|
887
1152
|
}
|
|
@@ -969,7 +1234,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
969
1234
|
|
|
970
1235
|
if (!response.errors) {
|
|
971
1236
|
this._showToast({ message: i18next.t('text.release_order_has_been_deleted') })
|
|
972
|
-
|
|
1237
|
+
navigate(`b2b_orders`)
|
|
973
1238
|
}
|
|
974
1239
|
} catch (e) {
|
|
975
1240
|
this._showToast(e)
|
|
@@ -1002,7 +1267,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1002
1267
|
|
|
1003
1268
|
if (!response.errors) {
|
|
1004
1269
|
this._showToast({ message: i18next.t('text.release_order_is_submitted_for_cancellation') })
|
|
1005
|
-
|
|
1270
|
+
navigate(`b2b_orders`)
|
|
1006
1271
|
}
|
|
1007
1272
|
} catch (e) {
|
|
1008
1273
|
throw e
|
|
@@ -1066,7 +1331,25 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1066
1331
|
|
|
1067
1332
|
if (!response.errors) {
|
|
1068
1333
|
this._showToast({ message: i18next.t('text.release_order_confirmed') })
|
|
1069
|
-
|
|
1334
|
+
navigate(`b2b_orders`)
|
|
1335
|
+
}
|
|
1336
|
+
} catch (e) {
|
|
1337
|
+
this._showToast(e)
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
async _checkUserBelongsDomain() {
|
|
1342
|
+
try {
|
|
1343
|
+
const response = await client.query({
|
|
1344
|
+
query: gql`
|
|
1345
|
+
query {
|
|
1346
|
+
checkUserBelongsDomain
|
|
1347
|
+
}
|
|
1348
|
+
`
|
|
1349
|
+
})
|
|
1350
|
+
|
|
1351
|
+
if (!response.errors) {
|
|
1352
|
+
return response.data.checkUserBelongsDomain
|
|
1070
1353
|
}
|
|
1071
1354
|
} catch (e) {
|
|
1072
1355
|
this._showToast(e)
|
|
@@ -313,9 +313,9 @@ class CreateReturnOrder extends localize(i18next)(PageView) {
|
|
|
313
313
|
this._warehouseTransport = false
|
|
314
314
|
this._checkTransport = false
|
|
315
315
|
|
|
316
|
-
if (this._ownTransportInput) {
|
|
317
|
-
|
|
318
|
-
}
|
|
316
|
+
// if (this._ownTransportInput) {
|
|
317
|
+
// this._ownTransportInput.checked = false
|
|
318
|
+
// }
|
|
319
319
|
|
|
320
320
|
if (this._etaDateInput) {
|
|
321
321
|
this._etaDateInput.value = ''
|
|
@@ -744,7 +744,7 @@ class CreateDeliveryOrder extends localize(i18next)(PageView) {
|
|
|
744
744
|
mutation createDeliveryOrder(
|
|
745
745
|
$orderInfo: NewDeliveryOrder
|
|
746
746
|
$customerBizplace: ObjectRef
|
|
747
|
-
$targetInventories: [NewOrderInventory]
|
|
747
|
+
$targetInventories: [NewOrderInventory!]
|
|
748
748
|
$attachments: [Upload!]
|
|
749
749
|
) {
|
|
750
750
|
createDeliveryOrder(
|
|
@@ -312,7 +312,7 @@ class DeliveryOrderList extends localize(i18next)(PageView) {
|
|
|
312
312
|
|
|
313
313
|
const response = await client.query({
|
|
314
314
|
query: gql`
|
|
315
|
-
query deliveryOrders($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
|
|
315
|
+
query deliveryOrders($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
316
316
|
deliveryOrders(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
317
317
|
items {
|
|
318
318
|
id
|