@axelor/aos-mobile-stock 6.4.0 → 6.5.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/README.md +8 -8
- package/lib/api/customer-delivery-api.js +35 -77
- package/lib/api/customer-delivery-api.js.map +1 -1
- package/lib/api/customer-delivery-line-api.js +11 -34
- package/lib/api/customer-delivery-line-api.js.map +1 -1
- package/lib/api/internal-move-api.js +25 -62
- package/lib/api/internal-move-api.js.map +1 -1
- package/lib/api/internal-move-line-api.js +11 -31
- package/lib/api/internal-move-line-api.js.map +1 -1
- package/lib/api/inventory-api.js +24 -67
- package/lib/api/inventory-api.js.map +1 -1
- package/lib/api/inventory-line-api.js +11 -31
- package/lib/api/inventory-line-api.js.map +1 -1
- package/lib/api/partner-api.js +46 -131
- package/lib/api/partner-api.js.map +1 -1
- package/lib/api/product-api.d.ts +0 -1
- package/lib/api/product-api.js +44 -133
- package/lib/api/product-api.js.map +1 -1
- package/lib/api/stock-correction-api.js +7 -29
- package/lib/api/stock-correction-api.js.map +1 -1
- package/lib/api/stock-location-api.d.ts +0 -1
- package/lib/api/stock-location-api.js +18 -72
- package/lib/api/stock-location-api.js.map +1 -1
- package/lib/api/stock-location-line-api.js +41 -92
- package/lib/api/stock-location-line-api.js.map +1 -1
- package/lib/api/supplier-arrival-api.js +35 -76
- package/lib/api/supplier-arrival-api.js.map +1 -1
- package/lib/api/supplier-arrival-line-api.js +11 -34
- package/lib/api/supplier-arrival-line-api.js.map +1 -1
- package/lib/api/supplier-catalog-api.js +17 -27
- package/lib/api/supplier-catalog-api.js.map +1 -1
- package/lib/api/tracking-number-api.d.ts +0 -1
- package/lib/api/tracking-number-api.js +13 -61
- package/lib/api/tracking-number-api.js.map +1 -1
- package/lib/components/molecules/StockCorrectionCard/StockCorrectionCard.js +15 -5
- package/lib/components/molecules/StockCorrectionCard/StockCorrectionCard.js.map +1 -1
- package/lib/components/organisms/CustomerDeliveryCard/CustomerDeliveryCard.js +20 -8
- package/lib/components/organisms/CustomerDeliveryCard/CustomerDeliveryCard.js.map +1 -1
- package/lib/components/organisms/InternalMoveCard/InternalMoveCard.js +20 -7
- package/lib/components/organisms/InternalMoveCard/InternalMoveCard.js.map +1 -1
- package/lib/components/organisms/InternalMoveLineCard/InternalMoveLineCard.js +1 -0
- package/lib/components/organisms/InternalMoveLineCard/InternalMoveLineCard.js.map +1 -1
- package/lib/components/organisms/InventoryCard/InventoryCard.js +25 -12
- package/lib/components/organisms/InventoryCard/InventoryCard.js.map +1 -1
- package/lib/components/organisms/InventoryHeader/InventoryHeader.js +11 -9
- package/lib/components/organisms/InventoryHeader/InventoryHeader.js.map +1 -1
- package/lib/components/organisms/SupplierArrivalCard/SupplierArrivalCard.js +15 -5
- package/lib/components/organisms/SupplierArrivalCard/SupplierArrivalCard.js.map +1 -1
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -1
- package/lib/models/index.d.ts +3 -0
- package/lib/models/index.js +21 -0
- package/lib/models/index.js.map +1 -0
- package/lib/models/objectFields.d.ts +2 -0
- package/lib/models/objectFields.js +200 -0
- package/lib/models/objectFields.js.map +1 -0
- package/lib/models/searchFields.d.ts +2 -0
- package/lib/models/searchFields.js +34 -0
- package/lib/models/searchFields.js.map +1 -0
- package/lib/models/sortFields.d.ts +2 -0
- package/lib/models/sortFields.js +47 -0
- package/lib/models/sortFields.js.map +1 -0
- package/lib/screens/customerDeliveries/CustomerDeliveryLineListScreen.js +30 -30
- package/lib/screens/customerDeliveries/CustomerDeliveryLineListScreen.js.map +1 -1
- package/lib/screens/customerDeliveries/CustomerDeliveryListScreen.js +17 -35
- package/lib/screens/customerDeliveries/CustomerDeliveryListScreen.js.map +1 -1
- package/lib/screens/internalMoves/InternalMoveLineDetailsScreen.js +36 -22
- package/lib/screens/internalMoves/InternalMoveLineDetailsScreen.js.map +1 -1
- package/lib/screens/internalMoves/InternalMoveLineListScreen.js +30 -30
- package/lib/screens/internalMoves/InternalMoveLineListScreen.js.map +1 -1
- package/lib/screens/internalMoves/InternalMoveListScreen.js +22 -49
- package/lib/screens/internalMoves/InternalMoveListScreen.js.map +1 -1
- package/lib/screens/inventories/InventoryLineListScreen.js +37 -43
- package/lib/screens/inventories/InventoryLineListScreen.js.map +1 -1
- package/lib/screens/inventories/InventoryListScreen.js +27 -69
- package/lib/screens/inventories/InventoryListScreen.js.map +1 -1
- package/lib/screens/products/ProductStockLocationDetailsScreen.js +30 -33
- package/lib/screens/products/ProductStockLocationDetailsScreen.js.map +1 -1
- package/lib/screens/stockCorrections/StockCorrectionListScreen.js +18 -55
- package/lib/screens/stockCorrections/StockCorrectionListScreen.js.map +1 -1
- package/lib/screens/supplierArrivals/SupplierArrivalLineListScreen.js +30 -30
- package/lib/screens/supplierArrivals/SupplierArrivalLineListScreen.js.map +1 -1
- package/lib/screens/supplierArrivals/SupplierArrivalListScreen.js +17 -35
- package/lib/screens/supplierArrivals/SupplierArrivalListScreen.js.map +1 -1
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Stock
|
|
3
|
+
tags: Readme
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
<h1 align="center">@axelor/aos-mobile-stock</h1>
|
|
2
7
|
|
|
3
8
|
<div align="center">
|
|
@@ -6,7 +11,7 @@
|
|
|
6
11
|
|
|
7
12
|
## Presentation
|
|
8
13
|
|
|
9
|
-
This package was developed for the [Axelor Open Mobile](https://github.com/axelor/axelor-mobile) application.
|
|
14
|
+
This package was developed for the [Axelor Open Mobile](https://github.com/axelor/axelor-mobile) application.
|
|
10
15
|
|
|
11
16
|
The purpose of this package is to link with the stock module of the [Axelor Open Suite (AOS)](https://github.com/axelor/axelor-open-suite) ERP. It provides a simplified version of a number of processes available on the webapp. This package is compatible with AOS from version 6.4.0.
|
|
12
17
|
|
|
@@ -20,7 +25,7 @@ yarn add @axelor/aos-mobile-stock
|
|
|
20
25
|
|
|
21
26
|
Compatibility with React v18.2.x and React Native v0.68.x.
|
|
22
27
|
|
|
23
|
-
To add this package in your application, you need to add it the
|
|
28
|
+
To add this package in your application, you need to add it the _modules_ props of the component `Application` from @axelor/aos-mobile-core package.
|
|
24
29
|
|
|
25
30
|
```typescript
|
|
26
31
|
import React from 'react';
|
|
@@ -28,12 +33,7 @@ import {Application} from '@axelor/aos-mobile-core';
|
|
|
28
33
|
import {StockModule} from '@axelor/aos-mobile-stock';
|
|
29
34
|
|
|
30
35
|
const App = () => {
|
|
31
|
-
return
|
|
32
|
-
<Application
|
|
33
|
-
modules={[StockModule]}
|
|
34
|
-
mainMenu="auth_menu_user"
|
|
35
|
-
/>
|
|
36
|
-
);
|
|
36
|
+
return <Application modules={[StockModule]} mainMenu="auth_menu_user" />;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
export default App;
|
|
@@ -15,87 +15,45 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
import { axiosApiProvider } from '@axelor/aos-mobile-core';
|
|
18
|
+
import { axiosApiProvider, createStandardSearch, getSearchCriterias, } from '@axelor/aos-mobile-core';
|
|
19
19
|
import StockMove from '../types/stock-move';
|
|
20
|
-
const deliveryFields = [
|
|
21
|
-
'id',
|
|
22
|
-
'availableStatusSelect',
|
|
23
|
-
'filterOnAvailableProducts',
|
|
24
|
-
'name',
|
|
25
|
-
'stockMoveLineList',
|
|
26
|
-
'stockMoveSeq',
|
|
27
|
-
'fromStockLocation',
|
|
28
|
-
'toAddress',
|
|
29
|
-
'toAddressStr',
|
|
30
|
-
'company',
|
|
31
|
-
'originId',
|
|
32
|
-
'origin',
|
|
33
|
-
'createdOn',
|
|
34
|
-
'estimatedDate',
|
|
35
|
-
'realDate',
|
|
36
|
-
'partner',
|
|
37
|
-
'statusSelect',
|
|
38
|
-
'pickingOrderComments',
|
|
39
|
-
'deliveryCondition',
|
|
40
|
-
'isIspmRequired',
|
|
41
|
-
];
|
|
42
|
-
const sortByFields = [
|
|
43
|
-
'statusSelect',
|
|
44
|
-
'-realDate',
|
|
45
|
-
'estimatedDate',
|
|
46
|
-
'stockMoveSeq',
|
|
47
|
-
];
|
|
48
20
|
const createSearchCriteria = searchValue => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
value: searchValue,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
return criteria;
|
|
21
|
+
return [
|
|
22
|
+
{
|
|
23
|
+
fieldName: 'isReversion',
|
|
24
|
+
operator: '=',
|
|
25
|
+
value: false,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
fieldName: 'typeSelect',
|
|
29
|
+
operator: '=',
|
|
30
|
+
value: StockMove.type.outgoing,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
operator: 'OR',
|
|
34
|
+
criteria: [
|
|
35
|
+
{
|
|
36
|
+
fieldName: 'statusSelect',
|
|
37
|
+
operator: '=',
|
|
38
|
+
value: StockMove.status.Planned,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
fieldName: 'statusSelect',
|
|
42
|
+
operator: '=',
|
|
43
|
+
value: StockMove.status.Realized,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
getSearchCriterias('stock_customerDelivery', searchValue),
|
|
48
|
+
];
|
|
81
49
|
};
|
|
82
50
|
export async function searchDeliveryFilter({ searchValue = null, page = 0 }) {
|
|
83
|
-
return
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
operator: 'and',
|
|
90
|
-
criteria: createSearchCriteria(searchValue),
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
},
|
|
94
|
-
fields: deliveryFields,
|
|
95
|
-
sortBy: sortByFields,
|
|
96
|
-
limit: 10,
|
|
97
|
-
offset: 10 * page,
|
|
98
|
-
},
|
|
51
|
+
return createStandardSearch({
|
|
52
|
+
model: 'com.axelor.apps.stock.db.StockMove',
|
|
53
|
+
criteria: createSearchCriteria(searchValue),
|
|
54
|
+
fieldKey: 'stock_customerDelivery',
|
|
55
|
+
sortKey: 'stock_customerDelivery',
|
|
56
|
+
page,
|
|
99
57
|
});
|
|
100
58
|
}
|
|
101
59
|
export async function addLineStockMove({ stockMoveId, productId, unitId, trackingNumberId, expectedQty, realQty, }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-delivery-api.js","sourceRoot":"","sources":["../../src/api/customer-delivery-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"customer-delivery-api.js","sourceRoot":"","sources":["../../src/api/customer-delivery-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,MAAM,oBAAoB,GAAG,WAAW,CAAC,EAAE;IACzC,OAAO;QACL;YACE,SAAS,EAAE,aAAa;YACxB,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,KAAK;SACb;QACD;YACE,SAAS,EAAE,YAAY;YACvB,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,QAAQ;SAC/B;QACD;YACE,QAAQ,EAAE,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AE,OAAO;SACjB;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -15,42 +15,19 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
import { axiosApiProvider } from '@axelor/aos-mobile-core';
|
|
19
|
-
const customerDeliveryLineFields = [
|
|
20
|
-
'id',
|
|
21
|
-
'product',
|
|
22
|
-
'availableStatusSelect',
|
|
23
|
-
'trackingNumber',
|
|
24
|
-
'unit',
|
|
25
|
-
'qty',
|
|
26
|
-
'realQty',
|
|
27
|
-
'locker',
|
|
28
|
-
'name',
|
|
29
|
-
'saleOrderLine.pickingOrderInfo',
|
|
30
|
-
];
|
|
18
|
+
import { axiosApiProvider, createStandardSearch } from '@axelor/aos-mobile-core';
|
|
31
19
|
export async function searchCustomerDeliveryLines({ page = 0, customerDeliveryId, }) {
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
criteria: [
|
|
40
|
-
{
|
|
41
|
-
fieldName: 'stockMove.id',
|
|
42
|
-
operator: '=',
|
|
43
|
-
value: customerDeliveryId,
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
],
|
|
20
|
+
return createStandardSearch({
|
|
21
|
+
model: 'com.axelor.apps.stock.db.StockMoveLine',
|
|
22
|
+
criteria: [
|
|
23
|
+
{
|
|
24
|
+
fieldName: 'stockMove.id',
|
|
25
|
+
operator: '=',
|
|
26
|
+
value: customerDeliveryId,
|
|
48
27
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
offset: 10 * page,
|
|
53
|
-
},
|
|
28
|
+
],
|
|
29
|
+
fieldKey: 'stock_customerDeliveryLine',
|
|
30
|
+
page,
|
|
54
31
|
});
|
|
55
32
|
}
|
|
56
33
|
export async function updateLine({ stockMoveLineId, version, realQty }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-delivery-line-api.js","sourceRoot":"","sources":["../../src/api/customer-delivery-line-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"customer-delivery-line-api.js","sourceRoot":"","sources":["../../src/api/customer-delivery-line-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAE/E,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,EAChD,IAAI,GAAG,CAAC,EACR,kBAAkB,GACnB;IACC,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,wCAAwC;QAC/C,QAAQ,EAAE;YACR;gBACE,SAAS,EAAE,cAAc;gBACzB,QAAQ,EAAE,GAAG;gBACb,KAAK,EAAE,kBAAkB;aAC1B;SACF;QACD,QAAQ,EAAE,4BAA4B;QACtC,IAAI;KACL,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,EAAC,eAAe,EAAE,OAAO,EAAE,OAAO,EAAC;IAClE,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,2BAA2B,eAAe,EAAE;QACjD,IAAI,EAAE;YACJ,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,OAAO;SACjB;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -15,73 +15,36 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
import { axiosApiProvider } from '@axelor/aos-mobile-core';
|
|
18
|
+
import { axiosApiProvider, createStandardSearch, getSearchCriterias, } from '@axelor/aos-mobile-core';
|
|
19
19
|
import StockLocation from '../types/stock-location';
|
|
20
20
|
import StockMove from '../types/stock-move';
|
|
21
|
-
const internalMoveFields = [
|
|
22
|
-
'name',
|
|
23
|
-
'stockMoveSeq',
|
|
24
|
-
'statusSelect',
|
|
25
|
-
'availableStatusSelect',
|
|
26
|
-
'fromStockLocation',
|
|
27
|
-
'toStockLocation',
|
|
28
|
-
'origin',
|
|
29
|
-
'createdOn',
|
|
30
|
-
'realDate',
|
|
31
|
-
'estimatedDate',
|
|
32
|
-
'stockMoveLineList',
|
|
33
|
-
'note',
|
|
34
|
-
'pickingOrderComments',
|
|
35
|
-
];
|
|
36
|
-
const sortByFields = [
|
|
37
|
-
'statusSelect',
|
|
38
|
-
'-realDate',
|
|
39
|
-
'estimatedDate',
|
|
40
|
-
'stockMoveSeq',
|
|
41
|
-
];
|
|
42
21
|
const createSearchCriteria = searchValue => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
fieldName: 'stockMoveSeq',
|
|
62
|
-
operator: 'like',
|
|
63
|
-
value: searchValue,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
return criteria;
|
|
22
|
+
return [
|
|
23
|
+
{
|
|
24
|
+
fieldName: 'fromStockLocation.typeSelect',
|
|
25
|
+
operator: '=',
|
|
26
|
+
value: StockLocation.type.internal,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
fieldName: 'toStockLocation.typeSelect',
|
|
30
|
+
operator: '=',
|
|
31
|
+
value: StockLocation.type.internal,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
fieldName: 'typeSelect',
|
|
35
|
+
operator: '=',
|
|
36
|
+
value: StockMove.type.internal,
|
|
37
|
+
},
|
|
38
|
+
getSearchCriterias('stock_internalMove', searchValue),
|
|
39
|
+
];
|
|
67
40
|
};
|
|
68
41
|
export async function searchInternalMoveFilter({ searchValue = null, page = 0 }) {
|
|
69
|
-
return
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
operator: 'and',
|
|
76
|
-
criteria: createSearchCriteria(searchValue),
|
|
77
|
-
},
|
|
78
|
-
],
|
|
79
|
-
},
|
|
80
|
-
fields: internalMoveFields,
|
|
81
|
-
sortBy: sortByFields,
|
|
82
|
-
limit: 10,
|
|
83
|
-
offset: 10 * page,
|
|
84
|
-
},
|
|
42
|
+
return createStandardSearch({
|
|
43
|
+
model: 'com.axelor.apps.stock.db.StockMove',
|
|
44
|
+
criteria: createSearchCriteria(searchValue),
|
|
45
|
+
fieldKey: 'stock_internalMove',
|
|
46
|
+
sortKey: 'stock_internalMove',
|
|
47
|
+
page,
|
|
85
48
|
});
|
|
86
49
|
}
|
|
87
50
|
export async function createInternalStockMove({ productId, companyId, originStockLocationId, destStockLocationId, unitId, trackingNumberId, movedQty, }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-move-api.js","sourceRoot":"","sources":["../../src/api/internal-move-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"internal-move-api.js","sourceRoot":"","sources":["../../src/api/internal-move-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,MAAM,oBAAoB,GAAG,WAAW,CAAC,EAAE;IACzC,OAAO;QACL;YACE,SAAS,EAAE,8BAA8B;YACzC,QAAQ,EAAE,GAA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QAC1B,GAAG,EAAE,+BAA+B,cAAc,EAAE;QACpD,IAAI,EAAE;YACJ,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE,QAAQ;YAClB,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,MAAM;SACf;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -15,39 +15,19 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
import {
|
|
19
|
-
const internalMoveLineFields = [
|
|
20
|
-
'id',
|
|
21
|
-
'product',
|
|
22
|
-
'availableStatusSelect',
|
|
23
|
-
'trackingNumber',
|
|
24
|
-
'unit',
|
|
25
|
-
'qty',
|
|
26
|
-
'realQty',
|
|
27
|
-
];
|
|
18
|
+
import { createStandardSearch } from '@axelor/aos-mobile-core';
|
|
28
19
|
export async function searchInternalMoveLines({ internalMoveId, page = 0 }) {
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
criteria: [
|
|
37
|
-
{
|
|
38
|
-
fieldName: 'stockMove.id',
|
|
39
|
-
operator: '=',
|
|
40
|
-
value: internalMoveId,
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
],
|
|
20
|
+
return createStandardSearch({
|
|
21
|
+
model: 'com.axelor.apps.stock.db.StockMoveLine',
|
|
22
|
+
criteria: [
|
|
23
|
+
{
|
|
24
|
+
fieldName: 'stockMove.id',
|
|
25
|
+
operator: '=',
|
|
26
|
+
value: internalMoveId,
|
|
45
27
|
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
offset: 10 * page,
|
|
50
|
-
},
|
|
28
|
+
],
|
|
29
|
+
fieldKey: 'stock_internalMoveLine',
|
|
30
|
+
page,
|
|
51
31
|
});
|
|
52
32
|
}
|
|
53
33
|
//# sourceMappingURL=internal-move-line-api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-move-line-api.js","sourceRoot":"","sources":["../../src/api/internal-move-line-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"internal-move-line-api.js","sourceRoot":"","sources":["../../src/api/internal-move-line-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAE7D,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,EAAC,cAAc,EAAE,IAAI,GAAG,CAAC,EAAC;IACtE,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,wCAAwC;QAC/C,QAAQ,EAAE;YACR;gBACE,SAAS,EAAE,cAAc;gBACzB,QAAQ,EAAE,GAAG;gBACb,KAAK,EAAE,cAAc;aACtB;SACF;QACD,QAAQ,EAAE,wBAAwB;QAClC,IAAI;KACL,CAAC,CAAC;AACL,CAAC"}
|
package/lib/api/inventory-api.js
CHANGED
|
@@ -15,80 +15,37 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
import { axiosApiProvider } from '@axelor/aos-mobile-core';
|
|
18
|
+
import { axiosApiProvider, createStandardFetch, createStandardSearch, getSearchCriterias, } from '@axelor/aos-mobile-core';
|
|
19
19
|
import Inventory from '../types/inventory';
|
|
20
|
-
const inventoryFields = [
|
|
21
|
-
'id',
|
|
22
|
-
'stockLocation',
|
|
23
|
-
'company',
|
|
24
|
-
'inventorySeq',
|
|
25
|
-
'inventoryTitle',
|
|
26
|
-
'createdOn',
|
|
27
|
-
'updatedOn',
|
|
28
|
-
'plannedStartDateT',
|
|
29
|
-
'plannedEndDateT',
|
|
30
|
-
'validatedOn',
|
|
31
|
-
'typeSelect',
|
|
32
|
-
'statusSelect',
|
|
33
|
-
'product',
|
|
34
|
-
'description',
|
|
35
|
-
'version',
|
|
36
|
-
'fromRack',
|
|
37
|
-
'toRack',
|
|
38
|
-
'productCategory',
|
|
39
|
-
'productFamily',
|
|
40
|
-
];
|
|
41
|
-
const sortByFields = [
|
|
42
|
-
'statusSelect',
|
|
43
|
-
'-validatedOn',
|
|
44
|
-
'plannedStartDateT',
|
|
45
|
-
'inventorySeq',
|
|
46
|
-
];
|
|
47
20
|
const createSearchCriteria = searchValue => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
operator: 'like',
|
|
62
|
-
value: searchValue,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
return criteria;
|
|
21
|
+
return [
|
|
22
|
+
{
|
|
23
|
+
fieldName: 'statusSelect',
|
|
24
|
+
operator: '!=',
|
|
25
|
+
value: Inventory.status.Draft,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
fieldName: 'statusSelect',
|
|
29
|
+
operator: '!=',
|
|
30
|
+
value: Inventory.status.Canceled,
|
|
31
|
+
},
|
|
32
|
+
getSearchCriterias('stock_inventory', searchValue),
|
|
33
|
+
];
|
|
66
34
|
};
|
|
67
35
|
export async function fetchInventory({ inventoryId }) {
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
},
|
|
36
|
+
return createStandardFetch({
|
|
37
|
+
model: 'com.axelor.apps.stock.db.Inventory',
|
|
38
|
+
id: inventoryId,
|
|
39
|
+
fieldKey: 'stock_inventory',
|
|
73
40
|
});
|
|
74
41
|
}
|
|
75
42
|
export async function searchInventoryFilter({ searchValue, page = 0 }) {
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
operator: 'and',
|
|
83
|
-
criteria: createSearchCriteria(searchValue),
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
},
|
|
87
|
-
fields: inventoryFields,
|
|
88
|
-
sortBy: sortByFields,
|
|
89
|
-
limit: 10,
|
|
90
|
-
offset: 10 * page,
|
|
91
|
-
},
|
|
43
|
+
return createStandardSearch({
|
|
44
|
+
model: 'com.axelor.apps.stock.db.Inventory',
|
|
45
|
+
criteria: createSearchCriteria(searchValue),
|
|
46
|
+
fieldKey: 'stock_inventory',
|
|
47
|
+
sortKey: 'stock_inventory',
|
|
48
|
+
page,
|
|
92
49
|
});
|
|
93
50
|
}
|
|
94
51
|
export async function modifyDescriptionInventory({ inventoryId, description, version, }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inventory-api.js","sourceRoot":"","sources":["../../src/api/inventory-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"inventory-api.js","sourceRoot":"","sources":["../../src/api/inventory-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,MAAM,oBAAoB,GAAG,WAAW,CAAC,EAAE;IACzC,OAAO;QACL;YACE,SAAS,EAAE,cAAc;YACzB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,KAAK;SAC9B;QACD;YACE,SAAS,EAAE,cAAc;YACzB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,QAAQ;SACjC;QACD,kBAAkB,CAAC,iBAAiB,EAAE,WAAW,CAAC;KACnD,CAAC;AACJ,CAAC,CAAC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
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
import { axiosApiProvider } from '@axelor/aos-mobile-core';
|
|
19
|
-
const inventoryLineFields = [
|
|
20
|
-
'id',
|
|
21
|
-
'product',
|
|
22
|
-
'currentQty',
|
|
23
|
-
'realQty',
|
|
24
|
-
'unit',
|
|
25
|
-
'rack',
|
|
26
|
-
'trackingNumber',
|
|
27
|
-
'description',
|
|
28
|
-
];
|
|
18
|
+
import { axiosApiProvider, createStandardSearch } from '@axelor/aos-mobile-core';
|
|
29
19
|
export async function searchInventoryLines({ inventoryId, page = 0 }) {
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
criteria: [
|
|
38
|
-
{
|
|
39
|
-
fieldName: 'inventory.id',
|
|
40
|
-
operator: '=',
|
|
41
|
-
value: inventoryId,
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
],
|
|
20
|
+
return createStandardSearch({
|
|
21
|
+
model: 'com.axelor.apps.stock.db.InventoryLine',
|
|
22
|
+
criteria: [
|
|
23
|
+
{
|
|
24
|
+
fieldName: 'inventory.id',
|
|
25
|
+
operator: '=',
|
|
26
|
+
value: inventoryId,
|
|
46
27
|
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
},
|
|
28
|
+
],
|
|
29
|
+
fieldKey: 'stock_inventoryLine',
|
|
30
|
+
page,
|
|
51
31
|
});
|
|
52
32
|
}
|
|
53
33
|
export async function updateInventoryLineDetails({ inventoryLineId, version, realQty, description = null, }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inventory-line-api.js","sourceRoot":"","sources":["../../src/api/inventory-line-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"inventory-line-api.js","sourceRoot":"","sources":["../../src/api/inventory-line-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAE/E,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,EAAC,WAAW,EAAE,IAAI,GAAG,CAAC,EAAC;IAChE,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,wCAAwC;QAC/C,QAAQ,EAAE;YACR;gBACE,SAAS,EAAE,cAAc;gBACzB,QAAQ,EAAE,GAAG;gBACb,KAAK,EAAE,WAAW;aACnB;SACF;QACD,QAAQ,EAAE,qBAAqB;QAC/B,IAAI;KACL,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,EAC/C,eAAe,EACf,OAAO,EACP,OAAO,EACP,WAAW,GAAG,IAAI,GACnB;IACC,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,0BAA0B,eAAe,EAAE;QAChD,IAAI,EAAE;YACJ,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,WAAW;SACzB;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,EACxC,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,gBAAgB,GAAG,IAAI,EACvB,IAAI,GAAG,IAAI,EACX,OAAO,GACR;IACC,OAAO,gBAAgB,CAAC,IAAI,CAAC;QAC3B,GAAG,EAAE,yBAAyB;QAC9B,IAAI,EAAE;YACJ,WAAW,EAAE,WAAW;YACxB,gBAAgB,EAAE,gBAAgB;YAClC,SAAS,EAAE,SAAS;YACpB,gBAAgB,EAAE,gBAAgB;YAClC,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,OAAO;SACjB;KACF,CAAC,CAAC;AACL,CAAC"}
|