This commit is contained in:
2026-03-10 10:52:48 +08:00
parent f2b8f2f6de
commit adaa774236
4 changed files with 64 additions and 54 deletions

View File

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

View File

@@ -31,7 +31,7 @@
</div>
</div>
<div style="flex: 1;">
<div id="chartsMain" style="height: 300px;padding: 20px 0;"></div>
<!-- <div id="chartsMain" style="height: 300px;padding: 20px 0;"></div> -->
</div>
</div>
<el-divider style="margin-top: 0;" />
@@ -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({

View File

@@ -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();

View File

@@ -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) => {