@be-link/ecommerce-plan-allocation-service-node-sdk 0.0.39 → 0.0.41
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/enum.d.ts +102 -2
- package/enum.js +110 -0
- package/index.d.ts +12 -0
- package/index.js +17 -5
- package/modules/allocationOrder/types.d.ts +4 -1
- package/modules/logistics/types.d.ts +9 -7
- package/modules/pickingRule/types.d.ts +2 -2
- package/modules/preAllocationOrder/service.d.ts +9 -1
- package/modules/preAllocationOrder/service.js +24 -4
- package/modules/preAllocationOrder/types.d.ts +49 -7
- package/modules/productStatistics/service.d.ts +8 -0
- package/modules/productStatistics/service.js +37 -0
- package/modules/productStatistics/types.d.ts +39 -0
- package/modules/productStatistics/types.js +2 -0
- package/modules/storeProductFulfill/service.d.ts +9 -0
- package/modules/storeProductFulfill/service.js +44 -0
- package/modules/storeProductFulfill/types.d.ts +92 -0
- package/modules/storeProductFulfill/types.js +2 -0
- package/modules/storeReplenishOrder/service.d.ts +43 -0
- package/modules/storeReplenishOrder/service.js +120 -0
- package/modules/storeReplenishOrder/types.d.ts +200 -0
- package/modules/storeReplenishOrder/types.js +2 -0
- package/modules/storeStockIn/types.d.ts +4 -0
- package/modules/warehouseInventory/service.d.ts +14 -0
- package/modules/warehouseInventory/service.js +78 -0
- package/modules/warehouseInventory/types.d.ts +225 -0
- package/modules/warehouseInventory/types.js +2 -0
- package/modules/warehouseLocation/service.d.ts +9 -0
- package/modules/warehouseLocation/service.js +44 -0
- package/modules/warehouseLocation/types.d.ts +64 -0
- package/modules/warehouseLocation/types.js +2 -0
- package/modules/warehouseStockIn/service.d.ts +14 -0
- package/modules/warehouseStockIn/service.js +79 -0
- package/modules/warehouseStockIn/types.d.ts +236 -0
- package/modules/warehouseStockIn/types.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,78 @@
|
|
|
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.warehouseInventoryService = void 0;
|
|
16
|
+
const tsoa_1 = require("tsoa");
|
|
17
|
+
const http_1 = require("../../utils/http");
|
|
18
|
+
const BaseService_1 = __importDefault(require("../BaseService"));
|
|
19
|
+
let WarehouseInventoryService = class WarehouseInventoryService extends BaseService_1.default {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.prefixUrl = '/warehouse-inventory';
|
|
23
|
+
}
|
|
24
|
+
inventoryList(request) {
|
|
25
|
+
return (0, http_1.callApi)(this.getApiUrl(this.inventoryList), request);
|
|
26
|
+
}
|
|
27
|
+
inventoryRecordList(request) {
|
|
28
|
+
return (0, http_1.callApi)(this.getApiUrl(this.inventoryRecordList), request);
|
|
29
|
+
}
|
|
30
|
+
importInventory(request) {
|
|
31
|
+
return (0, http_1.callApi)(this.getApiUrl(this.importInventory), request);
|
|
32
|
+
}
|
|
33
|
+
exportInventory(request) {
|
|
34
|
+
return (0, http_1.callApi)(this.getApiUrl(this.exportInventory), request);
|
|
35
|
+
}
|
|
36
|
+
batchStockOperation(request) {
|
|
37
|
+
return (0, http_1.callApi)(this.getApiUrl(this.batchStockOperation), request);
|
|
38
|
+
}
|
|
39
|
+
setDeductionSwitch(request) {
|
|
40
|
+
return (0, http_1.callApi)(this.getApiUrl(this.setDeductionSwitch), request);
|
|
41
|
+
}
|
|
42
|
+
getDeductionSwitch(request) {
|
|
43
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getDeductionSwitch), request);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, tsoa_1.Post)('inventory-list'),
|
|
48
|
+
__param(0, (0, tsoa_1.Body)())
|
|
49
|
+
], WarehouseInventoryService.prototype, "inventoryList", null);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, tsoa_1.Post)('inventory-record-list'),
|
|
52
|
+
__param(0, (0, tsoa_1.Body)())
|
|
53
|
+
], WarehouseInventoryService.prototype, "inventoryRecordList", null);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, tsoa_1.Post)('import-inventory'),
|
|
56
|
+
__param(0, (0, tsoa_1.Body)())
|
|
57
|
+
], WarehouseInventoryService.prototype, "importInventory", null);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, tsoa_1.Post)('export-inventory'),
|
|
60
|
+
__param(0, (0, tsoa_1.Body)())
|
|
61
|
+
], WarehouseInventoryService.prototype, "exportInventory", null);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, tsoa_1.Post)('batch-stock-operation'),
|
|
64
|
+
__param(0, (0, tsoa_1.Body)())
|
|
65
|
+
], WarehouseInventoryService.prototype, "batchStockOperation", null);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, tsoa_1.Post)('set-deduction-switch'),
|
|
68
|
+
__param(0, (0, tsoa_1.Body)())
|
|
69
|
+
], WarehouseInventoryService.prototype, "setDeductionSwitch", null);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, tsoa_1.Post)('get-deduction-switch')
|
|
72
|
+
], WarehouseInventoryService.prototype, "getDeductionSwitch", null);
|
|
73
|
+
WarehouseInventoryService = __decorate([
|
|
74
|
+
(0, tsoa_1.Route)('WarehouseInventory'),
|
|
75
|
+
(0, tsoa_1.Tags)('warehouseInventory')
|
|
76
|
+
], WarehouseInventoryService);
|
|
77
|
+
exports.warehouseInventoryService = new WarehouseInventoryService();
|
|
78
|
+
exports.default = exports.warehouseInventoryService;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { ENUM } from '../../enum';
|
|
2
|
+
export declare namespace WarehouseInventoryTypes {
|
|
3
|
+
/** 库位信息 */
|
|
4
|
+
interface LocationInfo {
|
|
5
|
+
/** 库位编码 */
|
|
6
|
+
code: string;
|
|
7
|
+
}
|
|
8
|
+
/** 请求定义 */
|
|
9
|
+
namespace Request {
|
|
10
|
+
/** 仓库库存列表请求 */
|
|
11
|
+
interface GetInventoryList {
|
|
12
|
+
/** 仓库ID列表 */
|
|
13
|
+
warehouseIds?: string[];
|
|
14
|
+
/** 商品ID列表 */
|
|
15
|
+
productIds?: string[];
|
|
16
|
+
/** SKU ID列表 */
|
|
17
|
+
skuIds?: string[];
|
|
18
|
+
/** SKU编码列表 */
|
|
19
|
+
skuCodes?: string[];
|
|
20
|
+
/** 页码(必填) */
|
|
21
|
+
pageIndex: number;
|
|
22
|
+
/** 每页数量(必填) */
|
|
23
|
+
pageSize: number;
|
|
24
|
+
}
|
|
25
|
+
/** 库存流水列表请求 */
|
|
26
|
+
interface GetInventoryRecordList {
|
|
27
|
+
/** 仓库ID列表 */
|
|
28
|
+
warehouseId: string;
|
|
29
|
+
/** SKU ID */
|
|
30
|
+
skuId: string;
|
|
31
|
+
/** 操作类型 */
|
|
32
|
+
operationType?: ENUM.INVENTORY_ENUM.InventoryOperationType;
|
|
33
|
+
/** 创建时间范围起始(时间戳ms) */
|
|
34
|
+
createdAtStart?: number;
|
|
35
|
+
/** 创建时间范围结束(时间戳ms) */
|
|
36
|
+
createdAtEnd?: number;
|
|
37
|
+
/** 页码(必填) */
|
|
38
|
+
pageIndex: number;
|
|
39
|
+
/** 每页数量(必填) */
|
|
40
|
+
pageSize: number;
|
|
41
|
+
}
|
|
42
|
+
/** 导入库存 Excel 请求 */
|
|
43
|
+
interface ImportInventory {
|
|
44
|
+
/** Excel文件地址 */
|
|
45
|
+
fileUrl: string;
|
|
46
|
+
/** 仓库ID */
|
|
47
|
+
warehouseId: string;
|
|
48
|
+
/** 操作人 */
|
|
49
|
+
operator: string;
|
|
50
|
+
}
|
|
51
|
+
/** 导出库存 Excel 请求 */
|
|
52
|
+
interface ExportInventory {
|
|
53
|
+
/** 库存记录ID列表 */
|
|
54
|
+
ids?: string[];
|
|
55
|
+
/** 仓库ID列表 */
|
|
56
|
+
warehouseIds?: string[];
|
|
57
|
+
/** 商品ID列表 */
|
|
58
|
+
productIds?: string[];
|
|
59
|
+
/** SKU ID列表 */
|
|
60
|
+
skuIds?: string[];
|
|
61
|
+
/** SKU编码列表 */
|
|
62
|
+
skuCodes?: string[];
|
|
63
|
+
/** 页码(必填) */
|
|
64
|
+
pageIndex: number;
|
|
65
|
+
/** 每页数量(必填) */
|
|
66
|
+
pageSize: number;
|
|
67
|
+
}
|
|
68
|
+
/** 手动批量出入库请求 */
|
|
69
|
+
interface BatchStockOperation {
|
|
70
|
+
/** 仓库ID */
|
|
71
|
+
warehouseId: string;
|
|
72
|
+
/** 出入库类型:IN-入库, OUT-出库 */
|
|
73
|
+
type: 'IN' | 'OUT';
|
|
74
|
+
/** 商品列表 */
|
|
75
|
+
items: {
|
|
76
|
+
/** SKU ID */
|
|
77
|
+
skuId: string;
|
|
78
|
+
/** 数量 */
|
|
79
|
+
quantity: number;
|
|
80
|
+
}[];
|
|
81
|
+
/** 操作人姓名 */
|
|
82
|
+
operator: string;
|
|
83
|
+
/** 备注 */
|
|
84
|
+
remark?: string;
|
|
85
|
+
}
|
|
86
|
+
/** 控制扣减库存开关请求 */
|
|
87
|
+
interface SetDeductionSwitch {
|
|
88
|
+
/** 仓库ID */
|
|
89
|
+
warehouseId: string;
|
|
90
|
+
/** 是否启用扣减库存:1-启用, 0-禁用 */
|
|
91
|
+
enabled: 0 | 1;
|
|
92
|
+
/** 操作人 */
|
|
93
|
+
operator: string;
|
|
94
|
+
}
|
|
95
|
+
/** 获取扣减库存开关状态请求 */
|
|
96
|
+
interface GetDeductionSwitch {
|
|
97
|
+
/** 仓库ID */
|
|
98
|
+
warehouseId: string;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/** 响应定义 */
|
|
102
|
+
namespace Response {
|
|
103
|
+
/** 仓库库存列表项 */
|
|
104
|
+
interface InventoryListItem {
|
|
105
|
+
/** 库存id */
|
|
106
|
+
id: string;
|
|
107
|
+
/** 商品id */
|
|
108
|
+
productId?: string;
|
|
109
|
+
/** SKU id */
|
|
110
|
+
skuId?: string;
|
|
111
|
+
/** 商品名称 */
|
|
112
|
+
productName: string;
|
|
113
|
+
/** 商品图片 */
|
|
114
|
+
productImage: string;
|
|
115
|
+
/** 商品图片列表 */
|
|
116
|
+
imgList: string[];
|
|
117
|
+
/** SKU编码 */
|
|
118
|
+
skuCode: string;
|
|
119
|
+
/** 门店/仓库名称 */
|
|
120
|
+
warehouseName: string;
|
|
121
|
+
/** 规格详情(使用/分隔的规格值) */
|
|
122
|
+
specName: string;
|
|
123
|
+
/** 库存数量 */
|
|
124
|
+
availableStock: number;
|
|
125
|
+
/** 单价(元) */
|
|
126
|
+
price: number;
|
|
127
|
+
/** 最后更新时间 */
|
|
128
|
+
lastUpdateTime: number;
|
|
129
|
+
/** 仓库id */
|
|
130
|
+
warehouseId: string;
|
|
131
|
+
/** 库位信息数组 */
|
|
132
|
+
locationInfo?: LocationInfo[];
|
|
133
|
+
}
|
|
134
|
+
/** 仓库库存列表响应 */
|
|
135
|
+
interface GetInventoryList {
|
|
136
|
+
total: number;
|
|
137
|
+
list: InventoryListItem[];
|
|
138
|
+
}
|
|
139
|
+
/** 库存流水列表项 */
|
|
140
|
+
interface InventoryRecordListItem {
|
|
141
|
+
/** 流水ID */
|
|
142
|
+
id: string;
|
|
143
|
+
/** 操作类型:INBOUND-入库, OUTBOUND-出库 */
|
|
144
|
+
operationType: ENUM.INVENTORY_ENUM.InventoryOperationType;
|
|
145
|
+
/** 业务类型 */
|
|
146
|
+
bizType: ENUM.INVENTORY_ENUM.InventoryBizType;
|
|
147
|
+
/** 业务ID */
|
|
148
|
+
bizId: string;
|
|
149
|
+
/** SKU编码 */
|
|
150
|
+
skuCode: string;
|
|
151
|
+
/** 商品名称 */
|
|
152
|
+
productName: string;
|
|
153
|
+
/** 商品id */
|
|
154
|
+
productId: string;
|
|
155
|
+
/** skuid */
|
|
156
|
+
skuId: string;
|
|
157
|
+
/** 仓库ID */
|
|
158
|
+
warehouseId: string;
|
|
159
|
+
/** 仓库名称 */
|
|
160
|
+
warehouseName: string;
|
|
161
|
+
/** 数量(正数为入库,负数为出库) */
|
|
162
|
+
quantity: number;
|
|
163
|
+
/** 操作人 */
|
|
164
|
+
operator: string;
|
|
165
|
+
/** 备注 */
|
|
166
|
+
remark: string;
|
|
167
|
+
/** 操作时间 */
|
|
168
|
+
createdAt: number;
|
|
169
|
+
}
|
|
170
|
+
/** 库存流水列表响应 */
|
|
171
|
+
interface GetInventoryRecordList {
|
|
172
|
+
total: number;
|
|
173
|
+
list: InventoryRecordListItem[];
|
|
174
|
+
}
|
|
175
|
+
/** 导入库存 Excel 响应 */
|
|
176
|
+
interface ImportInventory {
|
|
177
|
+
errorList: Array<{
|
|
178
|
+
row: number;
|
|
179
|
+
errors: string[];
|
|
180
|
+
}>;
|
|
181
|
+
}
|
|
182
|
+
/** 导出库存 Excel 行数据 */
|
|
183
|
+
interface ExportInventoryItem {
|
|
184
|
+
productId: string;
|
|
185
|
+
skuId: string;
|
|
186
|
+
商品名称: string;
|
|
187
|
+
规格明细: string;
|
|
188
|
+
规格编码: string;
|
|
189
|
+
仓库: string;
|
|
190
|
+
库存: number;
|
|
191
|
+
单价: number;
|
|
192
|
+
数据更新时间: string;
|
|
193
|
+
库位信息: string;
|
|
194
|
+
}
|
|
195
|
+
/** 导出库存 Excel 响应 */
|
|
196
|
+
interface ExportInventory {
|
|
197
|
+
data: ExportInventoryItem[];
|
|
198
|
+
headerMap: string[];
|
|
199
|
+
}
|
|
200
|
+
/** 扣减库存开关状态响应 */
|
|
201
|
+
interface GetDeductionSwitch {
|
|
202
|
+
/** 仓库ID */
|
|
203
|
+
warehouseId: string;
|
|
204
|
+
/** 是否启用扣减库存:1-启用, 0-禁用 */
|
|
205
|
+
enabled: 0 | 1;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
/** WarehouseInventory Controller 接口定义 */
|
|
209
|
+
interface WarehouseInventoryController {
|
|
210
|
+
/** 仓库库存列表 */
|
|
211
|
+
inventoryList(request: Request.GetInventoryList): Promise<Response.GetInventoryList>;
|
|
212
|
+
/** 查看库存流水记录列表 */
|
|
213
|
+
inventoryRecordList(request: Request.GetInventoryRecordList): Promise<Response.GetInventoryRecordList>;
|
|
214
|
+
/** 导入库存 Excel */
|
|
215
|
+
importInventory(request: Request.ImportInventory): Promise<Response.ImportInventory>;
|
|
216
|
+
/** 导出库存 Excel */
|
|
217
|
+
exportInventory(request: Request.ExportInventory): Promise<Response.ExportInventory>;
|
|
218
|
+
/** 手动批量出入库 */
|
|
219
|
+
batchStockOperation(request: Request.BatchStockOperation): Promise<void>;
|
|
220
|
+
/** 设置扣减库存开关 */
|
|
221
|
+
setDeductionSwitch(request: Request.SetDeductionSwitch): Promise<void>;
|
|
222
|
+
/** 获取扣减库存开关状态 */
|
|
223
|
+
getDeductionSwitch(request: Request.GetDeductionSwitch): Promise<Response.GetDeductionSwitch>;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { WarehouseLocationTypes } from './types';
|
|
2
|
+
import BaseService from '../BaseService';
|
|
3
|
+
declare class WarehouseLocationService extends BaseService implements WarehouseLocationTypes.WarehouseLocationController {
|
|
4
|
+
protected prefixUrl: string;
|
|
5
|
+
importLocations(request: WarehouseLocationTypes.Request.ImportLocations): Promise<WarehouseLocationTypes.Response.ImportLocations>;
|
|
6
|
+
setLocation(request: WarehouseLocationTypes.Request.SetLocation): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare const warehouseLocationService: WarehouseLocationService;
|
|
9
|
+
export default warehouseLocationService;
|
|
@@ -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,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;
|