@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.
Files changed (91) hide show
  1. package/client/bootstrap.js +1 -1
  2. package/client/pages/billing/claim-chit/claim-chit-detail.js +32 -35
  3. package/client/pages/billing/claim-chit/claim-chit-list.js +17 -17
  4. package/client/pages/billing/claim-chit/create-claim-chit.js +39 -30
  5. package/client/pages/billing/transport-summary-report.js +21 -23
  6. package/client/pages/bulk-operation/validate-ro-popup.js +14 -54
  7. package/client/pages/inbound/expiry-date-popup.js +2 -2
  8. package/client/pages/inbound/inbound-reusable-pallet.js +21 -19
  9. package/client/pages/inbound/palletizing-pallets-popup.js +10 -9
  10. package/client/pages/inbound/putaway-product.js +16 -8
  11. package/client/pages/inbound/putaway-worksheet-generate-popup.js +4 -4
  12. package/client/pages/inbound/unload-product.js +16 -88
  13. package/client/pages/inbound/vas-selector.js +9 -8
  14. package/client/pages/inventory-check/check-inventory-popup.js +20 -18
  15. package/client/pages/inventory-check/cycle-count-recheck-popup.js +25 -15
  16. package/client/pages/inventory-check/inspecting-product.js +2 -2
  17. package/client/pages/inventory-check/inventory-check-list.js +30 -19
  18. package/client/pages/inventory-check/search-popup.js +15 -14
  19. package/client/pages/inventory-check/worksheet-cycle-count.js +17 -15
  20. package/client/pages/master/location-list.js +61 -52
  21. package/client/pages/master/pallet-list.js +34 -30
  22. package/client/pages/master/print-location-label.js +142 -156
  23. package/client/pages/master/warehouse-list.js +33 -29
  24. package/client/pages/master/worker-list.js +30 -30
  25. package/client/pages/order/arrival-notice/assign-buffer-location.js +1 -1
  26. package/client/pages/order/goods-received-note/customer-grn-list.js +9 -8
  27. package/client/pages/order/goods-received-note/customer-received-note.js +8 -7
  28. package/client/pages/order/goods-received-note/received-note-detail.js +7 -6
  29. package/client/pages/order/goods-received-note/received-note-list.js +9 -8
  30. package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +1 -1
  31. package/client/pages/order/release-order/release-extra-product-popup.js +3 -7
  32. package/client/pages/order/release-order/release-order-detail.js +2 -2
  33. package/client/pages/order/return-order/check-return-order.js +15 -13
  34. package/client/pages/order/return-order/receive-return-order-requests.js +25 -22
  35. package/client/pages/order/return-order/rejected-return-order.js +8 -14
  36. package/client/pages/order/return-order/return-order-assign-buffer-location.js +16 -14
  37. package/client/pages/order/return-order/return-order-detail.js +35 -31
  38. package/client/pages/order/return-order/return-order-list.js +9 -8
  39. package/client/pages/order/return-order/return-order-requests.js +20 -18
  40. package/client/pages/order/reverse-kitting-order/reverse-kitting-order-list.js +9 -8
  41. package/client/pages/order/transfer-order/receive-transfer-order-request.js +67 -66
  42. package/client/pages/order/transfer-order/rejected-transfer-order.js +7 -6
  43. package/client/pages/order/transfer-order/transfer-order-detail.js +7 -6
  44. package/client/pages/order/transfer-order/transfer-order-requests.js +20 -18
  45. package/client/pages/order/transport-order/contact-point-selector-popup.js +20 -20
  46. package/client/pages/order/transport-order/delivery-note-popup.js +52 -46
  47. package/client/pages/order/transport-order/print-delivery-note.js +17 -16
  48. package/client/pages/order/transport-order/upload-delivery-note.js +21 -18
  49. package/client/pages/order/transport-order/view-delivery-note.js +19 -22
  50. package/client/pages/order/vas-order/create-vas-order.js +12 -11
  51. package/client/pages/order/vas-order/receive-vas-order.js +25 -22
  52. package/client/pages/order/vas-order/vas-order-detail.js +26 -23
  53. package/client/pages/order/vas-order/vas-order-list.js +9 -8
  54. package/client/pages/order/vas-order/vas-order-requests.js +11 -12
  55. package/client/pages/outbound/outbound-reusable-pallet.js +25 -33
  56. package/client/pages/outbound/packing-product.js +6 -0
  57. package/client/pages/outbound/picking-product.js +1 -0
  58. package/client/pages/outbound/single-outbound-worksheet.js +9 -8
  59. package/client/pages/outbound/worksheet-loading.js +16 -14
  60. package/client/pages/outbound/worksheet-packing.js +15 -13
  61. package/client/pages/report/custom-elccl/elccl-daily-collection-report.js +8 -9
  62. package/client/pages/report/custom-elccl/elccl-daily-order-inventory-report.js +26 -25
  63. package/client/pages/report/custom-elccl/elccl-delivery-order-summary.js +10 -9
  64. package/client/pages/report/custom-elccl/elccl-inventory-pallet-detail-report.js +13 -8
  65. package/client/pages/report/custom-elccl/elccl-inventory-report.js +11 -10
  66. package/client/pages/report/inventory-pallet-report.js +13 -12
  67. package/client/pages/report/job-sheet-list.js +9 -8
  68. package/client/pages/report/job-sheet-popup.js +9 -9
  69. package/client/pages/report/job-sheet-report.js +6 -6
  70. package/client/pages/system/location-sorting-rule.js +53 -46
  71. package/client/pages/vas/abstract-execute-vas.js +47 -34
  72. package/client/pages/vas/execute-pure-vas.js +66 -62
  73. package/client/pages/vas/execute-ref-vas.js +39 -41
  74. package/client/pages/vas/related-vas-list.js +7 -6
  75. package/client/pages/vas/target-inventory-assignment-popup.js +16 -14
  76. package/client/pages/vas/vas-pallet-label-popup.js +1 -1
  77. package/client/pages/vas/vas-worksheet-list.js +9 -8
  78. package/client/pages/vas/worksheet-ref-vas.js +7 -6
  79. package/client/pages/vas/worksheet-vas.js +16 -14
  80. package/client/route.js +16 -32
  81. package/package.json +65 -65
  82. package/things-factory.config.js +0 -16
  83. package/translations/en.json +3 -0
  84. package/translations/ko.json +3 -1
  85. package/translations/ms.json +3 -1
  86. package/translations/zh.json +3 -1
  87. package/client/pages/inbound/location-selector.js +0 -224
  88. package/client/pages/master/picking-bin-list.js +0 -354
  89. package/client/pages/order/retail-replenishment-order/retail-replenishment-order-detail.js +0 -315
  90. package/client/pages/order/retail-replenishment-order/retail-replenishment-order-requests.js +0 -307
  91. package/client/pages/order/vas-order/rejected-vas-order.js +0 -300
