@things-factory/operato-wms 4.0.25 → 4.0.29
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/bootstrap.js +1 -1
- package/client/pages/billing/claim-chit/claim-chit-detail.js +32 -35
- package/client/pages/billing/claim-chit/claim-chit-list.js +17 -17
- package/client/pages/billing/claim-chit/create-claim-chit.js +39 -30
- package/client/pages/billing/transport-summary-report.js +21 -23
- package/client/pages/bulk-operation/validate-ro-popup.js +14 -54
- package/client/pages/inbound/expiry-date-popup.js +2 -2
- package/client/pages/inbound/inbound-reusable-pallet.js +21 -19
- package/client/pages/inbound/palletizing-pallets-popup.js +10 -9
- package/client/pages/inbound/putaway-product.js +16 -8
- package/client/pages/inbound/putaway-worksheet-generate-popup.js +4 -4
- package/client/pages/inbound/unload-product.js +16 -88
- package/client/pages/inbound/vas-selector.js +9 -8
- package/client/pages/inventory-check/check-inventory-popup.js +20 -18
- package/client/pages/inventory-check/cycle-count-recheck-popup.js +25 -15
- package/client/pages/inventory-check/inspecting-product.js +2 -2
- package/client/pages/inventory-check/inventory-check-list.js +30 -19
- package/client/pages/inventory-check/search-popup.js +15 -14
- package/client/pages/inventory-check/worksheet-cycle-count.js +17 -15
- package/client/pages/master/location-list.js +61 -52
- package/client/pages/master/pallet-list.js +34 -30
- package/client/pages/master/print-location-label.js +142 -156
- package/client/pages/master/warehouse-list.js +33 -29
- package/client/pages/master/worker-list.js +30 -30
- package/client/pages/order/arrival-notice/assign-buffer-location.js +1 -1
- package/client/pages/order/goods-received-note/customer-grn-list.js +9 -8
- package/client/pages/order/goods-received-note/customer-received-note.js +8 -7
- package/client/pages/order/goods-received-note/received-note-detail.js +7 -6
- package/client/pages/order/goods-received-note/received-note-list.js +9 -8
- package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +1 -1
- package/client/pages/order/release-order/release-extra-product-popup.js +3 -7
- package/client/pages/order/release-order/release-order-detail.js +2 -2
- package/client/pages/order/return-order/check-return-order.js +15 -13
- package/client/pages/order/return-order/receive-return-order-requests.js +25 -22
- package/client/pages/order/return-order/rejected-return-order.js +8 -14
- package/client/pages/order/return-order/return-order-assign-buffer-location.js +16 -14
- package/client/pages/order/return-order/return-order-detail.js +35 -31
- package/client/pages/order/return-order/return-order-list.js +9 -8
- package/client/pages/order/return-order/return-order-requests.js +20 -18
- package/client/pages/order/reverse-kitting-order/reverse-kitting-order-list.js +9 -8
- package/client/pages/order/transfer-order/receive-transfer-order-request.js +67 -66
- package/client/pages/order/transfer-order/rejected-transfer-order.js +7 -6
- package/client/pages/order/transfer-order/transfer-order-detail.js +7 -6
- package/client/pages/order/transfer-order/transfer-order-requests.js +20 -18
- package/client/pages/order/transport-order/contact-point-selector-popup.js +20 -20
- package/client/pages/order/transport-order/delivery-note-popup.js +52 -46
- package/client/pages/order/transport-order/print-delivery-note.js +17 -16
- package/client/pages/order/transport-order/upload-delivery-note.js +21 -18
- package/client/pages/order/transport-order/view-delivery-note.js +19 -22
- package/client/pages/order/vas-order/create-vas-order.js +12 -11
- package/client/pages/order/vas-order/receive-vas-order.js +25 -22
- package/client/pages/order/vas-order/vas-order-detail.js +26 -23
- package/client/pages/order/vas-order/vas-order-list.js +9 -8
- package/client/pages/order/vas-order/vas-order-requests.js +11 -12
- package/client/pages/outbound/outbound-reusable-pallet.js +25 -33
- package/client/pages/outbound/packing-product.js +6 -0
- package/client/pages/outbound/picking-product.js +1 -0
- package/client/pages/outbound/single-outbound-worksheet.js +9 -8
- package/client/pages/outbound/worksheet-loading.js +16 -14
- package/client/pages/outbound/worksheet-packing.js +15 -13
- 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-list.js +9 -8
- 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 +47 -34
- package/client/pages/vas/execute-pure-vas.js +66 -62
- 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/client/route.js +16 -32
- package/package.json +65 -65
- package/things-factory.config.js +0 -16
- package/translations/en.json +3 -0
- package/translations/ko.json +3 -1
- package/translations/ms.json +3 -1
- package/translations/zh.json +3 -1
- package/client/pages/inbound/location-selector.js +0 -224
- package/client/pages/master/picking-bin-list.js +0 -354
- package/client/pages/order/retail-replenishment-order/retail-replenishment-order-detail.js +0 -315
- package/client/pages/order/retail-replenishment-order/retail-replenishment-order-requests.js +0 -307
- package/client/pages/order/vas-order/rejected-vas-order.js +0 -300
package/client/pages/order/retail-replenishment-order/retail-replenishment-order-requests.js
DELETED
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
import { getCodeByName } from '@things-factory/code-base'
|
|
2
|
-
import '@things-factory/form-ui'
|
|
3
|
-
import '@things-factory/grist-ui'
|
|
4
|
-
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
|
-
import { client, navigate, PageView } from '@things-factory/shell'
|
|
6
|
-
import { ScrollbarStyles } from '@things-factory/styles'
|
|
7
|
-
import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
|
|
8
|
-
import gql from 'graphql-tag'
|
|
9
|
-
import { css, html } from 'lit-element'
|
|
10
|
-
|
|
11
|
-
class RetailReplenishmentOrderRequests extends localize(i18next)(PageView) {
|
|
12
|
-
static get styles() {
|
|
13
|
-
return [
|
|
14
|
-
ScrollbarStyles,
|
|
15
|
-
css`
|
|
16
|
-
:host {
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
overflow: hidden;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
search-form {
|
|
23
|
-
overflow: visible;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
data-grist {
|
|
27
|
-
overflow-y: auto;
|
|
28
|
-
flex: 1;
|
|
29
|
-
}
|
|
30
|
-
`
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
static get properties() {
|
|
35
|
-
return {
|
|
36
|
-
_searchFields: Array,
|
|
37
|
-
config: Object,
|
|
38
|
-
data: Object
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
render() {
|
|
43
|
-
return html`
|
|
44
|
-
<search-form id="search-form" .fields=${this._searchFields} @submit=${e => this.dataGrist.fetch()}></search-form>
|
|
45
|
-
|
|
46
|
-
<data-grist
|
|
47
|
-
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
48
|
-
.config=${this.config}
|
|
49
|
-
.fetchHandler="${this.fetchHandler.bind(this)}"
|
|
50
|
-
></data-grist>
|
|
51
|
-
`
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
get context() {
|
|
55
|
-
return {
|
|
56
|
-
title: i18next.t('title.retail_replenishment_order_requests'),
|
|
57
|
-
exportable: {
|
|
58
|
-
name: i18next.t('title.retail_replenishment_order_requests'),
|
|
59
|
-
data: this._exportableData.bind(this)
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
pageUpdated(changes, lifecycle) {
|
|
65
|
-
if (this.active) {
|
|
66
|
-
this.dataGrist.fetch()
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
async pageInitialized() {
|
|
71
|
-
const _orderStatus = await getCodeByName('RR_REQUESTS_STATUS')
|
|
72
|
-
const _userBizplaces = await this.fetchBizplaces()
|
|
73
|
-
|
|
74
|
-
this._searchFields = [
|
|
75
|
-
{
|
|
76
|
-
label: i18next.t('label.rro_no'),
|
|
77
|
-
name: 'name',
|
|
78
|
-
type: 'text',
|
|
79
|
-
props: { searchOper: 'i_like' }
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
label: i18next.t('label.retail_outlet'),
|
|
83
|
-
name: 'bizplaceId',
|
|
84
|
-
type: 'select',
|
|
85
|
-
options: [
|
|
86
|
-
{ value: '' },
|
|
87
|
-
..._userBizplaces
|
|
88
|
-
.filter(userBizplaces => !userBizplaces.mainBizplace)
|
|
89
|
-
.map(userBizplace => {
|
|
90
|
-
return {
|
|
91
|
-
name: userBizplace.name,
|
|
92
|
-
value: userBizplace.id
|
|
93
|
-
}
|
|
94
|
-
})
|
|
95
|
-
.sort(this._compareValues('name', 'asc'))
|
|
96
|
-
],
|
|
97
|
-
props: { searchOper: 'eq' }
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
label: i18next.t('label.issued_date'),
|
|
101
|
-
name: 'issuedDate',
|
|
102
|
-
type: 'date',
|
|
103
|
-
props: { searchOper: 'i_like' }
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
label: i18next.t('label.ref_no'),
|
|
107
|
-
name: 'refNo',
|
|
108
|
-
type: 'text',
|
|
109
|
-
props: { searchOper: 'i_like' }
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
label: i18next.t('label.own_transport'),
|
|
113
|
-
name: 'ownTransport',
|
|
114
|
-
type: 'checkbox',
|
|
115
|
-
props: { searchOper: 'eq' },
|
|
116
|
-
attrs: ['indeterminate']
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
label: i18next.t('label.status'),
|
|
120
|
-
name: 'status',
|
|
121
|
-
type: 'select',
|
|
122
|
-
options: [
|
|
123
|
-
{ value: '' },
|
|
124
|
-
..._orderStatus.map(status => {
|
|
125
|
-
return { name: i18next.t(`label.${status.description}`), value: status.name }
|
|
126
|
-
})
|
|
127
|
-
],
|
|
128
|
-
props: { searchOper: 'eq' }
|
|
129
|
-
}
|
|
130
|
-
]
|
|
131
|
-
|
|
132
|
-
this.config = {
|
|
133
|
-
rows: { selectable: { multiple: true }, appendable: false },
|
|
134
|
-
list: { fields: ['name', 'bizplace', 'issuedDate', 'status', 'updatedAt'] },
|
|
135
|
-
columns: [
|
|
136
|
-
{ type: 'gutter', gutterName: 'dirty' },
|
|
137
|
-
{ type: 'gutter', gutterName: 'sequence' },
|
|
138
|
-
{
|
|
139
|
-
type: 'gutter',
|
|
140
|
-
gutterName: 'button',
|
|
141
|
-
icon: 'reorder',
|
|
142
|
-
handlers: {
|
|
143
|
-
click: (columns, data, column, record, rowIndex) => {
|
|
144
|
-
navigate(`retail_replenishment_order_detail/${record.name}`)
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
type: 'string',
|
|
150
|
-
name: 'name',
|
|
151
|
-
header: i18next.t('field.replenishment_order_no'),
|
|
152
|
-
record: { align: 'left' },
|
|
153
|
-
sortable: true,
|
|
154
|
-
width: 200
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
type: 'object',
|
|
158
|
-
name: 'bizplace',
|
|
159
|
-
header: i18next.t('field.retail_outlet'),
|
|
160
|
-
record: { align: 'left' },
|
|
161
|
-
sortable: true,
|
|
162
|
-
width: 300
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
type: 'string',
|
|
166
|
-
name: 'refNo',
|
|
167
|
-
header: i18next.t('field.ref_no'),
|
|
168
|
-
record: { align: 'left' },
|
|
169
|
-
sortable: true,
|
|
170
|
-
width: 160
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
type: 'date',
|
|
174
|
-
name: 'issuedDate',
|
|
175
|
-
header: i18next.t('field.issued_date'),
|
|
176
|
-
record: { align: 'center' },
|
|
177
|
-
sortable: true,
|
|
178
|
-
width: 120
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
type: 'boolean',
|
|
182
|
-
name: 'ownTransport',
|
|
183
|
-
header: i18next.t('field.own_transport'),
|
|
184
|
-
record: { align: 'center' },
|
|
185
|
-
sortable: true,
|
|
186
|
-
width: 60
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
type: 'string',
|
|
190
|
-
name: 'status',
|
|
191
|
-
header: i18next.t('field.status'),
|
|
192
|
-
record: { align: 'left' },
|
|
193
|
-
sortable: true,
|
|
194
|
-
width: 120
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
type: 'datetime',
|
|
198
|
-
name: 'updatedAt',
|
|
199
|
-
header: i18next.t('field.updated_at'),
|
|
200
|
-
record: { align: 'center' },
|
|
201
|
-
sortable: true,
|
|
202
|
-
width: 160
|
|
203
|
-
}
|
|
204
|
-
]
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
get searchForm() {
|
|
209
|
-
return this.shadowRoot.querySelector('search-form')
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
get dataGrist() {
|
|
213
|
-
return this.shadowRoot.querySelector('data-grist')
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
async fetchHandler({ page, limit, sorters = [{ name: 'updatedAt', desc: true }] }) {
|
|
217
|
-
const response = await client.query({
|
|
218
|
-
query: gql`
|
|
219
|
-
query {
|
|
220
|
-
retailReplenishmentOrders(${gqlBuilder.buildArgs({
|
|
221
|
-
filters: await this.searchForm.getQueryFilters(),
|
|
222
|
-
pagination: { page, limit },
|
|
223
|
-
sortings: sorters
|
|
224
|
-
})}) {
|
|
225
|
-
items {
|
|
226
|
-
id
|
|
227
|
-
bizplace {
|
|
228
|
-
id
|
|
229
|
-
name
|
|
230
|
-
description
|
|
231
|
-
}
|
|
232
|
-
name
|
|
233
|
-
issuedDate
|
|
234
|
-
status
|
|
235
|
-
refNo
|
|
236
|
-
remark
|
|
237
|
-
ownTransport
|
|
238
|
-
orderProducts {
|
|
239
|
-
batchId
|
|
240
|
-
status
|
|
241
|
-
packingSize
|
|
242
|
-
product {
|
|
243
|
-
sku
|
|
244
|
-
name
|
|
245
|
-
description
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
updatedAt
|
|
249
|
-
}
|
|
250
|
-
total
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
`
|
|
254
|
-
})
|
|
255
|
-
|
|
256
|
-
if (!response.errors) {
|
|
257
|
-
return {
|
|
258
|
-
total: response.data.retailReplenishmentOrders.total || 0,
|
|
259
|
-
records: response.data.retailReplenishmentOrders.items || []
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
async fetchBizplaces(bizplace = []) {
|
|
265
|
-
const response = await client.query({
|
|
266
|
-
query: gql`
|
|
267
|
-
query {
|
|
268
|
-
bizplaces(${gqlBuilder.buildArgs({
|
|
269
|
-
filters: [...bizplace]
|
|
270
|
-
})}) {
|
|
271
|
-
items{
|
|
272
|
-
id
|
|
273
|
-
name
|
|
274
|
-
description
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
`
|
|
279
|
-
})
|
|
280
|
-
return response.data.bizplaces.items
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
_compareValues(key, order = 'asc') {
|
|
284
|
-
return function innerSort(a, b) {
|
|
285
|
-
if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {
|
|
286
|
-
return 0
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
const varA = typeof a[key] === 'string' ? a[key].toUpperCase() : a[key]
|
|
290
|
-
const varB = typeof b[key] === 'string' ? b[key].toUpperCase() : b[key]
|
|
291
|
-
|
|
292
|
-
let comparison = 0
|
|
293
|
-
if (varA > varB) {
|
|
294
|
-
comparison = 1
|
|
295
|
-
} else if (varA < varB) {
|
|
296
|
-
comparison = -1
|
|
297
|
-
}
|
|
298
|
-
return order === 'desc' ? comparison * -1 : comparison
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
_exportableData() {
|
|
303
|
-
return this.dataGrist.exportRecords()
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
window.customElements.define('retail-replenishment-order-requests', RetailReplenishmentOrderRequests)
|
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
2
|
-
import '@things-factory/grist-ui'
|
|
3
|
-
import { getRenderer } from '@things-factory/grist-ui'
|
|
4
|
-
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
|
-
import { client, PageView, store } from '@things-factory/shell'
|
|
6
|
-
import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
|
|
7
|
-
import { CommonButtonStyles } from '@things-factory/styles'
|
|
8
|
-
import gql from 'graphql-tag'
|
|
9
|
-
import { css, html } from 'lit-element'
|
|
10
|
-
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
11
|
-
import '../../components/popup-note'
|
|
12
|
-
import '../../components/vas-templates'
|
|
13
|
-
import { VAS_BATCH_AND_PRODUCT_TYPE, VAS_BATCH_NO_TYPE, VAS_ETC_TYPE, VAS_PRODUCT_TYPE } from '../../constants'
|
|
14
|
-
|
|
15
|
-
class RejectedVasOrder extends connect(store)(localize(i18next)(PageView)) {
|
|
16
|
-
static get properties() {
|
|
17
|
-
return {
|
|
18
|
-
_vasNo: String,
|
|
19
|
-
_rejectReason: String,
|
|
20
|
-
config: Object,
|
|
21
|
-
data: Object,
|
|
22
|
-
_template: Object
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
static get styles() {
|
|
27
|
-
return [
|
|
28
|
-
MultiColumnFormStyles,
|
|
29
|
-
css`
|
|
30
|
-
:host {
|
|
31
|
-
display: flex;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
overflow-x: auto;
|
|
34
|
-
}
|
|
35
|
-
popup-note {
|
|
36
|
-
flex: 1;
|
|
37
|
-
}
|
|
38
|
-
.container {
|
|
39
|
-
display: flex;
|
|
40
|
-
flex: 4;
|
|
41
|
-
}
|
|
42
|
-
.grist {
|
|
43
|
-
background-color: var(--main-section-background-color);
|
|
44
|
-
display: flex;
|
|
45
|
-
flex: 1;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
overflow-y: auto;
|
|
48
|
-
}
|
|
49
|
-
.guide-container {
|
|
50
|
-
max-width: 30vw;
|
|
51
|
-
display: flex;
|
|
52
|
-
}
|
|
53
|
-
data-grist {
|
|
54
|
-
overflow-y: hidden;
|
|
55
|
-
flex: 1;
|
|
56
|
-
}
|
|
57
|
-
h2 {
|
|
58
|
-
padding: var(--subtitle-padding);
|
|
59
|
-
font: var(--subtitle-font);
|
|
60
|
-
color: var(--subtitle-text-color);
|
|
61
|
-
border-bottom: var(--subtitle-border-bottom);
|
|
62
|
-
}
|
|
63
|
-
.grist h2 {
|
|
64
|
-
margin: var(--grist-title-margin);
|
|
65
|
-
border: var(--grist-title-border);
|
|
66
|
-
font: var(--grist-title-font);
|
|
67
|
-
color: var(--secondary-color);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.grist h2 mwc-icon {
|
|
71
|
-
vertical-align: middle;
|
|
72
|
-
margin: var(--grist-title-icon-margin);
|
|
73
|
-
font-size: var(--grist-title-icon-size);
|
|
74
|
-
color: var(--grist-title-icon-color);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
h2 + data-grist {
|
|
78
|
-
padding-top: var(--grist-title-with-grid-padding);
|
|
79
|
-
}
|
|
80
|
-
`
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
get context() {
|
|
85
|
-
return {
|
|
86
|
-
title: i18next.t('title.rejected_vas_order'),
|
|
87
|
-
actions: [
|
|
88
|
-
{
|
|
89
|
-
title: i18next.t('button.back'),
|
|
90
|
-
action: () => history.back(),
|
|
91
|
-
...CommonButtonStyles.back
|
|
92
|
-
}
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
get rejectReasonField() {
|
|
98
|
-
return this.shadowRoot.querySelector('textarea[name=rejectReason]')
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
render() {
|
|
102
|
-
return html`
|
|
103
|
-
<popup-note
|
|
104
|
-
.title="${i18next.t('title.rejection_reason')}"
|
|
105
|
-
.value="${this._rejectReason}"
|
|
106
|
-
.readonly="${true}"
|
|
107
|
-
></popup-note>
|
|
108
|
-
|
|
109
|
-
<div class="container">
|
|
110
|
-
<div class="grist">
|
|
111
|
-
<h2><mwc-icon>list_alt</mwc-icon>${i18next.t('title.vas_order')}</h2>
|
|
112
|
-
|
|
113
|
-
<data-grist
|
|
114
|
-
id="vas-grist"
|
|
115
|
-
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
116
|
-
.config=${this.config}
|
|
117
|
-
.data="${this.data}"
|
|
118
|
-
></data-grist>
|
|
119
|
-
</div>
|
|
120
|
-
|
|
121
|
-
<div class="guide-container">${this._template}</div>
|
|
122
|
-
</div>
|
|
123
|
-
`
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
constructor() {
|
|
127
|
-
super()
|
|
128
|
-
this.data = { records: [] }
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
get vasGrist() {
|
|
132
|
-
return this.shadowRoot.querySelector('data-grist#vas-grist')
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
async pageUpdated(changes) {
|
|
136
|
-
if (this.active) {
|
|
137
|
-
this._vasNo = changes.resourceId || this._vasNo || ''
|
|
138
|
-
this._fetchVasOrder()
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
pageInitialized() {
|
|
142
|
-
this.config = {
|
|
143
|
-
list: { fields: ['targetType', 'targetDisplay', 'vasCount'] },
|
|
144
|
-
pagination: { infinite: true },
|
|
145
|
-
rows: {
|
|
146
|
-
appendable: false,
|
|
147
|
-
handlers: {
|
|
148
|
-
click: (columns, data, column, record, rowIndex) => {
|
|
149
|
-
if (record && record.vas && record.vas.operationGuideType === 'template') {
|
|
150
|
-
this._template = document.createElement(record.vas.operationGuide)
|
|
151
|
-
this._template.record = { ...record, operationGuide: JSON.parse(record.operationGuide) }
|
|
152
|
-
} else {
|
|
153
|
-
this._template = null
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
columns: [
|
|
159
|
-
{ type: 'gutter', gutterName: 'sequence' },
|
|
160
|
-
{
|
|
161
|
-
type: 'string',
|
|
162
|
-
name: 'set',
|
|
163
|
-
header: i18next.t('field.set'),
|
|
164
|
-
record: { align: 'center' },
|
|
165
|
-
width: 100
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
type: 'string',
|
|
169
|
-
name: 'targetType',
|
|
170
|
-
header: i18next.t('field.target_type'),
|
|
171
|
-
record: { align: 'center' },
|
|
172
|
-
width: 150
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
type: 'string',
|
|
176
|
-
name: 'target',
|
|
177
|
-
header: i18next.t('field.target'),
|
|
178
|
-
record: {
|
|
179
|
-
renderer: (value, column, record, rowIndex, field) => {
|
|
180
|
-
if (record.targetType === VAS_BATCH_NO_TYPE) {
|
|
181
|
-
return getRenderer()(record.targetBatchId, column, record, rowIndex, field)
|
|
182
|
-
} else if (record.targetType === VAS_PRODUCT_TYPE) {
|
|
183
|
-
return getRenderer('object')(record.targetProduct, column, record, rowIndex, field)
|
|
184
|
-
} else if (record.targetType === VAS_BATCH_AND_PRODUCT_TYPE) {
|
|
185
|
-
return getRenderer()(
|
|
186
|
-
`${record.targetBatchId} / ${record.targetProduct.name}`,
|
|
187
|
-
column,
|
|
188
|
-
record,
|
|
189
|
-
rowIndex,
|
|
190
|
-
field
|
|
191
|
-
)
|
|
192
|
-
} else if (record.targetType === VAS_ETC_TYPE) {
|
|
193
|
-
return getRenderer()(record.otherTarget, column, record, rowIndex, field)
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
align: 'center'
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
width: 250
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
type: 'object',
|
|
203
|
-
name: 'vas',
|
|
204
|
-
header: i18next.t('field.vas'),
|
|
205
|
-
record: { align: 'center', options: { queryName: 'vass' } },
|
|
206
|
-
width: 250
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
type: 'string',
|
|
210
|
-
name: 'status',
|
|
211
|
-
header: i18next.t('field.status'),
|
|
212
|
-
record: { align: 'center' },
|
|
213
|
-
width: 150
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
type: 'string',
|
|
217
|
-
name: 'remark',
|
|
218
|
-
header: i18next.t('field.remark'),
|
|
219
|
-
record: { align: 'center' },
|
|
220
|
-
width: 350
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
type: 'string',
|
|
224
|
-
name: 'description',
|
|
225
|
-
header: i18next.t('field.comment'),
|
|
226
|
-
width: 350
|
|
227
|
-
}
|
|
228
|
-
]
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
updated(changedProps) {
|
|
233
|
-
if (changedProps.has('_vasNo')) {
|
|
234
|
-
this._fetchVasOrder()
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
async _fetchVasOrder() {
|
|
238
|
-
const response = await client.query({
|
|
239
|
-
query: gql`
|
|
240
|
-
query {
|
|
241
|
-
vasOrder(${gqlBuilder.buildArgs({
|
|
242
|
-
name: this._vasNo
|
|
243
|
-
})}) {
|
|
244
|
-
id
|
|
245
|
-
name
|
|
246
|
-
status
|
|
247
|
-
remark
|
|
248
|
-
orderVass {
|
|
249
|
-
vas {
|
|
250
|
-
name
|
|
251
|
-
description
|
|
252
|
-
operationGuide
|
|
253
|
-
operationGuideType
|
|
254
|
-
}
|
|
255
|
-
set
|
|
256
|
-
targetType
|
|
257
|
-
targetBatchId
|
|
258
|
-
targetProduct {
|
|
259
|
-
id
|
|
260
|
-
name
|
|
261
|
-
description
|
|
262
|
-
}
|
|
263
|
-
otherTarget
|
|
264
|
-
operationGuide
|
|
265
|
-
status
|
|
266
|
-
description
|
|
267
|
-
remark
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
`
|
|
272
|
-
})
|
|
273
|
-
|
|
274
|
-
if (!response.errors) {
|
|
275
|
-
const vasOrder = response.data.vasOrder
|
|
276
|
-
this._rejectReason = vasOrder.remark
|
|
277
|
-
this.data = {
|
|
278
|
-
records: vasOrder.orderVass.map(orderVas => {
|
|
279
|
-
return {
|
|
280
|
-
...orderVas,
|
|
281
|
-
...orderVas.inventory
|
|
282
|
-
}
|
|
283
|
-
})
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
_showToast({ type, message }) {
|
|
289
|
-
document.dispatchEvent(
|
|
290
|
-
new CustomEvent('notify', {
|
|
291
|
-
detail: {
|
|
292
|
-
type,
|
|
293
|
-
message
|
|
294
|
-
}
|
|
295
|
-
})
|
|
296
|
-
)
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
window.customElements.define('rejected-vas-order', RejectedVasOrder)
|