@things-factory/operato-wms 4.0.26 → 4.0.30
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/fetch-setting-value.js +10 -2
- package/client/pages/bulk-operation/bulk-operation.js +33 -10
- package/client/pages/components/vas-templates/vas-pallet-add-popup.js +12 -11
- package/client/pages/components/vas-templates/vas-relabel.js +57 -34
- package/client/pages/components/vas-templates/vas-repack-relabel.js +56 -36
- package/client/pages/components/vas-templates/vas-repack.js +45 -31
- package/client/pages/components/vas-templates/vas-repalletizing.js +58 -39
- package/client/pages/components/vas-templates/vas-unpack.js +38 -24
- package/client/pages/master/location-list.js +1 -0
- package/client/pages/master/print-location-label.js +131 -146
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +36 -44
- package/client/pages/order/arrival-notice/arrival-notice-list.js +2 -5
- package/client/pages/order/goods-received-note/received-note-detail.js +7 -6
- package/client/pages/order/release-order/b2b/b2b-order-list.js +1 -5
- package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +1 -1
- package/client/pages/order/release-order/batch-picking-popup.js +3 -2
- package/client/pages/order/release-order/release-extra-product-popup.js +7 -5
- package/client/pages/order/release-order/release-order-detail.js +30 -13
- package/client/pages/order/transport-order/delivery-note-popup.js +2 -2
- package/client/pages/outbound/packing-product.js +6 -0
- package/client/pages/outbound/packing-worksheet-list.js +64 -4
- package/client/pages/outbound/picking-product.js +10 -5
- package/client/pages/outbound/worksheet-batch-picking.js +1 -1
- package/client/pages/outbound/worksheet-loading.js +16 -14
- package/client/pages/outbound/worksheet-packing.js +15 -13
- package/client/pages/outbound/worksheet-picking.js +2 -2
- package/client/pages/report/custom-elccl/elccl-daily-collection-report.js +8 -9
- package/client/pages/report/custom-elccl/elccl-daily-order-inventory-report.js +26 -25
- package/client/pages/report/custom-elccl/elccl-delivery-order-summary.js +10 -9
- package/client/pages/report/custom-elccl/elccl-inventory-pallet-detail-report.js +13 -8
- package/client/pages/report/custom-elccl/elccl-inventory-report.js +11 -10
- package/client/pages/report/inventory-pallet-report.js +13 -12
- package/client/pages/report/job-sheet-popup.js +9 -9
- package/client/pages/report/job-sheet-report.js +6 -6
- package/client/pages/system/location-sorting-rule.js +53 -46
- package/client/pages/vas/abstract-execute-vas.js +51 -35
- package/client/pages/vas/execute-pure-vas.js +63 -64
- package/client/pages/vas/execute-ref-vas.js +39 -41
- package/client/pages/vas/related-vas-list.js +7 -6
- package/client/pages/vas/target-inventory-assignment-popup.js +16 -14
- package/client/pages/vas/vas-pallet-label-popup.js +1 -1
- package/client/pages/vas/vas-worksheet-list.js +9 -8
- package/client/pages/vas/worksheet-ref-vas.js +7 -6
- package/client/pages/vas/worksheet-vas.js +16 -14
- package/package.json +65 -65
- package/translations/en.json +1 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +1 -0
- package/translations/zh.json +1 -0
|
@@ -3,7 +3,6 @@ import { getRenderer } from '@things-factory/grist-ui'
|
|
|
3
3
|
import { i18next } from '@things-factory/i18n-base'
|
|
4
4
|
import { openPopup } from '@things-factory/layout-base'
|
|
5
5
|
import { client, CustomAlert, navigate, UPDATE_CONTEXT, store } from '@things-factory/shell'
|
|
6
|
-
import { gqlBuilder } from '@things-factory/utils'
|
|
7
6
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
8
7
|
import gql from 'graphql-tag'
|
|
9
8
|
import { css, html, LitElement } from 'lit-element'
|
|
@@ -111,7 +110,7 @@ export class AbstractExecuteVas extends LitElement {
|
|
|
111
110
|
if (this._selectedTaskStatus === WORKSHEET_STATUS.EXECUTING.value) {
|
|
112
111
|
actions.push(
|
|
113
112
|
{ title: i18next.t('button.issue'), action: this._openIssueEditor.bind(this), ...CommonButtonStyles.issue },
|
|
114
|
-
{ title: i18next.t('button.done'), action: this._executeVas.bind(this), ...CommonButtonStyles.
|
|
113
|
+
{ title: i18next.t('button.done'), action: this._executeVas.bind(this), ...CommonButtonStyles.save }
|
|
115
114
|
)
|
|
116
115
|
} else if (this._selectedTaskStatus === WORKSHEET_STATUS.DONE.value) {
|
|
117
116
|
actions.push({
|
|
@@ -407,7 +406,11 @@ export class AbstractExecuteVas extends LitElement {
|
|
|
407
406
|
const response = await client.query({
|
|
408
407
|
query: gql`
|
|
409
408
|
${this.fetchVasQuery}
|
|
410
|
-
|
|
409
|
+
`,
|
|
410
|
+
variables: {
|
|
411
|
+
orderNo: this.orderNo,
|
|
412
|
+
orderType: this.orderType
|
|
413
|
+
}
|
|
411
414
|
})
|
|
412
415
|
|
|
413
416
|
if (!response.errors) {
|
|
@@ -436,7 +439,11 @@ export class AbstractExecuteVas extends LitElement {
|
|
|
436
439
|
const response = await client.query({
|
|
437
440
|
query: gql`
|
|
438
441
|
${this.fetchVasQuery}
|
|
439
|
-
|
|
442
|
+
`,
|
|
443
|
+
variables: {
|
|
444
|
+
orderNo: this.orderNo,
|
|
445
|
+
orderType: this.orderType
|
|
446
|
+
}
|
|
440
447
|
})
|
|
441
448
|
|
|
442
449
|
if (!response.errors) {
|
|
@@ -465,7 +472,10 @@ export class AbstractExecuteVas extends LitElement {
|
|
|
465
472
|
const response = await client.query({
|
|
466
473
|
query: gql`
|
|
467
474
|
${this.fetchInventoriesQuery}
|
|
468
|
-
|
|
475
|
+
`,
|
|
476
|
+
variables: {
|
|
477
|
+
worksheetDetailName: this._selectedVas.name
|
|
478
|
+
}
|
|
469
479
|
})
|
|
470
480
|
|
|
471
481
|
if (!response.errors) {
|
|
@@ -607,12 +617,15 @@ export class AbstractExecuteVas extends LitElement {
|
|
|
607
617
|
await this._template.checkExecutionValidity()
|
|
608
618
|
}
|
|
609
619
|
|
|
610
|
-
const response = await client.
|
|
611
|
-
|
|
612
|
-
mutation {
|
|
613
|
-
executeVas($
|
|
620
|
+
const response = await client.mutate({
|
|
621
|
+
mutation: gql`
|
|
622
|
+
mutation executeVas($worksheetDetail: WorksheetDetailPatch!) {
|
|
623
|
+
executeVas(worksheetDetail: $worksheetDetail)
|
|
614
624
|
}
|
|
615
|
-
|
|
625
|
+
`,
|
|
626
|
+
variables: {
|
|
627
|
+
worksheetDetail: this._getExecuteArgs()
|
|
628
|
+
}
|
|
616
629
|
})
|
|
617
630
|
|
|
618
631
|
if (!response.errors) {
|
|
@@ -629,7 +642,7 @@ export class AbstractExecuteVas extends LitElement {
|
|
|
629
642
|
const worksheetDetail = this.taskGrist.dirtyData.records.filter(record => record.name === this._selectedVas.name)[0]
|
|
630
643
|
let vasWorkseetDetail = { name: worksheetDetail.name }
|
|
631
644
|
if (worksheetDetail.issue) vasWorkseetDetail.issue = worksheetDetail.issue
|
|
632
|
-
return
|
|
645
|
+
return vasWorkseetDetail
|
|
633
646
|
}
|
|
634
647
|
|
|
635
648
|
async _undoVas() {
|
|
@@ -647,14 +660,15 @@ export class AbstractExecuteVas extends LitElement {
|
|
|
647
660
|
return
|
|
648
661
|
}
|
|
649
662
|
|
|
650
|
-
const response = await client.
|
|
651
|
-
|
|
652
|
-
mutation {
|
|
653
|
-
undoVas($
|
|
654
|
-
worksheetDetail: { name: this._selectedVas.name }
|
|
655
|
-
})})
|
|
663
|
+
const response = await client.mutate({
|
|
664
|
+
mutation: gql`
|
|
665
|
+
mutation undoVas($worksheetDetail: WorksheetDetailPatch!) {
|
|
666
|
+
undoVas(worksheetDetail: $worksheetDetail)
|
|
656
667
|
}
|
|
657
|
-
|
|
668
|
+
`,
|
|
669
|
+
variables: {
|
|
670
|
+
worksheetDetail: { name: this._selectedVas.name }
|
|
671
|
+
}
|
|
658
672
|
})
|
|
659
673
|
|
|
660
674
|
if (!response.errors) {
|
|
@@ -680,15 +694,16 @@ export class AbstractExecuteVas extends LitElement {
|
|
|
680
694
|
return
|
|
681
695
|
}
|
|
682
696
|
|
|
683
|
-
const response = await client.
|
|
684
|
-
|
|
685
|
-
mutation {
|
|
686
|
-
undoVasInventory($
|
|
687
|
-
worksheetDetailName: this._selectedVas.name,
|
|
688
|
-
palletId: this._selectedInventory.palletId
|
|
689
|
-
})})
|
|
697
|
+
const response = await client.mutate({
|
|
698
|
+
mutation: gql`
|
|
699
|
+
mutation undoVasInventory($worksheetDetailName: String!, $palletId: String!) {
|
|
700
|
+
undoVasInventory(worksheetDetailName: $worksheetDetailName, palletId: $palletId)
|
|
690
701
|
}
|
|
691
|
-
|
|
702
|
+
`,
|
|
703
|
+
variables: {
|
|
704
|
+
worksheetDetailName: this._selectedVas.name,
|
|
705
|
+
palletId: this._selectedInventory.palletId
|
|
706
|
+
}
|
|
692
707
|
})
|
|
693
708
|
|
|
694
709
|
if (!response.errors) {
|
|
@@ -722,16 +737,17 @@ export class AbstractExecuteVas extends LitElement {
|
|
|
722
737
|
|
|
723
738
|
if (!result.value) return
|
|
724
739
|
|
|
725
|
-
const response = await client.
|
|
726
|
-
|
|
727
|
-
mutation {
|
|
728
|
-
completeVas($
|
|
729
|
-
orderNo: this.orderNo,
|
|
730
|
-
orderType: this.orderType,
|
|
731
|
-
worksheetDetails: this._getWorksheetDetails()
|
|
732
|
-
})})
|
|
740
|
+
const response = await client.mutate({
|
|
741
|
+
mutation: gql`
|
|
742
|
+
mutation completeVas($orderNo: String!, $orderType: String!, $worksheetDetails: [WorksheetDetailPatch]!) {
|
|
743
|
+
completeVas(orderNo: $orderNo, orderType: $orderType, worksheetDetails: $worksheetDetails)
|
|
733
744
|
}
|
|
734
|
-
|
|
745
|
+
`,
|
|
746
|
+
variables: {
|
|
747
|
+
orderNo: this.orderNo,
|
|
748
|
+
orderType: this.orderType,
|
|
749
|
+
worksheetDetails: this._getWorksheetDetails()
|
|
750
|
+
}
|
|
735
751
|
})
|
|
736
752
|
|
|
737
753
|
if (!response.errors) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@things-factory/grist-ui'
|
|
2
2
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
3
|
-
import {
|
|
3
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
4
4
|
import { html } from 'lit-element'
|
|
5
5
|
import { AbstractExecuteVas } from './abstract-execute-vas'
|
|
6
6
|
|
|
@@ -83,76 +83,75 @@ class ExecutePureVas extends localize(i18next)(AbstractExecuteVas) {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
get fetchVasQuery() {
|
|
86
|
-
return
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
86
|
+
return `
|
|
87
|
+
query vasWorksheet($orderNo: String!, $orderType: String!) {
|
|
88
|
+
vasWorksheet(orderNo: $orderNo, orderType: $orderType) {
|
|
89
|
+
worksheetInfo {
|
|
90
|
+
bizplaceName
|
|
91
|
+
startedAt
|
|
92
|
+
}
|
|
93
|
+
worksheetDetailInfos {
|
|
94
|
+
batchId
|
|
95
|
+
name
|
|
96
|
+
targetName
|
|
97
|
+
status
|
|
98
|
+
issue
|
|
99
|
+
set
|
|
100
|
+
targetType
|
|
101
|
+
targetBatchId
|
|
102
|
+
targetProduct {
|
|
103
|
+
id
|
|
104
|
+
name
|
|
105
|
+
description
|
|
106
|
+
}
|
|
107
|
+
otherTarget
|
|
108
|
+
qty
|
|
109
|
+
actualQty
|
|
110
|
+
uomValue
|
|
111
|
+
actualUomValue
|
|
112
|
+
operationGuide
|
|
113
|
+
vas {
|
|
114
|
+
id
|
|
115
|
+
name
|
|
116
|
+
description
|
|
117
|
+
operationGuide
|
|
118
|
+
operationGuideType
|
|
119
|
+
}
|
|
120
|
+
inventory {
|
|
121
|
+
batchId
|
|
122
|
+
palletId
|
|
123
|
+
qty
|
|
124
|
+
uomValue
|
|
125
|
+
}
|
|
126
|
+
description
|
|
127
|
+
remark
|
|
128
|
+
}
|
|
121
129
|
}
|
|
122
|
-
|
|
130
|
+
}
|
|
131
|
+
`
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
get fetchInventoriesQuery() {
|
|
135
|
+
return `
|
|
136
|
+
query vasInventories($worksheetDetailName: String!) {
|
|
137
|
+
vasInventories(worksheetDetailName: $worksheetDetailName) {
|
|
123
138
|
batchId
|
|
124
139
|
palletId
|
|
125
140
|
qty
|
|
126
141
|
uomValue
|
|
142
|
+
product {
|
|
143
|
+
id
|
|
144
|
+
name
|
|
145
|
+
description
|
|
146
|
+
}
|
|
147
|
+
location {
|
|
148
|
+
id
|
|
149
|
+
name
|
|
150
|
+
description
|
|
151
|
+
}
|
|
127
152
|
}
|
|
128
|
-
description
|
|
129
|
-
remark
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}`
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
get fetchInventoriesQuery() {
|
|
136
|
-
return /* GraphQL */ `query {
|
|
137
|
-
vasInventories(${gqlBuilder.buildArgs({
|
|
138
|
-
worksheetDetailName: this._selectedVas.name
|
|
139
|
-
})}) {
|
|
140
|
-
batchId
|
|
141
|
-
palletId
|
|
142
|
-
qty
|
|
143
|
-
uomValue
|
|
144
|
-
product {
|
|
145
|
-
id
|
|
146
|
-
name
|
|
147
|
-
description
|
|
148
|
-
}
|
|
149
|
-
location {
|
|
150
|
-
id
|
|
151
|
-
name
|
|
152
|
-
description
|
|
153
153
|
}
|
|
154
|
-
|
|
155
|
-
}`
|
|
154
|
+
`
|
|
156
155
|
}
|
|
157
156
|
|
|
158
157
|
_fillUpInfoForm(data) {
|
|
@@ -76,51 +76,50 @@ class ExecuteRefVas extends localize(i18next)(AbstractExecuteVas) {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
get fetchVasQuery() {
|
|
79
|
-
return /* GraphQL */ `
|
|
80
|
-
vasWorksheet(${
|
|
81
|
-
orderNo:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
startedAt
|
|
87
|
-
containerNo
|
|
88
|
-
}
|
|
89
|
-
worksheetDetailInfos {
|
|
90
|
-
batchId
|
|
91
|
-
name
|
|
92
|
-
targetName
|
|
93
|
-
status
|
|
94
|
-
issue
|
|
95
|
-
set
|
|
96
|
-
targetType
|
|
97
|
-
targetBatchId
|
|
98
|
-
targetProduct {
|
|
99
|
-
id
|
|
100
|
-
name
|
|
101
|
-
description
|
|
79
|
+
return /* GraphQL */ `
|
|
80
|
+
query vasWorksheet($orderNo: String!, $orderType: String!) {
|
|
81
|
+
vasWorksheet(orderNo: $orderNo, orderType: $orderType) {
|
|
82
|
+
worksheetInfo {
|
|
83
|
+
bizplaceName
|
|
84
|
+
startedAt
|
|
85
|
+
containerNo
|
|
102
86
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
uomValue
|
|
106
|
-
operationGuide
|
|
107
|
-
vas {
|
|
108
|
-
id
|
|
87
|
+
worksheetDetailInfos {
|
|
88
|
+
batchId
|
|
109
89
|
name
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
90
|
+
targetName
|
|
91
|
+
status
|
|
92
|
+
issue
|
|
93
|
+
set
|
|
94
|
+
targetType
|
|
95
|
+
targetBatchId
|
|
96
|
+
targetProduct {
|
|
97
|
+
id
|
|
98
|
+
name
|
|
99
|
+
description
|
|
100
|
+
}
|
|
101
|
+
otherTarget
|
|
116
102
|
qty
|
|
117
103
|
uomValue
|
|
104
|
+
operationGuide
|
|
105
|
+
vas {
|
|
106
|
+
id
|
|
107
|
+
name
|
|
108
|
+
description
|
|
109
|
+
operationGuide
|
|
110
|
+
operationGuideType
|
|
111
|
+
}
|
|
112
|
+
inventory {
|
|
113
|
+
palletId
|
|
114
|
+
qty
|
|
115
|
+
uomValue
|
|
116
|
+
}
|
|
117
|
+
description
|
|
118
|
+
remark
|
|
118
119
|
}
|
|
119
|
-
description
|
|
120
|
-
remark
|
|
121
120
|
}
|
|
122
121
|
}
|
|
123
|
-
|
|
122
|
+
`
|
|
124
123
|
}
|
|
125
124
|
|
|
126
125
|
_fillUpInfoForm(data) {
|
|
@@ -191,9 +190,8 @@ class ExecuteRefVas extends localize(i18next)(AbstractExecuteVas) {
|
|
|
191
190
|
const worksheetDetail = this.taskGrist.dirtyData.records.filter(record => record.name === this._selectedVas.name)[0]
|
|
192
191
|
let vasWorkseetDetail = { name: worksheetDetail.name }
|
|
193
192
|
if (worksheetDetail.issue) vasWorkseetDetail.issue = worksheetDetail.issue
|
|
194
|
-
const args =
|
|
195
|
-
|
|
196
|
-
}
|
|
193
|
+
const args = vasWorkseetDetail
|
|
194
|
+
|
|
197
195
|
const palletId = this.palletIdInput?.value
|
|
198
196
|
if (palletId) {
|
|
199
197
|
args.palletId = palletId
|
|
@@ -3,7 +3,7 @@ import '@things-factory/grist-ui'
|
|
|
3
3
|
import { getRenderer } from '@things-factory/grist-ui'
|
|
4
4
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
5
|
import { client } from '@things-factory/shell'
|
|
6
|
-
import {
|
|
6
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
7
7
|
import gql from 'graphql-tag'
|
|
8
8
|
import { css, html, LitElement } from 'lit-element'
|
|
9
9
|
import '../components/popup-note'
|
|
@@ -206,10 +206,8 @@ class RelatedVasList extends localize(i18next)(LitElement) {
|
|
|
206
206
|
|
|
207
207
|
const response = await client.query({
|
|
208
208
|
query: gql`
|
|
209
|
-
query {
|
|
210
|
-
worksheet(${
|
|
211
|
-
name: this.worksheetNo
|
|
212
|
-
})}) {
|
|
209
|
+
query worksheet($name: String!) {
|
|
210
|
+
worksheet(name: $name) {
|
|
213
211
|
worksheetDetails {
|
|
214
212
|
description
|
|
215
213
|
issue
|
|
@@ -240,7 +238,10 @@ class RelatedVasList extends localize(i18next)(LitElement) {
|
|
|
240
238
|
}
|
|
241
239
|
}
|
|
242
240
|
}
|
|
243
|
-
|
|
241
|
+
`,
|
|
242
|
+
variables: {
|
|
243
|
+
name: this.worksheetNo
|
|
244
|
+
}
|
|
244
245
|
})
|
|
245
246
|
|
|
246
247
|
if (!response.errors) {
|
|
@@ -3,7 +3,7 @@ import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
|
3
3
|
import '@things-factory/grist-ui'
|
|
4
4
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
5
|
import { client, CustomAlert } from '@things-factory/shell'
|
|
6
|
-
import {
|
|
6
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
7
7
|
import gql from 'graphql-tag'
|
|
8
8
|
import { css, html, LitElement } from 'lit-element'
|
|
9
9
|
import {
|
|
@@ -376,10 +376,8 @@ class TargetInventoryAssignmentPopup extends localize(i18next)(LitElement) {
|
|
|
376
376
|
async _fetchCandidates() {
|
|
377
377
|
const response = await client.query({
|
|
378
378
|
query: gql`
|
|
379
|
-
query {
|
|
380
|
-
vasCandidates(${
|
|
381
|
-
worksheetDetailId: this.tasks[0].id
|
|
382
|
-
})}) {
|
|
379
|
+
query vasCandidates($worksheetDetailId: String!) {
|
|
380
|
+
vasCandidates(worksheetDetailId: $worksheetDetailId) {
|
|
383
381
|
id
|
|
384
382
|
palletId
|
|
385
383
|
batchId
|
|
@@ -396,7 +394,10 @@ class TargetInventoryAssignmentPopup extends localize(i18next)(LitElement) {
|
|
|
396
394
|
createdAt
|
|
397
395
|
}
|
|
398
396
|
}
|
|
399
|
-
|
|
397
|
+
`,
|
|
398
|
+
variables: {
|
|
399
|
+
worksheetDetailId: this.tasks[0].id
|
|
400
|
+
}
|
|
400
401
|
})
|
|
401
402
|
|
|
402
403
|
if (!response.errors) {
|
|
@@ -512,15 +513,16 @@ class TargetInventoryAssignmentPopup extends localize(i18next)(LitElement) {
|
|
|
512
513
|
return
|
|
513
514
|
}
|
|
514
515
|
|
|
515
|
-
const response = await client.
|
|
516
|
-
|
|
517
|
-
mutation {
|
|
518
|
-
assignVasInventories($
|
|
519
|
-
worksheetDetailIds: this.tasks.map(task => task.id),
|
|
520
|
-
inventories: this.getInventories()
|
|
521
|
-
})})
|
|
516
|
+
const response = await client.mutate({
|
|
517
|
+
mutation: gql`
|
|
518
|
+
mutation assignVasInventories($worksheetDetailIds: [String]!, $inventories: [InventoryPatch]!) {
|
|
519
|
+
assignVasInventories(worksheetDetailIds: $worksheetDetailIds, inventories: $inventories)
|
|
522
520
|
}
|
|
523
|
-
|
|
521
|
+
`,
|
|
522
|
+
variables: {
|
|
523
|
+
worksheetDetailIds: this.tasks.map(task => task.id),
|
|
524
|
+
inventories: this.getInventories()
|
|
525
|
+
}
|
|
524
526
|
})
|
|
525
527
|
|
|
526
528
|
if (!response.errors) {
|
|
@@ -2,7 +2,7 @@ import { DirectPrinter } from '@things-factory/barcode-base'
|
|
|
2
2
|
import '@things-factory/grist-ui'
|
|
3
3
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
4
4
|
import { client, store } from '@things-factory/shell'
|
|
5
|
-
import {
|
|
5
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
6
6
|
import gql from 'graphql-tag'
|
|
7
7
|
import { css, html, LitElement } from 'lit-element'
|
|
8
8
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
@@ -8,7 +8,7 @@ import { getCodeByName } from '@things-factory/code-base'
|
|
|
8
8
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
9
9
|
import { client, navigate, PageView } from '@things-factory/shell'
|
|
10
10
|
import { ScrollbarStyles } from '@things-factory/styles'
|
|
11
|
-
import {
|
|
11
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
12
12
|
|
|
13
13
|
import { ORDER_TYPES, WORKSHEET_TYPE } from '../constants'
|
|
14
14
|
|
|
@@ -229,12 +229,8 @@ class VasWorksheetList extends localize(i18next)(PageView) {
|
|
|
229
229
|
})
|
|
230
230
|
const response = await client.query({
|
|
231
231
|
query: gql`
|
|
232
|
-
query {
|
|
233
|
-
worksheets(${
|
|
234
|
-
filters,
|
|
235
|
-
pagination: { page, limit },
|
|
236
|
-
sortings: sorters
|
|
237
|
-
})}) {
|
|
232
|
+
query worksheets($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
233
|
+
worksheets(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
238
234
|
items {
|
|
239
235
|
id
|
|
240
236
|
name
|
|
@@ -267,7 +263,12 @@ class VasWorksheetList extends localize(i18next)(PageView) {
|
|
|
267
263
|
total
|
|
268
264
|
}
|
|
269
265
|
}
|
|
270
|
-
|
|
266
|
+
`,
|
|
267
|
+
variables: {
|
|
268
|
+
filters,
|
|
269
|
+
pagination: { page, limit },
|
|
270
|
+
sortings: sorters
|
|
271
|
+
}
|
|
271
272
|
})
|
|
272
273
|
|
|
273
274
|
if (!response.errors) {
|
|
@@ -4,7 +4,7 @@ import '@things-factory/grist-ui'
|
|
|
4
4
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
5
|
import { openPopup } from '@things-factory/layout-base'
|
|
6
6
|
import { client, PageView } from '@things-factory/shell'
|
|
7
|
-
import {
|
|
7
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
8
8
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
9
9
|
import gql from 'graphql-tag'
|
|
10
10
|
import { css, html } from 'lit-element'
|
|
@@ -257,10 +257,8 @@ class WorksheetRefVas extends localize(i18next)(PageView) {
|
|
|
257
257
|
|
|
258
258
|
const response = await client.query({
|
|
259
259
|
query: gql`
|
|
260
|
-
query {
|
|
261
|
-
worksheet(${
|
|
262
|
-
name: this._worksheetNo
|
|
263
|
-
})}) {
|
|
260
|
+
query worksheet($name: String!) {
|
|
261
|
+
worksheet(name: $name) {
|
|
264
262
|
bizplace {
|
|
265
263
|
name
|
|
266
264
|
}
|
|
@@ -298,7 +296,10 @@ class WorksheetRefVas extends localize(i18next)(PageView) {
|
|
|
298
296
|
}
|
|
299
297
|
}
|
|
300
298
|
}
|
|
301
|
-
|
|
299
|
+
`,
|
|
300
|
+
variables: {
|
|
301
|
+
name: this._worksheetNo
|
|
302
|
+
}
|
|
302
303
|
})
|
|
303
304
|
|
|
304
305
|
if (!response.errors) {
|
|
@@ -6,7 +6,7 @@ import { getRenderer } from '@things-factory/grist-ui'
|
|
|
6
6
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
7
7
|
import { openPopup } from '@things-factory/layout-base'
|
|
8
8
|
import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
|
|
9
|
-
import {
|
|
9
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
10
10
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
11
11
|
import gql from 'graphql-tag'
|
|
12
12
|
import { css, html } from 'lit-element'
|
|
@@ -414,10 +414,8 @@ class WorksheetVas extends localize(i18next)(PageView) {
|
|
|
414
414
|
if (!this._worksheetNo) return
|
|
415
415
|
const response = await client.query({
|
|
416
416
|
query: gql`
|
|
417
|
-
query {
|
|
418
|
-
worksheet(${
|
|
419
|
-
name: this._worksheetNo
|
|
420
|
-
})}) {
|
|
417
|
+
query worksheet($name: String!) {
|
|
418
|
+
worksheet(name: $name) {
|
|
421
419
|
id
|
|
422
420
|
name
|
|
423
421
|
status
|
|
@@ -473,7 +471,10 @@ class WorksheetVas extends localize(i18next)(PageView) {
|
|
|
473
471
|
}
|
|
474
472
|
}
|
|
475
473
|
}
|
|
476
|
-
|
|
474
|
+
`,
|
|
475
|
+
variables: {
|
|
476
|
+
name: this._worksheetNo
|
|
477
|
+
}
|
|
477
478
|
})
|
|
478
479
|
|
|
479
480
|
if (!response.errors) {
|
|
@@ -697,17 +698,18 @@ class WorksheetVas extends localize(i18next)(PageView) {
|
|
|
697
698
|
}
|
|
698
699
|
}
|
|
699
700
|
|
|
700
|
-
const response = await client.
|
|
701
|
-
|
|
702
|
-
mutation {
|
|
703
|
-
activateVas(${
|
|
704
|
-
worksheetNo: this._worksheetNo,
|
|
705
|
-
vasWorksheetDetails: this._getVasWorksheetDetails()
|
|
706
|
-
})}) {
|
|
701
|
+
const response = await client.mutate({
|
|
702
|
+
mutation: gql`
|
|
703
|
+
mutation activateVas($worksheetNo: String!, $vasWorksheetDetails: [WorksheetDetailPatch]) {
|
|
704
|
+
activateVas(worksheetNo: $worksheetNo, vasWorksheetDetails: $vasWorksheetDetails) {
|
|
707
705
|
name
|
|
708
706
|
}
|
|
709
707
|
}
|
|
710
|
-
|
|
708
|
+
`,
|
|
709
|
+
variables: {
|
|
710
|
+
worksheetNo: this._worksheetNo,
|
|
711
|
+
vasWorksheetDetails: this._getVasWorksheetDetails()
|
|
712
|
+
}
|
|
711
713
|
})
|
|
712
714
|
if (!response.errors) {
|
|
713
715
|
this._showToast({ message: i18next.t('text.worksheet_activated') })
|