@@ -3,7 +3,7 @@ import { MultiColumnFormStyles, SingleColumnFormStyles } from '@things-factory/f
3
3
  import '@things-factory/grist-ui'
4
4
  import { i18next, localize } from '@things-factory/i18n-base'
5
5
  import { client } from '@things-factory/shell'
6
- import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
6
+ import { isMobileDevice } from '@things-factory/utils'
7
7
  import gql from 'graphql-tag'
8
8
  import { css, html, LitElement } from 'lit-element'
9
9
  import { VAS_TYPE, VAS_ETC_TYPE } from '../constants'
@@ -125,15 +125,16 @@ export class PalletizingPalletPopup extends localize(i18next)(LitElement) {
125
125
  }
126
126
 
127
127
  async _palletizingPallets() {
128
- const response = await client.query({
129
- query: gql`
130
- mutation {
131
- palletizingPallets(${gqlBuilder.buildArgs({
132
- refOrderNo: this.orderNo,
133
- patches: this._getOrderVass()
134
- })})
128
+ const response = await client.mutate({
129
+ mutation: gql`
130
+ mutation palletizingPallets($refOrderNo: String!, $patches: [OrderVasPatch]) {
131
+ palletizingPallets(refOrderNo: $refOrderNo, patches: $patches)
135
132
  }
136
- `
133
+ `,
134
+ variables: {
135
+ refOrderNo: this.orderNo,
136
+ patches: this._getOrderVass()
137
+ }
137
138
  })
138
139
 
139
140
  if (!response.errors) {
@@ -54,24 +54,24 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
54
54
  return [
55
55
  MultiColumnFormStyles,
56
56
  css`
57
+ data-grist {
58
+ overflow: auto;
59
+ flex: 1;
60
+ }
61
+ #form-section {
62
+ background-color: white;
63
+ }
57
64
  :host {
58
65
  display: flex;
59
66
  flex-direction: column;
60
67
  overflow: hidden;
61
68
  }
62
-
63
- data-grist {
64
- overflow: auto;
65
- flex: 1;
66
- }
67
-
68
69
  h2 {
69
70
  padding: var(--subtitle-padding);
70
71
  font: var(--subtitle-font);
71
72
  color: var(--subtitle-text-color);
72
73
  border-bottom: var(--subtitle-border-bottom);
73
74
  }
74
-
75
75
  legend mwc-icon {
76
76
  vertical-align: middle;
77
77
  margin: var(--grist-title-icon-margin);
@@ -236,7 +236,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
236
236
  <form id="info-form" class="multi-column-form">
237
237
  <fieldset>
238
238
  <legend>
239
- ${i18next.t('title.order_no')}: ${this._orderNo}
239
+ ${this._orderNo}
240
240
  ${this._orderNo
241
241
  ? html`(${this._bizplaceName})
242
242
  <mwc-icon @click="${this._openWorksheetInformation.bind(this)}">info</mwc-icon>`
@@ -423,6 +423,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
423
423
  bizplaceName
424
424
  partnerDomainId
425
425
  customerCompanyDomainId
426
+ bufferLocation
426
427
  refNo
427
428
  refNo2
428
429
  refNo3
@@ -515,6 +516,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
515
516
  bizplaceName
516
517
  partnerDomainId
517
518
  customerCompanyDomainId
519
+ bufferLocation
518
520
  refNo
519
521
  refNo
520
522
  refNo2
@@ -1001,6 +1003,12 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
1001
1003
  this._focusOnCartonInput()
1002
1004
  throw new Error(i18next.t('text.carton_id_is_empty'))
1003
1005
  }
1006
+
1007
+ if (!this.data.records.map(record => record.cartonId).includes(this.cartonInput?.value)) {
1008
+ this.cartonInput.value = ''
1009
+ this._focusOnCartonInput()
1010
+ throw new Error(i18next.t('text.unable_to_find_matching_x', { state: { x: i18next.t('label.carton') } }))
1011
+ }
1004
1012
  } else {
1005
1013
  if (!this._selectedOrderProduct) throw new Error(i18next.t('text.target_is_not_selected'))
1006
1014
  // 2. pallet id existing
@@ -396,8 +396,8 @@ class PutawayWorksheetGeneratePopup extends localize(i18next)(LitElement) {
396
396
  return { id: record.id }
397
397
  })
398
398
 
399
- const response = await client.query({
400
- query: gql`
399
+ const response = await client.mutate({
400
+ mutation: gql`
401
401
  mutation generatePartialPutawayWorksheet($arrivalNoticeNo: String!, $inventories: [InventoryPatch]!) {
402
402
  generatePartialPutawayWorksheet(arrivalNoticeNo: $arrivalNoticeNo, inventories: $inventories)
403
403
  }
@@ -432,8 +432,8 @@ class PutawayWorksheetGeneratePopup extends localize(i18next)(LitElement) {
432
432
  return { id: record.id }
433
433
  })
434
434
 
435
- const response = await client.query({
436
- query: gql`
435
+ const response = await client.mutate({
436
+ mutation: gql`
437
437
  mutation generatePartialPutawayReturnWorksheet($returnOrderNo: String!, $inventories: [InventoryPatch]!) {
438
438
  generatePartialPutawayReturnWorksheet(returnOrderNo: $returnOrderNo, inventories: $inventories)
439
439
  }
@@ -6,7 +6,6 @@ import './palletizing-pallets-popup'
6
6
  import '../components/worksheet-information-popup'
7
7
  import './unloaded-inventories-popup'
8
8
  import './undo-unload-popup'
9
- import './expiry-date-popup'
10
9
  import './select-product-batch'
11
10
 
12
11
  import gql from 'graphql-tag'
@@ -51,8 +50,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
51
50
  orderProductConfig: Object,
52
51
  orderProductData: Object,
53
52
  orderVasData: Object,
54
- palletProductConfig: Object,
55
- palletProductData: Object,
56
53
  refOrderType: String
57
54
  }
58
55
  }
@@ -61,15 +58,18 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
61
58
  return [
62
59
  MultiColumnFormStyles,
63
60
  css`
61
+ data-grist {
62
+ overflow: auto;
63
+ flex: 1;
64
+ }
65
+ #form-section {
66
+ background-color: white;
67
+ }
64
68
  :host {
65
69
  display: flex;
66
70
  flex-direction: column;
67
71
  overflow: hidden;
68
72
  }
69
- data-grist {
70
- overflow: auto;
71
- flex: 1;
72
- }
73
73
  h2 {
74
74
  padding: var(--subtitle-padding);
75
75
  font: var(--subtitle-font);
@@ -135,9 +135,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
135
135
  if (
136
136
  this._unloadedInventories &&
137
137
  this._unloadedInventories.length > 0 &&
138
- this.orderProductData.records.some(
139
- task => !task.validity && this._unloadedInventories.every(unloadedInventory => unloadedInventory.checked)
140
- )
138
+ this.orderProductData.records.some(task => !task.validity)
141
139
  ) {
142
140
  actions.push({
143
141
  title: i18next.t('button.partial_unload'),
@@ -169,6 +167,10 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
169
167
  return this.shadowRoot.querySelector('form#input-form')
170
168
  }
171
169
 
170
+ get lotInput() {
171
+ return this.shadowRoot.querySelector('barcode-scanable-input[name=lotId]').shadowRoot.querySelector('input')
172
+ }
173
+
172
174
  get orderProductGrist() {
173
175
  return this.shadowRoot.querySelector('data-grist#order-product-grist')
174
176
  }
@@ -181,10 +183,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
181
183
  return this.shadowRoot.querySelector('data-grist#pallet-product-grist')
182
184
  }
183
185
 
184
- get lotInput() {
185
- return this.shadowRoot.querySelector('barcode-scanable-input[name=lotId]').shadowRoot.querySelector('input')
186
- }
187
-
188
186
  get productBarcodeInput() {
189
187
  return this.shadowRoot
190
188
  .querySelector('barcode-scanable-input[name=productBarcode]')
@@ -277,7 +275,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
277
275
  <form id="info-form" class="multi-column-form">
278
276
  <fieldset>
279
277
  <legend>
280
- ${i18next.t('title.order_no')}: ${this._orderNo}
278
+ ${this._orderNo}
281
279
  ${this._orderNo
282
280
  ? html`(${this._bizplaceName})
283
281
  <mwc-icon @click="${this._openWorksheetInformation.bind(this)}">info</mwc-icon>`
@@ -584,8 +582,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
584
582
  validity:
585
583
  worksheetDetailInfo.actualPackQty === worksheetDetailInfo.packQty &&
586
584
  worksheetDetailInfo.actualPalletQty === worksheetDetailInfo.palletQty,
587
- sku: worksheetDetailInfo.product.sku,
588
- packingTypeSize: `${worksheetDetailInfo.packingType}(${worksheetDetailInfo.packingSize})`
585
+ sku: worksheetDetailInfo.product.sku
589
586
  }
590
587
  }),
591
588
  ['validity'],
@@ -761,7 +758,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
761
758
 
762
759
  _clearView() {
763
760
  this.orderProductData = { records: [] }
764
- this.palletProductData = { records: [] }
765
761
  this.inputForm.reset()
766
762
  this._selectedOrderProduct = null
767
763
  this._selectedInventory = null
@@ -1056,35 +1052,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1056
1052
  }
1057
1053
  }
1058
1054
 
1059
- _openPopupUnloading(reusablePallet, unloadingData, unloadedData) {
1060
- openPopup(
1061
- html`
1062
- <popup-unloading
1063
- .ganNo="${this._orderNo}"
1064
- .reusablePallet="${reusablePallet}"
1065
- .orderType="${this.refOrderType}"
1066
- .orderNo="${this._orderNo}"
1067
- .unloadingGristData="${unloadingData}"
1068
- .unloadedGristData="${unloadedData}"
1069
- .enableProductScanning="${this._enableProductScanning}"
1070
- .reusablePalletData="${this.reusablePalletIdData}"
1071
- ._selectedOrderProduct="${this._selectedOrderProduct}"
1072
- @unloading-pallet="${e => {
1073
- this.orderProductData = e.detail
1074
- }}"
1075
- @unloaded-pallet="${e => {
1076
- this.palletProductData = { records: [] }
1077
- }}"
1078
- ></popup-unloading>
1079
- `,
1080
- {
1081
- backdrop: true,
1082
- size: 'large',
1083
- title: i18next.t('title.unloading_with_reusable_pallet')
1084
- }
1085
- )
1086
- }
1087
-
1088
1055
  _openIssueNote() {
1089
1056
  openPopup(
1090
1057
  html`
@@ -1187,29 +1154,11 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1187
1154
  }
1188
1155
 
1189
1156
  _validateCompletePartially() {
1190
- if (!this._selectedOrderProduct) {
1191
- throw new Error(i18next.t('text.target_is_not_selected'))
1192
- }
1193
-
1194
- if (!this._unloadedInventories || this._unloadedInventories.length <= 0) {
1157
+ if (!this._unloadedInventories?.length) {
1195
1158
  throw new Error(i18next.t('text.nothing_unloaded'))
1196
1159
  }
1197
1160
  }
1198
1161
 
1199
- _validateSelectedInventory() {
1200
- if (!this._selectedInventory) throw new Error(i18next.t('text.target_does_not_selected'))
1201
- if (!this._selectedOrderProduct) {
1202
- this._selectedOrderProduct = this.orderProductData.records.find(
1203
- record =>
1204
- record.batchId == this._selectedInventory.batchId &&
1205
- record.sku == this._selectedInventory.sku &&
1206
- record.packingType == this._selectedInventory.packingType &&
1207
- record.packingSize == this._selectedInventory.packingSize
1208
- )
1209
- }
1210
- if (!this._selectedOrderProduct) throw new Error(i18next.t('text.select_one_of_unloading_list_first'))
1211
- }
1212
-
1213
1162
  async _completeQC() {
1214
1163
  try {
1215
1164
  this._validateSelectedInventory()
@@ -1251,9 +1200,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1251
1200
  cancelButton: { text: i18next.t('button.cancel') }
1252
1201
  })
1253
1202
 
1254
- if (!result.value) {
1255
- return
1256
- }
1203
+ if (!result.value) return
1257
1204
 
1258
1205
  if (this.refOrderType === AVAIL_ORDER_TYPES.ARRIVAL_NOTICE.value) {
1259
1206
  const response = await client.mutate({
@@ -1322,7 +1269,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1322
1269
  if (response.data.palletByStatus) {
1323
1270
  this.reusablePalletIdData = response.data.palletByStatus
1324
1271
  this._isReusablePallet = true
1325
- this._openPopupUnloading(this.lotInput.value, this.orderProductData, this.palletProductData)
1326
1272
  } else {
1327
1273
  await this._validateUnloading()
1328
1274
  await this._checkedLotScannedProduct()
@@ -1418,24 +1364,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1418
1364
  )
1419
1365
  }
1420
1366
 
1421
- _openUpdateExpiryDate() {
1422
- openPopup(
1423
- html`
1424
- <expiry-date-popup
1425
- .inventory="${this._selectedInventory}"
1426
- @updated-expiry-date="${async e => {
1427
- await this._fetchInventories()
1428
- }}"
1429
- ></expiry-date-popup>
1430
- `,
1431
- {
1432
- backdrop: true,
1433
- size: 'small',
1434
- title: i18next.t('title.expiration_date')
1435
- }
1436
- )
1437
- }
1438
-
1439
1367
  _focusOnOrderNoField() {
1440
1368
  setTimeout(() => this.orderNoInput.focus(), 100)
1441
1369
  }
@@ -3,7 +3,7 @@ import '@things-factory/grist-ui'
3
3
  import { i18next, localize } from '@things-factory/i18n-base'
4
4
  import { client } from '@things-factory/shell'
5
5
  import { ScrollbarStyles } from '@things-factory/styles'
6
- import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
6
+ import { isMobileDevice } from '@things-factory/utils'
7
7
  import gql from 'graphql-tag'
8
8
  import { css, html, LitElement } from 'lit-element'
9
9
 
@@ -139,12 +139,8 @@ export class VasSelector extends localize(i18next)(LitElement) {
139
139
  const filters = await this.searchForm.getQueryFilters()
140
140
  const response = await client.query({
141
141
  query: gql`
142
- query {
143
- vass(${gqlBuilder.buildArgs({
144
- filters,
145
- pagination: { page, limit },
146
- sortings: sorters
147
- })}) {
142
+ query vass($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
143
+ vass(filters: $filters, pagination: $pagination, sortings: $sortings) {
148
144
  items {
149
145
  id
150
146
  name
@@ -153,7 +149,12 @@ export class VasSelector extends localize(i18next)(LitElement) {
153
149
  total
154
150
  }
155
151
  }
156
- `
152
+ `,
153
+ variables: {
154
+ filters,
155
+ pagination: { page, limit },
156
+ sortings: sorters
157
+ }
157
158
  })
158
159
 
159
160
  if (!response.errors) {
@@ -1,7 +1,6 @@
1
1
  import '@things-factory/barcode-ui'
2
2
  import { SingleColumnFormStyles } from '@things-factory/form-ui'
3
3
  import { client } from '@things-factory/shell'
4
- import { gqlBuilder } from '@things-factory/utils'
5
4
  import gql from 'graphql-tag'
6
5
  import { i18next, localize } from '@things-factory/i18n-base'
7
6
  import { css, html, LitElement } from 'lit-element'
@@ -180,13 +179,14 @@ class CheckInventoryPopup extends localize(i18next)(LitElement) {
180
179
  try {
181
180
  const response = await client.query({
182
181
  query: gql`
183
- query {
184
- checkInventoryOwner(${gqlBuilder.buildArgs({
185
- palletId,
186
- bizplaceName
187
- })})
182
+ query checkInventoryOwner($palletId: String!, $bizplaceName: String!) {
183
+ checkInventoryOwner(palletId: $palletId, bizplaceName: $bizplaceName)
188
184
  }
189
- `
185
+ `,
186
+ variables: {
187
+ palletId,
188
+ bizplaceName
189
+ }
190
190
  })
191
191
 
192
192
  if (!response.errors) {
@@ -201,11 +201,8 @@ class CheckInventoryPopup extends localize(i18next)(LitElement) {
201
201
  try {
202
202
  const response = await client.query({
203
203
  query: gql`
204
- query {
205
- checkStockTakeCurrentLocation(${gqlBuilder.buildArgs({
206
- palletId,
207
- cycleCountNo
208
- })}) {
204
+ query checkStockTakeCurrentLocation($palletId: String!, $cycleCountNo: String!) {
205
+ checkStockTakeCurrentLocation(palletId: $palletId, cycleCountNo: $cycleCountNo) {
209
206
  currentLocation
210
207
  worksheetDetailName
211
208
  batchId
@@ -217,7 +214,11 @@ class CheckInventoryPopup extends localize(i18next)(LitElement) {
217
214
  productDescription
218
215
  }
219
216
  }
220
- `
217
+ `,
218
+ variables: {
219
+ palletId,
220
+ cycleCountNo
221
+ }
221
222
  })
222
223
 
223
224
  if (!response.errors) {
@@ -232,12 +233,13 @@ class CheckInventoryPopup extends localize(i18next)(LitElement) {
232
233
  try {
233
234
  const response = await client.query({
234
235
  query: gql`
235
- query {
236
- checkInventoryRelease(${gqlBuilder.buildArgs({
237
- palletId
238
- })})
236
+ query checkInventoryRelease($palletId: String!) {
237
+ checkInventoryRelease(palletId: $palletId)
239
238
  }
240
- `
239
+ `,
240
+ variables: {
241
+ palletId
242
+ }
241
243
  })
242
244
 
243
245
  if (!response.errors) {
@@ -1,7 +1,7 @@
1
1
  import { MultiColumnFormStyles } from '@things-factory/form-ui'
2
2
  import { i18next, localize } from '@things-factory/i18n-base'
3
3
  import { client, CustomAlert } from '@things-factory/shell'
4
- import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
4
+ import { isMobileDevice } from '@things-factory/utils'
5
5
  import gql from 'graphql-tag'
6
6
  import { css, html, LitElement } from 'lit-element'
7
7
 
@@ -221,10 +221,8 @@ class CycleCountRecheckPopup extends localize(i18next)(LitElement) {
221
221
  async fetchNotTallyInventories() {
222
222
  const response = await client.query({
223
223
  query: gql`
224
- query {
225
- notTallyTargetInventories(${gqlBuilder.buildArgs({
226
- cycleCountNo: this.cycleCountNo
227
- })}) {
224
+ query notTallyTargetInventories($cycleCountNo: String!) {
225
+ notTallyTargetInventories(cycleCountNo: $cycleCountNo) {
228
226
  id
229
227
  inventory {
230
228
  palletId
@@ -252,7 +250,10 @@ class CycleCountRecheckPopup extends localize(i18next)(LitElement) {
252
250
  status
253
251
  }
254
252
  }
255
- `
253
+ `,
254
+ variables: {
255
+ cycleCountNo: this.cycleCountNo
256
+ }
256
257
  })
257
258
 
258
259
  if (!response.errors) {
@@ -295,18 +296,27 @@ class CycleCountRecheckPopup extends localize(i18next)(LitElement) {
295
296
  }
296
297
 
297
298
  const orderInventoryIds = this.grist.selected.map(record => record.id)
298
- const response = await client.query({
299
- query: gql`
300
- mutation {
301
- generateCycleCountWorksheet(${gqlBuilder.buildArgs({
302
- executionDate: this.executionDateInput.value,
303
- customerId: this.customerId,
304
- orderInventoryIds
305
- })}) {
299
+ const response = await client.mutate({
300
+ mutation: gql`
301
+ mutation generateCycleCountWorksheet(
302
+ $executionDate: String!
303
+ $customerId: String!
304
+ $orderInventoryIds: [String]
305
+ ) {
306
+ generateCycleCountWorksheet(
307
+ executionDate: $executionDate
308
+ customerId: $customerId
309
+ orderInventoryIds: $orderInventoryIds
310
+ ) {
306
311
  name
307
312
  }
308
313
  }
309
- `
314
+ `,
315
+ variables: {
316
+ executionDate: this.executionDateInput.value,
317
+ customerId: this.customerId,
318
+ orderInventoryIds
319
+ }
310
320
  })
311
321
 
312
322
  if (!response.errors) {
@@ -1014,7 +1014,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
1014
1014
 
1015
1015
  const response = await client.query({
1016
1016
  query: gql`
1017
- query orderInventories($filters: [Filter]) {
1017
+ query orderInventories($filters: [Filter!]) {
1018
1018
  orderInventories(filters: $filters) {
1019
1019
  items {
1020
1020
  id
@@ -1278,7 +1278,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
1278
1278
  try {
1279
1279
  const response = await client.query({
1280
1280
  query: gql`
1281
- query locations($filters: [Filter]) {
1281
+ query locations($filters: [Filter!]) {
1282
1282
  locations(filters: $filters) {
1283
1283
  items {
1284
1284
  id
@@ -4,7 +4,7 @@ import { i18next, localize } from '@things-factory/i18n-base'
4
4
  import { openPopup } from '@things-factory/layout-base'
5
5
  import { client, navigate, PageView } from '@things-factory/shell'
6
6
  import { ScrollbarStyles } from '@things-factory/styles'
7
- import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
7
+ import { isMobileDevice } from '@things-factory/utils'
8
8
  import gql from 'graphql-tag'
9
9
  import { css, html } from 'lit-element'
10
10
  import {
@@ -127,7 +127,16 @@ class InventoryCheckList extends localize(i18next)(PageView) {
127
127
 
128
128
  this.config = {
129
129
  list: {
130
- fields: ['inventoryCheck', 'type', 'Customer', 'executionDate', 'inventoryCheckStatus', 'status', 'startedAt', 'endedAt']
130
+ fields: [
131
+ 'inventoryCheck',
132
+ 'type',
133
+ 'Customer',
134
+ 'executionDate',
135
+ 'inventoryCheckStatus',
136
+ 'status',
137
+ 'startedAt',
138
+ 'endedAt'
139
+ ]
131
140
  },
132
141
  rows: { appendable: false },
133
142
  columns: [
@@ -247,12 +256,8 @@ class InventoryCheckList extends localize(i18next)(PageView) {
247
256
 
248
257
  const response = await client.query({
249
258
  query: gql`
250
- query {
251
- worksheets(${gqlBuilder.buildArgs({
252
- filters,
253
- pagination: { page, limit },
254
- sortings: sorters
255
- })}) {
259
+ query worksheets($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
260
+ worksheets(filters: $filters, pagination: $pagination, sortings: $sortings) {
256
261
  items {
257
262
  id
258
263
  name
@@ -281,7 +286,12 @@ class InventoryCheckList extends localize(i18next)(PageView) {
281
286
  total
282
287
  }
283
288
  }
284
- `
289
+ `,
290
+ variables: {
291
+ filters,
292
+ pagination: { page, limit },
293
+ sortings: sorters
294
+ }
285
295
  })
286
296
 
287
297
  if (!response.errors) {
@@ -303,18 +313,19 @@ class InventoryCheckList extends localize(i18next)(PageView) {
303
313
  async _fetchBizplaceList() {
304
314
  const response = await client.query({
305
315
  query: gql`
306
- query {
307
- bizplaces(${gqlBuilder.buildArgs({
308
- filters: []
309
- })}) {
310
- items{
311
- id
312
- name
313
- description
314
- }
316
+ query bizplaces($filters: [Filter!]) {
317
+ bizplaces(filters: $filters) {
318
+ items {
319
+ id
320
+ name
321
+ description
315
322
  }
316
323
  }
317
- `
324
+ }
325
+ `,
326
+ variables: {
327
+ filters: []
328
+ }
318
329
  })
319
330
 
320
331
  if (!response.errors) {
@@ -3,7 +3,7 @@ import '@material/mwc-button/mwc-button'
3
3
  import '@things-factory/grist-ui'
4
4
  import { i18next, localize } from '@things-factory/i18n-base'
5
5
  import { client } from '@things-factory/shell'
6
- import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
6
+ import { isMobileDevice } from '@things-factory/utils'
7
7
  import { css, html, LitElement } from 'lit-element'
8
8
  import gql from 'graphql-tag'
9
9
 
@@ -144,21 +144,22 @@ class SearchPopup extends localize(i18next)(LitElement) {
144
144
  const filters = await this.searchForm.getQueryFilters()
145
145
  const response = await client.query({
146
146
  query: gql`
147
- query {
148
- bizplaces(${gqlBuilder.buildArgs({
149
- filters: [...filters],
150
- pagination: { page, limit },
151
- sortings: sorters
152
- })}) {
153
- items{
154
- id
155
- name
156
- description
157
- }
158
- total
147
+ query bizplaces($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
148
+ bizplaces(filters: $filters, pagination: $pagination, sortings: $sortings) {
149
+ items {
150
+ id
151
+ name
152
+ description
159
153
  }
154
+ total
160
155
  }
161
- `
156
+ }
157
+ `,
158
+ variables: {
159
+ filters: [...filters],
160
+ pagination: { page, limit },
161
+ sortings: sorters
162
+ }
162
163
  })
163
164
 
164
165
  return {