@be-link/ecommerce-plan-allocation-service-node-sdk 0.0.40 → 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 +25 -0
- package/enum.js +28 -0
- package/index.d.ts +6 -0
- package/index.js +7 -1
- package/modules/preAllocationOrder/types.d.ts +3 -0
- package/modules/storeProductFulfill/types.d.ts +1 -0
- package/modules/storeReplenishOrder/types.d.ts +3 -0
- package/modules/storeStockIn/types.d.ts +1 -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
package/enum.d.ts
CHANGED
|
@@ -256,6 +256,31 @@ export declare namespace ENUM {
|
|
|
256
256
|
readonly CANNOT_REPEAL_SUBMITTED: "存在已提交的预配货单,无法撤回";
|
|
257
257
|
};
|
|
258
258
|
}
|
|
259
|
+
namespace WAREHOUSE_STOCK_IN_ORDER_ENUM {
|
|
260
|
+
enum STATUS {
|
|
261
|
+
PENDING = "PENDING",
|
|
262
|
+
PARTIAL = "PARTIAL",
|
|
263
|
+
RECEIVED = "RECEIVED"
|
|
264
|
+
}
|
|
265
|
+
enum STATUS_CHINESE {
|
|
266
|
+
PENDING = "\u5F85\u6536\u8D27",
|
|
267
|
+
PARTIAL = "\u90E8\u5206\u6536\u8D27",
|
|
268
|
+
RECEIVED = "\u5DF2\u6536\u8D27"
|
|
269
|
+
}
|
|
270
|
+
const STATUS_MAP: {
|
|
271
|
+
readonly PENDING: STATUS_CHINESE.PENDING;
|
|
272
|
+
readonly PARTIAL: STATUS_CHINESE.PARTIAL;
|
|
273
|
+
readonly RECEIVED: STATUS_CHINESE.RECEIVED;
|
|
274
|
+
};
|
|
275
|
+
const ERROR_MESSAGES: {
|
|
276
|
+
readonly ORDER_NOT_FOUND: "入库单不存在";
|
|
277
|
+
readonly ORDER_COMPLETED: "入库单已完成,不可删除";
|
|
278
|
+
readonly ONLY_PENDING_CAN_DELETE: "只有待收货状态的入库单才可删除";
|
|
279
|
+
readonly ALREADY_RECEIVED: "入库单已全部收货,不可再次入库";
|
|
280
|
+
readonly EMPTY_QUANTITY: "收货数量不能全为0";
|
|
281
|
+
readonly DETAIL_NOT_FOUND: "入库单明细不存在";
|
|
282
|
+
};
|
|
283
|
+
}
|
|
259
284
|
namespace INVENTORY_ENUM {
|
|
260
285
|
const enum OUTBOUND_TYPE_ENUM {
|
|
261
286
|
ITEM_OUTBOUND = "ITEM_OUTBOUND",
|
package/enum.js
CHANGED
|
@@ -289,4 +289,32 @@ var ENUM;
|
|
|
289
289
|
CANNOT_REPEAL_SUBMITTED: '存在已提交的预配货单,无法撤回',
|
|
290
290
|
};
|
|
291
291
|
})(PRE_ALLOCATION_ORDER_ENUM = ENUM.PRE_ALLOCATION_ORDER_ENUM || (ENUM.PRE_ALLOCATION_ORDER_ENUM = {}));
|
|
292
|
+
let WAREHOUSE_STOCK_IN_ORDER_ENUM;
|
|
293
|
+
(function (WAREHOUSE_STOCK_IN_ORDER_ENUM) {
|
|
294
|
+
let STATUS;
|
|
295
|
+
(function (STATUS) {
|
|
296
|
+
STATUS["PENDING"] = "PENDING";
|
|
297
|
+
STATUS["PARTIAL"] = "PARTIAL";
|
|
298
|
+
STATUS["RECEIVED"] = "RECEIVED";
|
|
299
|
+
})(STATUS = WAREHOUSE_STOCK_IN_ORDER_ENUM.STATUS || (WAREHOUSE_STOCK_IN_ORDER_ENUM.STATUS = {}));
|
|
300
|
+
let STATUS_CHINESE;
|
|
301
|
+
(function (STATUS_CHINESE) {
|
|
302
|
+
STATUS_CHINESE["PENDING"] = "\u5F85\u6536\u8D27";
|
|
303
|
+
STATUS_CHINESE["PARTIAL"] = "\u90E8\u5206\u6536\u8D27";
|
|
304
|
+
STATUS_CHINESE["RECEIVED"] = "\u5DF2\u6536\u8D27";
|
|
305
|
+
})(STATUS_CHINESE = WAREHOUSE_STOCK_IN_ORDER_ENUM.STATUS_CHINESE || (WAREHOUSE_STOCK_IN_ORDER_ENUM.STATUS_CHINESE = {}));
|
|
306
|
+
WAREHOUSE_STOCK_IN_ORDER_ENUM.STATUS_MAP = {
|
|
307
|
+
[STATUS.PENDING]: STATUS_CHINESE.PENDING,
|
|
308
|
+
[STATUS.PARTIAL]: STATUS_CHINESE.PARTIAL,
|
|
309
|
+
[STATUS.RECEIVED]: STATUS_CHINESE.RECEIVED,
|
|
310
|
+
};
|
|
311
|
+
WAREHOUSE_STOCK_IN_ORDER_ENUM.ERROR_MESSAGES = {
|
|
312
|
+
ORDER_NOT_FOUND: '入库单不存在',
|
|
313
|
+
ORDER_COMPLETED: '入库单已完成,不可删除',
|
|
314
|
+
ONLY_PENDING_CAN_DELETE: '只有待收货状态的入库单才可删除',
|
|
315
|
+
ALREADY_RECEIVED: '入库单已全部收货,不可再次入库',
|
|
316
|
+
EMPTY_QUANTITY: '收货数量不能全为0',
|
|
317
|
+
DETAIL_NOT_FOUND: '入库单明细不存在',
|
|
318
|
+
};
|
|
319
|
+
})(WAREHOUSE_STOCK_IN_ORDER_ENUM = ENUM.WAREHOUSE_STOCK_IN_ORDER_ENUM || (ENUM.WAREHOUSE_STOCK_IN_ORDER_ENUM = {}));
|
|
292
320
|
})(ENUM || (exports.ENUM = ENUM = {}));
|
package/index.d.ts
CHANGED
|
@@ -17,4 +17,10 @@ export { logisticsService } from './modules/logistics/service';
|
|
|
17
17
|
export type { Service as LogisticsServiceTypes } from './modules/logistics/types';
|
|
18
18
|
export { storeProductFulfillService } from './modules/storeProductFulfill/service';
|
|
19
19
|
export { StoreProductFulfillTypes } from './modules/storeProductFulfill/types';
|
|
20
|
+
export { warehouseLocationService } from './modules/warehouseLocation/service';
|
|
21
|
+
export { WarehouseLocationTypes } from './modules/warehouseLocation/types';
|
|
22
|
+
export { warehouseInventoryService } from './modules/warehouseInventory/service';
|
|
23
|
+
export { WarehouseInventoryTypes } from './modules/warehouseInventory/types';
|
|
24
|
+
export { warehouseStockInService } from './modules/warehouseStockIn/service';
|
|
25
|
+
export { WarehouseStockInTypes } from './modules/warehouseStockIn/types';
|
|
20
26
|
export { ENUM as DEMO_ENUM } from './enum';
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEMO_ENUM = exports.storeProductFulfillService = exports.logisticsService = exports.ENUM = exports.PickingRuleTypes = exports.pickingRuleService = exports.productStatisticsService = exports.storeReplenishOrderService = exports.preAllocationOrderService = exports.storeStockInService = exports.allocationOrderService = exports.allocationService = void 0;
|
|
3
|
+
exports.DEMO_ENUM = exports.warehouseStockInService = exports.warehouseInventoryService = exports.warehouseLocationService = exports.storeProductFulfillService = exports.logisticsService = exports.ENUM = exports.PickingRuleTypes = exports.pickingRuleService = exports.productStatisticsService = exports.storeReplenishOrderService = exports.preAllocationOrderService = exports.storeStockInService = exports.allocationOrderService = exports.allocationService = void 0;
|
|
4
4
|
var service_1 = require("./modules/allocation/service");
|
|
5
5
|
Object.defineProperty(exports, "allocationService", { enumerable: true, get: function () { return service_1.allocationService; } });
|
|
6
6
|
var service_2 = require("./modules/allocationOrder/service");
|
|
@@ -23,6 +23,12 @@ var service_8 = require("./modules/logistics/service");
|
|
|
23
23
|
Object.defineProperty(exports, "logisticsService", { enumerable: true, get: function () { return service_8.logisticsService; } });
|
|
24
24
|
var service_9 = require("./modules/storeProductFulfill/service");
|
|
25
25
|
Object.defineProperty(exports, "storeProductFulfillService", { enumerable: true, get: function () { return service_9.storeProductFulfillService; } });
|
|
26
|
+
var service_10 = require("./modules/warehouseLocation/service");
|
|
27
|
+
Object.defineProperty(exports, "warehouseLocationService", { enumerable: true, get: function () { return service_10.warehouseLocationService; } });
|
|
28
|
+
var service_11 = require("./modules/warehouseInventory/service");
|
|
29
|
+
Object.defineProperty(exports, "warehouseInventoryService", { enumerable: true, get: function () { return service_11.warehouseInventoryService; } });
|
|
30
|
+
var service_12 = require("./modules/warehouseStockIn/service");
|
|
31
|
+
Object.defineProperty(exports, "warehouseStockInService", { enumerable: true, get: function () { return service_12.warehouseStockInService; } });
|
|
26
32
|
var enum_2 = require("./enum");
|
|
27
33
|
Object.defineProperty(exports, "DEMO_ENUM", { enumerable: true, get: function () { return enum_2.ENUM; } });
|
|
28
34
|
// 服务.模块.枚举名称.枚举值 示例: DEMO_ENUM.ORDER_ENUM.STATUS.PENDING
|
|
@@ -240,6 +240,7 @@ export declare namespace PreAllocationOrderTypes {
|
|
|
240
240
|
interface GetPreAllocationOrderDetails {
|
|
241
241
|
preAllocationOrderId: string;
|
|
242
242
|
productIds?: string[];
|
|
243
|
+
skuIds?: string[];
|
|
243
244
|
skuCodes?: string[];
|
|
244
245
|
pageIndex?: number;
|
|
245
246
|
pageSize?: number;
|
|
@@ -249,6 +250,7 @@ export declare namespace PreAllocationOrderTypes {
|
|
|
249
250
|
warehouseId?: string;
|
|
250
251
|
batchNos?: string[];
|
|
251
252
|
preAllocationOrderIds?: string[];
|
|
253
|
+
status?: number;
|
|
252
254
|
filters?: {
|
|
253
255
|
batchNos?: string[];
|
|
254
256
|
warehouseIds?: string[];
|
|
@@ -400,6 +402,7 @@ export declare namespace PreAllocationOrderTypes {
|
|
|
400
402
|
data: {
|
|
401
403
|
list: Array<{
|
|
402
404
|
id: string;
|
|
405
|
+
skuId: string;
|
|
403
406
|
skuCode: string;
|
|
404
407
|
productId: string;
|
|
405
408
|
productName: string;
|
|
@@ -12,6 +12,7 @@ export declare namespace StoreReplenishOrderTypes {
|
|
|
12
12
|
status: string;
|
|
13
13
|
productId: string;
|
|
14
14
|
productName: string;
|
|
15
|
+
imgList: string[];
|
|
15
16
|
productImage?: string;
|
|
16
17
|
skuId: string;
|
|
17
18
|
skuCode: string;
|
|
@@ -25,6 +26,7 @@ export declare namespace StoreReplenishOrderTypes {
|
|
|
25
26
|
applyType: string;
|
|
26
27
|
storeName: string;
|
|
27
28
|
productImage?: string;
|
|
29
|
+
imgList: string[];
|
|
28
30
|
productName: string;
|
|
29
31
|
productId: string;
|
|
30
32
|
skuId: string;
|
|
@@ -146,6 +148,7 @@ export declare namespace StoreReplenishOrderTypes {
|
|
|
146
148
|
skuId: string;
|
|
147
149
|
skuCode: string;
|
|
148
150
|
productName: string;
|
|
151
|
+
imgList: string[];
|
|
149
152
|
dispatchType: string;
|
|
150
153
|
specName: string;
|
|
151
154
|
productImage?: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { WarehouseInventoryTypes } from './types';
|
|
2
|
+
import BaseService from '../BaseService';
|
|
3
|
+
declare class WarehouseInventoryService extends BaseService implements WarehouseInventoryTypes.WarehouseInventoryController {
|
|
4
|
+
protected prefixUrl: string;
|
|
5
|
+
inventoryList(request: WarehouseInventoryTypes.Request.GetInventoryList): Promise<WarehouseInventoryTypes.Response.GetInventoryList>;
|
|
6
|
+
inventoryRecordList(request: WarehouseInventoryTypes.Request.GetInventoryRecordList): Promise<WarehouseInventoryTypes.Response.GetInventoryRecordList>;
|
|
7
|
+
importInventory(request: WarehouseInventoryTypes.Request.ImportInventory): Promise<WarehouseInventoryTypes.Response.ImportInventory>;
|
|
8
|
+
exportInventory(request: WarehouseInventoryTypes.Request.ExportInventory): Promise<WarehouseInventoryTypes.Response.ExportInventory>;
|
|
9
|
+
batchStockOperation(request: WarehouseInventoryTypes.Request.BatchStockOperation): Promise<void>;
|
|
10
|
+
setDeductionSwitch(request: WarehouseInventoryTypes.Request.SetDeductionSwitch): Promise<void>;
|
|
11
|
+
getDeductionSwitch(request: WarehouseInventoryTypes.Request.GetDeductionSwitch): Promise<WarehouseInventoryTypes.Response.GetDeductionSwitch>;
|
|
12
|
+
}
|
|
13
|
+
export declare const warehouseInventoryService: WarehouseInventoryService;
|
|
14
|
+
export default warehouseInventoryService;
|
|
@@ -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;
|
|
@@ -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
|
+
}
|