From adaa77423632df742147360074f91ab17f455832 Mon Sep 17 00:00:00 2001 From: yangzifeng <2547435354@qq.com> Date: Tue, 10 Mar 2026 10:52:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/Inventory/autoInventory.js | 9 +- src/views/Inventory/task/autoInventory.vue | 95 ++++++++++---------- src/views/Inventory/task/index.vue | 8 +- src/views/Inventory/task/inventoryResult.vue | 6 +- 4 files changed, 64 insertions(+), 54 deletions(-) diff --git a/src/api/Inventory/autoInventory.js b/src/api/Inventory/autoInventory.js index 8ff474d..6a955f0 100644 --- a/src/api/Inventory/autoInventory.js +++ b/src/api/Inventory/autoInventory.js @@ -1,11 +1,12 @@ import request from '@/utils/request' // 开始盘点 -export function getTaskCount(query) { +export function getTaskCount(data) { return request({ - url: '/statistics/count', - method: 'get', - params: query + // url: '/statistics/count', + url: '/MatchScan/countByWarehouseAndScene', + method: 'post', + data: data }) } diff --git a/src/views/Inventory/task/autoInventory.vue b/src/views/Inventory/task/autoInventory.vue index 4285120..6c825a2 100644 --- a/src/views/Inventory/task/autoInventory.vue +++ b/src/views/Inventory/task/autoInventory.vue @@ -31,7 +31,7 @@
-
+
@@ -176,7 +176,8 @@ const handleView = (row) => { const scanTotal = ref("") const getTotal = () => { let obj = { - taskId: taskId.value + warehouseCode: deviceObj.value.warehouseCode, + sceneId: deviceObj.value.sceneId, } getTaskCount(obj).then(res => { scanTotal.value = res.data @@ -193,7 +194,7 @@ const startScan = async (formEl) => { }) } -let chartInt = ref("") +// let chartInt = ref("") const status = ref(0) // 盘点状态 const statusList = ref( [ @@ -271,49 +272,49 @@ const getMatchData = () => { matchStatus.value = 2 getResultList() // 渲染图表 - let chartObj = { - ids: arr, - } - getChart(chartObj).then(res => { - console.log(res.data) - chartInt.value.setOption({ - title: { - text: '本次共计盘点到' + res.data.total + "个库位(库位货品数如下表)", - }, - tooltip: { - trigger: 'axis', - axisPointer: { - type: 'shadow' - } - }, - grid: { - left: '3%', - right: '4%', - bottom: '3%', - containLabel: true - }, - xAxis: { - type: 'category', - data: res.data.xdata, - axisTick: { - alignWithLabel: true - } - }, - yAxis: { - type: 'value' - }, - series: [ - { - data: res.data.ydata, - type: 'bar', - showBackground: true, - backgroundStyle: { - color: 'rgba(180, 180, 180, 0.2)' - } - } - ] - }) - }) + // let chartObj = { + // ids: arr, + // } + // getChart(chartObj).then(res => { + // console.log(res.data) + // chartInt.value.setOption({ + // title: { + // text: '本次共计盘点到' + res.data.total + "个库位(库位货品数如下表)", + // }, + // tooltip: { + // trigger: 'axis', + // axisPointer: { + // type: 'shadow' + // } + // }, + // grid: { + // left: '3%', + // right: '4%', + // bottom: '3%', + // containLabel: true + // }, + // xAxis: { + // type: 'category', + // data: res.data.xdata, + // axisTick: { + // alignWithLabel: true + // } + // }, + // yAxis: { + // type: 'value' + // }, + // series: [ + // { + // data: res.data.ydata, + // type: 'bar', + // showBackground: true, + // backgroundStyle: { + // color: 'rgba(180, 180, 180, 0.2)' + // } + // } + // ] + // }) + // }) }) } @@ -493,7 +494,7 @@ const stopTask = () => { const route = useRoute() onMounted(() => { - chartInt.value = markRaw(echarts.init(document.getElementById('chartsMain'))) + // chartInt.value = markRaw(echarts.init(document.getElementById('chartsMain'))) taskId.value = route.query.taskId getTotal() // chartInt.value.setOption({ diff --git a/src/views/Inventory/task/index.vue b/src/views/Inventory/task/index.vue index c1a0c80..3605fea 100644 --- a/src/views/Inventory/task/index.vue +++ b/src/views/Inventory/task/index.vue @@ -413,8 +413,12 @@ function handleHistory(row) { /** 导出按钮操作 */ function handleExport(row) { - let taskId = row.id - proxy.download('/MatchScan/export', {taskId}, `${row.taskName}_${new Date().getTime()}.xlsx`) + // let taskId = row.id + let obj = { + sceneId: row.sceneId, + warehouseCode: row.warehouseCode, + } + proxy.download('/MatchScan/exportInventory', obj, `${row.taskName}_${new Date().getTime()}.xlsx`) } getList(); diff --git a/src/views/Inventory/task/inventoryResult.vue b/src/views/Inventory/task/inventoryResult.vue index 33d080c..f82c778 100644 --- a/src/views/Inventory/task/inventoryResult.vue +++ b/src/views/Inventory/task/inventoryResult.vue @@ -144,7 +144,11 @@ const getHistoryInfo = () => { /** 导出按钮操作 */ function handleExport() { - proxy.download('/MatchScan/export', {taskId: dialogParams.value.taskId}, `盘点结果_${new Date().getTime()}.xlsx`) + let obj = { + warehouseCode:route.query.warehouseCode, + sceneId:route.query.sceneId, + } + proxy.download('/MatchScan/exportInventory', obj, `盘点结果_${new Date().getTime()}.xlsx`) } const handleQueryInfo = (tab) => {