|
|
|
@ -364,7 +364,13 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
uploadCount(this.filterQuery).then(res => {
|
|
|
|
|
console.log('res111',res)
|
|
|
|
|
|
|
|
|
|
// 显示加载状态
|
|
|
|
|
const loading = this.$loading({
|
|
|
|
|
lock: true,
|
|
|
|
|
text: '正在统计请稍等...',
|
|
|
|
|
spinner: 'el-icon-loading',
|
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
|
});
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
// this.loading = false
|
|
|
|
|
// this.list = res.data || []
|
|
|
|
@ -391,21 +397,20 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.initStatsChart1();
|
|
|
|
|
this.initStatsChart2();
|
|
|
|
|
// this.initStatsChart2();
|
|
|
|
|
this.initStatsChart3();
|
|
|
|
|
loading.close();
|
|
|
|
|
}else {
|
|
|
|
|
// this.loading = false
|
|
|
|
|
this.$message.error(res.message);
|
|
|
|
|
|
|
|
|
|
loading.close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.total = res.data.total || 0
|
|
|
|
|
// this.panelALive = false
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
// this.loading = false
|
|
|
|
|
// this.list = []
|
|
|
|
|
// this.total = 0
|
|
|
|
|
loading.close();
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
linkPage(path) {
|
|
|
|
@ -607,9 +612,9 @@ export default {
|
|
|
|
|
// 模拟数据,可根据实际情况修改
|
|
|
|
|
var data = [
|
|
|
|
|
{ name: '销售退货', uploaded: this.stats.salesScanCountReturn, total: this.stats.salesScanSumCountReturn },
|
|
|
|
|
{ name: '销售出库', uploaded: this.stats.salesScanSumCount, total: this.stats.salesScanSumCount },
|
|
|
|
|
{ name: '采购退货', uploaded: this.stats.buyerScanSumCountReturn, total: this.stats.buyerScanSumCountReturn },
|
|
|
|
|
{ name: '采购入库', uploaded: this.stats.buyerScanSumCount, total: this.stats.buyerScanSumCount },
|
|
|
|
|
{ name: '销售出库', uploaded: this.stats.salesScanCount, total: this.stats.salesScanSumCount },
|
|
|
|
|
{ name: '采购退货', uploaded: this.stats.buyerScanCountReturn, total: this.stats.buyerScanSumCountReturn },
|
|
|
|
|
{ name: '采购入库', uploaded: this.stats.buyerScanCount, total: this.stats.buyerScanSumCount },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// 处理 y 轴数据
|
|
|
|
@ -646,6 +651,16 @@ export default {
|
|
|
|
|
fontWeight: 'bold' // 字体设置为粗体
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'item',
|
|
|
|
|
formatter: function (params) {
|
|
|
|
|
var index = Math.floor(params.dataIndex / 2);
|
|
|
|
|
var item = data[index];
|
|
|
|
|
var isUploaded = params.dataIndex % 2!== 0;
|
|
|
|
|
var count = isUploaded? item.uploaded : (item.total - item.uploaded);
|
|
|
|
|
return `${params.name}: ${count}`;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
grid: {
|
|
|
|
|
left: '15%',
|
|
|
|
|
top: '5%', // 减小顶部空白区域,可根据需求调整
|
|
|
|
|