@things-factory/operato-wms 4.0.25 → 4.0.29
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/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/validate-ro-popup.js +14 -54
- 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 +16 -8
- package/client/pages/inbound/putaway-worksheet-generate-popup.js +4 -4
- package/client/pages/inbound/unload-product.js +16 -88
- package/client/pages/inbound/vas-selector.js +9 -8
- 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 +61 -52
- package/client/pages/master/pallet-list.js +34 -30
- package/client/pages/master/print-location-label.js +142 -156
- package/client/pages/master/warehouse-list.js +33 -29
- package/client/pages/master/worker-list.js +30 -30
- package/client/pages/order/arrival-notice/assign-buffer-location.js +1 -1
- 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-detail.js +7 -6
- package/client/pages/order/goods-received-note/received-note-list.js +9 -8
- package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +1 -1
- package/client/pages/order/release-order/release-extra-product-popup.js +3 -7
- package/client/pages/order/release-order/release-order-detail.js +2 -2
- package/client/pages/order/return-order/check-return-order.js +15 -13
- 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/delivery-note-popup.js +52 -46
- 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 +6 -0
- package/client/pages/outbound/picking-product.js +1 -0
- package/client/pages/outbound/single-outbound-worksheet.js +9 -8
- package/client/pages/outbound/worksheet-loading.js +16 -14
- package/client/pages/outbound/worksheet-packing.js +15 -13
- package/client/pages/report/custom-elccl/elccl-daily-collection-report.js +8 -9
- package/client/pages/report/custom-elccl/elccl-daily-order-inventory-report.js +26 -25
- package/client/pages/report/custom-elccl/elccl-delivery-order-summary.js +10 -9
- package/client/pages/report/custom-elccl/elccl-inventory-pallet-detail-report.js +13 -8
- package/client/pages/report/custom-elccl/elccl-inventory-report.js +11 -10
- package/client/pages/report/inventory-pallet-report.js +13 -12
- package/client/pages/report/job-sheet-list.js +9 -8
- 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 +47 -34
- package/client/pages/vas/execute-pure-vas.js +66 -62
- package/client/pages/vas/execute-ref-vas.js +39 -41
- package/client/pages/vas/related-vas-list.js +7 -6
- package/client/pages/vas/target-inventory-assignment-popup.js +16 -14
- package/client/pages/vas/vas-pallet-label-popup.js +1 -1
- package/client/pages/vas/vas-worksheet-list.js +9 -8
- package/client/pages/vas/worksheet-ref-vas.js +7 -6
- package/client/pages/vas/worksheet-vas.js +16 -14
- package/client/route.js +16 -32
- package/package.json +65 -65
- package/things-factory.config.js +0 -16
- package/translations/en.json +3 -0
- package/translations/ko.json +3 -1
- package/translations/ms.json +3 -1
- package/translations/zh.json +3 -1
- 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
package/client/bootstrap.js
CHANGED
|
@@ -4,7 +4,7 @@ import '@things-factory/notification'
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { html } from 'lit-element'
|
|
6
6
|
|
|
7
|
-
import { registerDefaultGroups } from '@operato/board/
|
|
7
|
+
import { registerDefaultGroups } from '@operato/board/register-default-groups.js'
|
|
8
8
|
import { APPEND_APP_TOOL } from '@things-factory/apptool-base'
|
|
9
9
|
import { auth } from '@things-factory/auth-base'
|
|
10
10
|
import { setAuthManagementMenus } from '@things-factory/auth-ui'
|
|
@@ -4,7 +4,7 @@ import '@things-factory/grist-ui'
|
|
|
4
4
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
5
|
import { getCodeByName } from '@things-factory/code-base'
|
|
6
6
|
import { client, PageView, store, UPDATE_CONTEXT } from '@things-factory/shell'
|
|
7
|
-
import {
|
|
7
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
8
8
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
9
9
|
import gql from 'graphql-tag'
|
|
10
10
|
import { css, html } from 'lit-element'
|
|
@@ -386,24 +386,22 @@ class ClaimChitDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
386
386
|
|
|
387
387
|
const response = await client.query({
|
|
388
388
|
query: gql`
|
|
389
|
-
query {
|
|
390
|
-
claim(${
|
|
391
|
-
id: this._claimId
|
|
392
|
-
})}) {
|
|
389
|
+
query claim($id: String!) {
|
|
390
|
+
claim(id: $id) {
|
|
393
391
|
id
|
|
394
392
|
name
|
|
395
393
|
description
|
|
396
394
|
billingMode
|
|
397
|
-
transportDriver{
|
|
395
|
+
transportDriver {
|
|
398
396
|
id
|
|
399
397
|
name
|
|
400
398
|
driverCode
|
|
401
399
|
}
|
|
402
|
-
transportVehicle{
|
|
400
|
+
transportVehicle {
|
|
403
401
|
id
|
|
404
402
|
name
|
|
405
403
|
}
|
|
406
|
-
bizplace{
|
|
404
|
+
bizplace {
|
|
407
405
|
id
|
|
408
406
|
name
|
|
409
407
|
}
|
|
@@ -420,7 +418,7 @@ class ClaimChitDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
420
418
|
claimOrders {
|
|
421
419
|
id
|
|
422
420
|
name
|
|
423
|
-
}
|
|
421
|
+
}
|
|
424
422
|
claimDetails {
|
|
425
423
|
id
|
|
426
424
|
name
|
|
@@ -430,7 +428,8 @@ class ClaimChitDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
430
428
|
}
|
|
431
429
|
}
|
|
432
430
|
}
|
|
433
|
-
|
|
431
|
+
`,
|
|
432
|
+
variables: { id: this._claimId }
|
|
434
433
|
})
|
|
435
434
|
|
|
436
435
|
if (!response.errors) {
|
|
@@ -528,17 +527,15 @@ class ClaimChitDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
528
527
|
try {
|
|
529
528
|
var result = await client.query({
|
|
530
529
|
query: gql`
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
name
|
|
538
|
-
description
|
|
530
|
+
query claimOrderList($transportDriver: String, $transportVehicle: String) {
|
|
531
|
+
claimOrderList(tranportDriver: $transportDriver, transportVehicle: $transportVehicle) {
|
|
532
|
+
id
|
|
533
|
+
name
|
|
534
|
+
description
|
|
535
|
+
}
|
|
539
536
|
}
|
|
540
|
-
|
|
541
|
-
|
|
537
|
+
`,
|
|
538
|
+
variables: { transportDriver: this._selectedDriver, transportVehicle: this._selectedTruck }
|
|
542
539
|
})
|
|
543
540
|
if (!result.errors) {
|
|
544
541
|
this._claimOrderGristConfig = {
|
|
@@ -584,15 +581,17 @@ class ClaimChitDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
584
581
|
async fetchBizplaceList() {
|
|
585
582
|
return await client.query({
|
|
586
583
|
query: gql`
|
|
587
|
-
query {
|
|
588
|
-
bizplaces
|
|
589
|
-
items{
|
|
584
|
+
query bizplaces($filters: [Filter!], $pagination: Pagination) {
|
|
585
|
+
bizplaces(filters: $filters, pagination: $pagination) {
|
|
586
|
+
items {
|
|
590
587
|
id
|
|
591
588
|
name
|
|
592
589
|
description
|
|
593
590
|
}
|
|
594
591
|
}
|
|
595
|
-
}
|
|
592
|
+
}
|
|
593
|
+
`,
|
|
594
|
+
variables: { filters: [], pagination: { page: 1, limit: 9999 } }
|
|
596
595
|
})
|
|
597
596
|
}
|
|
598
597
|
|
|
@@ -639,18 +638,16 @@ class ClaimChitDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
639
638
|
async _updateClaim() {
|
|
640
639
|
try {
|
|
641
640
|
var result = this._getClaimData()
|
|
642
|
-
const response = await client.
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
})}) {
|
|
649
|
-
id
|
|
650
|
-
name
|
|
651
|
-
}
|
|
641
|
+
const response = await client.mutate({
|
|
642
|
+
mutation: gql`
|
|
643
|
+
mutation updateClaim($id: String!, $patch: ClaimPatch!) {
|
|
644
|
+
updateClaim(id: $id, patch: $patch) {
|
|
645
|
+
id
|
|
646
|
+
name
|
|
652
647
|
}
|
|
653
|
-
|
|
648
|
+
}
|
|
649
|
+
`,
|
|
650
|
+
variables: { id: this._claimId, patch: result }
|
|
654
651
|
})
|
|
655
652
|
if (!response.errors) {
|
|
656
653
|
this._showToast({ message: i18next.t('claim_updated') })
|
|
@@ -3,7 +3,7 @@ import '@things-factory/grist-ui'
|
|
|
3
3
|
|
|
4
4
|
import { PageView, client, navigate, store } from '@things-factory/shell'
|
|
5
5
|
import { css, html } from 'lit-element'
|
|
6
|
-
import { flattenObject,
|
|
6
|
+
import { flattenObject, isMobileDevice } from '@things-factory/utils'
|
|
7
7
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
8
8
|
|
|
9
9
|
import { ScrollbarStyles } from '@things-factory/styles'
|
|
@@ -234,14 +234,16 @@ class ClaimChitList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
234
234
|
async fetchDriverList() {
|
|
235
235
|
let result = await client.query({
|
|
236
236
|
query: gql`
|
|
237
|
-
query {
|
|
238
|
-
transportDrivers
|
|
239
|
-
items{
|
|
237
|
+
query transportDrivers($filters: [Filter!], $pagination: Pagination) {
|
|
238
|
+
transportDrivers(filters: $filters, pagination: $pagination) {
|
|
239
|
+
items {
|
|
240
240
|
id
|
|
241
241
|
name
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
}
|
|
244
|
+
}
|
|
245
|
+
`,
|
|
246
|
+
variables: { filters: [], pagination: { page: 1, limit: 9999 } }
|
|
245
247
|
})
|
|
246
248
|
return result.data.transportDrivers.items
|
|
247
249
|
}
|
|
@@ -249,29 +251,26 @@ class ClaimChitList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
249
251
|
async fetchVehicleList() {
|
|
250
252
|
let result = await client.query({
|
|
251
253
|
query: gql`
|
|
252
|
-
query {
|
|
253
|
-
transportVehicles
|
|
254
|
-
items{
|
|
254
|
+
query transportVehicles($filters: [Filter!], $pagination: Pagination) {
|
|
255
|
+
transportVehicles(filters: $filters, pagination: $pagination) {
|
|
256
|
+
items {
|
|
255
257
|
id
|
|
256
258
|
name
|
|
257
259
|
}
|
|
258
260
|
}
|
|
259
|
-
}
|
|
261
|
+
}
|
|
262
|
+
`,
|
|
263
|
+
variables: { filters: [], pagination: { page: 1, limit: 9999 } }
|
|
260
264
|
})
|
|
261
265
|
return result.data.transportVehicles.items
|
|
262
266
|
}
|
|
263
267
|
|
|
264
268
|
async fetchHandler({ page, limit, sorters = [{ name: 'createdAt', desc: true }] }) {
|
|
265
269
|
try {
|
|
266
|
-
let args = gqlBuilder.buildArgs({
|
|
267
|
-
filters: [...this.searchForm.queryFilters],
|
|
268
|
-
pagination: { page, limit },
|
|
269
|
-
sortings: sorters
|
|
270
|
-
})
|
|
271
270
|
const response = await client.query({
|
|
272
271
|
query: gql`
|
|
273
|
-
query {
|
|
274
|
-
claims($
|
|
272
|
+
query claims($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
273
|
+
claims(filters: $filters, pagination: $pagination, sortings: $sortings)
|
|
275
274
|
items {
|
|
276
275
|
id
|
|
277
276
|
name
|
|
@@ -307,7 +306,8 @@ class ClaimChitList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
307
306
|
total
|
|
308
307
|
}
|
|
309
308
|
}
|
|
310
|
-
|
|
309
|
+
`,
|
|
310
|
+
variables: { filters: [...this.searchForm.queryFilters], pagination: { page, limit }, sortings: sorters }
|
|
311
311
|
})
|
|
312
312
|
|
|
313
313
|
if (!response.errors) {
|
|
@@ -4,7 +4,7 @@ import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
|
4
4
|
import '@things-factory/grist-ui'
|
|
5
5
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
6
6
|
import { client, PageView, store } from '@things-factory/shell'
|
|
7
|
-
import {
|
|
7
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
8
8
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
9
9
|
import gql from 'graphql-tag'
|
|
10
10
|
import { css, html } from 'lit-element'
|
|
@@ -434,39 +434,43 @@ class CreateClaimChit extends connect(store)(localize(i18next)(PageView)) {
|
|
|
434
434
|
async fetchDriverList() {
|
|
435
435
|
return await client.query({
|
|
436
436
|
query: gql`
|
|
437
|
-
query {
|
|
438
|
-
|
|
439
|
-
items{
|
|
437
|
+
query transportDrivers($filters: [Filter!], $pagination: Pagination) {
|
|
438
|
+
tranportDrivers(filters: $filters, pagination: $pagination) {
|
|
439
|
+
items {
|
|
440
440
|
id
|
|
441
441
|
name
|
|
442
442
|
description
|
|
443
443
|
driverCode
|
|
444
|
-
bizplace{
|
|
444
|
+
bizplace {
|
|
445
445
|
id
|
|
446
446
|
name
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
-
}
|
|
450
|
+
}
|
|
451
|
+
`,
|
|
452
|
+
variables: { filters: [], pagination: { page: 1, limit: 9999 } }
|
|
451
453
|
})
|
|
452
454
|
}
|
|
453
455
|
|
|
454
456
|
async fetchVehicleList() {
|
|
455
457
|
return await client.query({
|
|
456
458
|
query: gql`
|
|
457
|
-
query {
|
|
458
|
-
transportVehicles
|
|
459
|
-
items{
|
|
459
|
+
query transportVehicles($filters: [Filter!], $pagination: Pagination) {
|
|
460
|
+
transportVehicles(filters: $filters, pagination: $pagination) {
|
|
461
|
+
items {
|
|
460
462
|
id
|
|
461
463
|
name
|
|
462
464
|
description
|
|
463
|
-
bizplace{
|
|
465
|
+
bizplace {
|
|
464
466
|
id
|
|
465
467
|
name
|
|
466
468
|
}
|
|
467
469
|
}
|
|
468
470
|
}
|
|
469
|
-
}
|
|
471
|
+
}
|
|
472
|
+
`,
|
|
473
|
+
variables: { filters: [], pagination: { page: 1, limit: 9999 } }
|
|
470
474
|
})
|
|
471
475
|
}
|
|
472
476
|
|
|
@@ -474,14 +478,17 @@ class CreateClaimChit extends connect(store)(localize(i18next)(PageView)) {
|
|
|
474
478
|
return await client.query({
|
|
475
479
|
query: gql`
|
|
476
480
|
query {
|
|
477
|
-
bizplaces ($
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
481
|
+
bizplaces ($filters: [Filter!], $pagination: Pagination){
|
|
482
|
+
bizplaces (filters: $filters, pagination: $pagination){
|
|
483
|
+
items{
|
|
484
|
+
id
|
|
485
|
+
name
|
|
486
|
+
description
|
|
487
|
+
}
|
|
482
488
|
}
|
|
483
489
|
}
|
|
484
|
-
}
|
|
490
|
+
}`,
|
|
491
|
+
variables: { filters: [], pagination: { page: 1, limit: 9999 } }
|
|
485
492
|
})
|
|
486
493
|
}
|
|
487
494
|
|
|
@@ -493,16 +500,15 @@ class CreateClaimChit extends connect(store)(localize(i18next)(PageView)) {
|
|
|
493
500
|
var result = await client.query({
|
|
494
501
|
query: gql`
|
|
495
502
|
query {
|
|
496
|
-
claimOrderList (${
|
|
497
|
-
transportDriver:
|
|
498
|
-
transportVehicle: this._selectedTruck
|
|
499
|
-
})}){
|
|
503
|
+
claimOrderList ($transportDriver: String, $transportVehicle: String){
|
|
504
|
+
claimOrderList (transportDriver: $transportDriver, transportVehicle: $transportVehicle)
|
|
500
505
|
id
|
|
501
506
|
name
|
|
502
507
|
description
|
|
503
508
|
}
|
|
504
509
|
}
|
|
505
|
-
|
|
510
|
+
`,
|
|
511
|
+
variables: { transportDriver: this._selectedDriver, transportVehicle: this._selectedTruck }
|
|
506
512
|
})
|
|
507
513
|
if (!result.errors) {
|
|
508
514
|
this._claimOrderGristConfig = {
|
|
@@ -538,17 +544,20 @@ class CreateClaimChit extends connect(store)(localize(i18next)(PageView)) {
|
|
|
538
544
|
try {
|
|
539
545
|
var result = this._getClaimData()
|
|
540
546
|
this._validateData(result)
|
|
541
|
-
const response = await client.
|
|
542
|
-
|
|
547
|
+
const response = await client.mutate({
|
|
548
|
+
mutation: gql`
|
|
543
549
|
mutation {
|
|
544
|
-
createClaim(${
|
|
545
|
-
claim:
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
550
|
+
createClaim($claim: NewClaim!) {
|
|
551
|
+
createClaim(claim: $claim){
|
|
552
|
+
id
|
|
553
|
+
name
|
|
554
|
+
}
|
|
549
555
|
}
|
|
550
556
|
}
|
|
551
|
-
|
|
557
|
+
`,
|
|
558
|
+
variables: {
|
|
559
|
+
claim: result
|
|
560
|
+
}
|
|
552
561
|
})
|
|
553
562
|
if (!response.errors) {
|
|
554
563
|
this._resetAll()
|
|
@@ -3,7 +3,7 @@ import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
|
3
3
|
import '@things-factory/grist-ui'
|
|
4
4
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
5
|
import { client, PageView, store } from '@things-factory/shell'
|
|
6
|
-
import { flattenObject,
|
|
6
|
+
import { flattenObject, isMobileDevice } from '@things-factory/utils'
|
|
7
7
|
import gql from 'graphql-tag'
|
|
8
8
|
import { css, html } from 'lit-element'
|
|
9
9
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
@@ -272,47 +272,46 @@ class TransportSummaryReport extends connect(store)(localize(i18next)(PageView))
|
|
|
272
272
|
|
|
273
273
|
var result = await client.query({
|
|
274
274
|
query: gql`
|
|
275
|
-
query {
|
|
276
|
-
claimDetails
|
|
277
|
-
|
|
278
|
-
})}){
|
|
279
|
-
deliveryOrder{
|
|
275
|
+
query claimDetails($filters: [Filter!]) {
|
|
276
|
+
claimDetails(filters: $filters) {
|
|
277
|
+
deliveryOrder {
|
|
280
278
|
deliveryDateTime
|
|
281
279
|
from
|
|
282
280
|
to
|
|
283
281
|
loadType
|
|
284
|
-
transportDriver{
|
|
282
|
+
transportDriver {
|
|
285
283
|
id
|
|
286
284
|
name
|
|
287
285
|
}
|
|
288
|
-
transportVehicle{
|
|
286
|
+
transportVehicle {
|
|
289
287
|
id
|
|
290
288
|
name
|
|
291
289
|
}
|
|
292
|
-
bizplace{
|
|
290
|
+
bizplace {
|
|
293
291
|
name
|
|
294
292
|
}
|
|
295
|
-
}
|
|
296
|
-
collectionOrder{
|
|
293
|
+
}
|
|
294
|
+
collectionOrder {
|
|
297
295
|
collectionDateTime
|
|
298
296
|
from
|
|
299
297
|
to
|
|
300
298
|
loadType
|
|
301
|
-
transportDriver{
|
|
299
|
+
transportDriver {
|
|
302
300
|
id
|
|
303
301
|
name
|
|
304
302
|
}
|
|
305
|
-
transportVehicle{
|
|
303
|
+
transportVehicle {
|
|
306
304
|
id
|
|
307
305
|
name
|
|
308
306
|
}
|
|
309
|
-
bizplace{
|
|
307
|
+
bizplace {
|
|
310
308
|
name
|
|
311
309
|
}
|
|
312
|
-
}
|
|
310
|
+
}
|
|
313
311
|
}
|
|
314
312
|
}
|
|
315
|
-
|
|
313
|
+
`,
|
|
314
|
+
variables: { filters }
|
|
316
315
|
})
|
|
317
316
|
this._fillOrderDetails(result.data.claimOrderDetail)
|
|
318
317
|
}
|
|
@@ -321,17 +320,16 @@ class TransportSummaryReport extends connect(store)(localize(i18next)(PageView))
|
|
|
321
320
|
try {
|
|
322
321
|
var result = this._getClaimData()
|
|
323
322
|
this._validateData(result)
|
|
324
|
-
const response = await client.
|
|
325
|
-
|
|
326
|
-
mutation {
|
|
327
|
-
createClaim(${
|
|
328
|
-
claim: result
|
|
329
|
-
})}) {
|
|
323
|
+
const response = await client.mutate({
|
|
324
|
+
mutation: gql`
|
|
325
|
+
mutation createClaim($claim: NewClaim!) {
|
|
326
|
+
createClaim(claim: $claim) {
|
|
330
327
|
id
|
|
331
328
|
name
|
|
332
329
|
}
|
|
333
330
|
}
|
|
334
|
-
|
|
331
|
+
`,
|
|
332
|
+
variables: { claim: result }
|
|
335
333
|
})
|
|
336
334
|
if (!response.errors) {
|
|
337
335
|
this._resetAll()
|
|
@@ -77,13 +77,7 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
|
|
|
77
77
|
appendable: false,
|
|
78
78
|
classifier: (record, rowIndex) => {
|
|
79
79
|
return {
|
|
80
|
-
|
|
81
|
-
emphasized:
|
|
82
|
-
record.assignedQty < record.releaseQty ||
|
|
83
|
-
!record.refNo ||
|
|
84
|
-
record?.refNo == '' ||
|
|
85
|
-
record?.releaseDate == '' ||
|
|
86
|
-
record?.releaseDate < this._getStdDateStr(new Date())
|
|
80
|
+
emphasized: record.errorMsg && record.errorMsg != ''
|
|
87
81
|
}
|
|
88
82
|
}
|
|
89
83
|
},
|
|
@@ -240,8 +234,8 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
|
|
|
240
234
|
},
|
|
241
235
|
{
|
|
242
236
|
type: 'string',
|
|
243
|
-
name: '
|
|
244
|
-
header: i18next.t('field.
|
|
237
|
+
name: 'errorMsg',
|
|
238
|
+
header: i18next.t('field.error_message'),
|
|
245
239
|
width: 350
|
|
246
240
|
}
|
|
247
241
|
]
|
|
@@ -291,7 +285,7 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
|
|
|
291
285
|
async _getAvailableItems(rawData) {
|
|
292
286
|
const response = await client.query({
|
|
293
287
|
query: gql`
|
|
294
|
-
query bulkReleaseGoodsAvailableItems($rawReleaseGoods: [
|
|
288
|
+
query bulkReleaseGoodsAvailableItems($rawReleaseGoods: [NewReleaseGood!], $bizplaceId: String!) {
|
|
295
289
|
bulkReleaseGoodsAvailableItems(rawReleaseGoods: $rawReleaseGoods, bizplaceId: $bizplaceId) {
|
|
296
290
|
refNo
|
|
297
291
|
refNo2
|
|
@@ -317,6 +311,7 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
|
|
|
317
311
|
assignedUomValue
|
|
318
312
|
postalCode
|
|
319
313
|
phone1
|
|
314
|
+
errorMsg
|
|
320
315
|
}
|
|
321
316
|
}
|
|
322
317
|
`,
|
|
@@ -342,7 +337,8 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
|
|
|
342
337
|
uom: raw.uom,
|
|
343
338
|
releaseQty: raw.releaseQty,
|
|
344
339
|
postalCode: String(raw.postalCode),
|
|
345
|
-
phone1: String(raw.phone1)
|
|
340
|
+
phone1: String(raw.phone1),
|
|
341
|
+
exportOption: false
|
|
346
342
|
}
|
|
347
343
|
}),
|
|
348
344
|
bizplaceId: this.bizplaceId
|
|
@@ -350,27 +346,7 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
|
|
|
350
346
|
})
|
|
351
347
|
|
|
352
348
|
if (!response.errors) {
|
|
353
|
-
this.records = response.data.bulkReleaseGoodsAvailableItems
|
|
354
|
-
let releaseDate = this._getStdDateStr(new Date(item.releaseDate || ''))
|
|
355
|
-
|
|
356
|
-
return {
|
|
357
|
-
...item,
|
|
358
|
-
releaseDate,
|
|
359
|
-
remark: !item.productId
|
|
360
|
-
? i18next.t('text.product_not_found')
|
|
361
|
-
: item.releaseQty <= 0
|
|
362
|
-
? i18next.t('text.invalid_release_qty')
|
|
363
|
-
: item.assignedQty < item.releaseQty
|
|
364
|
-
? i18next.t('text.insufficient_stock')
|
|
365
|
-
: releaseDate == ''
|
|
366
|
-
? i18next.t('text.release_date_is_empty')
|
|
367
|
-
: releaseDate < this._getStdDateStr(new Date())
|
|
368
|
-
? i18next.t('text.backdate_is_not_allowed')
|
|
369
|
-
: !item.refNo
|
|
370
|
-
? i18next.t('text.ref_no_is_empty')
|
|
371
|
-
: ''
|
|
372
|
-
}
|
|
373
|
-
})
|
|
349
|
+
this.records = response.data.bulkReleaseGoodsAvailableItems
|
|
374
350
|
}
|
|
375
351
|
}
|
|
376
352
|
|
|
@@ -382,11 +358,9 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
|
|
|
382
358
|
|
|
383
359
|
const response = await client.mutate({
|
|
384
360
|
mutation: gql`
|
|
385
|
-
mutation bulkAddReleaseGoods($rawReleaseGoods: [
|
|
361
|
+
mutation bulkAddReleaseGoods($rawReleaseGoods: [NewReleaseGood!], $bizplaceId: String!) {
|
|
386
362
|
bulkAddReleaseGoods(rawReleaseGoods: $rawReleaseGoods, bizplaceId: $bizplaceId) {
|
|
387
|
-
|
|
388
|
-
name
|
|
389
|
-
}
|
|
363
|
+
name
|
|
390
364
|
}
|
|
391
365
|
}
|
|
392
366
|
`,
|
|
@@ -413,7 +387,8 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
|
|
|
413
387
|
uom: x.uom,
|
|
414
388
|
releaseQty: x.releaseQty,
|
|
415
389
|
postalCode: String(x.postalCode),
|
|
416
|
-
phone1: String(x.phone1)
|
|
390
|
+
phone1: String(x.phone1),
|
|
391
|
+
exportOption: false
|
|
417
392
|
}
|
|
418
393
|
}),
|
|
419
394
|
bizplaceId: this.bizplaceId
|
|
@@ -440,23 +415,8 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
|
|
|
440
415
|
}
|
|
441
416
|
|
|
442
417
|
_validateReleaseOrders() {
|
|
443
|
-
if (this.records.some(record =>
|
|
444
|
-
throw new Error(i18next.t('text.
|
|
445
|
-
|
|
446
|
-
if (this.records.some(record => !record.releaseQty || record.releaseQty > record.assignedQty))
|
|
447
|
-
throw new Error(i18next.t('text.invalid_release_qty'))
|
|
448
|
-
|
|
449
|
-
if (this.records.some(record => record?.releaseDate == ''))
|
|
450
|
-
throw new Error(i18next.t('text.release_date_is_required'))
|
|
451
|
-
else if (this.records.some(record => record.releaseDate < this._getStdDateStr(new Date())))
|
|
452
|
-
throw new Error(i18next.t('text.backdate_is_not_allowed'))
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
_getStdDateStr(date) {
|
|
456
|
-
if (isNaN(date.getFullYear())) return ''
|
|
457
|
-
else {
|
|
458
|
-
date.setHours(date.getHours() + 8)
|
|
459
|
-
return date.toISOString().split('T')[0]
|
|
418
|
+
if (this.records.some(record => record.errorMsg && record.errorMsg != '')) {
|
|
419
|
+
throw new Error(i18next.t('text.please_recheck_your_request_data'))
|
|
460
420
|
}
|
|
461
421
|
}
|
|
462
422
|
|
|
@@ -72,8 +72,8 @@ class ExpiryDatePopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
72
72
|
delete this.inventory.__seq__
|
|
73
73
|
delete this.inventory.__origin__
|
|
74
74
|
|
|
75
|
-
const response = await client.
|
|
76
|
-
|
|
75
|
+
const response = await client.mutate({
|
|
76
|
+
mutation: gql`
|
|
77
77
|
mutation updateInventory($patch: InventoryPatch!) {
|
|
78
78
|
updateInventory(patch: $patch) {
|
|
79
79
|
expirationDate
|
|
@@ -3,7 +3,7 @@ import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
|
3
3
|
import '@things-factory/grist-ui'
|
|
4
4
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
5
|
import { client, PageView, store } from '@things-factory/shell'
|
|
6
|
-
import {
|
|
6
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
7
7
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
8
8
|
import gql from 'graphql-tag'
|
|
9
9
|
import { css, html } from 'lit-element'
|
|
@@ -184,26 +184,27 @@ class InboundReusablePallet extends connect(store)(localize(i18next)(PageView))
|
|
|
184
184
|
try {
|
|
185
185
|
const response = await client.query({
|
|
186
186
|
query: gql`
|
|
187
|
-
query {
|
|
188
|
-
palletInboundValidate(${
|
|
189
|
-
|
|
190
|
-
})}) {
|
|
191
|
-
item{
|
|
187
|
+
query palletInboundValidate($name: String!) {
|
|
188
|
+
palletInboundValidate(name: $name) {
|
|
189
|
+
item {
|
|
192
190
|
id
|
|
193
191
|
name
|
|
194
|
-
owner{
|
|
192
|
+
owner {
|
|
195
193
|
id
|
|
196
194
|
name
|
|
197
195
|
}
|
|
198
|
-
holder{
|
|
196
|
+
holder {
|
|
199
197
|
id
|
|
200
198
|
name
|
|
201
199
|
}
|
|
202
|
-
}
|
|
203
|
-
error
|
|
200
|
+
}
|
|
201
|
+
error
|
|
204
202
|
}
|
|
205
203
|
}
|
|
206
|
-
|
|
204
|
+
`,
|
|
205
|
+
variables: {
|
|
206
|
+
name: this.palletRefNoInput.value
|
|
207
|
+
}
|
|
207
208
|
})
|
|
208
209
|
|
|
209
210
|
if (!response.errors) {
|
|
@@ -224,20 +225,21 @@ class InboundReusablePallet extends connect(store)(localize(i18next)(PageView))
|
|
|
224
225
|
let patches = this.dataGrist.__data.records
|
|
225
226
|
if (patches && patches.length) {
|
|
226
227
|
this.dataGrist.showSpinner()
|
|
227
|
-
const response = await client.
|
|
228
|
-
|
|
229
|
-
mutation {
|
|
230
|
-
palletReturn(${
|
|
231
|
-
patches
|
|
232
|
-
})}) {
|
|
228
|
+
const response = await client.mutate({
|
|
229
|
+
mutation: gql`
|
|
230
|
+
mutation palletReturn($patches: [PalletPatch!]!) {
|
|
231
|
+
palletReturn(patches: $patches) {
|
|
233
232
|
id
|
|
234
233
|
name
|
|
235
|
-
holder{
|
|
234
|
+
holder {
|
|
236
235
|
name
|
|
237
236
|
}
|
|
238
237
|
}
|
|
239
238
|
}
|
|
240
|
-
|
|
239
|
+
`,
|
|
240
|
+
variables: {
|
|
241
|
+
patches
|
|
242
|
+
}
|
|
241
243
|
})
|
|
242
244
|
|
|
243
245
|
if (!response.errors) {
|