@things-factory/operato-wms 3.7.2 → 3.7.7

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 (84) hide show
  1. package/client/pages/components/select-product-popup.js +5 -1
  2. package/client/pages/constants/order.js +10 -0
  3. package/client/pages/inbound/putaway-product.js +162 -139
  4. package/client/pages/inventory-check/inspecting-product.js +146 -80
  5. package/client/pages/manifest/create-loading-manifest.js +314 -0
  6. package/client/pages/manifest/dispatcher-verification-popup.js +86 -0
  7. package/client/pages/manifest/loading-manifest-detail.js +345 -0
  8. package/client/pages/manifest/loading-manifest-list.js +305 -0
  9. package/client/pages/order/arrival-notice/create-arrival-notice.js +8 -1
  10. package/client/pages/order/goods-received-note/received-note-list.js +138 -6
  11. package/client/pages/order/release-order/b2b/b2b-order-list.js +45 -5
  12. package/client/pages/order/release-order/b2b/b2b-order-requests.js +45 -5
  13. package/client/pages/order/release-order/b2c/b2c-order-requests.js +181 -21
  14. package/client/pages/order/release-order/bulk-print-packing-list.js +23 -0
  15. package/client/pages/order/release-order/create-release-order.js +25 -4
  16. package/client/pages/order/release-order/receive-release-order-request.js +27 -24
  17. package/client/pages/order/release-order/release-extra-product-popup.js +189 -56
  18. package/client/pages/order/release-order/release-order-detail.js +292 -71
  19. package/client/pages/order/reverse-kitting-order/reverse-kitting-order-detail.js +115 -50
  20. package/client/pages/order/reverse-kitting-order/reverse-kitting-order-list.js +1 -6
  21. package/client/pages/order/reverse-kitting-order/reverse-kitting-pallet-label-popup.js +239 -0
  22. package/client/pages/order/transport-order/delivery-order-list.js +99 -59
  23. package/client/pages/outbound/loading-product.js +4 -1
  24. package/client/pages/outbound/merged-outbound-worksheet.js +39 -1
  25. package/client/pages/outbound/packing-product.js +4 -1
  26. package/client/pages/outbound/packing-worksheet-list.js +39 -1
  27. package/client/pages/outbound/picking-product.js +622 -290
  28. package/client/pages/outbound/serial-number-popup.js +280 -0
  29. package/client/pages/outbound/worksheet-picking.js +28 -2
  30. package/client/pages/report/product-label-report.js +401 -0
  31. package/client/pages/support/inventory-comparison.js +296 -0
  32. package/client/pages/vas/print-product-label.js +298 -132
  33. package/client/pages/vas/reverse-kitting/execute-reverse-kitting.js +30 -12
  34. package/client/pages/vas/reverse-kitting/popup-combination-sets.js +75 -5
  35. package/client/pages/vas/reverse-kitting/popup-reverse-kitting-template.js +113 -18
  36. package/client/route.js +23 -0
  37. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.js +64 -54
  38. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.js.map +1 -1
  39. package/dist-server/graphql/resolvers/extra/add-release-good-products.js +34 -9
  40. package/dist-server/graphql/resolvers/extra/add-release-good-products.js.map +1 -1
  41. package/dist-server/graphql/resolvers/index.js +3 -1
  42. package/dist-server/graphql/resolvers/index.js.map +1 -1
  43. package/dist-server/graphql/resolvers/inventory-comparison/index.js +6 -0
  44. package/dist-server/graphql/resolvers/inventory-comparison/index.js.map +1 -0
  45. package/dist-server/graphql/resolvers/inventory-comparison/inventory-comparison-list.js +78 -0
  46. package/dist-server/graphql/resolvers/inventory-comparison/inventory-comparison-list.js.map +1 -0
  47. package/dist-server/graphql/resolvers/reports/index.js +2 -1
  48. package/dist-server/graphql/resolvers/reports/index.js.map +1 -1
  49. package/dist-server/graphql/resolvers/reports/product-label-report.js +56 -0
  50. package/dist-server/graphql/resolvers/reports/product-label-report.js.map +1 -0
  51. package/dist-server/graphql/types/index.js +5 -2
  52. package/dist-server/graphql/types/index.js.map +1 -1
  53. package/dist-server/graphql/types/inventory-comparison/index.js +13 -0
  54. package/dist-server/graphql/types/inventory-comparison/index.js.map +1 -0
  55. package/dist-server/graphql/types/inventory-comparison/inventory-comparison-list.js +14 -0
  56. package/dist-server/graphql/types/inventory-comparison/inventory-comparison-list.js.map +1 -0
  57. package/dist-server/graphql/types/inventory-comparison/inventory-comparison.js +18 -0
  58. package/dist-server/graphql/types/inventory-comparison/inventory-comparison.js.map +1 -0
  59. package/dist-server/graphql/types/reports/index.js +6 -1
  60. package/dist-server/graphql/types/reports/index.js.map +1 -1
  61. package/dist-server/graphql/types/reports/product-label-report-list.js +14 -0
  62. package/dist-server/graphql/types/reports/product-label-report-list.js.map +1 -0
  63. package/dist-server/graphql/types/reports/product-label-report.js +16 -0
  64. package/dist-server/graphql/types/reports/product-label-report.js.map +1 -0
  65. package/package.json +65 -65
  66. package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.ts +75 -65
  67. package/server/graphql/resolvers/extra/add-release-good-products.ts +57 -15
  68. package/server/graphql/resolvers/index.ts +3 -1
  69. package/server/graphql/resolvers/inventory-comparison/index.ts +5 -0
  70. package/server/graphql/resolvers/inventory-comparison/inventory-comparison-list.ts +99 -0
  71. package/server/graphql/resolvers/reports/index.ts +3 -1
  72. package/server/graphql/resolvers/reports/product-label-report.ts +56 -0
  73. package/server/graphql/types/index.ts +5 -2
  74. package/server/graphql/types/inventory-comparison/index.ts +11 -0
  75. package/server/graphql/types/inventory-comparison/inventory-comparison-list.ts +8 -0
  76. package/server/graphql/types/inventory-comparison/inventory-comparison.ts +12 -0
  77. package/server/graphql/types/reports/index.ts +6 -1
  78. package/server/graphql/types/reports/product-label-report-list.ts +8 -0
  79. package/server/graphql/types/reports/product-label-report.ts +10 -0
  80. package/things-factory.config.js +24 -0
  81. package/translations/en.json +64 -12
  82. package/translations/ko.json +50 -1
  83. package/translations/ms.json +51 -1
  84. package/translations/zh.json +50 -1
