From 73bf350aa0f29d2a8e315573768821c5fd3c23c0 Mon Sep 17 00:00:00 2001 From: yangzifeng <2547435354@qq.com> Date: Wed, 11 Mar 2026 14:59:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9B=98=E7=82=B9=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/inventory.js | 5 ++-- api/request.js | 40 ++++++++++++++-------------- pagesInventory/autoInventory.vue | 2 ++ pagesInventory/handInventory.vue | 8 +++++- pagesInventory/inventoryTask.vue | 1 + pagesInventory/matchResult.vue | 45 +++++++++++++++++++++++++++----- 6 files changed, 72 insertions(+), 29 deletions(-) diff --git a/api/inventory.js b/api/inventory.js index ca29a5f..0035917 100644 --- a/api/inventory.js +++ b/api/inventory.js @@ -32,7 +32,7 @@ const taskList = (params) => { // 每次盘点任务的总条目 const getTaskCount = (params) => { - return request('/statistics/count', params, 'GET') + return request('/MatchScan/countByWarehouseAndScene', params, 'POST') } // 开始盘点 @@ -52,7 +52,8 @@ const stopScan = (params) => { // 盘点结果 const getScanResult = (params) => { - return request('/MatchScan/countList', params, 'GET') + // return request('/MatchScan/countList', params, 'GET') + return request('/MatchScan/inventoryList', params, 'POST') } // 手动盘点-开始匹配 diff --git a/api/request.js b/api/request.js index 4a34761..b90e517 100644 --- a/api/request.js +++ b/api/request.js @@ -16,26 +16,26 @@ const request = (url, data = {}, method = "GET", ContentType = "application/json time: Date.now(), }; if (method !== "GET") { - if (Object.keys(requestRecords).length == 0) { - requestRecords = requestObj; - } else { - const s_url = requestRecords.url; // 请求地址 - const s_data = requestRecords.data; // 请求数据 - const s_time = requestRecords.time; // 请求时间 - if ( - s_data === requestObj.data && - requestObj.time - s_time < INTERCEPT_DURATION && - s_url === requestObj.url - ) { - uni.showToast({ - title: "数据正在处理,请勿重复提交", - icon: "none", - duration: 2000, - }); - return; - } - requestRecords = requestObj; - } + // if (Object.keys(requestRecords).length == 0) { + // requestRecords = requestObj; + // } else { + // const s_url = requestRecords.url; // 请求地址 + // const s_data = requestRecords.data; // 请求数据 + // const s_time = requestRecords.time; // 请求时间 + // if ( + // s_data === requestObj.data && + // requestObj.time - s_time < INTERCEPT_DURATION && + // s_url === requestObj.url + // ) { + // uni.showToast({ + // title: "数据正在处理,请勿重复提交", + // icon: "none", + // duration: 2000, + // }); + // return; + // } + // requestRecords = requestObj; + // } } return new Promise(function (resolve, reject) { diff --git a/pagesInventory/autoInventory.vue b/pagesInventory/autoInventory.vue index 7a02f83..8daef8c 100644 --- a/pagesInventory/autoInventory.vue +++ b/pagesInventory/autoInventory.vue @@ -32,6 +32,8 @@ const getTotal = () => { let obj = { taskId: taskInfo.value.id } + obj.sceneId = uni.getStorageSync("taskInfo").sceneId + obj.warehouseCode = uni.getStorageSync("taskInfo").warehouseCode getTaskCount(obj).then(res => { scanTotal.value = res.data }) diff --git a/pagesInventory/handInventory.vue b/pagesInventory/handInventory.vue index 1c97866..3ef9761 100644 --- a/pagesInventory/handInventory.vue +++ b/pagesInventory/handInventory.vue @@ -21,7 +21,7 @@