47 lines
1.4 KiB
JavaScript
47 lines
1.4 KiB
JavaScript
'use strict';
|
||
|
||
const MainService = require('../../main');
|
||
|
||
/**
|
||
* 系统方法层:storage.delivery(兼容层)。
|
||
* 历史调用兼容:统一转发到 storage.stockout,避免继续以 delivery 命名承载非订单出库语义。
|
||
*/
|
||
class StorageDeliveryService extends MainService {
|
||
constructor(ctx) {
|
||
super(ctx);
|
||
const _noNeedLogin = '';
|
||
const _noNeedRight = 'list,toOrder,listItems';
|
||
const _noNeedLog = 'list,toOrder,listItems';
|
||
const _noNeedAuth = 'list,toOrder,listItems';
|
||
this.systemInit(_noNeedLogin, _noNeedRight, _noNeedLog, _noNeedAuth);
|
||
}
|
||
|
||
/**
|
||
* 出库单列表查询(兼容转发)。
|
||
* @param {Object} data 请求体
|
||
* @return {Promise<Object>} 出库单列表结果
|
||
*/
|
||
async list(data = {}) {
|
||
return await this.ctx.service.systemMethods.storage.stockout.list(data);
|
||
}
|
||
|
||
/**
|
||
* 出库单跳转订单占位接口(兼容转发)。
|
||
* @return {Promise<Object>} 占位失败结果
|
||
*/
|
||
async toOrder() {
|
||
return await this.ctx.service.systemMethods.storage.stockout.toOrder();
|
||
}
|
||
|
||
/**
|
||
* 拉取出库单明细(兼容转发)。
|
||
* @param {Object} data 请求体
|
||
* @return {Promise<Object>} 订单/出库单明细结果
|
||
*/
|
||
async listItems(data = {}) {
|
||
return await this.ctx.service.systemMethods.storage.stockout.listItems(data);
|
||
}
|
||
}
|
||
|
||
module.exports = StorageDeliveryService;
|