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 @@