@be-link/ecommerce-plan-allocation-service-node-sdk 0.0.18 → 0.0.21

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 CHANGED
@@ -125,4 +125,42 @@ export declare namespace ENUM {
125
125
  readonly RECORD_NOT_FOUND: "上传记录不存在";
126
126
  };
127
127
  }
128
+ namespace INVENTORY_ENUM {
129
+ const enum OUTBOUND_TYPE_ENUM {
130
+ ITEM_OUTBOUND = "ITEM_OUTBOUND",
131
+ VERIFY = "VERIFY"
132
+ }
133
+ const enum OUTBOUND_REASON_ENUM {
134
+ VERIFY = "\u6838\u9500",
135
+ ITEM_OUTBOUND = "\u51FA\u5E93"
136
+ }
137
+ const enum WarehouseType {
138
+ /** 仓库 */
139
+ WAREHOUSE = "WAREHOUSE",
140
+ /** 门店 */
141
+ STORE = "STORE"
142
+ }
143
+ /** 库存操作类型 */
144
+ const enum InventoryOperationType {
145
+ /** 入库 */
146
+ INBOUND = "INBOUND",
147
+ /** 出库 */
148
+ OUTBOUND = "OUTBOUND"
149
+ }
150
+ /** 库存业务类型 */
151
+ const enum InventoryBizType {
152
+ /** 入库单 */
153
+ INBOUND_ORDER = "INBOUND_ORDER",
154
+ /** 配货单 */
155
+ ALLOCATION_ORDER = "ALLOCATION_ORDER",
156
+ /** 核销 */
157
+ VERIFY = "VERIFY",
158
+ /** 扫码入库 */
159
+ SCAN_INBOUND = "SCAN_INBOUND",
160
+ /** 扫码出库 */
161
+ SCAN_OUTBOUND = "SCAN_OUTBOUND",
162
+ /** 手动直接操作 */
163
+ MANUAL_DIRECT = "MANUAL_DIRECT"
164
+ }
165
+ }
128
166
  }
package/index.d.ts CHANGED
@@ -1,12 +1,14 @@
1
1
  export { allocationService } from './modules/allocation/service';
2
2
  export type { Service as AllocationServiceTypes } from './modules/allocation/types';
3
- export { logisticsService } from './modules/logistics/service';
4
- export type { Service as LogisticsServiceTypes } from './modules/logistics/types';
5
- export { ENUM as DEMO_ENUM } from './enum';
6
3
  export { allocationOrderService } from './modules/allocationOrder/service';
7
4
  export { AllocationOrderTypes } from './modules/allocationOrder/types';
8
5
  export { storeStockInService } from './modules/storeStockIn/service';
9
6
  export { StoreStockInTypes } from './modules/storeStockIn/types';
10
7
  export { preAllocationOrderService } from './modules/preAllocationOrder/service';
11
8
  export { PreAllocationOrderTypes } from './modules/preAllocationOrder/types';
9
+ export { pickingRuleService } from './modules/pickingRule/service';
10
+ export { PickingRuleTypes } from './modules/pickingRule/types';
12
11
  export { ENUM } from './enum';
12
+ export { logisticsService } from './modules/logistics/service';
13
+ export type { Service as LogisticsServiceTypes } from './modules/logistics/types';
14
+ export { ENUM as DEMO_ENUM } from './enum';
package/index.js CHANGED
@@ -1,21 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ENUM = exports.preAllocationOrderService = exports.storeStockInService = exports.allocationOrderService = exports.DEMO_ENUM = exports.logisticsService = exports.allocationService = void 0;
3
+ exports.DEMO_ENUM = exports.logisticsService = exports.ENUM = exports.PickingRuleTypes = exports.pickingRuleService = 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
- var service_2 = require("./modules/logistics/service");
7
- Object.defineProperty(exports, "logisticsService", { enumerable: true, get: function () { return service_2.logisticsService; } });
6
+ var service_2 = require("./modules/allocationOrder/service");
7
+ Object.defineProperty(exports, "allocationOrderService", { enumerable: true, get: function () { return service_2.allocationOrderService; } });
8
+ var service_3 = require("./modules/storeStockIn/service");
9
+ Object.defineProperty(exports, "storeStockInService", { enumerable: true, get: function () { return service_3.storeStockInService; } });
10
+ var service_4 = require("./modules/preAllocationOrder/service");
11
+ Object.defineProperty(exports, "preAllocationOrderService", { enumerable: true, get: function () { return service_4.preAllocationOrderService; } });
12
+ var service_5 = require("./modules/pickingRule/service");
13
+ Object.defineProperty(exports, "pickingRuleService", { enumerable: true, get: function () { return service_5.pickingRuleService; } });
14
+ var types_1 = require("./modules/pickingRule/types");
15
+ Object.defineProperty(exports, "PickingRuleTypes", { enumerable: true, get: function () { return types_1.PickingRuleTypes; } });
8
16
  var enum_1 = require("./enum");
9
- Object.defineProperty(exports, "DEMO_ENUM", { enumerable: true, get: function () { return enum_1.ENUM; } });
10
- var service_3 = require("./modules/allocationOrder/service");
11
- Object.defineProperty(exports, "allocationOrderService", { enumerable: true, get: function () { return service_3.allocationOrderService; } });
12
- var service_4 = require("./modules/storeStockIn/service");
13
- Object.defineProperty(exports, "storeStockInService", { enumerable: true, get: function () { return service_4.storeStockInService; } });
14
- var service_5 = require("./modules/preAllocationOrder/service");
15
- Object.defineProperty(exports, "preAllocationOrderService", { enumerable: true, get: function () { return service_5.preAllocationOrderService; } });
17
+ Object.defineProperty(exports, "ENUM", { enumerable: true, get: function () { return enum_1.ENUM; } });
18
+ var service_6 = require("./modules/logistics/service");
19
+ Object.defineProperty(exports, "logisticsService", { enumerable: true, get: function () { return service_6.logisticsService; } });
16
20
  var enum_2 = require("./enum");