@@ -0,0 +1,305 @@
1
+ import '@things-factory/form-ui'
2
+ import '@things-factory/grist-ui'
3
+
4
+ import gql from 'graphql-tag'
5
+ import { css, html } from 'lit-element'
6
+
7
+ import { getCodeByName } from '@things-factory/code-base'
8
+ import { i18next, localize } from '@things-factory/i18n-base'
9
+ import { client, navigate, PageView } from '@things-factory/shell'
10
+ import { ScrollbarStyles } from '@things-factory/styles'
11
+ import { isMobileDevice } from '@things-factory/utils'
12
+
13
+ class LoadingManifestList extends localize(i18next)(PageView) {
14
+ static get styles() {
15
+ return [
16
+ ScrollbarStyles,
17
+ css`
18
+ :host {
19
+ display: flex;
20
+ flex-direction: column;
21
+ overflow: hidden;
22
+ }
23
+
24
+ search-form {
25
+ overflow: visible;
26
+ }
27
+
28
+ data-grist {
29
+ overflow-y: auto;
30
+ flex: 1;
31
+ }
32
+ `
33
+ ]
34
+ }
35
+
36
+ static get properties() {
37
+ return {
38
+ _searchFields: Array,
39
+ config: Object,
40
+ data: Object
41
+ }
42
+ }
43
+
44
+ get context() {
45
+ return {
46
+ title: i18next.t('title.manifest_list'),
47
+ exportable: {
48
+ name: i18next.t('title.manifest_list'),
49
+ data: this._exportableData.bind(this)
50
+ }
51
+ }
52
+ }
53
+
54
+ get _fromDateInput() {
55
+ return this.searchForm.shadowRoot.querySelector('input[name=fromDate]')
56
+ }
57
+
58
+ get _toDateInput() {
59
+ return this.searchForm.shadowRoot.querySelector('input[name=toDate]')
60
+ }
61
+
62
+ get searchForm() {
63
+ return this.shadowRoot.querySelector('search-form')
64
+ }
65
+
66
+ get dataGrist() {
67
+ return this.shadowRoot.querySelector('data-grist')
68
+ }
69
+
70
+ render() {
71
+ return html`
72
+ <search-form id="search-form" .fields=${this._searchFields} @submit=${e => this.dataGrist.fetch()}></search-form>
73
+
74
+ <data-grist
75
+ .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
76
+ .config=${this.config}
77
+ .fetchHandler="${this.fetchHandler.bind(this)}"
78
+ ></data-grist>
79
+ `
80
+ }
81
+
82
+ pageUpdated(changes, lifecycle) {
83
+ if (this.active) {
84
+ this.dataGrist.fetch()
85
+ }
86
+ }
87
+
88
+ async pageInitialized() {
89
+ const manifestStatus = await getCodeByName('MANIFEST_STATUS')
90
+ this._searchFields = [
91
+ {
92
+ label: i18next.t('field.manifest_no'),
93
+ name: 'name',
94
+ type: 'text',
95
+ props: { searchOper: 'i_like' }
96
+ },
97
+ {
98
+ label: i18next.t('field.shipping_provider'),
99
+ name: 'shippingProvider',
100
+ type: 'text',
101
+ props: { searchOper: 'i_like' }
102
+ },
103
+ {
104
+ label: i18next.t('field.from'),
105
+ name: 'fromDate',
106
+ type: 'date',
107
+ props: {
108
+ searchOper: 'eq'
109
+ },
110
+ value: (() => {
111
+ let date = new Date()
112
+ date.setMonth(date.getMonth() - 6)
113
+ return date.toISOString().split('T')[0]
114
+ })(),
115
+ handlers: { change: this._modifyDateRange.bind(this) }
116
+ },
117
+ {
118
+ label: i18next.t('field.to'),
119
+ name: 'toDate',
120
+ type: 'date',
121
+ props: {
122
+ searchOper: 'eq',
123
+ min: (() => {
124
+ let date = new Date()
125
+ date.setMonth(date.getMonth() - 6)
126
+ return date.toISOString().split('T')[0]
127
+ })()
128
+ },
129
+ value: new Date().toISOString().split('T')[0]
130
+ },
131
+ {
132
+ label: i18next.t('field.status'),
133
+ name: 'status',
134
+ type: 'select',
135
+ options: [
136
+ { value: '' },
137
+ ...manifestStatus.map(status => {
138
+ return {
139
+ name: i18next.t(`label.${status.description}`),
140
+ value: status.name
141
+ }
142
+ })
143
+ ],
144
+ props: { searchOper: 'eq' }
145
+ }
146
+ ]
147
+
148
+ this.config = {
149
+ list: {
150
+ fields: ['name', 'shippingProvider', 'dispatchedAt', 'status', 'createdAt', 'updatedAt', 'creator']
151
+ },
152
+ rows: { appendable: false, selectable: { multiple: true } },
153
+ columns: [
154
+ { type: 'gutter', gutterName: 'sequence' },
155
+ { type: 'gutter', gutterName: 'row-selector', multiple: true },
156
+ {
157
+ type: 'gutter',
158
+ gutterName: 'button',
159
+ icon: 'reorder',
160
+ handlers: {
161
+ click: (columns, data, column, record, rowIndex) => {
162
+ navigate(`loading_manifest_detail/${record.name}`)
163
+ }
164
+ }
165
+ },
166
+ {
167
+ type: 'string',
168
+ name: 'name',
169
+ header: i18next.t('field.manifest_no'),
170
+ label: true,
171
+ sortable: true,
172
+ width: 180
173
+ },
174
+ {
175
+ type: 'string',
176
+ name: 'shippingProvider',
177
+ header: i18next.t('field.shipping_provider'),
178
+ label: true,
179
+ sortable: true,
180
+ width: 150
181
+ },
182
+ {
183
+ type: 'datetime',
184
+ name: 'dispatchedAt',
185
+ header: i18next.t('field.dispatch_at'),
186
+ label: true,
187
+ sortable: true,
188
+ width: 150
189
+ },
190
+ {
191
+ type: 'string',
192
+ name: 'status',
193
+ header: i18next.t('field.status'),
194
+ label: true,
195
+ sortable: true,
196
+ width: 170
197
+ },
198
+ {
199
+ type: 'datetime',
200
+ name: 'createdAt',
201
+ header: i18next.t('field.created_at'),
202
+ label: true,
203
+ sortable: true,
204
+ width: 160
205
+ },
206
+ {
207
+ type: 'object',
208
+ name: 'creator',
209
+ header: i18next.t('field.created_by'),
210
+ label: true,
211
+ sortable: true,
212
+ width: 200
213
+ }
214
+ ]
215
+ }
216
+ }
217
+
218
+ async fetchHandler({ page, limit, sorters = [{ name: 'createdAt', desc: true }] }) {
219
+ const response = await client.query({
220
+ query: gql`
221
+ query manifests($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
222
+ manifests(filters: $filters, pagination: $pagination, sortings: $sortings) {
223
+ items {
224
+ id
225
+ name
226
+ shippingProvider
227
+ dispatchedAt
228
+ status
229
+ createdAt
230
+ creator {
231
+ id
232
+ name
233
+ description
234
+ }
235
+ }
236
+ total
237
+ }
238
+ }
239
+ `,
240
+ variables: { filters: this.searchForm.queryFilters, pagination: { page, limit }, sortings: sorters }
241
+ })
242
+
243
+ if (!response.errors) {
244
+ return {
245
+ total: response.data.manifests.total || 0,
246
+ records: response.data.manifests.items || []
247
+ }
248
+ }
249
+ }
250
+
251
+ _modifyDateRange(e) {
252
+ const fromDate = e.currentTarget.value
253
+
254
+ if (this._toDateInput.value < fromDate) this._toDateInput.value = fromDate
255
+
256
+ let min = new Date(fromDate)
257
+ let today = new Date()
258
+ today.setHours(0, 0, 0, 0)
259
+
260
+ min = min.toISOString().split('T')[0]
261
+
262
+ this._toDateInput.min = min
263
+ }
264
+
265
+ get _columns() {
266
+ return this.config.columns
267
+ }
268
+
269
+ async _exportableData() {
270
+ try {
271
+ let data = []
272
+
273
+ var headerSetting = [
274
+ { header: i18next.t('field.manifest_no'), key: 'name', width: 25, type: 'string' },
275
+ { header: i18next.t('field.shipping_provider'), key: 'shippingProvider', width: 25, type: 'string' },
276
+ { header: i18next.t('field.dispatch_at'), key: 'dispatchedAt', width: 25, type: 'date' },
277
+ { header: i18next.t('field.status'), key: 'status', width: 25, type: 'string' },
278
+ { header: i18next.t('field.created_at'), key: 'createdAt', width: 30, type: 'date' },
279
+ { header: i18next.t('field.created_by'), key: 'createdBy', width: 25, type: 'string' }
280
+ ]
281
+
282
+ if (this.dataGrist.selected && this.dataGrist.selected.length > 0) {
283
+ data = this.dataGrist.selected.map(record => {
284
+ return {
285
+ ...record,
286
+ createdBy: record.creator.name
287
+ }
288
+ })
289
+ } else {
290
+ data = (await this.fetchHandler({ page: 1, limit: 9999999 })).records.map(record => {
291
+ return {
292
+ ...record,
293
+ createdBy: record.creator.name
294
+ }
295
+ })
296
+ }
297
+
298
+ return { header: headerSetting, data }
299
+ } catch (e) {
300
+ this._showToast(e)
301
+ }
302
+ }
303
+ }
304
+
305
+ customElements.define('loading-manifest-list', LoadingManifestList)
@@ -1600,7 +1600,14 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1600
1600
  })
