@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.
Files changed (101) hide show
  1. package/client/bootstrap.js +1 -1
  2. package/client/pages/adjustment/transfer-inventory.js +32 -6
  3. package/client/pages/billing/claim-chit/claim-chit-detail.js +32 -35
  4. package/client/pages/billing/claim-chit/claim-chit-list.js +17 -17
  5. package/client/pages/billing/claim-chit/create-claim-chit.js +39 -30
  6. package/client/pages/billing/transport-summary-report.js +21 -23
  7. package/client/pages/bulk-operation/bulk-operation.js +189 -64
  8. package/client/pages/bulk-operation/validate-gan-popup.js +391 -0
  9. package/client/pages/bulk-operation/validate-ro-popup.js +44 -54
  10. package/client/pages/components/popup-unloading.js +47 -34
  11. package/client/pages/components/select-product-popup.js +74 -27
  12. package/client/pages/components/worksheet-information-popup.js +100 -0
  13. package/client/pages/inbound/expiry-date-popup.js +2 -2
  14. package/client/pages/inbound/inbound-reusable-pallet.js +21 -19
  15. package/client/pages/inbound/palletizing-pallets-popup.js +10 -9
  16. package/client/pages/inbound/putaway-product.js +196 -235
  17. package/client/pages/inbound/putaway-worksheet-generate-popup.js +4 -4
  18. package/client/pages/inbound/undo-unload-popup.js +295 -0
  19. package/client/pages/inbound/unload-product.js +236 -646
  20. package/client/pages/inbound/unloaded-inventories-popup.js +129 -0
  21. package/client/pages/inbound/vas-selector.js +9 -8
  22. package/client/pages/inbound/worksheet-unloading.js +15 -11
  23. package/client/pages/inventory/inventory-adjustment.js +9 -10
  24. package/client/pages/inventory-check/check-inventory-popup.js +20 -18
  25. package/client/pages/inventory-check/cycle-count-recheck-popup.js +25 -15
  26. package/client/pages/inventory-check/inspecting-product.js +2 -2
  27. package/client/pages/inventory-check/inventory-check-list.js +30 -19
  28. package/client/pages/inventory-check/search-popup.js +15 -14
  29. package/client/pages/inventory-check/worksheet-cycle-count.js +17 -15
  30. package/client/pages/master/location-list.js +60 -52
  31. package/client/pages/master/pallet-list.js +34 -30
  32. package/client/pages/master/print-location-label.js +37 -36
  33. package/client/pages/master/product/product-list.js +1 -1
  34. package/client/pages/master/warehouse-list.js +33 -29
  35. package/client/pages/master/worker-list.js +30 -30
  36. package/client/pages/order/arrival-notice/arrival-notice-detail.js +409 -21
  37. package/client/pages/order/arrival-notice/assign-buffer-location.js +1 -1
  38. package/client/pages/order/arrival-notice/create-arrival-notice.js +89 -13
  39. package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +90 -10
  40. package/client/pages/order/arrival-notice/edit-product-popup.js +2 -2
  41. package/client/pages/order/goods-received-note/customer-grn-list.js +9 -8
  42. package/client/pages/order/goods-received-note/customer-received-note.js +8 -7
  43. package/client/pages/order/goods-received-note/received-note-list.js +9 -8
  44. package/client/pages/order/release-order/b2b/b2b-order-list.js +78 -2
  45. package/client/pages/order/release-order/b2b/b2b-order-requests.js +32 -16
  46. package/client/pages/order/release-order/b2c/b2c-order-requests.js +49 -5
  47. package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +314 -0
  48. package/client/pages/order/release-order/batch-picking-popup.js +19 -2
  49. package/client/pages/order/release-order/create-release-order.js +194 -89
  50. package/client/pages/order/release-order/release-extra-product-popup.js +3 -7
  51. package/client/pages/order/release-order/release-order-detail.js +390 -107
  52. package/client/pages/order/return-order/check-return-order.js +15 -13
  53. package/client/pages/order/return-order/create-return-order.js +3 -3
  54. package/client/pages/order/return-order/receive-return-order-requests.js +25 -22
  55. package/client/pages/order/return-order/rejected-return-order.js +8 -14
  56. package/client/pages/order/return-order/return-order-assign-buffer-location.js +16 -14
  57. package/client/pages/order/return-order/return-order-detail.js +35 -31
  58. package/client/pages/order/return-order/return-order-list.js +9 -8
  59. package/client/pages/order/return-order/return-order-requests.js +20 -18
  60. package/client/pages/order/reverse-kitting-order/reverse-kitting-order-list.js +9 -8
  61. package/client/pages/order/transfer-order/receive-transfer-order-request.js +67 -66
  62. package/client/pages/order/transfer-order/rejected-transfer-order.js +7 -6
  63. package/client/pages/order/transfer-order/transfer-order-detail.js +7 -6
  64. package/client/pages/order/transfer-order/transfer-order-requests.js +20 -18
  65. package/client/pages/order/transport-order/contact-point-selector-popup.js +20 -20
  66. package/client/pages/order/transport-order/create-delivery-order.js +1 -1
  67. package/client/pages/order/transport-order/delivery-note-popup.js +52 -46
  68. package/client/pages/order/transport-order/delivery-order-list.js +1 -1
  69. package/client/pages/order/transport-order/print-delivery-note.js +17 -16
  70. package/client/pages/order/transport-order/upload-delivery-note.js +21 -18
  71. package/client/pages/order/transport-order/view-delivery-note.js +19 -22
  72. package/client/pages/order/vas-order/create-vas-order.js +12 -11
  73. package/client/pages/order/vas-order/receive-vas-order.js +25 -22
  74. package/client/pages/order/vas-order/vas-order-detail.js +26 -23
  75. package/client/pages/order/vas-order/vas-order-list.js +9 -8
  76. package/client/pages/order/vas-order/vas-order-requests.js +11 -12
  77. package/client/pages/outbound/outbound-reusable-pallet.js +25 -33
  78. package/client/pages/outbound/packing-product.js +111 -236
  79. package/client/pages/outbound/picking-product.js +288 -380
  80. package/client/pages/outbound/single-outbound-worksheet.js +9 -8
  81. package/client/pages/outbound/sorting-product.js +66 -63
  82. package/client/pages/outbound/worksheet-loading.js +7 -3
  83. package/client/pages/outbound/worksheet-packing.js +3 -3
  84. package/client/pages/outbound/worksheet-picking.js +22 -18
  85. package/client/pages/report/job-sheet-list.js +9 -8
  86. package/client/pages/vas/print-product-label.js +17 -9
  87. package/client/route.js +16 -32
  88. package/dist-server/graphql/resolvers/reports/product-label-report.js +1 -0
  89. package/dist-server/graphql/resolvers/reports/product-label-report.js.map +1 -1
  90. package/package.json +65 -65
  91. package/server/graphql/resolvers/reports/product-label-report.ts +1 -0
  92. package/things-factory.config.js +0 -16
  93. package/translations/en.json +34 -2
  94. package/translations/ko.json +34 -3
  95. package/translations/ms.json +34 -3
  96. package/translations/zh.json +34 -3
  97. package/client/pages/inbound/location-selector.js +0 -224
  98. package/client/pages/master/picking-bin-list.js +0 -354
  99. package/client/pages/order/retail-replenishment-order/retail-replenishment-order-detail.js +0 -315
  100. package/client/pages/order/retail-replenishment-order/retail-replenishment-order-requests.js +0 -307
  101. package/client/pages/order/vas-order/rejected-vas-order.js +0 -300
