@things-factory/operato-wms 4.3.453 → 4.3.457
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/pages/inbound/pallet-label-popup.js +17 -18
- package/client/pages/inventory/inventory-adjustment.js +61 -0
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +35 -7
- package/client/pages/order/release-order/b2c/b2c-release-order-detail.js +34 -4
- package/client/pages/order/release-order/b2c/create-b2c-release-order.js +37 -2
- package/client/pages/order/release-order/release-order-detail.js +16 -4
- package/client/pages/outbound/packing-product.js +5 -5
- package/package.json +5 -5
- package/translations/en.json +4 -0
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
import '@things-factory/grist-ui'
|
|
2
2
|
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
|
-
import {
|
|
5
|
-
css,
|
|
6
|
-
html,
|
|
7
|
-
LitElement
|
|
8
|
-
} from 'lit-element'
|
|
4
|
+
import { css, html, LitElement } from 'lit-element'
|
|
9
5
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
10
6
|
|
|
11
7
|
import { DirectPrinter } from '@things-factory/barcode-base'
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
localize
|
|
15
|
-
} from '@things-factory/i18n-base'
|
|
16
|
-
import {
|
|
17
|
-
client,
|
|
18
|
-
store
|
|
19
|
-
} from '@things-factory/shell'
|
|
8
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
9
|
+
import { client, store } from '@things-factory/shell'
|
|
20
10
|
import { isMobileDevice } from '@things-factory/utils'
|
|
21
11
|
|
|
22
12
|
import { PALLET_LABEL_SETTING_KEY } from '../constants'
|
|
@@ -127,14 +117,13 @@ class PalletLabelPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
127
117
|
this.data = {
|
|
128
118
|
records: this.pallets.records
|
|
129
119
|
.map(record => ({ ...record, startSeq: 1 }))
|
|
130
|
-
.sort((a, b) => a.product.sku.localeCompare(b.product.sku))
|
|
131
|
-
}
|
|
120
|
+
.sort((a, b) => a.product.sku.localeCompare(b.product.sku))
|
|
121
|
+
}
|
|
132
122
|
//console.log(this.data.records)
|
|
133
123
|
}
|
|
134
124
|
}
|
|
135
125
|
}
|
|
136
126
|
|
|
137
|
-
|
|
138
127
|
async _printLabel() {
|
|
139
128
|
try {
|
|
140
129
|
let labelId = this._palletLabel && this._palletLabel.id
|
|
@@ -168,7 +157,10 @@ class PalletLabelPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
168
157
|
orderProductRemark
|
|
169
158
|
purchaseOrderNo
|
|
170
159
|
arrivalNoticeRefNo
|
|
160
|
+
arrivalNoticeRefNo2
|
|
161
|
+
arrivalNoticeRefNo3
|
|
171
162
|
arrivalNoticeNo
|
|
163
|
+
manufactureDate
|
|
172
164
|
}
|
|
173
165
|
}
|
|
174
166
|
`,
|
|
@@ -208,7 +200,16 @@ class PalletLabelPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
208
200
|
searchParams.append('orderProductRemark', results[i].orderProductRemark)
|
|
209
201
|
searchParams.append('purchaseOrderNo', results[i].purchaseOrderNo)
|
|
210
202
|
searchParams.append('refNo', results[i].arrivalNoticeRefNo)
|
|
203
|
+
searchParams.append('refNo2', results[i].arrivalNoticeRefNo2)
|
|
204
|
+
searchParams.append('refNo3', results[i].arrivalNoticeRefNo3)
|
|
211
205
|
searchParams.append('ganNo', results[i].arrivalNoticeNo)
|
|
206
|
+
if (typeof results[i].manufactureDate === 'number') {
|
|
207
|
+
let date = new Date(results[i].manufactureDate)
|
|
208
|
+
let year = date.getFullYear()
|
|
209
|
+
|
|
210
|
+
searchParams.append('manufactureYear', year.toString())
|
|
211
|
+
}
|
|
212
|
+
|
|
212
213
|
try {
|
|
213
214
|
const response = await fetch(`label-command/${labelId}?${searchParams.toString()}`, {
|
|
214
215
|
method: 'GET'
|
|
@@ -257,8 +258,6 @@ class PalletLabelPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
257
258
|
})
|
|
258
259
|
)
|
|
259
260
|
}
|
|
260
|
-
|
|
261
|
-
|
|
262
261
|
}
|
|
263
262
|
|
|
264
263
|
window.customElements.define('pallet-label-popup', PalletLabelPopup)
|
|
@@ -669,6 +669,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
669
669
|
uom
|
|
670
670
|
uomValue
|
|
671
671
|
manufactureDate
|
|
672
|
+
manufactureYear
|
|
672
673
|
serialNumbers
|
|
673
674
|
obsolete
|
|
674
675
|
transferQty
|
|
@@ -725,6 +726,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
725
726
|
inventoryItemCount
|
|
726
727
|
purchaseOrderNo
|
|
727
728
|
orderProductRemark
|
|
729
|
+
refOrderId
|
|
728
730
|
arrivalNoticeRefNo
|
|
729
731
|
arrivalNoticeNo
|
|
730
732
|
adjustmentCode
|
|
@@ -755,11 +757,14 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
755
757
|
remark
|
|
756
758
|
expirationDate
|
|
757
759
|
manufactureDate
|
|
760
|
+
manufactureYear
|
|
758
761
|
unitCost
|
|
759
762
|
adjustmentCode
|
|
760
763
|
adjustmentNote
|
|
761
764
|
serialNumbers
|
|
762
765
|
obsolete
|
|
766
|
+
refOrderId
|
|
767
|
+
arrivalNoticeRefNo
|
|
763
768
|
partnerDomain {
|
|
764
769
|
id
|
|
765
770
|
}
|
|
@@ -1549,8 +1554,55 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1549
1554
|
|
|
1550
1555
|
async printLotLabel() {
|
|
1551
1556
|
const records = this.dataGrist.selected
|
|
1557
|
+
let bulkRefNo = records.map(itm => itm.refOrderId)
|
|
1552
1558
|
var labelId = this._palletLabel && this._palletLabel.id
|
|
1553
1559
|
|
|
1560
|
+
const filters = [
|
|
1561
|
+
{
|
|
1562
|
+
name: 'refOrderId',
|
|
1563
|
+
operator: 'eq',
|
|
1564
|
+
value: bulkRefNo
|
|
1565
|
+
}
|
|
1566
|
+
]
|
|
1567
|
+
|
|
1568
|
+
const response = await client.query({
|
|
1569
|
+
query: gql`
|
|
1570
|
+
query arrivalNotices($filters: [Filter!]) {
|
|
1571
|
+
arrivalNotices(filters: $filters) {
|
|
1572
|
+
items {
|
|
1573
|
+
id
|
|
1574
|
+
refNo
|
|
1575
|
+
refNo2
|
|
1576
|
+
refNo3
|
|
1577
|
+
}
|
|
1578
|
+
total
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
`,
|
|
1582
|
+
variables: {
|
|
1583
|
+
filters
|
|
1584
|
+
}
|
|
1585
|
+
})
|
|
1586
|
+
|
|
1587
|
+
const arrivalNotices = response.data.arrivalNotices.items
|
|
1588
|
+
const arrivalNoticesMap = {}
|
|
1589
|
+
|
|
1590
|
+
arrivalNotices.forEach(itm => {
|
|
1591
|
+
arrivalNoticesMap[itm.id] = itm
|
|
1592
|
+
})
|
|
1593
|
+
|
|
1594
|
+
records.forEach(record => {
|
|
1595
|
+
const matchingArrivalNotice = arrivalNoticesMap[record.refOrderId]
|
|
1596
|
+
if (matchingArrivalNotice) {
|
|
1597
|
+
record.arrivalNotice = {
|
|
1598
|
+
id: matchingArrivalNotice.id,
|
|
1599
|
+
refNo: matchingArrivalNotice.refNo,
|
|
1600
|
+
refNo2: matchingArrivalNotice.refNo2,
|
|
1601
|
+
refNo3: matchingArrivalNotice.refNo3
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
})
|
|
1605
|
+
|
|
1554
1606
|
if (!labelId) {
|
|
1555
1607
|
this.showToast({
|
|
1556
1608
|
type: 'error',
|
|
@@ -1578,11 +1630,20 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1578
1630
|
searchParams.append('date', dateIn)
|
|
1579
1631
|
searchParams.append('remark', record.remark)
|
|
1580
1632
|
searchParams.append('batchRef', record.batchIdRef)
|
|
1633
|
+
searchParams.append('refNo', record.arrivalNoticeRefNo ? record.arrivalNoticeRefNo : '')
|
|
1634
|
+
searchParams.append('refNo2', record.arrivalNotice ? record.arrivalNotice.refNo2 : '')
|
|
1635
|
+
searchParams.append('refNo3', record.arrivalNotice ? record.arrivalNotice.refNo3 : '')
|
|
1581
1636
|
searchParams.append('expirationDate', record.expirationDate)
|
|
1582
1637
|
searchParams.append('purchaseOrderNo', record.purchaseOrderNo)
|
|
1583
1638
|
searchParams.append('orderProductRemark', record.orderProductRemark)
|
|
1584
1639
|
searchParams.append('refNo', record.arrivalNoticeRefNo)
|
|
1585
1640
|
searchParams.append('ganNo', record.arrivalNoticeNo)
|
|
1641
|
+
if (typeof record.manufactureDate === 'number') {
|
|
1642
|
+
let date = new Date(record.manufactureDate)
|
|
1643
|
+
let year = date.getFullYear()
|
|
1644
|
+
|
|
1645
|
+
searchParams.append('manufactureYear', year.toString())
|
|
1646
|
+
}
|
|
1586
1647
|
|
|
1587
1648
|
try {
|
|
1588
1649
|
const response = await fetch(`label-command/${labelId}?${searchParams.toString()}`, {
|
|
@@ -5,21 +5,40 @@ import '../print-airway-bill-popup'
|
|
|
5
5
|
import '../../../outbound/generate-worksheet-popup'
|
|
6
6
|
|
|
7
7
|
import gql from 'graphql-tag'
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
css,
|
|
10
|
+
html
|
|
11
|
+
} from 'lit-element'
|
|
9
12
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
10
13
|
|
|
11
14
|
import { GhostPrint } from '@operato/ghost-print'
|
|
12
15
|
import { DirectPrinter } from '@things-factory/barcode-base'
|
|
13
16
|
import { getCodeByName } from '@things-factory/code-base'
|
|
14
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
i18next,
|
|
19
|
+
localize
|
|
20
|
+
} from '@things-factory/i18n-base'
|
|
15
21
|
import { openPopup } from '@things-factory/layout-base'
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
import {
|
|
23
|
+
client,
|
|
24
|
+
navigate,
|
|
25
|
+
PageView,
|
|
26
|
+
store
|
|
27
|
+
} from '@things-factory/shell'
|
|
28
|
+
import {
|
|
29
|
+
CommonButtonStyles,
|
|
30
|
+
ScrollbarStyles
|
|
31
|
+
} from '@things-factory/styles'
|
|
32
|
+
import {
|
|
33
|
+
isMobileDevice,
|
|
34
|
+
sleep
|
|
35
|
+
} from '@things-factory/utils'
|
|
19
36
|
|
|
20
37
|
import { fetchSettingRule } from '../../../../fetch-setting-value'
|
|
21
|
-
import {
|
|
22
|
-
|
|
38
|
+
import {
|
|
39
|
+
INTENALIZED_AWB_SETTING_KEY,
|
|
40
|
+
ORDER_STATUS
|
|
41
|
+
} from '../../../constants'
|
|
23
42
|
|
|
24
43
|
const HEADER_JSON = {
|
|
25
44
|
'Content-Type': 'application/json',
|
|
@@ -404,6 +423,14 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
|
|
|
404
423
|
sortable: true,
|
|
405
424
|
width: 100
|
|
406
425
|
},
|
|
426
|
+
{
|
|
427
|
+
type: 'boolean',
|
|
428
|
+
name: 'codOption',
|
|
429
|
+
header: i18next.t('field.cod'),
|
|
430
|
+
imex: { header: i18next.t('field.cod'), key: 'codOption', width: 20, type: 'string' },
|
|
431
|
+
sortable: true,
|
|
432
|
+
width: 100
|
|
433
|
+
},
|
|
407
434
|
{
|
|
408
435
|
type: 'string',
|
|
409
436
|
name: 'transporter',
|
|
@@ -622,6 +649,7 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
|
|
|
622
649
|
airwayBill
|
|
623
650
|
trackingNo
|
|
624
651
|
lmdOption
|
|
652
|
+
codOption
|
|
625
653
|
priorityDelivery
|
|
626
654
|
platformCode
|
|
627
655
|
}
|
|
@@ -41,6 +41,8 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
41
41
|
static get properties() {
|
|
42
42
|
return {
|
|
43
43
|
_isLmd: Boolean,
|
|
44
|
+
_isCod: Boolean,
|
|
45
|
+
_paidAmount: Number,
|
|
44
46
|
_userType: String,
|
|
45
47
|
_userRoles: Array,
|
|
46
48
|
_releaseOrderNo: String,
|
|
@@ -290,6 +292,14 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
290
292
|
?disabled="${true}"
|
|
291
293
|
/>
|
|
292
294
|
<label for="ownTransport">${i18next.t('label.lmd')}</label>
|
|
295
|
+
|
|
296
|
+
<input
|
|
297
|
+
type="checkbox"
|
|
298
|
+
name="codOption"
|
|
299
|
+
?checked="${this._isCod}"
|
|
300
|
+
?disabled="${true}"
|
|
301
|
+
/>
|
|
302
|
+
<label for="isCod">${i18next.t('label.cod')}</label>
|
|
293
303
|
</div>
|
|
294
304
|
|
|
295
305
|
<label>${i18next.t('label.company')}</label>
|
|
@@ -305,7 +315,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
305
315
|
<input name="refNo3" ?readonly="${!this?._editable}" />
|
|
306
316
|
|
|
307
317
|
<label>${i18next.t('label.release_date')}</label>
|
|
308
|
-
<input name="releaseDate" type="date" ?readonly="${!this?._editable}"
|
|
318
|
+
<input name="releaseDate" type="date" ?readonly="${!this?._editable}" />
|
|
309
319
|
|
|
310
320
|
<label ?hidden="${!this._ownTransport}">${i18next.t('label.co_no')}</label>
|
|
311
321
|
<input name="collectionOrderNo" ?hidden="${!this._ownTransport}" ?readonly="${!this?._editable}" />
|
|
@@ -317,6 +327,9 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
317
327
|
?readonly="${!this?._editable || this._manifestedAt == true}"
|
|
318
328
|
/>
|
|
319
329
|
|
|
330
|
+
<label ?hidden="${!this?._isCod}">${i18next.t('label.paid_amount')} </label>
|
|
331
|
+
<input name="paidAmount" type="number" ?hidden="${!this?._isCod}" ?readonly="${!this?._editable}" min="0"/>
|
|
332
|
+
|
|
320
333
|
${this._crossDocking
|
|
321
334
|
? html`
|
|
322
335
|
<label for="ganNo">${i18next.t('label.arrival_notice')}</label>
|
|
@@ -823,6 +836,10 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
823
836
|
return this.shadowRoot?.querySelector('input[name=attentionTo]')
|
|
824
837
|
}
|
|
825
838
|
|
|
839
|
+
get paidAmountInput () {
|
|
840
|
+
return this.shadowRoot?.querySelector('input[name=paidAmount]')
|
|
841
|
+
}
|
|
842
|
+
|
|
826
843
|
async pageUpdated(changes) {
|
|
827
844
|
if (this.active) {
|
|
828
845
|
if (changes.resourceId) {
|
|
@@ -967,6 +984,8 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
967
984
|
refNo2
|
|
968
985
|
refNo3
|
|
969
986
|
lmdOption
|
|
987
|
+
codOption
|
|
988
|
+
paidAmount
|
|
970
989
|
crossDocking
|
|
971
990
|
arrivalNotice {
|
|
972
991
|
name
|
|
@@ -1097,7 +1116,8 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
1097
1116
|
}
|
|
1098
1117
|
})
|
|
1099
1118
|
|
|
1100
|
-
this._isLmd = response.data.lmdOption
|
|
1119
|
+
this._isLmd = response.data.releaseGoodDetail.lmdOption
|
|
1120
|
+
this._isCod = response.data.releaseGoodDetail.codOption
|
|
1101
1121
|
this._roInfo = releaseOrder
|
|
1102
1122
|
this.roType = releaseOrder.type
|
|
1103
1123
|
this._orderMethod = releaseOrder.orderMethod
|
|
@@ -1195,7 +1215,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
1195
1215
|
this._awbAttachments = [releaseOrder && releaseOrder.awbAttachment]
|
|
1196
1216
|
}
|
|
1197
1217
|
|
|
1198
|
-
const nonEditableStatus = ['DONE', 'PACKING']
|
|
1218
|
+
const nonEditableStatus = ['DONE', 'PACKING', 'PICKING', 'READY_TO_PACK']
|
|
1199
1219
|
|
|
1200
1220
|
if (!nonEditableStatus.includes(releaseOrder.status) && this.isUserBelongsDomain) {
|
|
1201
1221
|
this._editable = true
|
|
@@ -1634,6 +1654,8 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
1634
1654
|
|
|
1635
1655
|
async _updateReleaseGoodDetails() {
|
|
1636
1656
|
try {
|
|
1657
|
+
this._paidAmount = this.paidAmountInput
|
|
1658
|
+
|
|
1637
1659
|
this._validateForm()
|
|
1638
1660
|
|
|
1639
1661
|
let releaseOrder = this._getFormInfo()
|
|
@@ -1729,7 +1751,9 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
1729
1751
|
...releaseOrder,
|
|
1730
1752
|
id: this._releaseOrderId,
|
|
1731
1753
|
name: this._releaseOrderNo,
|
|
1732
|
-
ownTransport: this._importCargo ? true : this._ownTransport
|
|
1754
|
+
ownTransport: this._importCargo ? true : this._ownTransport,
|
|
1755
|
+
paidAmount: parseFloat(this.paidAmountInput.value)
|
|
1756
|
+
|
|
1733
1757
|
},
|
|
1734
1758
|
shippingOrder: this._exportOption ? this._serializeForm(this.exportInfoForm) : null,
|
|
1735
1759
|
shippingOrderInfo: shippingOrderInfo ? shippingOrderInfo : null
|
|
@@ -1939,6 +1963,12 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
1939
1963
|
throw new Error(i18next.t('text.release_order_form_invalid'))
|
|
1940
1964
|
}
|
|
1941
1965
|
|
|
1966
|
+
if (this._isCod) {
|
|
1967
|
+
if (!this._paidAmount.value) {
|
|
1968
|
+
throw new Error(i18next.t('text.paid_amount_is_empty_please_fill_in_the_data_to_proceed_creating_order'))
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1942
1972
|
if (this._isLmd) {
|
|
1943
1973
|
const checkShipmentFields = (
|
|
1944
1974
|
attentionToInput,
|
|
@@ -44,6 +44,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
44
44
|
return {
|
|
45
45
|
/* RO Form Fields */
|
|
46
46
|
_isLmd: Boolean,
|
|
47
|
+
_isCod: Boolean,
|
|
47
48
|
_isLmdExists: Boolean,
|
|
48
49
|
_ownTransport: Boolean,
|
|
49
50
|
_warehouseTransport: Boolean,
|
|
@@ -53,6 +54,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
53
54
|
refNo2: String,
|
|
54
55
|
refNo3: String,
|
|
55
56
|
releaseDate: Date,
|
|
57
|
+
_paidAmount: Number,
|
|
56
58
|
collectionOrderNo: String,
|
|
57
59
|
_bizplaces: Object,
|
|
58
60
|
_bizplaceId: String,
|
|
@@ -321,7 +323,18 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
321
323
|
this._isLmd = e.currentTarget.checked
|
|
322
324
|
}}"
|
|
323
325
|
/>
|
|
324
|
-
<label for="lmd"
|
|
326
|
+
<label for="lmd">${i18next.t('label.lmd')}</label>
|
|
327
|
+
|
|
328
|
+
<input
|
|
329
|
+
id="codOption"
|
|
330
|
+
type="checkbox"
|
|
331
|
+
name="codOption"
|
|
332
|
+
?checked="${this._isCod}"
|
|
333
|
+
@change="${e => {
|
|
334
|
+
this._isCod = e.currentTarget.checked
|
|
335
|
+
}}"
|
|
336
|
+
/>
|
|
337
|
+
<label for="cod">${i18next.t('label.cod')}</label>
|
|
325
338
|
</div>
|
|
326
339
|
|
|
327
340
|
<label>${i18next.t('label.company')}</label>
|
|
@@ -353,6 +366,15 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
353
366
|
|
|
354
367
|
@change="${this._validateDate}"
|
|
355
368
|
/>
|
|
369
|
+
|
|
370
|
+
<label ?hidden="${!this._isCod}">${i18next.t('label.paid_amount')}</label>
|
|
371
|
+
<input
|
|
372
|
+
name="paidAmount"
|
|
373
|
+
type="number"
|
|
374
|
+
?hidden="${!this._isCod}"
|
|
375
|
+
min="0"
|
|
376
|
+
/>
|
|
377
|
+
|
|
356
378
|
${
|
|
357
379
|
this._crossDocking
|
|
358
380
|
? html`
|
|
@@ -712,6 +734,10 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
712
734
|
return this.shadowRoot?.querySelector('quick-find-content[name=quickFindContent]')
|
|
713
735
|
}
|
|
714
736
|
|
|
737
|
+
get paidAmountInput() {
|
|
738
|
+
return this.shadowRoot?.querySelector('input[name=paidAmount]')
|
|
739
|
+
}
|
|
740
|
+
|
|
715
741
|
constructor() {
|
|
716
742
|
super()
|
|
717
743
|
this.initProperties()
|
|
@@ -846,6 +872,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
846
872
|
}
|
|
847
873
|
|
|
848
874
|
initProperties() {
|
|
875
|
+
this._paidAmount = ''
|
|
849
876
|
this._exportOption = false
|
|
850
877
|
this.refNo = ''
|
|
851
878
|
this.refNo2 = ''
|
|
@@ -1384,6 +1411,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1384
1411
|
|
|
1385
1412
|
async _generateReleaseOrder() {
|
|
1386
1413
|
try {
|
|
1414
|
+
this._paidAmount = this.paidAmountInput
|
|
1387
1415
|
this._validateForm()
|
|
1388
1416
|
this._validateInventories()
|
|
1389
1417
|
|
|
@@ -1437,6 +1465,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1437
1465
|
releaseGood.lmdOption = this._isLmd
|
|
1438
1466
|
releaseGood.courierOption = true
|
|
1439
1467
|
releaseGood.packingOption = true
|
|
1468
|
+
releaseGood.paidAmount = parseFloat(this._paidAmount.value)
|
|
1440
1469
|
|
|
1441
1470
|
delete releaseGood.bizplaceId
|
|
1442
1471
|
delete releaseGood.bizplaceName
|
|
@@ -1514,7 +1543,13 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1514
1543
|
if (!this.releaseOrderForm.checkValidity()) {
|
|
1515
1544
|
throw new Error(i18next.t('text.release_order_form_invalid'))
|
|
1516
1545
|
}
|
|
1517
|
-
|
|
1546
|
+
|
|
1547
|
+
if (this._isCod) {
|
|
1548
|
+
if (!this._paidAmount.value) {
|
|
1549
|
+
throw new Error(i18next.t('text.paid_amount_is_empty_please_fill_in_the_data_to_proceed_creating_order'))
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1518
1553
|
if (this._isLmd) {
|
|
1519
1554
|
const checkShipmentFields = (
|
|
1520
1555
|
attentionToInput,
|
|
@@ -12,14 +12,26 @@ import '../../order/vas-order/popup/vas-target-product-popup'
|
|
|
12
12
|
import '../../order/vas-order/popup/select-vas-popup'
|
|
13
13
|
|
|
14
14
|
import gql from 'graphql-tag'
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
css,
|
|
17
|
+
html
|
|
18
|
+
} from 'lit-element'
|
|
16
19
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
17
20
|
|
|
18
21
|
import { getCodeByName } from '@things-factory/code-base'
|
|
19
22
|
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
20
|
-
import {
|
|
23
|
+
import {
|
|
24
|
+
i18next,
|
|
25
|
+
localize
|
|
26
|
+
} from '@things-factory/i18n-base'
|
|
21
27
|
import { openPopup } from '@things-factory/layout-base'
|
|
22
|
-
import {
|
|
28
|
+
import {
|
|
29
|
+
client,
|
|
30
|
+
CustomAlert,
|
|
31
|
+
navigate,
|
|
32
|
+
PageView,
|
|
33
|
+
store
|
|
34
|
+
} from '@things-factory/shell'
|
|
23
35
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
24
36
|
import { isMobileDevice } from '@things-factory/utils'
|
|
25
37
|
|
|
@@ -452,7 +464,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
452
464
|
<input name="refNo3" ?readonly="${!this?._editable}" />
|
|
453
465
|
|
|
454
466
|
<label>${i18next.t('label.release_date')}</label>
|
|
455
|
-
<input name="releaseDate" type="date" ?readonly="${!this?._editable}"
|
|
467
|
+
<input name="releaseDate" type="date" ?readonly="${!this?._editable}"/>
|
|
456
468
|
|
|
457
469
|
<label ?hidden="${!this._ownTransport}">${i18next.t('label.co_no')}</label>
|
|
458
470
|
<input name="collectionOrderNo" ?hidden="${!this._ownTransport}" ?readonly="${!this?._editable}" />
|
|
@@ -695,14 +695,14 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
695
695
|
let fetchOrder = async id => {
|
|
696
696
|
const response = await client.mutate({
|
|
697
697
|
mutation: gql`
|
|
698
|
-
mutation fetchSellercraftDocument($
|
|
699
|
-
fetchSellercraftDocument(
|
|
698
|
+
mutation fetchSellercraftDocument($orderPackageId: String!) {
|
|
699
|
+
fetchSellercraftDocument(orderPackageId: $orderPackageId) {
|
|
700
700
|
airwayBill
|
|
701
701
|
invoice
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
704
|
`,
|
|
705
|
-
variables: {
|
|
705
|
+
variables: { orderPackageId: id }
|
|
706
706
|
})
|
|
707
707
|
if (!response.errors) {
|
|
708
708
|
this.invoice = document.invoice
|
|
@@ -720,7 +720,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
720
720
|
let invoice = this.invoice
|
|
721
721
|
// fetch and set variable if invoice not found
|
|
722
722
|
if (!invoice || invoice.trim() == '') {
|
|
723
|
-
let document = await fetchOrder(this.
|
|
723
|
+
let document = await fetchOrder(this._orderPackageInformation.orderPackage.id)
|
|
724
724
|
invoice = document.invoice
|
|
725
725
|
}
|
|
726
726
|
let url = new URL(window.location)
|
|
@@ -729,7 +729,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
729
729
|
let airwayBill = this.airwayBill
|
|
730
730
|
// fetch and set variable if awb not found
|
|
731
731
|
if (!airwayBill || airwayBill.trim() == '') {
|
|
732
|
-
let document = await fetchOrder(this.
|
|
732
|
+
let document = await fetchOrder(this._orderPackageInformation.orderPackage.id)
|
|
733
733
|
airwayBill = document.airwayBill
|
|
734
734
|
}
|
|
735
735
|
if (airwayBill.includes('partner.shopeemobile.com')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-wms",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.457",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@things-factory/print-ui": "^4.3.434",
|
|
92
92
|
"@things-factory/product-base": "^4.3.452",
|
|
93
93
|
"@things-factory/resource-ui": "^4.3.452",
|
|
94
|
-
"@things-factory/sales-ui": "^4.3.
|
|
94
|
+
"@things-factory/sales-ui": "^4.3.457",
|
|
95
95
|
"@things-factory/scene-data-transform": "^4.3.381",
|
|
96
96
|
"@things-factory/scene-excel": "^4.3.381",
|
|
97
97
|
"@things-factory/scene-firebase": "^4.3.381",
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
"@things-factory/system-ui": "^4.3.434",
|
|
108
108
|
"@things-factory/transport-base": "^4.3.452",
|
|
109
109
|
"@things-factory/tutorial-ui": "^4.3.452",
|
|
110
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
111
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
110
|
+
"@things-factory/warehouse-base": "^4.3.457",
|
|
111
|
+
"@things-factory/worksheet-base": "^4.3.457"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@things-factory/builder": "^4.3.381",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"cypress-localstorage-commands": "^1.6.1",
|
|
118
118
|
"eslint-plugin-cypress": "^2.12.1"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "2116456b92d085abd1ccffd61faf3415e3f9e911"
|
|
121
121
|
}
|
package/translations/en.json
CHANGED
|
@@ -232,6 +232,7 @@
|
|
|
232
232
|
"field.closing_qty": "closing qty",
|
|
233
233
|
"field.closing_volume": "closing volume",
|
|
234
234
|
"field.closing": "closing",
|
|
235
|
+
"field.cod": "COD",
|
|
235
236
|
"field.cogs_account_code": "COGS account code",
|
|
236
237
|
"field.column": "column",
|
|
237
238
|
"field.combination": "combination",
|
|
@@ -787,6 +788,7 @@
|
|
|
787
788
|
"label.claim": "claim",
|
|
788
789
|
"label.closed": "closed",
|
|
789
790
|
"label.co_no": "CO number",
|
|
791
|
+
"label.cod": "COD",
|
|
790
792
|
"label.collection_date_time": "collection date time",
|
|
791
793
|
"label.collection_date": "collection date",
|
|
792
794
|
"label.collection_order": "collection order",
|
|
@@ -985,6 +987,7 @@
|
|
|
985
987
|
"label.packing_type": "packing type",
|
|
986
988
|
"label.packing_unit": "packing unit",
|
|
987
989
|
"label.packing": "packing",
|
|
990
|
+
"label.paid_amount": "paid amount",
|
|
988
991
|
"label.pallet_id": "pallet id",
|
|
989
992
|
"label.pallet_qty": "pallet qty",
|
|
990
993
|
"label.pallet_ref_no": "pallet ref no",
|
|
@@ -1509,6 +1512,7 @@
|
|
|
1509
1512
|
"text.owner_field_is_empty": "owner field is empty",
|
|
1510
1513
|
"text.pack_qty_and_unit_price_will_be_updated_to_1_if_the_value_is_empty_or_0": "pack qty and unit price will be updated to 1 if the value is empty or 0",
|
|
1511
1514
|
"text.packing_is_completed": "packing is completed",
|
|
1515
|
+
"text.paid_amount_is_empty_please_fill_in_the_data_to_proceed_creating_order": "paid amount is empty. please fill in the data to proceed creating order",
|
|
1512
1516
|
"text.pallet_(x)_is_not_found_in_cycle_count_worksheet_(y)": "pallet ({x}) is not found in cycle count worksheet ({y})",
|
|
1513
1517
|
"text.pallet_is_in_progressing": "pallet is in progressing",
|
|
1514
1518
|
"text.pallet_name(s)_is_already_existed": "pallet name(s) is already existed",
|