1601
1601
  this.productData = {
1602
1602
  ...this.productData,
1603
- records: data
1603
+ records: data.map((dt, idx) => {
1604
+ return {
1605
+ ...dt,
1606
+ id: idx,
1607
+ name: idx,
1608
+ __dirty__: '+'
1609
+ }
1610
+ })
1604
1611
  }
1605
1612
 
1606
1613
  this.productGrist.fetch()
@@ -71,6 +71,7 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
71
71
 
72
72
  async pageInitialized() {
73
73
  const _grnStatus = await getCodeByName('GRN_STATUS')
74
+ const _ganStatus = await getCodeByName('GAN_REQUESTS_STATUS')
74
75
  const _partners = await this._fetchPartners()
75
76
 
76
77
  this._searchFields = [
@@ -98,20 +99,32 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
98
99
  props: { searchOper: 'eq' }
99
100
  },
100
101
  {
101
- name: 'arrivalNoticeRefNo',
102
+ name: 'arrivalNoticeNo',
103
+ label: i18next.t('field.gan'),
104
+ type: 'text',
105
+ props: { searchOper: 'i_like' }
106
+ },
107
+ {
102
108
  label: i18next.t('field.ref_no'),
109
+ name: 'refNo',
103
110
  type: 'text',
104
111
  props: { searchOper: 'i_like' }
105
112
  },
106
113
  {
107
- name: 'arrivalNoticeNo',
108
- label: i18next.t('field.gan'),
114
+ label: i18next.t('field.ref_no_2'),
115
+ name: 'refNo2',
116
+ type: 'text',
117
+ props: { searchOper: 'i_like' }
118
+ },
119
+ {
120
+ label: i18next.t('field.ref_no_3'),
121
+ name: 'refNo3',
109
122
  type: 'text',
110
123
  props: { searchOper: 'i_like' }
111
124
  },
112
125
  {
113
- label: i18next.t('field.status'),
114
- name: 'status',
126
+ label: i18next.t('field.grn_status'),
127
+ name: 'grnStatus',
115
128
  type: 'select',
116
129
  options: [
117
130
  { value: '' },
@@ -120,6 +133,46 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
120
133
  })
121
134
  ],