@@ -3,6 +3,7 @@
3
3
  "button.activate": "activate",
4
4
  "button.add_edit": "add & edit",
5
5
  "button.add_new_product": "[zh]add new product",
6
+ "button.add_products": "[ko] add products",
6
7
  "button.add_x": "add {state.x}",
7
8
  "button.adjust_inventory": "adjust inventory",
8
9
  "button.adjust": "adjust",
@@ -25,6 +26,7 @@
25
26
  "button.complete": "[zh]complete",
26
27
  "button.completed": "[zh]completed",
27
28
  "button.confirm": "[zh]confirm",
29
+ "button.create_gan": "[zh]create gan",
28
30
  "button.create_putaway_worksheet": "[zh]create putaway worksheet",
29
31
  "button.create_release_order": "[zh]create release order",
30
32
  "button.create_ro": "[zh]create ro",
@@ -58,6 +60,7 @@
58
60
  "button.order_sorted": "[zh] order sorted",
59
61
  "button.pack": "pack",
60
62
  "button.partial_complete": "partial complete",
63
+ "button.plastic_pallet": "[zh] plastic pallet",
61
64
  "button.preview": "preview",
62
65
  "button.print_airway_bill": "print airway bill",
63
66
  "button.print_invoice": "[zh] print invoice",
