@things-factory/operato-wms 4.0.8 → 4.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/pages/adjustment/transfer-inventory.js +368 -165
- package/client/pages/billing/claim-chit/claim-chit-list.js +7 -6
- package/client/pages/bulk-operation/bulk-operation.js +316 -0
- package/client/pages/bulk-operation/validate-ro-popup.js +445 -0
- package/client/pages/components/select-product-popup.js +15 -2
- package/client/pages/constants/inventory.js +1 -0
- package/client/pages/constants/location.js +33 -6
- package/client/pages/constants/order.js +10 -0
- package/client/pages/constants/worksheet.js +2 -2
- package/client/pages/inbound/inbound-worksheet.js +78 -9
- package/client/pages/inbound/putaway-product.js +214 -139
- package/client/pages/inbound/putaway-worksheet-generate-popup.js +24 -2
- package/client/pages/inbound/unload-product.js +153 -61
- package/client/pages/inbound/worksheet-putaway-return.js +22 -5
- package/client/pages/inbound/worksheet-putaway.js +21 -8
- package/client/pages/inbound/worksheet-unloading-return.js +22 -5
- package/client/pages/inbound/worksheet-unloading.js +8 -0
- package/client/pages/inventory/inventory-adjustment-approval.js +11 -19
- package/client/pages/inventory/inventory-adjustment.js +88 -73
- package/client/pages/inventory/inventory-by-product-detail.js +3 -5
- package/client/pages/inventory/inventory-by-product.js +8 -0
- package/client/pages/inventory/inventory-history-by-pallet.js +12 -5
- package/client/pages/inventory/inventory-history.js +14 -5
- package/client/pages/inventory/onhand-inventory.js +11 -2
- package/client/pages/inventory-check/create-cycle-count.js +12 -6
- package/client/pages/inventory-check/cycle-count-report.js +8 -0
- package/client/pages/inventory-check/inspecting-product.js +146 -80
- package/client/pages/inventory-check/worksheet-cycle-count.js +14 -0
- package/client/pages/manifest/create-loading-manifest.js +314 -0
- package/client/pages/manifest/dispatcher-verification-popup.js +86 -0
- package/client/pages/manifest/loading-manifest-detail.js +345 -0
- package/client/pages/manifest/loading-manifest-list.js +305 -0
- package/client/pages/master/location-list.js +58 -17
- package/client/pages/master/product/product-detail-bizplace-setting-popup.js +2 -2
- package/client/pages/master/product/product-details-popup.js +2 -2
- package/client/pages/master/product/product-list.js +5 -5
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +134 -115
- package/client/pages/order/arrival-notice/arrival-notice-list.js +87 -6
- package/client/pages/order/arrival-notice/arrival-notice-requests.js +83 -6
- package/client/pages/order/arrival-notice/assign-buffer-location.js +8 -1
- package/client/pages/order/arrival-notice/check-arrived-notice.js +9 -1
- package/client/pages/order/arrival-notice/create-arrival-notice.js +38 -3
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +290 -25
- package/client/pages/order/arrival-notice/edit-product-popup.js +36 -5
- package/client/pages/order/arrival-notice/receive-arrival-notice.js +8 -1
- package/client/pages/order/goods-received-note/received-note-list.js +138 -6
- package/client/pages/order/release-order/b2b/b2b-order-list.js +45 -5
- package/client/pages/order/release-order/b2b/b2b-order-requests.js +52 -12
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +244 -24
- package/client/pages/order/release-order/bulk-print-packing-list.js +23 -0
- package/client/pages/order/release-order/create-release-order.js +55 -8
- package/client/pages/order/release-order/receive-release-order-request.js +35 -24
- package/client/pages/order/release-order/release-extra-product-popup.js +204 -63
- package/client/pages/order/release-order/release-order-detail.js +301 -74
- package/client/pages/order/return-order/check-return-order.js +9 -1
- package/client/pages/order/return-order/create-return-order.js +14 -2
- package/client/pages/order/return-order/receive-return-order-requests.js +9 -1
- package/client/pages/order/return-order/return-order-detail.js +15 -6
- package/client/pages/order/return-order/return-order-inventory-popup.js +7 -0
- package/client/pages/order/reverse-kitting-order/reverse-kitting-order-detail.js +115 -50
- package/client/pages/order/reverse-kitting-order/reverse-kitting-order-list.js +1 -6
- package/client/pages/order/reverse-kitting-order/reverse-kitting-pallet-label-popup.js +239 -0
- package/client/pages/order/transport-order/delivery-order-list.js +102 -59
- package/client/pages/outbound/inventory-assign-popup.js +23 -6
- package/client/pages/outbound/inventory-auto-assign-popup.js +22 -6
- package/client/pages/outbound/loading-product.js +4 -1
- package/client/pages/outbound/merged-outbound-worksheet.js +43 -1
- package/client/pages/outbound/packing-product.js +4 -1
- package/client/pages/outbound/packing-worksheet-list.js +39 -1
- package/client/pages/outbound/picking-product.js +803 -431
- package/client/pages/outbound/picking-replacement-popup.js +1 -1
- package/client/pages/outbound/serial-number-popup.js +280 -0
- package/client/pages/outbound/single-outbound-worksheet.js +47 -1
- package/client/pages/outbound/worksheet-batch-picking.js +22 -8
- package/client/pages/outbound/worksheet-loading.js +22 -5
- package/client/pages/outbound/worksheet-packing.js +8 -0
- package/client/pages/outbound/worksheet-picking.js +62 -8
- package/client/pages/outbound/worksheet-return.js +9 -1
- package/client/pages/outbound/worksheet-sorting.js +9 -1
- package/client/pages/report/custom-elccl/elccl-inventory-report.js +31 -30
- package/client/pages/report/custom-elccl/elccl-inventory-summary-report.js +23 -26
- package/client/pages/report/inventory-pallet-storage-report.js +11 -10
- package/client/pages/report/inventory-report.js +41 -43
- package/client/pages/report/inventory-summary-report.js +25 -28
- package/client/pages/report/product-label-report.js +401 -0
- package/client/pages/support/inventory-comparison.js +296 -0
- package/client/pages/vas/print-product-label.js +298 -132
- package/client/pages/vas/reverse-kitting/execute-reverse-kitting.js +32 -12
- package/client/pages/vas/reverse-kitting/popup-combination-sets.js +106 -10
- package/client/pages/vas/reverse-kitting/popup-reverse-kitting-template.js +130 -19
- package/client/pages/vas/vas-pallet-label-popup.js +5 -8
- package/client/route.js +28 -0
- package/config.development.js +73 -0
- package/config.production.js +113 -0
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js.map +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.js +64 -54
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.js.map +1 -1
- package/dist-server/graphql/resolvers/extra/add-release-good-products.js +34 -9
- package/dist-server/graphql/resolvers/extra/add-release-good-products.js.map +1 -1
- package/dist-server/graphql/resolvers/index.js +5 -1
- package/dist-server/graphql/resolvers/index.js.map +1 -1
- package/dist-server/graphql/resolvers/inventory-comparison/index.js +6 -0
- package/dist-server/graphql/resolvers/inventory-comparison/index.js.map +1 -0
- package/dist-server/graphql/resolvers/inventory-comparison/inventory-comparison-list.js +78 -0
- package/dist-server/graphql/resolvers/inventory-comparison/inventory-comparison-list.js.map +1 -0
- package/dist-server/graphql/resolvers/reports/index.js +2 -1
- package/dist-server/graphql/resolvers/reports/index.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/product-label-report.js +56 -0
- package/dist-server/graphql/resolvers/reports/product-label-report.js.map +1 -0
- package/dist-server/graphql/resolvers/shipping-provider/index.js +6 -0
- package/dist-server/graphql/resolvers/shipping-provider/index.js.map +1 -0
- package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js +20 -0
- package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js.map +1 -0
- package/dist-server/graphql/types/custom/elccl/elccl-inventory-report.js +1 -1
- package/dist-server/graphql/types/index.js +8 -2
- package/dist-server/graphql/types/index.js.map +1 -1
- package/dist-server/graphql/types/inventory-comparison/index.js +13 -0
- package/dist-server/graphql/types/inventory-comparison/index.js.map +1 -0
- package/dist-server/graphql/types/inventory-comparison/inventory-comparison-list.js +14 -0
- package/dist-server/graphql/types/inventory-comparison/inventory-comparison-list.js.map +1 -0
- package/dist-server/graphql/types/inventory-comparison/inventory-comparison.js +18 -0
- package/dist-server/graphql/types/inventory-comparison/inventory-comparison.js.map +1 -0
- package/dist-server/graphql/types/reports/index.js +6 -1
- package/dist-server/graphql/types/reports/index.js.map +1 -1
- package/dist-server/graphql/types/reports/product-label-report-list.js +14 -0
- package/dist-server/graphql/types/reports/product-label-report-list.js.map +1 -0
- package/dist-server/graphql/types/reports/product-label-report.js +16 -0
- package/dist-server/graphql/types/reports/product-label-report.js.map +1 -0
- package/dist-server/graphql/types/shipping-provider/index.js +10 -0
- package/dist-server/graphql/types/shipping-provider/index.js.map +1 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider-list.js +13 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider-list.js.map +1 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider.js +13 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider.js.map +1 -0
- package/package.json +66 -66
- package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts +4 -2
- package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.ts +75 -65
- package/server/graphql/resolvers/extra/add-release-good-products.ts +57 -15
- package/server/graphql/resolvers/index.ts +5 -1
- package/server/graphql/resolvers/inventory-comparison/index.ts +5 -0
- package/server/graphql/resolvers/inventory-comparison/inventory-comparison-list.ts +99 -0
- package/server/graphql/resolvers/reports/index.ts +3 -1
- package/server/graphql/resolvers/reports/product-label-report.ts +56 -0
- package/server/graphql/resolvers/shipping-provider/index.ts +5 -0
- package/server/graphql/resolvers/shipping-provider/shipping-providers.ts +20 -0
- package/server/graphql/types/custom/elccl/elccl-inventory-report.ts +1 -1
- package/server/graphql/types/index.ts +8 -2
- package/server/graphql/types/inventory-comparison/index.ts +11 -0
- package/server/graphql/types/inventory-comparison/inventory-comparison-list.ts +8 -0
- package/server/graphql/types/inventory-comparison/inventory-comparison.ts +12 -0
- package/server/graphql/types/reports/index.ts +6 -1
- package/server/graphql/types/reports/product-label-report-list.ts +8 -0
- package/server/graphql/types/reports/product-label-report.ts +10 -0
- package/server/graphql/types/shipping-provider/index.ts +8 -0
- package/server/graphql/types/shipping-provider/shipping-provider-list.ts +7 -0
- package/server/graphql/types/shipping-provider/shipping-provider.ts +7 -0
- package/things-factory.config.js +30 -0
- package/translations/en.json +91 -11
- package/translations/ko.json +109 -11
- package/translations/ms.json +111 -12
- package/translations/zh.json +123 -26
|
@@ -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: '
|
|
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
|
-
|
|
108
|
-
|
|
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.
|
|
114
|
-
name: '
|
|
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
|
-
|
|
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
|
|
|
@@ -232,6 +232,7 @@ class B2bOrderList extends localize(i18next)(PageView) {
|
|
|
232
232
|
type: 'string',
|
|
233
233
|
name: 'name',
|
|
234
234
|
header: i18next.t('field.ro'),
|
|
235
|
+
imex: { header: i18next.t('field.ro'), key: 'name', width: 30, type: 'string' },
|
|
235
236
|
sortable: true,
|
|
236
237
|
width: 150
|
|
237
238
|
},
|
|
@@ -239,6 +240,7 @@ class B2bOrderList extends localize(i18next)(PageView) {
|
|
|
239
240
|
type: 'object',
|
|
240
241
|
name: 'bizplace',
|
|
241
242
|
header: i18next.t('field.company'),
|
|
243
|
+
imex: { header: i18next.t('field.company'), key: 'bizplace.name', width: 30, type: 'string' },
|
|
242
244
|
sortable: true,
|
|
243
245
|
width: 250
|
|
244
246
|
},
|
|
@@ -246,6 +248,7 @@ class B2bOrderList extends localize(i18next)(PageView) {
|
|
|
246
248
|
type: 'string',
|
|
247
249
|
name: 'refNo',
|
|
248
250
|
header: i18next.t('field.ref_no'),
|
|
251
|
+
imex: { header: i18next.t('field.ref_no'), key: 'refNo', width: 20, type: 'string' },
|
|
249
252
|
sortable: true,
|
|
250
253
|
width: 150
|
|
251
254
|
},
|
|
@@ -253,6 +256,7 @@ class B2bOrderList extends localize(i18next)(PageView) {
|
|
|
253
256
|
type: 'string',
|
|
254
257
|
name: 'refNo2',
|
|
255
258
|
header: i18next.t('field.ref_no_2'),
|
|
259
|
+
imex: { header: i18next.t('field.ref_no_2'), key: 'refNo2', width: 20, type: 'string' },
|
|
256
260
|
sortable: true,
|
|
257
261
|
width: 150
|
|
258
262
|
},
|
|
@@ -260,6 +264,7 @@ class B2bOrderList extends localize(i18next)(PageView) {
|
|
|
260
264
|
type: 'string',
|
|
261
265
|
name: 'refNo3',
|
|
262
266
|
header: i18next.t('field.ref_no_3'),
|
|
267
|
+
imex: { header: i18next.t('field.ref_no_3'), key: 'refNo3', width: 20, type: 'string' },
|
|
263
268
|
sortable: true,
|
|
264
269
|
width: 150
|
|
265
270
|
},
|
|
@@ -267,6 +272,7 @@ class B2bOrderList extends localize(i18next)(PageView) {
|
|
|
267
272
|
type: 'date',
|
|
268
273
|
name: 'releaseDate',
|
|
269
274
|
header: i18next.t('field.release_date'),
|
|
275
|
+
imex: { header: i18next.t('field.release_date'), key: 'releaseDate', width: 20, type: 'string' },
|
|
270
276
|
sortable: true,
|
|
271
277
|
width: 120
|
|
272
278
|
},
|
|
@@ -274,7 +280,7 @@ class B2bOrderList extends localize(i18next)(PageView) {
|
|
|
274
280
|
type: 'boolean',
|
|
275
281
|
name: 'exportOption',
|
|
276
282
|
header: i18next.t('field.export_option'),
|
|
277
|
-
|
|
283
|
+
imex: { header: i18next.t('field.export_option'), key: 'exportOption', width: 20, type: 'string' },
|
|
278
284
|
sortable: true,
|
|
279
285
|
width: 60
|
|
280
286
|
},
|
|
@@ -282,7 +288,7 @@ class B2bOrderList extends localize(i18next)(PageView) {
|
|
|
282
288
|
type: 'boolean',
|
|
283
289
|
name: 'ownTransport',
|
|
284
290
|
header: i18next.t('field.own_transport'),
|
|
285
|
-
|
|
291
|
+
imex: { header: i18next.t('field.own_transport'), key: 'ownTransport', width: 20, type: 'string' },
|
|
286
292
|
sortable: true,
|
|
287
293
|
width: 60
|
|
288
294
|
},
|
|
@@ -290,19 +296,21 @@ class B2bOrderList extends localize(i18next)(PageView) {
|
|
|
290
296
|
type: 'boolean',
|
|
291
297
|
name: 'crossDocking',
|
|
292
298
|
header: i18next.t('field.cross_docking'),
|
|
293
|
-
|
|
299
|
+
imex: { header: i18next.t('field.cross_docking'), key: 'crossDocking', width: 20, type: 'string' },
|
|
294
300
|
width: 60
|
|
295
301
|
},
|
|
296
302
|
{
|
|
297
303
|
type: 'object',
|
|
298
304
|
name: 'arrivalNotice',
|
|
299
305
|
header: i18next.t('field.gan'),
|
|
306
|
+
imex: { header: i18next.t('field.gan'), key: 'arrivalNotice.name', width: 30, type: 'string' },
|
|
300
307
|
width: 160
|
|
301
308
|
},
|
|
302
309
|
{
|
|
303
310
|
type: 'string',
|
|
304
311
|
name: 'status',
|
|
305
312
|
header: i18next.t('field.status'),
|
|
313
|
+
imex: { header: i18next.t('field.status'), key: 'status', width: 30, type: 'string' },
|
|
306
314
|
sortable: true,
|
|
307
315
|
width: 120
|
|
308
316
|
},
|
|
@@ -310,6 +318,7 @@ class B2bOrderList extends localize(i18next)(PageView) {
|
|
|
310
318
|
type: 'datetime',
|
|
311
319
|
name: 'createdAt',
|
|
312
320
|
header: i18next.t('field.created_at'),
|
|
321
|
+
imex: { header: i18next.t('field.created_at'), key: 'createdAt', width: 30, type: 'datetime' },
|
|
313
322
|
sortable: true,
|
|
314
323
|
width: 160
|
|
315
324
|
},
|
|
@@ -317,6 +326,7 @@ class B2bOrderList extends localize(i18next)(PageView) {
|
|
|
317
326
|
type: 'datetime',
|
|
318
327
|
name: 'updatedAt',
|
|
319
328
|
header: i18next.t('field.updated_at'),
|
|
329
|
+
imex: { header: i18next.t('field.updated_at'), key: 'updatedAt', width: 30, type: 'datetime' },
|
|
320
330
|
sortable: true,
|
|
321
331
|
width: 160
|
|
322
332
|
},
|
|
@@ -324,6 +334,7 @@ class B2bOrderList extends localize(i18next)(PageView) {
|
|
|
324
334
|
type: 'object',
|
|
325
335
|
name: 'creator',
|
|
326
336
|
header: i18next.t('field.created_by'),
|
|
337
|
+
imex: { header: i18next.t('field.created_by'), key: 'creator.name', width: 30, type: 'string' },
|
|
327
338
|
sortable: true,
|
|
328
339
|
width: 200
|
|
329
340
|
}
|
|
@@ -343,7 +354,7 @@ class B2bOrderList extends localize(i18next)(PageView) {
|
|
|
343
354
|
return this.config.columns
|
|
344
355
|
}
|
|
345
356
|
|
|
346
|
-
async fetchHandler({ page, limit, sorters = [
|
|
357
|
+
async fetchHandler({ page, limit, sorters = [] }) {
|
|
347
358
|
const response = await client.query({
|
|
348
359
|
query: gql`
|
|
349
360
|
query releaseGoodRequests($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
@@ -463,7 +474,36 @@ class B2bOrderList extends localize(i18next)(PageView) {
|
|
|
463
474
|
}
|
|
464
475
|
|
|
465
476
|
_exportableData() {
|
|
466
|
-
|
|
477
|
+
let records = []
|
|
478
|
+
if (this.dataGrist.selected && this.dataGrist.selected.length > 0) {
|
|
479
|
+
records = this.dataGrist.selected
|
|
480
|
+
} else {
|
|
481
|
+
records = this.dataGrist.data.records
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
var headerSetting = this.dataGrist._config.columns
|
|
485
|
+
.filter(column => column.type !== 'gutter' /* && column.record !== undefined */ && column.imex !== undefined)
|
|
486
|
+
.map(column => {
|
|
487
|
+
return column.imex
|
|
488
|
+
})
|
|
489
|
+
|
|
490
|
+
var data = records.map(item => {
|
|
491
|
+
return {
|
|
492
|
+
id: item.id,
|
|
493
|
+
...this._columns
|
|
494
|
+
.filter(column => column.type !== 'gutter' /* && column.record !== undefined */ && column.imex !== undefined)
|
|
495
|
+
.reduce((record, column) => {
|
|
496
|
+
record[column.imex.key] = column.imex.key
|
|
497
|
+
.split('.')
|
|
498
|
+
.reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
|
499
|
+
if (column.type === 'datetime') {
|
|
500
|
+
record[column.imex.key] = new Date(parseInt(record[column.imex.key])).toLocaleString()
|
|
501
|
+
}
|
|
502
|
+
return record
|
|
503
|
+
}, {})
|
|
504
|
+
}
|
|
505
|
+
})
|
|
506
|
+
return { header: headerSetting, data: data }
|
|
467
507
|
}
|
|
468
508
|
}
|
|
469
509
|
|
|
@@ -60,13 +60,13 @@ class B2bOrderRequests extends localize(i18next)(PageView) {
|
|
|
60
60
|
get context() {
|
|
61
61
|
return {
|
|
62
62
|
title: i18next.t('title.release_order_requests'),
|
|
63
|
-
actions: [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
],
|
|
63
|
+
// actions: [
|
|
64
|
+
// {
|
|
65
|
+
// title: i18next.t('button.batch_picking'),
|
|
66
|
+
// action: this._openBatchPickingPopup.bind(this),
|
|
67
|
+
// ...CommonButtonStyles.activate
|
|
68
|
+
// }
|
|
69
|
+
// ],
|
|
70
70
|
exportable: {
|
|
71
71
|
name: i18next.t('title.release_order_requests'),
|
|
72
72
|
data: this._exportableData.bind(this)
|
|
@@ -231,6 +231,7 @@ class B2bOrderRequests extends localize(i18next)(PageView) {
|
|
|
231
231
|
type: 'string',
|
|
232
232
|
name: 'name',
|
|
233
233
|
header: i18next.t('field.ro'),
|
|
234
|
+
imex: { header: i18next.t('field.ro'), key: 'name', width: 30, type: 'string' },
|
|
234
235
|
sortable: true,
|
|
235
236
|
width: 150
|
|
236
237
|
},
|
|
@@ -238,6 +239,7 @@ class B2bOrderRequests extends localize(i18next)(PageView) {
|
|
|
238
239
|
type: 'object',
|
|
239
240
|
name: 'bizplace',
|
|
240
241
|
header: i18next.t('field.company'),
|
|
242
|
+
imex: { header: i18next.t('field.company'), key: 'bizplace.name', width: 30, type: 'string' },
|
|
241
243
|
sortable: true,
|
|
242
244
|
width: 200
|
|
243
245
|
},
|
|
@@ -245,6 +247,7 @@ class B2bOrderRequests extends localize(i18next)(PageView) {
|
|
|
245
247
|
type: 'string',
|
|
246
248
|
name: 'refNo',
|
|
247
249
|
header: i18next.t('field.ref_no'),
|
|
250
|
+
imex: { header: i18next.t('field.ref_no'), key: 'refNo', width: 20, type: 'string' },
|
|
248
251
|
sortable: true,
|
|
249
252
|
width: 160
|
|
250
253
|
},
|
|
@@ -252,6 +255,7 @@ class B2bOrderRequests extends localize(i18next)(PageView) {
|
|
|
252
255
|
type: 'string',
|
|
253
256
|
name: 'refNo2',
|
|
254
257
|
header: i18next.t('field.ref_no_2'),
|
|
258
|
+
imex: { header: i18next.t('field.ref_no_2'), key: 'refNo2', width: 20, type: 'string' },
|
|
255
259
|
sortable: true,
|
|
256
260
|
width: 160
|
|
257
261
|
},
|
|
@@ -259,6 +263,7 @@ class B2bOrderRequests extends localize(i18next)(PageView) {
|
|
|
259
263
|
type: 'string',
|
|
260
264
|
name: 'refNo3',
|
|
261
265
|
header: i18next.t('field.ref_no_3'),
|
|
266
|
+
imex: { header: i18next.t('field.ref_no_3'), key: 'refNo3', width: 20, type: 'string' },
|
|
262
267
|
sortable: true,
|
|
263
268
|
width: 160
|
|
264
269
|
},
|
|
@@ -266,6 +271,7 @@ class B2bOrderRequests extends localize(i18next)(PageView) {
|
|
|
266
271
|
type: 'date',
|
|
267
272
|
name: 'releaseDate',
|
|
268
273
|
header: i18next.t('field.release_date'),
|
|
274
|
+
imex: { header: i18next.t('field.release_date'), key: 'releaseDate', width: 20, type: 'string' },
|
|
269
275
|
sortable: true,
|
|
270
276
|
width: 120
|
|
271
277
|
},
|
|
@@ -273,7 +279,7 @@ class B2bOrderRequests extends localize(i18next)(PageView) {
|
|
|
273
279
|
type: 'boolean',
|
|
274
280
|
name: 'exportOption',
|
|
275
281
|
header: i18next.t('field.export_option'),
|
|
276
|
-
|
|
282
|
+
imex: { header: i18next.t('field.export_option'), key: 'exportOption', width: 20, type: 'string' },
|
|
277
283
|
sortable: true,
|
|
278
284
|
width: 60
|
|
279
285
|
},
|
|
@@ -281,7 +287,7 @@ class B2bOrderRequests extends localize(i18next)(PageView) {
|
|
|
281
287
|
type: 'boolean',
|
|
282
288
|
name: 'ownTransport',
|
|
283
289
|
header: i18next.t('field.own_transport'),
|
|
284
|
-
|
|
290
|
+
imex: { header: i18next.t('field.own_transport'), key: 'ownTransport', width: 20, type: 'string' },
|
|
285
291
|
sortable: true,
|
|
286
292
|
width: 60
|
|
287
293
|
},
|
|
@@ -289,19 +295,21 @@ class B2bOrderRequests extends localize(i18next)(PageView) {
|
|
|
289
295
|
type: 'boolean',
|
|
290
296
|
name: 'crossDocking',
|
|
291
297
|
header: i18next.t('field.cross_docking'),
|
|
292
|
-
|
|
298
|
+
imex: { header: i18next.t('field.cross_docking'), key: 'crossDocking', width: 20, type: 'string' },
|
|
293
299
|
width: 60
|
|
294
300
|
},
|
|
295
301
|
{
|
|
296
302
|
type: 'object',
|
|
297
303
|
name: 'arrivalNotice',
|
|
298
304
|
header: i18next.t('field.gan'),
|
|
305
|
+
imex: { header: i18next.t('field.gan'), key: 'arrivalNotice.name', width: 30, type: 'string' },
|
|
299
306
|
width: 160
|
|
300
307
|
},
|
|
301
308
|
{
|
|
302
309
|
type: 'string',
|
|
303
310
|
name: 'status',
|
|
304
311
|
header: i18next.t('field.status'),
|
|
312
|
+
imex: { header: i18next.t('field.status'), key: 'status', width: 30, type: 'string' },
|
|
305
313
|
sortable: true,
|
|
306
314
|
width: 120
|
|
307
315
|
},
|
|
@@ -309,6 +317,7 @@ class B2bOrderRequests extends localize(i18next)(PageView) {
|
|
|
309
317
|
type: 'datetime',
|
|
310
318
|
name: 'createdAt',
|
|
311
319
|
header: i18next.t('field.created_at'),
|
|
320
|
+
imex: { header: i18next.t('field.created_at'), key: 'createdAt', width: 30, type: 'datetime' },
|
|
312
321
|
sortable: true,
|
|
313
322
|
width: 200
|
|
314
323
|
},
|
|
@@ -316,6 +325,7 @@ class B2bOrderRequests extends localize(i18next)(PageView) {
|
|
|
316
325
|
type: 'datetime',
|
|
317
326
|
name: 'updatedAt',
|
|
318
327
|
header: i18next.t('field.updated_at'),
|
|
328
|
+
imex: { header: i18next.t('field.updated_at'), key: 'updatedAt', width: 30, type: 'datetime' },
|
|
319
329
|
sortable: true,
|
|
320
330
|
width: 160
|
|
321
331
|
},
|
|
@@ -323,6 +333,7 @@ class B2bOrderRequests extends localize(i18next)(PageView) {
|
|
|
323
333
|
type: 'object',
|
|
324
334
|
name: 'acceptedBy',
|
|
325
335
|
header: i18next.t('field.accepted_by'),
|
|
336
|
+
imex: { header: i18next.t('field.accepted_by'), key: 'acceptedBy.name', width: 30, type: 'string' },
|
|
326
337
|
sortable: true,
|
|
327
338
|
width: 200
|
|
328
339
|
}
|
|
@@ -338,7 +349,7 @@ class B2bOrderRequests extends localize(i18next)(PageView) {
|
|
|
338
349
|
return this.shadowRoot.querySelector('data-grist')
|
|
339
350
|
}
|
|
340
351
|
|
|
341
|
-
async fetchHandler({ page, limit, sorters = [
|
|
352
|
+
async fetchHandler({ page, limit, sorters = [] }) {
|
|
342
353
|
const response = await client.query({
|
|
343
354
|
query: gql`
|
|
344
355
|
query releaseGoodRequests($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
@@ -480,7 +491,36 @@ class B2bOrderRequests extends localize(i18next)(PageView) {
|
|
|
480
491
|
}
|
|
481
492
|
|
|
482
493
|
_exportableData() {
|
|
483
|
-
|
|
494
|
+
let records = []
|
|
495
|
+
if (this.dataGrist.selected && this.dataGrist.selected.length > 0) {
|
|
496
|
+
records = this.dataGrist.selected
|
|
497
|
+
} else {
|
|
498
|
+
records = this.dataGrist.data.records
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
var headerSetting = this.dataGrist._config.columns
|
|
502
|
+
.filter(column => column.type !== 'gutter' /* && column.record !== undefined */ && column.imex !== undefined)
|
|
503
|
+
.map(column => {
|
|
504
|
+
return column.imex
|
|
505
|
+
})
|
|
506
|
+
|
|
507
|
+
var data = records.map(item => {
|
|
508
|
+
return {
|
|
509
|
+
id: item.id,
|
|
510
|
+
...this._columns
|
|
511
|
+
.filter(column => column.type !== 'gutter' /* && column.record !== undefined */ && column.imex !== undefined)
|
|
512
|
+
.reduce((record, column) => {
|
|
513
|
+
record[column.imex.key] = column.imex.key
|
|
514
|
+
.split('.')
|
|
515
|
+
.reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
|
516
|
+
if (column.type === 'datetime') {
|
|
517
|
+
record[column.imex.key] = new Date(parseInt(record[column.imex.key])).toLocaleString()
|
|
518
|
+
}
|
|
519
|
+
return record
|
|
520
|
+
}, {})
|
|
521
|
+
}
|
|
522
|
+
})
|
|
523
|
+
return { header: headerSetting, data: data }
|
|
484
524
|
}
|
|
485
525
|
}
|
|
486
526
|
|