@things-factory/operato-hub 3.7.14 → 3.7.15
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/dist-server/routers/api/restful-apis/unstable/get-marketplace-order-shipping-list.js +11 -19
- package/dist-server/routers/api/restful-apis/unstable/get-marketplace-order-shipping-list.js.map +1 -1
- package/dist-server/routers/api/restful-apis/v1/get-marketplace-order-shipping-list.js +13 -22
- package/dist-server/routers/api/restful-apis/v1/get-marketplace-order-shipping-list.js.map +1 -1
- package/dist-server/routers/api/restful-apis/v2/get-marketplace-order-shipping-list.js +13 -22
- package/dist-server/routers/api/restful-apis/v2/get-marketplace-order-shipping-list.js.map +1 -1
- package/package.json +5 -5
- package/server/routers/api/restful-apis/unstable/get-marketplace-order-shipping-list.ts +12 -12
- package/server/routers/api/restful-apis/v1/get-marketplace-order-shipping-list.ts +14 -15
- package/server/routers/api/restful-apis/v2/get-marketplace-order-shipping-list.ts +14 -15
package/dist-server/routers/api/restful-apis/unstable/get-marketplace-order-shipping-list.js
CHANGED
|
@@ -13,7 +13,7 @@ api_1.restfulApiRouter.get('/unstable/warehouse/:storeId/get-marketplace-order-s
|
|
|
13
13
|
const { t } = context;
|
|
14
14
|
const { shippingNo, orderNo, status, fromDate, toDate, paginationEntriesPerPage, paginationOffset } = context.query;
|
|
15
15
|
let filters = [
|
|
16
|
-
{ name: '
|
|
16
|
+
{ name: 'marketplace_store_id', operator: 'eq', value: marketplaceStore === null || marketplaceStore === void 0 ? void 0 : marketplaceStore.id, relation: true },
|
|
17
17
|
{ name: 'domain', operator: 'eq', value: domain.id, relation: true }
|
|
18
18
|
];
|
|
19
19
|
let pagination = { page: 1, limit: 20 };
|
|
@@ -91,24 +91,16 @@ async function validateFilters(context, filters, shippingNo, orderNo, status, fr
|
|
|
91
91
|
filters = [...filters, { name: 'orderNoRef', operator: 'eq', value: orderNo }];
|
|
92
92
|
if (status && status !== '')
|
|
93
93
|
filters = [...filters, { name: 'status', operator: 'eq', value: status }];
|
|
94
|
-
if (fromDate && fromDate !== '') {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
toDate = new Date(`${toDate.split(' ').join('')} 23:59:59`);
|
|
105
|
-
if (toDate instanceof Date && !isNaN(toDate.getTime()))
|
|
106
|
-
toDate = toDate.toLocaleString();
|
|
107
|
-
else
|
|
108
|
-
context.throw(400, context.t('toDate is invalid'));
|
|
109
|
-
}
|
|
110
|
-
else
|
|
111
|
-
toDate = '';
|
|
94
|
+
// if (fromDate && fromDate !== '') {
|
|
95
|
+
// fromDate = new Date(`${fromDate.split(' ').join('')} 00:00:00`)
|
|
96
|
+
// // if (fromDate instanceof Date && !isNaN(fromDate.getTime())) fromDate = fromDate.toLocaleString()
|
|
97
|
+
// // else context.throw(400, context.t('fromDate is invalid'))
|
|
98
|
+
// } else fromDate = ''
|
|
99
|
+
// if (toDate && toDate !== '') {
|
|
100
|
+
// toDate = new Date(`${toDate.split(' ').join('')} 23:59:59`)
|
|
101
|
+
// // if (toDate instanceof Date && !isNaN(toDate.getTime())) toDate = toDate.toLocaleString()
|
|
102
|
+
// // else context.throw(400, context.t('toDate is invalid'))
|
|
103
|
+
// } else toDate = ''
|
|
112
104
|
if (fromDate !== '' && toDate !== '')
|
|
113
105
|
filters = [...filters, { name: 'createdAt', operator: 'between', value: [fromDate, toDate] }];
|
|
114
106
|
else if (fromDate !== '' && toDate === '')
|
package/dist-server/routers/api/restful-apis/unstable/get-marketplace-order-shipping-list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-marketplace-order-shipping-list.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/unstable/get-marketplace-order-shipping-list.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAE7B,6CAAgE;AAEhE,qFAAgF;AAChF,+EAA0E;AAE1E,sBAAM,CAAC,GAAG,CACR,kEAAkE,EAClE,wCAAkB,EAClB,kCAAe,EACf,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtB,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAC1D,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,CAAA;IACrB,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAEnH,IAAI,OAAO,GAAQ;QACjB,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"get-marketplace-order-shipping-list.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/unstable/get-marketplace-order-shipping-list.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAE7B,6CAAgE;AAEhE,qFAAgF;AAChF,+EAA0E;AAE1E,sBAAM,CAAC,GAAG,CACR,kEAAkE,EAClE,wCAAkB,EAClB,kCAAe,EACf,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtB,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAC1D,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,CAAA;IACrB,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAEnH,IAAI,OAAO,GAAQ;QACjB,EAAE,IAAI,EAAE,sBAAsB,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7F,EAAE,IAAI,EAAE,QAAQ,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,EAAE,OAAO,GAAE,CAAA;KACpD;IAED,OAAO,UAAU,CAAA;AACnB,CAAC;AArBD,gDAqBC"}
|
|
@@ -13,7 +13,7 @@ api_1.restfulApiRouter.get('/v1/warehouse/:storeId/get-marketplace-order-shippin
|
|
|
13
13
|
const { t } = context;
|
|
14
14
|
const { shippingNo, orderNo, status, fromDate, toDate, paginationEntriesPerPage, paginationOffset } = context.query;
|
|
15
15
|
let filters = [
|
|
16
|
-
{ name: '
|
|
16
|
+
{ name: 'marketplace_store_id', operator: 'eq', value: marketplaceStore === null || marketplaceStore === void 0 ? void 0 : marketplaceStore.id, relation: true },
|
|
17
17
|
{ name: 'domain', operator: 'eq', value: domain.id, relation: true }
|
|
18
18
|
];
|
|
19
19
|
let pagination = { page: 1, limit: 20 };
|
|
@@ -43,14 +43,13 @@ api_1.restfulApiRouter.get('/v1/warehouse/:storeId/get-marketplace-order-shippin
|
|
|
43
43
|
phone2
|
|
44
44
|
email
|
|
45
45
|
orderType
|
|
46
|
-
freightType
|
|
47
|
-
parcelType
|
|
48
|
-
goodsType
|
|
49
46
|
trackingNo
|
|
50
47
|
ownTrackingNo
|
|
51
48
|
airwayBill
|
|
52
49
|
deliveryMethod
|
|
50
|
+
weightUnit
|
|
53
51
|
totalWeight
|
|
52
|
+
volumeUnit
|
|
54
53
|
totalVolume
|
|
55
54
|
transporter
|
|
56
55
|
ownTransporter
|
|
@@ -92,24 +91,16 @@ async function validateFilters(context, filters, shippingNo, orderNo, status, fr
|
|
|
92
91
|
filters = [...filters, { name: 'orderNoRef', operator: 'eq', value: orderNo }];
|
|
93
92
|
if (status && status !== '')
|
|
94
93
|
filters = [...filters, { name: 'status', operator: 'eq', value: status }];
|
|
95
|
-
if (fromDate && fromDate !== '') {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
toDate = new Date(`${toDate.split(' ').join('')} 23:59:59`);
|
|
106
|
-
if (toDate instanceof Date && !isNaN(toDate.getTime()))
|
|
107
|
-
toDate = toDate.toLocaleString();
|
|
108
|
-
else
|
|
109
|
-
context.throw(400, context.t('toDate is invalid'));
|
|
110
|
-
}
|
|
111
|
-
else
|
|
112
|
-
toDate = '';
|
|
94
|
+
// if (fromDate && fromDate !== '') {
|
|
95
|
+
// fromDate = new Date(`${fromDate.split(' ').join('')} 00:00:00`)
|
|
96
|
+
// // if (fromDate instanceof Date && !isNaN(fromDate.getTime())) fromDate = fromDate.toLocaleString()
|
|
97
|
+
// // else context.throw(400, context.t('fromDate is invalid'))
|
|
98
|
+
// } else fromDate = ''
|
|
99
|
+
// if (toDate && toDate !== '') {
|
|
100
|
+
// toDate = new Date(`${toDate.split(' ').join('')} 23:59:59`)
|
|
101
|
+
// // if (toDate instanceof Date && !isNaN(toDate.getTime())) toDate = toDate.toLocaleString()
|
|
102
|
+
// // else context.throw(400, context.t('toDate is invalid'))
|
|
103
|
+
// } else toDate = ''
|
|
113
104
|
if (fromDate !== '' && toDate !== '')
|
|
114
105
|
filters = [...filters, { name: 'createdAt', operator: 'between', value: [fromDate, toDate] }];
|
|
115
106
|
else if (fromDate !== '' && toDate === '')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-marketplace-order-shipping-list.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/v1/get-marketplace-order-shipping-list.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAE7B,6CAAgE;AAEhE,qFAAgF;AAChF,+EAA0E;AAE1E,sBAAM,CAAC,GAAG,CACR,4DAA4D,EAC5D,wCAAkB,EAClB,kCAAe,EACf,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtB,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAC1D,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,CAAA;IACrB,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAEnH,IAAI,OAAO,GAAQ;QACjB,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"get-marketplace-order-shipping-list.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/v1/get-marketplace-order-shipping-list.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAE7B,6CAAgE;AAEhE,qFAAgF;AAChF,+EAA0E;AAE1E,sBAAM,CAAC,GAAG,CACR,4DAA4D,EAC5D,wCAAkB,EAClB,kCAAe,EACf,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtB,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAC1D,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,CAAA;IACrB,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAEnH,IAAI,OAAO,GAAQ;QACjB,EAAE,IAAI,EAAE,sBAAsB,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7F,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;KACrE,CAAA;IACD,IAAI,UAAU,GAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;IAE5C,OAAO,GAAG,MAAM,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,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AAC,CAAA;QAC3B,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAA;QAEzB,IAAI,MAAM,GAAG,CAAC;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,wCAAwC,CAAC,CAAC,CAAA;aAClF,IAAI,OAAO,GAAG,CAAC;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,gDAAgD,CAAC,CAAC,CAAA;aAChG,IAAI,OAAO,GAAG,GAAG;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,kDAAkD,CAAC,CAAC,CAAA;;YACpG,UAAU,mCAAQ,UAAU,KAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAE,CAAA;KAClE;SAAM,IAAI,OAAO,KAAK,EAAE,IAAI,MAAM,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE;QACvE,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAA;QAE3B,IAAI,OAAO,GAAG,CAAC;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,gDAAgD,CAAC,CAAC,CAAA;aAC3F,IAAI,OAAO,GAAG,GAAG;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,kDAAkD,CAAC,CAAC,CAAA;;YACpG,UAAU,mCAAQ,UAAU,KAAE,KAAK,EAAE,OAAO,GAAE,CAAA;KACpD;IAED,OAAO,UAAU,CAAA;AACnB,CAAC;AArBD,gDAqBC"}
|
|
@@ -13,7 +13,7 @@ api_1.restfulApiRouter.get('/v2/warehouse/:storeId/get-marketplace-order-shippin
|
|
|
13
13
|
const { t } = context;
|
|
14
14
|
const { shippingNo, orderNo, status, fromDate, toDate, paginationEntriesPerPage, paginationOffset } = context.query;
|
|
15
15
|
let filters = [
|
|
16
|
-
{ name: '
|
|
16
|
+
{ name: 'marketplace_store_id', operator: 'eq', value: marketplaceStore === null || marketplaceStore === void 0 ? void 0 : marketplaceStore.id, relation: true },
|
|
17
17
|
{ name: 'domain', operator: 'eq', value: domain.id, relation: true }
|
|
18
18
|
];
|
|
19
19
|
let pagination = { page: 1, limit: 20 };
|
|
@@ -43,14 +43,13 @@ api_1.restfulApiRouter.get('/v2/warehouse/:storeId/get-marketplace-order-shippin
|
|
|
43
43
|
phone2
|
|
44
44
|
email
|
|
45
45
|
orderType
|
|
46
|
-
freightType
|
|
47
|
-
parcelType
|
|
48
|
-
goodsType
|
|
49
46
|
trackingNo
|
|
50
47
|
ownTrackingNo
|
|
51
48
|
airwayBill
|
|
52
49
|
deliveryMethod
|
|
50
|
+
weightUnit
|
|
53
51
|
totalWeight
|
|
52
|
+
volumeUnit
|
|
54
53
|
totalVolume
|
|
55
54
|
transporter
|
|
56
55
|
ownTransporter
|
|
@@ -92,24 +91,16 @@ async function validateFilters(context, filters, shippingNo, orderNo, status, fr
|
|
|
92
91
|
filters = [...filters, { name: 'orderNoRef', operator: 'eq', value: orderNo }];
|
|
93
92
|
if (status && status !== '')
|
|
94
93
|
filters = [...filters, { name: 'status', operator: 'eq', value: status }];
|
|
95
|
-
if (fromDate && fromDate !== '') {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
toDate = new Date(`${toDate.split(' ').join('')} 23:59:59`);
|
|
106
|
-
if (toDate instanceof Date && !isNaN(toDate.getTime()))
|
|
107
|
-
toDate = toDate.toLocaleString();
|
|
108
|
-
else
|
|
109
|
-
context.throw(400, context.t('toDate is invalid'));
|
|
110
|
-
}
|
|
111
|
-
else
|
|
112
|
-
toDate = '';
|
|
94
|
+
// if (fromDate && fromDate !== '') {
|
|
95
|
+
// fromDate = new Date(`${fromDate.split(' ').join('')} 00:00:00`)
|
|
96
|
+
// // if (fromDate instanceof Date && !isNaN(fromDate.getTime())) fromDate = fromDate.toLocaleString()
|
|
97
|
+
// // else context.throw(400, context.t('fromDate is invalid'))
|
|
98
|
+
// } else fromDate = ''
|
|
99
|
+
// if (toDate && toDate !== '') {
|
|
100
|
+
// toDate = new Date(`${toDate.split(' ').join('')} 23:59:59`)
|
|
101
|
+
// // if (toDate instanceof Date && !isNaN(toDate.getTime())) toDate = toDate.toLocaleString()
|
|
102
|
+
// // else context.throw(400, context.t('toDate is invalid'))
|
|
103
|
+
// } else toDate = ''
|
|
113
104
|
if (fromDate !== '' && toDate !== '')
|
|
114
105
|
filters = [...filters, { name: 'createdAt', operator: 'between', value: [fromDate, toDate] }];
|
|
115
106
|
else if (fromDate !== '' && toDate === '')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-marketplace-order-shipping-list.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/v2/get-marketplace-order-shipping-list.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAE7B,6CAAgE;AAEhE,qFAAgF;AAChF,+EAA0E;AAE1E,sBAAM,CAAC,GAAG,CACR,4DAA4D,EAC5D,wCAAkB,EAClB,kCAAe,EACf,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtB,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAC1D,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,CAAA;IACrB,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAEnH,IAAI,OAAO,GAAQ;QACjB,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"get-marketplace-order-shipping-list.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful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,OAAO,CAAC,CAAC,CAAC,gDAAgD,CAAC,CAAC,CAAA;aAChG,IAAI,OAAO,GAAG,GAAG;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,kDAAkD,CAAC,CAAC,CAAA;;YACpG,UAAU,mCAAQ,UAAU,KAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAE,CAAA;KAClE;SAAM,IAAI,OAAO,KAAK,EAAE,IAAI,MAAM,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE;QACvE,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAA;QAE3B,IAAI,OAAO,GAAG,CAAC;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,gDAAgD,CAAC,CAAC,CAAA;aAC3F,IAAI,OAAO,GAAG,GAAG;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,kDAAkD,CAAC,CAAC,CAAA;;YACpG,UAAU,mCAAQ,UAAU,KAAE,KAAK,EAAE,OAAO,GAAE,CAAA;KACpD;IAED,OAAO,UAAU,CAAA;AACnB,CAAC;AArBD,gDAqBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-hub",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.15",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@things-factory/pdf": "^3.7.5",
|
|
75
75
|
"@things-factory/product-ui": "^3.7.14",
|
|
76
76
|
"@things-factory/resource-ui": "^3.7.7",
|
|
77
|
-
"@things-factory/sales-base": "^3.7.
|
|
77
|
+
"@things-factory/sales-base": "^3.7.15",
|
|
78
78
|
"@things-factory/scene-chartjs": "^3.7.5",
|
|
79
79
|
"@things-factory/scene-clock": "^3.7.5",
|
|
80
80
|
"@things-factory/scene-clone": "^3.7.5",
|
|
@@ -104,8 +104,8 @@
|
|
|
104
104
|
"@things-factory/setting-ui": "^3.7.5",
|
|
105
105
|
"@things-factory/shell": "^3.7.5",
|
|
106
106
|
"@things-factory/system-ui": "^3.7.5",
|
|
107
|
-
"@things-factory/warehouse-base": "^3.7.
|
|
108
|
-
"@things-factory/worksheet-base": "^3.7.
|
|
107
|
+
"@things-factory/warehouse-base": "^3.7.15",
|
|
108
|
+
"@things-factory/worksheet-base": "^3.7.15",
|
|
109
109
|
"koa2-swagger-ui": "^5.0.2",
|
|
110
110
|
"swagger-jsdoc": "^5.0.0",
|
|
111
111
|
"yamljs": "^0.3.0"
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"resolutions": {
|
|
117
117
|
"core-js": "^3.16.0"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "5f9af9a29afa1e43536817aa9e7a63e0c38908ed"
|
|
120
120
|
}
|
|
@@ -15,7 +15,7 @@ router.get(
|
|
|
15
15
|
const { shippingNo, orderNo, status, fromDate, toDate, paginationEntriesPerPage, paginationOffset } = context.query
|
|
16
16
|
|
|
17
17
|
let filters: any = [
|
|
18
|
-
{ name: '
|
|
18
|
+
{ name: 'marketplace_store_id', operator: 'eq', value: marketplaceStore?.id, relation: true },
|
|
19
19
|
{ name: 'domain', operator: 'eq', value: domain.id, relation: true }
|
|
20
20
|
]
|
|
21
21
|
let pagination: any = { page: 1, limit: 20 }
|
|
@@ -105,17 +105,17 @@ export async function validateFilters(context, filters, shippingNo, orderNo, sta
|
|
|
105
105
|
|
|
106
106
|
if (status && status !== '') filters = [...filters, { name: 'status', operator: 'eq', value: status }]
|
|
107
107
|
|
|
108
|
-
if (fromDate && fromDate !== '') {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
} else fromDate = ''
|
|
113
|
-
|
|
114
|
-
if (toDate && toDate !== '') {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
} else toDate = ''
|
|
108
|
+
// if (fromDate && fromDate !== '') {
|
|
109
|
+
// fromDate = new Date(`${fromDate.split(' ').join('')} 00:00:00`)
|
|
110
|
+
// // if (fromDate instanceof Date && !isNaN(fromDate.getTime())) fromDate = fromDate.toLocaleString()
|
|
111
|
+
// // else context.throw(400, context.t('fromDate is invalid'))
|
|
112
|
+
// } else fromDate = ''
|
|
113
|
+
|
|
114
|
+
// if (toDate && toDate !== '') {
|
|
115
|
+
// toDate = new Date(`${toDate.split(' ').join('')} 23:59:59`)
|
|
116
|
+
// // if (toDate instanceof Date && !isNaN(toDate.getTime())) toDate = toDate.toLocaleString()
|
|
117
|
+
// // else context.throw(400, context.t('toDate is invalid'))
|
|
118
|
+
// } else toDate = ''
|
|
119
119
|
|
|
120
120
|
if (fromDate !== '' && toDate !== '')
|
|
121
121
|
filters = [...filters, { name: 'createdAt', operator: 'between', value: [fromDate, toDate] }]
|
|
@@ -15,7 +15,7 @@ router.get(
|
|
|
15
15
|
const { shippingNo, orderNo, status, fromDate, toDate, paginationEntriesPerPage, paginationOffset } = context.query
|
|
16
16
|
|
|
17
17
|
let filters: any = [
|
|
18
|
-
{ name: '
|
|
18
|
+
{ name: 'marketplace_store_id', operator: 'eq', value: marketplaceStore?.id, relation: true },
|
|
19
19
|
{ name: 'domain', operator: 'eq', value: domain.id, relation: true }
|
|
20
20
|
]
|
|
21
21
|
let pagination: any = { page: 1, limit: 20 }
|
|
@@ -48,14 +48,13 @@ router.get(
|
|
|
48
48
|
phone2
|
|
49
49
|
email
|
|
50
50
|
orderType
|
|
51
|
-
freightType
|
|
52
|
-
parcelType
|
|
53
|
-
goodsType
|
|
54
51
|
trackingNo
|
|
55
52
|
ownTrackingNo
|
|
56
53
|
airwayBill
|
|
57
54
|
deliveryMethod
|
|
55
|
+
weightUnit
|
|
58
56
|
totalWeight
|
|
57
|
+
volumeUnit
|
|
59
58
|
totalVolume
|
|
60
59
|
transporter
|
|
61
60
|
ownTransporter
|
|
@@ -106,17 +105,17 @@ export async function validateFilters(context, filters, shippingNo, orderNo, sta
|
|
|
106
105
|
|
|
107
106
|
if (status && status !== '') filters = [...filters, { name: 'status', operator: 'eq', value: status }]
|
|
108
107
|
|
|
109
|
-
if (fromDate && fromDate !== '') {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
} else fromDate = ''
|
|
114
|
-
|
|
115
|
-
if (toDate && toDate !== '') {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
} else toDate = ''
|
|
108
|
+
// if (fromDate && fromDate !== '') {
|
|
109
|
+
// fromDate = new Date(`${fromDate.split(' ').join('')} 00:00:00`)
|
|
110
|
+
// // if (fromDate instanceof Date && !isNaN(fromDate.getTime())) fromDate = fromDate.toLocaleString()
|
|
111
|
+
// // else context.throw(400, context.t('fromDate is invalid'))
|
|
112
|
+
// } else fromDate = ''
|
|
113
|
+
|
|
114
|
+
// if (toDate && toDate !== '') {
|
|
115
|
+
// toDate = new Date(`${toDate.split(' ').join('')} 23:59:59`)
|
|
116
|
+
// // if (toDate instanceof Date && !isNaN(toDate.getTime())) toDate = toDate.toLocaleString()
|
|
117
|
+
// // else context.throw(400, context.t('toDate is invalid'))
|
|
118
|
+
// } else toDate = ''
|
|
120
119
|
|
|
121
120
|
if (fromDate !== '' && toDate !== '')
|
|
122
121
|
filters = [...filters, { name: 'createdAt', operator: 'between', value: [fromDate, toDate] }]
|
|
@@ -15,7 +15,7 @@ router.get(
|
|
|
15
15
|
const { shippingNo, orderNo, status, fromDate, toDate, paginationEntriesPerPage, paginationOffset } = context.query
|
|
16
16
|
|
|
17
17
|
let filters: any = [
|
|
18
|
-
{ name: '
|
|
18
|
+
{ name: 'marketplace_store_id', operator: 'eq', value: marketplaceStore?.id, relation: true },
|
|
19
19
|
{ name: 'domain', operator: 'eq', value: domain.id, relation: true }
|
|
20
20
|
]
|
|
21
21
|
let pagination: any = { page: 1, limit: 20 }
|
|
@@ -48,14 +48,13 @@ router.get(
|
|
|
48
48
|
phone2
|
|
49
49
|
email
|
|
50
50
|
orderType
|
|
51
|
-
freightType
|
|
52
|
-
parcelType
|
|
53
|
-
goodsType
|
|
54
51
|
trackingNo
|
|
55
52
|
ownTrackingNo
|
|
56
53
|
airwayBill
|
|
57
54
|
deliveryMethod
|
|
55
|
+
weightUnit
|
|
58
56
|
totalWeight
|
|
57
|
+
volumeUnit
|
|
59
58
|
totalVolume
|
|
60
59
|
transporter
|
|
61
60
|
ownTransporter
|
|
@@ -106,17 +105,17 @@ export async function validateFilters(context, filters, shippingNo, orderNo, sta
|
|
|
106
105
|
|
|
107
106
|
if (status && status !== '') filters = [...filters, { name: 'status', operator: 'eq', value: status }]
|
|
108
107
|
|
|
109
|
-
if (fromDate && fromDate !== '') {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
} else fromDate = ''
|
|
114
|
-
|
|
115
|
-
if (toDate && toDate !== '') {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
} else toDate = ''
|
|
108
|
+
// if (fromDate && fromDate !== '') {
|
|
109
|
+
// fromDate = new Date(`${fromDate.split(' ').join('')} 00:00:00`)
|
|
110
|
+
// // if (fromDate instanceof Date && !isNaN(fromDate.getTime())) fromDate = fromDate.toLocaleString()
|
|
111
|
+
// // else context.throw(400, context.t('fromDate is invalid'))
|
|
112
|
+
// } else fromDate = ''
|
|
113
|
+
|
|
114
|
+
// if (toDate && toDate !== '') {
|
|
115
|
+
// toDate = new Date(`${toDate.split(' ').join('')} 23:59:59`)
|
|
116
|
+
// // if (toDate instanceof Date && !isNaN(toDate.getTime())) toDate = toDate.toLocaleString()
|
|
117
|
+
// // else context.throw(400, context.t('toDate is invalid'))
|
|
118
|
+
// } else toDate = ''
|
|
120
119
|
|
|
121
120
|
if (fromDate !== '' && toDate !== '')
|
|
122
121
|
filters = [...filters, { name: 'createdAt', operator: 'between', value: [fromDate, toDate] }]
|