@@ -78,6 +81,7 @@
78
81
  "button.save": "save",
79
82
  "button.select_all": "[zh]select all",
80
83
  "button.select_operator": "[zh] select operator",
84
+ "button.serial_number": "[zh]serial number",
81
85
  "button.submit_for_approval": "submit for approval",
82
86
  "button.submit": "submit",
83
87
  "button.sync_data": "[zh]sync data",
@@ -86,6 +90,7 @@
86
90
  "button.update_order_details": "[zh]update order details",
87
91
  "button.update": "update",
88
92
  "button.validate": "[zh]validate",
93
+ "button.vas": "[zh] vas",
89
94
  "button.view_merged_list": "view merged list",
90
95
  "claim_chit_list": "claim chit list",
91
96
  "claim_created": "new claim created",
@@ -593,6 +598,7 @@
593
598
  "label.country_code": "country code",
594
599
  "label.courier": "courier",
595
600
  "label.crates_cargo": "crates cargo",
601
+ "label.create_arrival_notices": "[zh]create arrival notices",
596
602
  "label.create_claim_chit": "create claim chit",
597
603
  "label.create_release_orders": "[zh]create release orders",
598
604
  "label.cross_docking": "cross docking",
@@ -803,6 +809,7 @@
803
809
  "label.required_package_qty": "required package qty",
804
810
  "label.required_package_uom_value": "required package uom value",
805
811
  "label.required_pallet_qty": "required pallet qty",
812
+ "label.reserve_qty": "[zh] reserve qty",
806
813
  "label.retail_outlet": "retail outlet",
807
814
  "label.return_location": "return location",
808
815
  "label.return_order_no": "return order no",
@@ -948,6 +955,7 @@
948
955
  "text.arrival_notice_received": "arrival notice received",
949
956
  "text.arrival_notice_rejected": "arrival notice rejected",
950
957
  "text.arrival_notice_will_be_confirmed": "arrival notice will be confirmed",
958
+ "text.arrival_notices_created": "[zh]arrival notices created",
951
959
  "text.assign_buffer_location": "assign buffer location",
952
960
  "text.assign_inventories": "assign inventories",
953
961
  "text.assign_warehouse": "assign warehouse",
@@ -955,8 +963,10 @@
955
963
  "text.attachment_info_not_valid": "attachment info not valid",
956
964
  "text.available_quantity_insufficient": "available quantity insufficient",
957
965
  "text.available_uom value_insufficient": "available_uom value_insufficient",
966
+ "text.backdate_is_not_allowed": "[zh]backdate is not allowed",
958
967
  "text.batch_id_is_duplicated": "batch id is duplicated",
959
968
  "text.batch_is_not_selected": "[zh]batch is not selected",
969
+ "text.batch_no_is_required": "[zh]batch no. is required",
960
970
  "text.bizplace_not_found": "bizplace not found",
961
971
  "text.cancel": "[zh] cancel",
962
972
  "text.cancellation_request_has_been_rejected": "[zh] cancellation request has been rejected",
@@ -1048,6 +1058,7 @@
1048
1058
  "text.empty_value_in_list": "empty value in list",
1049
1059
  "text.enter_qty": "[zh] enter qty",
1050
1060
  "text.enter_zone_name": "enter zone name",
1061
+ "text.eta_date_is_required": "[zh]eta date is required",
1051
1062
  "text.executing_release_order": "executing release order",
