fix(stocktake): display batch number in scanning dialog and fix empty uncounted items in Excel export

This commit is contained in:
DXC
2026-04-02 19:06:19 +08:00
parent dbcb7d0d92
commit c361d25ea0
2 changed files with 38 additions and 21 deletions

View File

@ -917,9 +917,11 @@ const exportToExcel = async () => {
// ===== 调试结束 =====
ElMessage.info('正在生成盘点报告,请稍候...');
// ★ 传递 session_id 参数,用于导出当前会话的未盘点明细
const sessionParam = currentSessionId.value ? `?session_id=${encodeURIComponent(currentSessionId.value)}` : '';
// 使用项目封装的 request 发送请求,确保自动携带 JWT Token
const res: any = await request({
url: '/v1/inbound/stock/export-stocktake',
url: '/v1/inbound/stock/export-stocktake' + sessionParam,
method: 'get',
responseType: 'blob' as any, // 核心:接收二进制文件流
headers: {