@things-factory/operato-wms 4.3.104 → 4.3.105-alpha.0
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/bulk-operation/bulk-operation.js +8 -10
- package/client/pages/components/select-inventory-popup.js +7 -1
- package/client/pages/components/select-product-popup.js +31 -2
- package/client/pages/inbound/undo-putaway-popup.js +5 -9
- package/client/pages/inbound/undo-unload-popup.js +15 -2
- package/client/pages/inbound/unload-product.js +71 -67
- package/client/pages/inventory/inventory-adjustment-approval.js +4 -5
- package/client/pages/inventory/inventory-adjustment.js +7 -0
- package/client/pages/inventory-check/create-cycle-count.js +2 -3
- package/client/pages/inventory-check/inventory-check-list.js +94 -10
- 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 +114 -73
- package/client/pages/master/pallet-list.js +88 -58
- package/client/pages/master/product/product-details-popup.js +3 -3
- package/client/pages/master/tote-list.js +35 -27
- package/client/pages/master/transport-driver.js +50 -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 +53 -32
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +2 -0
- package/client/pages/order/arrival-notice/edit-product-popup.js +9 -7
- package/client/pages/order/draft-release-good/draft-release-good-detail.js +7 -1
- package/client/pages/order/release-order/create-release-order.js +24 -5
- package/client/pages/order/release-order/release-extra-product-popup.js +4 -1
- package/client/pages/order/release-order/release-order-detail.js +4 -0
- package/client/pages/order/return-order/create-return-order.js +1 -0
- package/client/pages/order/return-order/return-order-inventory-popup.js +1 -0
- package/client/pages/outbound/inventory-reassign-popup.js +6 -0
- package/client/pages/outbound/packing-product.js +8 -6
- package/client/pages/outbound/picking-product.js +11 -1
- package/config.development.js +27 -33
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js +4 -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 +5 -6
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
- package/package.json +50 -50
- package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts +4 -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 +5 -6
- package/translations/en.json +11 -10
- package/translations/ko.json +11 -10
- package/translations/ms.json +11 -10
- package/translations/zh.json +4 -3
|
@@ -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
|
}
|
|
@@ -375,35 +376,37 @@ class ToteList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
375
376
|
}
|
|
376
377
|
|
|
377
378
|
async _saveTote() {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
mutation
|
|
385
|
-
updateMultipleTote(patches:
|
|
386
|
-
|
|
379
|
+
try {
|
|
380
|
+
let patches = this.dataGrist.exportPatchList({ flagName: 'cuFlag' })
|
|
381
|
+
this._validateTote(patches)
|
|
382
|
+
if (patches && patches.length) {
|
|
383
|
+
this.dataGrist.showSpinner()
|
|
384
|
+
const response = await client.mutate({
|
|
385
|
+
mutation: gql`
|
|
386
|
+
mutation updateMultipleTote($patches: [TotePatch!]!) {
|
|
387
|
+
updateMultipleTote(patches: $patches) {
|
|
388
|
+
name
|
|
389
|
+
}
|
|
387
390
|
}
|
|
391
|
+
`,
|
|
392
|
+
variables: {
|
|
393
|
+
patches
|
|
388
394
|
}
|
|
389
|
-
|
|
390
|
-
variables: {
|
|
391
|
-
patches
|
|
392
|
-
}
|
|
393
|
-
})
|
|
395
|
+
})
|
|
394
396
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
397
|
+
if (!response.errors) {
|
|
398
|
+
this.dataGrist.fetch()
|
|
399
|
+
document.dispatchEvent(
|
|
400
|
+
new CustomEvent('notify', {
|
|
401
|
+
detail: {
|
|
402
|
+
message: i18next.t('text.data_updated_successfully')
|
|
403
|
+
}
|
|
404
|
+
})
|
|
405
|
+
)
|
|
406
|
+
}
|
|
407
|
+
this.dataGrist.hideSpinner()
|
|
404
408
|
}
|
|
405
|
-
|
|
406
|
-
}
|
|
409
|
+
} catch (e) {}
|
|
407
410
|
}
|
|
408
411
|
|
|
409
412
|
_validateTote(patches) {
|
|
@@ -473,6 +476,11 @@ class ToteList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
473
476
|
})
|
|
474
477
|
)
|
|
475
478
|
}
|
|
479
|
+
} else {
|
|
480
|
+
CustomAlert({
|
|
481
|
+
title: i18next.t('text.nothing_selected'),
|
|
482
|
+
text: i18next.t('text.there_is_nothing_to_delete')
|
|
483
|
+
})
|
|
476
484
|
}
|
|
477
485
|
this.dataGrist.hideSpinner()
|
|
478
486
|
}
|
|
@@ -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,65 @@ 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') })
|
|
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
|
+
name
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
`,
|
|
282
|
+
variables: { patches }
|
|
283
|
+
})
|
|
284
|
+
|
|
285
|
+
if (!response.errors) {
|
|
286
|
+
this.dataGrist.fetch()
|
|
287
|
+
showToast({ message: i18next.t('text.data_updated_successfully') })
|
|
288
|
+
}
|
|
271
289
|
}
|
|
290
|
+
} catch (e) {
|
|
291
|
+
showToast(e)
|
|
272
292
|
}
|
|
273
293
|
}
|
|
274
294
|
|
|
@@ -301,7 +321,7 @@ class TransportDriver extends localize(i18next)(PageView) {
|
|
|
301
321
|
|
|
302
322
|
if (!response.errors) {
|
|
303
323
|
this.dataGrist.fetch()
|
|
304
|
-
|
|
324
|
+
showToast({ message: i18next.t('text.data_deleted_successfully') })
|
|
305
325
|
}
|
|
306
326
|
}
|
|
307
327
|
}
|
|
@@ -340,17 +360,6 @@ class TransportDriver extends localize(i18next)(PageView) {
|
|
|
340
360
|
|
|
341
361
|
return { header: headerSetting, data: data }
|
|
342
362
|
}
|
|
343
|
-
|
|
344
|
-
_showToast({ type, message }) {
|
|
345
|
-
document.dispatchEvent(
|
|
346
|
-
new CustomEvent('notify', {
|
|
347
|
-
detail: {
|
|
348
|
-
type,
|
|
349
|
-
message
|
|
350
|
-
}
|
|
351
|
-
})
|
|
352
|
-
)
|
|
353
|
-
}
|
|
354
363
|
}
|
|
355
364
|
|
|
356
365
|
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!) {
|