1052
1063
  "text.expiration_date_updated": "[zh]expiration date updated",
1053
1064
  "text.expiry_date_is_empty": "[zh]expiry date is empty",
@@ -1066,9 +1077,11 @@
1066
1077
  "text.gan_pending_company_approval": "GAN pending company approval",
1067
1078
  "text.gan_will_be_sent_for_company_approval": "GAN will be sent for company approval",
1068
1079
  "text.generate_putaway_worksheet": "generate putaway worksheet",
1080
+ "text.generate_worksheet": "[zh] generate worksheet",
1069
1081
  "text.goods_delivery_note_uploaded": "goods delivery note uploaded",
1070
1082
  "text.goods_received_note_has_been_received": "GRN has been marked received",
1071
1083
  "text.goods_received_note_has_been_sent_successfully": "GRN has been sent successfully",
1084
+ "text.incomplete_container_information": "[zh]incomplete container information",
1072
1085
  "text.info_delete_successfully": "info delete successfully",
1073
1086
  "text.info_update_successfully": "info update successfully",
1074
1087
  "text.initialise_logistics": "initialise logistics",
@@ -1081,6 +1094,7 @@
1081
1094
  "text.invalid_carton_id": "[zh]invalid carton id",
1082
1095
  "text.invalid_form_value": "invalid form value",
1083
1096
  "text.invalid_form": "invalid form",
1097
+ "text.invalid_format_of_location_id": "[zh]invalid format of location id",
1084
1098
  "text.invalid_inventory": "invalid_inventory",
1085
1099
  "text.invalid_no_of_random_item_value": "invalid no of random item value",
1086
1100
  "text.invalid_pack_qty": "[zh] invalid pack qty",
@@ -1102,6 +1116,7 @@
1102
1116
  "text.inventory_is_selected_for_releasing": "inventory is selected for releasing",
1103
1117
  "text.inventory_not_belong_to_x": "inventory not belong to {state.x}",
1104
1118
  "text.inventory_not_found_in_x": "inventory not found in {state.x}",
1119
+ "text.inventory_undo_successfully": "[zh] inventory undo successfully",
1105
1120
  "text.is_empty": "is empty",
1106
1121
  "text.issue_updated": "[zh] issue updated",
1107
1122
  "text.job_sheet_has_been_updated": "job sheet has been updated",
@@ -1126,6 +1141,7 @@
1126
1141
  "text.no_label_setting_was_found.": "[zh]no label setting was found",
1127
1142
  "text.no_lot_id": "no lot id",
1128
1143
  "text.no_matching_product_found": "[zh] no matching product found",
1144
+ "text.no_matching_unloaded_inventory_found": "[zh] no matching unloaded inventory found",
1129
1145
  "text.no_product_barcode_detected": "[zh] no product barcode detected",
1130
1146
  "text.no_products": "no products",
1131
1147
  "text.no_serial_number_selected": "[zh]no serial number selected",
@@ -1146,6 +1162,7 @@
1146
1162
  "text.picking_worksheet_will_be_activated": "picking worksheet will be activated",
1147
1163
  "text.picking_worksheet_will_be_generated": "picking worksheet will be generated",
1148
1164
  "text.pickup_info_is_not_completed": "pickup info is not completed",
1165
+ "text.please_attach_the_file": "[zh]please attach the file",
1149
1166
  "text.please_check_your_setting": "please check your setting",
1150
1167
  "text.please_check_your_vas_target": "[zh] please check your vas target",
1151
1168
  "text.please_key_in_new_serial_number": "[zh]please key in new serial number",
@@ -1155,6 +1172,7 @@
1155
1172
  "text.please_select_a_truck": "select a truck",
1156
1173
  "text.please_select_label_indicator": "please select label indicator",
1157
1174
  "text.please_select_release_order": "[zh] please select release order",
1175
+ "text.please_select_the_company": "[zh]please select the company",
1158
1176
  "text.please_select_the_contact_type": "please select the contact type",
1159
1177
  "text.please_select_the_location_again": "please select the location again",
1160
1178
  "text.please_select_the_location": "please select the location",