17
- Object.defineProperty(exports, "ENUM", { enumerable: true, get: function () { return enum_2.ENUM; } });
21
+ Object.defineProperty(exports, "DEMO_ENUM", { enumerable: true, get: function () { return enum_2.ENUM; } });
18
22
  // 服务.模块.枚举名称.枚举值 示例: DEMO_ENUM.ORDER_ENUM.STATUS.PENDING
19
23
  // 门店入库单枚举示例: ENUM.STORE_STOCK_IN_ORDER_ENUM.STATUS.PENDING
20
24
  // 预配货单上传枚举示例: ENUM.PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM.STATUS.PROCESSING
21
25
  // 配货单枚举示例: ENUM.ALLOCATION_ORDER_ENUM.STATUS.PENDING
26
+ // 配货规则枚举示例: PickingRuleTypes.PickingRuleSettingMode.PRODUCT, PickingRuleTypes.OrderSourceType.POINTS_MALL
@@ -18,10 +18,10 @@ export declare namespace AllocationOrderTypes {
18
18
  realNum: number;
19
19
  creator: string;
20
20
  updater: string;
21
- shippedAt: number | null;
22
- estimatedArrivalAt: number | null;
21
+ shippedAt: number;
22
+ estimatedArrivalAt: number;
23
23
  needNextHandle: number;
24
- remark: string | null;
24
+ remark: string;
25
25
  }
26
26
  /**
27
27
  * 配货单扩展实体(包含关联数据)
@@ -50,8 +50,8 @@ export declare namespace AllocationOrderTypes {
50
50
  remainNum: number;
51
51
  nextPickingNum: number;
52
52
  shouldPickNum: number;
53
- pickingRemark: string | null;
54
- shippingRemark: string | null;
53
+ pickingRemark: string;
54
+ shippingRemark: string;
55
55
  }
56
56
  /**
57
57
  * 配货单明细扩展实体(包含商品信息)
@@ -47,8 +47,12 @@ export declare namespace Service {
47
47
  /** 商品图片 */
48
48
  productImage: string;
49
49
  }
