liufumingren fd3228eac3 refactor(warehouse): 盘点列表/详情拆分复用组件并新增库位明细子页
- 抽出 inventoryCount-comps/:countModel 纯函数 + 记录卡片/工具栏/汇总面板/搜索面板/明细面板/宫格/添加商品弹窗等

- 新增 pages/warehouse/inventoryCountLocation 库位明细子页(workDataDetail + 扫码预填添加商品 + 左滑删除记录)

- apis.js 补 result / workData / workDataDetail / recordDelete / addDetail / addLocationDetail 别名

- pages.json 注册新页面
2026-10-05 02:47:24 +08:00

798 lines
17 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 接口列表文件
*/
export default {
/** 系统(免登录) ↓ **/
index: {
// 工作台登录码登录:wms_workbench.login_code 命中返回工作台 token(免登录、免鉴权)
LoginWorkbenchByCode: {
path: "index.LoginWorkbenchByCode",
auth: false,
method: "POST",
isSystemApi: true
},
// 按 token(ye4s 登录临时码)查询用户信息:ye4s_user.tmp_code 命中返回 real_name / wms_account_id(免登录、免鉴权)
queryUserByToken: {
path: "index.queryUserByToken",
auth: false,
method: "POST",
isSystemApi: true
}
},
/** 公共 ↓ **/
common: {
ping: {
path: "index.ping",
auth: false,
method: "POST",
isSystemApi: true
},
store: {
path: "index.loadStores",
auth: false,
method: "POST",
isSystemApi: true
},
getCOSUploadConfig: {
path: "index.getCOSUploadConfig",
auth: true,
method: "POST",
isSystemApi: true
},
uploadSuccessNotify: {
path: "index.uploadSuccessNotify",
auth: true,
method: "POST",
isSystemApi: true
},
getImages: {
path: "index.getImages",
auth: true,
method: "POST",
isSystemApi: true
},
ReferenceFile: {
path: "index.ReferenceFile",
auth: true,
method: "POST",
isSystemApi: true
},
searchSpace: {
path: "index.searchSpace",
auth: true,
method: "POST",
isSystemApi: true
},
recognizeLicensePlate: {
path: "index.recognizeLicensePlate",
auth: true,
method: "POST",
isSystemApi: true
},
listTemplatesByType: {
path: "setting.printTemplate.listTemplatesByType",
auth: true,
method: "POST",
isSystemApi: true
},
toOrder: {
path: "index.toOrder",
auth: true,
method: "POST",
isSystemApi: true
}
},
/** 用户 ↓ **/
user: {
info: {
path: "user.info",
auth: false,
method: "POST",
isSystemApi: true
},
login: {
path: "user.login",
auth: false,
method: "POST",
isSystemApi: true
},
loginByCode: {
path: "user.loginByCode",
auth: false,
method: "POST",
isSystemApi: true
},
changeRole: {
path: "user.changeRole",
auth: true,
method: "POST",
isSystemApi: true
}
},
/** 看板 ↓ **/
dashboard: {
storeStats: {
path: "dashboard.storeStats",
auth: true,
method: "POST",
isSystemApi: true
}
},
/** 仓库 ↓ **/
warehouse: {
getSpaceInfo: {
path: "warehouse.getSpaceInfo",
auth: true,
method: "POST",
isSystemApi: true
}
},
/** 工作台 ↓ **/
workbench: {
list: {
path: "workbench.list",
auth: true,
method: "POST",
isSystemApi: true
},
// 工作台绑定(需登录、需权限):绑定码 code + 工作台ID id,成功返回工作台 token
bind: {
path: "workbench.bind",
auth: true,
method: "POST",
isSystemApi: true
},
// 用工作台 token 获取工作台信息(免登录、免鉴权):token 无效/不存在返回 403
getWorkbenchInfo: {
path: "workbench.getWorkbenchInfo",
auth: false,
method: "POST",
isSystemApi: true
},
bindMember: {
path: "workbench.bindMember",
auth: false,
method: "POST",
isSystemApi: true
},
// 移除工作台成员(免登录、免鉴权,以工作台 token 鉴权):ids 为成员行 id(wms_workbench_member.id)
removeMember: {
path: "workbench.removeMember",
auth: false,
method: "POST",
isSystemApi: true
},
// 工作台条码查询订单(免登录、免鉴权,以工作台 token 鉴权):token + barcode(运单号)
queryOrder: {
path: "workbench.queryOrder",
auth: false,
method: "POST",
isSystemApi: true
},
// 工作台打包上报(免登录、免鉴权,以工作台 token 鉴权):发货单号定位订单创建打包任务
packOrder: {
path: "workbench.packOrder",
auth: false,
method: "POST",
isSystemApi: true
},
// 工作台打包完成(免登录、免鉴权,以工作台 token 鉴权):结束该工作台最后一个未结束打包任务
finishPack: {
path: "workbench.finishPack",
auth: false,
method: "POST",
isSystemApi: true
},
// 工作台班次打包统计(免登录、免鉴权,以工作台 token 鉴权):统计窗口为本地时间当日 08:00 至次日 08:00
getWorkbenchCount: {
path: "workbench.getWorkbenchCount",
auth: false,
method: "POST",
isSystemApi: true
}
},
storage: {
receiving: {
getReceivingList: {
path: "storage.receiving.getReceivingList",
auth: true,
method: "POST",
isSystemApi: true
},
create: {
path: "storage.receiving.create",
auth: true,
method: "POST",
isSystemApi: true
},
get: {
path: "storage.receiving.get",
auth: true,
method: "POST",
isSystemApi: true
},
bindStore: {
path: "storage.receiving.bindStore",
auth: true,
method: "POST",
isSystemApi: true
},
addDetail: {
path: "storage.receiving.addDetail",
auth: true,
method: "POST",
isSystemApi: true
},
deleteDetail: {
path: "storage.receiving.deleteDetail",
auth: true,
method: "POST",
isSystemApi: true
},
detailChange: {
path: "storage.receiving.detailChange",
auth: true,
method: "POST",
isSystemApi: true
},
scanDetail: {
path: "storage.receiving.scanDetail",
auth: true,
method: "POST",
isSystemApi: true
},
cancel: {
path: "storage.receiving.cancel",
auth: true,
method: "POST",
isSystemApi: true
},
completeReceiving: {
path: "storage.receiving.completeReceiving",
auth: true,
method: "POST",
isSystemApi: true
}
},
entry: {
list: {
path: "storage.entry.list",
auth: true,
method: "POST",
isSystemApi: true
},
get: {
path: "storage.entry.get",
auth: true,
method: "POST",
isSystemApi: true
},
containerList: {
path: "storage.entry.containerList",
auth: true,
method: "POST",
isSystemApi: true
},
addItem: {
path: "storage.entry.addItem",
auth: true,
method: "POST",
isSystemApi: true
},
commit: {
path: "storage.entry.commit",
auth: true,
method: "POST",
isSystemApi: true
}
},
inventory: {
list: {
path: "storage.inventory.list",
auth: true,
method: "POST",
isSystemApi: true
},
listBySpaceId: {
path: "storage.inventory.listBySpaceId",
auth: true,
method: "POST",
isSystemApi: true
},
listByStockId: {
path: "storage.inventory.listByStockId",
auth: true,
method: "POST",
isSystemApi: true
},
updateExpiry: {
path: "storage.inventory.updateExpiry",
auth: true,
method: "POST",
isSystemApi: true
},
transferByProduct: {
path: "storage.inventory.transferByProduct",
auth: true,
method: "POST",
isSystemApi: true
},
transferLocation: {
path: "storage.inventory.transferLocation",
auth: true,
method: "POST",
isSystemApi: true
}
},
transaction: {
list: {
path: "storage.transaction.list",
auth: true,
method: "POST",
isSystemApi: true
}
},
directInbound: {
inbound: {
path: "storage.directInbound.inbound",
auth: true,
method: "POST",
isSystemApi: true
},
complete: {
path: "storage.directInbound.complete",
auth: true,
method: "POST",
isSystemApi: true
},
addItem: {
path: "storage.directInbound.addItem",
auth: true,
method: "POST",
isSystemApi: true
},
commit: {
path: "storage.directInbound.commit",
auth: true,
method: "POST",
isSystemApi: true
}
},
/** 库存管理 ↓ **/
management: {
replenishmentDemand: {
path: "storage.management.replenishmentDemand",
auth: true,
method: "POST",
isSystemApi: true
}
}
},
stock: {
search: {
path: "stock.search",
auth: true,
method: "POST",
isSystemApi: true
},
warehouse: {
list: {
path: "stock.warehouse.list",
auth: true,
method: "POST",
isSystemApi: true
},
search: {
path: "stock.warehouse.search",
auth: true,
method: "POST",
isSystemApi: true
},
getProhibitedType: {
path: "stock.warehouse.getProhibitedType",
auth: true,
method: "POST",
isSystemApi: true
},
getStockUnits: {
path: "stock.warehouse.getStockUnits",
auth: true,
method: "POST",
isSystemApi: true
},
checkItemCodeUnique: {
path: "stock.warehouse.checkItemCodeUnique",
auth: true,
method: "POST",
isSystemApi: true
},
getBarcodes: {
path: "stock.warehouse.getBarcodes",
auth: true,
method: "POST",
isSystemApi: true
},
saveWarehouseStockBarcode: {
path: "stock.warehouse.saveWarehouseStockBarcode",
auth: true,
method: "POST",
isSystemApi: true
},
saveWarehouseStock: {
path: "stock.warehouse.saveWarehouseStock",
auth: true,
method: "POST",
isSystemApi: true
}
}
},
/** 库存盘点 ↓ */
check: {
// 盘点任务列表:按当前用户仓库限定范围,支持 status/store_id/keyword 筛选与分页
list: {
path: "stock.check.list",
auth: true,
method: "POST",
isSystemApi: true
},
// 盘点任务明细:返回主表 check + 全部明细 rows(含账面/实盘/差异数量)
detail: {
path: "stock.check.detail",
auth: true,
method: "POST",
isSystemApi: true
},
// 盘点明细结果(按范围行聚合作业记录):返回 { check, rows, total },
// rows 含已盘/差异聚合 + 作业记录/库位/未知商品;无状态限制(已完成任务也能拉)
result: {
path: "stock.check.result",
auth: true,
method: "POST",
isSystemApi: true
},
// 盘点作业数据:入参 id + is_goods + keyword + pagination;视图由任务范围与 is_goods 驱动
// (库位任务一律 location 视图;商品任务默认 space 聚合库位视图,is_goods=true 为 goods 商品视图)
// keyword 仅 location 视图生效(按 location_code/location_name 模糊匹配后分页)
// 仅任务状态 approved/checking 可拉取,其他状态返回 400
workData: {
path: "stock.check.workData",
auth: true,
method: "POST",
isSystemApi: true
},
// 单条盘点明细的作业数据(workData 单行版,仅库位任务明细):
// 入参仅 detail_id(兼容 detailId),warehouse_id 由服务端注入;
// 返回 data 为单行 location 结构(detail_id/location_id/location_code/location_name/
// status/has_unknown/is_empty/checked_at/checkers/goods),仅 approved/checking 可拉取
workDataDetail: {
path: "stock.check.workDataDetail",
auth: true,
method: "POST",
isSystemApi: true
},
// 盘点作业上报:单条明细实盘数量(quantity>=0 整数)
report: {
path: "stock.check.report",
auth: true,
method: "POST",
isSystemApi: true
},
// 删除盘点作业记录(批量:record_ids 数组,单次≤200,兼容单值 recordId/record_id)
// 仅 approved/checking 允许;查不到的 ID 计入 skipped_ids 不报错;删除后重算进度、主表状态不回退
recordDelete: {
path: "stock.check.recordDelete",
auth: true,
method: "POST",
isSystemApi: true
},
// 完成盘点作业:主表置 completed
finish: {
path: "stock.check.finish",
auth: true,
method: "POST",
isSystemApi: true
},
// 提交审核:created/rejected → submitted
submit: {
path: "stock.check.submit",
auth: true,
method: "POST",
isSystemApi: true
},
// 取消盘点任务:created/submitted/rejected → cancelled
cancel: {
path: "stock.check.cancel",
auth: true,
method: "POST",
isSystemApi: true
},
// 添加盘点明细(按任务盘点类型决定维度):商品任务传 stock_ids;
// 库位任务传 locations/location_ids(location_ids 优先),type=all 两者都不传则自动拉全仓启用库位
// 仅 created/rejected 允许;已存在的盘点项自动跳过(幂等);完成后重算主表 total_items
addDetail: {
path: "stock.check.addDetail",
auth: true,
method: "POST",
isSystemApi: true
},
// 批量添加库位明细(兼容入口,转调 addDetail 的库位ID直查路径)
addLocationDetail: {
path: "stock.check.addLocationDetail",
auth: true,
method: "POST",
isSystemApi: true
}
},
pick: {
query: {
path: "pick.query",
auth: true,
method: "POST",
isSystemApi: true
},
wavePickTaskCurrent: {
path: "pick.wavePickTaskCurrent",
auth: true,
method: "POST",
isSystemApi: true
},
wavePickTaskDetail: {
path: "pick.wavePickTaskDetail",
auth: true,
method: "POST",
isSystemApi: true
},
wavePickTaskSubmit: {
path: "pick.wavePickTaskSubmit",
auth: true,
method: "POST",
isSystemApi: true
},
wavePickTaskComplete: {
path: "pick.wavePickTaskComplete",
auth: true,
method: "POST",
isSystemApi: true
},
waveClaimScan: {
path: "pick.waveClaimScan",
auth: true,
method: "POST",
isSystemApi: true
},
items: {
path: "pick.items",
auth: true,
method: "POST",
isSystemApi: true
},
complete: {
path: "pick.complete",
auth: true,
method: "POST",
isSystemApi: true
}
},
pickCart: {
scan: {
path: "pickCart.scan",
auth: true,
method: "POST",
isSystemApi: true
},
list: {
path: "pickCart.list",
auth: true,
method: "POST",
isSystemApi: true
},
bindTaskCart: {
path: "pickCart.bindTaskCart",
auth: true,
method: "POST",
isSystemApi: true
}
},
order: {
print: {
getWavePlatformPrintData: {
path: "order.print.getWavePlatformPrintData",
auth: true,
method: "POST",
isSystemApi: true
},
getPrintDataByWaybillCodes: {
path: "order.print.getPrintDataByWaybillCodes",
auth: true,
method: "POST",
isSystemApi: true
},
getOrderPrintData: {
path: "order.print.getOrderPrintData",
auth: true,
method: "POST",
isSystemApi: true
},
unlockWavePlatformPrintDataByGroup: {
path: "order.print.unlockWavePlatformPrintDataByGroup",
auth: true,
method: "POST",
isSystemApi: true
}
},
wave: {
batchList: {
path: "order.wave.batchList",
auth: true,
method: "POST",
isSystemApi: true
},
confirmPrintUnclaimedWaveCount: {
path: "order.wave.confirmPrintUnclaimedWaveCount",
auth: true,
method: "POST",
isSystemApi: true
},
wavePickTaskList: {
path: "order.wave.wavePickTaskList",
auth: true,
method: "POST",
isSystemApi: true
},
waveStrategyList: {
path: "order.wave.waveStrategyList",
auth: true,
method: "POST",
isSystemApi: true
},
waveStrategyFetchPda: {
path: "order.wave.waveStrategyFetchPda",
auth: true,
method: "POST",
isSystemApi: true
},
wavePickTaskCancelSelf: {
path: "order.wave.wavePickTaskCancelSelf",
auth: true,
method: "POST",
isSystemApi: true
}
},
pendingOrder: {
list: {
path: "index.toOrder",
auth: true,
method: "POST",
isSystemApi: true
},
detail: {
path: "order.detail",
auth: true,
method: "POST",
isSystemApi: true
},
allocateSubOrderNumber: {
path: "order.pendingOrder.allocateSubOrderNumber",
auth: true,
method: "POST",
isSystemApi: true
}
},
recheckOrder: {
recheckOrderList: {
path: "order.recheckOrder.recheckOrderList",
auth: true,
method: "POST",
isSystemApi: true
},
queryRecheckOrderSingleList: {
path: "order.recheckOrder.queryRecheckOrderSingleList",
auth: true,
method: "POST",
isSystemApi: true
},
scanTask: {
path: "order.recheckOrder.scanTask",
auth: true,
method: "POST",
isSystemApi: true
},
scanOrder: {
path: "order.recheckOrder.scanOrder",
auth: true,
method: "POST",
isSystemApi: true
},
confirmRecheck: {
path: "order.recheckOrder.confirmRecheck",
auth: true,
method: "POST",
isSystemApi: true
},
updateExpressWeighingWeight: {
path: "order.updateExpressWeighingWeight",
auth: true,
method: "POST",
isSystemApi: true
},
interceptScan: {
path: "order.recheckOrder.interceptScan",
auth: true,
method: "POST",
isSystemApi: true
},
confirmIntercept: {
path: "order.recheckOrder.confirmIntercept",
auth: true,
method: "POST",
isSystemApi: true
}
},
deliveryOrder: {
list: {
path: "order.deliveryOrder.list",
auth: true,
method: "POST",
isSystemApi: true
},
detail: {
path: "order.deliveryOrder.detail",
auth: true,
method: "POST",
isSystemApi: true
}
},
detail: {
path: "order.detail",
auth: true,
method: "POST",
isSystemApi: true
},
bindExpressPackageMaterialByWaybill: {
path: "order.bindExpressPackageMaterialByWaybill",
auth: true,
method: "POST",
isSystemApi: true
}
},
print: {
getList: {
path: "print.getList",
auth: true,
method: "POST",
isSystemApi: true
},
getComputerPrinter: {
path: "print.getComputerPrinter",
auth: true,
method: "POST",
isSystemApi: true
},
send:{
path: "print.send",
auth: true,
method: "POST",
isSystemApi: true
}
},
setting: {
packageMaterial: {
search: {
path: "setting.packageMaterial.search",
auth: true,
method: "POST",
isSystemApi: true
}
}
},
/** 退件登记 ↓ **/
returnReceived: {
create: {
path: "returnReceived.create",
auth: true,
method: "POST",
isSystemApi: true
}
}
};