122
135
  props: { searchOper: 'eq' }
136
+ },
137
+ {
138
+ label: i18next.t('field.from'),
139
+ name: 'fromDate',
140
+ type: 'date',
141
+ props: {
142
+ searchOper: 'eq'
143
+ },
144
+ value: (() => {
145
+ let date = new Date()
146
+ date.setMonth(date.getMonth() - 6)
147
+ return date.toISOString().split('T')[0]
148
+ })(),
149
+ handlers: { change: this._modifyDateRange.bind(this) }
150
+ },
151
+ {
152
+ label: i18next.t('field.to'),
153
+ name: 'toDate',
154
+ type: 'date',
155
+ props: {
156
+ searchOper: 'eq',
157
+ min: (() => {
158
+ let date = new Date()
159
+ date.setMonth(date.getMonth() - 6)
160
+ return date.toISOString().split('T')[0]
161
+ })()
162
+ },
163
+ value: new Date().toISOString().split('T')[0]
164
+ },
165
+ {
166
+ label: i18next.t('field.gan_status'),
167
+ name: 'ganStatus',
168
+ type: 'select',
169
+ options: [
170
+ { value: '' },
171
+ ..._ganStatus.map(status => {
172
+ return { name: i18next.t(`label.${status.description}`), value: status.name }
173
+ })
174
+ ],
175
+ props: { searchOper: 'eq' }
123
176
  }
