@things-factory/operato-wms 4.3.783 → 4.3.787
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/components/list-view/product-list-view.js +19 -3
- package/client/pages/outbound/loading-v2/loading-execution-base.js +6 -0
- package/client/pages/outbound/loading-v2/loading-execution.js +117 -9
- package/client/pages/outbound/loading-v2/loading.js +9 -0
- package/config.development.js +71 -141
- package/dist-server/graphql/resolvers/outbound/complete-load.js +11 -0
- package/dist-server/graphql/resolvers/outbound/complete-load.js.map +1 -1
- package/dist-server/graphql/resolvers/outbound/find-loadable-release-good-by-bin.js +3 -1
- package/dist-server/graphql/resolvers/outbound/find-loadable-release-good-by-bin.js.map +1 -1
- package/dist-server/graphql/resolvers/outbound/loading-worksheet-v2.js +5 -3
- package/dist-server/graphql/resolvers/outbound/loading-worksheet-v2.js.map +1 -1
- package/package.json +5 -5
- package/server/graphql/resolvers/outbound/complete-load.ts +14 -1
- package/server/graphql/resolvers/outbound/find-loadable-release-good-by-bin.ts +3 -1
- package/server/graphql/resolvers/outbound/loading-worksheet-v2.ts +4 -1
- package/translations/en.json +4 -0
- package/translations/ko.json +4 -0
- package/translations/ms.json +4 -0
- package/translations/zh.json +4 -0
|
@@ -167,7 +167,8 @@ class ProductListView extends localize(i18next)(LitElement) {
|
|
|
167
167
|
_show: Boolean,
|
|
168
168
|
selectedItems: { type: Array },
|
|
169
169
|
selectAll: { type: Boolean },
|
|
170
|
-
selectedRecordId: { type: String, attribute: false }
|
|
170
|
+
selectedRecordId: { type: String, attribute: false },
|
|
171
|
+
highlightedIds: { type: Array, attribute: false }
|
|
171
172
|
}
|
|
172
173
|
}
|
|
173
174
|
|
|
@@ -175,6 +176,7 @@ class ProductListView extends localize(i18next)(LitElement) {
|
|
|
175
176
|
super()
|
|
176
177
|
this.selectedItems = []
|
|
177
178
|
this.selectAll = false
|
|
179
|
+
this.highlightedIds = []
|
|
178
180
|
}
|
|
179
181
|
|
|
180
182
|
render() {
|
|
@@ -191,8 +193,10 @@ class ProductListView extends localize(i18next)(LitElement) {
|
|
|
191
193
|
try {
|
|
192
194
|
itm = flattenObject(itm, '.')
|
|
193
195
|
|
|
194
|
-
const isSelected =
|
|
195
|
-
|
|
196
|
+
const isSelected =
|
|
197
|
+
(this.selectedRecordId && itm.id === this.selectedRecordId) ||
|
|
198
|
+
(this.highlightedIds?.length > 0 && this.highlightedIds.includes(itm.id))
|
|
199
|
+
|
|
196
200
|
return html`
|
|
197
201
|
<div
|
|
198
202
|
class="product-item"
|
|
@@ -204,6 +208,9 @@ class ProductListView extends localize(i18next)(LitElement) {
|
|
|
204
208
|
if (e.target.closest('button') || e.target.closest('input') || e.target.closest('.action-box')) {
|
|
205
209
|
return
|
|
206
210
|
}
|
|
211
|
+
if (this.highlightedIds?.length > 0) {
|
|
212
|
+
this.highlightedIds = []
|
|
213
|
+
}
|
|
207
214
|
if (typeof this.config?.onRecordClick === 'function') {
|
|
208
215
|
this.config.onRecordClick(itm, e, index)
|
|
209
216
|
}
|
|
@@ -349,6 +356,15 @@ class ProductListView extends localize(i18next)(LitElement) {
|
|
|
349
356
|
return item
|
|
350
357
|
})
|
|
351
358
|
}
|
|
359
|
+
|
|
360
|
+
scrollToId(id) {
|
|
361
|
+
const dataIndex = (this.data || []).findIndex(item => item.id === id)
|
|
362
|
+
if (dataIndex === -1) return
|
|
363
|
+
this.updateComplete.then(() => {
|
|
364
|
+
const allItems = this.shadowRoot?.querySelectorAll('.product-item')
|
|
365
|
+
allItems?.[dataIndex]?.scrollIntoView({ behavior: 'smooth', block: 'nearest' })
|
|
366
|
+
})
|
|
367
|
+
}
|
|
352
368
|
}
|
|
353
369
|
|
|
354
370
|
window.customElements.define('product-list-view', ProductListView)
|
|
@@ -131,6 +131,9 @@ const FIND_LOADABLE_RELEASE_GOOD_BY_BIN = gql`
|
|
|
131
131
|
}
|
|
132
132
|
productDetail {
|
|
133
133
|
id
|
|
134
|
+
productBarcodes {
|
|
135
|
+
gtin
|
|
136
|
+
}
|
|
134
137
|
}
|
|
135
138
|
orderProduct {
|
|
136
139
|
id
|
|
@@ -198,6 +201,9 @@ const LOADING_WORKSHEET_V2 = gql`
|
|
|
198
201
|
}
|
|
199
202
|
productDetail {
|
|
200
203
|
id
|
|
204
|
+
productBarcodes {
|
|
205
|
+
gtin
|
|
206
|
+
}
|
|
201
207
|
}
|
|
202
208
|
orderProduct {
|
|
203
209
|
id
|
|
@@ -373,9 +373,15 @@ export class LoadingExecution extends LoadingExecutionBase {
|
|
|
373
373
|
display: none;
|
|
374
374
|
}
|
|
375
375
|
.tab-content.active {
|
|
376
|
-
display:
|
|
376
|
+
display: flex;
|
|
377
|
+
flex-direction: column;
|
|
378
|
+
flex: 1;
|
|
379
|
+
overflow: hidden;
|
|
380
|
+
}
|
|
381
|
+
.tab-content.active product-list-view {
|
|
377
382
|
flex: 1;
|
|
378
383
|
overflow-y: auto;
|
|
384
|
+
min-height: 0;
|
|
379
385
|
}
|
|
380
386
|
.order-no {
|
|
381
387
|
display: -webkit-box;
|
|
@@ -437,6 +443,9 @@ export class LoadingExecution extends LoadingExecutionBase {
|
|
|
437
443
|
.qc-banner button:hover {
|
|
438
444
|
background-color: #005f60;
|
|
439
445
|
}
|
|
446
|
+
#sku {
|
|
447
|
+
--product-item-selected-bg: #d4edea;
|
|
448
|
+
}
|
|
440
449
|
`
|
|
441
450
|
]
|
|
442
451
|
}
|
|
@@ -703,6 +712,7 @@ export class LoadingExecution extends LoadingExecutionBase {
|
|
|
703
712
|
productName: item.relatedOrderInv?.product?.name || '',
|
|
704
713
|
packingType: item.relatedOrderInv?.packingType || '',
|
|
705
714
|
isInventoryDecimal: item.relatedOrderInv?.product?.isInventoryDecimal || false,
|
|
715
|
+
productBarcodes: item.relatedOrderInv?.productDetail?.productBarcodes || [],
|
|
706
716
|
groupQty: null, // Reset to null (empty field, will use full availableQty)
|
|
707
717
|
relatedOrderInv: {
|
|
708
718
|
...item.relatedOrderInv,
|
|
@@ -770,6 +780,18 @@ export class LoadingExecution extends LoadingExecutionBase {
|
|
|
770
780
|
}
|
|
771
781
|
}
|
|
772
782
|
|
|
783
|
+
get _skuBarcodeInput() {
|
|
784
|
+
return this.shadowRoot.querySelector('barcode-scanable-input[name="skuBarcode"]')?.shadowRoot.querySelector('input')
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
get _skuQtyInput() {
|
|
788
|
+
return this.shadowRoot.querySelector('input[name="skuQty"]')
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
get _skuListView() {
|
|
792
|
+
return this.shadowRoot.querySelector('#sku')
|
|
793
|
+
}
|
|
794
|
+
|
|
773
795
|
/**
|
|
774
796
|
* Determines if the "Go to LOADED" banner should be shown.
|
|
775
797
|
* Banner appears when:
|
|
@@ -953,21 +975,90 @@ export class LoadingExecution extends LoadingExecutionBase {
|
|
|
953
975
|
)
|
|
954
976
|
}
|
|
955
977
|
|
|
978
|
+
_handleSkuScanSubmit(e) {
|
|
979
|
+
if (e.keyCode !== 13) return
|
|
980
|
+
e.preventDefault()
|
|
981
|
+
|
|
982
|
+
const scannedValue = this._skuBarcodeInput?.value?.trim()
|
|
983
|
+
if (!scannedValue) {
|
|
984
|
+
showToast({ message: i18next.t('text.product_barcode_is_empty'), type: 'error' })
|
|
985
|
+
this._skuBarcodeInput?.focus()
|
|
986
|
+
return
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
const matches = this.filteredSkuData.filter(item =>
|
|
990
|
+
(item.productBarcodes || []).some(pb => pb.gtin === scannedValue)
|
|
991
|
+
)
|
|
992
|
+
|
|
993
|
+
if (matches.length === 0) {
|
|
994
|
+
// No match — show error and clear barcode
|
|
995
|
+
showToast({ message: i18next.t('text.barcode_not_found'), type: 'error' })
|
|
996
|
+
if (this._skuBarcodeInput) this._skuBarcodeInput.value = ''
|
|
997
|
+
if (this._skuQtyInput) this._skuQtyInput.value = ''
|
|
998
|
+
this._skuBarcodeInput?.focus()
|
|
999
|
+
} else if (matches.length === 1) {
|
|
1000
|
+
// Single match — highlight and check checkbox immediately, then validate qty
|
|
1001
|
+
const matched = matches[0]
|
|
1002
|
+
if (this._skuListView) {
|
|
1003
|
+
this._skuListView.selectedRecordId = null
|
|
1004
|
+
this._skuListView.highlightedIds = [matched.id]
|
|
1005
|
+
this._skuListView.scrollToId(matched.id)
|
|
1006
|
+
if (!this._skuListView.selectedItems.includes(matched.id)) {
|
|
1007
|
+
this._skuListView.selectedItems = [...this._skuListView.selectedItems, matched.id]
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
const qty = parseFloat(this._skuQtyInput?.value)
|
|
1012
|
+
const { remainingQty, isInventoryDecimal, sku: productSku } = matched
|
|
1013
|
+
|
|
1014
|
+
if (isNaN(qty)) {
|
|
1015
|
+
showToast({ message: i18next.t('text.please_enter_qty'), type: 'error' })
|
|
1016
|
+
this._skuQtyInput?.focus()
|
|
1017
|
+
} else if (qty === 0) {
|
|
1018
|
+
showToast({ message: i18next.t('text.group_quantity_cannot_be_zero'), type: 'error' })
|
|
1019
|
+
this._skuQtyInput?.focus()
|
|
1020
|
+
} else if (qty < 0) {
|
|
1021
|
+
showToast({ message: i18next.t('text.group_quantity_cannot_be_negative'), type: 'error' })
|
|
1022
|
+
this._skuQtyInput?.focus()
|
|
1023
|
+
} else if (!isInventoryDecimal && !Number.isInteger(qty)) {
|
|
1024
|
+
showToast({ message: i18next.t('text.decimal_not_allowed_for_product', { sku: productSku }), type: 'error' })
|
|
1025
|
+
} else if (qty > parseFloat(remainingQty)) {
|
|
1026
|
+
showToast({ message: i18next.t('text.group_quantity_exceeds_total'), type: 'error' })
|
|
1027
|
+
} else {
|
|
1028
|
+
matched.groupQty = qty
|
|
1029
|
+
this._combinedSkuData = [...this._combinedSkuData]
|
|
1030
|
+
if (this._skuQtyInput) this._skuQtyInput.value = ''
|
|
1031
|
+
this._skuQtyInput?.focus()
|
|
1032
|
+
}
|
|
1033
|
+
} else {
|
|
1034
|
+
// Multiple matches — highlight all, let user enter qty manually in the list
|
|
1035
|
+
if (this._skuListView) {
|
|
1036
|
+
this._skuListView.selectedRecordId = null
|
|
1037
|
+
this._skuListView.highlightedIds = matches.map(m => m.id)
|
|
1038
|
+
this._skuListView.scrollToId(matches[0].id)
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
if (this._skuQtyInput?.value?.trim()) {
|
|
1042
|
+
showToast({ message: i18next.t('text.multiple_matches_enter_qty_manually'), type: 'warn' })
|
|
1043
|
+
}
|
|
1044
|
+
if (this._skuQtyInput) this._skuQtyInput.value = ''
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
|
|
956
1048
|
async handleGroupPackages() {
|
|
957
1049
|
try {
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
showToast({ message: i18next.t('text.sku_list_view_not_found') })
|
|
1050
|
+
if (!this._skuListView) {
|
|
1051
|
+
showToast({ message: i18next.t('text.sku_list_view_not_found') })
|
|
961
1052
|
return
|
|
962
1053
|
}
|
|
963
1054
|
|
|
964
|
-
const selectedItemIds =
|
|
1055
|
+
const selectedItemIds = this._skuListView.selectedItems || []
|
|
965
1056
|
if (selectedItemIds.length === 0) {
|
|
966
1057
|
showToast({ message: i18next.t('text.no_sku_selected') })
|
|
967
1058
|
return
|
|
968
1059
|
}
|
|
969
1060
|
|
|
970
|
-
const viewData =
|
|
1061
|
+
const viewData = this._skuListView.data || []
|
|
971
1062
|
const selectedItems = viewData.filter(item => selectedItemIds.includes(item.id))
|
|
972
1063
|
|
|
973
1064
|
if (selectedItems.length === 0) {
|
|
@@ -1049,9 +1140,9 @@ export class LoadingExecution extends LoadingExecutionBase {
|
|
|
1049
1140
|
if (this._groupPackingActiveTab === GROUP_PACKING_TAB_TYPES.SKU) {
|
|
1050
1141
|
this._calculateAndCombineSkuData()
|
|
1051
1142
|
await this.updateComplete
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1143
|
+
if (this._skuListView) {
|
|
1144
|
+
this._skuListView.selectedItems = []
|
|
1145
|
+
this._skuListView.selectAll = false
|
|
1055
1146
|
}
|
|
1056
1147
|
}
|
|
1057
1148
|
}
|
|
@@ -1115,6 +1206,23 @@ export class LoadingExecution extends LoadingExecutionBase {
|
|
|
1115
1206
|
: ''}
|
|
1116
1207
|
|
|
1117
1208
|
<div class="tab-content ${this._groupPackingActiveTab === GROUP_PACKING_TAB_TYPES.SKU ? 'active' : ''}">
|
|
1209
|
+
<form class="multi-column-form">
|
|
1210
|
+
<fieldset>
|
|
1211
|
+
<label>${i18next.t('label.scan_product_barcode')}</label>
|
|
1212
|
+
<barcode-scanable-input
|
|
1213
|
+
name="skuBarcode"
|
|
1214
|
+
custom-input
|
|
1215
|
+
@keypress="${e => this._handleSkuScanSubmit(e)}"
|
|
1216
|
+
></barcode-scanable-input>
|
|
1217
|
+
<label>${i18next.t('label.qty')}</label>
|
|
1218
|
+
<input
|
|
1219
|
+
type="number"
|
|
1220
|
+
name="skuQty"
|
|
1221
|
+
min="1"
|
|
1222
|
+
@keypress="${e => this._handleSkuScanSubmit(e)}"
|
|
1223
|
+
/>
|
|
1224
|
+
</fieldset>
|
|
1225
|
+
</form>
|
|
1118
1226
|
<product-list-view
|
|
1119
1227
|
id="sku"
|
|
1120
1228
|
.config=${this.skuListItemConfig}
|
|
@@ -128,6 +128,9 @@ const FIND_LOADABLE_RELEASE_GOOD_BY_BIN = gql`
|
|
|
128
128
|
}
|
|
129
129
|
productDetail {
|
|
130
130
|
id
|
|
131
|
+
productBarcodes {
|
|
132
|
+
gtin
|
|
133
|
+
}
|
|
131
134
|
}
|
|
132
135
|
orderProduct {
|
|
133
136
|
id
|
|
@@ -195,6 +198,9 @@ const LOADING_WORKSHEET_V2 = gql`
|
|
|
195
198
|
}
|
|
196
199
|
productDetail {
|
|
197
200
|
id
|
|
201
|
+
productBarcodes {
|
|
202
|
+
gtin
|
|
203
|
+
}
|
|
198
204
|
}
|
|
199
205
|
orderProduct {
|
|
200
206
|
id
|
|
@@ -285,6 +291,9 @@ const GET_LOADING_TASK = gql`
|
|
|
285
291
|
}
|
|
286
292
|
productDetail {
|
|
287
293
|
id
|
|
294
|
+
productBarcodes {
|
|
295
|
+
gtin
|
|
296
|
+
}
|
|
288
297
|
}
|
|
289
298
|
orderProduct {
|
|
290
299
|
id
|
package/config.development.js
CHANGED
|
@@ -6,29 +6,18 @@ module.exports = {
|
|
|
6
6
|
subdomainOffset: 2,
|
|
7
7
|
port: 4000,
|
|
8
8
|
inspect: '9330',
|
|
9
|
+
|
|
10
|
+
storage: {
|
|
11
|
+
type: 's3',
|
|
12
|
+
accessKeyId: 'AKIAUQEOPWEJHCE4MTH4',
|
|
13
|
+
secretAccessKey: 'HkQ1engoFOhduKltXF4j6OakRmLY/9JhvyTWbc8b',
|
|
14
|
+
bucketName: 'opa-one',
|
|
15
|
+
region: 'ap-southeast-1'
|
|
16
|
+
},
|
|
17
|
+
// arif
|
|
9
18
|
// ormconfig: {
|
|
10
19
|
// name: 'default',
|
|
11
20
|
// type: 'postgres',
|
|
12
|
-
// database: 'postgres',
|
|
13
|
-
// username: 'izzah',
|
|
14
|
-
// password: 'hatio1234',
|
|
15
|
-
// host: 'my-operato-pg.cjcso4qmeuq0.ap-southeast-5.rds.amazonaws.com',
|
|
16
|
-
// port: 55432,
|
|
17
|
-
// synchronize: false,
|
|
18
|
-
// logging: true
|
|
19
|
-
// },
|
|
20
|
-
// postgres2
|
|
21
|
-
// ormconfig: {
|
|
22
|
-
// name: 'default',
|
|
23
|
-
// type: 'postgres',
|
|
24
|
-
// database: 'postgres',
|
|
25
|
-
// username: 'postgres',
|
|
26
|
-
// password: 'hatio',
|
|
27
|
-
// host: '192.168.0.151',
|
|
28
|
-
// port: 15432,
|
|
29
|
-
// synchronize: false,debug
|
|
30
|
-
// name: 'default',
|
|
31
|
-
// type: 'postgres',
|
|
32
21
|
// database: 'arif',
|
|
33
22
|
// username: 'postgres',
|
|
34
23
|
// password: 'hatio',
|
|
@@ -37,51 +26,7 @@ module.exports = {
|
|
|
37
26
|
// synchronize: false,
|
|
38
27
|
// logging: true
|
|
39
28
|
// },
|
|
40
|
-
|
|
41
|
-
// name: 'default',
|
|
42
|
-
// type: 'postgres',
|
|
43
|
-
// database: 'operato-eric',
|
|
44
|
-
// username: 'postgres',
|
|
45
|
-
// password: 'hatio',
|
|
46
|
-
// host: '192.168.0.248',
|
|
47
|
-
// port: 15432,
|
|
48
|
-
// synchronize: false,
|
|
49
|
-
// logging: true
|
|
50
|
-
// },
|
|
51
|
-
//operato
|
|
52
|
-
// ormconfig: {
|
|
53
|
-
// name: 'default',
|
|
54
|
-
// type: 'postgres',
|
|
55
|
-
// database: 'operato',
|
|
56
|
-
// username: 'postgres',
|
|
57
|
-
// password: 'hatio',
|
|
58
|
-
// host: '192.168.0.151',
|
|
59
|
-
// port: 15432,
|
|
60
|
-
// synchronize: false,
|
|
61
|
-
// logging: true
|
|
62
|
-
// },
|
|
63
|
-
//153 - operatodebug
|
|
64
|
-
// type: 'postgres',
|
|
65
|
-
// database: 'operato',
|
|
66
|
-
// username: 'postgres',
|
|
67
|
-
// password: 'hatio',
|
|
68
|
-
// host: '192.168.0.153',
|
|
69
|
-
// port: 15432,
|
|
70
|
-
// synchronize: false,
|
|
71
|
-
// logging: true
|
|
72
|
-
// },
|
|
73
|
-
//eric2
|
|
74
|
-
// ormconfig: {
|
|
75
|
-
// name: 'default',
|
|
76
|
-
// type: 'postgres',
|
|
77
|
-
// database: 'eric2',
|
|
78
|
-
// username: 'postgres',
|
|
79
|
-
// password: 'hatio',
|
|
80
|
-
// host: '192.168.0.153',
|
|
81
|
-
// port: 15432,
|
|
82
|
-
// synchronize: false,
|
|
83
|
-
// logging: true
|
|
84
|
-
// },
|
|
29
|
+
|
|
85
30
|
// STAGING DATABASE
|
|
86
31
|
ormconfig: {
|
|
87
32
|
name: 'default',
|
|
@@ -94,30 +39,46 @@ module.exports = {
|
|
|
94
39
|
synchronize: false,
|
|
95
40
|
logging: true
|
|
96
41
|
},
|
|
97
|
-
|
|
42
|
+
|
|
98
43
|
// ormconfig: {
|
|
99
44
|
// name: 'default',
|
|
100
45
|
// type: 'postgres',
|
|
101
|
-
//
|
|
46
|
+
// host: 'operatov3.cluster-cijhm4n1hbst.ap-southeast-1.rds.amazonaws.com',
|
|
47
|
+
// port: 55432,
|
|
48
|
+
// database: 'postgres',
|
|
102
49
|
// username: 'postgres',
|
|
103
|
-
// password: '
|
|
104
|
-
// host: '192.168.0.161',
|
|
105
|
-
// port: 15432,
|
|
50
|
+
// password: 'abcd1234',
|
|
106
51
|
// synchronize: false,
|
|
52
|
+
// logging: true,
|
|
53
|
+
// connectTimeoutMS: 30000,
|
|
54
|
+
// extra: { poolSize: 30 }
|
|
55
|
+
// },
|
|
56
|
+
|
|
57
|
+
//db izzah
|
|
58
|
+
// ormconfig: {
|
|
59
|
+
// name: 'default',
|
|
60
|
+
// type: 'postgres',
|
|
61
|
+
// database: '06072023',
|
|
62
|
+
// username: 'postgres',
|
|
63
|
+
// password: 'hatio',
|
|
64
|
+
// host: '192.168.0.153',
|
|
65
|
+
// port: 15432,f
|
|
66
|
+
// synchronize: true,
|
|
107
67
|
// logging: true
|
|
108
68
|
// },
|
|
109
|
-
//db nora
|
|
110
69
|
// ormconfig: {
|
|
111
70
|
// name: 'default',
|
|
112
71
|
// type: 'postgres',
|
|
113
72
|
// database: 'postgres',
|
|
114
73
|
// username: 'postgres',
|
|
115
74
|
// password: 'hatio',
|
|
116
|
-
// host: '192.168.0.
|
|
75
|
+
// host: '192.168.0.151',
|
|
117
76
|
// port: 15432,
|
|
118
|
-
// synchronize:
|
|
77
|
+
// synchronize: false,
|
|
119
78
|
// logging: true
|
|
120
79
|
// },
|
|
80
|
+
|
|
81
|
+
// //ERIC
|
|
121
82
|
// ormconfig: {
|
|
122
83
|
// name: 'default',
|
|
123
84
|
// type: 'postgres',
|
|
@@ -126,14 +87,15 @@ module.exports = {
|
|
|
126
87
|
// password: 'hatio',
|
|
127
88
|
// host: '192.168.0.153',
|
|
128
89
|
// port: 15432,
|
|
129
|
-
// synchronize:
|
|
90
|
+
// synchronize: false,
|
|
130
91
|
// logging: true
|
|
131
92
|
// },
|
|
132
|
-
|
|
93
|
+
|
|
94
|
+
//eric 2
|
|
133
95
|
// ormconfig: {
|
|
134
96
|
// name: 'default',
|
|
135
97
|
// type: 'postgres',
|
|
136
|
-
// database: '
|
|
98
|
+
// database: 'eric2',
|
|
137
99
|
// username: 'postgres',
|
|
138
100
|
// password: 'hatio',
|
|
139
101
|
// host: '192.168.0.153',
|
|
@@ -141,20 +103,21 @@ module.exports = {
|
|
|
141
103
|
// synchronize: false,
|
|
142
104
|
// logging: true
|
|
143
105
|
// },
|
|
106
|
+
|
|
144
107
|
// ormconfig: {
|
|
145
108
|
// name: 'default',
|
|
146
109
|
// type: 'postgres',
|
|
147
|
-
// host: '
|
|
148
|
-
// port:
|
|
110
|
+
// host: 'operatov3.cluster-cijhm4n1hbst.ap-southeast-1.rds.amazonaws.com',
|
|
111
|
+
// port: 55432,
|
|
149
112
|
// database: 'postgres',
|
|
150
|
-
// username: '
|
|
151
|
-
// password: '
|
|
113
|
+
// username: 'postgres',
|
|
114
|
+
// password: 'abcd1234',
|
|
152
115
|
// synchronize: false,
|
|
153
116
|
// logging: true,
|
|
154
117
|
// connectTimeoutMS: 30000,
|
|
155
118
|
// extra: { poolSize: 30 }
|
|
156
119
|
// },
|
|
157
|
-
//
|
|
120
|
+
//ormconfig: {
|
|
158
121
|
// name: 'default',
|
|
159
122
|
// type: 'postgres',
|
|
160
123
|
// database: 'dev2',
|
|
@@ -182,7 +145,16 @@ module.exports = {
|
|
|
182
145
|
},
|
|
183
146
|
uploads: 'uploads',
|
|
184
147
|
attachmentsPath: 'attachments',
|
|
185
|
-
logger: {
|
|
148
|
+
logger: {
|
|
149
|
+
file: {
|
|
150
|
+
filename: 'logs/application-%DATE%.log',
|
|
151
|
+
datePattern: 'YYYY-MM-DD-HH',
|
|
152
|
+
zippedArchive: true,
|
|
153
|
+
maxSize: '200m',
|
|
154
|
+
maxFiles: '1m',
|
|
155
|
+
level: 'info'
|
|
156
|
+
}
|
|
157
|
+
},
|
|
186
158
|
email: {
|
|
187
159
|
host: 'smtp.office365.com',
|
|
188
160
|
port: 587,
|
|
@@ -220,72 +192,30 @@ module.exports = {
|
|
|
220
192
|
// privateKey: '4pmlt3Wk019u7nqU3Q_oGZE6LbUDjjf8DpmAcn9-iss'
|
|
221
193
|
// }
|
|
222
194
|
},
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
application: 'Operato MMS',
|
|
228
|
-
appKey: 'a9bf751e622bf146662b240d58971051',
|
|
229
|
-
appSecret: '1c385935dc131c4b902b9bbf6a4798af',
|
|
230
|
-
callback: 'http://192.168.0.161:5000/callback-operato'
|
|
231
|
-
},
|
|
232
|
-
lmdIntegrationNinjavan: {
|
|
233
|
-
clientId: 'P8WCEwMo0FHNlPECwTLetwN3diAmt5KF',
|
|
234
|
-
secretKey: '1D0yNZGseOjhxnwri29xmuZiiuRp131L',
|
|
235
|
-
refreshThreshold: 43200
|
|
236
|
-
},
|
|
237
|
-
|
|
238
|
-
lmdIntegrationEms: { refreshThreshold: 43200 },
|
|
239
|
-
marketplaceIntegrationShopee: {
|
|
240
|
-
platform: 'shopee',
|
|
241
|
-
isUAT: false,
|
|
242
|
-
application: 'Operato MMS',
|
|
243
|
-
partnerId: 846025,
|
|
244
|
-
partnerKey: 'd34cfd85a603f196a0d74ebe08043280c1a27788bb36bdffd61e7e0bb1c90b64',
|
|
245
|
-
v2: true
|
|
246
|
-
},
|
|
247
|
-
marketplaceIntegrationLazada: {
|
|
248
|
-
platform: 'lazada',
|
|
249
|
-
application: 'operato-mms',
|
|
250
|
-
appKey: '120961',
|
|
251
|
-
appSecret: 'HB3RTNEXHlVSlBr9SmWF8AjbSUT7a825',
|
|
252
|
-
callback: 'https://maybank.operato-m.com/lazada-callback'
|
|
253
|
-
},
|
|
254
|
-
|
|
255
|
-
//testinglazada
|
|
256
|
-
// marketplaceIntegrationLazada: {
|
|
257
|
-
// platform: 'lazada',
|
|
258
|
-
// application: 'powrup_bi',
|
|
259
|
-
// appKey: '117890',
|
|
260
|
-
// appSecret: 'tQVllnUa7irAHoNxAwXEVxoP1we1bUjE',
|
|
261
|
-
// callback: 'https://73c5-175-141-30-142.ngrok-free.app/lazada-callback'
|
|
262
|
-
// },
|
|
263
|
-
reportApiUrl: 'http://localhost:8090/rest/report/show_html',
|
|
264
|
-
// reportApiUrl: 'http://192.168.0.153:8888/rest/report/show_html'
|
|
195
|
+
// reportApiUrl:
|
|
196
|
+
// 'http://k8s-default-operator-8eeba2e246-3e3a5ee7979bcd57.elb.ap-southeast-1.amazonaws.com/rest/report/show_html',
|
|
197
|
+
// reportApiUrl: 'http://192.168.0.153:8888/rest/report/show_html',
|
|
198
|
+
// reportApiUrl: 'http://192.168.0.153:8888/rest/report/show_html',
|
|
265
199
|
// reportApiUrl: 'http://10.100.109.66:8090/rest/report/show_html',
|
|
266
200
|
awbFileStorage: {
|
|
267
201
|
type: 's3',
|
|
268
|
-
accessKeyId: '
|
|
269
|
-
secretAccessKey: '
|
|
202
|
+
accessKeyId: 'AKIAUQEOPWEJKL43OMZA',
|
|
203
|
+
secretAccessKey: 'OG2qS0Usg4wyjPWbfv1ahPZzP80/w8z4i8MYHl+e',
|
|
270
204
|
bucketName: 'operato-awb',
|
|
271
205
|
region: 'ap-southeast-1'
|
|
272
206
|
},
|
|
207
|
+
invoiceFileStorage: {
|
|
208
|
+
type: 's3',
|
|
209
|
+
accessKeyId: 'AKIAUQEOPWEJKL43OMZA',
|
|
210
|
+
secretAccessKey: 'OG2qS0Usg4wyjPWbfv1ahPZzP80/w8z4i8MYHl+e',
|
|
211
|
+
invoiceBucket: 'operato-invoice',
|
|
212
|
+
region: 'ap-southeast-1'
|
|
213
|
+
},
|
|
273
214
|
lambda: {
|
|
274
215
|
region: 'ap-southeast-1',
|
|
275
|
-
accessKeyId: '
|
|
276
|
-
secretAccessKey: '
|
|
216
|
+
accessKeyId: 'AKIAUQEOPWEJKL43OMZA',
|
|
217
|
+
secretAccessKey: 'OG2qS0Usg4wyjPWbfv1ahPZzP80/w8z4i8MYHl+e'
|
|
277
218
|
},
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
v1: 'lmdMiddleware',
|
|
281
|
-
v2: 'lmdMiddlewareV2'
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
|
-
awsSesEmail: {
|
|
285
|
-
accessKeyId: 'AKIAUQEOPWEJPXIVER74',
|
|
286
|
-
secretAccessKey: 'I6uuS+6CMzIQlqBS9i+G8AYIeYj5RR7wb4fxjbLq',
|
|
287
|
-
email: 'support@hatio.asia'
|
|
288
|
-
}
|
|
289
|
-
// reportApiUrl:
|
|
290
|
-
// 'http://k8s-default-operator-2fd6178d98-66c66a0f76c09575.elb.ap-southeast-1.amazonaws.com/rest/report/show_html'
|
|
219
|
+
reportApiUrl:
|
|
220
|
+
'http://k8s-default-operator-8eeba2e246-3e3a5ee7979bcd57.elb.ap-southeast-1.amazonaws.com/rest/report/show_html'
|
|
291
221
|
}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.completeLoad = void 0;
|
|
4
4
|
const typeorm_1 = require("typeorm");
|
|
5
5
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
6
|
+
const integration_accounting_1 = require("@things-factory/integration-accounting");
|
|
6
7
|
const sales_base_1 = require("@things-factory/sales-base");
|
|
7
8
|
const worksheet_base_1 = require("@things-factory/worksheet-base");
|
|
8
9
|
const integration_lmd_1 = require("@things-factory/integration-lmd");
|
|
@@ -126,6 +127,16 @@ async function completeLoading(domain, tx, user, partial, orderId, worksheetId)
|
|
|
126
127
|
}
|
|
127
128
|
const orderSource = releaseGood.source;
|
|
128
129
|
switch (orderSource) {
|
|
130
|
+
case auth_base_1.ApplicationType.XILNEX:
|
|
131
|
+
const xilnex = await tx.getRepository(integration_accounting_1.Account).findOne({
|
|
132
|
+
where: { domain: releaseGood.bizplace.domain, status: 'active', platform: 'xilnex' },
|
|
133
|
+
relations: ['domain']
|
|
134
|
+
});
|
|
135
|
+
if (xilnex) {
|
|
136
|
+
const xilnexCtrl = new worksheet_base_1.XilnexController(tx, domain, user);
|
|
137
|
+
await xilnexCtrl.deliveryTransferNote(tx, xilnex, releaseGood.id);
|
|
138
|
+
}
|
|
139
|
+
break;
|
|
129
140
|
case auth_base_1.ApplicationType.POWRUP:
|
|
130
141
|
const powrup = await tx.getRepository(integration_powrup_1.Powrup).findOne({ active: true, platform: 'POWRUP' });
|
|
131
142
|
const rtsTriggerLevel = await tx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"complete-load.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/outbound/complete-load.ts"],"names":[],"mappings":";;;AAAA,qCAAuD;AAEvD,yDAAiE;AACjE,2DAUmC;AACnC,
|
|
1
|
+
{"version":3,"file":"complete-load.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/outbound/complete-load.ts"],"names":[],"mappings":";;;AAAA,qCAAuD;AAEvD,yDAAiE;AACjE,mFAAgE;AAChE,2DAUmC;AACnC,mEAA+H;AAC/H,qEAA+D;AAC/D,2EAA2D;AAC3D,+DAAsD;AACtD,uEAAoF;AAEpF,SAAS,mBAAmB,CAAC,KAAU;IACrC,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,GAAG,EAAE,EAAE,CAAC,CAAA;IACpC,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAChD,CAAC;AAEY,QAAA,YAAY,GAAG;IAC1B,KAAK,CAAC,YAAY,CAAC,CAAM,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,EA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sB,CAAC,MAAM,EAAE;YAC/C,MAAM,EAAE,CAAC,aAAa,CAAC,2BAAc,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE;gBACnD,MAAM;gBACN,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,WAAW;aACvB,CAAC,CAAA;SACH;KACF;AACH,CAAC;AAED,KAAK,UAAU,eAAe,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW;IACrE,MAAM,EAAE,CAAC,aAAa,CAAC,0BAAS,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE;QACrD,MAAM;QACN,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,IAAI,IAAI,EAAE;QACrB,OAAO,EAAE,MAAM,KAAK,iCAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI;KAC9D,CAAC,CAAA;AACJ,CAAC;AAED,KAAK,UAAU,iBAAiB,CAAC,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW;IACzE,MAAM,EAAE,CAAC,aAAa,CAAC,wBAAW,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,EAAE;QACzD,MAAM;QACN,YAAY,EAAE,WAAW,CAAC,YAAY;QACtC,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,IAAI,IAAI,EAAE;KACtB,CAAC,CAAA;IACF,IAAI,MAAM,KAAK,yBAAY,CAAC,IAAI,EAAE;QAChC,IAAA,iCAAc,EAAC,WAAW,EAAE,WAAW,CAAC,QAAQ,EAAE,oCAAiB,CAAC,qBAAqB,CAAC,CAAA;KAC3F;AACH,CAAC"}
|
|
@@ -41,6 +41,7 @@ const buildOrderInventoryQuery = (tx, domainId, options) => {
|
|
|
41
41
|
.leftJoinAndSelect('orderInventory.inventory', 'inventory')
|
|
42
42
|
.leftJoinAndSelect('inventory.product', 'product')
|
|
43
43
|
.leftJoinAndSelect('inventory.productDetail', 'productDetail')
|
|
44
|
+
.leftJoinAndSelect('productDetail.productBarcodes', 'productBarcodes')
|
|
44
45
|
.leftJoinAndSelect('orderInventory.binLocation', 'binLocation')
|
|
45
46
|
.innerJoinAndSelect('orderInventory.releaseGood', 'releaseGood')
|
|
46
47
|
.where('orderInventory.domain_id = :domainId', { domainId })
|
|
@@ -149,7 +150,8 @@ const transformToWorksheetFormat = (orderInventories, releaseGood) => {
|
|
|
149
150
|
: null,
|
|
150
151
|
productDetail: ((_h = oi.inventory) === null || _h === void 0 ? void 0 : _h.productDetail)
|
|
151
152
|
? {
|
|
152
|
-
id: oi.inventory.productDetail.id
|
|
153
|
+
id: oi.inventory.productDetail.id,
|
|
154
|
+
productBarcodes: (oi.inventory.productDetail.productBarcodes || []).map((pb) => ({ gtin: pb.gtin }))
|
|
153
155
|
}
|
|
154
156
|
: null,
|
|
155
157
|
orderProduct: oi.orderProductId
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-loadable-release-good-by-bin.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/outbound/find-loadable-release-good-by-bin.ts"],"names":[],"mappings":";;;AAEA,mEAAyD;AAEzD,2DAA8G;AAE9G;;;GAGG;AACH,MAAM,kBAAmB,SAAQ,KAAK;IACpC,YAAY,OAAe,EAAS,IAAY;QAC9C,KAAK,CAAC,OAAO,CAAC,CAAA;QADoB,SAAI,GAAJ,IAAI,CAAQ;QAE9C,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAA;IAClC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,+BAA+B,GAAG,CAAC,EAAiB,EAAE,QAAgB,EAAE,OAAe,EAAE,EAAE;IAC/F,OAAO,EAAE;SACN,aAAa,CAAC,wBAAW,CAAC;SAC1B,kBAAkB,CAAC,aAAa,CAAC;SACjC,iBAAiB,CAAC,sBAAsB,EAAE,UAAU,CAAC;SACrD,KAAK,CAAC,mCAAmC,EAAE,EAAE,QAAQ,EAAE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C7B,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM;qBAC9B;oBACH,CAAC,CAAC,IAAI;gBACR,WAAW,EAAE,MAAA,MAAA,EAAE,CAAC,SAAS,0CAAE,OAAO,0CAAE,IAAI;gBACxC,UAAU,EAAE,MAAA,MAAA,EAAE,CAAC,SAAS,0CAAE,OAAO,0CAAE,GAAG;gBACtC,eAAe,EAAE;oBACf,EAAE,EAAE,EAAE,CAAC,EAAE;oBACT,OAAO,EAAE,EAAE,CAAC,OAAO;oBACnB,WAAW,EAAE,EAAE,CAAC,WAAW;oBAC3B,cAAc,EAAE,EAAE,CAAC,cAAc;oBACjC,SAAS,EAAE,EAAE,CAAC,SAAS;oBACvB,UAAU,EAAE,EAAE,CAAC,UAAU;oBACzB,OAAO,EAAE,CAAA,MAAA,EAAE,CAAC,SAAS,0CAAE,OAAO;wBAC5B,CAAC,CAAC;4BACE,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;4BAC3B,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG;4BAC7B,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI;4BAC/B,kBAAkB,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,kBAAkB;yBAC5D;wBACH,CAAC,CAAC,IAAI;oBACR,aAAa,EAAE,CAAA,MAAA,EAAE,CAAC,SAAS,0CAAE,aAAa;wBACxC,CAAC,CAAC;4BACE,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"find-loadable-release-good-by-bin.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/outbound/find-loadable-release-good-by-bin.ts"],"names":[],"mappings":";;;AAEA,mEAAyD;AAEzD,2DAA8G;AAE9G;;;GAGG;AACH,MAAM,kBAAmB,SAAQ,KAAK;IACpC,YAAY,OAAe,EAAS,IAAY;QAC9C,KAAK,CAAC,O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EAAE,gBAAgB,CAAC,EAAE;aACnC,CAAC,CAAC,OAAO,EAAE,CAAA;YAEZ,IAAI,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE;gBAClC,gEAAgE;gBAChE,OAAO,0BAA0B,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAA;aACzE;iBAAM;gBACL,MAAM,IAAI,kBAAkB,CAAC,gCAAgC,EAAE,mBAAmB,CAAC,CAAA;aACpF;SACF;aAAM;YACL,8BAA8B;YAC9B,MAAM,WAAW,GAAa,MAAM,EAAE,CAAC,aAAa,CAAC,yBAAQ,CAAC,CAAC,OAAO,CAAC;gBACrE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE;aACjC,CAAC,CAAA;YAEF,IAAI,WAAW,EAAE;gBACf,mBAAmB,GAAG,MAAM,wBAAwB,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAA;aAC9G;YAED,IAAI,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE;gBAClC,OAAO,0BAA0B,CAAC,mBAAmB,CAAC,CAAA;aACvD;iBAAM;gBACL,MAAM,IAAI,kBAAkB,CAAC,8BAA8B,EAAE,iBAAiB,CAAC,CAAA;aAChF;SACF;IACH,CAAC;CACF,CAAA"}
|
|
@@ -61,6 +61,7 @@ exports.loadingWorksheetv2 = {
|
|
|
61
61
|
.leftJoinAndSelect('targetInventory.binLocation', 'binLocation')
|
|
62
62
|
.leftJoinAndSelect('targetInventory.product', 'product')
|
|
63
63
|
.leftJoinAndSelect('targetInventory.productDetail', 'productDetail')
|
|
64
|
+
.leftJoinAndSelect('productDetail.productBarcodes', 'productBarcodes')
|
|
64
65
|
.leftJoin('targetInventory.inventory', 'inventory')
|
|
65
66
|
.addSelect('inventory.expirationDate')
|
|
66
67
|
.where('worksheetDetail.domain_id = :domainId', { domainId: domain.id })
|
|
@@ -131,7 +132,7 @@ async function mapdata(worksheet, worksheetDetails, releaseGood, disableQC) {
|
|
|
131
132
|
}
|
|
132
133
|
};
|
|
133
134
|
const worksheetDetailInfos = worksheetDetails.map(wsd => {
|
|
134
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
135
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
|
|
135
136
|
return ({
|
|
136
137
|
id: wsd.id,
|
|
137
138
|
name: wsd.name,
|
|
@@ -163,10 +164,11 @@ async function mapdata(worksheet, worksheetDetails, releaseGood, disableQC) {
|
|
|
163
164
|
isInventoryDecimal: (_w = (_v = wsd.targetInventory) === null || _v === void 0 ? void 0 : _v.product) === null || _w === void 0 ? void 0 : _w.isInventoryDecimal
|
|
164
165
|
},
|
|
165
166
|
productDetail: {
|
|
166
|
-
id: (_y = (_x = wsd.targetInventory) === null || _x === void 0 ? void 0 : _x.productDetail) === null || _y === void 0 ? void 0 : _y.id
|
|
167
|
+
id: (_y = (_x = wsd.targetInventory) === null || _x === void 0 ? void 0 : _x.productDetail) === null || _y === void 0 ? void 0 : _y.id,
|
|
168
|
+
productBarcodes: (((_0 = (_z = wsd.targetInventory) === null || _z === void 0 ? void 0 : _z.productDetail) === null || _0 === void 0 ? void 0 : _0.productBarcodes) || []).map((pb) => ({ gtin: pb.gtin }))
|
|
167
169
|
},
|
|
168
170
|
orderProduct: {
|
|
169
|
-
id: (
|
|
171
|
+
id: (_1 = wsd.targetInventory) === null || _1 === void 0 ? void 0 : _1.orderProductId
|
|
170
172
|
}
|
|
171
173
|
}
|
|
172
174
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading-worksheet-v2.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/outbound/loading-worksheet-v2.ts"],"names":[],"mappings":";;;AACA,qCAA4B;AAG5B,2DAA8F;AAC9F,mEAA6G;AAC7G,+DAAsD;AAEtD,MAAM,YAAY,GAAG;IACnB,EAAE,EAAE,IAAI;IACR,OAAO,EAAE,SAAS;CACV,CAAA;
|
|
1
|
+
{"version":3,"file":"loading-worksheet-v2.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/outbound/loading-worksheet-v2.ts"],"names":[],"mappings":";;;AACA,qCAA4B;AAG5B,2DAA8F;AAC9F,mEAA6G;AAC7G,+DAAsD;AAEtD,MAAM,YAAY,GAAG;IACnB,EAAE,EAAE,IAAI;IACR,OAAO,EAAE,SAAS;CACV,CAAA;AAuEV,mBAAmB;AACnB,SAAS,UAAU,CAAC,IAAiB;IACnC,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAA;IACtB,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;AACpE,CAAC;AAED,SAAS,uBAAuB,CAAC,iBAAyB,EAAE,SAAkB;IAC5E,OAAO,iBAAiB,KAAK,yBAAY,CAAC,OAAO,IAAI,CAAC,SAAS,CAAA;AACjE,CAAC;AAED,SAAS,YAAY,CAAC,iBAAyB,EAAE,SAAkB,EAAE,SAAiB,EAAE,SAAiB;IACvG,OAAO,iBAAiB,KAAK,yBAAY,CAAC,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAA;AACxF,CAAC;AAEY,QAAA,kBAAkB,GAAG;IAChC,KAAK,CAAC,kBAAkB,CAAC,CAAM,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,EAAE,OAAY;QACvE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAA0C,OAAO,CAAC,KAAK,CAAA;QAE3E,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,K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,CAAC,GAAG,CAAC,CAAC,EAAoB,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;iBAChI;gBACD,YAAY,EAAE;oBACZ,EAAE,EAAE,MAAA,GAAG,CAAC,eAAe,0CAAE,cAAc;iBACxC;aACF;SACF,CAAC,CAAA;KAAA,CAAC,CAAA;IAEH,OAAO;QACL,aAAa;QACb,oBAAoB;KACrB,CAAA;AACH,CAAC"}
|
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.787",
|
|
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.767",
|
|
92
92
|
"@things-factory/product-base": "^4.3.782",
|
|
93
93
|
"@things-factory/resource-ui": "^4.3.770",
|
|
94
|
-
"@things-factory/sales-ui": "^4.3.
|
|
94
|
+
"@things-factory/sales-ui": "^4.3.787",
|
|
95
95
|
"@things-factory/scene-data-transform": "^4.3.767",
|
|
96
96
|
"@things-factory/scene-excel": "^4.3.767",
|
|
97
97
|
"@things-factory/scene-firebase": "^4.3.767",
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
"@things-factory/system-ui": "^4.3.767",
|
|
108
108
|
"@things-factory/transport-base": "^4.3.767",
|
|
109
109
|
"@things-factory/tutorial-ui": "^4.3.767",
|
|
110
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
111
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
110
|
+
"@things-factory/warehouse-base": "^4.3.784",
|
|
111
|
+
"@things-factory/worksheet-base": "^4.3.787"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@things-factory/builder": "^4.3.767",
|
|
@@ -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": "dad39e86be326a731ad345afea52bba594d11452"
|
|
121
121
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EntityManager, getManager, In } from 'typeorm'
|
|
2
2
|
import { Domain } from '@things-factory/shell'
|
|
3
3
|
import { ApplicationType, User } from '@things-factory/auth-base'
|
|
4
|
+
import { Account } from '@things-factory/integration-accounting'
|
|
4
5
|
import {
|
|
5
6
|
DeliveryOrder,
|
|
6
7
|
ReleaseGood,
|
|
@@ -12,7 +13,7 @@ import {
|
|
|
12
13
|
ORDER_STATUS,
|
|
13
14
|
ORDER_INVENTORY_STATUS
|
|
14
15
|
} from '@things-factory/sales-base'
|
|
15
|
-
import { Worksheet, WorksheetDetail, WORKSHEET_STATUS, WORKSHEET_TYPE } from '@things-factory/worksheet-base'
|
|
16
|
+
import { Worksheet, WorksheetDetail, WORKSHEET_STATUS, WORKSHEET_TYPE, XilnexController } from '@things-factory/worksheet-base'
|
|
16
17
|
import { getTmsService } from '@things-factory/integration-lmd'
|
|
17
18
|
import { Powrup } from '@things-factory/integration-powrup'
|
|
18
19
|
import { Setting } from '@things-factory/setting-base'
|
|
@@ -168,6 +169,18 @@ async function completeLoading(
|
|
|
168
169
|
|
|
169
170
|
const orderSource: string = releaseGood.source
|
|
170
171
|
switch (orderSource) {
|
|
172
|
+
case ApplicationType.XILNEX:
|
|
173
|
+
const xilnex: Account = await tx.getRepository(Account).findOne({
|
|
174
|
+
where: { domain: releaseGood.bizplace.domain, status: 'active', platform: 'xilnex' },
|
|
175
|
+
relations: ['domain']
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
if (xilnex) {
|
|
179
|
+
const xilnexCtrl: XilnexController = new XilnexController(tx, domain, user)
|
|
180
|
+
await xilnexCtrl.deliveryTransferNote(tx, xilnex, releaseGood.id)
|
|
181
|
+
}
|
|
182
|
+
break
|
|
183
|
+
|
|
171
184
|
case ApplicationType.POWRUP:
|
|
172
185
|
const powrup: Powrup = await tx.getRepository(Powrup).findOne({ active: true, platform: 'POWRUP' })
|
|
173
186
|
const rtsTriggerLevel: Setting = await tx
|
|
@@ -47,6 +47,7 @@ const buildOrderInventoryQuery = (
|
|
|
47
47
|
.leftJoinAndSelect('orderInventory.inventory', 'inventory')
|
|
48
48
|
.leftJoinAndSelect('inventory.product', 'product')
|
|
49
49
|
.leftJoinAndSelect('inventory.productDetail', 'productDetail')
|
|
50
|
+
.leftJoinAndSelect('productDetail.productBarcodes', 'productBarcodes')
|
|
50
51
|
.leftJoinAndSelect('orderInventory.binLocation', 'binLocation')
|
|
51
52
|
.innerJoinAndSelect('orderInventory.releaseGood', 'releaseGood')
|
|
52
53
|
.where('orderInventory.domain_id = :domainId', { domainId })
|
|
@@ -158,7 +159,8 @@ const transformToWorksheetFormat = (orderInventories: OrderInventory[], releaseG
|
|
|
158
159
|
: null,
|
|
159
160
|
productDetail: oi.inventory?.productDetail
|
|
160
161
|
? {
|
|
161
|
-
id: oi.inventory.productDetail.id
|
|
162
|
+
id: oi.inventory.productDetail.id,
|
|
163
|
+
productBarcodes: (oi.inventory.productDetail.productBarcodes || []).map((pb: { gtin: string }) => ({ gtin: pb.gtin }))
|
|
162
164
|
}
|
|
163
165
|
: null,
|
|
164
166
|
orderProduct: oi.orderProductId
|
|
@@ -67,6 +67,7 @@ interface WorksheetDetailInfo {
|
|
|
67
67
|
}
|
|
68
68
|
productDetail?: {
|
|
69
69
|
id?: string
|
|
70
|
+
productBarcodes?: { gtin: string }[]
|
|
70
71
|
}
|
|
71
72
|
orderProduct?: {
|
|
72
73
|
id?: string
|
|
@@ -139,6 +140,7 @@ export const loadingWorksheetv2 = {
|
|
|
139
140
|
.leftJoinAndSelect('targetInventory.binLocation', 'binLocation')
|
|
140
141
|
.leftJoinAndSelect('targetInventory.product', 'product')
|
|
141
142
|
.leftJoinAndSelect('targetInventory.productDetail', 'productDetail')
|
|
143
|
+
.leftJoinAndSelect('productDetail.productBarcodes', 'productBarcodes')
|
|
142
144
|
.leftJoin('targetInventory.inventory', 'inventory')
|
|
143
145
|
.addSelect('inventory.expirationDate')
|
|
144
146
|
.where('worksheetDetail.domain_id = :domainId', { domainId: domain.id })
|
|
@@ -258,7 +260,8 @@ async function mapdata(
|
|
|
258
260
|
isInventoryDecimal: wsd.targetInventory?.product?.isInventoryDecimal
|
|
259
261
|
},
|
|
260
262
|
productDetail: {
|
|
261
|
-
id: wsd.targetInventory?.productDetail?.id
|
|
263
|
+
id: wsd.targetInventory?.productDetail?.id,
|
|
264
|
+
productBarcodes: (wsd.targetInventory?.productDetail?.productBarcodes || []).map((pb: { gtin: string }) => ({ gtin: pb.gtin }))
|
|
262
265
|
},
|
|
263
266
|
orderProduct: {
|
|
264
267
|
id: wsd.targetInventory?.orderProductId
|
package/translations/en.json
CHANGED
|
@@ -1671,6 +1671,10 @@
|
|
|
1671
1671
|
"text.no_matching_putaway_inventory_found": "no matching putaway inventory found",
|
|
1672
1672
|
"text.no_matching_unloaded_inventory_found": "no matching unloaded inventory found",
|
|
1673
1673
|
"text.no_product_barcode_detected": "no product barcode detected",
|
|
1674
|
+
"text.barcode_not_found": "barcode not found in the list",
|
|
1675
|
+
"text.please_enter_qty": "please enter quantity",
|
|
1676
|
+
"text.multiple_matches_enter_qty_manually": "multiple products found, please enter qty manually in the list",
|
|
1677
|
+
"text.packing_list_info": "Packing List Info",
|
|
1674
1678
|
"text.no_products": "no products",
|
|
1675
1679
|
"text.no_record_selected": "no record selected",
|
|
1676
1680
|
"text.no_serial_number_selected": "no serial number selected",
|
package/translations/ko.json
CHANGED
|
@@ -1632,6 +1632,10 @@
|
|
|
1632
1632
|
"text.no_matching_unloaded_inventory_found": "[ko] no matching unloaded inventory found",
|
|
1633
1633
|
"text.no_pallet_id": "no pallet id",
|
|
1634
1634
|
"text.no_product_barcode_detected": "[ko] no product barcode detected",
|
|
1635
|
+
"text.barcode_not_found": "목록에서 바코드를 찾을 수 없습니다",
|
|
1636
|
+
"text.please_enter_qty": "수량을 입력해 주세요",
|
|
1637
|
+
"text.multiple_matches_enter_qty_manually": "여러 제품이 발견되었습니다. 목록에서 수량을 직접 입력해 주세요",
|
|
1638
|
+
"text.packing_list_info": "패킹 목록 정보",
|
|
1635
1639
|
"text.no_products": "products이 없습니다",
|
|
1636
1640
|
"text.no_record_selected": "[ko]no record selected",
|
|
1637
1641
|
"text.no_serial_number_selected": "[ko]no serial number selected",
|
package/translations/ms.json
CHANGED
|
@@ -1683,6 +1683,10 @@
|
|
|
1683
1683
|
"text.no_matching_putaway_inventory_found": "tidak ditemui stok penyimpanan yang sepadan",
|
|
1684
1684
|
"text.no_matching_unloaded_inventory_found": "tiada inventori tidak dimuatkan sepadan dijumpai",
|
|
1685
1685
|
"text.no_product_barcode_detected": "tiada kod bar produk dikesan",
|
|
1686
|
+
"text.barcode_not_found": "kod bar tidak dijumpai dalam senarai",
|
|
1687
|
+
"text.please_enter_qty": "sila masukkan kuantiti",
|
|
1688
|
+
"text.multiple_matches_enter_qty_manually": "beberapa produk ditemui, sila masukkan kuantiti secara manual dalam senarai",
|
|
1689
|
+
"text.packing_list_info": "Maklumat Senarai Pembungkusan",
|
|
1686
1690
|
"text.no_products": "tiada produk",
|
|
1687
1691
|
"text.no_record_selected": "tiada rekod dipilih",
|
|
1688
1692
|
"text.no_serial_number_selected": "tiada nombor siri dipilih",
|
package/translations/zh.json
CHANGED
|
@@ -1709,6 +1709,10 @@
|
|
|
1709
1709
|
"text.no_matching_putaway_inventory_found": "未找到匹配的上架库存",
|
|
1710
1710
|
"text.no_matching_unloaded_inventory_found": "没有匹配的未卸载库存",
|
|
1711
1711
|
"text.no_product_barcode_detected": "没有产品条码",
|
|
1712
|
+
"text.barcode_not_found": "在列表中找不到条码",
|
|
1713
|
+
"text.please_enter_qty": "请输入数量",
|
|
1714
|
+
"text.multiple_matches_enter_qty_manually": "找到多个产品,请在列表中手动输入数量",
|
|
1715
|
+
"text.packing_list_info": "装箱单信息",
|
|
1712
1716
|
"text.no_products": "没有产品",
|
|
1713
1717
|
"text.no_record_selected": "没有记录",
|
|
1714
1718
|
"text.no_serial_number_selected": "没有序列号",
|