@things-factory/operato-wms 4.3.137 → 4.3.138
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 +14 -6
- package/client/pages/bulk-operation/bulk-operation.js +3 -1
- package/client/pages/components/select-inventory-popup.js +7 -1
- package/client/pages/components/select-product-popup.js +33 -3
- package/client/pages/constants/order.js +3 -1
- package/client/pages/inbound/external-return-worksheet.js +39 -2
- package/client/pages/inbound/undo-putaway-popup.js +5 -9
- package/client/pages/inbound/undo-unload-popup.js +42 -35
- package/client/pages/inbound/unload-product.js +79 -69
- package/client/pages/inventory/inventory-adjustment-approval.js +4 -5
- package/client/pages/inventory/inventory-adjustment.js +56 -2
- package/client/pages/inventory/inventory-by-product-detail.js +23 -17
- package/client/pages/inventory/inventory-by-product.js +7 -0
- package/client/pages/inventory/inventory-history-by-pallet.js +14 -5
- package/client/pages/inventory/inventory-history.js +10 -0
- package/client/pages/inventory-check/check-inventory-popup.js +1 -1
- package/client/pages/inventory-check/create-cycle-count.js +2 -3
- package/client/pages/inventory-check/inspecting-product.js +7 -3
- package/client/pages/manifest/create-loading-manifest.js +8 -1
- package/client/pages/manifest/loading-manifest-detail.js +7 -4
- package/client/pages/master/generate-location-list.js +30 -22
- package/client/pages/master/location-list.js +134 -71
- package/client/pages/master/pallet-list.js +137 -58
- package/client/pages/master/product/product-details-popup.js +3 -3
- package/client/pages/master/tote-list.js +40 -27
- package/client/pages/master/transport-driver.js +48 -41
- package/client/pages/master/transport-vehicle.js +45 -41
- package/client/pages/master/warehouse-list.js +56 -34
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +36 -25
- package/client/pages/order/arrival-notice/create-arrival-notice.js +78 -95
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +2 -0
- package/client/pages/order/arrival-notice/edit-product-popup.js +10 -8
- package/client/pages/order/draft-release-good/draft-release-good-detail.js +88 -4
- package/client/pages/order/draft-release-good/draft-release-good-list.js +1 -1
- package/client/pages/order/release-order/create-release-order.js +34 -9
- package/client/pages/order/release-order/release-extra-product-popup.js +4 -1
- package/client/pages/order/release-order/release-order-detail.js +40 -3
- package/client/pages/order/return-order/create-return-order.js +5 -0
- package/client/pages/order/return-order/return-order-inventory-popup.js +1 -0
- package/client/pages/order/return-order/return-order-requests.js +37 -2
- package/client/pages/order/transport-order/delivery-note-popup.js +30 -24
- package/client/pages/order/transport-order/delivery-order-list.js +27 -1
- package/client/pages/outbound/inventory-reassign-popup.js +7 -3
- package/client/pages/outbound/packing-product.js +7 -7
- package/client/pages/outbound/packing-worksheet-list.js +3 -1
- package/client/pages/outbound/picking-product.js +17 -5
- package/client/pages/outbound/serial-number-popup.js +1 -1
- package/client/pages/outbound/show-my-worksheet-list-popup.js +12 -3
- package/client/pages/report/custom-elccl/elccl-daily-collection-report.js +5 -2
- package/client/pages/report/custom-elccl/elccl-daily-order-inventory-report.js +2 -2
- package/client/pages/report/custom-elccl/elccl-delivery-order-summary.js +34 -8
- package/client/pages/report/custom-elccl/elccl-inventory-pallet-detail-report.js +42 -4
- package/client/pages/report/custom-elccl/elccl-inventory-summary-report.js +46 -4
- package/client/pages/report/volume-summary-report.js +8 -3
- package/config.development.js +28 -21
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js +6 -5
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js.map +1 -1
- package/dist-server/graphql/resolvers/other/add-release-good-products.js +7 -11
- package/dist-server/graphql/resolvers/other/add-release-good-products.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/costing-report.js +18 -24
- package/dist-server/graphql/resolvers/reports/costing-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +6 -6
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +8 -9
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/release-inventory-report.js +3 -3
- package/dist-server/graphql/resolvers/reports/release-inventory-report.js.map +1 -1
- package/package.json +24 -24
- package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts +6 -5
- package/server/graphql/resolvers/other/add-release-good-products.ts +8 -12
- package/server/graphql/resolvers/reports/costing-report.ts +18 -24
- package/server/graphql/resolvers/reports/inbound-order-details-report.ts +6 -6
- package/server/graphql/resolvers/reports/outbound-order-details-report.ts +8 -9
- package/server/graphql/resolvers/reports/release-inventory-report.ts +6 -4
- package/translations/en.json +28 -3
- package/translations/ko.json +26 -2
- package/translations/ms.json +26 -2
- package/translations/zh.json +26 -2
|
@@ -164,7 +164,7 @@ class ToteList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
166
|
label: i18next.t('field.deleted'),
|
|
167
|
-
name: '
|
|
167
|
+
name: 'deleted_at',
|
|
168
168
|
type: 'checkbox',
|
|
169
169
|
props: { searchOper: 'eq' }
|
|
170
170
|
}
|
|
@@ -175,6 +175,7 @@ class ToteList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
175
175
|
fields: ['toteNo', 'company', 'status']
|
|
176
176
|
},
|
|
177
177
|
rows: { selectable: { multiple: true } },
|
|
178
|
+
pagination: { limit: 50, pages: [50, 100, 200, 500] },
|
|
178
179
|
columns: [
|
|
179
180
|
{ type: 'gutter', gutterName: 'dirty' },
|
|
180
181
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
@@ -316,7 +317,7 @@ class ToteList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
316
317
|
}
|
|
317
318
|
`,
|
|
318
319
|
variables: {
|
|
319
|
-
filters:
|
|
320
|
+
filters: this.searchForm.queryFilters,
|
|
320
321
|
pagination: { page, limit },
|
|
321
322
|
sortings: sorters
|
|
322
323
|
}
|
|
@@ -335,12 +336,17 @@ class ToteList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
335
336
|
}
|
|
336
337
|
|
|
337
338
|
async importHandler(patches) {
|
|
339
|
+
let existedToteStatus = this._toteStatus
|
|
338
340
|
try {
|
|
339
341
|
patches.map(itm => {
|
|
340
342
|
if (itm.cuFlag == '+') {
|
|
341
343
|
if (!itm.bizplace?.id || !itm.status || !itm.name) {
|
|
342
344
|
throw new Error(i18next.t('text.empty_value_in_list'))
|
|
343
345
|
}
|
|
346
|
+
let foundToteStatus = existedToteStatus.find(exist => exist.name == itm.status)
|
|
347
|
+
if (!foundToteStatus) {
|
|
348
|
+
throw new Error(i18next.t('text.tote_status_does_not_exist'))
|
|
349
|
+
}
|
|
344
350
|
}
|
|
345
351
|
})
|
|
346
352
|
|
|
@@ -375,35 +381,37 @@ class ToteList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
375
381
|
}
|
|
376
382
|
|
|
377
383
|
async _saveTote() {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
mutation
|
|
385
|
-
updateMultipleTote(patches:
|
|
386
|
-
|
|
384
|
+
try {
|
|
385
|
+
let patches = this.dataGrist.exportPatchList({ flagName: 'cuFlag' })
|
|
386
|
+
this._validateTote(patches)
|
|
387
|
+
if (patches && patches.length) {
|
|
388
|
+
this.dataGrist.showSpinner()
|
|
389
|
+
const response = await client.mutate({
|
|
390
|
+
mutation: gql`
|
|
391
|
+
mutation updateMultipleTote($patches: [TotePatch!]!) {
|
|
392
|
+
updateMultipleTote(patches: $patches) {
|
|
393
|
+
name
|
|
394
|
+
}
|
|
387
395
|
}
|
|
396
|
+
`,
|
|
397
|
+
variables: {
|
|
398
|
+
patches
|
|
388
399
|
}
|
|
389
|
-
|
|
390
|
-
variables: {
|
|
391
|
-
patches
|
|
392
|
-
}
|
|
393
|
-
})
|
|
400
|
+
})
|
|
394
401
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
402
|
+
if (!response.errors) {
|
|
403
|
+
this.dataGrist.fetch()
|
|
404
|
+
document.dispatchEvent(
|
|
405
|
+
new CustomEvent('notify', {
|
|
406
|
+
detail: {
|
|
407
|
+
message: i18next.t('text.data_updated_successfully')
|
|
408
|
+
}
|
|
409
|
+
})
|
|
410
|
+
)
|
|
411
|
+
}
|
|
412
|
+
this.dataGrist.hideSpinner()
|
|
404
413
|
}
|
|
405
|
-
|
|
406
|
-
}
|
|
414
|
+
} catch (e) {}
|
|
407
415
|
}
|
|
408
416
|
|
|
409
417
|
_validateTote(patches) {
|
|
@@ -473,6 +481,11 @@ class ToteList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
473
481
|
})
|
|
474
482
|
)
|
|
475
483
|
}
|
|
484
|
+
} else {
|
|
485
|
+
CustomAlert({
|
|
486
|
+
title: i18next.t('text.nothing_selected'),
|
|
487
|
+
text: i18next.t('text.there_is_nothing_to_delete')
|
|
488
|
+
})
|
|
476
489
|
}
|
|
477
490
|
this.dataGrist.hideSpinner()
|
|
478
491
|
}
|
|
@@ -10,6 +10,7 @@ import { openPopup } from '@things-factory/layout-base'
|
|
|
10
10
|
import { client, CustomAlert, PageView } from '@things-factory/shell'
|
|
11
11
|
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
12
12
|
import { isMobileDevice } from '@things-factory/utils'
|
|
13
|
+
import { showToast } from '../../util/index'
|
|
13
14
|
|
|
14
15
|
class TransportDriver extends localize(i18next)(PageView) {
|
|
15
16
|
static get properties() {
|
|
@@ -98,7 +99,7 @@ class TransportDriver extends localize(i18next)(PageView) {
|
|
|
98
99
|
label: i18next.t('field.driver_code'),
|
|
99
100
|
name: 'driverCode',
|
|
100
101
|
type: 'text',
|
|
101
|
-
props: { searchOper: '
|
|
102
|
+
props: { searchOper: 'i_like' }
|
|
102
103
|
},
|
|
103
104
|
{
|
|
104
105
|
label: i18next.t('field.description'),
|
|
@@ -110,6 +111,7 @@ class TransportDriver extends localize(i18next)(PageView) {
|
|
|
110
111
|
|
|
111
112
|
this.config = {
|
|
112
113
|
rows: { selectable: { multiple: true } },
|
|
114
|
+
pagination: { limit: 50, pages: [50, 100, 200, 500] },
|
|
113
115
|
columns: [
|
|
114
116
|
{ type: 'gutter', gutterName: 'dirty' },
|
|
115
117
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
@@ -228,47 +230,63 @@ class TransportDriver extends localize(i18next)(PageView) {
|
|
|
228
230
|
}
|
|
229
231
|
|
|
230
232
|
async importHandler(patches) {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
name
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
`,
|
|
239
|
-
variables: { patches }
|
|
240
|
-
})
|
|
241
|
-
|
|
242
|
-
if (!response.errors) {
|
|
243
|
-
history.back()
|
|
244
|
-
this.dataGrist.fetch()
|
|
245
|
-
this._showToast({ message: i18next.t('text.data_imported_successfully') })
|
|
246
|
-
}
|
|
247
|
-
}
|
|
233
|
+
try {
|
|
234
|
+
if (patches.some(p => (!p.name || !p.driverCode) && p.cuFlag == '+')) {
|
|
235
|
+
throw new Error(i18next.t('text.empty_value_in_list'))
|
|
236
|
+
}
|
|
248
237
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
if (!patches?.length) {
|
|
252
|
-
CustomAlert({
|
|
253
|
-
title: i18next.t('text.nothing_changed'),
|
|
254
|
-
text: i18next.t('text.there_is_nothing_to_save')
|
|
238
|
+
patches = patches.map(p => {
|
|
239
|
+
return { ...p, cuFlag: '' }
|
|
255
240
|
})
|
|
256
|
-
} else {
|
|
257
241
|
const response = await client.mutate({
|
|
258
242
|
mutation: gql`
|
|
259
243
|
mutation updateMultipleTransportDriver($patches: [TransportDriverPatch!]!) {
|
|
260
|
-
updateMultipleTransportDriver(patches: $patches)
|
|
261
|
-
name
|
|
262
|
-
}
|
|
244
|
+
updateMultipleTransportDriver(patches: $patches)
|
|
263
245
|
}
|
|
264
246
|
`,
|
|
265
247
|
variables: { patches }
|
|
266
248
|
})
|
|
267
249
|
|
|
268
250
|
if (!response.errors) {
|
|
251
|
+
history.back()
|
|
269
252
|
this.dataGrist.fetch()
|
|
270
|
-
|
|
253
|
+
showToast({ message: i18next.t('text.data_imported_successfully') })
|
|
271
254
|
}
|
|
255
|
+
} catch (e) {
|
|
256
|
+
showToast(e)
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
async _saveTransportDriver() {
|
|
261
|
+
try {
|
|
262
|
+
let patches = this.dataGrist.exportPatchList({ flagName: 'cuFlag' })
|
|
263
|
+
|
|
264
|
+
if (patches.some(p => (!p.name || !p.driverCode) && p.cuFlag == '+')) {
|
|
265
|
+
throw new Error(i18next.t('text.empty_value_in_list'))
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if (!patches?.length) {
|
|
269
|
+
CustomAlert({
|
|
270
|
+
title: i18next.t('text.nothing_changed'),
|
|
271
|
+
text: i18next.t('text.there_is_nothing_to_save')
|
|
272
|
+
})
|
|
273
|
+
} else {
|
|
274
|
+
const response = await client.mutate({
|
|
275
|
+
mutation: gql`
|
|
276
|
+
mutation updateMultipleTransportDriver($patches: [TransportDriverPatch!]!) {
|
|
277
|
+
updateMultipleTransportDriver(patches: $patches)
|
|
278
|
+
}
|
|
279
|
+
`,
|
|
280
|
+
variables: { patches }
|
|
281
|
+
})
|
|
282
|
+
|
|
283
|
+
if (!response.errors) {
|
|
284
|
+
this.dataGrist.fetch()
|
|
285
|
+
showToast({ message: i18next.t('text.data_updated_successfully') })
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
} catch (e) {
|
|
289
|
+
showToast(e)
|
|
272
290
|
}
|
|
273
291
|
}
|
|
274
292
|
|
|
@@ -301,7 +319,7 @@ class TransportDriver extends localize(i18next)(PageView) {
|
|
|
301
319
|
|
|
302
320
|
if (!response.errors) {
|
|
303
321
|
this.dataGrist.fetch()
|
|
304
|
-
|
|
322
|
+
showToast({ message: i18next.t('text.data_deleted_successfully') })
|
|
305
323
|
}
|
|
306
324
|
}
|
|
307
325
|
}
|
|
@@ -340,17 +358,6 @@ class TransportDriver extends localize(i18next)(PageView) {
|
|
|
340
358
|
|
|
341
359
|
return { header: headerSetting, data: data }
|
|
342
360
|
}
|
|
343
|
-
|
|
344
|
-
_showToast({ type, message }) {
|
|
345
|
-
document.dispatchEvent(
|
|
346
|
-
new CustomEvent('notify', {
|
|
347
|
-
detail: {
|
|
348
|
-
type,
|
|
349
|
-
message
|
|
350
|
-
}
|
|
351
|
-
})
|
|
352
|
-
)
|
|
353
|
-
}
|
|
354
361
|
}
|
|
355
362
|
|
|
356
363
|
window.customElements.define('transport-driver', TransportDriver)
|
|
@@ -10,6 +10,7 @@ import { openPopup } from '@things-factory/layout-base'
|
|
|
10
10
|
import { client, CustomAlert, PageView } from '@things-factory/shell'
|
|
11
11
|
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
12
12
|
import { isMobileDevice } from '@things-factory/utils'
|
|
13
|
+
import { showToast } from '../../util/index'
|
|
13
14
|
|
|
14
15
|
class TransportVehicle extends localize(i18next)(PageView) {
|
|
15
16
|
static get styles() {
|
|
@@ -114,6 +115,7 @@ class TransportVehicle extends localize(i18next)(PageView) {
|
|
|
114
115
|
list: {
|
|
115
116
|
fields: ['name', 'description', 'updatedAt']
|
|
116
117
|
},
|
|
118
|
+
pagination: { limit: 50, pages: [50, 100, 200, 500] },
|
|
117
119
|
columns: [
|
|
118
120
|
{ type: 'gutter', gutterName: 'dirty' },
|
|
119
121
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
@@ -121,7 +123,7 @@ class TransportVehicle extends localize(i18next)(PageView) {
|
|
|
121
123
|
{
|
|
122
124
|
type: 'string',
|
|
123
125
|
name: 'name',
|
|
124
|
-
header: i18next.t('field.
|
|
126
|
+
header: i18next.t('field.reg_number'),
|
|
125
127
|
record: { editable: true },
|
|
126
128
|
imex: { header: i18next.t('field.name'), key: 'name', width: 50, type: 'string' },
|
|
127
129
|
sortable: true,
|
|
@@ -239,47 +241,60 @@ class TransportVehicle extends localize(i18next)(PageView) {
|
|
|
239
241
|
}
|
|
240
242
|
|
|
241
243
|
async importHandler(patches) {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
updateMultipleTransportVehicle(patches: $patches) {
|
|
246
|
-
name
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
`,
|
|
250
|
-
variables: { patches }
|
|
251
|
-
})
|
|
244
|
+
try {
|
|
245
|
+
if (patches.some(p => (!p.name || !p.size || !p.status) && p.cuFlag == '+'))
|
|
246
|
+
throw new Error(i18next.t('text.empty_value_in_list'))
|
|
252
247
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
this.dataGrist.fetch()
|
|
256
|
-
this._showToast({ message: i18next.t('text.data_imported_successfully') })
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
async _saveTransportVehicle() {
|
|
261
|
-
let patches = this.dataGrist.exportPatchList({ flagName: 'cuFlag' })
|
|
262
|
-
if (!patches?.length) {
|
|
263
|
-
CustomAlert({
|
|
264
|
-
title: i18next.t('text.nothing_changed'),
|
|
265
|
-
text: i18next.t('text.there_is_nothing_to_save')
|
|
248
|
+
patches = patches.map(p => {
|
|
249
|
+
return { ...p, cuFlag: '' }
|
|
266
250
|
})
|
|
267
|
-
} else {
|
|
268
251
|
const response = await client.mutate({
|
|
269
252
|
mutation: gql`
|
|
270
253
|
mutation updateMultipleTransportVehicle($patches: [TransportVehiclePatch!]!) {
|
|
271
|
-
updateMultipleTransportVehicle(patches: $patches)
|
|
272
|
-
name
|
|
273
|
-
}
|
|
254
|
+
updateMultipleTransportVehicle(patches: $patches)
|
|
274
255
|
}
|
|
275
256
|
`,
|
|
276
257
|
variables: { patches }
|
|
277
258
|
})
|
|
278
259
|
|
|
279
260
|
if (!response.errors) {
|
|
261
|
+
history.back()
|
|
280
262
|
this.dataGrist.fetch()
|
|
281
|
-
|
|
263
|
+
showToast({ message: i18next.t('text.data_imported_successfully') })
|
|
282
264
|
}
|
|
265
|
+
} catch (e) {
|
|
266
|
+
showToast(e)
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
async _saveTransportVehicle() {
|
|
271
|
+
try {
|
|
272
|
+
let patches = this.dataGrist.exportPatchList({ flagName: 'cuFlag' })
|
|
273
|
+
if (!patches?.length) {
|
|
274
|
+
CustomAlert({
|
|
275
|
+
title: i18next.t('text.nothing_changed'),
|
|
276
|
+
text: i18next.t('text.there_is_nothing_to_save')
|
|
277
|
+
})
|
|
278
|
+
} else {
|
|
279
|
+
if (patches.some(p => (!p.name || !p.size || !p.status) && p.cuFlag == '+'))
|
|
280
|
+
throw new Error(i18next.t('text.empty_value_in_list'))
|
|
281
|
+
|
|
282
|
+
const response = await client.mutate({
|
|
283
|
+
mutation: gql`
|
|
284
|
+
mutation updateMultipleTransportVehicle($patches: [TransportVehiclePatch!]!) {
|
|
285
|
+
updateMultipleTransportVehicle(patches: $patches)
|
|
286
|
+
}
|
|
287
|
+
`,
|
|
288
|
+
variables: { patches }
|
|
289
|
+
})
|
|
290
|
+
|
|
291
|
+
if (!response.errors) {
|
|
292
|
+
this.dataGrist.fetch()
|
|
293
|
+
showToast({ message: i18next.t('text.data_updated_successfully') })
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
} catch (e) {
|
|
297
|
+
showToast(e)
|
|
283
298
|
}
|
|
284
299
|
}
|
|
285
300
|
|
|
@@ -312,7 +327,7 @@ class TransportVehicle extends localize(i18next)(PageView) {
|
|
|
312
327
|
|
|
313
328
|
if (!response.errors) {
|
|
314
329
|
this.dataGrist.fetch()
|
|
315
|
-
|
|
330
|
+
showToast({ message: i18next.t('text.data_deleted_successfully') })
|
|
316
331
|
}
|
|
317
332
|
}
|
|
318
333
|
}
|
|
@@ -351,17 +366,6 @@ class TransportVehicle extends localize(i18next)(PageView) {
|
|
|
351
366
|
|
|
352
367
|
return { header: headerSetting, data: data }
|
|
353
368
|
}
|
|
354
|
-
|
|
355
|
-
_showToast({ type, message }) {
|
|
356
|
-
document.dispatchEvent(
|
|
357
|
-
new CustomEvent('notify', {
|
|
358
|
-
detail: {
|
|
359
|
-
type,
|
|
360
|
-
message
|
|
361
|
-
}
|
|
362
|
-
})
|
|
363
|
-
)
|
|
364
|
-
}
|
|
365
369
|
}
|
|
366
370
|
|
|
367
371
|
window.customElements.define('transport-vehicle', TransportVehicle)
|
|
@@ -9,6 +9,7 @@ import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
|
|
|
9
9
|
import { isMobileDevice } from '@things-factory/utils'
|
|
10
10
|
import gql from 'graphql-tag'
|
|
11
11
|
import { css, html } from 'lit-element'
|
|
12
|
+
import { showToast } from '../../util'
|
|
12
13
|
|
|
13
14
|
class WarehouseList extends localize(i18next)(PageView) {
|
|
14
15
|
static get styles() {
|
|
@@ -264,41 +265,14 @@ class WarehouseList extends localize(i18next)(PageView) {
|
|
|
264
265
|
}
|
|
265
266
|
|
|
266
267
|
async importHandler(patches) {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
updateMultipleWarehouse(patches: $patches) {
|
|
271
|
-
name
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
`,
|
|
275
|
-
variables: {
|
|
276
|
-
patches
|
|
268
|
+
try {
|
|
269
|
+
if (patches.some(p => (!p.name || !p.type) && p.cuFlag == '+')) {
|
|
270
|
+
throw new Error(i18next.t('text.empty_value_in_list'))
|
|
277
271
|
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
if (!response.errors) {
|
|
281
|
-
history.back()
|
|
282
|
-
this.dataGrist.fetch()
|
|
283
|
-
document.dispatchEvent(
|
|
284
|
-
new CustomEvent('notify', {
|
|
285
|
-
detail: {
|
|
286
|
-
message: i18next.t('text.data_imported_successfully')
|
|
287
|
-
}
|
|
288
|
-
})
|
|
289
|
-
)
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
async _saveWarehouse() {
|
|
294
|
-
let patches = this.dataGrist.exportPatchList({ flagName: 'cuFlag' })
|
|
295
|
-
if (patches && patches.length) {
|
|
296
|
-
const response = await client.mutate({
|
|
297
|
-
mutation: gql`
|
|
272
|
+
const response = await client.query({
|
|
273
|
+
query: gql`
|
|
298
274
|
mutation updateMultipleWarehouse($patches: [WarehousePatch!]!) {
|
|
299
|
-
updateMultipleWarehouse(patches: $patches)
|
|
300
|
-
name
|
|
301
|
-
}
|
|
275
|
+
updateMultipleWarehouse(patches: $patches)
|
|
302
276
|
}
|
|
303
277
|
`,
|
|
304
278
|
variables: {
|
|
@@ -307,15 +281,58 @@ class WarehouseList extends localize(i18next)(PageView) {
|
|
|
307
281
|
})
|
|
308
282
|
|
|
309
283
|
if (!response.errors) {
|
|
284
|
+
history.back()
|
|
310
285
|
this.dataGrist.fetch()
|
|
311
286
|
document.dispatchEvent(
|
|
312
287
|
new CustomEvent('notify', {
|
|
313
288
|
detail: {
|
|
314
|
-
message: i18next.t('text.
|
|
289
|
+
message: i18next.t('text.data_imported_successfully')
|
|
315
290
|
}
|
|
316
291
|
})
|
|
317
292
|
)
|
|
318
293
|
}
|
|
294
|
+
} catch (e) {
|
|
295
|
+
showToast(e)
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
async _saveWarehouse() {
|
|
300
|
+
try {
|
|
301
|
+
let patches = this.dataGrist.exportPatchList({ flagName: 'cuFlag' })
|
|
302
|
+
if (patches.some(p => (!p.name || !p.type) && p.cuFlag == '+')) {
|
|
303
|
+
throw new Error(i18next.t('text.empty_value_in_list'))
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
if (!patches?.length) {
|
|
307
|
+
CustomAlert({
|
|
308
|
+
title: i18next.t('text.nothing_changed'),
|
|
309
|
+
text: i18next.t('text.there_is_nothing_to_save')
|
|
310
|
+
})
|
|
311
|
+
} else {
|
|
312
|
+
const response = await client.mutate({
|
|
313
|
+
mutation: gql`
|
|
314
|
+
mutation updateMultipleWarehouse($patches: [WarehousePatch!]!) {
|
|
315
|
+
updateMultipleWarehouse(patches: $patches)
|
|
316
|
+
}
|
|
317
|
+
`,
|
|
318
|
+
variables: {
|
|
319
|
+
patches
|
|
320
|
+
}
|
|
321
|
+
})
|
|
322
|
+
|
|
323
|
+
if (!response.errors) {
|
|
324
|
+
this.dataGrist.fetch()
|
|
325
|
+
document.dispatchEvent(
|
|
326
|
+
new CustomEvent('notify', {
|
|
327
|
+
detail: {
|
|
328
|
+
message: i18next.t('text.data_updated_successfully')
|
|
329
|
+
}
|
|
330
|
+
})
|
|
331
|
+
)
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
} catch (e) {
|
|
335
|
+
showToast(e)
|
|
319
336
|
}
|
|
320
337
|
}
|
|
321
338
|
|
|
@@ -349,6 +366,11 @@ class WarehouseList extends localize(i18next)(PageView) {
|
|
|
349
366
|
})
|
|
350
367
|
)
|
|
351
368
|
}
|
|
369
|
+
} else {
|
|
370
|
+
CustomAlert({
|
|
371
|
+
title: i18next.t('text.nothing_selected'),
|
|
372
|
+
text: i18next.t('text.there_is_nothing_to_delete')
|
|
373
|
+
})
|
|
352
374
|
}
|
|
353
375
|
}
|
|
354
376
|
}
|
|
@@ -7,6 +7,7 @@ import '../../inbound/pallet-label-popup'
|
|
|
7
7
|
import './edit-product-popup'
|
|
8
8
|
import './proceed-edit-product-popup'
|
|
9
9
|
import './view-product-changes-popup'
|
|
10
|
+
import { BufferLocationSelector } from '@things-factory/warehouse-ui'
|
|
10
11
|
|
|
11
12
|
import gql from 'graphql-tag'
|
|
12
13
|
import { css, html } from 'lit-element'
|
|
@@ -19,7 +20,6 @@ import { openPopup } from '@things-factory/layout-base'
|
|
|
19
20
|
import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
|
|
20
21
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
21
22
|
import { isMobileDevice } from '@things-factory/utils'
|
|
22
|
-
import { BufferLocationSelector } from '@things-factory/warehouse-ui'
|
|
23
23
|
import { fetchSettingRule } from '../../../fetch-setting-value'
|
|
24
24
|
|
|
25
25
|
import {
|
|
@@ -929,6 +929,9 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
|
|
|
929
929
|
sku
|
|
930
930
|
brand
|
|
931
931
|
}
|
|
932
|
+
productDetail {
|
|
933
|
+
id
|
|
934
|
+
}
|
|
932
935
|
remark
|
|
933
936
|
unitPrice
|
|
934
937
|
adjustedUnitPrice
|
|
@@ -1080,37 +1083,45 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
|
|
|
1080
1083
|
}
|
|
1081
1084
|
|
|
1082
1085
|
async _updateArrivalNotice() {
|
|
1083
|
-
|
|
1086
|
+
try {
|
|
1087
|
+
const arrivalNoticeInfo = this._getFormInfo()
|
|
1084
1088
|
|
|
1085
|
-
|
|
1086
|
-
|
|
1089
|
+
if (arrivalNoticeInfo.container) {
|
|
1090
|
+
if (!arrivalNoticeInfo.containerNo || arrivalNoticeInfo?.containerNo == '')
|
|
1091
|
+
throw new Error(i18next.t('text.container_no_is_empty'))
|
|
1087
1092
|
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
} else if (arrivalNoticeInfo.warehouseTransport) {
|
|
1092
|
-
arrivalNoticeInfo.deliveryOrderNo = ''
|
|
1093
|
-
arrivalNoticeInfo.truckNo = ''
|
|
1094
|
-
}
|
|
1093
|
+
if (!arrivalNoticeInfo.containerSize || this.arrivalNoticeForm?.containerSize == '')
|
|
1094
|
+
throw new Error(i18next.t('text.please_select_container_size'))
|
|
1095
|
+
}
|
|
1095
1096
|
|
|
1096
|
-
|
|
1097
|
-
|
|
1097
|
+
arrivalNoticeInfo.name = this._ganNo
|
|
1098
|
+
delete arrivalNoticeInfo.bizplaceName
|
|
1098
1099
|
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1100
|
+
if (!arrivalNoticeInfo.container) {
|
|
1101
|
+
arrivalNoticeInfo.containerNo = ''
|
|
1102
|
+
arrivalNoticeInfo.containerSize = ''
|
|
1103
|
+
} else if (arrivalNoticeInfo.warehouseTransport) {
|
|
1104
|
+
arrivalNoticeInfo.deliveryOrderNo = ''
|
|
1105
|
+
arrivalNoticeInfo.truckNo = ''
|
|
1106
|
+
}
|
|
1103
1107
|
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
text: i18next.t('text.update_arrival_notice_details'),
|
|
1107
|
-
confirmButton: { text: i18next.t('button.submit') },
|
|
1108
|
-
cancelButton: { text: i18next.t('button.cancel') }
|
|
1109
|
-
})
|
|
1108
|
+
delete arrivalNoticeInfo.warehouseTransport
|
|
1109
|
+
delete arrivalNoticeInfo['buffer-location']
|
|
1110
1110
|
|
|
1111
|
-
|
|
1111
|
+
if (this._warehouseTransport) {
|
|
1112
|
+
arrivalNoticeInfo.truckNo = ''
|
|
1113
|
+
arrivalNoticeInfo.deliveryOrderNo = ''
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
const result = await CustomAlert({
|
|
1117
|
+
title: i18next.t('title.are_you_sure'),
|
|
1118
|
+
text: i18next.t('text.update_arrival_notice_details'),
|
|
1119
|
+
confirmButton: { text: i18next.t('button.submit') },
|
|
1120
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
1121
|
+
})
|
|
1122
|
+
|
|
1123
|
+
if (!result.value) return
|
|
1112
1124
|
|
|
1113
|
-
try {
|
|
1114
1125
|
const response = await client.mutate({
|
|
1115
1126
|
mutation: gql`
|
|
1116
1127
|
mutation updateArrivalNoticeDetails($arrivalNotice: ArrivalNoticePatch!) {
|