124
177
  ]
125
178
 
@@ -144,6 +197,7 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
144
197
  type: 'string',
145
198
  name: 'name',
146
199
  header: i18next.t('field.grn'),
200
+ imex: { header: i18next.t('field.grn'), key: 'name', width: 25, type: 'string' },
147
201
  sortable: true,
148
202
  width: 180,
149
203
  handlers: {
@@ -158,6 +212,7 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
158
212
  type: 'object',
159
213
  name: 'bizplace',
160
214
  header: i18next.t('field.company'),
215
+ imex: { header: i18next.t('field.company'), key: 'bizplace.name', width: 25, type: 'string' },
161
216
  sortable: true,
162
217
  width: 230
163
218
  },
@@ -165,13 +220,31 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
165
220
  type: 'string',
166
221
  name: 'refNo',
167
222
  header: i18next.t('field.ref_no'),
223
+ imex: { header: i18next.t('field.ref_no'), key: 'refNo', width: 25, type: 'string' },
168
224
  sortable: true,
169
225
  width: 160
170
226
  },
227
+ {
228
+ type: 'string',
229
+ name: 'refNo2',
230
+ header: i18next.t('field.ref_no_2'),
231
+ imex: { header: i18next.t('field.ref_no_2'), key: 'refNo2', width: 25, type: 'string' },
232
+ sortable: true,
233
+ width: 150
234
+ },
235
+ {
236
+ type: 'string',
237
+ name: 'refNo3',
238
+ header: i18next.t('field.ref_no_3'),
239
+ imex: { header: i18next.t('field.ref_no_3'), key: 'refNo3', width: 25, type: 'string' },
240
+ sortable: true,
241
+ width: 150
242
+ },
171
243
  {
172
244
  type: 'object',
173
245
  name: 'arrivalNotice',
174
246
  header: i18next.t('field.gan'),
247
+ imex: { header: i18next.t('field.arrivalNotice'), key: 'arrivalNotice.name', width: 25, type: 'string' },
175
248
  sortable: true,
176
249
  width: 180
177
250
  },
