diff --git a/src/api/distribution/createTask.js b/src/api/distribution/createTask.js index feaa60b5..df873a95 100644 --- a/src/api/distribution/createTask.js +++ b/src/api/distribution/createTask.js @@ -223,6 +223,18 @@ export const postExportContrastStockInfo = params => { }); }; +/** + * 已盘点数据导出 + */ +export const postExportPanDataWithPackage = params => { + return request({ + url: '/api/logpm-warehouse/blade-taskQuest/taskQuest/export-panDataWithPackage', + method: 'get', + params, + responseType: 'blob', + }); +}; + /** * 同步数据 */ diff --git a/src/views/distribution/checkInventoryTask/createTask.vue b/src/views/distribution/checkInventoryTask/createTask.vue index 405202f4..c11404f5 100644 --- a/src/views/distribution/checkInventoryTask/createTask.vue +++ b/src/views/distribution/checkInventoryTask/createTask.vue @@ -703,6 +703,7 @@ import { $_getList, $_postBatchDelete, postExportContrastStockInfo, + postExportPanDataWithPackage, postSyncTaskData, getAllDataWithPackage, } from '@/api/distribution/createTask'; @@ -2683,11 +2684,25 @@ const handleUncountedExport = () => { async () => { try { TcPdloading.value = true; - const res = await postExportContrastStockInfo({ - questNum: UncountedDetails.value.questNum, - // InventoryState true是未盘 false是已盘 - questStatus: InventoryState.value ? 0 : 1, - }); + + const res = InventoryState.value + ? // 未盘 + await postExportContrastStockInfo({ + questNum: UncountedDetails.value.questNum, + // InventoryState true是未盘 false是已盘 + questStatus: InventoryState.value ? 0 : 1, + }) + : // 已盘 + await postExportPanDataWithPackage({ + questNum: UncountedDetails.value.questNum, + }); + + // const res = await postExportContrastStockInfo({ + // questNum: UncountedDetails.value.questNum, + // // InventoryState true是未盘 false是已盘 + // questStatus: InventoryState.value ? 0 : 1, + // }); + console.log('res :>> ', res); if (res.status !== 200) return; downloadXls(res.data, `${InventoryState.value ? '未盘点' : '已盘点'}数据.xlsx`);