50
- /** 商品详细信息(包含必要字段和补充字段) */
50
+ /** 商品详细信息(包含必要字段和补充字段,按规格品维度) */
51
51
  interface ProductDetailInfo extends ProductBasicInfo {
52
+ /** SKU ID */
53
+ skuId?: string;
54
+ /** SKU编码 */
55
+ skuCode?: string;
52
56
  /** 规格名称(来自ProductServiceTypes) */
53
57
  specName?: string;
54
58
  /** 应配货量 */
@@ -117,6 +121,8 @@ export declare namespace Service {
117
121
  interface BatchImportWaybill {
118
122
  /** 运货单列表Excel地址(cos地址) */
119
123
  excel: string;
124
+ /** 后台账号username */
125
+ username?: string;
120
126
  }
121
127
  /** 查询运货单列表 */
122
128
  interface GetWaybillList {
@@ -147,13 +153,15 @@ export declare namespace Service {
147
153
  allocationOrderId: string;
148
154
  /** 编辑运单号 */
149
155
  wayBill: WayBill[];
156
+ /** 后台账号username */
157
+ username?: string;
150
158
  }
151
159
  /** 运货单公司编码列表(来自 CarrierCompany 表) */
152
160
  interface GetCarrierList {
153
161
  /** 页码 */
154
162
  pageIndex: number;
155
163
  /** 每页数量 */
156
- pageSize: number;
164
+ pageSize?: number;
157
165
  /** 关键词 */
158
166
  keyword?: string;
159
167
  }
@@ -210,11 +218,7 @@ export declare namespace Service {
210
218
  namespace Response {
211
219
  /** 批量导入运货单结果 */
212
220
  interface BatchImportWaybill {
213
- /** 系统中已存在且满足条件的配货单ID列表 */
214
- successAllocationOrderIds: string[];
215
- /** 系统中不存在(或不满足条件)的配货单ID列表 */
216
- failedAllocationOrderIds: string[];
217
- /** Excel解析错误信息列表 */
221
+ /** 错误信息列表(包含所有解析错误、校验错误、插入失败等) */
218
222
  errors: string[];
219
223
  }
220
224
  /** 运货单列表 */
@@ -263,11 +267,24 @@ export declare namespace Service {
263
267
  /** 位置信息 */
264
268
  location?: string | null;
265
269
  }
266
- /** 物流单号信息(快递100 实时查询返回的完整响应信息,包含 raw 字段,并补充快递公司名称) */
267
- interface LogisticsInfo extends ExpressDeliveryApiResponseEnvelope<RealTimeQueryData> {
270
+ /** 物流单号基础信息(查询失败时也会返回) */
271
+ interface LogisticsInfoBase {
272
+ /** 运单号 */
273
+ nu: string;
274
+ /** 快递公司编码 */
275
+ com: string;
268
276
  /** 快递公司名称(根据 com 字段从 CarrierCompany 表查询,如果查询不到则为空字符串) */
269
277
  carrierName: string;
278
+ /** 运单状态 */
279
+ state?: string;
280
+ /** 信息描述(查询失败时为错误信息) */
281
+ message?: string;
270
282
  }
283
+ /** 物流单号信息(快递100 实时查询返回的完整响应信息,包含 raw 字段,并补充快递公司名称) */
284
+ type LogisticsInfo = (ExpressDeliveryApiResponseEnvelope<RealTimeQueryData> & {
285
+ carrierName: string;
286
+ num?: string;
287
+ }) | LogisticsInfoBase;
271
288
  /** 门店入库单运货单物流信息列表(直接返回每个运单实时查询结果的完整响应信息) */
272
289
  interface GetStoreStockInOrderLogisticsList {
273
290
  /** 物流信息列表 */
@@ -0,0 +1,35 @@
1
+ import { PickingRuleTypes } from './types';
2
+ import BaseService from '../BaseService';
3
+ declare class PickingRuleService extends BaseService implements PickingRuleTypes.PickingRuleController {
4
+ protected prefixUrl: string;
5
+ /**
6
+ * 保存拣货规则(圈商品)
7
+ */
8
+ setPickingRule(request: PickingRuleTypes.Request.SetPickingRule): Promise<PickingRuleTypes.Response.SetPickingRule>;
9
+ /**
10
+ * 获取已生效规则列表
11
+ */
12
+ pickingRuleList(request: PickingRuleTypes.Request.PickingRuleList): Promise<PickingRuleTypes.Response.PickingRuleList>;
13
+ /**
14
+ * 编辑拣货规则
15
+ */
16
+ updatePickingRule(request: PickingRuleTypes.Request.UpdatePickingRule): Promise<PickingRuleTypes.Response.UpdatePickingRule>;
17
+ /**
18
+ * 批量删除拣货规则
19
+ */
20
+ deletePickingRule(request: PickingRuleTypes.Request.DeletePickingRule): Promise<PickingRuleTypes.Response.DeletePickingRule>;
21
+ /**
22
+ * 保存订单来源规则
23
+ */
24
+ setOrderSourceRule(request: PickingRuleTypes.Request.SetOrderSourceRule): Promise<PickingRuleTypes.Response.SetOrderSourceRule>;
25
+ /**
26
+ * 编辑订单来源规则
27
+ */
28
+ updateOrderSourceRule(request: PickingRuleTypes.Request.UpdateOrderSourceRule): Promise<PickingRuleTypes.Response.UpdateOrderSourceRule>;
29
+ /**
30
+ * 删除订单来源规则
31
+ */
32
+ deleteOrderSourceRule(request: PickingRuleTypes.Request.DeleteOrderSourceRule): Promise<PickingRuleTypes.Response.DeleteOrderSourceRule>;
33
+ }
34
+ export declare const pickingRuleService: PickingRuleService;
35
+ export default pickingRuleService;
@@ -0,0 +1,100 @@
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.pickingRuleService = void 0;
16
+ const tsoa_1 = require("tsoa");
17
+ const http_1 = require("../../utils/http");
18
+ const BaseService_1 = __importDefault(require("../BaseService"));
19
+ let PickingRuleService = class PickingRuleService extends BaseService_1.default {
20
+ constructor() {
21
+ super(...arguments);
22
+ this.prefixUrl = '/picking-rule';
23
+ }
24
+ /**
25
+ * 保存拣货规则(圈商品)
26
+ */
27
+ setPickingRule(request) {
28
+ return (0, http_1.callApi)(this.getApiUrl(this.setPickingRule), request);
29
+ }
30
+ /**
31
+ * 获取已生效规则列表
32
+ */
33
+ pickingRuleList(request) {
34
+ return (0, http_1.callApi)(this.getApiUrl(this.pickingRuleList), request);
35
+ }
36
+ /**
37
+ * 编辑拣货规则
38
+ */
39
+ updatePickingRule(request) {
40
+ return (0, http_1.callApi)(this.getApiUrl(this.updatePickingRule), request);
41
+ }
42
+ /**
43
+ * 批量删除拣货规则
44
+ */
45
+ deletePickingRule(request) {
46
+ return (0, http_1.callApi)(this.getApiUrl(this.deletePickingRule), request);
47
+ }
48
+ /**
49
+ * 保存订单来源规则
50
+ */
51
+ setOrderSourceRule(request) {
52
+ return (0, http_1.callApi)(this.getApiUrl(this.setOrderSourceRule), request);
53
+ }
54
+ /**
55
+ * 编辑订单来源规则
56
+ */
57
+ updateOrderSourceRule(request) {
58
+ return (0, http_1.callApi)(this.getApiUrl(this.updateOrderSourceRule), request);
59
+ }
60
+ /**
61
+ * 删除订单来源规则
62
+ */
63
+ deleteOrderSourceRule(request) {
64
+ return (0, http_1.callApi)(this.getApiUrl(this.deleteOrderSourceRule), request);
65
+ }
66
+ };
67
+ __decorate([
68
+ (0, tsoa_1.Post)('set-picking-rule'),
69
+ __param(0, (0, tsoa_1.Body)())
70
+ ], PickingRuleService.prototype, "setPickingRule", null);
71
+ __decorate([
72
+ (0, tsoa_1.Post)('picking-rule-list'),
73
+ __param(0, (0, tsoa_1.Body)())
74
+ ], PickingRuleService.prototype, "pickingRuleList", null);
75
+ __decorate([
76
+ (0, tsoa_1.Post)('update-picking-rule'),
77
+ __param(0, (0, tsoa_1.Body)())
78
+ ], PickingRuleService.prototype, "updatePickingRule", null);
79
+ __decorate([
80
+ (0, tsoa_1.Post)('delete-picking-rule'),
81
+ __param(0, (0, tsoa_1.Body)())
82
+ ], PickingRuleService.prototype, "deletePickingRule", null);
83
+ __decorate([
84
+ (0, tsoa_1.Post)('set-order-source-rule'),
85
+ __param(0, (0, tsoa_1.Body)())
86
+ ], PickingRuleService.prototype, "setOrderSourceRule", null);
87
+ __decorate([
88
+ (0, tsoa_1.Post)('update-order-source-rule'),
89
+ __param(0, (0, tsoa_1.Body)())
90
+ ], PickingRuleService.prototype, "updateOrderSourceRule", null);
91
+ __decorate([
92
+ (0, tsoa_1.Post)('delete-order-source-rule'),
93
+ __param(0, (0, tsoa_1.Body)())
94
+ ], PickingRuleService.prototype, "deleteOrderSourceRule", null);
95
+ PickingRuleService = __decorate([
96
+ (0, tsoa_1.Route)('PickingRule'),
97
+ (0, tsoa_1.Tags)('pickingRule')
98
+ ], PickingRuleService);
99
+ exports.pickingRuleService = new PickingRuleService();
100
+ exports.default = exports.pickingRuleService;
@@ -0,0 +1,164 @@
1
+ export declare namespace PickingRuleTypes {
2
+ /** 枚举定义 */
3
+ enum PickingRuleSettingMode {
4
+ /** 圈商品 */
5
+ PRODUCT = "PRODUCT",
6
+ /** 订单来源 */
7
+ ORDER_SOURCE = "ORDER_SOURCE"
8
+ }
9
+ enum OrderSourceType {
10
+ /** 积分商城订单 */
11
+ POINTS_MALL = "POINTS_MALL",
12
+ /** 其他来源 */
13
+ OTHER = "OTHER"
14
+ }
15
+ /** 实体定义 */
16
+ namespace Entity {
17
+ /** 拣货规则 */
18
+ interface PickingRule {
19
+ productId: string;
20
+ skuId: string;
21
+ productName: string;
22
+ specName: string;
23
+ skuCode: string;
24
+ settingMode: PickingRuleSettingMode;
25
+ settingModeName: string;
26
+ orderSource?: OrderSourceType;
27
+ orderSourceName?: string;
28
+ rules: {
29
+ weekDays: number[];
30
+ customDates: Array<{
31
+ startTime: number;
32
+ endTime: number;
33
+ }>;
34
+ };
35
+ createdAt: number;
36
+ creatorName: string;
37
+ updatedAt: number;
38
+ updatedName: string;
39
+ }
40
+ }
41
+ /** 请求参数定义 */
42
+ namespace Request {
43
+ /** 保存拣货规则(圈商品) */
44
+ interface SetPickingRule {
45
+ warehouseId?: string;
46
+ products: Array<{
47
+ productId: string;
48
+ skuId: string;
49
+ skuCode: string;
50
+ }>;
51
+ weekDays?: number[];
52
+ customDate?: {
53
+ startTime: number;
54
+ endTime: number;
55
+ };
56
+ creatorName: string;
57
+ }
58
+ /** 获取已生效规则列表 */
59
+ interface PickingRuleList {
60
+ warehouseId?: string;
61
+ pageIndex: number;
62
+ pageSize: number;
63
+ productIds?: string[];
64
+ skuCodes?: string[];
65
+ settingMode?: PickingRuleSettingMode;
66
+ orderSource?: OrderSourceType;
67
+ }
68
+ /** 编辑拣货规则 */
69
+ interface UpdatePickingRule {
70
+ warehouseId?: string;
71
+ skuCode: string;
72
+ weekDays?: number[];
73
+ customDate?: {
74
+ startTime: number;
75
+ endTime: number;
76
+ };
77
+ updatedName: string;
78
+ }
79
+ /** 批量删除拣货规则 */
80
+ interface DeletePickingRule {
81
+ warehouseId?: string;
82
+ skuCodes: string[];
83
+ updatedName: string;
84
+ }
85
+ /** 保存订单来源规则 */
86
+ interface SetOrderSourceRule {
87
+ warehouseId?: string;
88
+ orderSource: OrderSourceType;
89
+ weekDays: number[];
90
+ creatorName: string;
91
+ }
92
+ /** 编辑订单来源规则 */
93
+ interface UpdateOrderSourceRule {
94
+ warehouseId?: string;
95
+ orderSource: OrderSourceType;
96
+ weekDays: number[];
97
+ updatedName: string;
98
+ }
99
+ /** 删除订单来源规则 */
100
+ interface DeleteOrderSourceRule {
101
+ warehouseId?: string;
102
+ orderSources: OrderSourceType[];
103
+ updatedName: string;
104
+ }
105
+ }
106
+ /** 响应结果定义 */
107
+ namespace Response {
108
+ /** 保存拣货规则响应 */
109
+ interface SetPickingRule {
110
+ successCount: number;
111
+ failedCount: number;
112
+ failedProducts: Array<{
113
+ skuId: string;
114
+ productTitle: string;
115
+ skuCode: string;
116
+ }>;
117
+ }
118
+ /** 获取已生效规则列表响应 */
119
+ interface PickingRuleList {
120
+ total: number;
121
+ list: Entity.PickingRule[];
122
+ }
123
+ /** 编辑拣货规则响应 */
124
+ interface UpdatePickingRule {
125
+ }
126
+ /** 批量删除拣货规则响应 */
127
+ interface DeletePickingRule {
128
+ successCount: number;
129
+ failedCount: number;
130
+ }
131
+ /** 保存订单来源规则响应 */
132
+ interface SetOrderSourceRule {
133
+ success: boolean;
134
+ message: string;
135
+ }
136
+ /** 编辑订单来源规则响应 */
137
+ interface UpdateOrderSourceRule {
138
+ success: boolean;
139
+ message: string;
140
+ }
141
+ /** 删除订单来源规则响应 */
142
+ interface DeleteOrderSourceRule {
143
+ successCount: number;
144
+ failedCount: number;
145
+ }
146
+ }
147
+ /** PickingRule Controller 接口定义 */
148
+ interface PickingRuleController {
149
+ /** 保存拣货规则(圈商品) */
150
+ setPickingRule(request: PickingRuleTypes.Request.SetPickingRule): Promise<PickingRuleTypes.Response.SetPickingRule>;
151
+ /** 获取已生效规则列表 */
152
+ pickingRuleList(request: PickingRuleTypes.Request.PickingRuleList): Promise<PickingRuleTypes.Response.PickingRuleList>;
153
+ /** 编辑拣货规则 */
154
+ updatePickingRule(request: PickingRuleTypes.Request.UpdatePickingRule): Promise<PickingRuleTypes.Response.UpdatePickingRule>;
155
+ /** 批量删除拣货规则 */
156
+ deletePickingRule(request: PickingRuleTypes.Request.DeletePickingRule): Promise<PickingRuleTypes.Response.DeletePickingRule>;
157
+ /** 保存订单来源规则 */
158
+ setOrderSourceRule(request: PickingRuleTypes.Request.SetOrderSourceRule): Promise<PickingRuleTypes.Response.SetOrderSourceRule>;
159
+ /** 编辑订单来源规则 */
160
+ updateOrderSourceRule(request: PickingRuleTypes.Request.UpdateOrderSourceRule): Promise<PickingRuleTypes.Response.UpdateOrderSourceRule>;
161
+ /** 删除订单来源规则 */
162
+ deleteOrderSourceRule(request: PickingRuleTypes.Request.DeleteOrderSourceRule): Promise<PickingRuleTypes.Response.DeleteOrderSourceRule>;
163
+ }
164
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PickingRuleTypes = void 0;
4
+ var PickingRuleTypes;
5
+ (function (PickingRuleTypes) {
6
+ /** 枚举定义 */
7
+ let PickingRuleSettingMode;
8
+ (function (PickingRuleSettingMode) {
9
+ /** 圈商品 */
10
+ PickingRuleSettingMode["PRODUCT"] = "PRODUCT";
11
+ /** 订单来源 */
12
+ PickingRuleSettingMode["ORDER_SOURCE"] = "ORDER_SOURCE";
13
+ })(PickingRuleSettingMode = PickingRuleTypes.PickingRuleSettingMode || (PickingRuleTypes.PickingRuleSettingMode = {}));
14
+ let OrderSourceType;
15
+ (function (OrderSourceType) {
16
+ /** 积分商城订单 */
17
+ OrderSourceType["POINTS_MALL"] = "POINTS_MALL";
18
+ /** 其他来源 */
19
+ OrderSourceType["OTHER"] = "OTHER";
20
+ })(OrderSourceType = PickingRuleTypes.OrderSourceType || (PickingRuleTypes.OrderSourceType = {}));
21
+ })(PickingRuleTypes || (exports.PickingRuleTypes = PickingRuleTypes = {}));
@@ -2,6 +2,14 @@ import { PreAllocationOrderTypes } from './types';
2
2
  import BaseService from '../BaseService';
3
3
  declare class PreAllocationOrderService extends BaseService implements PreAllocationOrderTypes.PreAllocationOrderController {
4
4
  protected prefixUrl: string;
5
+ /**
6
+ * 查询预配货批次列表
7
+ */
8
+ queryBatchList(request: PreAllocationOrderTypes.Request.QueryBatchList): Promise<PreAllocationOrderTypes.Response.QueryBatchList>;
9
+ /**
10
+ * 查询批次下的门店单据列表
11
+ */
12
+ queryBatchStoreList(request: PreAllocationOrderTypes.Request.QueryBatchStoreList): Promise<PreAllocationOrderTypes.Response.QueryBatchStoreList>;
5
13
  /**
6
14
  * 上传预配货单Excel
7
15
  */
@@ -14,6 +22,42 @@ declare class PreAllocationOrderService extends BaseService implements PreAlloca
14
22
  * 撤回上传记录
15
23
  */
16
24
  repealUploadExcel(request: PreAllocationOrderTypes.Request.RepealUploadExcel): Promise<void>;
25
+ /**
26
+ * 库存预警列表
27
+ */
28
+ inventoryWarningList(request: PreAllocationOrderTypes.Request.IInventoryWarningList): Promise<PreAllocationOrderTypes.Response.IInventoryWarningList>;
29
+ /**
30
+ * 执行新逻辑计算
31
+ */
32
+ executeNewCalculation(request: PreAllocationOrderTypes.Request.ExecuteNewCalculation): Promise<PreAllocationOrderTypes.Response.ExecuteNewCalculation>;
33
+ /**
34
+ * 批量提交预配货单
35
+ */
36
+ batchSubmit(request: PreAllocationOrderTypes.Request.BatchSubmit): Promise<PreAllocationOrderTypes.Response.BatchSubmit>;
37
+ /**
38
+ * 查询任务进度
39
+ */
40
+ getTaskProgress(request: PreAllocationOrderTypes.Request.GetTaskProgress): Promise<PreAllocationOrderTypes.Response.GetTaskProgress>;
41
+ /**
42
+ * 查询任务列表
43
+ */
44
+ getTaskList(request: PreAllocationOrderTypes.Request.GetTaskList): Promise<PreAllocationOrderTypes.Response.GetTaskList>;
45
+ /**
46
+ * 取消任务
47
+ */
48
+ cancelTask(request: PreAllocationOrderTypes.Request.CancelTask): Promise<PreAllocationOrderTypes.Response.CancelTask>;
49
+ /**
50
+ * 搜索商品
51
+ */
52
+ searchProducts(request: PreAllocationOrderTypes.Request.SearchProducts): Promise<PreAllocationOrderTypes.Response.SearchProducts>;
53
+ /**
54
+ * 批量修改配货数量
55
+ */
56
+ batchUpdatePickingNum(request: PreAllocationOrderTypes.Request.BatchUpdatePickingNum): Promise<PreAllocationOrderTypes.Response.BatchUpdatePickingNum>;
57
+ /**
58
+ * 导出预配货单
59
+ */
60
+ exportPreAllocationOrders(request: PreAllocationOrderTypes.Request.ExportPreAllocationOrders): Promise<PreAllocationOrderTypes.Response.ExportPreAllocationOrders>;
17
61
  }
18
62
  export declare const preAllocationOrderService: PreAllocationOrderService;
19
63
  export default preAllocationOrderService;
@@ -21,6 +21,18 @@ let PreAllocationOrderService = class PreAllocationOrderService extends BaseServ
21
21
  super(...arguments);
22
22
  this.prefixUrl = '/pre-allocation-order';
23
23
  }
24
+ /**
25
+ * 查询预配货批次列表
26
+ */
27
+ queryBatchList(request) {
28
+ return (0, http_1.callApi)(this.getApiUrl(this.queryBatchList), request);
29
+ }
30
+ /**
31
+ * 查询批次下的门店单据列表
32
+ */
33
+ queryBatchStoreList(request) {
34
+ return (0, http_1.callApi)(this.getApiUrl(this.queryBatchStoreList), request);
35
+ }
24
36
  /**
25
37
  * 上传预配货单Excel
26
38
  */
@@ -39,7 +51,69 @@ let PreAllocationOrderService = class PreAllocationOrderService extends BaseServ
39
51
  repealUploadExcel(request) {
40
52
  return (0, http_1.callApi)(this.getApiUrl(this.repealUploadExcel), request);
41
53
  }
54
+ /**
55
+ * 库存预警列表
56
+ */
57
+ inventoryWarningList(request) {
58
+ return (0, http_1.callApi)(this.getApiUrl(this.inventoryWarningList), request);
59
+ }
60
+ /**
61
+ * 执行新逻辑计算
62
+ */
63
+ executeNewCalculation(request) {
64
+ return (0, http_1.callApi)(this.getApiUrl(this.executeNewCalculation), request);
65
+ }
66
+ /**
67
+ * 批量提交预配货单
68
+ */
69
+ batchSubmit(request) {
70
+ return (0, http_1.callApi)(this.getApiUrl(this.batchSubmit), request);
71
+ }
72
+ /**
73
+ * 查询任务进度
74
+ */
75
+ getTaskProgress(request) {
76
+ return (0, http_1.callApi)(this.getApiUrl(this.getTaskProgress), request);
77
+ }
78
+ /**
79
+ * 查询任务列表
80
+ */
81
+ getTaskList(request) {
82
+ return (0, http_1.callApi)(this.getApiUrl(this.getTaskList), request);
83
+ }
84
+ /**
85
+ * 取消任务
86
+ */
87
+ cancelTask(request) {
88
+ return (0, http_1.callApi)(this.getApiUrl(this.cancelTask), request);
89
+ }
90
+ /**
91
+ * 搜索商品
92
+ */
93
+ searchProducts(request) {
94
+ return (0, http_1.callApi)(this.getApiUrl(this.searchProducts), request);
95
+ }
96
+ /**
97
+ * 批量修改配货数量
98
+ */
99
+ batchUpdatePickingNum(request) {
100
+ return (0, http_1.callApi)(this.getApiUrl(this.batchUpdatePickingNum), request);
101
+ }
102
+ /**
103
+ * 导出预配货单
104
+ */
105
+ exportPreAllocationOrders(request) {
106
+ return (0, http_1.callApi)(this.getApiUrl(this.exportPreAllocationOrders), request);
107
+ }
42
108
  };
109
+ __decorate([
110
+ (0, tsoa_1.Post)('query-batch-list'),
111
+ __param(0, (0, tsoa_1.Body)())
112
+ ], PreAllocationOrderService.prototype, "queryBatchList", null);
113
+ __decorate([
114
+ (0, tsoa_1.Post)('query-batch-store-list'),
115
+ __param(0, (0, tsoa_1.Body)())
116
+ ], PreAllocationOrderService.prototype, "queryBatchStoreList", null);
43
117
  __decorate([
44
118
  (0, tsoa_1.Post)('upload-excel'),
45
119
  __param(0, (0, tsoa_1.Body)())
@@ -52,6 +126,42 @@ __decorate([
52
126
  (0, tsoa_1.Post)('repeal-upload-excel'),
53
127
  __param(0, (0, tsoa_1.Body)())
54
128
  ], PreAllocationOrderService.prototype, "repealUploadExcel", null);
129
+ __decorate([
130
+ (0, tsoa_1.Post)('inventory-warning-list'),
131
+ __param(0, (0, tsoa_1.Body)())
132
+ ], PreAllocationOrderService.prototype, "inventoryWarningList", null);
133
+ __decorate([
134
+ (0, tsoa_1.Post)('execute-new-calculation'),
135
+ __param(0, (0, tsoa_1.Body)())
136
+ ], PreAllocationOrderService.prototype, "executeNewCalculation", null);
137
+ __decorate([
138
+ (0, tsoa_1.Post)('batch-submit'),
139
+ __param(0, (0, tsoa_1.Body)())
140
+ ], PreAllocationOrderService.prototype, "batchSubmit", null);
141
+ __decorate([
142
+ (0, tsoa_1.Post)('get-task-progress'),
143
+ __param(0, (0, tsoa_1.Body)())
144
+ ], PreAllocationOrderService.prototype, "getTaskProgress", null);
145
+ __decorate([
146
+ (0, tsoa_1.Post)('get-task-list'),
147
+ __param(0, (0, tsoa_1.Body)())
148
+ ], PreAllocationOrderService.prototype, "getTaskList", null);
149
+ __decorate([
150
+ (0, tsoa_1.Post)('cancel-task'),
151
+ __param(0, (0, tsoa_1.Body)())
152
+ ], PreAllocationOrderService.prototype, "cancelTask", null);
153
+ __decorate([
154
+ (0, tsoa_1.Post)('search-products'),
155
+ __param(0, (0, tsoa_1.Body)())
156
+ ], PreAllocationOrderService.prototype, "searchProducts", null);
157
+ __decorate([
158
+ (0, tsoa_1.Post)('batch-update-picking-num'),
159
+ __param(0, (0, tsoa_1.Body)())
160
+ ], PreAllocationOrderService.prototype, "batchUpdatePickingNum", null);
161
+ __decorate([
162
+ (0, tsoa_1.Post)('export'),
163
+ __param(0, (0, tsoa_1.Body)())
164
+ ], PreAllocationOrderService.prototype, "exportPreAllocationOrders", null);
55
165
  PreAllocationOrderService = __decorate([
56
166
  (0, tsoa_1.Route)('PreAllocationOrder'),
57
167
  (0, tsoa_1.Tags)('preAllocationOrder')
@@ -16,9 +16,81 @@ export declare namespace PreAllocationOrderTypes {
16
16
  updatedAt: number;
17
17
  isDisplayRepeal: boolean;
18
18
  }
19
+ /** 预配货批次 */
20
+ interface PreAllocationBatch {
21
+ batchId: string;
22
+ batchNo: string;
23
+ warehouseId: string;
24
+ warehouseName: string;
25
+ storeCount: number;
26
+ productCount: number;
27
+ totalPickingNum: number;
28
+ submittedStoreCount: number;
29
+ createdAt: number;
30
+ }
31
+ /** 预配货单 */
32
+ interface PreAllocationOrder {
33
+ preAllocationOrderId: string;
34
+ batchId: string;
35
+ batchNo: string;
36
+ storeId: string;
37
+ storeName: string;
38
+ warehouseId: string;
39
+ warehouseName: string;
40
+ productCount: number;
41
+ totalPickingNum: number;
42
+ status: number;
43
+ createdAt: number;
44
+ }
45
+ /** 商品信息 */
46
+ interface Product {
47
+ skuCode: string;
48
+ productId: string;
49
+ productName: string;
50
+ currentPickingNum: number;
51
+ affectedOrderCount: number;
52
+ }
53
+ /** 异步任务 */
54
+ interface AsyncTask {
55
+ taskId: string;
56
+ taskType: string;
57
+ status: number;
58
+ progress: number;
59
+ result?: any;
60
+ errorMessage?: string;
61
+ createdAt: number;
62
+ updatedAt: number;
63
+ }
19
64
  }
20
65
  /** 请求参数定义 */
21
66
  namespace Request {
67
+ /** 查询预配货批次列表 */
68
+ interface QueryBatchList {
69
+ pageIndex: number;
70
+ pageSize: number;
71
+ batchNo?: string;
72
+ warehouseId?: string;
73
+ storeId?: string;
74
+ productId?: string;
75
+ skuCode?: string;
76
+ deliveryMode?: string;
77
+ sourceType?: number;
78
+ batchStatus?: number;
79
+ }
80
+ /** 查询批次下的门店单据列表 */
81
+ interface QueryBatchStoreList {
82
+ batchId: string;
83
+ pageIndex: number;
84
+ pageSize: number;
85
+ storeId?: string;
86
+ storeName?: string;
87
+ productId?: string;
88
+ skuCode?: string;
89
+ deliveryMode?: string;
90
+ sourceType?: number;
91
+ batchStatus?: number;
92
+ status?: number;
93
+ }
22
94
  /** 上传Excel */
23
95
  interface UploadExcel {
24
96
  excelUrl: string;
@@ -42,9 +114,90 @@ export declare namespace PreAllocationOrderTypes {
42
114
  id: string;
43
115
  operator: string;
44
116
  }
117
+ /** 库存预警列表 */
118
+ interface IInventoryWarningList {
119
+ warehouseId?: string;
120
+ productIds?: string[];
121
+ skuCodes?: string[];
122
+ pageIndex: number;
123
+ pageSize: number;
124
+ }
125
+ /** 执行新逻辑计算 */
126
+ interface ExecuteNewCalculation {
127
+ businessDate?: number;
128
+ }
129
+ /** 批量提交预配货单 */
130
+ interface BatchSubmit {
131
+ batchIds?: string[];
132
+ preAllocationOrderIds?: string[];
133
+ pickingAt: number;
134
+ estimatedArrivalAt: number;
135
+ operator: string;
136
+ }
137
+ /** 查询任务进度 */
138
+ interface GetTaskProgress {
139
+ taskId: string;
140
+ }
141
+ /** 查询任务列表 */
142
+ interface GetTaskList {
143
+ operator: string;
144
+ taskType?: string;
145
+ status?: number;
146
+ pageIndex?: number;
147
+ pageSize?: number;
148
+ }
149
+ /** 取消任务 */
150
+ interface CancelTask {
151
+ taskId: string;
152
+ }
153
+ /** 搜索商品 */
154
+ interface SearchProducts {
155
+ preAllocationOrderIds: string[];
156
+ productName?: string;
157
+ skuCode?: string;
158
+ pageIndex?: number;
159
+ pageSize?: number;
160
+ }
161
+ /** 批量修改配货数量 */
162
+ interface BatchUpdatePickingNum {
163
+ preAllocationOrderIds: string[];
164
+ adjustments: Array<{
165
+ skuCode: string;
166
+ adjustmentType: 'ADD' | 'REDUCE';
167
+ adjustmentNum: number;
168
+ adjustmentReason: string;
169
+ }>;
170
+ operator: string;
171
+ }
172
+ /** 导出预配货单 */
173
+ interface ExportPreAllocationOrders {
174
+ filters?: {
175
+ batchNo?: string;
176
+ warehouseId?: string;
177
+ storeId?: string;
178
+ productId?: string;
179
+ skuCode?: string;
180
+ deliveryMode?: string;
181
+ sourceType?: number;
182
+ batchStatus?: number;
183
+ status?: number;
184
+ };
185
+ batchIds?: string[];
186
+ preAllocationOrderIds?: string[];
187
+ }
45
188
  }
46
189
  /** 响应结果定义 */
47
190
  namespace Response {
191
+ /** 查询预配货批次列表响应 */
192
+ interface QueryBatchList {
193
+ list: Entity.PreAllocationBatch[];
194
+ total: number;
195
+ }
196
+ /** 查询批次下的门店单据列表响应 */
197
+ interface QueryBatchStoreList {
198
+ list: Entity.PreAllocationOrder[];
199
+ total: number;
200
+ }
48
201
  /** 上传Excel响应 */
49
202
  interface UploadExcel {
50
203
  errorList: Array<{
@@ -62,14 +215,112 @@ export declare namespace PreAllocationOrderTypes {
62
215
  success: boolean;
63
216
  message?: string;
64
217
  }
218
+ /** 库存预警列表响应 */
219
+ interface IInventoryWarningList {
220
+ pickingDate: number;
221
+ list: {
222
+ productName: string;
223
+ skuCode: string;
224
+ specName: string;
225
+ stockNum: string;
226
+ totalPickingNum: string;
227
+ totalStoreNum: number;
228
+ }[];
229
+ total: number;
230
+ }
231
+ /** 执行新逻辑计算响应 */
232
+ interface ExecuteNewCalculation {
233
+ taskId: string;
234
+ }
235
+ /** 批量提交预配货单响应 */
236
+ interface BatchSubmit {
237
+ code: number;
238
+ message: string;
239
+ data: {
240
+ taskId: string;
241
+ };
242
+ }
243
+ /** 查询任务进度响应 */
244
+ interface GetTaskProgress {
245
+ code: number;
246
+ message: string;
247
+ data: Entity.AsyncTask | null;
248
+ }
249
+ /** 查询任务列表响应 */
250
+ interface GetTaskList {
251
+ code: number;
252
+ message: string;
253
+ data: {
254
+ list: Entity.AsyncTask[];
255
+ total: number;
256
+ pageIndex: number;
257
+ pageSize: number;
258
+ };
259
+ }
260
+ /** 取消任务响应 */
261
+ interface CancelTask {
262
+ code: number;
263
+ message: string;
264
+ data: null;
265
+ }
266
+ /** 搜索商品响应 */
267
+ interface SearchProducts {
268
+ code: number;
269
+ message: string;
270
+ data: {
271
+ list: Entity.Product[];
272
+ total: number;
273
+ };
274
+ }
275
+ /** 批量修改配货数量响应 */
276
+ interface BatchUpdatePickingNum {
277
+ code: number;
278
+ message: string;
279
+ data: null;
280
+ }
281
+ /** 导出预配货单响应 */
282
+ interface ExportPreAllocationOrders {
283
+ code: number;
284
+ message: string;
285
+ data: {
286
+ headers: Array<{
287
+ key: string;
288
+ label: string;
289
+ width?: number;
290
+ }>;
291
+ data: any[];
292
+ };
293
+ }
65
294
  }
66
295
  /** PreAllocationOrder Controller 接口定义 */
67
296
  interface PreAllocationOrderController {
297
+ /** 查询预配货批次列表 */
298
+ queryBatchList(request: PreAllocationOrderTypes.Request.QueryBatchList): Promise<PreAllocationOrderTypes.Response.QueryBatchList>;
299
+ /** 查询批次下的门店单据列表 */
300
+ queryBatchStoreList(request: PreAllocationOrderTypes.Request.QueryBatchStoreList): Promise<PreAllocationOrderTypes.Response.QueryBatchStoreList>;
68
301
  /** 上传预配货单Excel */
69
302
  uploadExcel(request: PreAllocationOrderTypes.Request.UploadExcel): Promise<PreAllocationOrderTypes.Response.UploadExcel>;
70
303
  /** 查询上传记录列表 */
71
304
  queryUploadExcelList(request: PreAllocationOrderTypes.Request.QueryUploadExcelList): Promise<PreAllocationOrderTypes.Response.QueryUploadExcelList>;
72
305
  /** 撤回上传记录 */
73
306
  repealUploadExcel(request: PreAllocationOrderTypes.Request.RepealUploadExcel): Promise<void>;
307
+ /** 库存预警列表 */
308
+ inventoryWarningList(request: PreAllocationOrderTypes.Request.IInventoryWarningList): Promise<PreAllocationOrderTypes.Response.IInventoryWarningList>;
309
+ /** 执行新逻辑计算 */
310
+ executeNewCalculation(request: PreAllocationOrderTypes.Request.ExecuteNewCalculation): Promise<PreAllocationOrderTypes.Response.ExecuteNewCalculation>;
311
+ /** 批量提交预配货单 */
312
+ batchSubmit(request: PreAllocationOrderTypes.Request.BatchSubmit): Promise<PreAllocationOrderTypes.Response.BatchSubmit>;
313
+ /** 查询任务进度 */
314
+ getTaskProgress(request: PreAllocationOrderTypes.Request.GetTaskProgress): Promise<PreAllocationOrderTypes.Response.GetTaskProgress>;
315
+ /** 查询任务列表 */
316
+ getTaskList(request: PreAllocationOrderTypes.Request.GetTaskList): Promise<PreAllocationOrderTypes.Response.GetTaskList>;
317
+ /** 取消任务 */
318
+ cancelTask(request: PreAllocationOrderTypes.Request.CancelTask): Promise<PreAllocationOrderTypes.Response.CancelTask>;
319
+ /** 搜索商品 */
320
+ searchProducts(request: PreAllocationOrderTypes.Request.SearchProducts): Promise<PreAllocationOrderTypes.Response.SearchProducts>;
321
+ /** 批量修改配货数量 */
322
+ batchUpdatePickingNum(request: PreAllocationOrderTypes.Request.BatchUpdatePickingNum): Promise<PreAllocationOrderTypes.Response.BatchUpdatePickingNum>;
323
+ /** 导出预配货单 */
324
+ exportPreAllocationOrders(request: PreAllocationOrderTypes.Request.ExportPreAllocationOrders): Promise<PreAllocationOrderTypes.Response.ExportPreAllocationOrders>;
74
325
  }
75
326
  }
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.18",
3
+ "version": "0.0.21",
4
4
  "description": "EcommercePlanAllocationService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",