@be-link/ecommerce-plan-allocation-service-node-sdk 0.0.40 → 0.0.42

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.
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
9
+ return function (target, key) { decorator(target, key, paramIndex); }
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.warehouseLocationService = void 0;
16
+ const tsoa_1 = require("tsoa");
17
+ const http_1 = require("../../utils/http");
18
+ const BaseService_1 = __importDefault(require("../BaseService"));
19
+ let WarehouseLocationService = class WarehouseLocationService extends BaseService_1.default {
20
+ constructor() {
21
+ super(...arguments);
22
+ this.prefixUrl = '/warehouse-location';
23
+ }
24
+ importLocations(request) {
25
+ return (0, http_1.callApi)(this.getApiUrl(this.importLocations), request);
26
+ }
27
+ setLocation(request) {
28
+ return (0, http_1.callApi)(this.getApiUrl(this.setLocation), request);
29
+ }
30
+ };
31
+ __decorate([
32
+ (0, tsoa_1.Post)('import-locations'),
33
+ __param(0, (0, tsoa_1.Body)())
34
+ ], WarehouseLocationService.prototype, "importLocations", null);
35
+ __decorate([
36
+ (0, tsoa_1.Post)('set-location'),
37
+ __param(0, (0, tsoa_1.Body)())
38
+ ], WarehouseLocationService.prototype, "setLocation", null);
39
+ WarehouseLocationService = __decorate([
40
+ (0, tsoa_1.Route)('WarehouseLocation'),
41
+ (0, tsoa_1.Tags)('warehouseLocation')
42
+ ], WarehouseLocationService);
43
+ exports.warehouseLocationService = new WarehouseLocationService();
44
+ exports.default = exports.warehouseLocationService;
@@ -0,0 +1,64 @@
1
+ export declare namespace WarehouseLocationTypes {
2
+ /** 库位信息 */
3
+ interface LocationInfo {
4
+ /** 库位编码 */
5
+ code: string;
6
+ }
7
+ /** 实体定义 */
8
+ namespace Entity {
9
+ /** 仓库库位SKU关联 */
10
+ interface WarehouseLocationRelation {
11
+ id: string;
12
+ createdAt: number;
13
+ updatedAt: number;
14
+ deletedAt: number;
15
+ warehouseId: string;
16
+ locationInfo: string[];
17
+ productId: string;
18
+ skuId: string;
19
+ skuCode: string;
20
+ status: number;
21
+ remark: string;
22
+ creator: string;
23
+ updater: string;
24
+ }
25
+ }
26
+ /** 请求定义 */
27
+ namespace Request {
28
+ /** 导入库位Excel请求 */
29
+ interface ImportLocations {
30
+ /** Excel文件地址(URL或路径) */
31
+ fileUrl: string;
32
+ /** 操作人 */
33
+ operator: string;
34
+ }
35
+ /** 设置库位请求 */
36
+ interface SetLocation {
37
+ /** 仓库ID */
38
+ warehouseId: string;
39
+ /** SKU ID */
40
+ skuId: string;
41
+ /** 库位信息JSON字符串数组 */
42
+ locationInfo: string[];
43
+ /** 操作人 */
44
+ operator: string;
45
+ }
46
+ }
47
+ /** 响应定义 */
48
+ namespace Response {
49
+ /** 导入库位响应 */
50
+ interface ImportLocations {
51
+ errorList: Array<{
52
+ row: number;
53
+ errors: string[];
54
+ }>;
55
+ }
56
+ }
57
+ /** WarehouseLocation Controller 接口定义 */
58
+ interface WarehouseLocationController {
59
+ /** 导入库位Excel */
60
+ importLocations(request: Request.ImportLocations): Promise<Response.ImportLocations>;
61
+ /** 设置库位 */
62
+ setLocation(request: Request.SetLocation): Promise<void>;
63
+ }
64
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import { WarehouseStockInTypes } from './types';
2
+ import BaseService from '../BaseService';
3
+ declare class WarehouseStockInService extends BaseService implements WarehouseStockInTypes.WarehouseStockInController {
4
+ protected prefixUrl: string;
5
+ stockIn(request: WarehouseStockInTypes.Request.StockIn): Promise<void>;
6
+ list(request: WarehouseStockInTypes.Request.GetList): Promise<WarehouseStockInTypes.Response.GetList>;
7
+ detail(request: WarehouseStockInTypes.Request.GetDetail): Promise<WarehouseStockInTypes.Response.GetDetail>;
8
+ delete(request: WarehouseStockInTypes.Request.Delete): Promise<void>;
9
+ exportExcel(request: WarehouseStockInTypes.Request.ExportExcel): Promise<WarehouseStockInTypes.Response.ExportExcel>;
10
+ saveDraft(request: WarehouseStockInTypes.Request.SaveDraft): Promise<void>;
11
+ updateDetailRemark(request: WarehouseStockInTypes.Request.UpdateDetailRemark): Promise<void>;
12
+ }
13
+ export declare const warehouseStockInService: WarehouseStockInService;
14
+ export default warehouseStockInService;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
9
+ return function (target, key) { decorator(target, key, paramIndex); }
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.warehouseStockInService = void 0;
16
+ const tsoa_1 = require("tsoa");
17
+ const http_1 = require("../../utils/http");
18
+ const BaseService_1 = __importDefault(require("../BaseService"));
19
+ let WarehouseStockInService = class WarehouseStockInService extends BaseService_1.default {
20
+ constructor() {
21
+ super(...arguments);
22
+ this.prefixUrl = '/warehouse-stock-in';
23
+ }
24
+ stockIn(request) {
25
+ return (0, http_1.callApi)(this.getApiUrl(this.stockIn), request);
26
+ }
27
+ list(request) {
28
+ return (0, http_1.callApi)(this.getApiUrl(this.list), request);
29
+ }
30
+ detail(request) {
31
+ return (0, http_1.callApi)(this.getApiUrl(this.detail), request);
32
+ }
33
+ delete(request) {
34
+ return (0, http_1.callApi)(this.getApiUrl(this.delete), request);
35
+ }
36
+ exportExcel(request) {
37
+ return (0, http_1.callApi)(this.getApiUrl(this.exportExcel), request);
38
+ }
39
+ saveDraft(request) {
40
+ return (0, http_1.callApi)(this.getApiUrl(this.saveDraft), request);
41
+ }
42
+ updateDetailRemark(request) {
43
+ return (0, http_1.callApi)(this.getApiUrl(this.updateDetailRemark), request);
44
+ }
45
+ };
46
+ __decorate([
47
+ (0, tsoa_1.Post)('stock-in'),
48
+ __param(0, (0, tsoa_1.Body)())
49
+ ], WarehouseStockInService.prototype, "stockIn", null);
50
+ __decorate([
51
+ (0, tsoa_1.Post)('list'),
52
+ __param(0, (0, tsoa_1.Body)())
53
+ ], WarehouseStockInService.prototype, "list", null);
54
+ __decorate([
55
+ (0, tsoa_1.Post)('detail'),
56
+ __param(0, (0, tsoa_1.Body)())
57
+ ], WarehouseStockInService.prototype, "detail", null);
58
+ __decorate([
59
+ (0, tsoa_1.Post)('delete'),
60
+ __param(0, (0, tsoa_1.Body)())
61
+ ], WarehouseStockInService.prototype, "delete", null);
62
+ __decorate([
63
+ (0, tsoa_1.Post)('export-excel'),
64
+ __param(0, (0, tsoa_1.Body)())
65
+ ], WarehouseStockInService.prototype, "exportExcel", null);
66
+ __decorate([
67
+ (0, tsoa_1.Post)('save-draft'),
68
+ __param(0, (0, tsoa_1.Body)())
69
+ ], WarehouseStockInService.prototype, "saveDraft", null);
70
+ __decorate([
71
+ (0, tsoa_1.Post)('update-detail-remark'),
72
+ __param(0, (0, tsoa_1.Body)())
73
+ ], WarehouseStockInService.prototype, "updateDetailRemark", null);
74
+ WarehouseStockInService = __decorate([
75
+ (0, tsoa_1.Route)('WarehouseStockIn'),
76
+ (0, tsoa_1.Tags)('warehouseStockIn')
77
+ ], WarehouseStockInService);
78
+ exports.warehouseStockInService = new WarehouseStockInService();
79
+ exports.default = exports.warehouseStockInService;
@@ -0,0 +1,236 @@
1
+ import { ENUM } from '../../enum';
2
+ export declare namespace WarehouseStockInTypes {
3
+ /** 实体定义 */
4
+ namespace Entity {
5
+ /** 仓库入库单 */
6
+ interface WarehouseStockInOrder {
7
+ id: string;
8
+ createdAt: number;
9
+ updatedAt: number;
10
+ deletedAt: number;
11
+ supplyId: string;
12
+ warehouseId: string;
13
+ creator: string;
14
+ updater: string;
15
+ status: ENUM.WAREHOUSE_STOCK_IN_ORDER_ENUM.STATUS;
16
+ receivedAt: number;
17
+ receivableQuantity: number;
18
+ receivedQuantity: number;
19
+ remark: string;
20
+ purchaseOrderId: string;
21
+ }
22
+ /** 仓库入库单明细 */
23
+ interface WarehouseStockInOrderDetail {
24
+ id: string;
25
+ createdAt: number;
26
+ updatedAt: number;
27
+ deletedAt: number;
28
+ warehouseId: string;
29
+ stockInOrderId: string;
30
+ productId: string;
31
+ skuId: string;
32
+ skuCode: string;
33
+ purchaseQuantity: number;
34
+ remainingQuantity: number;
35
+ actualReceivedQuantity: number;
36
+ receivedQuantity: number;
37
+ inspectionQuantity: number;
38
+ qualifiedQuantity: number;
39
+ storageRemark: string;
40
+ receiveRemark: string;
41
+ expectedAt: number;
42
+ }
43
+ /** 仓库入库单明细(含商品信息) */
44
+ interface WarehouseStockInOrderDetailWithProduct extends WarehouseStockInOrderDetail {
45
+ productName: string;
46
+ productImage: string;
47
+ imgList: string[];
48
+ specName: string;
49
+ storageMethod: string;
50
+ classification: string;
51
+ locationInfo?: string[];
52
+ }
53
+ /** 仓库入库单(含扩展信息) */
54
+ interface WarehouseStockInOrderWithExtension extends WarehouseStockInOrder {
55
+ supplyName?: string;
56
+ warehouseName?: string;
57
+ }
58
+ /** 收货商品项 */
59
+ interface WarehouseStockInItem {
60
+ detailId: string;
61
+ actualReceivedQuantity: number;
62
+ inspectionQuantity?: number;
63
+ qualifiedQuantity?: number;
64
+ storageRemark?: string;
65
+ receiveRemark?: string;
66
+ }
67
+ }
68
+ /** 请求定义 */
69
+ namespace Request {
70
+ /** 仓库收货请求 */
71
+ interface StockIn {
72
+ stockInOrderId: string;
73
+ items: Entity.WarehouseStockInItem[];
74
+ operator: string;
75
+ }
76
+ /** 查询入库单列表请求 */
77
+ interface GetList {
78
+ pageIndex: number;
79
+ pageSize: number;
80
+ ids?: string[];
81
+ supplyIds?: string[];
82
+ creator?: string;
83
+ createdTimeStart?: number;
84
+ createdTimeEnd?: number;
85
+ receivedTimeStart?: number;
86
+ receivedTimeEnd?: number;
87
+ expectedTimeStart?: number;
88
+ expectedTimeEnd?: number;
89
+ productIds?: string[];
90
+ skuCode?: string;
91
+ skuIds?: string[];
92
+ warehouseIds?: string[];
93
+ status?: string;
94
+ }
95
+ /** 查询入库单详情请求 */
96
+ interface GetDetail {
97
+ stockInOrderId: string;
98
+ pageIndex: number;
99
+ pageSize: number;
100
+ productIds?: string[];
101
+ skuIds?: string[];
102
+ skuCode?: string;
103
+ expectedTimeStart?: number;
104
+ expectedTimeEnd?: number;
105
+ minRemainingQuantity?: number;
106
+ maxRemainingQuantity?: number;
107
+ }
108
+ /** 删除入库单请求 */
109
+ interface Delete {
110
+ id: string;
111
+ operator?: string;
112
+ }
113
+ /** 保存入库单明细草稿请求 */
114
+ interface SaveDraft {
115
+ details: {
116
+ detailId: string;
117
+ actualReceivedQuantity?: number;
118
+ inspectionQuantity?: number;
119
+ qualifiedQuantity?: number;
120
+ storageRemark?: string;
121
+ receiveRemark?: string;
122
+ }[];
123
+ operator: string;
124
+ }
125
+ /** 更新入库单详情备注请求 */
126
+ interface UpdateDetailRemark {
127
+ detailId: string;
128
+ storageRemark?: string;
129
+ receiveRemark?: string;
130
+ }
131
+ /** 导出入库单Excel请求 */
132
+ interface ExportExcel {
133
+ pageIndex: number;
134
+ pageSize: number;
135
+ ids?: string[];
136
+ supplyIds?: string[];
137
+ creator?: string;
138
+ createdTimeStart?: number;
139
+ createdTimeEnd?: number;
140
+ receivedTimeStart?: number;
141
+ receivedTimeEnd?: number;
142
+ expectedTimeStart?: number;
143
+ expectedTimeEnd?: number;
144
+ productIds?: string[];
145
+ skuCode?: string;
146
+ skuIds?: string[];
147
+ warehouseIds?: string[];
148
+ status?: string;
149
+ }
150
+ }
151
+ /** 响应定义 */
152
+ namespace Response {
153
+ /** 入库单列表项 */
154
+ interface ListItem {
155
+ id: string;
156
+ createdAt: number;
157
+ supplyId?: string;
158
+ supplyName?: string;
159
+ warehouseId?: string;
160
+ warehouseName?: string;
161
+ creator?: string;
162
+ updater?: string;
163
+ status?: string;
164
+ receivedAt?: number;
165
+ receivableQuantity?: number;
166
+ receivedQuantity: number;
167
+ remark: string;
168
+ }
169
+ /** 查询入库单列表响应 */
170
+ interface GetList {
171
+ total: number;
172
+ list: ListItem[];
173
+ totalCount: number;
174
+ pendingCount: number;
175
+ partialCount: number;
176
+ receivedCount: number;
177
+ }
178
+ /** 查询入库单详情响应 */
179
+ interface GetDetail {
180
+ total: number;
181
+ order: Entity.WarehouseStockInOrderWithExtension;
182
+ details: Entity.WarehouseStockInOrderDetailWithProduct[];
183
+ }
184
+ /** 导出Excel项目接口 */
185
+ interface ExportExcelItem {
186
+ 单号?: string;
187
+ 供应商?: string;
188
+ 仓库?: string;
189
+ 商品应收?: number;
190
+ 商品实收?: number;
191
+ 创建人?: string;
192
+ 创建时间: string;
193
+ 收货时间?: string;
194
+ 状态?: string;
195
+ productId?: string;
196
+ skuId?: string;
197
+ 商品名称?: string;
198
+ 规格名称?: string;
199
+ 规格编码?: string;
200
+ 库位?: string;
201
+ 储藏方式?: string;
202
+ 商品分类?: string;
203
+ 采购数量?: number;
204
+ 已收数量?: number;
205
+ 剩余待收数量?: number;
206
+ 实收数量?: number;
207
+ 抽检数量?: number;
208
+ 合格数量?: number;
209
+ 发货备注?: string;
210
+ 收货备注?: string;
211
+ 预计到仓时间?: string;
212
+ }
213
+ /** 导出Excel响应接口 */
214
+ interface ExportExcel {
215
+ data: ExportExcelItem[];
216
+ headerMap: string[];
217
+ }
218
+ }
219
+ /** WarehouseStockIn Controller 接口定义 */
220
+ interface WarehouseStockInController {
221
+ /** 仓库收货 */
222
+ stockIn(request: Request.StockIn): Promise<void>;
223
+ /** 查询入库单列表 */
224
+ list(request: Request.GetList): Promise<Response.GetList>;
225
+ /** 查询入库单详情 */
226
+ detail(request: Request.GetDetail): Promise<Response.GetDetail>;
227
+ /** 删除入库单 */
228
+ delete(request: Request.Delete): Promise<void>;
229
+ /** 导出入库单Excel */
230
+ exportExcel(request: Request.ExportExcel): Promise<Response.ExportExcel>;
231
+ /** 更新入库单详情备注 */
232
+ updateDetailRemark(request: Request.UpdateDetailRemark): Promise<void>;
233
+ /** 保存入库单明细草稿 */
234
+ saveDraft(request: Request.SaveDraft): Promise<void>;
235
+ }
236
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-plan-allocation-service-node-sdk",
3
- "version": "0.0.40",
3
+ "version": "0.0.42",
4
4
  "description": "EcommercePlanAllocationService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",