@things-factory/operato-wms 4.3.138 → 4.3.139
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/master/location-list.js +15 -7
- package/client/pages/order/arrival-notice/create-arrival-notice.js +15 -16
- package/dist-server/graphql/resolvers/reports/inbound-serial-number-report.js +1 -1
- package/package.json +5 -5
- package/server/graphql/resolvers/reports/inbound-serial-number-report.ts +1 -1
|
@@ -16,7 +16,6 @@ import { client, CustomAlert, PageView, store } from '@things-factory/shell'
|
|
|
16
16
|
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
17
17
|
import { isMobileDevice } from '@things-factory/utils'
|
|
18
18
|
|
|
19
|
-
import { getCodeByName } from '@things-factory/code-base'
|
|
20
19
|
import { LOCATION_LABEL_SETTING_KEY, LOCATION_STATUS, LOCATION_TYPE } from '../constants'
|
|
21
20
|
import { showToast } from '../../util'
|
|
22
21
|
|
|
@@ -417,25 +416,34 @@ class LocationList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
417
416
|
async importHandler(patches) {
|
|
418
417
|
try {
|
|
419
418
|
let records = this.dataGrist.data.records
|
|
420
|
-
const locationType =
|
|
421
|
-
const locationStatus =
|
|
419
|
+
const locationType = Object.keys(LOCATION_TYPE)
|
|
420
|
+
const locationStatus = Object.keys(LOCATION_STATUS)
|
|
421
|
+
|
|
422
422
|
patches = patches.map(itm => {
|
|
423
423
|
// Error if there is an empty value
|
|
424
|
-
if (
|
|
425
|
-
|
|
424
|
+
if (
|
|
425
|
+
isEmpty(itm.name) ||
|
|
426
|
+
isEmpty(itm.type) ||
|
|
427
|
+
isEmpty(itm.zone) ||
|
|
428
|
+
isEmpty(itm.column) ||
|
|
429
|
+
isEmpty(itm.shelf) ||
|
|
430
|
+
isEmpty(itm.status) ||
|
|
431
|
+
''
|
|
432
|
+
) {
|
|
426
433
|
throw new Error(i18next.t('text.empty_value_in_list'))
|
|
427
434
|
}
|
|
428
435
|
// Error if location name is already existed
|
|
429
436
|
if (records.find(exist => exist.name == itm.name)) {
|
|
430
437
|
throw new Error(i18next.t('text.location_name(s)_already_existed'))
|
|
431
438
|
}
|
|
439
|
+
|
|
432
440
|
// Error if location status does not exist
|
|
433
|
-
let foundLocationType = locationType.find(exist => exist
|
|
441
|
+
let foundLocationType = locationType.find(exist => exist == itm.type)
|
|
434
442
|
if (!foundLocationType) {
|
|
435
443
|
throw new Error(i18next.t('text.location_type_does_not_exist'))
|
|
436
444
|
}
|
|
437
445
|
// Error if location type does not exist
|
|
438
|
-
let foundLocationStatus = locationStatus.find(exist => exist
|
|
446
|
+
let foundLocationStatus = locationStatus.find(exist => exist == itm.status)
|
|
439
447
|
if (!foundLocationStatus) {
|
|
440
448
|
throw new Error(i18next.t('text.location_status_does_not_exist'))
|
|
441
449
|
}
|
|
@@ -1187,8 +1187,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1187
1187
|
|
|
1188
1188
|
this._checkProductDuplication()
|
|
1189
1189
|
|
|
1190
|
-
const checkRequiredFields = ({ batchId,
|
|
1191
|
-
!batchId || !packingType || !uomValue || !uom || !packQty
|
|
1190
|
+
const checkRequiredFields = ({ batchId, packQty }) => !batchId || !packQty
|
|
1192
1191
|
|
|
1193
1192
|
// required field (batchId, packingType, uomValue, uom, packQty, palletQty)
|
|
1194
1193
|
if (records.some(checkRequiredFields)) {
|
|
@@ -1673,11 +1672,11 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1673
1672
|
`,
|
|
1674
1673
|
variables: { orderProducts: patches, partnerBizplaceId: this._bizplaceId }
|
|
1675
1674
|
})
|
|
1676
|
-
let foundErrors = response.data.bulkUploadValidateOrderProducts
|
|
1677
|
-
if (foundErrors){
|
|
1675
|
+
let foundErrors = response.data.bulkUploadValidateOrderProducts.find(item => item.isError != 0)
|
|
1676
|
+
if (foundErrors) {
|
|
1678
1677
|
return this._showToast({ message: i18next.t('text.invalid_product_sku') })
|
|
1679
1678
|
}
|
|
1680
|
-
if (!foundErrors){
|
|
1679
|
+
if (!foundErrors) {
|
|
1681
1680
|
if (!response.errors) {
|
|
1682
1681
|
const data = response.data.bulkUploadValidateOrderProducts.map(item => {
|
|
1683
1682
|
return {
|
|
@@ -1688,17 +1687,17 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1688
1687
|
palletQty: parseFloat(item.palletQty) || ''
|
|
1689
1688
|
}
|
|
1690
1689
|
})
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1690
|
+
this.productData = {
|
|
1691
|
+
...this.productData,
|
|
1692
|
+
records: data.map((dt, idx) => {
|
|
1693
|
+
return {
|
|
1694
|
+
...dt,
|
|
1695
|
+
id: idx,
|
|
1696
|
+
name: idx,
|
|
1697
|
+
__dirty__: '+'
|
|
1698
|
+
}
|
|
1699
|
+
})
|
|
1700
|
+
}
|
|
1702
1701
|
this.productGrist.fetch()
|
|
1703
1702
|
} else {
|
|
1704
1703
|
throw response.errors
|
|
@@ -69,7 +69,7 @@ exports.inboundSerialNumberReport = {
|
|
|
69
69
|
select * from (
|
|
70
70
|
select
|
|
71
71
|
row_number() over(partition by an."name" order by coalesce(w.started_at, ii.created_at), p.sku ) as "no",
|
|
72
|
-
case when "source" = 'ADJUSTMENT' then 'adjustment' else an."name" end as "order_no",
|
|
72
|
+
case when "ii"."source" = 'ADJUSTMENT' then 'adjustment' else an."name" end as "order_no",
|
|
73
73
|
i.pallet_id, i.carton_id,an.ref_no, an.ref_no_2, an.ref_no_3,
|
|
74
74
|
p.id as "product_id", p.sku as "product_sku", p.brand_sku as "product_brand_sku",
|
|
75
75
|
p.name as "product_name", p.description as "product_description", p."type" as "product_type",
|
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.139",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@things-factory/attachment-ui": "^4.3.138",
|
|
67
67
|
"@things-factory/auth-ui": "^4.3.138",
|
|
68
68
|
"@things-factory/barcode-ui": "^4.3.131",
|
|
69
|
-
"@things-factory/biz-ui": "^4.3.
|
|
69
|
+
"@things-factory/biz-ui": "^4.3.139",
|
|
70
70
|
"@things-factory/board-service": "^4.3.138",
|
|
71
71
|
"@things-factory/board-ui": "^4.3.138",
|
|
72
72
|
"@things-factory/code-ui": "^4.3.138",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@things-factory/print-ui": "^4.3.131",
|
|
92
92
|
"@things-factory/product-base": "^4.3.138",
|
|
93
93
|
"@things-factory/resource-ui": "^4.3.138",
|
|
94
|
-
"@things-factory/sales-ui": "^4.3.
|
|
94
|
+
"@things-factory/sales-ui": "^4.3.139",
|
|
95
95
|
"@things-factory/scene-data-transform": "^4.3.131",
|
|
96
96
|
"@things-factory/scene-excel": "^4.3.131",
|
|
97
97
|
"@things-factory/scene-firebase": "^4.3.131",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@things-factory/transport-base": "^4.3.138",
|
|
109
109
|
"@things-factory/tutorial-ui": "^4.3.138",
|
|
110
110
|
"@things-factory/warehouse-base": "^4.3.138",
|
|
111
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
111
|
+
"@things-factory/worksheet-base": "^4.3.139"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@things-factory/builder": "^4.3.131",
|
|
@@ -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": "82a27c0caaf2f2c98cd094b92fc603bf768d2513"
|
|
121
121
|
}
|
|
@@ -79,7 +79,7 @@ export const inboundSerialNumberReport = {
|
|
|
79
79
|
select * from (
|
|
80
80
|
select
|
|
81
81
|
row_number() over(partition by an."name" order by coalesce(w.started_at, ii.created_at), p.sku ) as "no",
|
|
82
|
-
case when "source" = 'ADJUSTMENT' then 'adjustment' else an."name" end as "order_no",
|
|
82
|
+
case when "ii"."source" = 'ADJUSTMENT' then 'adjustment' else an."name" end as "order_no",
|
|
83
83
|
i.pallet_id, i.carton_id,an.ref_no, an.ref_no_2, an.ref_no_3,
|
|
84
84
|
p.id as "product_id", p.sku as "product_sku", p.brand_sku as "product_brand_sku",
|
|
85
85
|
p.name as "product_name", p.description as "product_description", p."type" as "product_type",
|