@be-link/ecommerce-plan-allocation-service-node-sdk 0.0.4 → 0.0.6
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 +32 -0
- package/enum.js +35 -0
- package/index.d.ts +2 -0
- package/index.js +4 -1
- package/modules/logistics/service.d.ts +15 -0
- package/modules/logistics/service.js +94 -0
- package/modules/logistics/types.d.ts +187 -0
- package/modules/logistics/types.js +2 -0
- package/modules/preAllocationOrder/service.d.ts +19 -0
- package/modules/preAllocationOrder/service.js +60 -0
- package/modules/preAllocationOrder/types.d.ts +72 -0
- package/modules/preAllocationOrder/types.js +2 -0
- package/modules/storeStockIn/service.d.ts +2 -1
- package/modules/storeStockIn/service.js +7 -0
- package/modules/storeStockIn/types.d.ts +23 -0
- package/package.json +2 -1
package/enum.d.ts
CHANGED
|
@@ -93,4 +93,36 @@ export declare namespace ENUM {
|
|
|
93
93
|
readonly 2: DELIVERY_MODE_CHINESE.WAREHOUSE_DELIVERY;
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
|
+
namespace PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM {
|
|
97
|
+
enum STATUS {
|
|
98
|
+
PROCESSING = "PROCESSING",
|
|
99
|
+
SUCCESS = "SUCCESS",
|
|
100
|
+
FAILD = "FAILD",
|
|
101
|
+
PARTIAL = "PARTIAL",
|
|
102
|
+
REPEAL = "REPEAL"
|
|
103
|
+
}
|
|
104
|
+
enum STATUS_CHINESE {
|
|
105
|
+
PROCESSING = "\u5904\u7406\u4E2D",
|
|
106
|
+
SUCCESS = "\u6210\u529F",
|
|
107
|
+
FAILD = "\u5931\u8D25",
|
|
108
|
+
PARTIAL = "\u90E8\u5206\u5931\u8D25",
|
|
109
|
+
REPEAL = "\u64A4\u9500"
|
|
110
|
+
}
|
|
111
|
+
/** 状态映射 */
|
|
112
|
+
const STATUS_MAP: {
|
|
113
|
+
readonly PROCESSING: STATUS_CHINESE.PROCESSING;
|
|
114
|
+
readonly SUCCESS: STATUS_CHINESE.SUCCESS;
|
|
115
|
+
readonly FAILD: STATUS_CHINESE.FAILD;
|
|
116
|
+
readonly PARTIAL: STATUS_CHINESE.PARTIAL;
|
|
117
|
+
readonly REPEAL: STATUS_CHINESE.REPEAL;
|
|
118
|
+
};
|
|
119
|
+
/** 错误消息常量 */
|
|
120
|
+
const ERROR_MESSAGES: {
|
|
121
|
+
readonly FILE_NOT_FOUND: "文件不存在";
|
|
122
|
+
readonly FILE_FORMAT_ERROR: "文件格式错误";
|
|
123
|
+
readonly UPLOAD_FAILED: "上传失败";
|
|
124
|
+
readonly PROCESSING: "正在处理中";
|
|
125
|
+
readonly RECORD_NOT_FOUND: "上传记录不存在";
|
|
126
|
+
};
|
|
127
|
+
}
|
|
96
128
|
}
|
package/enum.js
CHANGED
|
@@ -109,4 +109,39 @@ var ENUM;
|
|
|
109
109
|
[DELIVERY_MODE.WAREHOUSE_DELIVERY]: DELIVERY_MODE_CHINESE.WAREHOUSE_DELIVERY,
|
|
110
110
|
};
|
|
111
111
|
})(STORE_WAREHOUSE_ENUM = ENUM.STORE_WAREHOUSE_ENUM || (ENUM.STORE_WAREHOUSE_ENUM = {}));
|
|
112
|
+
let PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM;
|
|
113
|
+
(function (PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM) {
|
|
114
|
+
let STATUS;
|
|
115
|
+
(function (STATUS) {
|
|
116
|
+
STATUS["PROCESSING"] = "PROCESSING";
|
|
117
|
+
STATUS["SUCCESS"] = "SUCCESS";
|
|
118
|
+
STATUS["FAILD"] = "FAILD";
|
|
119
|
+
STATUS["PARTIAL"] = "PARTIAL";
|
|
120
|
+
STATUS["REPEAL"] = "REPEAL";
|
|
121
|
+
})(STATUS = PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM.STATUS || (PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM.STATUS = {}));
|
|
122
|
+
let STATUS_CHINESE;
|
|
123
|
+
(function (STATUS_CHINESE) {
|
|
124
|
+
STATUS_CHINESE["PROCESSING"] = "\u5904\u7406\u4E2D";
|
|
125
|
+
STATUS_CHINESE["SUCCESS"] = "\u6210\u529F";
|
|
126
|
+
STATUS_CHINESE["FAILD"] = "\u5931\u8D25";
|
|
127
|
+
STATUS_CHINESE["PARTIAL"] = "\u90E8\u5206\u5931\u8D25";
|
|
128
|
+
STATUS_CHINESE["REPEAL"] = "\u64A4\u9500";
|
|
129
|
+
})(STATUS_CHINESE = PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM.STATUS_CHINESE || (PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM.STATUS_CHINESE = {}));
|
|
130
|
+
/** 状态映射 */
|
|
131
|
+
PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM.STATUS_MAP = {
|
|
132
|
+
[STATUS.PROCESSING]: STATUS_CHINESE.PROCESSING,
|
|
133
|
+
[STATUS.SUCCESS]: STATUS_CHINESE.SUCCESS,
|
|
134
|
+
[STATUS.FAILD]: STATUS_CHINESE.FAILD,
|
|
135
|
+
[STATUS.PARTIAL]: STATUS_CHINESE.PARTIAL,
|
|
136
|
+
[STATUS.REPEAL]: STATUS_CHINESE.REPEAL,
|
|
137
|
+
};
|
|
138
|
+
/** 错误消息常量 */
|
|
139
|
+
PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM.ERROR_MESSAGES = {
|
|
140
|
+
FILE_NOT_FOUND: '文件不存在',
|
|
141
|
+
FILE_FORMAT_ERROR: '文件格式错误',
|
|
142
|
+
UPLOAD_FAILED: '上传失败',
|
|
143
|
+
PROCESSING: '正在处理中',
|
|
144
|
+
RECORD_NOT_FOUND: '上传记录不存在',
|
|
145
|
+
};
|
|
146
|
+
})(PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM = ENUM.PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM || (ENUM.PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM = {}));
|
|
112
147
|
})(ENUM || (exports.ENUM = ENUM = {}));
|
package/index.d.ts
CHANGED
|
@@ -2,4 +2,6 @@ export { allocationService } from './modules/allocation/service';
|
|
|
2
2
|
export type { Service as AllocationServiceTypes } from './modules/allocation/types';
|
|
3
3
|
export { storeStockInService } from './modules/storeStockIn/service';
|
|
4
4
|
export { StoreStockInTypes } from './modules/storeStockIn/types';
|
|
5
|
+
export { preAllocationOrderService } from './modules/preAllocationOrder/service';
|
|
6
|
+
export { PreAllocationOrderTypes } from './modules/preAllocationOrder/types';
|
|
5
7
|
export { ENUM } from './enum';
|
package/index.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ENUM = exports.storeStockInService = exports.allocationService = void 0;
|
|
3
|
+
exports.ENUM = exports.preAllocationOrderService = exports.storeStockInService = 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/storeStockIn/service");
|
|
7
7
|
Object.defineProperty(exports, "storeStockInService", { enumerable: true, get: function () { return service_2.storeStockInService; } });
|
|
8
|
+
var service_3 = require("./modules/preAllocationOrder/service");
|
|
9
|
+
Object.defineProperty(exports, "preAllocationOrderService", { enumerable: true, get: function () { return service_3.preAllocationOrderService; } });
|
|
8
10
|
var enum_1 = require("./enum");
|
|
9
11
|
Object.defineProperty(exports, "ENUM", { enumerable: true, get: function () { return enum_1.ENUM; } });
|
|
10
12
|
// 服务.模块.枚举名称.枚举值 示例: DEMO_ENUM.ORDER_ENUM.STATUS.PENDING
|
|
11
13
|
// 门店入库单枚举示例: ENUM.STORE_STOCK_IN_ORDER_ENUM.STATUS.PENDING
|
|
14
|
+
// 预配货单上传枚举示例: ENUM.PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM.STATUS.PROCESSING
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Service } from './types';
|
|
2
|
+
import BaseService from '../BaseService';
|
|
3
|
+
declare class LogisticsService extends BaseService implements Service.LogisticsController {
|
|
4
|
+
protected prefixUrl: string;
|
|
5
|
+
batchImportWaybill(request: Service.Request.BatchImportWaybill): Promise<void>;
|
|
6
|
+
getWaybillList(request: Service.Request.GetWaybillList): Promise<Service.Response.GetWaybillList>;
|
|
7
|
+
writeWaybill(request: Service.Request.WriteWaybill): Promise<void>;
|
|
8
|
+
getCarrierList(request: Service.Request.GetCarrierList): Promise<Service.Response.GetCarrierList>;
|
|
9
|
+
getStoreStockInOrderList(request: Service.Request.GetStoreStockInOrderList): Promise<Service.Response.GetStoreStockInOrderList>;
|
|
10
|
+
getStoreStockInOrderDetailList(request: Service.Request.GetStoreStockInOrderDetailList): Promise<Service.Response.GetStoreStockInOrderDetailList>;
|
|
11
|
+
getStoreStockInOrderLogisticsList(request: Service.Request.GetStoreStockInOrderLogisticsList): Promise<Service.Response.GetStoreStockInOrderLogisticsList>;
|
|
12
|
+
getProductList(request: Service.Request.GetProductList): Promise<Service.Response.GetProductList>;
|
|
13
|
+
}
|
|
14
|
+
export declare const logisticsService: LogisticsService;
|
|
15
|
+
export default logisticsService;
|
|
@@ -0,0 +1,94 @@
|
|
|
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.logisticsService = void 0;
|
|
16
|
+
const tsoa_1 = require("tsoa");
|
|
17
|
+
const http_1 = require("../../utils/http");
|
|
18
|
+
const BaseService_1 = __importDefault(require("../BaseService"));
|
|
19
|
+
let LogisticsService = class LogisticsService extends BaseService_1.default {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.prefixUrl = '/logistics';
|
|
23
|
+
}
|
|
24
|
+
batchImportWaybill(request) {
|
|
25
|
+
return (0, http_1.callApi)(this.getApiUrl(this.batchImportWaybill), request);
|
|
26
|
+
}
|
|
27
|
+
getWaybillList(request) {
|
|
28
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getWaybillList), request);
|
|
29
|
+
}
|
|
30
|
+
writeWaybill(request) {
|
|
31
|
+
return (0, http_1.callApi)(this.getApiUrl(this.writeWaybill), request);
|
|
32
|
+
}
|
|
33
|
+
getCarrierList(request) {
|
|
34
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getCarrierList), request);
|
|
35
|
+
}
|
|
36
|
+
getStoreStockInOrderList(request) {
|
|
37
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getStoreStockInOrderList), request);
|
|
38
|
+
}
|
|
39
|
+
getStoreStockInOrderDetailList(request) {
|
|
40
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getStoreStockInOrderDetailList), request);
|
|
41
|
+
}
|
|
42
|
+
getStoreStockInOrderLogisticsList(request) {
|
|
43
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getStoreStockInOrderLogisticsList), request);
|
|
44
|
+
}
|
|
45
|
+
getProductList(request) {
|
|
46
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getProductList), request);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, tsoa_1.OperationId)('批量导入运货单'),
|
|
51
|
+
(0, tsoa_1.Post)('batch-import-waybill'),
|
|
52
|
+
__param(0, (0, tsoa_1.Body)())
|
|
53
|
+
], LogisticsService.prototype, "batchImportWaybill", null);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, tsoa_1.OperationId)('查询运货单列表'),
|
|
56
|
+
(0, tsoa_1.Post)('get-waybill-list'),
|
|
57
|
+
__param(0, (0, tsoa_1.Body)())
|
|
58
|
+
], LogisticsService.prototype, "getWaybillList", null);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, tsoa_1.OperationId)('配货单单独写入运货单'),
|
|
61
|
+
(0, tsoa_1.Post)('write-waybill'),
|
|
62
|
+
__param(0, (0, tsoa_1.Body)())
|
|
63
|
+
], LogisticsService.prototype, "writeWaybill", null);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, tsoa_1.OperationId)('运货单公司编码列表'),
|
|
66
|
+
(0, tsoa_1.Post)('get-carrier-list'),
|
|
67
|
+
__param(0, (0, tsoa_1.Body)())
|
|
68
|
+
], LogisticsService.prototype, "getCarrierList", null);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, tsoa_1.OperationId)('门店入库单列表'),
|
|
71
|
+
(0, tsoa_1.Post)('get-store-stock-in-order-list'),
|
|
72
|
+
__param(0, (0, tsoa_1.Body)())
|
|
73
|
+
], LogisticsService.prototype, "getStoreStockInOrderList", null);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, tsoa_1.OperationId)('门店入库单详情商品列表'),
|
|
76
|
+
(0, tsoa_1.Post)('get-store-stock-in-order-detail-list'),
|
|
77
|
+
__param(0, (0, tsoa_1.Body)())
|
|
78
|
+
], LogisticsService.prototype, "getStoreStockInOrderDetailList", null);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, tsoa_1.OperationId)('门店入库单运货单物流信息列表'),
|
|
81
|
+
(0, tsoa_1.Post)('get-store-stock-in-order-logistics-list'),
|
|
82
|
+
__param(0, (0, tsoa_1.Body)())
|
|
83
|
+
], LogisticsService.prototype, "getStoreStockInOrderLogisticsList", null);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, tsoa_1.OperationId)('门店入库单商品列表'),
|
|
86
|
+
(0, tsoa_1.Post)('get-product-list'),
|
|
87
|
+
__param(0, (0, tsoa_1.Body)())
|
|
88
|
+
], LogisticsService.prototype, "getProductList", null);
|
|
89
|
+
LogisticsService = __decorate([
|
|
90
|
+
(0, tsoa_1.Route)('logistics'),
|
|
91
|
+
(0, tsoa_1.Tags)('Logistics')
|
|
92
|
+
], LogisticsService);
|
|
93
|
+
exports.logisticsService = new LogisticsService();
|
|
94
|
+
exports.default = exports.logisticsService;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { GetTrackingInfoAccepted } from '@be-link/17trak-api-sdk';
|
|
2
|
+
import { FastifyRequest } from 'fastify';
|
|
3
|
+
export declare namespace Service {
|
|
4
|
+
/** 物流信息实体 */
|
|
5
|
+
interface Logistics {
|
|
6
|
+
/** 运货单ID */
|
|
7
|
+
id: string;
|
|
8
|
+
/** 配货单ID */
|
|
9
|
+
allocationOrderId: string;
|
|
10
|
+
/** 门店入库单ID */
|
|
11
|
+
storeStockInOrderId: string;
|
|
12
|
+
/** 分组id-适用于Excel导入时 */
|
|
13
|
+
groupId: string;
|
|
14
|
+
/** 运单号 */
|
|
15
|
+
num: string;
|
|
16
|
+
/** 公司编码 */
|
|
17
|
+
carrier: number;
|
|
18
|
+
/** 运单状态 */
|
|
19
|
+
status: number;
|
|
20
|
+
/** 第三方运单状态 */
|
|
21
|
+
statusText: string;
|
|
22
|
+
/** 收货手机号码 */
|
|
23
|
+
phone: string;
|
|
24
|
+
/** 订阅状态 */
|
|
25
|
+
subscribeStatus: number;
|
|
26
|
+
/** 订阅失败信息 */
|
|
27
|
+
subscribeMessage: string;
|
|
28
|
+
/** 订阅时间 */
|
|
29
|
+
subscribeTime: number;
|
|
30
|
+
}
|
|
31
|
+
/** 入库单详情 */
|
|
32
|
+
interface StockInOrder {
|
|
33
|
+
logistics: string;
|
|
34
|
+
supplyName: string;
|
|
35
|
+
warehouseId: string;
|
|
36
|
+
storeId: string;
|
|
37
|
+
creator: string;
|
|
38
|
+
updater: string;
|
|
39
|
+
type: string;
|
|
40
|
+
status: string;
|
|
41
|
+
logisticStatus: number;
|
|
42
|
+
receivedAt: number;
|
|
43
|
+
receivableQuantity: number;
|
|
44
|
+
receivedQuantity: number;
|
|
45
|
+
remark: string;
|
|
46
|
+
extra: any;
|
|
47
|
+
deletedAt: number;
|
|
48
|
+
}
|
|
49
|
+
interface Product {
|
|
50
|
+
}
|
|
51
|
+
namespace Request {
|
|
52
|
+
/** 批量导入运货单 */
|
|
53
|
+
interface BatchImportWaybill {
|
|
54
|
+
/** 运货单列表Excel地址(cos地址) */
|
|
55
|
+
excel: string;
|
|
56
|
+
}
|
|
57
|
+
/** 查询运货单列表 */
|
|
58
|
+
interface GetWaybillList {
|
|
59
|
+
/** 页码 */
|
|
60
|
+
pageIndex: number;
|
|
61
|
+
/** 每页数量 */
|
|
62
|
+
pageSize?: number;
|
|
63
|
+
/** 运货单号 */
|
|
64
|
+
num?: string;
|
|
65
|
+
/** 配货单号 */
|
|
66
|
+
allocationOrderId?: string;
|
|
67
|
+
/** 门店入库单号 */
|
|
68
|
+
storeStockInOrderId?: string;
|
|
69
|
+
/** 快递公司编码 */
|
|
70
|
+
carrier?: number;
|
|
71
|
+
}
|
|
72
|
+
/** 配货单单独写入运货单 */
|
|
73
|
+
interface WriteWaybill {
|
|
74
|
+
/** 配货单ID */
|
|
75
|
+
allocationOrderId: string;
|
|
76
|
+
/** 快递单号 */
|
|
77
|
+
num: string;
|
|
78
|
+
/** 快递公司编码 */
|
|
79
|
+
carrier: number;
|
|
80
|
+
}
|
|
81
|
+
/** 运货单公司编码列表 */
|
|
82
|
+
interface GetCarrierList {
|
|
83
|
+
/** 页码 */
|
|
84
|
+
pageIndex: number;
|
|
85
|
+
/** 每页数量 */
|
|
86
|
+
pageSize: number;
|
|
87
|
+
/** 关键词 */
|
|
88
|
+
keyword?: string;
|
|
89
|
+
}
|
|
90
|
+
/** 门店入库单列表 */
|
|
91
|
+
interface GetStoreStockInOrderList {
|
|
92
|
+
/** 页码 */
|
|
93
|
+
pageIndex: number;
|
|
94
|
+
/** 每页数量 */
|
|
95
|
+
pageSize?: number;
|
|
96
|
+
/** 门店id */
|
|
97
|
+
storeId: string;
|
|
98
|
+
/** 入库单状态 */
|
|
99
|
+
logisticStatus: number;
|
|
100
|
+
/** 入库单生成日期-介于开始时间 */
|
|
101
|
+
start?: number;
|
|
102
|
+
/** 入库单生成日期-介于结束时间 */
|
|
103
|
+
end?: string;
|
|
104
|
+
}
|
|
105
|
+
/** 门店入库单详情商品列表 */
|
|
106
|
+
interface GetStoreStockInOrderDetailList {
|
|
107
|
+
/** 门店入库单ID */
|
|
108
|
+
storeStockInOrderId: string;
|
|
109
|
+
/** 页码 */
|
|
110
|
+
pageIndex: number;
|
|
111
|
+
/** 每页数量 */
|
|
112
|
+
pageSize?: number;
|
|
113
|
+
}
|
|
114
|
+
/** 门店入库单运货单物流信息列表 */
|
|
115
|
+
interface GetStoreStockInOrderLogisticsList {
|
|
116
|
+
/** 门店入库单ID */
|
|
117
|
+
storeStockInOrderId: string;
|
|
118
|
+
}
|
|
119
|
+
/** 门店入库单商品列表 */
|
|
120
|
+
interface GetProductList {
|
|
121
|
+
/** 页码 */
|
|
122
|
+
pageIndex: number;
|
|
123
|
+
/** 每页数量 */
|
|
124
|
+
pageSize?: number;
|
|
125
|
+
/** 门店入库单ID */
|
|
126
|
+
storeStockInOrderId: string;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
namespace Response {
|
|
130
|
+
/** 运货单列表 */
|
|
131
|
+
interface GetWaybillList {
|
|
132
|
+
/** 运货单总数 */
|
|
133
|
+
total: number;
|
|
134
|
+
/** 运货单列表 */
|
|
135
|
+
data: Logistics[];
|
|
136
|
+
}
|
|
137
|
+
/** 运货单公司编码列表 */
|
|
138
|
+
interface GetCarrierList {
|
|
139
|
+
/** 公司编码总数 */
|
|
140
|
+
total: number;
|
|
141
|
+
/** 公司编码列表 公司名称->公司代码 */
|
|
142
|
+
data: Record<string, number>;
|
|
143
|
+
}
|
|
144
|
+
/** 门店入库单列表 */
|
|
145
|
+
interface GetStoreStockInOrderList {
|
|
146
|
+
/** 门店入库单总数 */
|
|
147
|
+
total: number;
|
|
148
|
+
/** 入库单列表 */
|
|
149
|
+
data: StockInOrder[];
|
|
150
|
+
}
|
|
151
|
+
/** 门店入库单详情 */
|
|
152
|
+
interface GetStoreStockInOrderDetailList {
|
|
153
|
+
/** 入库单详情 */
|
|
154
|
+
stockInOrder: StockInOrder;
|
|
155
|
+
}
|
|
156
|
+
/** 门店入库单商品列表 */
|
|
157
|
+
interface GetProductList {
|
|
158
|
+
/** 总数 */
|
|
159
|
+
total: number;
|
|
160
|
+
/** 商品列表 */
|
|
161
|
+
data: Product[];
|
|
162
|
+
}
|
|
163
|
+
/** 门店入库单运货单物流信息列表 */
|
|
164
|
+
interface GetStoreStockInOrderLogisticsList {
|
|
165
|
+
/** 入库单运单信息列表 */
|
|
166
|
+
data: GetTrackingInfoAccepted;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
interface LogisticsController {
|
|
170
|
+
/** 批量导入运货单 */
|
|
171
|
+
batchImportWaybill(request: Request.BatchImportWaybill, req?: FastifyRequest): Promise<void>;
|
|
172
|
+
/** 查询运货单列表 */
|
|
173
|
+
getWaybillList(request: Request.GetWaybillList, req?: FastifyRequest): Promise<Response.GetWaybillList>;
|
|
174
|
+
/** 配货单单独写入运货单 */
|
|
175
|
+
writeWaybill(request: Request.WriteWaybill, req?: FastifyRequest): Promise<void>;
|
|
176
|
+
/** 运货单公司编码列表 */
|
|
177
|
+
getCarrierList(request: Request.GetCarrierList, req?: FastifyRequest): Promise<Response.GetCarrierList>;
|
|
178
|
+
/** 门店入库单列表 */
|
|
179
|
+
getStoreStockInOrderList(request: Request.GetStoreStockInOrderList, req?: FastifyRequest): Promise<Response.GetStoreStockInOrderList>;
|
|
180
|
+
/** 门店入库单详情商品列表 */
|
|
181
|
+
getStoreStockInOrderDetailList(request: Request.GetStoreStockInOrderDetailList, req?: FastifyRequest): Promise<Response.GetStoreStockInOrderDetailList>;
|
|
182
|
+
/** 门店入库单运货单物流信息列表 */
|
|
183
|
+
getStoreStockInOrderLogisticsList(request: Request.GetStoreStockInOrderLogisticsList, req?: FastifyRequest): Promise<Response.GetStoreStockInOrderLogisticsList>;
|
|
184
|
+
/** 门店入库单商品列表 */
|
|
185
|
+
getProductList(request: Request.GetProductList, req?: FastifyRequest): Promise<Response.GetProductList>;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PreAllocationOrderTypes } from './types';
|
|
2
|
+
import BaseService from '../BaseService';
|
|
3
|
+
declare class PreAllocationOrderService extends BaseService implements PreAllocationOrderTypes.PreAllocationOrderController {
|
|
4
|
+
protected prefixUrl: string;
|
|
5
|
+
/**
|
|
6
|
+
* 上传预配货单Excel
|
|
7
|
+
*/
|
|
8
|
+
uploadExcel(request: PreAllocationOrderTypes.Request.UploadExcel): Promise<PreAllocationOrderTypes.Response.UploadExcel>;
|
|
9
|
+
/**
|
|
10
|
+
* 查询上传记录列表
|
|
11
|
+
*/
|
|
12
|
+
queryUploadExcelList(request: PreAllocationOrderTypes.Request.QueryUploadExcelList): Promise<PreAllocationOrderTypes.Response.QueryUploadExcelList>;
|
|
13
|
+
/**
|
|
14
|
+
* 撤回上传记录
|
|
15
|
+
*/
|
|
16
|
+
repealUploadExcel(request: PreAllocationOrderTypes.Request.RepealUploadExcel): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export declare const preAllocationOrderService: PreAllocationOrderService;
|
|
19
|
+
export default preAllocationOrderService;
|
|
@@ -0,0 +1,60 @@
|
|
|
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.preAllocationOrderService = void 0;
|
|
16
|
+
const tsoa_1 = require("tsoa");
|
|
17
|
+
const http_1 = require("../../utils/http");
|
|
18
|
+
const BaseService_1 = __importDefault(require("../BaseService"));
|
|
19
|
+
let PreAllocationOrderService = class PreAllocationOrderService extends BaseService_1.default {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.prefixUrl = '/pre-allocation-order';
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 上传预配货单Excel
|
|
26
|
+
*/
|
|
27
|
+
uploadExcel(request) {
|
|
28
|
+
return (0, http_1.callApi)(this.getApiUrl(this.uploadExcel), request);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 查询上传记录列表
|
|
32
|
+
*/
|
|
33
|
+
queryUploadExcelList(request) {
|
|
34
|
+
return (0, http_1.callApi)(this.getApiUrl(this.queryUploadExcelList), request);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 撤回上传记录
|
|
38
|
+
*/
|
|
39
|
+
repealUploadExcel(request) {
|
|
40
|
+
return (0, http_1.callApi)(this.getApiUrl(this.repealUploadExcel), request);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, tsoa_1.Post)('upload-excel'),
|
|
45
|
+
__param(0, (0, tsoa_1.Body)())
|
|
46
|
+
], PreAllocationOrderService.prototype, "uploadExcel", null);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, tsoa_1.Post)('query-upload-excel-list'),
|
|
49
|
+
__param(0, (0, tsoa_1.Body)())
|
|
50
|
+
], PreAllocationOrderService.prototype, "queryUploadExcelList", null);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, tsoa_1.Post)('repeal-upload-excel'),
|
|
53
|
+
__param(0, (0, tsoa_1.Body)())
|
|
54
|
+
], PreAllocationOrderService.prototype, "repealUploadExcel", null);
|
|
55
|
+
PreAllocationOrderService = __decorate([
|
|
56
|
+
(0, tsoa_1.Route)('PreAllocationOrder'),
|
|
57
|
+
(0, tsoa_1.Tags)('preAllocationOrder')
|
|
58
|
+
], PreAllocationOrderService);
|
|
59
|
+
exports.preAllocationOrderService = new PreAllocationOrderService();
|
|
60
|
+
exports.default = exports.preAllocationOrderService;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ENUM } from '../../enum';
|
|
2
|
+
export declare namespace PreAllocationOrderTypes {
|
|
3
|
+
/** 实体定义 */
|
|
4
|
+
namespace Entity {
|
|
5
|
+
/** 预配货单上传Excel记录 */
|
|
6
|
+
interface PreAllocationOrderUploadExcel {
|
|
7
|
+
id: string;
|
|
8
|
+
fileName: string;
|
|
9
|
+
fileUrl: string;
|
|
10
|
+
operator: string;
|
|
11
|
+
status: ENUM.PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM.STATUS;
|
|
12
|
+
statusName: string;
|
|
13
|
+
errorMsg?: string;
|
|
14
|
+
createdAt: number;
|
|
15
|
+
updatedAt: number;
|
|
16
|
+
isDisplayRepeal: boolean;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/** 请求参数定义 */
|
|
20
|
+
namespace Request {
|
|
21
|
+
/** 上传Excel */
|
|
22
|
+
interface UploadExcel {
|
|
23
|
+
excelUrl: string;
|
|
24
|
+
operator: string;
|
|
25
|
+
fileName: string;
|
|
26
|
+
}
|
|
27
|
+
/** 查询上传Excel列表 */
|
|
28
|
+
interface QueryUploadExcelList {
|
|
29
|
+
pageIndex: number;
|
|
30
|
+
pageSize: number;
|
|
31
|
+
operator?: string;
|
|
32
|
+
fileName?: string;
|
|
33
|
+
status?: ENUM.PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM.STATUS;
|
|
34
|
+
createdTimeStart?: number;
|
|
35
|
+
createdTimeEnd?: number;
|
|
36
|
+
}
|
|
37
|
+
/** 撤回上传记录 */
|
|
38
|
+
interface RepealUploadExcel {
|
|
39
|
+
id: string;
|
|
40
|
+
operator: string;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/** 响应结果定义 */
|
|
44
|
+
namespace Response {
|
|
45
|
+
/** 上传Excel响应 */
|
|
46
|
+
interface UploadExcel {
|
|
47
|
+
errorList: Array<{
|
|
48
|
+
row: number;
|
|
49
|
+
errors: string[];
|
|
50
|
+
}>;
|
|
51
|
+
}
|
|
52
|
+
/** 查询上传Excel列表响应 */
|
|
53
|
+
interface QueryUploadExcelList {
|
|
54
|
+
list: Entity.PreAllocationOrderUploadExcel[];
|
|
55
|
+
total: number;
|
|
56
|
+
}
|
|
57
|
+
/** 撤回上传记录响应 */
|
|
58
|
+
interface RepealUploadExcel {
|
|
59
|
+
success: boolean;
|
|
60
|
+
message?: string;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/** PreAllocationOrder Controller 接口定义 */
|
|
64
|
+
interface PreAllocationOrderController {
|
|
65
|
+
/** 上传预配货单Excel */
|
|
66
|
+
uploadExcel(request: PreAllocationOrderTypes.Request.UploadExcel): Promise<PreAllocationOrderTypes.Response.UploadExcel>;
|
|
67
|
+
/** 查询上传记录列表 */
|
|
68
|
+
queryUploadExcelList(request: PreAllocationOrderTypes.Request.QueryUploadExcelList): Promise<PreAllocationOrderTypes.Response.QueryUploadExcelList>;
|
|
69
|
+
/** 撤回上传记录 */
|
|
70
|
+
repealUploadExcel(request: PreAllocationOrderTypes.Request.RepealUploadExcel): Promise<void>;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StoreStockInTypes } from './types';
|
|
2
2
|
import BaseService from '../BaseService';
|
|
3
|
-
declare class StoreStockInService extends BaseService {
|
|
3
|
+
declare class StoreStockInService extends BaseService implements StoreStockInTypes.StoreStockInController {
|
|
4
4
|
protected prefixUrl: string;
|
|
5
5
|
stockIn(request: StoreStockInTypes.Request.StockIn): Promise<void>;
|
|
6
6
|
detail(request: StoreStockInTypes.Request.GetDetail): Promise<StoreStockInTypes.Response.GetDetail>;
|
|
@@ -8,6 +8,7 @@ declare class StoreStockInService extends BaseService {
|
|
|
8
8
|
earlyComplete(request: StoreStockInTypes.Request.EarlyComplete): Promise<void>;
|
|
9
9
|
delete(request: StoreStockInTypes.Request.Delete): Promise<void>;
|
|
10
10
|
detailList(request: StoreStockInTypes.Request.IDetailList): Promise<StoreStockInTypes.Response.IDetailList>;
|
|
11
|
+
getStockInProducts(request: StoreStockInTypes.Request.GetStockInProducts): Promise<StoreStockInTypes.Response.GetStockInProducts>;
|
|
11
12
|
}
|
|
12
13
|
export declare const storeStockInService: StoreStockInService;
|
|
13
14
|
export default storeStockInService;
|
|
@@ -39,6 +39,9 @@ let StoreStockInService = class StoreStockInService extends BaseService_1.defaul
|
|
|
39
39
|
detailList(request) {
|
|
40
40
|
return (0, http_1.callApi)(this.getApiUrl(this.detailList), request);
|
|
41
41
|
}
|
|
42
|
+
getStockInProducts(request) {
|
|
43
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getStockInProducts), request);
|
|
44
|
+
}
|
|
42
45
|
};
|
|
43
46
|
__decorate([
|
|
44
47
|
(0, tsoa_1.Post)('stock-in'),
|
|
@@ -64,6 +67,10 @@ __decorate([
|
|
|
64
67
|
(0, tsoa_1.Post)('detail-list'),
|
|
65
68
|
__param(0, (0, tsoa_1.Body)())
|
|
66
69
|
], StoreStockInService.prototype, "detailList", null);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, tsoa_1.Post)('get-stock-in-products'),
|
|
72
|
+
__param(0, (0, tsoa_1.Body)())
|
|
73
|
+
], StoreStockInService.prototype, "getStockInProducts", null);
|
|
67
74
|
StoreStockInService = __decorate([
|
|
68
75
|
(0, tsoa_1.Route)('StoreStockIn'),
|
|
69
76
|
(0, tsoa_1.Tags)('storeStockIn')
|
|
@@ -118,6 +118,10 @@ export declare namespace StoreStockInTypes {
|
|
|
118
118
|
status?: string;
|
|
119
119
|
deliveryMode?: number;
|
|
120
120
|
}
|
|
121
|
+
/** 店长查看入库单商品数据请求 */
|
|
122
|
+
interface GetStockInProducts {
|
|
123
|
+
targetId: string;
|
|
124
|
+
}
|
|
121
125
|
}
|
|
122
126
|
/** 响应定义 */
|
|
123
127
|
namespace Response {
|
|
@@ -149,6 +153,8 @@ export declare namespace StoreStockInTypes {
|
|
|
149
153
|
创建时间: string;
|
|
150
154
|
收货时间?: string;
|
|
151
155
|
状态?: string;
|
|
156
|
+
productId?: string;
|
|
157
|
+
skuId?: string;
|
|
152
158
|
商品名称?: string;
|
|
153
159
|
规格名称?: string;
|
|
154
160
|
规格编码?: string;
|
|
@@ -165,6 +171,21 @@ export declare namespace StoreStockInTypes {
|
|
|
165
171
|
data: IDetailListItem[];
|
|
166
172
|
headerMap: string[];
|
|
167
173
|
}
|
|
174
|
+
/** 入库单商品项 */
|
|
175
|
+
interface StockInProductItem {
|
|
176
|
+
productId: string;
|
|
177
|
+
productName: string;
|
|
178
|
+
skuId: string;
|
|
179
|
+
skuCode: string;
|
|
180
|
+
specName?: string;
|
|
181
|
+
actualSentQuantity: number;
|
|
182
|
+
receivedQuantity: number;
|
|
183
|
+
productImage: string;
|
|
184
|
+
}
|
|
185
|
+
/** 店长查看入库单商品数据响应 */
|
|
186
|
+
interface GetStockInProducts {
|
|
187
|
+
products: StockInProductItem[];
|
|
188
|
+
}
|
|
168
189
|
}
|
|
169
190
|
/** StoreStockIn Controller 接口定义 */
|
|
170
191
|
interface StoreStockInController {
|
|
@@ -180,5 +201,7 @@ export declare namespace StoreStockInTypes {
|
|
|
180
201
|
delete(request: StoreStockInTypes.Request.Delete): Promise<void>;
|
|
181
202
|
/** 获取详情列表 */
|
|
182
203
|
detailList(request: StoreStockInTypes.Request.IDetailList): Promise<StoreStockInTypes.Response.IDetailList>;
|
|
204
|
+
/** 店长查看入库单商品数据 */
|
|
205
|
+
getStockInProducts(request: StoreStockInTypes.Request.GetStockInProducts): Promise<StoreStockInTypes.Response.GetStockInProducts>;
|
|
183
206
|
}
|
|
184
207
|
}
|
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.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "EcommercePlanAllocationService Node.js SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"@fastify/request-context": "6.2.1",
|
|
14
14
|
"axios": "1.13.2",
|
|
15
15
|
"axios-retry": "4.0.0",
|
|
16
|
+
"fastify": "5.6.2",
|
|
16
17
|
"uuid": "9.0.1",
|
|
17
18
|
"tsoa": "^6.6.0"
|
|
18
19
|
},
|