@things-factory/operato-wms 4.3.744 → 4.3.745
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/order/transport-order/delivery-order-list.js +34 -21
- package/client/pages/order/transport-order/print-delivery-note.js +64 -12
- package/package.json +8 -8
- package/translations/en.json +4 -0
- package/translations/ko.json +4 -0
- package/translations/ms.json +4 -0
- package/translations/zh.json +4 -0
|
@@ -103,8 +103,8 @@ class DeliveryOrderList extends localize(i18next)(PageView) {
|
|
|
103
103
|
props: { searchOper: 'i_like' }
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
label: i18next.t('field.order_info'),
|
|
107
|
+
name: 'orderInfo',
|
|
108
108
|
type: 'text',
|
|
109
109
|
props: { searchOper: 'i_like' }
|
|
110
110
|
},
|
|
@@ -125,24 +125,6 @@ class DeliveryOrderList extends localize(i18next)(PageView) {
|
|
|
125
125
|
],
|
|
126
126
|
props: { searchOper: 'eq' }
|
|
127
127
|
},
|
|
128
|
-
{
|
|
129
|
-
label: i18next.t('field.ref_no'),
|
|
130
|
-
name: 'refNo',
|
|
131
|
-
type: 'text',
|
|
132
|
-
props: { searchOper: 'i_like' }
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
label: i18next.t('field.ref_no_2'),
|
|
136
|
-
name: 'refNo2',
|
|
137
|
-
type: 'text',
|
|
138
|
-
props: { searchOper: 'i_like' }
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
label: i18next.t('field.ref_no_3'),
|
|
142
|
-
name: 'refNo3',
|
|
143
|
-
type: 'text',
|
|
144
|
-
props: { searchOper: 'i_like' }
|
|
145
|
-
},
|
|
146
128
|
{
|
|
147
129
|
name: 'status',
|
|
148
130
|
label: i18next.t('label.status'),
|
|
@@ -182,6 +164,18 @@ class DeliveryOrderList extends localize(i18next)(PageView) {
|
|
|
182
164
|
})()
|
|
183
165
|
},
|
|
184
166
|
value: new Date().toISOString().split('T')[0]
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
label: i18next.t('field.business_rest_day'),
|
|
170
|
+
name: 'businessRestDayFilter',
|
|
171
|
+
type: 'select',
|
|
172
|
+
options: [
|
|
173
|
+
{ name: i18next.t('label.all'), value: '' },
|
|
174
|
+
{ name: i18next.t('label.not_within_business_rest_day'), value: 'not_within' },
|
|
175
|
+
{ name: i18next.t('label.within_business_rest_day'), value: 'within' }
|
|
176
|
+
],
|
|
177
|
+
props: { searchOper: 'eq' },
|
|
178
|
+
value: ''
|
|
185
179
|
}
|
|
186
180
|
]
|
|
187
181
|
|
|
@@ -262,6 +256,19 @@ class DeliveryOrderList extends localize(i18next)(PageView) {
|
|
|
262
256
|
sortable: true,
|
|
263
257
|
width: 160
|
|
264
258
|
},
|
|
259
|
+
{
|
|
260
|
+
type: 'string',
|
|
261
|
+
name: 'businessRestDay',
|
|
262
|
+
header: i18next.t('field.business_rest_day'),
|
|
263
|
+
imex: {
|
|
264
|
+
header: i18next.t('field.business_rest_day'),
|
|
265
|
+
key: 'businessRestDay',
|
|
266
|
+
width: 30,
|
|
267
|
+
type: 'string'
|
|
268
|
+
},
|
|
269
|
+
sortable: false,
|
|
270
|
+
width: 200
|
|
271
|
+
},
|
|
265
272
|
{
|
|
266
273
|
type: 'boolean',
|
|
267
274
|
name: 'ownCollection',
|
|
@@ -351,6 +358,11 @@ class DeliveryOrderList extends localize(i18next)(PageView) {
|
|
|
351
358
|
refNo
|
|
352
359
|
refNo2
|
|
353
360
|
refNo3
|
|
361
|
+
deliverTo {
|
|
362
|
+
id
|
|
363
|
+
name
|
|
364
|
+
businessRestDay
|
|
365
|
+
}
|
|
354
366
|
}
|
|
355
367
|
ownCollection
|
|
356
368
|
createdAt
|
|
@@ -385,7 +397,8 @@ class DeliveryOrderList extends localize(i18next)(PageView) {
|
|
|
385
397
|
...dord,
|
|
386
398
|
refNo: dord?.releaseGood?.refNo || '',
|
|
387
399
|
refNo2: dord?.releaseGood?.refNo2 || '',
|
|
388
|
-
refNo3: dord?.releaseGood?.refNo3 || ''
|
|
400
|
+
refNo3: dord?.releaseGood?.refNo3 || '',
|
|
401
|
+
businessRestDay: dord?.releaseGood?.deliverTo?.businessRestDay || ''
|
|
389
402
|
}
|
|
390
403
|
}) || []
|
|
391
404
|
}
|
|
@@ -46,7 +46,8 @@ class PrintDeliveryOrder extends localize(i18next)(PageView) {
|
|
|
46
46
|
_isManualDo: Boolean,
|
|
47
47
|
_data: Object,
|
|
48
48
|
_roNo: String,
|
|
49
|
-
_refNo: String
|
|
49
|
+
_refNo: String,
|
|
50
|
+
_deliveryContactPoint: Object
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
|
|
@@ -66,7 +67,9 @@ class PrintDeliveryOrder extends localize(i18next)(PageView) {
|
|
|
66
67
|
{
|
|
67
68
|
title: i18next.t('button.print'),
|
|
68
69
|
action: () => {
|
|
69
|
-
this.
|
|
70
|
+
if (this._validateBusinessRestDay()) {
|
|
71
|
+
this.renderRoot.querySelector('iframe').contentWindow.print()
|
|
72
|
+
}
|
|
70
73
|
},
|
|
71
74
|
...CommonButtonStyles.print
|
|
72
75
|
}
|
|
@@ -165,6 +168,15 @@ class PrintDeliveryOrder extends localize(i18next)(PageView) {
|
|
|
165
168
|
uomValue
|
|
166
169
|
}
|
|
167
170
|
}
|
|
171
|
+
releaseOrderDeliverTo {
|
|
172
|
+
id
|
|
173
|
+
contactName
|
|
174
|
+
address
|
|
175
|
+
phone
|
|
176
|
+
fax
|
|
177
|
+
email
|
|
178
|
+
businessRestDay
|
|
179
|
+
}
|
|
168
180
|
}
|
|
169
181
|
}
|
|
170
182
|
`,
|
|
@@ -177,28 +189,68 @@ class PrintDeliveryOrder extends localize(i18next)(PageView) {
|
|
|
177
189
|
const deliveryOrderData = response.data.deliveryOrderByWorksheet
|
|
178
190
|
|
|
179
191
|
let orderInfo = deliveryOrderData.deliveryOrderInfo
|
|
180
|
-
let contactPoints = deliveryOrderData.contactPointInfo
|
|
181
192
|
this._roNo = orderInfo.releaseGood.name
|
|
182
193
|
this._status = orderInfo.doStatus
|
|
183
194
|
this._ownCollection = orderInfo.ownCollection
|
|
184
|
-
// this._customerContactPoints = deliveryOrderData.contactPointInfo
|
|
185
195
|
this._truckNo = orderInfo.truckNo
|
|
186
196
|
this._bizplace = orderInfo.bizplace
|
|
187
197
|
this._isManualDo = orderInfo.isManualDo
|
|
188
198
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
const deliveryContactPoint = contactPoints.filter(contactPoint => contactPoint.id === deliverTo)[0]
|
|
192
|
-
orderInfo = {
|
|
193
|
-
...orderInfo,
|
|
194
|
-
deliverTo: deliveryContactPoint
|
|
195
|
-
}
|
|
196
|
-
}
|
|
199
|
+
// Use release order's deliverTo contact point for business rest day validation
|
|
200
|
+
this._deliveryContactPoint = deliveryOrderData.releaseOrderDeliverTo || null
|
|
197
201
|
|
|
198
202
|
this._orderInfo = orderInfo
|
|
199
203
|
}
|
|
200
204
|
}
|
|
201
205
|
|
|
206
|
+
/**
|
|
207
|
+
* Validates if current date falls on a business rest day
|
|
208
|
+
* @returns {boolean} - Returns true if printing is allowed, false otherwise
|
|
209
|
+
*/
|
|
210
|
+
_validateBusinessRestDay() {
|
|
211
|
+
// Check if there's a contact point reference
|
|
212
|
+
if (!this._deliveryContactPoint || !this._deliveryContactPoint.businessRestDay) {
|
|
213
|
+
return true // No business rest day restriction, allow printing
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
const businessRestDay = this._deliveryContactPoint.businessRestDay
|
|
217
|
+
if (!businessRestDay || businessRestDay.trim() === '') {
|
|
218
|
+
return true // Empty business rest day, allow printing
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// Get current day of week
|
|
222
|
+
const today = new Date()
|
|
223
|
+
const dayOfWeek = today.getDay() // 0 = Sunday, 1 = Monday, ..., 6 = Saturday
|
|
224
|
+
const dayNames = ['SUNDAY', 'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY']
|
|
225
|
+
const currentDayName = dayNames[dayOfWeek]
|
|
226
|
+
|
|
227
|
+
// Parse business rest days (comma-separated)
|
|
228
|
+
const restDays = businessRestDay
|
|
229
|
+
.split(',')
|
|
230
|
+
.map(day => day.trim().toUpperCase())
|
|
231
|
+
.filter(day => day.length > 0)
|
|
232
|
+
|
|
233
|
+
// Check if current day is in the rest days list
|
|
234
|
+
if (restDays.includes(currentDayName)) {
|
|
235
|
+
CustomAlert({
|
|
236
|
+
type: 'warning',
|
|
237
|
+
title: i18next.t('title.printing_not_allowed'),
|
|
238
|
+
text:
|
|
239
|
+
i18next.t('text.printing_not_allowed_business_rest_day', {
|
|
240
|
+
day: currentDayName,
|
|
241
|
+
restDays: restDays.join(', ')
|
|
242
|
+
}) ||
|
|
243
|
+
`Printing is not allowed as today (${currentDayName}) falls on the business rest day(s) of this contact point: ${restDays.join(
|
|
244
|
+
', '
|
|
245
|
+
)}`,
|
|
246
|
+
confirmButton: { text: i18next.t('button.okay') }
|
|
247
|
+
})
|
|
248
|
+
return false
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return true // Current day is not a rest day, allow printing
|
|
252
|
+
}
|
|
253
|
+
|
|
202
254
|
/**
|
|
203
255
|
* @oscarchuaweiwen-fsd
|
|
204
256
|
* Kindly clean up anything regarding this function.
|
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.745",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@things-factory/attachment-ui": "^4.3.743",
|
|
67
67
|
"@things-factory/auth-ui": "^4.3.743",
|
|
68
68
|
"@things-factory/barcode-ui": "^4.3.743",
|
|
69
|
-
"@things-factory/biz-ui": "^4.3.
|
|
69
|
+
"@things-factory/biz-ui": "^4.3.745",
|
|
70
70
|
"@things-factory/board-service": "^4.3.743",
|
|
71
71
|
"@things-factory/board-ui": "^4.3.743",
|
|
72
72
|
"@things-factory/code-ui": "^4.3.743",
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
"@things-factory/pdf": "^4.3.743",
|
|
90
90
|
"@things-factory/print-proxy-service": "^4.3.743",
|
|
91
91
|
"@things-factory/print-ui": "^4.3.743",
|
|
92
|
-
"@things-factory/product-base": "^4.3.
|
|
92
|
+
"@things-factory/product-base": "^4.3.745",
|
|
93
93
|
"@things-factory/resource-ui": "^4.3.743",
|
|
94
|
-
"@things-factory/sales-ui": "^4.3.
|
|
94
|
+
"@things-factory/sales-ui": "^4.3.745",
|
|
95
95
|
"@things-factory/scene-data-transform": "^4.3.743",
|
|
96
96
|
"@things-factory/scene-excel": "^4.3.743",
|
|
97
97
|
"@things-factory/scene-firebase": "^4.3.743",
|
|
@@ -105,10 +105,10 @@
|
|
|
105
105
|
"@things-factory/scene-visualizer": "^4.3.743",
|
|
106
106
|
"@things-factory/setting-ui": "^4.3.743",
|
|
107
107
|
"@things-factory/system-ui": "^4.3.743",
|
|
108
|
-
"@things-factory/transport-base": "^4.3.
|
|
108
|
+
"@things-factory/transport-base": "^4.3.745",
|
|
109
109
|
"@things-factory/tutorial-ui": "^4.3.743",
|
|
110
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
111
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
110
|
+
"@things-factory/warehouse-base": "^4.3.745",
|
|
111
|
+
"@things-factory/worksheet-base": "^4.3.745"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@things-factory/builder": "^4.3.743",
|
|
@@ -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": "89c8b3c8c7ac589d4f547a984c1027a6f509671f"
|
|
121
121
|
}
|
package/translations/en.json
CHANGED
|
@@ -1027,6 +1027,8 @@
|
|
|
1027
1027
|
"label.no_of_random_item": "no of random item",
|
|
1028
1028
|
"label.normal": "normal",
|
|
1029
1029
|
"label.not_tally": "not tally",
|
|
1030
|
+
"label.not_within_business_rest_day": "not within business rest day",
|
|
1031
|
+
"label.within_business_rest_day": "within business rest day",
|
|
1030
1032
|
"label.open": "open",
|
|
1031
1033
|
"label.options": "options",
|
|
1032
1034
|
"label.order": "order",
|
|
@@ -1707,6 +1709,7 @@
|
|
|
1707
1709
|
"text.print_1_label_for_item_with_non_specified_print_qty": "print 1 label for item with non-specified print qty",
|
|
1708
1710
|
"text.print_qty_is_empty": "print qty is empty",
|
|
1709
1711
|
"text.printing": "printing",
|
|
1712
|
+
"text.printing_not_allowed_business_rest_day": "Printing is not allowed as today ({day}) falls on the business rest day(s) of this contact point: {restDays}",
|
|
1710
1713
|
"text.priority": "priority",
|
|
1711
1714
|
"text.proceed_cancel": "proceed cancel",
|
|
1712
1715
|
"text.proceed_undo_loading": "proceed undo loading",
|
|
@@ -2168,6 +2171,7 @@
|
|
|
2168
2171
|
"title.print_preview": "print preview",
|
|
2169
2172
|
"title.print_product_label": "print product label",
|
|
2170
2173
|
"title.print_route_label": "print route label",
|
|
2174
|
+
"title.printing_not_allowed": "printing not allowed",
|
|
2171
2175
|
"title.privilege": "privilege",
|
|
2172
2176
|
"title.proceed_edited_added_product": "proceed edited/added products",
|
|
2173
2177
|
"title.proceed_edited_vas": "proceed edited/added vas",
|
package/translations/ko.json
CHANGED
|
@@ -1021,6 +1021,8 @@
|
|
|
1021
1021
|
"label.new_lot_id": "새 lot 아이디",
|
|
1022
1022
|
"label.no_of_random_item": "무작위 상품 수량",
|
|
1023
1023
|
"label.not_tally": "집계 불일치",
|
|
1024
|
+
"label.not_within_business_rest_day": "영업일 아님",
|
|
1025
|
+
"label.within_business_rest_day": "영업일",
|
|
1024
1026
|
"label.open": "[ko] open",
|
|
1025
1027
|
"label.options": "옴션",
|
|
1026
1028
|
"label.order_name": "주문명",
|
|
@@ -1683,6 +1685,7 @@
|
|
|
1683
1685
|
"text.print_1_label_for_item_with_non_specified_print_qty": "[ko]print 1 label for item with non-specified print qty",
|
|
1684
1686
|
"text.print_qty_is_empty": "인쇄수량이 없습니다",
|
|
1685
1687
|
"text.printing": "인쇄중",
|
|
1688
|
+
"text.printing_not_allowed_business_rest_day": "오늘 ({day})은 이 연락처 지점의 영업 휴일입니다: {restDays}",
|
|
1686
1689
|
"text.priority": "[ko] priority",
|
|
1687
1690
|
"text.proceed_undo_loading": "[ko] proceed undo loading",
|
|
1688
1691
|
"text.proceed_cancel": "[ko] proceed cancel",
|
|
@@ -2204,6 +2207,7 @@
|
|
|
2204
2207
|
"title.print_preview": "인쇄 미리보기",
|
|
2205
2208
|
"title.print_product_label": "[ko]print product label",
|
|
2206
2209
|
"title.print_route_label": "[ko] print route label",
|
|
2210
|
+
"title.printing_not_allowed": "인쇄 불가능",
|
|
2207
2211
|
"title.privilege": "권한",
|
|
2208
2212
|
"title.proceed_edited_added_product": "[ko]proceed edited/added product",
|
|
2209
2213
|
"title.proceed_edited_vas": "[ko] proceed edited/added vas",
|
package/translations/ms.json
CHANGED
|
@@ -1039,6 +1039,8 @@
|
|
|
1039
1039
|
"label.no_of_random_item": "bilangan item rawak",
|
|
1040
1040
|
"label.normal": "normal",
|
|
1041
1041
|
"label.not_tally": "tidak tally",
|
|
1042
|
+
"label.not_within_business_rest_day": "tidak dalam hari rehat perniagaan",
|
|
1043
|
+
"label.within_business_rest_day": "dalam hari rehat perniagaan",
|
|
1042
1044
|
"label.open": "buka",
|
|
1043
1045
|
"label.options": "pilihan",
|
|
1044
1046
|
"label.order": "order",
|
|
@@ -1748,6 +1750,7 @@
|
|
|
1748
1750
|
"text.print_1_label_for_item_with_non_specified_print_qty": "cetak 1 label untuk item dengan kuantiti cetak tidak ditetapkan",
|
|
1749
1751
|
"text.print_qty_is_empty": "kuantiti untuk cetak adalah mssong",
|
|
1750
1752
|
"text.printing": "cetak",
|
|
1753
|
+
"text.printing_not_allowed_business_rest_day": "Cetakan tidak dibenarkan kerana hari ini ({day}) jatuh pada hari rehat perniagaan bagi titik kontak ini: {restDays}",
|
|
1751
1754
|
"text.priority": "keutamaan",
|
|
1752
1755
|
"text.proceed_cancel": "teruskan pembatalan",
|
|
1753
1756
|
"text.proceed_undo_loading": "teruskan pembatalan pemuatan",
|
|
@@ -2241,6 +2244,7 @@
|
|
|
2241
2244
|
"title.print_preview": "cetak preview",
|
|
2242
2245
|
"title.print_product_label": "cetak label produk",
|
|
2243
2246
|
"title.print_route_label": "cetak label rute",
|
|
2247
|
+
"title.printing_not_allowed": "cetak tidak dibenarkan",
|
|
2244
2248
|
"title.privilege": "privilege",
|
|
2245
2249
|
"title.proceed_edited_added_product": "teruskan produk tambahan",
|
|
2246
2250
|
"title.proceed_edited_vas": "teruskan VAS disunting/ditambah",
|
package/translations/zh.json
CHANGED
|
@@ -1054,6 +1054,8 @@
|
|
|
1054
1054
|
"label.no_of_random_item": "随机物品数量",
|
|
1055
1055
|
"label.normal": "正常",
|
|
1056
1056
|
"label.not_tally": "不称重",
|
|
1057
|
+
"label.not_within_business_rest_day": "不在业务休息日",
|
|
1058
|
+
"label.within_business_rest_day": "在业务休息日",
|
|
1057
1059
|
"label.open": "打开",
|
|
1058
1060
|
"label.options": "选项",
|
|
1059
1061
|
"label.order": "订单",
|
|
@@ -1774,6 +1776,7 @@
|
|
|
1774
1776
|
"text.print_1_label_for_item_with_non_specified_print_qty": "打印一个非指定打印数量的项目的标签",
|
|
1775
1777
|
"text.print_qty_is_empty": "打印数量为空",
|
|
1776
1778
|
"text.printing": "打印中",
|
|
1779
|
+
"text.printing_not_allowed_business_rest_day": "打印不允许,因为今天({day})是此联系点的业务休息日: {restDays}",
|
|
1777
1780
|
"text.priority": "优先级",
|
|
1778
1781
|
"text.proceed_cancel": "继续取消",
|
|
1779
1782
|
"text.proceed_undo_loading": "继续撤销装载",
|
|
@@ -2274,6 +2277,7 @@
|
|
|
2274
2277
|
"title.print_preview": "打印预览",
|
|
2275
2278
|
"title.print_product_label": "打印产品标签",
|
|
2276
2279
|
"title.print_route_label": "打印路线标签",
|
|
2280
|
+
"title.printing_not_allowed": "打印不允许",
|
|
2277
2281
|
"title.privilege": "权限",
|
|
2278
2282
|
"title.proceed_edited_added_product": "继续编辑/添加产品",
|
|
2279
2283
|
"title.proceed_edited_vas": "继续编辑/添加VAS",
|