@things-factory/worksheet-base 4.3.258 → 4.3.262
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/dist-server/controllers/vas/vas-worksheet-controller.js +115 -0
- package/dist-server/controllers/vas/vas-worksheet-controller.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/confirm-cancellation-release-order.js +16 -1
- package/dist-server/graphql/resolvers/worksheet/confirm-cancellation-release-order.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/reject-cancellation-release-order.js +111 -57
- package/dist-server/graphql/resolvers/worksheet/reject-cancellation-release-order.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/vas/edit-vas.js +16 -0
- package/dist-server/graphql/resolvers/worksheet/vas/edit-vas.js.map +1 -0
- package/dist-server/graphql/resolvers/worksheet/vas/index.js +2 -1
- package/dist-server/graphql/resolvers/worksheet/vas/index.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet-detail/generate-pallet-id.js +3 -1
- package/dist-server/graphql/resolvers/worksheet-detail/generate-pallet-id.js.map +1 -1
- package/dist-server/graphql/types/worksheet/index.js +6 -0
- package/dist-server/graphql/types/worksheet/index.js.map +1 -1
- package/dist-server/utils/lmd-util.js +5 -5
- package/dist-server/utils/lmd-util.js.map +1 -1
- package/package.json +13 -13
- package/server/controllers/vas/vas-worksheet-controller.ts +163 -0
- package/server/graphql/resolvers/worksheet/confirm-cancellation-release-order.ts +18 -1
- package/server/graphql/resolvers/worksheet/reject-cancellation-release-order.ts +138 -71
- package/server/graphql/resolvers/worksheet/vas/edit-vas.ts +25 -0
- package/server/graphql/resolvers/worksheet/vas/index.ts +2 -0
- package/server/graphql/resolvers/worksheet-detail/generate-pallet-id.ts +5 -1
- package/server/graphql/types/worksheet/index.ts +6 -0
- package/server/utils/lmd-util.ts +5 -5
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { User } from '@things-factory/auth-base'
|
|
2
|
+
import { Domain } from '@things-factory/shell'
|
|
3
|
+
import { EntityManager } from 'typeorm'
|
|
4
|
+
import { VasWorksheetController } from '../../../../controllers'
|
|
5
|
+
import { WorksheetDetail } from '../../../../entities'
|
|
6
|
+
import { OrderVasPatch, OrderVasItemPatch } from '@things-factory/sales-base'
|
|
7
|
+
|
|
8
|
+
export const editVasResolver = {
|
|
9
|
+
async editVas(_: any, { orderVasPatch, orderVasItemPatch, orderNo }, context: any) {
|
|
10
|
+
const { tx, domain, user }: { tx: EntityManager; domain: Domain; user: User } = context.state
|
|
11
|
+
return await editVas(tx, domain, user, orderVasPatch, orderVasItemPatch, orderNo)
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export async function editVas(
|
|
16
|
+
tx: EntityManager,
|
|
17
|
+
domain: Domain,
|
|
18
|
+
user: User,
|
|
19
|
+
orderVasPatch: OrderVasPatch[],
|
|
20
|
+
orderVasItemPatch: OrderVasItemPatch[],
|
|
21
|
+
orderNo: string
|
|
22
|
+
) {
|
|
23
|
+
const worksheetController: VasWorksheetController = new VasWorksheetController(tx, domain, user)
|
|
24
|
+
return await worksheetController.editVas(tx, domain, user, orderVasPatch, orderVasItemPatch, orderNo)
|
|
25
|
+
}
|
|
@@ -3,6 +3,7 @@ import { activateVasResolver } from './activate-vas'
|
|
|
3
3
|
import { executeVasResolver } from './execute-vas'
|
|
4
4
|
import { undoVasResolver } from './undo-vas'
|
|
5
5
|
import { completeVasResolver } from './complete-vas'
|
|
6
|
+
import { editVasResolver } from './edit-vas'
|
|
6
7
|
import { undoVasInventoryResolver } from './undo-vas-inventory'
|
|
7
8
|
|
|
8
9
|
export const Mutations = {
|
|
@@ -11,5 +12,6 @@ export const Mutations = {
|
|
|
11
12
|
...executeVasResolver,
|
|
12
13
|
...undoVasResolver,
|
|
13
14
|
...completeVasResolver,
|
|
15
|
+
...editVasResolver,
|
|
14
16
|
...undoVasInventoryResolver
|
|
15
17
|
}
|
|
@@ -27,8 +27,10 @@ export const generatePalletIdResolver = {
|
|
|
27
27
|
'targetProduct.arrivalNotice',
|
|
28
28
|
'targetProduct.arrivalNotice.purchaseOrder',
|
|
29
29
|
'targetProduct.product',
|
|
30
|
+
'targetProduct.productDetail',
|
|
30
31
|
'targetInventory',
|
|
31
32
|
'targetInventory.product',
|
|
33
|
+
'targetInventory.productDetail',
|
|
32
34
|
'targetVas',
|
|
33
35
|
'targetVas.targetProduct'
|
|
34
36
|
]
|
|
@@ -52,7 +54,9 @@ export const generatePalletIdResolver = {
|
|
|
52
54
|
orderProductRemark: foundWSD.targetProduct.remark,
|
|
53
55
|
purchaseOrderNo: foundWSD.targetProduct.arrivalNotice?.purchaseOrder?.name || '',
|
|
54
56
|
arrivalNoticeRefNo: foundWSD.targetProduct.arrivalNotice?.refNo || '',
|
|
55
|
-
arrivalNoticeNo: foundWSD.targetProduct.arrivalNotice?.name || ''
|
|
57
|
+
arrivalNoticeNo: foundWSD.targetProduct.arrivalNotice?.name || '',
|
|
58
|
+
uomValue: foundWSD.targetProduct.uomValue,
|
|
59
|
+
uom: foundWSD.targetProduct.uom
|
|
56
60
|
}
|
|
57
61
|
} else if (foundWSD.targetInventory) {
|
|
58
62
|
result = {
|
|
@@ -506,6 +506,12 @@ export const Mutation = /* GraphQL */ `
|
|
|
506
506
|
worksheetDetails: [WorksheetDetailPatch]
|
|
507
507
|
): Boolean @privilege(category: "worksheet_execute", privilege: "mutation") @transaction
|
|
508
508
|
|
|
509
|
+
editVas (
|
|
510
|
+
orderVasPatch: [OrderVasPatch]
|
|
511
|
+
orderVasItemPatch: [OrderVasItemPatch]
|
|
512
|
+
orderNo: String
|
|
513
|
+
): Boolean @privilege(category: "worksheet_execute", privilege: "mutation") @transaction
|
|
514
|
+
|
|
509
515
|
repalletizing (
|
|
510
516
|
worksheetDetailName: String!
|
|
511
517
|
fromPalletId: String!
|
package/server/utils/lmd-util.ts
CHANGED
|
@@ -57,11 +57,11 @@ export async function createLmdParcel(releaseGoods, tx) {
|
|
|
57
57
|
|
|
58
58
|
pAddress: bizplace.address,
|
|
59
59
|
pAddress2: bizplace.address2,
|
|
60
|
-
pCity: senderGeoArea.cityName,
|
|
61
|
-
pPostcode: senderGeoArea.postalCode,
|
|
62
|
-
pDistrict: senderGeoArea.cityName,
|
|
63
|
-
pState: senderGeoArea.stateName,
|
|
64
|
-
pCountry: senderGeoArea.countryCode,
|
|
60
|
+
pCity: bizplace.city || senderGeoArea.cityName,
|
|
61
|
+
pPostcode: bizplace.postalCode ||senderGeoArea.postalCode,
|
|
62
|
+
pDistrict: bizplace.city || senderGeoArea.cityName,
|
|
63
|
+
pState: bizplace.state ||senderGeoArea.stateName,
|
|
64
|
+
pCountry: bizplace.countryCode || senderGeoArea.countryCode,
|
|
65
65
|
|
|
66
66
|
handoverMethod: 1
|
|
67
67
|
}
|