@@ -1200,6 +1218,7 @@
1200
1218
  "text.release_order_rejected": "release order rejected",
1201
1219
  "text.release_order_will_be_deleted": "release order will be deleted",
1202
1220
  "text.release_qty_cannot_exceed_stored_qty": "release qty cannot exceed stored qty",
1221
+ "text.release_qty_invalid": "[zh] release quantity is invalid",
1203
1222
  "text.release_qty_is_empty": "release quantity is empty",
1204
1223
  "text.release_qty_is_more_than_expected": "release qty is more than expected",
1205
1224
  "text.remark_is_empty": "remark is empty",
@@ -1221,6 +1240,7 @@
1221
1240
  "text.reverse_kitting_order": "[zh] reverse kitting order",
1222
1241
  "text.same_pallet_is_founded_in_location": "same pallet is founded in {state.location}",
1223
1242
  "text.scan_product_barcode": "[zh] scan product barcode",
1243
+ "text.select_at_least_one_inventory_to_undo": "[zh] select at least one inventory to undo",
1224
1244
  "text.select_a_delivery_type": "[zh]select a delivery type",
1225
1245
  "text.select_a_logistics_type": "[zh]select a logistics type",
1226
1246
  "text.select_a_release_order_to_proceed": "[zh] select a release order to proceed",
@@ -1238,6 +1258,7 @@
1238
1258
  "text.shelf_is_not_allowed_as_an_indicator_for_partial_format": "shelf is not allowed as an indicator for partial format",
1239
1259
  "text.shipping_order_form_invalid": "shipping order form invalid",
1240
1260
  "text.signed": "signed in",
1261
+ "text.sku_is_required": "[zh]sku is required",
1241
1262
  "text.sorting_is_completed": "[zh] sorting is completed",
1242
1263
  "text.std_amount_cannot_be_in_decimal_places": "[zh] single pack standard amount cannot be in decimal places",
1243
1264
  "text.still_pending_putaway": "[zh]still pending putaway",
@@ -1309,10 +1330,10 @@
1309
1330
  "text.x_should_be_positive": "{state.x} should be positive value",
1310
1331
  "text.yes": "yes",
1311
1332
  "text.you_can_only_select_one_transport_type": "you can only select one transport type",
1333
+ "text.you_can_only_upload_one_file_max": "[zh]you can only upload one file max",
1312
1334
  "text.you_wont_be_able_to_revert_this": "you won't be able to revert this",
1313
1335
  "text.you.are.now.in": "you are now in {state.text}",
1314
1336
  "text.your_work_has_completed": "your work has completed",
1315
- "text.invalid_format_of_location_id": "[zh]invalid format of location id",
1316
1337
  "title.add_product": "[zh] add product",
1317
1338
  "title.add_rule_field": "add rule field",
1318
1339
  "title.adjust_batch_id": "adjust batch no",
@@ -1330,6 +1351,7 @@
1330
1351
  "title.attachment": "attachment",
1331
1352
  "title.batch_picking": "batch picking",
1332
1353
  "title.bizplace": "bizplace",
1354
+ "title.bulk_arrival_notices": "[zh]bulk arrival notices",
1333
1355
  "title.bulk_operation": "[zh]bulk operation",
1334
1356
  "title.bulk_print_packing_list": "[zh] bulk print packing list",
1335
1357
  "title.carton_label": "[zh] carton label",
@@ -1403,6 +1425,7 @@
1403
1425
  "title.gan_no": "GAN no",
1404
1426
  "title.generate_batch_picking": "generate batch picking",
1405
1427
  "title.generate_location_list": "generate location list",
1428
+ "title.generate_picking_worksheet": "[zh]generate picking worksheet",
1406
1429
  "title.generate_putaway_worksheet": "generate putaway worksheet",
1407
1430
  "title.generator": "generator",
1408
1431
  "title.goods_delivery_note_details": "goods delivery note details",
@@ -1453,6 +1476,7 @@
1453
1476
  "title.loaded": "loaded",
1454
1477
  "title.loading": "loading",
1455
1478
  "title.location_label_format": "location label format",
