@things-factory/operato-wms 4.3.583 → 4.3.584
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.
|
@@ -4,20 +4,38 @@ import '@things-factory/warehouse-ui'
|
|
|
4
4
|
import '@things-factory/import-ui'
|
|
5
5
|
|
|
6
6
|
import gql from 'graphql-tag'
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
css,
|
|
9
|
+
html
|
|
10
|
+
} from 'lit-element'
|
|
8
11
|
import isEmpty from 'lodash-es/isEmpty'
|
|
9
12
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
10
13
|
|
|
11
14
|
import { getCodeByName } from '@things-factory/code-base'
|
|
12
15
|
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
13
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
i18next,
|
|
18
|
+
localize
|
|
19
|
+
} from '@things-factory/i18n-base'
|
|
14
20
|
import { openPopup } from '@things-factory/layout-base'
|
|
15
21
|
import { fetchSettingRule } from '@things-factory/setting-ui'
|
|
16
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
client,
|
|
24
|
+
CustomAlert,
|
|
25
|
+
navigate,
|
|
26
|
+
PageView,
|
|
27
|
+
store
|
|
28
|
+
} from '@things-factory/shell'
|
|
17
29
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
18
|
-
import {
|
|
30
|
+
import {
|
|
31
|
+
flattenObject,
|
|
32
|
+
isMobileDevice
|
|
33
|
+
} from '@things-factory/utils'
|
|
19
34
|
|
|
20
|
-
import {
|
|
35
|
+
import {
|
|
36
|
+
DRAFT_RELEASE_ORDER_STATUS,
|
|
37
|
+
PRODUCT_GROUP_TYPES
|
|
38
|
+
} from '../../../constants'
|
|
21
39
|
|
|
22
40
|
class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
23
41
|
static get properties() {
|
|
@@ -595,10 +613,7 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
595
613
|
options: {
|
|
596
614
|
queryName: 'allBizplaceProductInventory',
|
|
597
615
|
basicArgs: {
|
|
598
|
-
filters: [
|
|
599
|
-
{ name: 'bizplace_id', operator: 'eq', value: this._bizplaceId },
|
|
600
|
-
{ name: 'deleted_at', operator: 'eq', value: true }
|
|
601
|
-
]
|
|
616
|
+
filters: [{ name: 'bizplace_id', operator: 'eq', value: this._bizplaceId }]
|
|
602
617
|
},
|
|
603
618
|
nameField: 'productSKU',
|
|
604
619
|
descriptionField: 'productName',
|
|
@@ -444,13 +444,10 @@ class DraftReleaseGoodList extends localize(i18next)(PageView) {
|
|
|
444
444
|
let orderIds = []
|
|
445
445
|
let selectedGristData = this.dataGrist.selected
|
|
446
446
|
|
|
447
|
-
if (
|
|
448
|
-
selectedGristData.filter(itm => itm.status == DRAFT_RELEASE_ORDER_STATUS.DRAFT).length <= 0 &&
|
|
449
|
-
selectedGristData.filter(itm => itm.status == DRAFT_RELEASE_ORDER_STATUS.INSUFFICIENT).length <= 0
|
|
450
|
-
)
|
|
447
|
+
if (selectedGristData.filter(itm => itm.status == DRAFT_RELEASE_ORDER_STATUS.DRAFT).length <= 0)
|
|
451
448
|
throw new Error(i18next.t('text.please_select_a_valid_draft_order_to_generate_release_order'))
|
|
452
449
|
|
|
453
|
-
let selectedOrders = selectedGristData
|
|
450
|
+
let selectedOrders = selectedGristData.filter(itm => itm.status === DRAFT_RELEASE_ORDER_STATUS.DRAFT)
|
|
454
451
|
orderIds = selectedOrders.map(record => ({ id: record.id, releaseType: 'release' }))
|
|
455
452
|
|
|
456
453
|
let result = await CustomAlert({
|
|
@@ -474,9 +471,6 @@ class DraftReleaseGoodList extends localize(i18next)(PageView) {
|
|
|
474
471
|
mutation generateReleaseGoodsfromDraft($releaseInfo: [DraftReleaseGoodInfos!]!) {
|
|
475
472
|
generateReleaseGoodsfromDraft(releaseInfo: $releaseInfo) {
|
|
476
473
|
draftName
|
|
477
|
-
successCount
|
|
478
|
-
insufficientCount
|
|
479
|
-
deletedCount
|
|
480
474
|
}
|
|
481
475
|
}
|
|
482
476
|
`,
|
|
@@ -486,40 +480,17 @@ class DraftReleaseGoodList extends localize(i18next)(PageView) {
|
|
|
486
480
|
})
|
|
487
481
|
|
|
488
482
|
if (!response.errors) {
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
let deletedCount = response.data.generateReleaseGoodsfromDraft[0].deletedCount
|
|
492
|
-
|
|
493
|
-
if (insufficientCount > 0 && deletedCount == 0) {
|
|
494
|
-
CustomAlert({
|
|
495
|
-
title: i18next.t('title.completed'),
|
|
496
|
-
text: 'Notice: ' + insufficientCount + ' ' + i18next.t('text.draft_order_insufficient'),
|
|
497
|
-
confirmButton: { text: i18next.t('button.confirm') }
|
|
498
|
-
})
|
|
499
|
-
} else if (deletedCount > 0 && insufficientCount == 0) {
|
|
500
|
-
CustomAlert({
|
|
483
|
+
if (response.data.generateReleaseGoodsfromDraft.length < 1) {
|
|
484
|
+
await CustomAlert({
|
|
501
485
|
title: i18next.t('title.completed'),
|
|
502
|
-
text:
|
|
503
|
-
confirmButton: { text: i18next.t('button.confirm') }
|
|
504
|
-
})
|
|
505
|
-
} else if (deletedCount > 0 && insufficientCount > 0) {
|
|
506
|
-
CustomAlert({
|
|
507
|
-
title: i18next.t('title.completed'),
|
|
508
|
-
text:
|
|
509
|
-
'Notice: ' +
|
|
510
|
-
insufficientCount +
|
|
511
|
-
' ' +
|
|
512
|
-
i18next.t('text.draft_order_insufficient') +
|
|
513
|
-
', ' +
|
|
514
|
-
deletedCount +
|
|
515
|
-
' ' +
|
|
516
|
-
i18next.t('text.draft_order_deleted_detail'),
|
|
486
|
+
text: i18next.t('text.release_order(s)_has_been_generated'),
|
|
517
487
|
confirmButton: { text: i18next.t('button.confirm') }
|
|
518
488
|
})
|
|
519
489
|
} else {
|
|
490
|
+
// this.dataGrist.fetch()
|
|
520
491
|
CustomAlert({
|
|
521
|
-
title: i18next.t('title.
|
|
522
|
-
text:
|
|
492
|
+
title: i18next.t('title.error'),
|
|
493
|
+
text: i18next.t('text.unable_to_release_specific_draft_order(s)_due_to_insufficient_quantity'),
|
|
523
494
|
confirmButton: { text: i18next.t('button.confirm') }
|
|
524
495
|
})
|
|
525
496
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-wms",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.584",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@things-factory/print-ui": "^4.3.535",
|
|
92
92
|
"@things-factory/product-base": "^4.3.582",
|
|
93
93
|
"@things-factory/resource-ui": "^4.3.582",
|
|
94
|
-
"@things-factory/sales-ui": "^4.3.
|
|
94
|
+
"@things-factory/sales-ui": "^4.3.584",
|
|
95
95
|
"@things-factory/scene-data-transform": "^4.3.534",
|
|
96
96
|
"@things-factory/scene-excel": "^4.3.534",
|
|
97
97
|
"@things-factory/scene-firebase": "^4.3.534",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@things-factory/transport-base": "^4.3.582",
|
|
109
109
|
"@things-factory/tutorial-ui": "^4.3.582",
|
|
110
110
|
"@things-factory/warehouse-base": "^4.3.582",
|
|
111
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
111
|
+
"@things-factory/worksheet-base": "^4.3.584"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@things-factory/builder": "^4.3.534",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"cypress-localstorage-commands": "^1.6.1",
|
|
118
118
|
"eslint-plugin-cypress": "^2.12.1"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "6c7a965eb017c8268a11dc026cc94a4dfd41d3da"
|
|
121
121
|
}
|
package/translations/en.json
CHANGED
|
@@ -1426,9 +1426,6 @@
|
|
|
1426
1426
|
"text.document_has_been_generated": "document has been generated",
|
|
1427
1427
|
"text.does_not_support_multi_package": "Does not support multi-package",
|
|
1428
1428
|
"text.draft_order_form_invalid": "draft order form invalid",
|
|
1429
|
-
"text.draft_order_success": "Draft order successfully converted to RO",
|
|
1430
|
-
"text.draft_order_insufficient": "Draft order failed: Insufficient quantity",
|
|
1431
|
-
"text.draft_order_deleted_detail": "Draft order failed: Missing Product Details",
|
|
1432
1429
|
"text.draft_purchase_order": "draft purchase order",
|
|
1433
1430
|
"text.driver_and_vehicle_is_not_selected": "driver and vehicle is not selected",
|
|
1434
1431
|
"text.driver_is_empty": "driver name is empty",
|