@things-factory/operato-wms 4.3.0-alpha.1 → 4.3.2
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/constants/index.js +1 -0
- package/client/constants/order.js +14 -0
- package/client/pages/constants/index.js +1 -0
- package/client/pages/constants/setting.js +1 -0
- package/client/pages/constants/tote.js +14 -0
- package/client/pages/inbound/putaway-product.js +3 -1
- package/client/pages/inbound/unload-product.js +21 -11
- package/client/pages/inventory/inventory-adjustment-approval.js +24 -9
- package/client/pages/inventory/inventory-adjustment.js +79 -13
- package/client/pages/master/product/product-list.js +1 -1
- package/client/pages/master/tote-list.js +740 -0
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +0 -2
- package/client/pages/order/arrival-notice/receive-arrival-notice.js +0 -2
- package/client/pages/order/draft-release-good/draft-release-good-detail.js +1163 -0
- package/client/pages/order/draft-release-good/draft-release-good-list.js +546 -0
- package/client/pages/order/goods-received-note/customer-received-note.js +3 -0
- package/client/pages/order/goods-received-note/received-note-detail.js +3 -0
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +21 -30
- package/client/pages/order/release-order/bulk-print-packing-list.js +4 -0
- package/client/pages/order/release-order/receive-release-order-request.js +0 -2
- package/client/pages/order/release-order/release-order-detail.js +44 -26
- package/client/pages/order/return-order/receive-return-order-requests.js +0 -2
- package/client/pages/order/transfer-order/receive-transfer-order-request.js +1 -1
- package/client/pages/order/transport-order/print-delivery-note.js +0 -1
- package/client/pages/order/transport-order/view-delivery-note.js +1 -1
- package/client/pages/order/vas-order/receive-vas-order.js +0 -2
- package/client/pages/outbound/inventory-assign-popup.js +7 -2
- package/client/pages/outbound/inventory-auto-assign-popup.js +2 -1
- package/client/pages/outbound/loading-product.js +49 -11
- package/client/pages/outbound/order-remark-popup.js +112 -0
- package/client/pages/outbound/packing-product.js +42 -6
- package/client/pages/outbound/packing-worksheet-list.js +15 -0
- package/client/pages/outbound/picking-product.js +150 -13
- package/client/pages/outbound/single-outbound-worksheet.js +10 -22
- package/client/pages/outbound/sorting-product.js +78 -15
- package/client/pages/outbound/tote-popup.js +461 -0
- package/client/pages/outbound/worksheet-batch-picking.js +9 -2
- package/client/pages/outbound/worksheet-packing.js +7 -2
- package/client/pages/outbound/worksheet-picking.js +9 -2
- package/client/pages/report/inventory-summary-report.js +8 -0
- package/client/pages/report/outbound-order-details-report.js +18 -0
- package/client/pages/vas/abstract-execute-vas.js +12 -7
- package/client/pages/vas/print-product-label.js +15 -6
- package/client/pages/vas/reverse-kitting/execute-reverse-kitting.js +3 -1
- package/client/pages/vas/reverse-kitting/popup-reverse-kitting-template.js +3 -1
- package/client/route.js +12 -0
- package/dist-server/entities/index.js +2 -1
- package/dist-server/entities/index.js.map +1 -1
- package/dist-server/entities/warehouse-bizplace-onhand-inventory.js +168 -0
- package/dist-server/entities/warehouse-bizplace-onhand-inventory.js.map +1 -0
- package/dist-server/graphql/index.js +1 -5
- package/dist-server/graphql/index.js.map +1 -1
- package/dist-server/graphql/resolvers/board-setting/board-settings.js +2 -1
- package/dist-server/graphql/resolvers/board-setting/board-settings.js.map +1 -1
- package/dist-server/graphql/resolvers/index.js +4 -7
- package/dist-server/graphql/resolvers/index.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +3 -1
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/index.js +6 -0
- package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/index.js.map +1 -0
- package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js +58 -0
- package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js.map +1 -0
- package/dist-server/graphql/types/index.js +5 -8
- package/dist-server/graphql/types/index.js.map +1 -1
- package/dist-server/graphql/types/reports/outbound-order-details-report.js +2 -0
- package/dist-server/graphql/types/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/types/warehouse-inventory-adjustment/index.js +9 -0
- package/dist-server/graphql/types/warehouse-inventory-adjustment/index.js.map +1 -0
- package/dist-server/index.js +2 -5
- package/dist-server/index.js.map +1 -1
- package/dist-server/opa-app-setting-constants.js +2 -1
- package/dist-server/opa-app-setting-constants.js.map +1 -1
- package/dist-server/utils/index.js +1 -5
- package/dist-server/utils/index.js.map +1 -1
- package/helps/release-note.ko.md +11 -9
- package/helps/release-note.md +11 -9
- package/helps/release-note.ms.md +11 -9
- package/helps/release-note.zh.md +11 -9
- package/package.json +50 -50
- package/server/entities/index.ts +2 -2
- package/server/entities/warehouse-bizplace-onhand-inventory.ts +141 -0
- package/server/graphql/resolvers/board-setting/board-settings.ts +4 -2
- package/server/graphql/resolvers/index.ts +3 -2
- package/server/graphql/resolvers/reports/outbound-order-details-report.ts +6 -2
- package/server/graphql/resolvers/warehouse-inventory-adjustment/index.ts +5 -0
- package/server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.ts +68 -0
- package/server/graphql/types/index.ts +4 -4
- package/server/graphql/types/reports/outbound-order-details-report.ts +2 -0
- package/server/graphql/types/warehouse-inventory-adjustment/index.ts +5 -0
- package/server/index.ts +2 -1
- package/server/opa-app-setting-constants.ts +1 -0
- package/things-factory.config.js +13 -0
- package/translations/en.json +48 -8
- package/translations/ko.json +35 -1
- package/translations/ms.json +35 -1
- package/translations/zh.json +35 -1
- package/config.development.js +0 -73
- package/config.production.js +0 -113
|
@@ -55,6 +55,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
55
55
|
_containerArrivalDate: Date,
|
|
56
56
|
_containerLeavingDate: Date,
|
|
57
57
|
_vasExpanded: Boolean,
|
|
58
|
+
_beforeRemark: String,
|
|
58
59
|
isUserBelongsDomain: Boolean
|
|
59
60
|
}
|
|
60
61
|
}
|
|
@@ -309,6 +310,10 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
309
310
|
<label ?hidden="${this.roType === 'b2b'}">${i18next.t('label.delivery_address')}</label>
|
|
310
311
|
<textarea name="deliveryAddress1" ?hidden="${this.roType === 'b2b'}" rows="5" readonly></textarea>
|
|
311
312
|
|
|
313
|
+
<label ?hidden="${this.roType === 'b2b'}">${i18next.t('label.order_remark')}</label>
|
|
314
|
+
<textarea name="remark" ?hidden="${this.roType === 'b2b'}" rows="5" ?readonly="${!this
|
|
315
|
+
?._editable}"></textarea>
|
|
316
|
+
|
|
312
317
|
${
|
|
313
318
|
this._crossDocking
|
|
314
319
|
? html`
|
|
@@ -557,6 +562,10 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
557
562
|
return this.shadowRoot.querySelector('input[name=warehouseTransport]')
|
|
558
563
|
}
|
|
559
564
|
|
|
565
|
+
get _remarkInput() {
|
|
566
|
+
return this.shadowRoot.querySelector('textarea[name=remark]')
|
|
567
|
+
}
|
|
568
|
+
|
|
560
569
|
get _exportInput() {
|
|
561
570
|
return this.shadowRoot.querySelector('input[name=exportOption]')
|
|
562
571
|
}
|
|
@@ -749,7 +758,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
749
758
|
type: 'object',
|
|
750
759
|
name: 'vas',
|
|
751
760
|
header: i18next.t('field.vas'),
|
|
752
|
-
record: { options: { queryName: 'vass' } },
|
|
753
761
|
width: 250
|
|
754
762
|
},
|
|
755
763
|
{
|
|
@@ -790,6 +798,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
790
798
|
attentionTo
|
|
791
799
|
phone1
|
|
792
800
|
deliveryAddress1
|
|
801
|
+
remark
|
|
793
802
|
bizplace {
|
|
794
803
|
id
|
|
795
804
|
name
|
|
@@ -934,6 +943,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
934
943
|
this.partnerBizplaceId = releaseOrder.bizplace.id
|
|
935
944
|
this._exportOption = releaseOrder.exportOption
|
|
936
945
|
|
|
946
|
+
this._beforeRemark = releaseOrder?.remark
|
|
937
947
|
this._courierOption = releaseOrder.courierOption
|
|
938
948
|
this._packingOption = releaseOrder.packingOption
|
|
939
949
|
this._crossDocking = releaseOrder?.crossDocking
|
|
@@ -964,7 +974,9 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
964
974
|
this._attachments = releaseOrder && releaseOrder.attachment
|
|
965
975
|
}
|
|
966
976
|
|
|
967
|
-
|
|
977
|
+
const nonEditableStatus = ['DONE', 'PACKING']
|
|
978
|
+
|
|
979
|
+
if (!nonEditableStatus.includes(releaseOrder.status) && this.isUserBelongsDomain) {
|
|
968
980
|
this._editable = true
|
|
969
981
|
} else {
|
|
970
982
|
this._editable = false
|
|
@@ -1044,8 +1056,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1044
1056
|
title: i18next.t('title.reject_release_order')
|
|
1045
1057
|
}
|
|
1046
1058
|
)
|
|
1047
|
-
|
|
1048
|
-
popup.onclosed
|
|
1049
1059
|
}
|
|
1050
1060
|
|
|
1051
1061
|
async _receiveReleaseOrder() {
|
|
@@ -1209,6 +1219,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1209
1219
|
this._packingOption = false
|
|
1210
1220
|
this._ownTransport = true
|
|
1211
1221
|
this._downloadable = true
|
|
1222
|
+
this._beforeRemark = null
|
|
1212
1223
|
this._attachments = []
|
|
1213
1224
|
this.inventoryData = { records: [] }
|
|
1214
1225
|
this.vasData = { records: [] }
|
|
@@ -1216,10 +1227,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1216
1227
|
|
|
1217
1228
|
async _deleteReleaseOrder() {
|
|
1218
1229
|
try {
|
|
1219
|
-
let userIsOfficeAdmin = this._userRoles
|
|
1220
|
-
? this._userRoles.find(x => x.name?.toLowerCase() === 'office admin')
|
|
1221
|
-
: false
|
|
1222
|
-
|
|
1223
1230
|
let result = await CustomAlert({
|
|
1224
1231
|
title: i18next.t('title.are_you_sure'),
|
|
1225
1232
|
text: i18next.t('text.you_wont_be_able_to_revert_this'),
|
|
@@ -1260,10 +1267,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1260
1267
|
}
|
|
1261
1268
|
|
|
1262
1269
|
async _submitCancellationReleaseOrder() {
|
|
1263
|
-
let userIsOfficeAdmin = this._userRoles
|
|
1264
|
-
? this._userRoles.find(x => x.name?.toLowerCase() === 'office admin')
|
|
1265
|
-
: false
|
|
1266
|
-
|
|
1267
1270
|
try {
|
|
1268
1271
|
const result = await CustomAlert({
|
|
1269
1272
|
title: i18next.t('title.are_you_sure'),
|
|
@@ -1311,10 +1314,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1311
1314
|
}
|
|
1312
1315
|
|
|
1313
1316
|
async _confirmReleaseOrder() {
|
|
1314
|
-
let userIsOfficeAdmin = this._userRoles
|
|
1315
|
-
? this._userRoles.find(x => x.name?.toLowerCase() === 'office admin')
|
|
1316
|
-
: false
|
|
1317
|
-
|
|
1318
1317
|
let result = await CustomAlert({
|
|
1319
1318
|
title: i18next.t('title.are_you_sure'),
|
|
1320
1319
|
text: i18next.t('text.confirm_release_good'),
|
|
@@ -1360,7 +1359,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1360
1359
|
try {
|
|
1361
1360
|
const response = await client.query({
|
|
1362
1361
|
query: gql`
|
|
1363
|
-
query {
|
|
1362
|
+
query checkUserBelongsDomain {
|
|
1364
1363
|
checkUserBelongsDomain
|
|
1365
1364
|
}
|
|
1366
1365
|
`
|
|
@@ -1431,6 +1430,31 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1431
1430
|
this._validateTransport()
|
|
1432
1431
|
this._validateForm()
|
|
1433
1432
|
|
|
1433
|
+
let releaseOrder = this._getFormInfo()
|
|
1434
|
+
delete releaseOrder.warehouseTransport
|
|
1435
|
+
delete releaseOrder.bizplaceId
|
|
1436
|
+
delete releaseOrder.bizplaceName
|
|
1437
|
+
delete releaseOrder.status
|
|
1438
|
+
delete releaseOrder.ganNo
|
|
1439
|
+
|
|
1440
|
+
let afterRemarkValue
|
|
1441
|
+
if (releaseOrder?.remark) {
|
|
1442
|
+
afterRemarkValue = releaseOrder.remark = releaseOrder.remark.trimStart()
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
if (this._beforeRemark !== afterRemarkValue) {
|
|
1446
|
+
if (!afterRemarkValue) {
|
|
1447
|
+
const remarkResult = await CustomAlert({
|
|
1448
|
+
title: i18next.t('title.removing_order_remark'),
|
|
1449
|
+
text: i18next.t('text.do_you_want_to_proceed'),
|
|
1450
|
+
confirmButton: { text: i18next.t('button.proceed') },
|
|
1451
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
1452
|
+
})
|
|
1453
|
+
|
|
1454
|
+
if (!remarkResult.value) return
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1434
1458
|
const result = await CustomAlert({
|
|
1435
1459
|
title: i18next.t('title.are_you_sure'),
|
|
1436
1460
|
text: i18next.t('text.update_release_order_details'),
|
|
@@ -1440,13 +1464,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1440
1464
|
|
|
1441
1465
|
if (!result.value) return
|
|
1442
1466
|
|
|
1443
|
-
let releaseOrder = this._getFormInfo()
|
|
1444
|
-
delete releaseOrder.warehouseTransport
|
|
1445
|
-
delete releaseOrder.bizplaceId
|
|
1446
|
-
delete releaseOrder.bizplaceName
|
|
1447
|
-
delete releaseOrder.status
|
|
1448
|
-
delete releaseOrder.ganNo
|
|
1449
|
-
|
|
1450
1467
|
let shippingOrder = this._exportOption ? this._serializeForm(this.shippingOrderForm) : null
|
|
1451
1468
|
|
|
1452
1469
|
const response = await client.mutate({
|
|
@@ -1479,14 +1496,15 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1479
1496
|
}
|
|
1480
1497
|
|
|
1481
1498
|
_getFormInfo() {
|
|
1482
|
-
|
|
1499
|
+
let formData = this._serializeForm(this.releaseOrderForm)
|
|
1483
1500
|
delete formData.importedOrder
|
|
1501
|
+
|
|
1484
1502
|
return formData
|
|
1485
1503
|
}
|
|
1486
1504
|
|
|
1487
1505
|
_serializeForm(form) {
|
|
1488
1506
|
let obj = {}
|
|
1489
|
-
Array.from(form.querySelectorAll('input, select')).forEach(field => {
|
|
1507
|
+
Array.from(form.querySelectorAll('input, select, textarea')).forEach(field => {
|
|
1490
1508
|
if (!field.hasAttribute('hidden')) {
|
|
1491
1509
|
obj[field.name] = field.type === 'checkbox' ? field.checked : field.value
|
|
1492
1510
|
}
|
|
@@ -34,7 +34,8 @@ class InventoryAssignPopup extends localize(i18next)(LitElement) {
|
|
|
34
34
|
_data: Object,
|
|
35
35
|
data: Object,
|
|
36
36
|
pickQty: Number,
|
|
37
|
-
pickUomValue: Number
|
|
37
|
+
pickUomValue: Number,
|
|
38
|
+
orderProductId: String
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -511,7 +512,11 @@ class InventoryAssignPopup extends localize(i18next)(LitElement) {
|
|
|
511
512
|
product: { id: record.product.id },
|
|
512
513
|
releaseQty: record.pickQty,
|
|
513
514
|
releaseUomValue: record.pickUomValue,
|
|
514
|
-
type: ORDER_TYPES.RELEASE_OF_GOODS.value
|
|
515
|
+
type: ORDER_TYPES.RELEASE_OF_GOODS.value,
|
|
516
|
+
uom: record.uom
|
|
517
|
+
},
|
|
518
|
+
targetProduct: {
|
|
519
|
+
id: this.orderProductId
|
|
515
520
|
}
|
|
516
521
|
}
|
|
517
522
|
})
|
|
@@ -232,7 +232,8 @@ class InventoryAutoAssignPopup extends localize(i18next)(LitElement) {
|
|
|
232
232
|
uom: item.uom,
|
|
233
233
|
releaseQty: item.releaseQty,
|
|
234
234
|
releaseUomValue: item.releaseUomValue,
|
|
235
|
-
pickingStrategy: item.product.pickingStrategy
|
|
235
|
+
pickingStrategy: item.product.pickingStrategy,
|
|
236
|
+
orderProductId: item.orderProduct.id
|
|
236
237
|
}
|
|
237
238
|
})
|
|
238
239
|
}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import '@things-factory/barcode-ui'
|
|
2
|
-
import { MultiColumnFormStyles, SingleColumnFormStyles } from '@things-factory/form-ui'
|
|
3
2
|
import '@things-factory/grist-ui'
|
|
3
|
+
import './return-pallet-check-popup'
|
|
4
|
+
import './transport-vehicles-popup'
|
|
5
|
+
|
|
6
|
+
import gql from 'graphql-tag'
|
|
7
|
+
import { css, html } from 'lit-element'
|
|
8
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
9
|
+
|
|
10
|
+
import { sleep } from '@operato/utils'
|
|
11
|
+
import { MultiColumnFormStyles, SingleColumnFormStyles } from '@things-factory/form-ui'
|
|
4
12
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
13
|
import { openPopup } from '@things-factory/layout-base'
|
|
6
14
|
import { client, CustomAlert, PageView, store } from '@things-factory/shell'
|
|
7
15
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
8
16
|
import { isMobileDevice } from '@things-factory/utils'
|
|
9
|
-
|
|
10
|
-
import { css, html } from 'lit-element'
|
|
11
|
-
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
17
|
+
|
|
12
18
|
import { WORKSHEET_STATUS } from '../constants'
|
|
13
|
-
import './return-pallet-check-popup'
|
|
14
|
-
import './transport-vehicles-popup'
|
|
15
19
|
|
|
16
20
|
class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
17
21
|
static get properties() {
|
|
@@ -285,7 +289,8 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
285
289
|
}
|
|
286
290
|
}
|
|
287
291
|
|
|
288
|
-
_openBufferSelector() {
|
|
292
|
+
async _openBufferSelector() {
|
|
293
|
+
await sleep(1010)
|
|
289
294
|
openPopup(
|
|
290
295
|
html`
|
|
291
296
|
<transport-vehicles-popup
|
|
@@ -337,6 +342,12 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
337
342
|
columns: [
|
|
338
343
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
339
344
|
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
345
|
+
{
|
|
346
|
+
type: 'string',
|
|
347
|
+
name: 'toteName',
|
|
348
|
+
header: i18next.t('field.tote'),
|
|
349
|
+
width: 140
|
|
350
|
+
},
|
|
340
351
|
{
|
|
341
352
|
type: 'string',
|
|
342
353
|
name: 'palletId',
|
|
@@ -520,6 +531,7 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
520
531
|
}
|
|
521
532
|
worksheetDetailInfos {
|
|
522
533
|
name
|
|
534
|
+
toteName
|
|
523
535
|
palletId
|
|
524
536
|
batchId
|
|
525
537
|
batchIdRef
|
|
@@ -588,9 +600,34 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
588
600
|
async _loading() {
|
|
589
601
|
try {
|
|
590
602
|
this._validateLoading()
|
|
591
|
-
const
|
|
592
|
-
|
|
593
|
-
|
|
603
|
+
const toteList = this.pickedProductGrist.selected.filter(itm => itm.toteName)
|
|
604
|
+
|
|
605
|
+
let loadedWorksheetDetails = []
|
|
606
|
+
|
|
607
|
+
if (toteList[0]?.toteName) {
|
|
608
|
+
loadedWorksheetDetails = this.pickedProductGrist.selected
|
|
609
|
+
.map(record => {
|
|
610
|
+
return { name: record.name, loadedQty: record.loadedQty, toteName: record.toteName }
|
|
611
|
+
})
|
|
612
|
+
.filter(itm => !itm.toteName)
|
|
613
|
+
|
|
614
|
+
let toteRecords = this.pickedProductGrist.data.records
|
|
615
|
+
.filter(record => {
|
|
616
|
+
return toteList.some(list => {
|
|
617
|
+
return list.toteName == record.toteName
|
|
618
|
+
})
|
|
619
|
+
})
|
|
620
|
+
.map(itm => {
|
|
621
|
+
return { name: itm.name, loadedQty: itm.loadedQty, toteName: itm.toteName }
|
|
622
|
+
})
|
|
623
|
+
|
|
624
|
+
loadedWorksheetDetails = loadedWorksheetDetails.concat(toteRecords)
|
|
625
|
+
} else {
|
|
626
|
+
loadedWorksheetDetails = this.pickedProductGrist.selected.map(record => {
|
|
627
|
+
return { name: record.name, loadedQty: record.loadedQty, toteName: record.toteName }
|
|
628
|
+
})
|
|
629
|
+
}
|
|
630
|
+
|
|
594
631
|
let truckNo = null
|
|
595
632
|
if (!this._ownCollection) {
|
|
596
633
|
truckNo = this.warehouseTruckInput.value
|
|
@@ -840,7 +877,8 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
840
877
|
}
|
|
841
878
|
}
|
|
842
879
|
|
|
843
|
-
_validateRemainPallets(data) {
|
|
880
|
+
async _validateRemainPallets(data) {
|
|
881
|
+
await sleep(1010)
|
|
844
882
|
openPopup(
|
|
845
883
|
html`
|
|
846
884
|
<return-pallet-check-popup
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import '@things-factory/grist-ui'
|
|
2
|
+
|
|
3
|
+
import gql from 'graphql-tag'
|
|
4
|
+
import { css, html, LitElement } from 'lit-element'
|
|
5
|
+
|
|
6
|
+
import { SingleColumnFormStyles } from '@things-factory/form-ui'
|
|
7
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
8
|
+
import { client } from '@things-factory/shell'
|
|
9
|
+
|
|
10
|
+
class OrderRemarkPopup extends localize(i18next)(LitElement) {
|
|
11
|
+
static get properties() {
|
|
12
|
+
return {
|
|
13
|
+
orderRemark: String,
|
|
14
|
+
releaseGoodNo: String,
|
|
15
|
+
checkedRemarkAt: String
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
static get styles() {
|
|
20
|
+
return [
|
|
21
|
+
SingleColumnFormStyles,
|
|
22
|
+
css`
|
|
23
|
+
:host {
|
|
24
|
+
padding: 10px;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
overflow-x: overlay;
|
|
28
|
+
background-color: var(--main-section-background-color);
|
|
29
|
+
}
|
|
30
|
+
.button-container {
|
|
31
|
+
padding: var(--button-container-padding);
|
|
32
|
+
margin: var(--button-container-margin);
|
|
33
|
+
text-align: var(--button-container-align);
|
|
34
|
+
background-color: var(--button-container-background);
|
|
35
|
+
height: var(--button-container-height);
|
|
36
|
+
}
|
|
37
|
+
.button-container button {
|
|
38
|
+
background-color: var(--button-container-button-background-color);
|
|
39
|
+
border-radius: var(--button-container-button-border-radius);
|
|
40
|
+
height: var(--button-container-button-height);
|
|
41
|
+
border: var(--button-container-button-border);
|
|
42
|
+
margin: var(--button-container-button-margin);
|
|
43
|
+
|
|
44
|
+
padding: var(--button-padding);
|
|
45
|
+
color: var(--theme-white-color);
|
|
46
|
+
font: var(--button-font);
|
|
47
|
+
text-transform: var(--button-text-transform);
|
|
48
|
+
}
|
|
49
|
+
.button-container button:hover,
|
|
50
|
+
.button-container button:active {
|
|
51
|
+
background-color: var(--button-background-focus-color);
|
|
52
|
+
}
|
|
53
|
+
`
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
render() {
|
|
58
|
+
const remarkValue = this.orderRemark || ''
|
|
59
|
+
const checkedRemarkAt = this.checkedRemarkAt || ''
|
|
60
|
+
|
|
61
|
+
return html`
|
|
62
|
+
<form id="input-form" class="single-column-form">
|
|
63
|
+
<fieldset>
|
|
64
|
+
<label>${i18next.t('label.order_remark')}</label>
|
|
65
|
+
<textarea name="remark" row="10" readonly .value=${remarkValue}></textarea>
|
|
66
|
+
</fieldset>
|
|
67
|
+
</form>
|
|
68
|
+
<div class="button-container">
|
|
69
|
+
${checkedRemarkAt
|
|
70
|
+
? html`
|
|
71
|
+
<mwc-button
|
|
72
|
+
danger
|
|
73
|
+
raised
|
|
74
|
+
@click="${e => history.back()}"
|
|
75
|
+
label="${i18next.t('button.back')}"
|
|
76
|
+
></mwc-button>
|
|
77
|
+
`
|
|
78
|
+
: html`
|
|
79
|
+
<mwc-button
|
|
80
|
+
danger
|
|
81
|
+
raised
|
|
82
|
+
@click="${e => history.back()}"
|
|
83
|
+
label="${i18next.t('button.back')}"
|
|
84
|
+
></mwc-button>
|
|
85
|
+
<mwc-button
|
|
86
|
+
raised
|
|
87
|
+
@click="${this._executeOrderRemark.bind(this)}"
|
|
88
|
+
label="${i18next.t('button.check')}"
|
|
89
|
+
></mwc-button>
|
|
90
|
+
`}
|
|
91
|
+
</div>
|
|
92
|
+
`
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
async _executeOrderRemark() {
|
|
96
|
+
const response = await client.mutate({
|
|
97
|
+
mutation: gql`
|
|
98
|
+
mutation executeOrderRemark($releaseGoodNo: String!) {
|
|
99
|
+
executeOrderRemark(releaseGoodNo: $releaseGoodNo)
|
|
100
|
+
}
|
|
101
|
+
`,
|
|
102
|
+
variables: { releaseGoodNo: this.releaseGoodNo }
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
if (!response.errors) {
|
|
106
|
+
this.dispatchEvent(new CustomEvent('remark-checked'))
|
|
107
|
+
history.back()
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
window.customElements.define('order-remark-popup', OrderRemarkPopup)
|
|
@@ -2,12 +2,14 @@ import '@things-factory/barcode-ui'
|
|
|
2
2
|
import '@things-factory/grist-ui'
|
|
3
3
|
import '../components/worksheet-information-popup'
|
|
4
4
|
import './serial-number-popup'
|
|
5
|
+
import './order-remark-popup'
|
|
5
6
|
|
|
6
7
|
import gql from 'graphql-tag'
|
|
7
8
|
import { css, html } from 'lit-element'
|
|
8
9
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
9
10
|
|
|
10
11
|
import { GhostPrint } from '@operato/ghost-print'
|
|
12
|
+
import { sleep } from '@operato/utils'
|
|
11
13
|
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
12
14
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
13
15
|
import { openPopup } from '@things-factory/layout-base'
|
|
@@ -22,10 +24,12 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
22
24
|
static get properties() {
|
|
23
25
|
return {
|
|
24
26
|
airwayBill: String,
|
|
27
|
+
checkedRemarkAt: String,
|
|
25
28
|
config: Object,
|
|
26
29
|
data: Object,
|
|
27
30
|
invoice: String,
|
|
28
31
|
orderInformation: String,
|
|
32
|
+
orderRemark: String,
|
|
29
33
|
platform: String,
|
|
30
34
|
releaseGoodNo: String,
|
|
31
35
|
releaseGoodId: String,
|
|
@@ -74,7 +78,11 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
get completed() {
|
|
77
|
-
|
|
81
|
+
if (this.orderRemark) {
|
|
82
|
+
return this.data.records.every(record => record.completed) && Boolean(this.checkedRemarkAt)
|
|
83
|
+
} else {
|
|
84
|
+
return this.data.records.every(record => record.completed)
|
|
85
|
+
}
|
|
78
86
|
}
|
|
79
87
|
|
|
80
88
|
get context() {
|
|
@@ -136,11 +144,11 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
136
144
|
})
|
|
137
145
|
}
|
|
138
146
|
|
|
139
|
-
if (this.
|
|
147
|
+
if (this.orderRemark) {
|
|
140
148
|
actions.push({
|
|
141
|
-
title: i18next.t('button.
|
|
142
|
-
action: this.
|
|
143
|
-
...CommonButtonStyles.
|
|
149
|
+
title: i18next.t('button.order_remark'),
|
|
150
|
+
action: this._openOrderRemarkPopup.bind(this),
|
|
151
|
+
...CommonButtonStyles.inspect
|
|
144
152
|
})
|
|
145
153
|
}
|
|
146
154
|
|
|
@@ -385,9 +393,12 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
385
393
|
releaseGood {
|
|
386
394
|
id
|
|
387
395
|
name
|
|
396
|
+
remark
|
|
397
|
+
checkedRemarkAt
|
|
388
398
|
}
|
|
389
399
|
bizplaceName
|
|
390
400
|
partnerDomainId
|
|
401
|
+
checkedRemarkBy
|
|
391
402
|
refNo
|
|
392
403
|
refNo2
|
|
393
404
|
refNo3
|
|
@@ -479,6 +490,8 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
479
490
|
this.platform = worksheetInfo.platform
|
|
480
491
|
this.shippingProvider = worksheetInfo.shippingProvider
|
|
481
492
|
this.orderInformation = worksheetInfo.marketplaceOrder
|
|
493
|
+
this.orderRemark = worksheetInfo.releaseGood?.remark
|
|
494
|
+
this.checkedRemarkAt = worksheetInfo.releaseGood?.checkedRemarkAt
|
|
482
495
|
|
|
483
496
|
this._isBatchPicking = worksheetDetailInfos[0].relatedOrderInv?.refWorksheetId ? true : false
|
|
484
497
|
|
|
@@ -831,6 +844,28 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
831
844
|
}
|
|
832
845
|
}
|
|
833
846
|
|
|
847
|
+
async _openOrderRemarkPopup() {
|
|
848
|
+
await sleep(1010)
|
|
849
|
+
openPopup(
|
|
850
|
+
html`
|
|
851
|
+
<order-remark-popup
|
|
852
|
+
.orderRemark="${this.orderRemark}"
|
|
853
|
+
.releaseGoodNo="${this.releaseGoodNo}"
|
|
854
|
+
.checkedRemarkAt="${this.checkedRemarkAt}"
|
|
855
|
+
@remark-checked="${async () => {
|
|
856
|
+
await this._fetchInventories(this.releaseGoodNo)
|
|
857
|
+
this._showToast({ message: i18next.t('text.order_remark_has_been_checked') })
|
|
858
|
+
}}"
|
|
859
|
+
></order-remark-popup>
|
|
860
|
+
`,
|
|
861
|
+
{
|
|
862
|
+
backdrop: true,
|
|
863
|
+
size: 'medium',
|
|
864
|
+
title: i18next.t('title.order_remark')
|
|
865
|
+
}
|
|
866
|
+
)
|
|
867
|
+
}
|
|
868
|
+
|
|
834
869
|
_openWorksheetInformation() {
|
|
835
870
|
openPopup(
|
|
836
871
|
html`
|
|
@@ -844,7 +879,8 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
844
879
|
)
|
|
845
880
|
}
|
|
846
881
|
|
|
847
|
-
openSerialNumberPopup() {
|
|
882
|
+
async openSerialNumberPopup() {
|
|
883
|
+
await sleep(1010)
|
|
848
884
|
openPopup(
|
|
849
885
|
html`
|
|
850
886
|
<serial-number-popup
|
|
@@ -159,6 +159,13 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
|
|
|
159
159
|
})()
|
|
160
160
|
},
|
|
161
161
|
value: new Date().toISOString().split('T')[0]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
label: i18next.t('field.order_remark'),
|
|
165
|
+
name: 'orderRemark',
|
|
166
|
+
type: 'checkbox',
|
|
167
|
+
props: { searchOper: 'eq' },
|
|
168
|
+
attrs: ['indeterminate']
|
|
162
169
|
}
|
|
163
170
|
]
|
|
164
171
|
|
|
@@ -187,6 +194,13 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
|
|
|
187
194
|
}
|
|
188
195
|
}
|
|
189
196
|
},
|
|
197
|
+
{
|
|
198
|
+
type: 'boolean',
|
|
199
|
+
name: 'orderRemark',
|
|
200
|
+
header: i18next.t('field.order_remark'),
|
|
201
|
+
sortable: true,
|
|
202
|
+
width: 100
|
|
203
|
+
},
|
|
190
204
|
{
|
|
191
205
|
type: 'object',
|
|
192
206
|
name: 'releaseGood',
|
|
@@ -296,6 +310,7 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
|
|
|
296
310
|
name
|
|
297
311
|
description
|
|
298
312
|
}
|
|
313
|
+
orderRemark
|
|
299
314
|
name
|
|
300
315
|
type
|
|
301
316
|
status
|