@things-factory/operato-mms 3.7.12 → 3.8.0
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/logistics/lazada-order-init-batch-popup.js +1 -2
- package/client/pages/order/logistics/request-ro-popup.js +69 -4
- package/client/pages/order/logistics/shopee-order-init-batch-popup.js +1 -2
- package/client/pages/order/order-by-store.js +71 -3
- package/client/pages/reports/sales-by-platform/lazada-sales-report.js +186 -61
- package/client/pages/setting/marketplace-setting.js +9 -6
- package/dist-server/graphql/resolvers/index.js +2 -1
- package/dist-server/graphql/resolvers/index.js.map +1 -1
- package/dist-server/graphql/resolvers/interface-with-hub/auto-add-release-order.js +3 -1
- package/dist-server/graphql/resolvers/interface-with-hub/auto-add-release-order.js.map +1 -1
- package/dist-server/graphql/resolvers/shipping-provider/index.js +6 -0
- package/dist-server/graphql/resolvers/shipping-provider/index.js.map +1 -0
- package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js +32 -0
- package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js.map +1 -0
- package/dist-server/graphql/types/index.js +3 -2
- package/dist-server/graphql/types/index.js.map +1 -1
- package/dist-server/graphql/types/shipping-provider/index.js +10 -0
- package/dist-server/graphql/types/shipping-provider/index.js.map +1 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider-list.js +13 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider-list.js.map +1 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider.js +13 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider.js.map +1 -0
- package/package.json +31 -31
- package/server/graphql/resolvers/index.ts +2 -1
- package/server/graphql/resolvers/interface-with-hub/auto-add-release-order.ts +3 -1
- package/server/graphql/resolvers/shipping-provider/index.ts +5 -0
- package/server/graphql/resolvers/shipping-provider/shipping-providers.ts +37 -0
- package/server/graphql/types/index.ts +3 -2
- package/server/graphql/types/shipping-provider/index.ts +8 -0
- package/server/graphql/types/shipping-provider/shipping-provider-list.ts +7 -0
- package/server/graphql/types/shipping-provider/shipping-provider.ts +7 -0
- package/translations/en.json +18 -0
- package/translations/ko.json +18 -0
- package/translations/ms.json +18 -0
- package/translations/zh.json +18 -0
|
@@ -147,7 +147,6 @@ class LazadaOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
|
147
147
|
return { emphasized }
|
|
148
148
|
}
|
|
149
149
|
},
|
|
150
|
-
pagination: { infinite: true },
|
|
151
150
|
columns: [
|
|
152
151
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
153
152
|
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
@@ -405,7 +404,7 @@ class LazadaOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
|
405
404
|
return itm
|
|
406
405
|
})
|
|
407
406
|
return {
|
|
408
|
-
total:
|
|
407
|
+
total: response.data.marketplaceOrdersForBatchInit.total || 0,
|
|
409
408
|
records
|
|
410
409
|
}
|
|
411
410
|
}
|
|
@@ -60,7 +60,9 @@ class RequestROPopup extends LitElement {
|
|
|
60
60
|
warehouseId: String,
|
|
61
61
|
store: Object,
|
|
62
62
|
marketplaceOrders: Object,
|
|
63
|
-
config: Object
|
|
63
|
+
config: Object,
|
|
64
|
+
_searchFields: Array,
|
|
65
|
+
_shippingProviders: Array
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
|
|
@@ -73,6 +75,10 @@ class RequestROPopup extends LitElement {
|
|
|
73
75
|
return this.shadowRoot.querySelector('data-grist')
|
|
74
76
|
}
|
|
75
77
|
|
|
78
|
+
get searchForm() {
|
|
79
|
+
return this.shadowRoot.querySelector('search-form')
|
|
80
|
+
}
|
|
81
|
+
|
|
76
82
|
render() {
|
|
77
83
|
return html`
|
|
78
84
|
<div class="container">
|
|
@@ -88,7 +94,9 @@ class RequestROPopup extends LitElement {
|
|
|
88
94
|
)}
|
|
89
95
|
</select>
|
|
90
96
|
</form>
|
|
91
|
-
|
|
97
|
+
|
|
98
|
+
<search-form id="search-form" .fields=${this._searchFields} @submit=${e =>
|
|
99
|
+
this.dataGrist.fetch()}></search-form>
|
|
92
100
|
|
|
93
101
|
<div class="grist">
|
|
94
102
|
<data-grist
|
|
@@ -110,8 +118,44 @@ class RequestROPopup extends LitElement {
|
|
|
110
118
|
async firstUpdated() {
|
|
111
119
|
this.warehouses = await this.fetchWarehouses()
|
|
112
120
|
this.warehouseId = this.warehouses[0]?.id || null
|
|
121
|
+
this._shippingProviders = await this._fetchShippingProviders()
|
|
113
122
|
this.requestUpdate()
|
|
114
123
|
|
|
124
|
+
this._searchFields = [
|
|
125
|
+
{
|
|
126
|
+
label: i18next.t('field.shipping_provider'),
|
|
127
|
+
name: 'shippingProvider',
|
|
128
|
+
type: 'select',
|
|
129
|
+
props: {
|
|
130
|
+
searchOper: 'eq'
|
|
131
|
+
},
|
|
132
|
+
options: [
|
|
133
|
+
{ value: '' },
|
|
134
|
+
...this._shippingProviders.map(item => {
|
|
135
|
+
return {
|
|
136
|
+
name: item.shippingProvider,
|
|
137
|
+
value: item.shippingProvider
|
|
138
|
+
}
|
|
139
|
+
})
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
label: i18next.t('field.item_count'),
|
|
144
|
+
name: 'itemCount',
|
|
145
|
+
type: 'select',
|
|
146
|
+
props: {
|
|
147
|
+
searchOper: 'gte'
|
|
148
|
+
},
|
|
149
|
+
options: [{ value: '' }, { name: 'Single Item', value: 1 }, { name: 'Multiple Item', value: 2 }]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
label: i18next.t('field.sku'),
|
|
153
|
+
name: 'sku',
|
|
154
|
+
type: 'text',
|
|
155
|
+
props: { searchOper: 'i_like' }
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
|
|
115
159
|
this.config = {
|
|
116
160
|
list: {
|
|
117
161
|
fields: [
|
|
@@ -237,6 +281,27 @@ class RequestROPopup extends LitElement {
|
|
|
237
281
|
}
|
|
238
282
|
}
|
|
239
283
|
|
|
284
|
+
async _fetchShippingProviders() {
|
|
285
|
+
let statuses = this.getROCreatableStatus()
|
|
286
|
+
|
|
287
|
+
const response = await client.query({
|
|
288
|
+
query: gql`
|
|
289
|
+
query shippingProviders($storeId: String!, $statuses: [String]) {
|
|
290
|
+
shippingProviders(storeId: $storeId, statuses: $statuses) {
|
|
291
|
+
items {
|
|
292
|
+
shippingProvider
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
`,
|
|
297
|
+
variables: { storeId: this.store.id, statuses }
|
|
298
|
+
})
|
|
299
|
+
|
|
300
|
+
if (!response.errors) {
|
|
301
|
+
return response.data.shippingProviders.items
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
240
305
|
async addReleaseOrder() {
|
|
241
306
|
try {
|
|
242
307
|
if (!this.warehouseId) {
|
|
@@ -282,7 +347,7 @@ class RequestROPopup extends LitElement {
|
|
|
282
347
|
}
|
|
283
348
|
|
|
284
349
|
async fetchHandler({ page, limit, sorters = [{ name: 'orderUpdatedAt', desc: true }] }) {
|
|
285
|
-
let filters = []
|
|
350
|
+
let filters = [...this.searchForm.queryFilters]
|
|
286
351
|
|
|
287
352
|
if (this.store) {
|
|
288
353
|
filters.push(
|
|
@@ -443,7 +508,7 @@ class RequestROPopup extends LitElement {
|
|
|
443
508
|
break
|
|
444
509
|
|
|
445
510
|
case PLATFORM.WOOCOMMERCE.value:
|
|
446
|
-
roCreatableStatus = ['
|
|
511
|
+
roCreatableStatus = ['processing']
|
|
447
512
|
break
|
|
448
513
|
|
|
449
514
|
case PLATFORM.MAGENTO.value:
|
|
@@ -198,7 +198,6 @@ class ShopeeOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
|
198
198
|
return { emphasized }
|
|
199
199
|
}
|
|
200
200
|
},
|
|
201
|
-
pagination: { infinite: true },
|
|
202
201
|
columns: [
|
|
203
202
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
204
203
|
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
@@ -527,7 +526,7 @@ class ShopeeOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
|
527
526
|
}
|
|
528
527
|
|
|
529
528
|
return {
|
|
530
|
-
total:
|
|
529
|
+
total: response.data.marketplaceOrdersForBatchInit.total || 0,
|
|
531
530
|
records
|
|
532
531
|
}
|
|
533
532
|
}
|
|
@@ -28,7 +28,8 @@ class OrderByStore extends localize(i18next)(PageView) {
|
|
|
28
28
|
config: Object,
|
|
29
29
|
excelConfig: Object,
|
|
30
30
|
data: Object,
|
|
31
|
-
enableRO: Boolean
|
|
31
|
+
enableRO: Boolean,
|
|
32
|
+
_shippingProviders: Array
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
|
|
@@ -145,6 +146,7 @@ class OrderByStore extends localize(i18next)(PageView) {
|
|
|
145
146
|
|
|
146
147
|
async pageInitialized() {
|
|
147
148
|
const _orderStatus = await getCodeByName('ORDER_STATUS')
|
|
149
|
+
this._shippingProviders = await this._fetchShippingProviders()
|
|
148
150
|
|
|
149
151
|
await this.fetchFulfillmentCenters()
|
|
150
152
|
|
|
@@ -169,6 +171,38 @@ class OrderByStore extends localize(i18next)(PageView) {
|
|
|
169
171
|
})
|
|
170
172
|
],
|
|
171
173
|
props: { searchOper: 'eq' }
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
label: i18next.t('field.shipping_provider'),
|
|
177
|
+
name: 'shippingProvider',
|
|
178
|
+
type: 'select',
|
|
179
|
+
props: {
|
|
180
|
+
searchOper: 'eq'
|
|
181
|
+
},
|
|
182
|
+
options: [
|
|
183
|
+
{ value: '' },
|
|
184
|
+
...this._shippingProviders.map(item => {
|
|
185
|
+
return {
|
|
186
|
+
name: item.shippingProvider,
|
|
187
|
+
value: item.shippingProvider
|
|
188
|
+
}
|
|
189
|
+
})
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
label: i18next.t('field.item_count'),
|
|
194
|
+
name: 'itemCount',
|
|
195
|
+
type: 'select',
|
|
196
|
+
props: {
|
|
197
|
+
searchOper: 'gte'
|
|
198
|
+
},
|
|
199
|
+
options: [{ value: '' }, { name: 'Single Item', value: 1 }, { name: 'Multiple Item', value: 2 }]
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
label: i18next.t('field.sku'),
|
|
203
|
+
name: 'sku',
|
|
204
|
+
type: 'text',
|
|
205
|
+
props: { searchOper: 'i_like' }
|
|
172
206
|
}
|
|
173
207
|
]
|
|
174
208
|
|
|
@@ -308,6 +342,21 @@ class OrderByStore extends localize(i18next)(PageView) {
|
|
|
308
342
|
if ('resourceId' in changes) {
|
|
309
343
|
if (lifecycle.resourceId) {
|
|
310
344
|
this.store = await this.fetchStore(lifecycle.resourceId)
|
|
345
|
+
this._shippingProviders = await this._fetchShippingProviders()
|
|
346
|
+
|
|
347
|
+
this._searchFields = this._searchFields.map(searchField => {
|
|
348
|
+
if (searchField.name === 'shippingProvider')
|
|
349
|
+
searchField.options = [
|
|
350
|
+
{ value: '' },
|
|
351
|
+
...this._shippingProviders.map(item => {
|
|
352
|
+
return {
|
|
353
|
+
name: item.shippingProvider,
|
|
354
|
+
value: item.shippingProvider
|
|
355
|
+
}
|
|
356
|
+
})
|
|
357
|
+
]
|
|
358
|
+
return searchField
|
|
359
|
+
})
|
|
311
360
|
} else {
|
|
312
361
|
this.store = null
|
|
313
362
|
}
|
|
@@ -486,9 +535,9 @@ class OrderByStore extends localize(i18next)(PageView) {
|
|
|
486
535
|
if (marketplaceOrderShipping?.trackingNo) {
|
|
487
536
|
const trackingNos = JSON.parse(marketplaceOrderShipping.trackingNo)
|
|
488
537
|
newTrackingNo = trackingNos.map(item => item.tracking_code)
|
|
538
|
+
let uniqueTrackingNos = [...new Set(newTrackingNo)]
|
|
539
|
+
item = uniqueTrackingNos.join(', ')
|
|
489
540
|
}
|
|
490
|
-
let uniqueTrackingNos = [...new Set(newTrackingNo)]
|
|
491
|
-
item = uniqueTrackingNos.join(', ')
|
|
492
541
|
} else {
|
|
493
542
|
item = marketplaceOrderShipping.trackingNo
|
|
494
543
|
}
|
|
@@ -845,6 +894,25 @@ class OrderByStore extends localize(i18next)(PageView) {
|
|
|
845
894
|
}
|
|
846
895
|
}
|
|
847
896
|
|
|
897
|
+
async _fetchShippingProviders() {
|
|
898
|
+
const response = await client.query({
|
|
899
|
+
query: gql`
|
|
900
|
+
query shippingProviders($storeId: String!) {
|
|
901
|
+
shippingProviders(storeId: $storeId) {
|
|
902
|
+
items {
|
|
903
|
+
shippingProvider
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
`,
|
|
908
|
+
variables: { storeId: this.lifecycle.resourceId }
|
|
909
|
+
})
|
|
910
|
+
|
|
911
|
+
if (!response.errors) {
|
|
912
|
+
return response.data.shippingProviders.items
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
|
|
848
916
|
_showToast({ type, message }) {
|
|
849
917
|
document.dispatchEvent(
|
|
850
918
|
new CustomEvent('notify', {
|
|
@@ -135,6 +135,46 @@ class LazadaSalesReport extends connect(store)(PageView) {
|
|
|
135
135
|
imex: { header: i18next.t('field.order_no'), key: 'orderNo', width: 50, type: 'string' },
|
|
136
136
|
width: 200
|
|
137
137
|
},
|
|
138
|
+
{
|
|
139
|
+
type: 'datetime',
|
|
140
|
+
name: 'orderCreatedAt',
|
|
141
|
+
header: i18next.t('field.order_created_date'),
|
|
142
|
+
sortable: false,
|
|
143
|
+
imex: { header: i18next.t('field.order_created_date'), key: 'orderCreatedAt', width: 30, type: 'string' },
|
|
144
|
+
width: 200
|
|
145
|
+
},,
|
|
146
|
+
{
|
|
147
|
+
type: 'string',
|
|
148
|
+
name: 'fulfillmentCenter',
|
|
149
|
+
header: i18next.t('field.fulfillment_partner'),
|
|
150
|
+
sortable: false,
|
|
151
|
+
imex: { header: i18next.t('field.fulfillment_partner'), key: 'fulfillmentCenter', width: 50, type: 'string' },
|
|
152
|
+
width: 200
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
type: 'string',
|
|
156
|
+
name: 'status',
|
|
157
|
+
header: i18next.t('field.status'),
|
|
158
|
+
sortable: false,
|
|
159
|
+
imex: { header: i18next.t('field.status'), key: 'status', width: 50, type: 'string' },
|
|
160
|
+
width: 200
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
type: 'string',
|
|
164
|
+
name: 'sku',
|
|
165
|
+
header: i18next.t('field.warehouse_sku'),
|
|
166
|
+
sortable: false,
|
|
167
|
+
imex: { header: i18next.t('field.warehouse_sku'), key: 'sku', width: 50, type: 'string' },
|
|
168
|
+
width: 200
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
type: 'string',
|
|
172
|
+
name: 'variationId',
|
|
173
|
+
header: i18next.t('field.variation_id'),
|
|
174
|
+
sortable: false,
|
|
175
|
+
imex: { header: i18next.t('field.variation_id'), key: 'variationId', width: 50, type: 'string' },
|
|
176
|
+
width: 200
|
|
177
|
+
},
|
|
138
178
|
{
|
|
139
179
|
type: 'string',
|
|
140
180
|
name: 'marketplaceOrderItem',
|
|
@@ -144,45 +184,35 @@ class LazadaSalesReport extends connect(store)(PageView) {
|
|
|
144
184
|
width: 400
|
|
145
185
|
},
|
|
146
186
|
{
|
|
147
|
-
type: '
|
|
148
|
-
name: '
|
|
149
|
-
header: i18next.t('field.
|
|
187
|
+
type: 'integer',
|
|
188
|
+
name: 'qty',
|
|
189
|
+
header: i18next.t('field.qty'),
|
|
150
190
|
sortable: false,
|
|
151
|
-
imex: { header: i18next.t('field.
|
|
152
|
-
width:
|
|
191
|
+
imex: { header: i18next.t('field.qty'), key: 'qty', width: 20, type: 'integer' },
|
|
192
|
+
width: 150
|
|
153
193
|
},
|
|
154
194
|
{
|
|
155
195
|
type: 'float',
|
|
156
|
-
name: '
|
|
157
|
-
header: i18next.t('field.
|
|
196
|
+
name: 'itemCommissionFee',
|
|
197
|
+
header: i18next.t('field.commission_fee'),
|
|
158
198
|
sortable: false,
|
|
159
|
-
imex: {
|
|
160
|
-
header: i18next.t('field.original_price'),
|
|
161
|
-
key: 'originalPrice',
|
|
162
|
-
width: 30,
|
|
163
|
-
type: 'float'
|
|
164
|
-
},
|
|
199
|
+
imex: { header: i18next.t('field.commission_fee'), key: 'itemCommissionFee', width: 30, type: 'float' },
|
|
165
200
|
width: 200
|
|
166
201
|
},
|
|
167
202
|
{
|
|
168
203
|
type: 'float',
|
|
169
|
-
name: '
|
|
170
|
-
header: i18next.t('field.
|
|
204
|
+
name: 'marketplaceBonusSeller',
|
|
205
|
+
header: i18next.t('field.lazada_bonus'),
|
|
171
206
|
sortable: false,
|
|
172
|
-
imex: { header: i18next.t('field.
|
|
207
|
+
imex: { header: i18next.t('field.lazada_bonus'), key: 'marketplaceBonusSeller', width: 30, type: 'float' },
|
|
173
208
|
width: 200
|
|
174
209
|
},
|
|
175
210
|
{
|
|
176
211
|
type: 'float',
|
|
177
|
-
name: '
|
|
178
|
-
header: i18next.t('field.
|
|
212
|
+
name: 'marketplaceBonus',
|
|
213
|
+
header: i18next.t('field.lazada_bonus_lzd_cofund'),
|
|
179
214
|
sortable: false,
|
|
180
|
-
imex: {
|
|
181
|
-
header: i18next.t('field.actual_shipping_fee'),
|
|
182
|
-
key: 'actualShippingFee',
|
|
183
|
-
width: 30,
|
|
184
|
-
type: 'float'
|
|
185
|
-
},
|
|
215
|
+
imex: { header: i18next.t('field.lazada_bonus_lzd_cofund'), key: 'marketplaceBonus', width: 30, type: 'float' },
|
|
186
216
|
width: 200
|
|
187
217
|
},
|
|
188
218
|
{
|
|
@@ -195,44 +225,114 @@ class LazadaSalesReport extends connect(store)(PageView) {
|
|
|
195
225
|
},
|
|
196
226
|
{
|
|
197
227
|
type: 'float',
|
|
198
|
-
name: '
|
|
199
|
-
header: i18next.t('field.
|
|
228
|
+
name: 'ordersMarketplaceFeesTotal',
|
|
229
|
+
header: i18next.t('field.orders_lazada_fees_total'),
|
|
230
|
+
sortable: false,
|
|
231
|
+
imex: { header: i18next.t('field.orders_lazada_fees_total'), key: 'ordersMarketplaceFeesTotal', width: 30, type: 'float' },
|
|
232
|
+
width: 200
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
type: 'float',
|
|
236
|
+
name: 'originalShippingFee',
|
|
237
|
+
header: i18next.t('field.shipping_fee'),
|
|
238
|
+
sortable: false,
|
|
239
|
+
imex: { header: i18next.t('field.shipping_fee'), key: 'originalShippingFee', width: 30, type: 'float' },
|
|
240
|
+
width: 200
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
type: 'float',
|
|
244
|
+
name: 'shippingFeePaidByCustomer',
|
|
245
|
+
header: i18next.t('field.shipping_fee_paid_by_customer'),
|
|
246
|
+
sortable: false,
|
|
247
|
+
imex: { header: i18next.t('field.shipping_fee_paid_by_customer'), key: 'shippingFeePaidByCustomer', width: 30, type: 'float' },
|
|
248
|
+
width: 200
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
type: 'float',
|
|
252
|
+
name: 'shippingFeeDiscountMarketplace',
|
|
253
|
+
header: i18next.t('field.shipping_fee_voucher_by_lazada'),
|
|
254
|
+
sortable: false,
|
|
255
|
+
imex: { header: i18next.t('field.shipping_fee_voucher_by_lazada'), key: 'shippingFeeDiscountMarketplace', width: 30, type: 'float' },
|
|
256
|
+
width: 200
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
type: 'float',
|
|
260
|
+
name: 'shippingFeeDiscountSeller',
|
|
261
|
+
header: i18next.t('field.shipping_fee_voucher_by_seller'),
|
|
262
|
+
sortable: false,
|
|
263
|
+
imex: { header: i18next.t('field.shipping_fee_voucher_by_seller'), key: 'shippingFeeDiscountSeller', width: 30, type: 'float' },
|
|
264
|
+
width: 200
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
type: 'float',
|
|
268
|
+
name: 'autoShippingSubsidyMarketplace',
|
|
269
|
+
header: i18next.t('field.auto_shipping_fee_subsidy_by_lazada'),
|
|
270
|
+
sortable: false,
|
|
271
|
+
imex: { header: i18next.t('field.auto_shipping_fee_subsidy_by_lazada'), key: 'autoShippingSubsidyMarketplace', width: 30, type: 'float' },
|
|
272
|
+
width: 200
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
type: 'float',
|
|
276
|
+
name: 'ordersLogisticsTotal',
|
|
277
|
+
header: i18next.t('field.orders_logistics_total'),
|
|
278
|
+
sortable: false,
|
|
279
|
+
imex: { header: i18next.t('field.orders_logistics_total'), key: 'ordersLogisticsTotal', width: 30, type: 'float' },
|
|
280
|
+
width: 200
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
type: 'float',
|
|
284
|
+
name: 'promotionalChargesFlexiCombo',
|
|
285
|
+
header: i18next.t('field.promotional_charges_flexi_combo'),
|
|
286
|
+
sortable: false,
|
|
287
|
+
imex: { header: i18next.t('field.promotional_charges_flexi_combo'), key: 'promotionalChargesFlexiCombo', width: 30, type: 'float' },
|
|
288
|
+
width: 200
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
type: 'float',
|
|
292
|
+
name: 'promotionalCharges',
|
|
293
|
+
header: i18next.t('field.promotional_charges_vouchers'),
|
|
294
|
+
sortable: false,
|
|
295
|
+
imex: { header: i18next.t('field.promotional_charges_vouchers'), key: 'promotionalCharges', width: 30, type: 'float' },
|
|
296
|
+
width: 200
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
type: 'float',
|
|
300
|
+
name: 'ordersMarketingFeesTotal',
|
|
301
|
+
header: i18next.t('field.orders_marketing_fees_total'),
|
|
302
|
+
sortable: false,
|
|
303
|
+
imex: { header: i18next.t('field.orders_marketing_fees_total'), key: 'ordersMarketingFeesTotal', width: 30, type: 'float' },
|
|
304
|
+
width: 200
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
type: 'float',
|
|
308
|
+
name: 'itemPriceCredit',
|
|
309
|
+
header: i18next.t('field.item_price_credit'),
|
|
200
310
|
sortable: false,
|
|
201
|
-
imex: {
|
|
202
|
-
header: i18next.t('field.shipping_fee_voucher'),
|
|
203
|
-
key: 'marketplaceShippingFeeVoucher',
|
|
204
|
-
width: 30,
|
|
205
|
-
type: 'float'
|
|
206
|
-
},
|
|
311
|
+
imex: { header: i18next.t('field.item_price_credit'), key: 'itemPriceCredit', width: 30, type: 'float' },
|
|
207
312
|
width: 200
|
|
208
313
|
},
|
|
209
314
|
{
|
|
210
315
|
type: 'float',
|
|
211
|
-
name: '
|
|
212
|
-
header: i18next.t('field.
|
|
316
|
+
name: 'ordersSalesTotal',
|
|
317
|
+
header: i18next.t('field.orders_sales_total'),
|
|
213
318
|
sortable: false,
|
|
214
|
-
imex: {
|
|
215
|
-
header: i18next.t('field.seller_shipping_fee_voucher'),
|
|
216
|
-
key: 'sellerShippingFeeVoucher',
|
|
217
|
-
width: 30,
|
|
218
|
-
type: 'float'
|
|
219
|
-
},
|
|
319
|
+
imex: { header: i18next.t('field.orders_sales_total'), key: 'ordersSalesTotal', width: 30, type: 'float' },
|
|
220
320
|
width: 200
|
|
221
321
|
},
|
|
222
322
|
{
|
|
223
323
|
type: 'float',
|
|
224
|
-
name: '
|
|
225
|
-
header: i18next.t('field.
|
|
324
|
+
name: 'taxAmount',
|
|
325
|
+
header: i18next.t('field.tax_amount'),
|
|
226
326
|
sortable: false,
|
|
227
|
-
imex: { header: i18next.t('field.
|
|
327
|
+
imex: { header: i18next.t('field.tax_amount'), key: 'taxAmount', width: 30, type: 'float' },
|
|
228
328
|
width: 200
|
|
229
329
|
},
|
|
230
330
|
{
|
|
231
331
|
type: 'float',
|
|
232
|
-
name: '
|
|
233
|
-
header: i18next.t('field.
|
|
332
|
+
name: 'grandTotal',
|
|
333
|
+
header: i18next.t('field.grand_total'),
|
|
234
334
|
sortable: false,
|
|
235
|
-
imex: { header: i18next.t('field.
|
|
335
|
+
imex: { header: i18next.t('field.grand_total'), key: 'grandTotal', width: 30, type: 'float' },
|
|
236
336
|
width: 200
|
|
237
337
|
}
|
|
238
338
|
]
|
|
@@ -254,24 +354,39 @@ class LazadaSalesReport extends connect(store)(PageView) {
|
|
|
254
354
|
orderCreatedAt
|
|
255
355
|
buyerUsername
|
|
256
356
|
payTime
|
|
257
|
-
totalAmount
|
|
258
357
|
refundAmount
|
|
259
358
|
shippingProvider
|
|
260
359
|
storeName
|
|
261
360
|
storeDescription
|
|
262
361
|
promotionId
|
|
263
|
-
originalPrice
|
|
264
|
-
paidPrice
|
|
265
362
|
sku
|
|
266
363
|
variationSku
|
|
267
364
|
productName
|
|
268
365
|
productSku
|
|
269
366
|
productDiscount
|
|
270
367
|
paymentFee
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
368
|
+
itemCommissionFee
|
|
369
|
+
shippingFeePaidByCustomer
|
|
370
|
+
promotionalCharges
|
|
371
|
+
ordersMarketplaceFeesTotal
|
|
372
|
+
ordersMarketingFeesTotal
|
|
373
|
+
ordersSalesTotal
|
|
374
|
+
ordersLogisticsTotal
|
|
375
|
+
itemPriceCredit
|
|
376
|
+
marketplaceBonus
|
|
377
|
+
marketplaceBonusSeller
|
|
378
|
+
shippingFeeDiscountMarketplace
|
|
379
|
+
shippingFeeDiscountSeller
|
|
380
|
+
promotionalChargesFlexiCombo
|
|
381
|
+
autoShippingSubsidyMarketplace
|
|
382
|
+
grandTotal
|
|
383
|
+
originalShippingFee
|
|
384
|
+
taxAmount
|
|
385
|
+
status
|
|
386
|
+
qty
|
|
387
|
+
fulfillmentCenter
|
|
388
|
+
variationId
|
|
389
|
+
variationName
|
|
275
390
|
}
|
|
276
391
|
total
|
|
277
392
|
}
|
|
@@ -286,16 +401,26 @@ class LazadaSalesReport extends connect(store)(PageView) {
|
|
|
286
401
|
records: response.data.marketplaceSalesReports.items.map(item => {
|
|
287
402
|
return {
|
|
288
403
|
...item,
|
|
289
|
-
marketplaceOrderItem: `${item.variationSku} ${item.
|
|
404
|
+
marketplaceOrderItem: `${item.variationSku} ${item.variationName ? `(${item.variationName})` : ''}`,
|
|
290
405
|
marketplaceStore: `${item.storeName} ${item.storeDescription ? `(${item.storeDescription})` : ''}`,
|
|
291
|
-
originalPrice: this._getRoundedValue(item.originalPrice),
|
|
292
|
-
shippingFee: this._getRoundedValue(item.shippingFee),
|
|
293
|
-
actualShippingFee: this._getRoundedValue(item.actualShippingFee),
|
|
294
406
|
paymentFee: this._getRoundedValue(item.paymentFee),
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
407
|
+
itemCommissionFee: this._getRoundedValue(item.itemCommissionFee),
|
|
408
|
+
shippingFeePaidByCustomer: this._getRoundedValue(item.shippingFeePaidByCustomer),
|
|
409
|
+
promotionalCharges: this._getRoundedValue(item.promotionalCharges),
|
|
410
|
+
ordersMarketplaceFeesTotal: this._getRoundedValue(item.ordersMarketplaceFeesTotal),
|
|
411
|
+
ordersMarketingFeesTotal: this._getRoundedValue(item.ordersMarketingFeesTotal),
|
|
412
|
+
ordersSalesTotal: this._getRoundedValue(item.ordersSalesTotal),
|
|
413
|
+
ordersLogisticsTotal: this._getRoundedValue(item.ordersLogisticsTotal),
|
|
414
|
+
itemPriceCredit: this._getRoundedValue(item.itemPriceCredit),
|
|
415
|
+
marketplaceBonus: this._getRoundedValue(item.marketplaceBonus),
|
|
416
|
+
marketplaceBonusSeller: this._getRoundedValue(item.marketplaceBonusSeller),
|
|
417
|
+
shippingFeeDiscountMarketplace: this._getRoundedValue(item.shippingFeeDiscountMarketplace),
|
|
418
|
+
shippingFeeDiscountSeller: this._getRoundedValue(item.shippingFeeDiscountSeller),
|
|
419
|
+
promotionalChargesFlexiCombo: this._getRoundedValue(item.promotionalChargesFlexiCombo),
|
|
420
|
+
autoShippingSubsidyMarketplace: this._getRoundedValue(item.autoShippingSubsidyMarketplace),
|
|
421
|
+
grandTotal: this._getRoundedValue(item.grandTotal),
|
|
422
|
+
originalShippingFee: this._getRoundedValue(item.originalShippingFee),
|
|
423
|
+
taxAmount: this._getRoundedValue(item.taxAmount)
|
|
299
424
|
}
|
|
300
425
|
})
|
|
301
426
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { css, html } from 'lit-element'
|
|
2
|
-
import { i18next } from '@things-factory/i18n-base'
|
|
3
|
-
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
4
|
-
import { client, store, PageView } from '@things-factory/shell'
|
|
5
|
-
import gql from 'graphql-tag'
|
|
6
1
|
import '../../components/stock-allocation-ratio'
|
|
7
2
|
import '../../components/marketplace-order-max-weight'
|
|
8
3
|
|
|
4
|
+
import gql from 'graphql-tag'
|
|
5
|
+
import { css, html } from 'lit-element'
|
|
6
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
7
|
+
|
|
8
|
+
import { i18next } from '@things-factory/i18n-base'
|
|
9
|
+
import { client, PageView, store } from '@things-factory/shell'
|
|
10
|
+
|
|
9
11
|
class MarketplaceSetting extends connect(store)(PageView) {
|
|
10
12
|
static get styles() {
|
|
11
13
|
return [
|
|
@@ -149,6 +151,7 @@ class MarketplaceSetting extends connect(store)(PageView) {
|
|
|
149
151
|
storeName
|
|
150
152
|
platform
|
|
151
153
|
description
|
|
154
|
+
status
|
|
152
155
|
}
|
|
153
156
|
category
|
|
154
157
|
value
|
|
@@ -161,7 +164,7 @@ class MarketplaceSetting extends connect(store)(PageView) {
|
|
|
161
164
|
variables: { filters, sortings }
|
|
162
165
|
})
|
|
163
166
|
|
|
164
|
-
return response.data.marketplaceSettings.items || []
|
|
167
|
+
return response.data.marketplaceSettings.items.filter(item => item.marketplaceStore.status == 'ACTIVE') || []
|
|
165
168
|
}
|
|
166
169
|
|
|
167
170
|
showToast(message) {
|
|
@@ -22,6 +22,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
exports.mutations = exports.queries = void 0;
|
|
23
23
|
const InterfaceWithHub = __importStar(require("./interface-with-hub"));
|
|
24
24
|
const WarehouseProduct = __importStar(require("./warehouse-product"));
|
|
25
|
-
|
|
25
|
+
const ShippingProviders = __importStar(require("./shipping-provider"));
|
|
26
|
+
exports.queries = [InterfaceWithHub.Query, ShippingProviders.Query];
|
|
26
27
|
exports.mutations = [InterfaceWithHub.Mutation, WarehouseProduct.Mutation];
|
|
27
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/graphql/resolvers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uEAAwD;AACxD,sEAAuD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/graphql/resolvers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uEAAwD;AACxD,sEAAuD;AACvD,uEAAwD;AAE3C,QAAA,OAAO,GAAG,CAAC,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAA;AAE3D,QAAA,SAAS,GAAG,CAAC,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAA"}
|
|
@@ -17,7 +17,9 @@ exports.autoAddReleaseOrderResolver = {
|
|
|
17
17
|
.leftJoinAndSelect('MO.marketplaceStore', 'MPS')
|
|
18
18
|
.where('MO.domain = :domainId', { domainId: domain.id })
|
|
19
19
|
.andWhere('MO.releaseOrderId IS NULL')
|
|
20
|
-
.andWhere('MO.status IN (:...status)', {
|
|
20
|
+
.andWhere('MO.status IN (:...status)', {
|
|
21
|
+
status: ['ready_to_ship', 'unfulfilled', 'packed', 'processing']
|
|
22
|
+
})
|
|
21
23
|
.andWhere('MPS.status = :marketplaceStatus', { marketplaceStatus: 'ACTIVE' })
|
|
22
24
|
.getMany();
|
|
23
25
|
var fulfilmentCenter = await integration_fulfillment_1.FulfillmentAPI.getFulfillmentCenter(warehouseId);
|