1、单据上传页面逻辑优化

20240912_adapter
qiuyt 2 weeks ago
parent 0b50454e08
commit 2edd25b396

@ -364,7 +364,13 @@ export default {
} }
uploadCount(this.filterQuery).then(res => { uploadCount(this.filterQuery).then(res => {
console.log('res111',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) { if (res.code === 20000) {
// this.loading = false // this.loading = false
// this.list = res.data || [] // this.list = res.data || []
@ -391,21 +397,20 @@ export default {
} }
this.initStatsChart1(); this.initStatsChart1();
this.initStatsChart2(); // this.initStatsChart2();
this.initStatsChart3(); this.initStatsChart3();
loading.close();
}else { }else {
// this.loading = false // this.loading = false
this.$message.error(res.message); this.$message.error(res.message);
loading.close();
} }
// this.total = res.data.total || 0 // this.total = res.data.total || 0
// this.panelALive = false // this.panelALive = false
}).catch(() => { }).catch(() => {
// this.loading = false loading.close();
// this.list = []
// this.total = 0
}) })
}, },
linkPage(path) { linkPage(path) {
@ -607,9 +612,9 @@ export default {
// //
var data = [ var data = [
{ name: '销售退货', uploaded: this.stats.salesScanCountReturn, total: this.stats.salesScanSumCountReturn }, { name: '销售退货', uploaded: this.stats.salesScanCountReturn, total: this.stats.salesScanSumCountReturn },
{ name: '销售出库', uploaded: this.stats.salesScanSumCount, total: this.stats.salesScanSumCount }, { name: '销售出库', uploaded: this.stats.salesScanCount, total: this.stats.salesScanSumCount },
{ name: '采购退货', uploaded: this.stats.buyerScanSumCountReturn, total: this.stats.buyerScanSumCountReturn }, { name: '采购退货', uploaded: this.stats.buyerScanCountReturn, total: this.stats.buyerScanSumCountReturn },
{ name: '采购入库', uploaded: this.stats.buyerScanSumCount, total: this.stats.buyerScanSumCount }, { name: '采购入库', uploaded: this.stats.buyerScanCount, total: this.stats.buyerScanSumCount },
]; ];
// y // y
@ -646,6 +651,16 @@ export default {
fontWeight: 'bold' // 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: { grid: {
left: '15%', left: '15%',
top: '5%', // top: '5%', //

Loading…
Cancel
Save