优化
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 开始盘点
|
// 开始盘点
|
||||||
export function getTaskCount(query) {
|
export function getTaskCount(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/statistics/count',
|
// url: '/statistics/count',
|
||||||
method: 'get',
|
url: '/MatchScan/countByWarehouseAndScene',
|
||||||
params: query
|
method: 'post',
|
||||||
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1;">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<el-divider style="margin-top: 0;" />
|
<el-divider style="margin-top: 0;" />
|
||||||
@@ -176,7 +176,8 @@ const handleView = (row) => {
|
|||||||
const scanTotal = ref("")
|
const scanTotal = ref("")
|
||||||
const getTotal = () => {
|
const getTotal = () => {
|
||||||
let obj = {
|
let obj = {
|
||||||
taskId: taskId.value
|
warehouseCode: deviceObj.value.warehouseCode,
|
||||||
|
sceneId: deviceObj.value.sceneId,
|
||||||
}
|
}
|
||||||
getTaskCount(obj).then(res => {
|
getTaskCount(obj).then(res => {
|
||||||
scanTotal.value = res.data
|
scanTotal.value = res.data
|
||||||
@@ -193,7 +194,7 @@ const startScan = async (formEl) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
let chartInt = ref("")
|
// let chartInt = ref("")
|
||||||
const status = ref(0) // 盘点状态
|
const status = ref(0) // 盘点状态
|
||||||
const statusList = ref(
|
const statusList = ref(
|
||||||
[
|
[
|
||||||
@@ -271,49 +272,49 @@ const getMatchData = () => {
|
|||||||
matchStatus.value = 2
|
matchStatus.value = 2
|
||||||
getResultList()
|
getResultList()
|
||||||
// 渲染图表
|
// 渲染图表
|
||||||
let chartObj = {
|
// let chartObj = {
|
||||||
ids: arr,
|
// ids: arr,
|
||||||
}
|
// }
|
||||||
getChart(chartObj).then(res => {
|
// getChart(chartObj).then(res => {
|
||||||
console.log(res.data)
|
// console.log(res.data)
|
||||||
chartInt.value.setOption({
|
// chartInt.value.setOption({
|
||||||
title: {
|
// title: {
|
||||||
text: '本次共计盘点到' + res.data.total + "个库位(库位货品数如下表)",
|
// text: '本次共计盘点到' + res.data.total + "个库位(库位货品数如下表)",
|
||||||
},
|
// },
|
||||||
tooltip: {
|
// tooltip: {
|
||||||
trigger: 'axis',
|
// trigger: 'axis',
|
||||||
axisPointer: {
|
// axisPointer: {
|
||||||
type: 'shadow'
|
// type: 'shadow'
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
grid: {
|
// grid: {
|
||||||
left: '3%',
|
// left: '3%',
|
||||||
right: '4%',
|
// right: '4%',
|
||||||
bottom: '3%',
|
// bottom: '3%',
|
||||||
containLabel: true
|
// containLabel: true
|
||||||
},
|
// },
|
||||||
xAxis: {
|
// xAxis: {
|
||||||
type: 'category',
|
// type: 'category',
|
||||||
data: res.data.xdata,
|
// data: res.data.xdata,
|
||||||
axisTick: {
|
// axisTick: {
|
||||||
alignWithLabel: true
|
// alignWithLabel: true
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
yAxis: {
|
// yAxis: {
|
||||||
type: 'value'
|
// type: 'value'
|
||||||
},
|
// },
|
||||||
series: [
|
// series: [
|
||||||
{
|
// {
|
||||||
data: res.data.ydata,
|
// data: res.data.ydata,
|
||||||
type: 'bar',
|
// type: 'bar',
|
||||||
showBackground: true,
|
// showBackground: true,
|
||||||
backgroundStyle: {
|
// backgroundStyle: {
|
||||||
color: 'rgba(180, 180, 180, 0.2)'
|
// color: 'rgba(180, 180, 180, 0.2)'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -493,7 +494,7 @@ const stopTask = () => {
|
|||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
chartInt.value = markRaw(echarts.init(document.getElementById('chartsMain')))
|
// chartInt.value = markRaw(echarts.init(document.getElementById('chartsMain')))
|
||||||
taskId.value = route.query.taskId
|
taskId.value = route.query.taskId
|
||||||
getTotal()
|
getTotal()
|
||||||
// chartInt.value.setOption({
|
// chartInt.value.setOption({
|
||||||
|
|||||||
@@ -413,8 +413,12 @@ function handleHistory(row) {
|
|||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
function handleExport(row) {
|
function handleExport(row) {
|
||||||
let taskId = row.id
|
// let taskId = row.id
|
||||||
proxy.download('/MatchScan/export', {taskId}, `${row.taskName}_${new Date().getTime()}.xlsx`)
|
let obj = {
|
||||||
|
sceneId: row.sceneId,
|
||||||
|
warehouseCode: row.warehouseCode,
|
||||||
|
}
|
||||||
|
proxy.download('/MatchScan/exportInventory', obj, `${row.taskName}_${new Date().getTime()}.xlsx`)
|
||||||
}
|
}
|
||||||
|
|
||||||
getList();
|
getList();
|
||||||
|
|||||||
@@ -144,7 +144,11 @@ const getHistoryInfo = () => {
|
|||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
function handleExport() {
|
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) => {
|
const handleQueryInfo = (tab) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user