@@ -179,6 +252,7 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
179
252
  type: 'string',
180
253
  name: 'ganStatus',
181
254
  header: i18next.t('field.gan_status'),
255
+ imex: { header: i18next.t('field.gan_status'), key: 'ganStatus', width: 25, type: 'string' },
182
256
  sortable: true,
183
257
  width: 180
184
258
  },
@@ -186,6 +260,7 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
186
260
  type: 'string',
187
261
  name: 'status',
188
262
  header: i18next.t('field.grn_status'),
263
+ imex: { header: i18next.t('field.grn_status'), key: 'status', width: 25, type: 'string' },
189
264
  sortable: true,
190
265
  width: 180
191
266
  },
@@ -193,6 +268,7 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
193
268
  type: 'datetime',
194
269
  name: 'updatedAt',
195
270
  header: i18next.t('field.updated_at'),
271
+ imex: { header: i18next.t('field.updated_at'), key: 'updatedAt', width: 25, type: 'datetime' },
196
272
  sortable: true,
197
273
  width: 160
198
274
  },
@@ -200,6 +276,7 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
200
276
  type: 'object',
201
277
  name: 'updater',
202
278
  header: i18next.t('field.updater'),
279
+ imex: { header: i18next.t('field.updater'), key: 'updater.name', width: 25, type: 'string' },
203
280
  sortable: true,
204
281
  width: 160
205
282
  }
@@ -215,6 +292,28 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
215
292
  return this.shadowRoot.querySelector('data-grist')
216
293
  }
217
294
 
295
+ get _fromDateInput() {
296
+ return this.searchForm.shadowRoot.querySelector('input[name=fromDate]')
297
+ }
298
+
299
+ get _toDateInput() {
300
+ return this.searchForm.shadowRoot.querySelector('input[name=toDate]')
301
+ }
302
+
303
+ _modifyDateRange(e) {
304
+ const fromDate = e.currentTarget.value
305
+
306
+ if (this._toDateInput.value < fromDate) this._toDateInput.value = fromDate
307
+
308
+ let min = new Date(fromDate)
309
+ let today = new Date()
310
+ today.setHours(0, 0, 0, 0)
311
+
312
+ min = min.toISOString().split('T')[0]
313
+
314
+ this._toDateInput.min = min
315
+ }
316
+
218
317
  async fetchHandler({ page, limit, sorters = [{ name: 'createdAt', desc: true }] }) {
219
318
  const response = await client.query({
220
319
  query: gql`
@@ -233,6 +332,8 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
233
332
  description
234
333
  status
235
334
  refNo
335
+ refNo2
336
+ refNo3
236
337
  }
237
338
  status
238
339
  description
@@ -269,6 +370,8 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
269
370
  return {
270
371
  ...grn,
271
372
  refNo: grn.arrivalNotice.refNo || '',
373
+ refNo2: grn.arrivalNotice.refNo2 || '',
374
+ refNo3: grn.arrivalNotice.refNo3 || '',
272
375
  ganStatus: grn.arrivalNotice.status
273
376
  }
274
377
  }) || []
@@ -321,7 +424,36 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
321
424
  }
322
425
 
323
426
  _exportableData() {
324
- return this.dataGrist.exportRecords()
427
+ let records = []
428
+ if (this.dataGrist.selected && this.dataGrist.selected.length > 0) {
429
+ records = this.dataGrist.selected
430
+ } else {
431
+ records = this.dataGrist.data.records
432
+ }
433
+
434
+ var headerSetting = this.dataGrist._config.columns
435
+ .filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
436
+ .map(column => {
437
+ return column.imex
438
+ })
439
+
440
+ var data = records.map(item => {
441
+ return {
442
+ id: item.id,
443
+ ...this._columns
444
+ .filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
445
+ .reduce((record, column) => {
446
+ record[column.imex.key] = column.imex.key
447
+ .split('.')
448
+ .reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
449
+ if (column.type === 'datetime') {
450
+ record[column.imex.key] = new Date(parseInt(record[column.imex.key])).toLocaleString()
451
+ }
452
+ return record
453
+ }, {})
454
+ }
455
+ })
456
+ return { header: headerSetting, data: data }
325
457
  }
326
458
  }
327
459