@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
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import '@things-factory/form-ui'
|
|
2
|
-
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
3
2
|
import '@things-factory/grist-ui'
|
|
3
|
+
|
|
4
|
+
import gql from 'graphql-tag'
|
|
5
|
+
import { css, html, LitElement } from 'lit-element'
|
|
6
|
+
|
|
7
|
+
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
4
8
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
9
|
import { client } from '@things-factory/shell'
|
|
6
10
|
import { ScrollbarStyles } from '@things-factory/styles'
|
|
7
|
-
import {
|
|
8
|
-
import gql from 'graphql-tag'
|
|
9
|
-
import { css, html, LitElement } from 'lit-element'
|
|
11
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
10
12
|
|
|
11
13
|
export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
12
14
|
static get properties() {
|
|
@@ -91,27 +93,24 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
91
93
|
<fieldset>
|
|
92
94
|
<label>${i18next.t('label.label_format')}</label>
|
|
93
95
|
<select
|
|
94
|
-
name="labelFormat"
|
|
96
|
+
name="labelFormat"
|
|
95
97
|
@change="${e => {
|
|
96
|
-
this._fullLocationFormat =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
if (this._labelIndicator.value != '') {
|
|
101
|
-
this._getPrintPreview(this._labelIndicator.value)
|
|
102
|
-
}
|
|
103
|
-
}}">
|
|
98
|
+
this._fullLocationFormat = e.currentTarget.value === 'full_format' ? true : false
|
|
99
|
+
if (this._labelIndicator.value != '') this.dataGrist.fetch()
|
|
100
|
+
}}"
|
|
101
|
+
>
|
|
104
102
|
<option value="full_format">A-01-01-01 (${i18next.t('text.full_format')})</option>
|
|
105
103
|
<option value="partial_format">A-01-01 (${i18next.t('text.partial_format')})</option>
|
|
106
104
|
</select>
|
|
107
105
|
|
|
108
106
|
<label>${i18next.t('label.label_indicator')}</label>
|
|
109
|
-
<select
|
|
107
|
+
<select
|
|
108
|
+
name="labelIndicator"
|
|
110
109
|
@change="${e => {
|
|
111
110
|
let indicator = e.currentTarget.value
|
|
112
|
-
if (indicator !== '')
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
if (indicator !== '') this.dataGrist.fetch()
|
|
112
|
+
}}"
|
|
113
|
+
>
|
|
115
114
|
<option value="">-- ${i18next.t('text.please_select_label_indicator')} --</option>
|
|
116
115
|
<option value="zone">${i18next.t('label.zone')}</option>
|
|
117
116
|
<option value="row">${i18next.t('label.row')}</option>
|
|
@@ -151,6 +150,12 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
151
150
|
header: i18next.t('field.name'),
|
|
152
151
|
width: 250
|
|
153
152
|
},
|
|
153
|
+
{
|
|
154
|
+
type: 'string',
|
|
155
|
+
name: 'originalName',
|
|
156
|
+
header: i18next.t('field.original_name'),
|
|
157
|
+
width: 250
|
|
158
|
+
},
|
|
154
159
|
{
|
|
155
160
|
type: 'string',
|
|
156
161
|
name: 'indicator',
|
|
@@ -159,11 +164,6 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
159
164
|
}
|
|
160
165
|
]
|
|
161
166
|
}
|
|
162
|
-
|
|
163
|
-
if (this.selectedLocations && this.selectedLocations.length > 0) {
|
|
164
|
-
this._records = []
|
|
165
|
-
this._total = 0
|
|
166
|
-
}
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
get _labelIndicator() {
|
|
@@ -174,171 +174,157 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
174
174
|
return this.shadowRoot.querySelector('data-grist')
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
async fetchHandler() {
|
|
178
|
-
return
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
}
|
|
177
|
+
async fetchHandler({ page, limit, sorters = [{ name: 'name' }] }) {
|
|
178
|
+
if (this._labelIndicator.value == '') return
|
|
179
|
+
const fetcherDetail = { page, limit, sorters }
|
|
180
|
+
const indicator = this._labelIndicator.value || ''
|
|
183
181
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
182
|
+
let filters = [
|
|
183
|
+
{
|
|
184
|
+
name: 'warehouse_id',
|
|
185
|
+
operator: 'eq',
|
|
186
|
+
value: this.warehouseId
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
|
|
190
|
+
let locations = [],
|
|
191
|
+
totalLocations = 0
|
|
187
192
|
|
|
188
|
-
if (this.selectedLocations && this.selectedLocations.length
|
|
189
|
-
|
|
193
|
+
if (this.selectedLocations && this.selectedLocations.length) {
|
|
194
|
+
filters.push({
|
|
195
|
+
name: 'name',
|
|
196
|
+
operator: 'in',
|
|
197
|
+
value: this.selectedLocations.map(location => location.name)
|
|
198
|
+
})
|
|
199
|
+
const { records, total } = await this._fetchLocations(filters, fetcherDetail)
|
|
200
|
+
locations = records
|
|
201
|
+
totalLocations = total
|
|
190
202
|
} else {
|
|
191
|
-
if (this.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
operator: 'noteq',
|
|
202
|
-
value: 'BUFFER'
|
|
203
|
-
}
|
|
204
|
-
]
|
|
205
|
-
locations = await this._fetchLocations(filters)
|
|
206
|
-
}
|
|
203
|
+
if (this._fullLocationFormat) {
|
|
204
|
+
filters.push({
|
|
205
|
+
name: 'type',
|
|
206
|
+
operator: 'noteq',
|
|
207
|
+
value: 'BUFFER'
|
|
208
|
+
})
|
|
209
|
+
const { records, total } = await this._fetchLocations(filters, fetcherDetail)
|
|
210
|
+
locations = records
|
|
211
|
+
totalLocations = total
|
|
212
|
+
} else {
|
|
207
213
|
// if partial format:
|
|
208
|
-
// prevent from printing same location label. eg: A-01-01-01, A-01-01-02 > will print A-01-01 twice
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
operator: 'eq',
|
|
220
|
-
value: this.warehouseId
|
|
221
|
-
}]
|
|
222
|
-
locations = await this._fetchLocationsByGroup(filters)
|
|
223
|
-
}
|
|
214
|
+
// prevent from printing same location label. eg: A-01-01-01, A-01-01-02 > will print A-01-01 twice{
|
|
215
|
+
if (indicator == 'shelf') {
|
|
216
|
+
this._showToast({
|
|
217
|
+
level: 'error',
|
|
218
|
+
message: i18next.t('text.shelf_is_not_allowed_as_an_indicator_for_partial_format')
|
|
219
|
+
})
|
|
220
|
+
return
|
|
221
|
+
} else {
|
|
222
|
+
const { records, total } = await this._fetchLocationsByGroup(filters, fetcherDetail)
|
|
223
|
+
locations = records
|
|
224
|
+
totalLocations = total
|
|
224
225
|
}
|
|
225
226
|
}
|
|
226
227
|
}
|
|
227
228
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
...location,
|
|
232
|
-
indicator: location[indicator]
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
else {
|
|
229
|
+
return {
|
|
230
|
+
total: totalLocations,
|
|
231
|
+
records: locations.map(location => {
|
|
237
232
|
return {
|
|
238
233
|
...location,
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
:
|
|
242
|
-
|
|
234
|
+
indicator: location[indicator],
|
|
235
|
+
originalName: location.name,
|
|
236
|
+
name:
|
|
237
|
+
location.type === 'BUFFER'
|
|
238
|
+
? ''
|
|
239
|
+
: this._fullLocationFormat // check if full location format is true
|
|
240
|
+
? `${location.zone}-${location.row}-${location.column}-${location.shelf}`
|
|
241
|
+
: `${location.zone}-${location.row}-${location.column}`
|
|
243
242
|
}
|
|
244
|
-
}
|
|
245
|
-
})
|
|
246
|
-
|
|
247
|
-
this._records = locations
|
|
248
|
-
this._total = locations.length
|
|
249
|
-
|
|
250
|
-
this._config = {
|
|
251
|
-
...this._config,
|
|
252
|
-
pagination: { pages: [20, 50, 100, 200] }
|
|
243
|
+
})
|
|
253
244
|
}
|
|
254
|
-
|
|
255
|
-
this.dataGrist.fetch()
|
|
256
245
|
}
|
|
257
246
|
|
|
258
|
-
async _fetchLocations(filters) {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
})}) {
|
|
272
|
-
items {
|
|
273
|
-
name
|
|
274
|
-
zone
|
|
275
|
-
row
|
|
276
|
-
column
|
|
277
|
-
shelf
|
|
278
|
-
}
|
|
279
|
-
total
|
|
247
|
+
async _fetchLocations(filters, fetcherDetail) {
|
|
248
|
+
try {
|
|
249
|
+
const response = await client.query({
|
|
250
|
+
query: gql`
|
|
251
|
+
query locations($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
252
|
+
locations(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
253
|
+
items {
|
|
254
|
+
name
|
|
255
|
+
zone
|
|
256
|
+
row
|
|
257
|
+
column
|
|
258
|
+
shelf
|
|
259
|
+
type
|
|
280
260
|
}
|
|
261
|
+
total
|
|
281
262
|
}
|
|
282
|
-
|
|
283
|
-
|
|
263
|
+
}
|
|
264
|
+
`,
|
|
265
|
+
variables: {
|
|
266
|
+
filters,
|
|
267
|
+
paginations: { page: fetcherDetail.page, limit: fetcherDetail.limit },
|
|
268
|
+
sortings: fetcherDetail.sorters
|
|
269
|
+
}
|
|
270
|
+
})
|
|
284
271
|
|
|
285
|
-
|
|
286
|
-
|
|
272
|
+
if (!response.errors) {
|
|
273
|
+
return {
|
|
274
|
+
records: response.data.locations.items || [],
|
|
275
|
+
total: response.data.locations.total || 0
|
|
287
276
|
}
|
|
288
|
-
} catch (e) {
|
|
289
|
-
this._showToast({
|
|
290
|
-
level: 'error',
|
|
291
|
-
message: e
|
|
292
|
-
})
|
|
293
|
-
} finally {
|
|
294
|
-
this.dataGrist.hideSpinner()
|
|
295
277
|
}
|
|
278
|
+
} catch (e) {
|
|
279
|
+
this._showToast({
|
|
280
|
+
level: 'error',
|
|
281
|
+
message: e
|
|
282
|
+
})
|
|
296
283
|
}
|
|
297
284
|
}
|
|
298
285
|
|
|
299
|
-
async _fetchLocationsByGroup(filters) {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
sortings: sorters
|
|
312
|
-
})}) {
|
|
313
|
-
items {
|
|
314
|
-
name
|
|
315
|
-
zone
|
|
316
|
-
row
|
|
317
|
-
column
|
|
318
|
-
}
|
|
319
|
-
total
|
|
286
|
+
async _fetchLocationsByGroup(filters, fetcherDetail) {
|
|
287
|
+
try {
|
|
288
|
+
const response = await client.query({
|
|
289
|
+
query: gql`
|
|
290
|
+
query locationsByGroup($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
291
|
+
locationsByGroup(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
292
|
+
items {
|
|
293
|
+
name
|
|
294
|
+
zone
|
|
295
|
+
row
|
|
296
|
+
column
|
|
297
|
+
type
|
|
320
298
|
}
|
|
299
|
+
total
|
|
321
300
|
}
|
|
322
|
-
|
|
323
|
-
|
|
301
|
+
}
|
|
302
|
+
`,
|
|
303
|
+
variables: {
|
|
304
|
+
filters,
|
|
305
|
+
paginations: { page: fetcherDetail.page, limit: fetcherDetail.limit },
|
|
306
|
+
sortings: fetcherDetail.sorters
|
|
307
|
+
}
|
|
308
|
+
})
|
|
324
309
|
|
|
325
|
-
|
|
326
|
-
|
|
310
|
+
if (!response.errors) {
|
|
311
|
+
return {
|
|
312
|
+
records: response.data.locationsByGroup.items || [],
|
|
313
|
+
total: response.data.locationsByGroup.total || 0
|
|
327
314
|
}
|
|
328
|
-
} catch (e) {
|
|
329
|
-
this._showToast({
|
|
330
|
-
level: 'error',
|
|
331
|
-
message: e
|
|
332
|
-
})
|
|
333
|
-
} finally {
|
|
334
|
-
this.dataGrist.hideSpinner()
|
|
335
315
|
}
|
|
316
|
+
} catch (e) {
|
|
317
|
+
this._showToast({
|
|
318
|
+
level: 'error',
|
|
319
|
+
message: e
|
|
320
|
+
})
|
|
336
321
|
}
|
|
337
322
|
}
|
|
338
323
|
|
|
339
324
|
_printLocations() {
|
|
340
|
-
|
|
341
|
-
|
|
325
|
+
const records = this.dataGrist.data && this.dataGrist.data.records
|
|
326
|
+
if (records && records.length) {
|
|
327
|
+
this.dispatchEvent(new CustomEvent(i18next.t('text.printing'), { detail: records }))
|
|
342
328
|
history.back()
|
|
343
329
|
} else {
|
|
344
330
|
this._showToast({
|
|
@@ -6,7 +6,7 @@ import '@things-factory/import-ui'
|
|
|
6
6
|
import { openPopup } from '@things-factory/layout-base'
|
|
7
7
|
import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
|
|
8
8
|
import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
|
|
9
|
-
import {
|
|
9
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
10
10
|
import gql from 'graphql-tag'
|
|
11
11
|
import { css, html } from 'lit-element'
|
|
12
12
|
|
|
@@ -232,19 +232,15 @@ class WarehouseList extends localize(i18next)(PageView) {
|
|
|
232
232
|
async fetchHandler({ page, limit, sorters = [] }) {
|
|
233
233
|
const response = await client.query({
|
|
234
234
|
query: gql`
|
|
235
|
-
query {
|
|
236
|
-
warehouses(${
|
|
237
|
-
filters: this.searchForm.queryFilters,
|
|
238
|
-
pagination: { page, limit },
|
|
239
|
-
sortings: sorters
|
|
240
|
-
})}) {
|
|
235
|
+
query warehouses($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
236
|
+
warehouses(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
241
237
|
items {
|
|
242
238
|
id
|
|
243
239
|
name
|
|
244
240
|
type
|
|
245
241
|
description
|
|
246
242
|
updatedAt
|
|
247
|
-
updater{
|
|
243
|
+
updater {
|
|
248
244
|
id
|
|
249
245
|
name
|
|
250
246
|
description
|
|
@@ -253,7 +249,12 @@ class WarehouseList extends localize(i18next)(PageView) {
|
|
|
253
249
|
total
|
|
254
250
|
}
|
|
255
251
|
}
|
|
256
|
-
|
|
252
|
+
`,
|
|
253
|
+
variables: {
|
|
254
|
+
filters: this.searchForm.queryFilters,
|
|
255
|
+
pagination: { page, limit },
|
|
256
|
+
sortings: sorters
|
|
257
|
+
}
|
|
257
258
|
})
|
|
258
259
|
|
|
259
260
|
return {
|
|
@@ -265,14 +266,15 @@ class WarehouseList extends localize(i18next)(PageView) {
|
|
|
265
266
|
async importHandler(patches) {
|
|
266
267
|
const response = await client.query({
|
|
267
268
|
query: gql`
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
})}) {
|
|
272
|
-
name
|
|
273
|
-
}
|
|
269
|
+
mutation updateMultipleWarehouse($patches: [WarehousePatch!]!) {
|
|
270
|
+
updateMultipleWarehouse(patches: $patches) {
|
|
271
|
+
name
|
|
274
272
|
}
|
|
275
|
-
|
|
273
|
+
}
|
|
274
|
+
`,
|
|
275
|
+
variables: {
|
|
276
|
+
patches
|
|
277
|
+
}
|
|
276
278
|
})
|
|
277
279
|
|
|
278
280
|
if (!response.errors) {
|
|
@@ -291,16 +293,17 @@ class WarehouseList extends localize(i18next)(PageView) {
|
|
|
291
293
|
async _saveWarehouse() {
|
|
292
294
|
let patches = this.dataGrist.exportPatchList({ flagName: 'cuFlag' })
|
|
293
295
|
if (patches && patches.length) {
|
|
294
|
-
const response = await client.
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
})}) {
|
|
300
|
-
name
|
|
301
|
-
}
|
|
296
|
+
const response = await client.mutate({
|
|
297
|
+
mutation: gql`
|
|
298
|
+
mutation updateMultipleWarehouse($patches: [WarehousePatch!]!) {
|
|
299
|
+
updateMultipleWarehouse(patches: $patches) {
|
|
300
|
+
name
|
|
302
301
|
}
|
|
303
|
-
|
|
302
|
+
}
|
|
303
|
+
`,
|
|
304
|
+
variables: {
|
|
305
|
+
patches
|
|
306
|
+
}
|
|
304
307
|
})
|
|
305
308
|
|
|
306
309
|
if (!response.errors) {
|
|
@@ -329,10 +332,11 @@ class WarehouseList extends localize(i18next)(PageView) {
|
|
|
329
332
|
if (ids && ids.length > 0) {
|
|
330
333
|
const response = await client.query({
|
|
331
334
|
query: gql`
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
335
|
+
mutation deleteWarehouses($ids: [String!]!) {
|
|
336
|
+
deleteWarehouses(ids: $ids)
|
|
337
|
+
}
|
|
338
|
+
`,
|
|
339
|
+
variables: { ids }
|
|
336
340
|
})
|
|
337
341
|
|
|
338
342
|
if (!response.errors) {
|
|
@@ -6,7 +6,7 @@ import '@things-factory/import-ui'
|
|
|
6
6
|
import { openPopup } from '@things-factory/layout-base'
|
|
7
7
|
import { client, CustomAlert, PageView } from '@things-factory/shell'
|
|
8
8
|
import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
|
|
9
|
-
import {
|
|
9
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
10
10
|
import gql from 'graphql-tag'
|
|
11
11
|
import { css, html } from 'lit-element'
|
|
12
12
|
|
|
@@ -212,19 +212,15 @@ class WorkerList extends localize(i18next)(PageView) {
|
|
|
212
212
|
async fetchHandler({ page, limit, sorters = [] }) {
|
|
213
213
|
const response = await client.query({
|
|
214
214
|
query: gql`
|
|
215
|
-
query {
|
|
216
|
-
workers(${
|
|
217
|
-
filters: this.searchForm.queryFilters,
|
|
218
|
-
pagination: { page, limit },
|
|
219
|
-
sortings: sorters
|
|
220
|
-
})}) {
|
|
215
|
+
query workers($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
216
|
+
workers(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
221
217
|
items {
|
|
222
218
|
id
|
|
223
219
|
name
|
|
224
220
|
description
|
|
225
221
|
type
|
|
226
222
|
updatedAt
|
|
227
|
-
updater{
|
|
223
|
+
updater {
|
|
228
224
|
id
|
|
229
225
|
name
|
|
230
226
|
description
|
|
@@ -233,7 +229,12 @@ class WorkerList extends localize(i18next)(PageView) {
|
|
|
233
229
|
total
|
|
234
230
|
}
|
|
235
231
|
}
|
|
236
|
-
|
|
232
|
+
`,
|
|
233
|
+
variables: {
|
|
234
|
+
filters: this.searchForm.queryFilters,
|
|
235
|
+
pagination: { page, limit },
|
|
236
|
+
sortings: sorters
|
|
237
|
+
}
|
|
237
238
|
})
|
|
238
239
|
|
|
239
240
|
return {
|
|
@@ -245,14 +246,13 @@ class WorkerList extends localize(i18next)(PageView) {
|
|
|
245
246
|
async importHandler(patches) {
|
|
246
247
|
const response = await client.query({
|
|
247
248
|
query: gql`
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
})}) {
|
|
252
|
-
name
|
|
253
|
-
}
|
|
249
|
+
mutation updateMultipleWorker($patches: [WorkerPatch!]!) {
|
|
250
|
+
updateMultipleWorker(patches: $patches) {
|
|
251
|
+
name
|
|
254
252
|
}
|
|
255
|
-
|
|
253
|
+
}
|
|
254
|
+
`,
|
|
255
|
+
variables: { patches }
|
|
256
256
|
})
|
|
257
257
|
|
|
258
258
|
if (!response.errors) {
|
|
@@ -271,16 +271,15 @@ class WorkerList extends localize(i18next)(PageView) {
|
|
|
271
271
|
async _saveWorker() {
|
|
272
272
|
let patches = this.dataGrist.exportPatchList({ flagName: 'cuFlag' })
|
|
273
273
|
if (patches && patches.length) {
|
|
274
|
-
const response = await client.
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
})}) {
|
|
280
|
-
name
|
|
281
|
-
}
|
|
274
|
+
const response = await client.mutate({
|
|
275
|
+
mutation: gql`
|
|
276
|
+
mutation updateMultipleWorker($patches: [WorkerPatch!]!) {
|
|
277
|
+
updateMultipleWorker(patches: $patches) {
|
|
278
|
+
name
|
|
282
279
|
}
|
|
283
|
-
|
|
280
|
+
}
|
|
281
|
+
`,
|
|
282
|
+
variables: { patches }
|
|
284
283
|
})
|
|
285
284
|
|
|
286
285
|
if (!response.errors) {
|
|
@@ -308,12 +307,13 @@ class WorkerList extends localize(i18next)(PageView) {
|
|
|
308
307
|
if (result.value) {
|
|
309
308
|
const ids = this.dataGrist.selected.map(record => record.id)
|
|
310
309
|
if (ids && ids.length > 0) {
|
|
311
|
-
const response = await client.
|
|
312
|
-
|
|
313
|
-
mutation {
|
|
314
|
-
deleteWorkers($
|
|
310
|
+
const response = await client.mutate({
|
|
311
|
+
mutation: gql`
|
|
312
|
+
mutation deleteWorkers($ids: [String!]!) {
|
|
313
|
+
deleteWorkers(ids: $ids)
|
|
315
314
|
}
|
|
316
|
-
|
|
315
|
+
`,
|
|
316
|
+
variables: { ids }
|
|
317
317
|
})
|
|
318
318
|
|
|
319
319
|
if (!response.errors) {
|
|
@@ -5,7 +5,7 @@ import { getRenderer } from '@things-factory/grist-ui'
|
|
|
5
5
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
6
6
|
import { openPopup } from '@things-factory/layout-base'
|
|
7
7
|
import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
|
|
8
|
-
import {
|
|
8
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
9
9
|
import gql from 'graphql-tag'
|
|
10
10
|
import { css, html } from 'lit-element'
|
|
11
11
|
import '../../components/attachment-viewer'
|
|
@@ -3,7 +3,7 @@ import '@things-factory/grist-ui'
|
|
|
3
3
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
4
4
|
import { client, navigate, PageView } from '@things-factory/shell'
|
|
5
5
|
import { ScrollbarStyles } from '@things-factory/styles'
|
|
6
|
-
import {
|
|
6
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
7
7
|
import gql from 'graphql-tag'
|
|
8
8
|
import { css, html } from 'lit-element'
|
|
9
9
|
import { getCodeByName } from '@things-factory/code-base'
|
|
@@ -174,12 +174,8 @@ class CustomerGrnList extends localize(i18next)(PageView) {
|
|
|
174
174
|
const filters = await this.searchForm.getQueryFilters()
|
|
175
175
|
const response = await client.query({
|
|
176
176
|
query: gql`
|
|
177
|
-
query {
|
|
178
|
-
goodsReceivalNotes(${
|
|
179
|
-
filters: [...filters],
|
|
180
|
-
pagination: { page, limit },
|
|
181
|
-
sortings: sorters
|
|
182
|
-
})}) {
|
|
177
|
+
query goodsReceivalNotes($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
178
|
+
goodsReceivalNotes(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
183
179
|
items {
|
|
184
180
|
id
|
|
185
181
|
name
|
|
@@ -208,7 +204,12 @@ class CustomerGrnList extends localize(i18next)(PageView) {
|
|
|
208
204
|
total
|
|
209
205
|
}
|
|
210
206
|
}
|
|
211
|
-
|
|
207
|
+
`,
|
|
208
|
+
variables: {
|
|
209
|
+
filters: [...filters],
|
|
210
|
+
pagination: { page, limit },
|
|
211
|
+
sortings: sorters
|
|
212
|
+
}
|
|
212
213
|
})
|
|
213
214
|
|
|
214
215
|
if (!response.errors) {
|
|
@@ -4,7 +4,7 @@ import { css, html } from 'lit-element'
|
|
|
4
4
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
5
|
import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
|
|
6
6
|
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
7
|
-
import { getPathInfo
|
|
7
|
+
import { getPathInfo } from '@things-factory/utils'
|
|
8
8
|
|
|
9
9
|
class CustomerReceivedNote extends localize(i18next)(PageView) {
|
|
10
10
|
static get properties() {
|
|
@@ -136,14 +136,15 @@ class CustomerReceivedNote extends localize(i18next)(PageView) {
|
|
|
136
136
|
|
|
137
137
|
const response = await client.query({
|
|
138
138
|
query: gql`
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
name
|
|
139
|
+
mutation receivedGoodsReceivalNote($name: String!) {
|
|
140
|
+
receivedGoodsReceivalNote(name: $name) {
|
|
141
|
+
name
|
|
142
|
+
}
|
|
144
143
|
}
|
|
144
|
+
`,
|
|
145
|
+
variables: {
|
|
146
|
+
name: this._grnNo
|
|
145
147
|
}
|
|
146
|
-
`
|
|
147
148
|
})
|
|
148
149
|
|
|
149
150
|
if (!response.errors) {
|