@things-factory/operato-wms 4.3.239 → 4.3.241
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/vas-templates/vas-pallet-add-popup.js +1 -0
- package/client/pages/components/vas-templates/vas-relabel.js +1 -0
- package/client/pages/components/vas-templates/vas-repack-relabel.js +1 -0
- package/client/pages/components/vas-templates/vas-repack.js +1 -0
- package/client/pages/components/vas-templates/vas-repalletizing.js +1 -0
- package/client/pages/components/vas-templates/vas-template.js +1 -0
- package/client/pages/components/vas-templates/vas-unpack.js +1 -0
- package/client/pages/constants/vas-target-type.js +1 -0
- package/client/pages/constants/worksheet.js +4 -0
- package/client/pages/inbound/adjust-pallet-qty.js +1 -1
- package/client/pages/inbound/inbound-worksheet.js +1 -0
- package/client/pages/inbound/palletizing-pallets-popup.js +1 -1
- package/client/pages/inbound/unload-product.js +1 -0
- package/client/pages/inbound/vas-selector.js +1 -0
- package/client/pages/inbound/worksheet-putaway.js +1 -0
- package/client/pages/inbound/worksheet-unloading.js +1 -0
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +1 -0
- package/client/pages/order/arrival-notice/assign-buffer-location.js +1 -0
- package/client/pages/order/arrival-notice/check-arrived-notice.js +1 -0
- package/client/pages/order/arrival-notice/create-arrival-notice.js +1 -0
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +1 -0
- package/client/pages/order/arrival-notice/receive-arrival-notice.js +1 -0
- package/client/pages/order/arrival-notice/rejected-arrival-notice.js +1 -0
- package/client/pages/order/release-order/create-release-order.js +713 -84
- package/client/pages/order/release-order/receive-release-order-request.js +1 -0
- package/client/pages/order/release-order/rejected-release-order.js +1 -0
- package/client/pages/order/release-order/release-order-detail.js +1020 -388
- package/client/pages/order/return-order/check-return-order.js +1 -0
- package/client/pages/order/return-order/rejected-return-order.js +2 -0
- package/client/pages/order/return-order/return-order-assign-buffer-location.js +1 -0
- package/client/pages/order/return-order/return-order-detail.js +1 -0
- package/client/pages/order/reverse-kitting-order/reverse-kitting-pallet-label-popup.js +1 -0
- package/client/pages/order/transfer-order/rejected-transfer-order.js +1 -0
- package/client/pages/order/vas-order/create-vas-order.js +1 -0
- package/client/pages/order/vas-order/popup/abastract-vas-create-form.js +1 -0
- package/client/pages/order/vas-order/popup/select-vas-popup.js +220 -0
- package/client/pages/order/vas-order/popup/vas-create-batch-product-type-form.js +1 -0
- package/client/pages/order/vas-order/popup/vas-create-batch-type-form.js +1 -0
- package/client/pages/order/vas-order/popup/vas-create-etc-type-form.js +1 -0
- package/client/pages/order/vas-order/popup/vas-create-popup.js +1 -0
- package/client/pages/order/vas-order/popup/vas-create-product-type-form.js +1 -0
- package/client/pages/order/vas-order/popup/vas-target-product-popup.js +644 -0
- package/client/pages/order/vas-order/receive-vas-order.js +1 -0
- package/client/pages/order/vas-order/vas-order-detail.js +1 -0
- package/client/pages/order/vas-order/vas-order-list.js +1 -0
- package/client/pages/order/vas-order/vas-order-requests.js +1 -0
- package/client/pages/outbound/loading-product.js +109 -14
- package/client/pages/outbound/picking-product.js +59 -1
- package/client/pages/outbound/vas-list-popup.js +367 -0
- package/client/pages/outbound/worksheet-loading.js +13 -8
- package/client/pages/outbound/worksheet-picking.js +4 -0
- package/client/pages/report/vas-report.js +534 -0
- package/client/pages/vas/abstract-execute-vas.js +2 -1
- package/client/pages/vas/execute-pure-vas.js +1 -0
- package/client/pages/vas/execute-ref-vas.js +1 -0
- package/client/pages/vas/execute-vas.js +2 -2
- package/client/pages/vas/related-vas-list.js +1 -0
- package/client/pages/vas/vas-execution-page.js +469 -0
- package/client/pages/vas/vas-pallet-label-popup.js +1 -0
- package/client/pages/vas/vas-worksheet-list.js +1 -0
- package/client/pages/vas/worksheet-ref-vas.js +97 -36
- package/client/pages/vas/worksheet-vas.js +1 -0
- package/client/route.js +9 -0
- package/config.development.js +67 -86
- package/dist-server/graphql/resolvers/reports/index.js +2 -1
- package/dist-server/graphql/resolvers/reports/index.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/vas-report.js +118 -0
- package/dist-server/graphql/resolvers/reports/vas-report.js.map +1 -0
- package/dist-server/graphql/types/reports/index.js +6 -1
- package/dist-server/graphql/types/reports/index.js.map +1 -1
- package/dist-server/graphql/types/reports/vas-report-list.js +14 -0
- package/dist-server/graphql/types/reports/vas-report-list.js.map +1 -0
- package/dist-server/graphql/types/reports/vas-report.js +18 -0
- package/dist-server/graphql/types/reports/vas-report.js.map +1 -0
- package/package.json +5 -5
- package/server/graphql/resolvers/reports/index.ts +3 -1
- package/server/graphql/resolvers/reports/vas-report.ts +135 -0
- package/server/graphql/types/reports/index.ts +7 -1
- package/server/graphql/types/reports/vas-report-list.ts +8 -0
- package/server/graphql/types/reports/vas-report.ts +12 -0
- package/things-factory.config.js +11 -0
- package/translations/en.json +30 -5
- package/translations/ko.json +26 -1
- package/translations/ms.json +26 -1
- package/translations/zh.json +26 -1
package/client/route.js
CHANGED
|
@@ -339,6 +339,7 @@ export default function route(page) {
|
|
|
339
339
|
import('./pages/inbound/worksheet-putaway-return')
|
|
340
340
|
return page
|
|
341
341
|
|
|
342
|
+
//vas
|
|
342
343
|
case 'worksheet_vas':
|
|
343
344
|
import('./pages/vas/worksheet-vas')
|
|
344
345
|
return page
|
|
@@ -355,6 +356,10 @@ export default function route(page) {
|
|
|
355
356
|
import('./pages/vas/execute-vas')
|
|
356
357
|
return page
|
|
357
358
|
|
|
359
|
+
case 'vas_execution':
|
|
360
|
+
import('./pages/vas/vas-execution-page')
|
|
361
|
+
return page
|
|
362
|
+
|
|
358
363
|
case 'vas_worksheets':
|
|
359
364
|
import('./pages/vas/vas-worksheet-list')
|
|
360
365
|
return page
|
|
@@ -484,6 +489,10 @@ export default function route(page) {
|
|
|
484
489
|
import('./pages/report/tote-loading-qc-report')
|
|
485
490
|
return page
|
|
486
491
|
|
|
492
|
+
case 'vas_report':
|
|
493
|
+
import('./pages/report/vas-report')
|
|
494
|
+
return page
|
|
495
|
+
|
|
487
496
|
/**
|
|
488
497
|
* Custom ELCCL Menus Section
|
|
489
498
|
*/
|
package/config.development.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
domainType: 'warehouse',
|
|
3
3
|
domainExtType: 'warehouse',
|
|
4
|
+
useVirtualHostBasedDomain: false,
|
|
4
5
|
fallbackRoute: '/',
|
|
5
6
|
subdomainOffset: 2,
|
|
7
|
+
port: 1100,
|
|
8
|
+
inspect: '9430',
|
|
6
9
|
ormconfig: {
|
|
7
10
|
name: 'default',
|
|
8
11
|
type: 'postgres',
|
|
9
|
-
database: '
|
|
12
|
+
database: 'dev2',
|
|
10
13
|
username: 'postgres',
|
|
11
14
|
password: 'hatio',
|
|
12
|
-
host: '192.168.0.
|
|
15
|
+
host: '192.168.0.161',
|
|
13
16
|
port: 15432,
|
|
14
|
-
synchronize:
|
|
15
|
-
logging:
|
|
17
|
+
synchronize: true,
|
|
18
|
+
logging: true
|
|
16
19
|
},
|
|
17
20
|
// ormconfig: {
|
|
18
21
|
// name: 'default',
|
|
@@ -23,35 +26,43 @@ module.exports = {
|
|
|
23
26
|
// host: 'operatov3.cluster-cijhm4n1hbst.ap-southeast-1.rds.amazonaws.com',
|
|
24
27
|
// port: 55432,
|
|
25
28
|
// synchronize: false,
|
|
26
|
-
// logging:
|
|
29
|
+
// logging: true
|
|
27
30
|
// },
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
fcm: {
|
|
31
|
-
serviceAccount: {
|
|
32
|
-
project_id: 'operato',
|
|
33
|
-
private_key:
|
|
34
|
-
'-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDYNOfyNjPMSeG9\nzU1qs0cpVK5cVfadcUaw5g+hkQZMOMlAA7uqW2eX4vkayj7MzbYUayH+sei8044Q\nJIyl6f26dNX1VT3UgTmSmCS0v48EBEZHCgusrUGFjduLRN6OS6uvrXW1xKA18k9q\nai1C2EHCXF2AE4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jyl6RIWbyTExEc84rVWfpQYAu3qIGOQKBgAFr\nXatEk7TdAtRNSPflTfu/rTAaSeKROjQBkvBiU8x4US1YpOBDBxUUyAtG8wKh5FHC\nfnsaGq+fM3KXJVv2R6J62mXQOfg4xyDLpWlwcBK4aSBBMoiBcsjouqSlZQlqMpdf\nZBgixqHe6U8BsFJg/6ZxC0y+e3AIss4Bo4/lb+1lAoGAFOexvaBh21K6W3inmRW4\nLlkVYJaBJ20OwokXg5aXjBiHxqmk7VLAuFbkpb5LOKH2xPILRQ0OEkn51yVymS3T\n9lLpHOFTQXt5tF2/F7NW7kaQJNlLr/h5jPi3O9XHeFmuaN2z150ZB6zzgjeGKzr8\ni+1fgTsRfDtNw8xkSH9qL1Y=\n-----END PRIVATE KEY-----\n',
|
|
35
|
-
client_email: 'firebase-adminsdk-xmm2e@operato.iam.gserviceaccount.com'
|
|
36
|
-
},
|
|
37
|
-
appConfig: {
|
|
38
|
-
apiKey: 'AIzaSyDdTM2BTLHSt2LNS0G5QB8G0i4KBXFiG7U',
|
|
39
|
-
projectId: 'operato',
|
|
40
|
-
messagingSenderId: 79537064975,
|
|
41
|
-
appId: '1:79537064975:web:32f53119e9c8c6ee2a277a'
|
|
42
|
-
},
|
|
43
|
-
serverKey:
|
|
44
|
-
'AAAAEoTHTA8:APA91bGwt-4HT82Dfwf_VwbQaKT0_qHd0Y3tuW41udjWz5Lz0Ko0mEMD6WbHHSILvQpa6yuoGGKCMsrU7VW2qWRrUm3CYpyG9oSwshNm1tIhljAnOuUfwHCoawbVLwf9qlWpHt4dwCoc'
|
|
45
|
-
},
|
|
46
|
-
vapidKey: {
|
|
47
|
-
subject: 'mailto:heartyoh@hatiolab.com',
|
|
48
|
-
publicKey: 'BAkVkITsCXBIsYL1yeaBmx5_dn57we-ZXMjirPPHzC2dan82cdEnAio_53PQ-1_w3ykWCBPrrFAWQ_d9N4cFF0o',
|
|
49
|
-
privateKey: '4pmlt3Wk019u7nqU3Q_oGZE6LbUDjjf8DpmAcn9-iss'
|
|
50
|
-
}
|
|
31
|
+
sellercraftIntegrationConfig: {
|
|
32
|
+
apiKey: 'Et0KqtLvA6e92bDvOywy9eCCud4hpAal8akpqI90'
|
|
51
33
|
},
|
|
52
|
-
port: 9001,
|
|
53
34
|
SECRET: '0xD58F835B69D207A76CC5F84a70a1D0d4C79dfC95',
|
|
54
|
-
|
|
35
|
+
password: {
|
|
36
|
+
lowerCase: true,
|
|
37
|
+
upperCase: false,
|
|
38
|
+
digit: false,
|
|
39
|
+
specialCharacter: false,
|
|
40
|
+
allowRepeat: true,
|
|
41
|
+
useTightPattern: false,
|
|
42
|
+
useLoosePattern: true,
|
|
43
|
+
tightCharacterLength: 4,
|
|
44
|
+
looseCharacterLength: 4,
|
|
45
|
+
history: 2
|
|
46
|
+
},
|
|
47
|
+
// storage: {
|
|
48
|
+
// type: 's3',
|
|
49
|
+
// accessKeyId: 'AKIAUQEOPWEJCDH6AR5H',
|
|
50
|
+
// secretAccessKey: 'AuDAgmODf9EJNB24OveRhTSLV/OJy6IFFoRxe8k2',
|
|
51
|
+
// bucketName: 'opa-one',
|
|
52
|
+
// region: 'ap-southeast-1'
|
|
53
|
+
// },
|
|
54
|
+
uploads: 'uploads',
|
|
55
|
+
attachmentsPath: 'attachments',
|
|
56
|
+
logger: {
|
|
57
|
+
file: {
|
|
58
|
+
filename: 'logs/application-%DATE%.log',
|
|
59
|
+
datePattern: 'YYYY-MM-DD-HH',
|
|
60
|
+
zippedArchive: true,
|
|
61
|
+
maxSize: '200m',
|
|
62
|
+
maxFiles: '1m',
|
|
63
|
+
level: 'info'
|
|
64
|
+
}
|
|
65
|
+
},
|
|
55
66
|
email: {
|
|
56
67
|
host: 'smtp.office365.com',
|
|
57
68
|
port: 587,
|
|
@@ -63,62 +74,32 @@ module.exports = {
|
|
|
63
74
|
secureConnection: false,
|
|
64
75
|
tls: {
|
|
65
76
|
ciphers: 'SSLv3'
|
|
66
|
-
}
|
|
67
|
-
sender: 'no-reply@hatiolab.com'
|
|
68
|
-
},
|
|
69
|
-
// marketplaceIntegrationShopee: {
|
|
70
|
-
// platform: 'shopee',
|
|
71
|
-
// isUAT: false,
|
|
72
|
-
// application: 'Operato MMS V2 Live',
|
|
73
|
-
// partnerId: 2004140,
|
|
74
|
-
// partnerKey: '825dcae5af73426f887bc8b1ddb5b494b70e0057b50b77298f85350273017bd2',
|
|
75
|
-
// v2: true
|
|
76
|
-
// },
|
|
77
|
-
marketplaceIntegrationShopee: {
|
|
78
|
-
platform: 'shopee',
|
|
79
|
-
isUAT: false,
|
|
80
|
-
application: 'Operato MMS',
|
|
81
|
-
partnerId: 846025,
|
|
82
|
-
partnerKey: 'd34cfd85a603f196a0d74ebe08043280c1a27788bb36bdffd61e7e0bb1c90b64',
|
|
83
|
-
v2: true
|
|
84
|
-
},
|
|
85
|
-
// marketplaceIntegrationShopee: {
|
|
86
|
-
// platform: 'shopee',
|
|
87
|
-
// isUAT: true,
|
|
88
|
-
// application: 'Staging MMS',
|
|
89
|
-
// partnerId: 845525,
|
|
90
|
-
// partnerKey: '4a3f4214fd0f0bda970b342a99b6f8705fc7bacad2743cffa7ed67b79840665e'
|
|
91
|
-
// },
|
|
92
|
-
marketplaceIntegrationLazada: {
|
|
93
|
-
platform: 'lazada',
|
|
94
|
-
application: 'operato-mms',
|
|
95
|
-
appKey: '120961',
|
|
96
|
-
appSecret: 'HB3RTNEXHlVSlBr9SmWF8AjbSUT7a825',
|
|
97
|
-
callback: 'https://maybank.operato-m.com/lazada-callback'
|
|
98
|
-
},
|
|
99
|
-
inspect: 9330,
|
|
100
|
-
attachment: 'attachments',
|
|
101
|
-
sellercraftIntegrationConfig: {
|
|
102
|
-
apiKey: 'Et0KqtLvA6e92bDvOywy9eCCud4hpAal8akpqI90'
|
|
77
|
+
}
|
|
103
78
|
},
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
79
|
+
sender: 'no-reply@hatiolab.com',
|
|
80
|
+
notification: {
|
|
81
|
+
// fcm: {
|
|
82
|
+
// serviceAccount: {
|
|
83
|
+
// project_id: 'operato',
|
|
84
|
+
// private_key:
|
|
85
|
+
// '-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDYNOfyNjPMSeG9\nzU1qs0cpVK5cVfadcUaw5g+hkQZMOMlAA7uqW2eX4vkayj7MzbYUayH+sei8044Q\nJIyl6f26dNX1VT3UgTmSmCS0v48EBEZHCgusrUGFjduLRN6OS6uvrXW1xKA18k9q\nai1C2EHCXF2AE4PTvf239RC1UIOnVePcMtT7rMTdHRO4s8OKVuSDbzIt8k1cV3Zt\nES0YsJlkELqBisYpV//2/ZSILTt39J9JzrVef03X9kkoo9p+YnNyy6tWsfQPfgJO\nybiRGBNxiyJ/E2pxRo/WqU0go9OzYJlGaSUrUx09heNiRD1b0MAOmyPDJz/6AaTk\nkU/A+kLzAgMBAAECggEADQ5s2gtR53VSujk1V/Xe8e0Di99DwaWUj5w6YhcK7/wX\nPdQRN4Fw6RLeLjL7xeG/rCNSwzm6hKSrQJL5zLnWW7XbMdyQRk6jdmnVAEv3zACi\nFH9+eFK3e+Q214XfgWz/v4p/FZdRLCYni5VBNHcwyWxLLS/V1ynzB3KM1sDiTRmI\npcT7+uTtwrKgJq64sXtFE2pYrFxDdCiyqzkhv/2ed4YIowAjpKBbbcCDKeVxVkoz\nC1P4PAzs9EeUuKSWYrWaUjN17lqtRlYeT1ylR1PIJuWqd4cKfgoEgz+lHwRPDCEX\nAYbk3nofiJIPBhSfCHrXS755wK48mY8vMwFdfCPJeQKBgQDsz4tjYTHdat5A25n5\nekwMxZwFQ5OvMV4eulwZUDMypTAYSz1iB6sDlgwKDm5omZIfuneqCEIvrqxV/kx3\n5wV/DANHO3hYxdp/NV7rM23xmqlaKZhHQbDono1Fm/LP6DEmJiD7N2eFKsXYcPpR\nSAIdCv0X3zkDQ4zRi51yJlCXzQKBgQDpufJBxCoXngiQJ2j14lWVAeOOdQ6zh5Ip\nBcDwF0X67cNSN3Wl40bS4yLFdolhEAyj5m0WPuYYXpjzhHhZ0W3V3ItdBkrmwIvy\nWOWu26qN0ZbwxVS2qVpHuj6iHWJKHuDZZUkFtJg3BeeBSOUHSA8TvjnA0xd83xeb\n8ZJasWoFvwKBgQDFs/gQ/gIdcq0exLfluh5nw0qgcmyHpNWJHdjqITS9IX/nqFkU\n0IYLtmdStf2jQiLmbkydHcvz9wZVvLqml67VBHhwLcwpgPULoskd34/4V0Dvzy4c\nv1Esw8H5zVqIDLeLu+VpFjZMzQrjyl6RIWbyTExEc84rVWfpQYAu3qIGOQKBgAFr\nXatEk7TdAtRNSPflTfu/rTAaSeKROjQBkvBiU8x4US1YpOBDBxUUyAtG8wKh5FHC\nfnsaGq+fM3KXJVv2R6J62mXQOfg4xyDLpWlwcBK4aSBBMoiBcsjouqSlZQlqMpdf\nZBgixqHe6U8BsFJg/6ZxC0y+e3AIss4Bo4/lb+1lAoGAFOexvaBh21K6W3inmRW4\nLlkVYJaBJ20OwokXg5aXjBiHxqmk7VLAuFbkpb5LOKH2xPILRQ0OEkn51yVymS3T\n9lLpHOFTQXt5tF2/F7NW7kaQJNlLr/h5jPi3O9XHeFmuaN2z150ZB6zzgjeGKzr8\ni+1fgTsRfDtNw8xkSH9qL1Y=\n-----END PRIVATE KEY-----\n',
|
|
86
|
+
// client_email: 'firebase-adminsdk-xmm2e@operato.iam.gserviceaccount.com'
|
|
87
|
+
// },
|
|
88
|
+
// appConfig: {
|
|
89
|
+
// apiKey: 'AIzaSyDdTM2BTLHSt2LNS0G5QB8G0i4KBXFiG7U',
|
|
90
|
+
// projectId: 'operato',
|
|
91
|
+
// messagingSenderId: 79537064975,
|
|
92
|
+
// appId: '1:79537064975:web:32f53119e9c8c6ee2a277a'
|
|
93
|
+
// },
|
|
94
|
+
// serverKey:
|
|
95
|
+
// 'AAAAEoTHTA8:APA91bGwt-4HT82Dfwf_VwbQaKT0_qHd0Y3tuW41udjWz5Lz0Ko0mEMD6WbHHSILvQpa6yuoGGKCMsrU7VW2qWRrUm3CYpyG9oSwshNm1tIhljAnOuUfwHCoawbVLwf9qlWpHt4dwCoc'
|
|
96
|
+
// },
|
|
97
|
+
// vapidKey: {
|
|
98
|
+
// subject: 'mailto:heartyoh@hatiolab.com',
|
|
99
|
+
// publicKey: 'BAkVkITsCXBIsYL1yeaBmx5_dn57we-ZXMjirPPHzC2dan82cdEnAio_53PQ-1_w3ykWCBPrrFAWQ_d9N4cFF0o',
|
|
100
|
+
// privateKey: '4pmlt3Wk019u7nqU3Q_oGZE6LbUDjjf8DpmAcn9-iss'
|
|
101
|
+
// }
|
|
110
102
|
},
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
accessKeyId: 'AKIAUQEOPWEJKL43OMZA',
|
|
114
|
-
secretAccessKey: 'OG2qS0Usg4wyjPWbfv1ahPZzP80/w8z4i8MYHl+e',
|
|
115
|
-
configuration: {
|
|
116
|
-
retryAttempt: 0,
|
|
117
|
-
timeout: 0,
|
|
118
|
-
exponential_rate: 1.5,
|
|
119
|
-
interval: 1,
|
|
120
|
-
actualTimeout: 0,
|
|
121
|
-
maxRetry: 30
|
|
122
|
-
}
|
|
123
|
-
}
|
|
103
|
+
// reportApiUrl: 'localhost:8888/rest/report/show_html'
|
|
104
|
+
reportApiUrl: 'http://192.168.0.153:8888/rest/report/show_html'
|
|
124
105
|
}
|
|
@@ -9,5 +9,6 @@ const outbound_order_details_report_1 = require("./outbound-order-details-report
|
|
|
9
9
|
const product_label_report_1 = require("./product-label-report");
|
|
10
10
|
const release_inventory_report_1 = require("./release-inventory-report");
|
|
11
11
|
const tote_loading_qc_report_1 = require("./tote-loading-qc-report");
|
|
12
|
-
|
|
12
|
+
const vas_report_1 = require("./vas-report");
|
|
13
|
+
exports.Query = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, inbound_serial_number_report_1.inboundSerialNumberReport), outbound_serial_number_report_1.outboundSerialNumberReport), costing_report_1.costingReport), inbound_order_details_report_1.inboundOrderDetailsReport), outbound_order_details_report_1.outboundOrderDetailsReport), product_label_report_1.productLabelReport), release_inventory_report_1.releaseInventoryReport), tote_loading_qc_report_1.loadingQcReport), vas_report_1.vasReport);
|
|
13
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/index.ts"],"names":[],"mappings":";;;AAAA,iFAA0E;AAC1E,mFAA4E;AAE5E,qDAAgD;AAChD,iFAA0E;AAC1E,mFAA4E;AAC5E,iEAA2D;AAC3D,yEAAmE;AACnE,qEAA0D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/index.ts"],"names":[],"mappings":";;;AAAA,iFAA0E;AAC1E,mFAA4E;AAE5E,qDAAgD;AAChD,iFAA0E;AAC1E,mFAA4E;AAC5E,iEAA2D;AAC3D,yEAAmE;AACnE,qEAA0D;AAC1D,6CAAwC;AAE3B,QAAA,KAAK,qIACb,wDAAyB,GACzB,0DAA0B,GAC1B,8BAAa,GACb,wDAAyB,GACzB,0DAA0B,GAC1B,yCAAkB,GAClB,iDAAsB,GACtB,wCAAe,GACf,sBAAS,EACb"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.vasReport = void 0;
|
|
4
|
+
const biz_base_1 = require("@things-factory/biz-base");
|
|
5
|
+
const utils_1 = require("../../../utils");
|
|
6
|
+
exports.vasReport = {
|
|
7
|
+
async vasReport(_, params, context) {
|
|
8
|
+
try {
|
|
9
|
+
const { tx } = context.state;
|
|
10
|
+
let bizplaceFilter = params.filters.find(data => data.name === 'bizplace');
|
|
11
|
+
let productInfo = params.filters.find(data => data.name === 'productInfo');
|
|
12
|
+
let orderNo = params.filters.find(data => data.name === 'orderNo');
|
|
13
|
+
let fromDate = params.filters.find(data => data.name === 'fromDate');
|
|
14
|
+
let toDate = params.filters.find(data => data.name === 'toDate');
|
|
15
|
+
if (!bizplaceFilter) {
|
|
16
|
+
throw 'Invalid input';
|
|
17
|
+
}
|
|
18
|
+
const bizplace = await tx.getRepository(biz_base_1.Bizplace).findOne({
|
|
19
|
+
id: bizplaceFilter.value
|
|
20
|
+
});
|
|
21
|
+
await (0, utils_1.rawProductsQuery)(tx, params, bizplace);
|
|
22
|
+
let extraQueryFilter = '';
|
|
23
|
+
if (productInfo) {
|
|
24
|
+
extraQueryFilter = `${extraQueryFilter} and old_product_name like '%${productInfo.value}%'
|
|
25
|
+
or sku like '%${productInfo.value}%'
|
|
26
|
+
or old_p_description like '%${productInfo.value}%'
|
|
27
|
+
or old_p_brand like '%${productInfo.value}%'
|
|
28
|
+
or old_p_brand_sku like '%${productInfo.value}%'
|
|
29
|
+
or new_product_name like '%${productInfo.value}%'
|
|
30
|
+
or new_sku like '%${productInfo.value}%'
|
|
31
|
+
or new_p_description like '%${productInfo.value}%'
|
|
32
|
+
or new_p_brand like '%${productInfo.value}%'
|
|
33
|
+
or new_p_brand_sku like '%${productInfo.value}%' `;
|
|
34
|
+
}
|
|
35
|
+
if (orderNo) {
|
|
36
|
+
extraQueryFilter = `${extraQueryFilter} and order_no like '%${orderNo.value}%' `;
|
|
37
|
+
}
|
|
38
|
+
if (fromDate) {
|
|
39
|
+
extraQueryFilter = `${extraQueryFilter} and w.ended_at >= '%${fromDate.value}%' `;
|
|
40
|
+
}
|
|
41
|
+
if (toDate) {
|
|
42
|
+
extraQueryFilter = `${extraQueryFilter} and w.ended_at <= '%${toDate.value}%' `;
|
|
43
|
+
}
|
|
44
|
+
await tx.query(`
|
|
45
|
+
create temp table temp_vas_order_report on commit drop as (
|
|
46
|
+
select * from (
|
|
47
|
+
select distinct b.name as "company", rg.name as "order_no", rg.ref_no as "ref_no", p1.sku as "sku", ov.batch_id as "batch_no", ov.packing_type as "packing_type", ov.uom as "uom", ov.uom_value as "uom_value", oi.release_qty as "release_qty",
|
|
48
|
+
v.name as "vas", ovi.vas_qty as "vas_qty", p2.sku as "new_sku", ov.new_packing_type as "new_packing_type", ov.new_uom as "new_uom", ov.output_qty as "output_qty", ov.new_uom_value as "new_uom_value", w.ended_at as "completion_date",
|
|
49
|
+
p1.name as "old_product_name", p1.description as "old_p_description", p1.brand as "old_p_brand", p1.brand_sku as "old_p_brand_sku",
|
|
50
|
+
p2.name as "new_product_name", p2.description as "new_p_description", p2.brand as "new_p_brand", p2.brand_sku as "new_p_brand_sku"
|
|
51
|
+
from order_vass ov
|
|
52
|
+
left join bizplaces b on ov.bizplace_id = b.id
|
|
53
|
+
inner join release_goods rg on ov.release_good_id = rg.id
|
|
54
|
+
inner join products p1 on ov.product_id = p1.id
|
|
55
|
+
left join order_inventories oi on ov.release_good_id = oi.release_good_id
|
|
56
|
+
inner join order_vas_items ovi on ov.id = ovi.order_vas_id
|
|
57
|
+
inner join vass v on ovi.vas_id = v.id
|
|
58
|
+
left join products p2 on ov.new_product_id = p2.id
|
|
59
|
+
inner join worksheets w on ov.release_good_id = w.release_good_id
|
|
60
|
+
where b.id = $1 and w.type = 'VAS' and oi.status <> 'TERMINATED' and oi.status <> 'CANCELLED'
|
|
61
|
+
) src
|
|
62
|
+
where 1=1
|
|
63
|
+
${extraQueryFilter}
|
|
64
|
+
)
|
|
65
|
+
`, [bizplace.id]);
|
|
66
|
+
const total = await tx.query(`
|
|
67
|
+
select count(*) from temp_vas_order_report
|
|
68
|
+
`);
|
|
69
|
+
const result = await tx.query(`
|
|
70
|
+
select * from temp_vas_order_report
|
|
71
|
+
offset $1 limit $2
|
|
72
|
+
`, [(params.pagination.page - 1) * params.pagination.limit, params.pagination.limit]);
|
|
73
|
+
let items = result.map(item => {
|
|
74
|
+
let data = {
|
|
75
|
+
bizplace: {
|
|
76
|
+
name: item.company,
|
|
77
|
+
description: item.bizplace_description
|
|
78
|
+
},
|
|
79
|
+
releaseGood: {
|
|
80
|
+
name: item.order_no,
|
|
81
|
+
refNo: item.ref_no
|
|
82
|
+
},
|
|
83
|
+
orderVas: {
|
|
84
|
+
batchId: item.batch_no,
|
|
85
|
+
packingType: item.packing_type,
|
|
86
|
+
uom: item.uom,
|
|
87
|
+
uomValue: item.uom_value,
|
|
88
|
+
newPackingType: item.new_packing_type,
|
|
89
|
+
newUom: item.new_uom,
|
|
90
|
+
newUomValue: item.new_uom_value,
|
|
91
|
+
outputQty: item.output_qty,
|
|
92
|
+
product: { sku: item.sku },
|
|
93
|
+
newProduct: { sku: item.new_sku }
|
|
94
|
+
},
|
|
95
|
+
orderVasItem: {
|
|
96
|
+
vas: { name: item.vas },
|
|
97
|
+
vasQty: item.vas_qty
|
|
98
|
+
},
|
|
99
|
+
orderInventory: {
|
|
100
|
+
releaseQty: item.release_qty
|
|
101
|
+
},
|
|
102
|
+
worksheet: {
|
|
103
|
+
endedAt: item.completion_date
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
return data;
|
|
107
|
+
});
|
|
108
|
+
return {
|
|
109
|
+
items,
|
|
110
|
+
total: total[0].count
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
throw error;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=vas-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/vas-report.ts"],"names":[],"mappings":";;;AAEA,uDAAmD;AAGnD,0CAAiD;AAEpC,QAAA,SAAS,GAAG;IACvB,KAAK,CAAC,SAAS,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACrD,IAAI;YACF,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YACnD,IAAI,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAA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wBACrC,MAAM,EAAE,IAAI,CAAC,OAAO;wBACpB,WAAW,EAAE,IAAI,CAAC,aAAa;wBAC/B,SAAS,EAAE,IAAI,CAAC,UAAU;wBAC1B,OAAO,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE;wBAC1B,UAAU,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,EAAE;qBAClC;oBACD,YAAY,EAAE;wBACZ,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE;wBACvB,MAAM,EAAE,IAAI,CAAC,OAAO;qBACrB;oBACD,cAAc,EAAE;wBACd,UAAU,EAAE,IAAI,CAAC,WAAW;qBAC7B;oBACD,SAAS,EAAE;wBACT,OAAO,EAAE,IAAI,CAAC,eAAe;qBAC9B;iBACF,CAAA;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CAAC,CAAA;YAEF,OAAO;gBACL,KAAK;gBACL,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK;aACtB,CAAA;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
|
|
@@ -17,6 +17,8 @@ const release_inventory_report_1 = require("./release-inventory-report");
|
|
|
17
17
|
const release_inventory_report_list_1 = require("./release-inventory-report-list");
|
|
18
18
|
const loading_qc_report_1 = require("./loading-qc-report");
|
|
19
19
|
const loading_qc_report_list_1 = require("./loading-qc-report-list");
|
|
20
|
+
const vas_report_1 = require("./vas-report");
|
|
21
|
+
const vas_report_list_1 = require("./vas-report-list");
|
|
20
22
|
exports.Query = `
|
|
21
23
|
inboundSerialNumberReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): InboundSerialNumberReportList @transaction
|
|
22
24
|
outboundSerialNumberReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): OutboundSerialNumberReportList @transaction
|
|
@@ -26,6 +28,7 @@ exports.Query = `
|
|
|
26
28
|
costingReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): CostingReportList @transaction
|
|
27
29
|
releaseInventoryReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): ReleaseInventoryReportList @transaction
|
|
28
30
|
loadingQcReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): [LoadingQcReport] @transaction
|
|
31
|
+
vasReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): VasReportList @transaction
|
|
29
32
|
`;
|
|
30
33
|
exports.Types = [
|
|
31
34
|
inbound_serial_number_report_1.InboundSerialNumberReport,
|
|
@@ -43,6 +46,8 @@ exports.Types = [
|
|
|
43
46
|
release_inventory_report_1.ReleaseInventoryReport,
|
|
44
47
|
release_inventory_report_list_1.ReleaseInventoryReportList,
|
|
45
48
|
loading_qc_report_1.LoadingQcReport,
|
|
46
|
-
loading_qc_report_list_1.LoadingQcReportList
|
|
49
|
+
loading_qc_report_list_1.LoadingQcReportList,
|
|
50
|
+
vas_report_1.VasReport,
|
|
51
|
+
vas_report_list_1.VasReportList
|
|
47
52
|
];
|
|
48
53
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/index.ts"],"names":[],"mappings":";;;AAAA,iFAA0E;AAC1E,2FAAmF;AACnF,mFAA4E;AAC5E,6FAAqF;AAErF,iFAA0E;AAC1E,2FAAmF;AACnF,mFAA4E;AAC5E,6FAAqF;AACrF,iEAA2D;AAC3D,2EAAoE;AAEpE,qDAAgD;AAChD,+DAAyD;AACzD,yEAAmE;AACnE,mFAA4E;AAC5E,2DAAqD;AACrD,qEAA8D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/index.ts"],"names":[],"mappings":";;;AAAA,iFAA0E;AAC1E,2FAAmF;AACnF,mFAA4E;AAC5E,6FAAqF;AAErF,iFAA0E;AAC1E,2FAAmF;AACnF,mFAA4E;AAC5E,6FAAqF;AACrF,iEAA2D;AAC3D,2EAAoE;AAEpE,qDAAgD;AAChD,+DAAyD;AACzD,yEAAmE;AACnE,mFAA4E;AAC5E,2DAAqD;AACrD,qEAA8D;AAE9D,6CAAwC;AACxC,uDAAiD;AAEpC,QAAA,KAAK,GAAG;;;;;;;;;;CAUpB,CAAA;AAEY,QAAA,KAAK,GAAG;IACnB,wDAAyB;IACzB,iEAA6B;IAC7B,0DAA0B;IAC1B,mEAA8B;IAC9B,wDAAyB;IACzB,iEAA6B;IAC7B,0DAA0B;IAC1B,mEAA8B;IAC9B,yCAAkB;IAClB,kDAAsB;IACtB,8BAAa;IACb,uCAAiB;IACjB,iDAAsB;IACtB,0DAA0B;IAC1B,mCAAe;IACf,4CAAmB;IACnB,sBAAS;IACT,+BAAa;CACd,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.VasReportList = void 0;
|
|
7
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
+
exports.VasReportList = (0, graphql_tag_1.default) `
|
|
9
|
+
type VasReportList {
|
|
10
|
+
items: [VasReport]
|
|
11
|
+
total: Int
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
//# sourceMappingURL=vas-report-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-report-list.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/vas-report-list.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,aAAa,GAAG,IAAA,qBAAG,EAAA;;;;;CAK/B,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.VasReport = void 0;
|
|
7
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
+
exports.VasReport = (0, graphql_tag_1.default) `
|
|
9
|
+
type VasReport {
|
|
10
|
+
bizplace: Bizplace
|
|
11
|
+
releaseGood: ReleaseGood
|
|
12
|
+
orderVas: OrderVas
|
|
13
|
+
orderVasItem: OrderVasItem
|
|
14
|
+
orderInventory: OrderInventory
|
|
15
|
+
worksheet: Worksheet
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
//# sourceMappingURL=vas-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-report.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/vas-report.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,SAAS,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;CAS3B,CAAA"}
|
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.241",
|
|
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.237",
|
|
92
92
|
"@things-factory/product-base": "^4.3.237",
|
|
93
93
|
"@things-factory/resource-ui": "^4.3.239",
|
|
94
|
-
"@things-factory/sales-ui": "^4.3.
|
|
94
|
+
"@things-factory/sales-ui": "^4.3.241",
|
|
95
95
|
"@things-factory/scene-data-transform": "^4.3.237",
|
|
96
96
|
"@things-factory/scene-excel": "^4.3.237",
|
|
97
97
|
"@things-factory/scene-firebase": "^4.3.227",
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
"@things-factory/system-ui": "^4.3.237",
|
|
108
108
|
"@things-factory/transport-base": "^4.3.237",
|
|
109
109
|
"@things-factory/tutorial-ui": "^4.3.237",
|
|
110
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
111
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
110
|
+
"@things-factory/warehouse-base": "^4.3.241",
|
|
111
|
+
"@things-factory/worksheet-base": "^4.3.241"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@things-factory/builder": "^4.3.227",
|
|
@@ -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": "507fce6438f95509d660bc61cd1ddc615c868ee3"
|
|
121
121
|
}
|
|
@@ -7,6 +7,7 @@ import { outboundOrderDetailsReport } from './outbound-order-details-report'
|
|
|
7
7
|
import { productLabelReport } from './product-label-report'
|
|
8
8
|
import { releaseInventoryReport } from './release-inventory-report'
|
|
9
9
|
import { loadingQcReport } from './tote-loading-qc-report'
|
|
10
|
+
import { vasReport } from './vas-report'
|
|
10
11
|
|
|
11
12
|
export const Query = {
|
|
12
13
|
...inboundSerialNumberReport,
|
|
@@ -16,5 +17,6 @@ export const Query = {
|
|
|
16
17
|
...outboundOrderDetailsReport,
|
|
17
18
|
...productLabelReport,
|
|
18
19
|
...releaseInventoryReport,
|
|
19
|
-
...loadingQcReport
|
|
20
|
+
...loadingQcReport,
|
|
21
|
+
...vasReport
|
|
20
22
|
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { EntityManager } from 'typeorm'
|
|
2
|
+
|
|
3
|
+
import { Bizplace } from '@things-factory/biz-base'
|
|
4
|
+
import { ListParam } from '@things-factory/shell'
|
|
5
|
+
|
|
6
|
+
import { rawProductsQuery } from '../../../utils'
|
|
7
|
+
|
|
8
|
+
export const vasReport = {
|
|
9
|
+
async vasReport(_: any, params: ListParam, context: any) {
|
|
10
|
+
try {
|
|
11
|
+
const { tx }: { tx: EntityManager } = context.state
|
|
12
|
+
let bizplaceFilter = params.filters.find(data => data.name === 'bizplace')
|
|
13
|
+
let productInfo = params.filters.find(data => data.name === 'productInfo')
|
|
14
|
+
let orderNo = params.filters.find(data => data.name === 'orderNo')
|
|
15
|
+
let fromDate = params.filters.find(data => data.name === 'fromDate')
|
|
16
|
+
let toDate = params.filters.find(data => data.name === 'toDate')
|
|
17
|
+
|
|
18
|
+
if (!bizplaceFilter) { throw 'Invalid input' }
|
|
19
|
+
|
|
20
|
+
const bizplace: Bizplace = await tx.getRepository(Bizplace).findOne({
|
|
21
|
+
id: bizplaceFilter.value
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
await rawProductsQuery(tx, params, bizplace)
|
|
25
|
+
|
|
26
|
+
let extraQueryFilter = ''
|
|
27
|
+
if (productInfo) {
|
|
28
|
+
extraQueryFilter = `${extraQueryFilter} and old_product_name like '%${productInfo.value}%'
|
|
29
|
+
or sku like '%${productInfo.value}%'
|
|
30
|
+
or old_p_description like '%${productInfo.value}%'
|
|
31
|
+
or old_p_brand like '%${productInfo.value}%'
|
|
32
|
+
or old_p_brand_sku like '%${productInfo.value}%'
|
|
33
|
+
or new_product_name like '%${productInfo.value}%'
|
|
34
|
+
or new_sku like '%${productInfo.value}%'
|
|
35
|
+
or new_p_description like '%${productInfo.value}%'
|
|
36
|
+
or new_p_brand like '%${productInfo.value}%'
|
|
37
|
+
or new_p_brand_sku like '%${productInfo.value}%' `
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (orderNo) {
|
|
41
|
+
extraQueryFilter = `${extraQueryFilter} and order_no like '%${orderNo.value}%' `
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (fromDate) {
|
|
45
|
+
extraQueryFilter = `${extraQueryFilter} and w.ended_at >= '%${fromDate.value}%' `
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (toDate) {
|
|
49
|
+
extraQueryFilter = `${extraQueryFilter} and w.ended_at <= '%${toDate.value}%' `
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
await tx.query(
|
|
53
|
+
`
|
|
54
|
+
create temp table temp_vas_order_report on commit drop as (
|
|
55
|
+
select * from (
|
|
56
|
+
select distinct b.name as "company", rg.name as "order_no", rg.ref_no as "ref_no", p1.sku as "sku", ov.batch_id as "batch_no", ov.packing_type as "packing_type", ov.uom as "uom", ov.uom_value as "uom_value", oi.release_qty as "release_qty",
|
|
57
|
+
v.name as "vas", ovi.vas_qty as "vas_qty", p2.sku as "new_sku", ov.new_packing_type as "new_packing_type", ov.new_uom as "new_uom", ov.output_qty as "output_qty", ov.new_uom_value as "new_uom_value", w.ended_at as "completion_date",
|
|
58
|
+
p1.name as "old_product_name", p1.description as "old_p_description", p1.brand as "old_p_brand", p1.brand_sku as "old_p_brand_sku",
|
|
59
|
+
p2.name as "new_product_name", p2.description as "new_p_description", p2.brand as "new_p_brand", p2.brand_sku as "new_p_brand_sku"
|
|
60
|
+
from order_vass ov
|
|
61
|
+
left join bizplaces b on ov.bizplace_id = b.id
|
|
62
|
+
inner join release_goods rg on ov.release_good_id = rg.id
|
|
63
|
+
inner join products p1 on ov.product_id = p1.id
|
|
64
|
+
left join order_inventories oi on ov.release_good_id = oi.release_good_id
|
|
65
|
+
inner join order_vas_items ovi on ov.id = ovi.order_vas_id
|
|
66
|
+
inner join vass v on ovi.vas_id = v.id
|
|
67
|
+
left join products p2 on ov.new_product_id = p2.id
|
|
68
|
+
inner join worksheets w on ov.release_good_id = w.release_good_id
|
|
69
|
+
where b.id = $1 and w.type = 'VAS' and oi.status <> 'TERMINATED' and oi.status <> 'CANCELLED'
|
|
70
|
+
) src
|
|
71
|
+
where 1=1
|
|
72
|
+
${extraQueryFilter}
|
|
73
|
+
)
|
|
74
|
+
`,
|
|
75
|
+
[bizplace.id]
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
const total: any = await tx.query(`
|
|
79
|
+
select count(*) from temp_vas_order_report
|
|
80
|
+
`)
|
|
81
|
+
|
|
82
|
+
const result: any = await tx.query(
|
|
83
|
+
`
|
|
84
|
+
select * from temp_vas_order_report
|
|
85
|
+
offset $1 limit $2
|
|
86
|
+
`,
|
|
87
|
+
[(params.pagination.page - 1) * params.pagination.limit, params.pagination.limit]
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
let items = result.map(item => {
|
|
91
|
+
let data = {
|
|
92
|
+
bizplace: {
|
|
93
|
+
name: item.company,
|
|
94
|
+
description: item.bizplace_description
|
|
95
|
+
},
|
|
96
|
+
releaseGood: {
|
|
97
|
+
name: item.order_no,
|
|
98
|
+
refNo: item.ref_no
|
|
99
|
+
},
|
|
100
|
+
orderVas: {
|
|
101
|
+
batchId: item.batch_no,
|
|
102
|
+
packingType: item.packing_type,
|
|
103
|
+
uom: item.uom,
|
|
104
|
+
uomValue: item.uom_value,
|
|
105
|
+
newPackingType: item.new_packing_type,
|
|
106
|
+
newUom: item.new_uom,
|
|
107
|
+
newUomValue: item.new_uom_value,
|
|
108
|
+
outputQty: item.output_qty,
|
|
109
|
+
product: { sku: item.sku },
|
|
110
|
+
newProduct: { sku: item.new_sku }
|
|
111
|
+
},
|
|
112
|
+
orderVasItem: {
|
|
113
|
+
vas: { name: item.vas },
|
|
114
|
+
vasQty: item.vas_qty
|
|
115
|
+
},
|
|
116
|
+
orderInventory: {
|
|
117
|
+
releaseQty: item.release_qty
|
|
118
|
+
},
|
|
119
|
+
worksheet: {
|
|
120
|
+
endedAt: item.completion_date
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return data
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
return {
|
|
128
|
+
items,
|
|
129
|
+
total: total[0].count
|
|
130
|
+
}
|
|
131
|
+
} catch (error) {
|
|
132
|
+
throw error
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -17,6 +17,9 @@ import { ReleaseInventoryReportList } from './release-inventory-report-list'
|
|
|
17
17
|
import { LoadingQcReport } from './loading-qc-report'
|
|
18
18
|
import { LoadingQcReportList } from './loading-qc-report-list'
|
|
19
19
|
|
|
20
|
+
import { VasReport } from './vas-report'
|
|
21
|
+
import { VasReportList } from './vas-report-list'
|
|
22
|
+
|
|
20
23
|
export const Query = `
|
|
21
24
|
inboundSerialNumberReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): InboundSerialNumberReportList @transaction
|
|
22
25
|
outboundSerialNumberReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): OutboundSerialNumberReportList @transaction
|
|
@@ -26,6 +29,7 @@ export const Query = `
|
|
|
26
29
|
costingReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): CostingReportList @transaction
|
|
27
30
|
releaseInventoryReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): ReleaseInventoryReportList @transaction
|
|
28
31
|
loadingQcReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): [LoadingQcReport] @transaction
|
|
32
|
+
vasReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): VasReportList @transaction
|
|
29
33
|
`
|
|
30
34
|
|
|
31
35
|
export const Types = [
|
|
@@ -44,5 +48,7 @@ export const Types = [
|
|
|
44
48
|
ReleaseInventoryReport,
|
|
45
49
|
ReleaseInventoryReportList,
|
|
46
50
|
LoadingQcReport,
|
|
47
|
-
LoadingQcReportList
|
|
51
|
+
LoadingQcReportList,
|
|
52
|
+
VasReport,
|
|
53
|
+
VasReportList
|
|
48
54
|
]
|