@things-factory/operato-wms 4.3.56 → 4.3.60
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/inbound/select-product-batch.js +7 -1
- package/client/pages/inbound/unload-product.js +65 -16
- package/client/pages/outbound/packing-product.js +16 -19
- package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js +3 -3
- package/package.json +8 -8
- package/server/graphql/resolvers/dashboard/outbound-order-by-status.ts +3 -3
|
@@ -69,10 +69,16 @@ class SelectProductBatch extends LitElement {
|
|
|
69
69
|
this.config = {
|
|
70
70
|
pagination: { infinite: true },
|
|
71
71
|
rows: { selectable: { multiple: false }, appendable: false },
|
|
72
|
-
list: { fields: ['batchId', 'product', 'packingType', 'packingSize'] },
|
|
72
|
+
list: { fields: ['sku', 'batchId', 'product', 'packingType', 'packingSize'] },
|
|
73
73
|
columns: [
|
|
74
74
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
75
75
|
{ type: 'gutter', gutterName: 'row-selector', multiple: false },
|
|
76
|
+
{
|
|
77
|
+
type: 'string',
|
|
78
|
+
name: 'sku',
|
|
79
|
+
header: i18next.t('field.sku'),
|
|
80
|
+
width: 120
|
|
81
|
+
},
|
|
76
82
|
{
|
|
77
83
|
type: 'string',
|
|
78
84
|
name: 'batchId',
|
|
@@ -1067,6 +1067,37 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1067
1067
|
})
|
|
1068
1068
|
}
|
|
1069
1069
|
|
|
1070
|
+
async fetchProductDetails(gtin) {
|
|
1071
|
+
return await client.query({
|
|
1072
|
+
query: gql`
|
|
1073
|
+
query checkGtin($gtin: String!, $customerCompanyDomainId: String!) {
|
|
1074
|
+
checkGtin(gtin: $gtin, customerCompanyDomainId: $customerCompanyDomainId) {
|
|
1075
|
+
items {
|
|
1076
|
+
id
|
|
1077
|
+
name
|
|
1078
|
+
packingType
|
|
1079
|
+
packingSize
|
|
1080
|
+
gtin
|
|
1081
|
+
product {
|
|
1082
|
+
id
|
|
1083
|
+
name
|
|
1084
|
+
sku
|
|
1085
|
+
isRequiredCheckExpiry
|
|
1086
|
+
isRequireSerialNumberScanningInbound
|
|
1087
|
+
expirationPeriod
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
total
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
`,
|
|
1094
|
+
variables: {
|
|
1095
|
+
gtin,
|
|
1096
|
+
customerCompanyDomainId: this.customerCompanyDomainId
|
|
1097
|
+
}
|
|
1098
|
+
})
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1070
1101
|
//need to enhance
|
|
1071
1102
|
async _checkedLotScannedProduct() {
|
|
1072
1103
|
const response = await this.fetchProductDetail('', this._selectedOrderProduct.product.id)
|
|
@@ -1077,23 +1108,28 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1077
1108
|
|
|
1078
1109
|
async _checkedScannedProduct() {
|
|
1079
1110
|
try {
|
|
1080
|
-
|
|
1111
|
+
//fetch any product details that has entered gtin
|
|
1112
|
+
const response = await this.fetchProductDetails(this.productBarcodeInput?.value || '', '')
|
|
1081
1113
|
|
|
1082
1114
|
if (!response.errors) {
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
)
|
|
1115
|
+
let orderProductData = this.orderProductData.records
|
|
1116
|
+
let checkedProductDetails = response.data.checkGtin.items
|
|
1117
|
+
|
|
1118
|
+
//check from grist if any is matched
|
|
1119
|
+
const foundOrderProducts = orderProductData.filter(op => {
|
|
1120
|
+
return checkedProductDetails.some(
|
|
1121
|
+
itm =>
|
|
1122
|
+
itm.product.id == op.product.id && itm.packingType == op.packingType && itm.packingSize == op.packingSize
|
|
1123
|
+
)
|
|
1124
|
+
})
|
|
1125
|
+
|
|
1126
|
+
const foundParentProducts = orderProductData.filter(op => {
|
|
1127
|
+
return checkedProductDetails.some(itm => itm.product.id == op.product.id)
|
|
1128
|
+
})
|
|
1093
1129
|
|
|
1094
1130
|
if (!foundOrderProducts?.length) {
|
|
1095
1131
|
if (!foundParentProducts?.length) {
|
|
1096
|
-
if (this._enableInputQty && !this._isRequireSerialNumberScanningInbound) {
|
|
1132
|
+
if (this._enableInputQty >= 0 && this._enableInputQty < 4 && !this._isRequireSerialNumberScanningInbound) {
|
|
1097
1133
|
if (this.actualQtyInput?.value) this.actualQtyInput.value = ''
|
|
1098
1134
|
}
|
|
1099
1135
|
|
|
@@ -1106,9 +1142,13 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1106
1142
|
throw new Error(i18next.t('text.no_matching_product_found'))
|
|
1107
1143
|
}
|
|
1108
1144
|
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1145
|
+
|
|
1146
|
+
const product =
|
|
1147
|
+
foundOrderProducts?.length >= 1
|
|
1148
|
+
? foundOrderProducts[0].product
|
|
1149
|
+
: foundOrderProducts?.length == 0 && foundParentProducts?.length > 0
|
|
1150
|
+
? foundParentProducts[0].product
|
|
1151
|
+
: null
|
|
1112
1152
|
|
|
1113
1153
|
if (this._selectedOrderProduct && this._selectedOrderProduct.product.sku !== product.sku)
|
|
1114
1154
|
this._selectedOrderProduct = null
|
|
@@ -1122,8 +1162,14 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1122
1162
|
return foundOrderProducts
|
|
1123
1163
|
}
|
|
1124
1164
|
} else if (foundOrderProducts?.length == 1) {
|
|
1165
|
+
this._expirationPeriod = product.expirationPeriod
|
|
1166
|
+
this._isRequiredCheckExpiry = product.isRequiredCheckExpiry
|
|
1167
|
+
this._isRequireSerialNumberScanningInbound = product.isRequireSerialNumberScanningInbound
|
|
1125
1168
|
this._selectedOrderProduct = foundOrderProducts[0]
|
|
1126
1169
|
} else if (foundOrderProducts?.length == 0 && foundParentProducts?.length > 0) {
|
|
1170
|
+
this._expirationPeriod = product.expirationPeriod
|
|
1171
|
+
this._isRequiredCheckExpiry = product.isRequiredCheckExpiry
|
|
1172
|
+
this._isRequireSerialNumberScanningInbound = product.isRequireSerialNumberScanningInbound
|
|
1127
1173
|
this._selectedOrderProduct = foundParentProducts[0]
|
|
1128
1174
|
}
|
|
1129
1175
|
}
|
|
@@ -1139,7 +1185,10 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1139
1185
|
.orderProducts="${orderProducts}"
|
|
1140
1186
|
@selected-batch="${async e => {
|
|
1141
1187
|
this._selectedOrderProduct = e.detail
|
|
1142
|
-
|
|
1188
|
+
this._expirationPeriod = this._selectedOrderProduct.product.expirationPeriod
|
|
1189
|
+
this._isRequiredCheckExpiry = this._selectedOrderProduct.product.isRequiredCheckExpiry
|
|
1190
|
+
this._isRequireSerialNumberScanningInbound =
|
|
1191
|
+
this._selectedOrderProduct.product.isRequireSerialNumberScanningInbound
|
|
1143
1192
|
if (e.detail.product.isRequireSerialNumberScanningInbound) {
|
|
1144
1193
|
this._isRequireSerialNumberScanningInbound = true
|
|
1145
1194
|
if (!this.serialNumberInput.value) {
|
|
@@ -607,27 +607,23 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
607
607
|
if (orderDocInfo?.length === 0) {
|
|
608
608
|
this._showToast({ message: i18next.t('text.no_document_available') })
|
|
609
609
|
} else {
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
this._callPrintDialog(convertedPdfUrl)
|
|
619
|
-
break
|
|
620
|
-
|
|
621
|
-
case 'lazada':
|
|
622
|
-
var decodedHTML = atob(orderDocInfo[0].file)
|
|
623
|
-
this._callPrintDialog(decodedHTML)
|
|
624
|
-
break
|
|
610
|
+
if (this.platform == 'shopee' && !orderDocInfo[0]?.isShopeeV2) {
|
|
611
|
+
const orderDocUrls = orderDocInfo.map(item => item.airwayBill)
|
|
612
|
+
for (var i = 0; i < orderDocUrls.length; i++) {
|
|
613
|
+
orderDocUrls[i] = 'urls=' + orderDocUrls[i]
|
|
614
|
+
}
|
|
615
|
+
var mergedURL = orderDocUrls.toString().replace(/,/g, '&')
|
|
616
|
+
var convertedPdfUrl = `/pdf/merge?${mergedURL}`
|
|
617
|
+
this._callPrintDialog(convertedPdfUrl)
|
|
625
618
|
|
|
626
|
-
|
|
627
|
-
|
|
619
|
+
} else if (this.platform == 'lazada') {
|
|
620
|
+
var decodedHTML = atob(orderDocInfo[0].file)
|
|
621
|
+
this._callPrintDialog(decodedHTML)
|
|
622
|
+
} else {
|
|
623
|
+
let url = new URL(window.location)
|
|
628
624
|
|
|
629
|
-
|
|
630
|
-
|
|
625
|
+
convertedPdfUrl = `${url.origin}/proxy?url=${encodeURIComponent(orderDocInfo[0].airwayBill)}`
|
|
626
|
+
this._callPrintDialog(convertedPdfUrl)
|
|
631
627
|
}
|
|
632
628
|
}
|
|
633
629
|
}
|
|
@@ -643,6 +639,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
643
639
|
mimeType
|
|
644
640
|
file
|
|
645
641
|
documentType
|
|
642
|
+
isShopeeV2
|
|
646
643
|
}
|
|
647
644
|
}
|
|
648
645
|
`,
|
|
@@ -85,20 +85,20 @@ exports.outboundOrderByStatusResolver = {
|
|
|
85
85
|
WHERE w."domain_id" = $1
|
|
86
86
|
AND w."bizplace_id" IN (${bizplaceIds})
|
|
87
87
|
AND w."type" = 'PICKING'
|
|
88
|
-
AND w."status" IN ('DEACTIVATED','EXECUTING'
|
|
88
|
+
AND w."status" IN ('DEACTIVATED','EXECUTING')
|
|
89
89
|
GROUP BY w."status"
|
|
90
90
|
UNION ALL
|
|
91
91
|
SELECT 'BATCH PICKING ASSIGNED' AS "status", count(*) FROM worksheets w
|
|
92
92
|
WHERE w."domain_id" = $1
|
|
93
93
|
AND w."bizplace_id" IN (${bizplaceIds})
|
|
94
94
|
AND w."type" = 'BATCH_PICKING'
|
|
95
|
-
AND w."status" IN ('DEACTIVATED','EXECUTING'
|
|
95
|
+
AND w."status" IN ('DEACTIVATED','EXECUTING')
|
|
96
96
|
GROUP BY w."status"
|
|
97
97
|
UNION ALL
|
|
98
98
|
SELECT 'PACKING' AS "status", count(*) FROM worksheets w
|
|
99
99
|
WHERE w."domain_id" = $1 AND w."type" = 'PACKING'
|
|
100
100
|
AND w."bizplace_id" IN (${bizplaceIds})
|
|
101
|
-
AND w."status" IN ('DEACTIVATED','EXECUTING'
|
|
101
|
+
AND w."status" IN ('DEACTIVATED','EXECUTING')
|
|
102
102
|
GROUP BY w."status"
|
|
103
103
|
UNION ALL
|
|
104
104
|
SELECT 'PENDING MANIFEST CREATION' AS "status", count(*) FROM release_goods rg
|
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.60",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -64,12 +64,12 @@
|
|
|
64
64
|
"@operato/scene-table": "^0.1.6",
|
|
65
65
|
"@operato/scene-wheel-sorter": "^0.1.6",
|
|
66
66
|
"@things-factory/apptool-ui": "^4.3.47",
|
|
67
|
-
"@things-factory/attachment-ui": "^4.3.
|
|
67
|
+
"@things-factory/attachment-ui": "^4.3.59",
|
|
68
68
|
"@things-factory/auth-ui": "^4.3.47",
|
|
69
69
|
"@things-factory/barcode-ui": "^4.3.47",
|
|
70
70
|
"@things-factory/biz-ui": "^4.3.47",
|
|
71
71
|
"@things-factory/board-service": "^4.3.47",
|
|
72
|
-
"@things-factory/board-ui": "^4.3.
|
|
72
|
+
"@things-factory/board-ui": "^4.3.59",
|
|
73
73
|
"@things-factory/code-ui": "^4.3.47",
|
|
74
74
|
"@things-factory/context-ui": "^4.3.52",
|
|
75
75
|
"@things-factory/export-ui": "^4.3.52",
|
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
"@things-factory/pdf": "^4.3.47",
|
|
91
91
|
"@things-factory/print-proxy-service": "^4.3.47",
|
|
92
92
|
"@things-factory/print-ui": "^4.3.52",
|
|
93
|
-
"@things-factory/product-base": "^4.3.
|
|
93
|
+
"@things-factory/product-base": "^4.3.60",
|
|
94
94
|
"@things-factory/resource-ui": "^4.3.52",
|
|
95
|
-
"@things-factory/sales-ui": "^4.3.
|
|
95
|
+
"@things-factory/sales-ui": "^4.3.60",
|
|
96
96
|
"@things-factory/scene-data-transform": "^4.3.47",
|
|
97
97
|
"@things-factory/scene-excel": "^4.3.47",
|
|
98
98
|
"@things-factory/scene-firebase": "^4.3.47",
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
"@things-factory/system-ui": "^4.3.47",
|
|
109
109
|
"@things-factory/transport-base": "^4.3.47",
|
|
110
110
|
"@things-factory/tutorial-ui": "^4.3.47",
|
|
111
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
112
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
111
|
+
"@things-factory/warehouse-base": "^4.3.60",
|
|
112
|
+
"@things-factory/worksheet-base": "^4.3.60"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
115
|
"@things-factory/builder": "^4.3.47",
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
"cypress-localstorage-commands": "^1.6.1",
|
|
119
119
|
"eslint-plugin-cypress": "^2.12.1"
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "f6d91662623840970866e2db5e92b9613cad0a41"
|
|
122
122
|
}
|
|
@@ -88,20 +88,20 @@ export const outboundOrderByStatusResolver = {
|
|
|
88
88
|
WHERE w."domain_id" = $1
|
|
89
89
|
AND w."bizplace_id" IN (${bizplaceIds})
|
|
90
90
|
AND w."type" = 'PICKING'
|
|
91
|
-
AND w."status" IN ('DEACTIVATED','EXECUTING'
|
|
91
|
+
AND w."status" IN ('DEACTIVATED','EXECUTING')
|
|
92
92
|
GROUP BY w."status"
|
|
93
93
|
UNION ALL
|
|
94
94
|
SELECT 'BATCH PICKING ASSIGNED' AS "status", count(*) FROM worksheets w
|
|
95
95
|
WHERE w."domain_id" = $1
|
|
96
96
|
AND w."bizplace_id" IN (${bizplaceIds})
|
|
97
97
|
AND w."type" = 'BATCH_PICKING'
|
|
98
|
-
AND w."status" IN ('DEACTIVATED','EXECUTING'
|
|
98
|
+
AND w."status" IN ('DEACTIVATED','EXECUTING')
|
|
99
99
|
GROUP BY w."status"
|
|
100
100
|
UNION ALL
|
|
101
101
|
SELECT 'PACKING' AS "status", count(*) FROM worksheets w
|
|
102
102
|
WHERE w."domain_id" = $1 AND w."type" = 'PACKING'
|
|
103
103
|
AND w."bizplace_id" IN (${bizplaceIds})
|
|
104
|
-
AND w."status" IN ('DEACTIVATED','EXECUTING'
|
|
104
|
+
AND w."status" IN ('DEACTIVATED','EXECUTING')
|
|
105
105
|
GROUP BY w."status"
|
|
106
106
|
UNION ALL
|
|
107
107
|
SELECT 'PENDING MANIFEST CREATION' AS "status", count(*) FROM release_goods rg
|