@things-factory/operato-wms 4.3.0-alpha.0 → 4.3.1
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/unload-product.js +9 -5
- 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 +35 -3
- package/client/pages/outbound/order-remark-popup.js +112 -0
- package/client/pages/outbound/packing-product.js +38 -5
- package/client/pages/outbound/packing-worksheet-list.js +15 -0
- package/client/pages/outbound/picking-product.js +142 -10
- package/client/pages/outbound/single-outbound-worksheet.js +10 -22
- package/client/pages/outbound/sorting-product.js +72 -12
- 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/print-product-label.js +15 -6
- 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 +10 -8
- package/helps/release-note.md +10 -8
- package/helps/release-note.ms.md +10 -8
- package/helps/release-note.zh.md +10 -8
- package/package.json +51 -51
- 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
|
}
|
|
@@ -337,6 +337,12 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
337
337
|
columns: [
|
|
338
338
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
339
339
|
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
340
|
+
{
|
|
341
|
+
type: 'string',
|
|
342
|
+
name: 'toteName',
|
|
343
|
+
header: i18next.t('field.tote'),
|
|
344
|
+
width: 140
|
|
345
|
+
},
|
|
340
346
|
{
|
|
341
347
|
type: 'string',
|
|
342
348
|
name: 'palletId',
|
|
@@ -520,6 +526,7 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
520
526
|
}
|
|
521
527
|
worksheetDetailInfos {
|
|
522
528
|
name
|
|
529
|
+
toteName
|
|
523
530
|
palletId
|
|
524
531
|
batchId
|
|
525
532
|
batchIdRef
|
|
@@ -588,9 +595,34 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
588
595
|
async _loading() {
|
|
589
596
|
try {
|
|
590
597
|
this._validateLoading()
|
|
591
|
-
const
|
|
592
|
-
|
|
593
|
-
|
|
598
|
+
const toteList = this.pickedProductGrist.selected.filter(itm => itm.toteName)
|
|
599
|
+
|
|
600
|
+
let loadedWorksheetDetails = []
|
|
601
|
+
|
|
602
|
+
if (toteList[0]?.toteName) {
|
|
603
|
+
loadedWorksheetDetails = this.pickedProductGrist.selected
|
|
604
|
+
.map(record => {
|
|
605
|
+
return { name: record.name, loadedQty: record.loadedQty, toteName: record.toteName }
|
|
606
|
+
})
|
|
607
|
+
.filter(itm => !itm.toteName)
|
|
608
|
+
|
|
609
|
+
let toteRecords = this.pickedProductGrist.data.records
|
|
610
|
+
.filter(record => {
|
|
611
|
+
return toteList.some(list => {
|
|
612
|
+
return list.toteName == record.toteName
|
|
613
|
+
})
|
|
614
|
+
})
|
|
615
|
+
.map(itm => {
|
|
616
|
+
return { name: itm.name, loadedQty: itm.loadedQty, toteName: itm.toteName }
|
|
617
|
+
})
|
|
618
|
+
|
|
619
|
+
loadedWorksheetDetails = loadedWorksheetDetails.concat(toteRecords)
|
|
620
|
+
} else {
|
|
621
|
+
loadedWorksheetDetails = this.pickedProductGrist.selected.map(record => {
|
|
622
|
+
return { name: record.name, loadedQty: record.loadedQty, toteName: record.toteName }
|
|
623
|
+
})
|
|
624
|
+
}
|
|
625
|
+
|
|
594
626
|
let truckNo = null
|
|
595
627
|
if (!this._ownCollection) {
|
|
596
628
|
truckNo = this.warehouseTruckInput.value
|
|
@@ -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,6 +2,7 @@ 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'
|
|
@@ -22,10 +23,12 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
22
23
|
static get properties() {
|
|
23
24
|
return {
|
|
24
25
|
airwayBill: String,
|
|
26
|
+
checkedRemarkAt: String,
|
|
25
27
|
config: Object,
|
|
26
28
|
data: Object,
|
|
27
29
|
invoice: String,
|
|
28
30
|
orderInformation: String,
|
|
31
|
+
orderRemark: String,
|
|
29
32
|
platform: String,
|
|
30
33
|
releaseGoodNo: String,
|
|
31
34
|
releaseGoodId: String,
|
|
@@ -74,7 +77,11 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
74
77
|
}
|
|
75
78
|
|
|
76
79
|
get completed() {
|
|
77
|
-
|
|
80
|
+
if (this.orderRemark) {
|
|
81
|
+
return this.data.records.every(record => record.completed) && Boolean(this.checkedRemarkAt)
|
|
82
|
+
} else {
|
|
83
|
+
return this.data.records.every(record => record.completed)
|
|
84
|
+
}
|
|
78
85
|
}
|
|
79
86
|
|
|
80
87
|
get context() {
|
|
@@ -136,11 +143,11 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
136
143
|
})
|
|
137
144
|
}
|
|
138
145
|
|
|
139
|
-
if (this.
|
|
146
|
+
if (this.orderRemark) {
|
|
140
147
|
actions.push({
|
|
141
|
-
title: i18next.t('button.
|
|
142
|
-
action: this.
|
|
143
|
-
...CommonButtonStyles.
|
|
148
|
+
title: i18next.t('button.order_remark'),
|
|
149
|
+
action: this._openOrderRemarkPopup.bind(this),
|
|
150
|
+
...CommonButtonStyles.inspect
|
|
144
151
|
})
|
|
145
152
|
}
|
|
146
153
|
|
|
@@ -385,9 +392,12 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
385
392
|
releaseGood {
|
|
386
393
|
id
|
|
387
394
|
name
|
|
395
|
+
remark
|
|
396
|
+
checkedRemarkAt
|
|
388
397
|
}
|
|
389
398
|
bizplaceName
|
|
390
399
|
partnerDomainId
|
|
400
|
+
checkedRemarkBy
|
|
391
401
|
refNo
|
|
392
402
|
refNo2
|
|
393
403
|
refNo3
|
|
@@ -479,6 +489,8 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
479
489
|
this.platform = worksheetInfo.platform
|
|
480
490
|
this.shippingProvider = worksheetInfo.shippingProvider
|
|
481
491
|
this.orderInformation = worksheetInfo.marketplaceOrder
|
|
492
|
+
this.orderRemark = worksheetInfo.releaseGood?.remark
|
|
493
|
+
this.checkedRemarkAt = worksheetInfo.releaseGood?.checkedRemarkAt
|
|
482
494
|
|
|
483
495
|
this._isBatchPicking = worksheetDetailInfos[0].relatedOrderInv?.refWorksheetId ? true : false
|
|
484
496
|
|
|
@@ -831,6 +843,27 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
831
843
|
}
|
|
832
844
|
}
|
|
833
845
|
|
|
846
|
+
_openOrderRemarkPopup() {
|
|
847
|
+
openPopup(
|
|
848
|
+
html`
|
|
849
|
+
<order-remark-popup
|
|
850
|
+
.orderRemark="${this.orderRemark}"
|
|
851
|
+
.releaseGoodNo="${this.releaseGoodNo}"
|
|
852
|
+
.checkedRemarkAt="${this.checkedRemarkAt}"
|
|
853
|
+
@remark-checked="${async () => {
|
|
854
|
+
await this._fetchInventories(this.releaseGoodNo)
|
|
855
|
+
this._showToast({ message: i18next.t('text.order_remark_has_been_checked') })
|
|
856
|
+
}}"
|
|
857
|
+
></order-remark-popup>
|
|
858
|
+
`,
|
|
859
|
+
{
|
|
860
|
+
backdrop: true,
|
|
861
|
+
size: 'medium',
|
|
862
|
+
title: i18next.t('title.order_remark')
|
|
863
|
+
}
|
|
864
|
+
)
|
|
865
|
+
}
|
|
866
|
+
|
|
834
867
|
_openWorksheetInformation() {
|
|
835
868
|
openPopup(
|
|
836
869
|
html`
|
|
@@ -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
|