1479
+ "title.location_scanned_is_not_quarantine_zone": "[zh] Location scanned is not a quarantine zone!",
1456
1480
  "title.location_sorting_rule": "location sorting rule",
1457
1481
  "title.location": "location",
1458
1482
  "title.lot_information": "lot information",
@@ -1473,6 +1497,7 @@
1473
1497
  "title.non_assigned_vas": "[zh] unassigned vas",
1474
1498
  "title.onhand_inventory": "[zh] onhand inventory",
1475
1499
  "title.operation_type": "[zh] operation type",
1500
+ "title.order_information": "[zh] order information",
1476
1501
  "title.order_no": "[zh] order no",
1477
1502
  "title.order_products": "[zh]order products",
1478
1503
  "title.original_pallet": "original pallet",
@@ -1592,6 +1617,8 @@
1592
1617
  "title.transport_driver": "transport driver",
1593
1618
  "title.transport_order": "运输单",
1594
1619
  "title.transport_vehicle": "transport vehicle",
1620
+ "title.undo_unload": "[zh] undo unload",
1621
+ "title.unloaded_inventories": "[zh] unloaded inventories",
1595
1622
  "title.unloaded_pallets": "unloaded pallets",
1596
1623
  "title.unloaded": "unloaded",
1597
1624
  "title.unloading_issue": "unloading issue",
@@ -1638,6 +1665,10 @@
1638
1665
  "title.worksheet_vas": "worksheet vas",
1639
1666
  "title.worksheet": "worksheet",
1640
1667
  "vas_order_created": "vas order created",
1641
- "title.location_scanned_is_not_quarantine_zone": "[zh] Location scanned is not a quarantine zone!",
1642
- "text.release_qty_invalid": "[zh] release quantity is invalid"
1668
+ "text.contact_is_empty": "[zh] contact name is empty",
1669
+ "text.driver_is_empty": "[zh] driver name is empty",
1670
+ "text.truck_no_is_empty": "[zh] truck number is empty",
1671
+ "text.truck_is_not_selected": "[zh] truck is not selected",
1672
+ "text.reject_vas_order": "[zh] reject vas order",
1673
+ "text.vas_order_rejected": "[zh] vas order rejected"
1643
1674
  }
@@ -1,224 +0,0 @@
1
- import '@things-factory/form-ui'
2
- import '@things-factory/grist-ui'
3
- import { i18next, localize } from '@things-factory/i18n-base'
4
- import { client } from '@things-factory/shell'
5
- import { ScrollbarStyles } from '@things-factory/styles'
6
- import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
7
- import gql from 'graphql-tag'
8
- import { css, html, LitElement } from 'lit-element'
9
- import { LOCATION_TYPE } from '../constants'
10
-
11
- export class LocationSelector extends localize(i18next)(LitElement) {
12
- static get styles() {
13
- return [
14
- ScrollbarStyles,
15
- css`
16
- :host {
17
- display: flex;
18
- flex-direction: column;
19
- overflow: hidden;
20
- background-color: white;
21
- }
22
-
23
- search-form {
24
- overflow: visible;
25
- }
26
- .grist {
27
- display: flex;
28
- flex-direction: column;
29
- flex: 1;
30
- overflow-y: auto;
31
- }
32
- data-grist {
33
- overflow-y: hidden;
34
- flex: 1;
35
- }
36
- h2 {
37
- padding: var(--subtitle-padding);
38
- font: var(--grist-title-font);
39
- color: var(--subtitle-text-color);
40
- border-bottom: var(--subtitle-border-bottom);
41
- }
42
- .button-container {
43
- margin-left: auto;
44
- }
45
- .button-container > mwc-button {
46
- padding: 10px;
47
- }
48
- `
49
- ]
50
- }
51
-
52
- static get properties() {
53
- return {
54
- _searchFields: Array,
55
- config: Object,
56
- warehouseId: String,
57
- warehouseName: String
58
- }
59
- }
60
-
61
- render() {
62
- return html`
63
- <search-form id="search-form" .fields=${this._searchFields} @submit=${() => this.dataGrist.fetch()}></search-form>
64
-
65
- <div class="grist">
66
- <h2>${i18next.t('title.location')}: ${this.warehouseName}</h2>
67
- <data-grist
68
- .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
69
- .config=${this.config}
70
- .fetchHandler="${this.fetchHandler.bind(this)}"
71
- ></data-grist>
72
- </div>
73
-
74
- <div class="button-container">
75
- <mwc-button
76
- raised
77
- danger
78
- @click=${() => {
79
- history.back()
80
- }}
81
- >${i18next.t('button.cancel')}</mwc-button
82
- >
83
- <mwc-button raised @click=${this._selectLocation.bind(this)}>${i18next.t('button.confirm')}</mwc-button>
84
- </div>
85
- `
86
- }
87
-
88
- async firstUpdated() {
89
- this._searchFields = [
90
- {
91
- name: 'name',
92
- label: i18next.t('field.name'),
93
- type: 'text',
94
- props: {
95
- searchOper: 'i_like'
96
- }
97
- },
98
- {
99
- name: 'description',
100
- label: i18next.t('field.description'),
101
- type: 'text',
102
- props: {
103
- searchOper: 'i_like'
104
- }
105
- }
106
- ]
107
-
108
- this.config = {
109
- pagination: { infinite: true },
110
- rows: {
111
- selectable: {
112
- multiple: false
113
- }
114
- },
115
- columns: [
116
- { type: 'gutter', gutterName: 'sequence' },
117
- { type: 'gutter', gutterName: 'row-selector', multiple: false },
118
- {
119
- type: 'string',
120
- name: 'name',
121
- header: i18next.t('field.name'),
122
- width: 180
123
- },
124
- {
125
- type: 'string',
126
- name: 'description',
127
- header: i18next.t('field.description'),
128
- width: 220
129
- },
130
- {
131
- type: 'string',
132
- name: 'row',
133
- header: i18next.t('field.row'),
134
- width: 120
135
- },
136
- {
137
- type: 'string',
138
- name: 'column',
139
- header: i18next.t('field.column'),
140
- width: 120
141
- },
142
- {
143
- type: 'string',
144
- name: 'shelf',
145
- header: i18next.t('field.shelf'),
146
- width: 120
147
- },
148
- {
149
- type: 'string',
150
- name: 'status',
151
- header: i18next.t('field.status'),
152
- width: 120
153
- }
154
- ]
155
- }
156
- }
157
-
158
- get searchForm() {
159
- return this.shadowRoot.querySelector('search-form')
160
- }
161
-
162
- get dataGrist() {
163
- return this.shadowRoot.querySelector('data-grist')
164
- }
165
-
166
- async fetchHandler({ page, limit, sorters = [] }) {
167
- if (!this.warehouseId) return
168
-
169
- const response = await client.query({
170
- query: gql`
171
- query {
172
- locations(${gqlBuilder.buildArgs({
173
- filters: [
174
- {
175
- name: 'warehouse_id',
176
- operator: 'eq',
177
- value: this.warehouseId
178
- },
179
- {
180
- name: 'type',
181
- operator: 'noteq',
182
- value: LOCATION_TYPE.BUFFER.value
183
- }
184
- ],
185
- pagination: { page, limit },
186
- sortings: sorters
187
- })}) {
188
- items {
189
- id
190
- name
191
- description
192
- row
193
- column
194
- shelf
195
- status
196
- }
197
- total
198
- }
199
- }
200
- `
201
- })
202
-
203
- if (!response.errors) {
204
- return {
205
- total: response.data.locations.total || 0,
206
- records: response.data.locations.items || []
207
- }
208
- }
209
- }
210
-
211
- _selectLocation() {
212
- const selectedLocation = this.dataGrist.selected[0]
213
- if (selectedLocation) {
214
- this.dispatchEvent(new CustomEvent('selected', { detail: this.dataGrist.selected[0] }))
215
- history.back()
216
- } else {
217
- document.dispatchEvent(
218
- new CustomEvent('notify', { detail: { message: i18next.t('text.location_is_not_selected') } })
219
- )
220
- }
221
- }
222
- }
223
-
224
- window.customElements.define('location-selector', LocationSelector)