feat(wms报表): 添加正品率显示并优化异常统计
在报表模板中添加正品率(passRate2)显示项 重构getLossList调用逻辑,改为在getList完成后调用 优化calc.js中的异常统计计算,添加各异常库占比数据
This commit is contained in:
@@ -62,6 +62,8 @@
|
||||
<el-descriptions-item label="损耗率">{{ summary.lossRate }}</el-descriptions-item>
|
||||
<!-- 异常率 -->
|
||||
<el-descriptions-item label="异常率">{{ summary.abRate }}</el-descriptions-item>
|
||||
<!-- 正品率 -->
|
||||
<el-descriptions-item label="正品率">{{ summary.passRate2 }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<!-- 异常统计 -->
|
||||
@@ -229,7 +231,7 @@ export default {
|
||||
// 统一查询入口(兼容回车和按钮点击)
|
||||
handleQuery() {
|
||||
this.getList()
|
||||
this.getLossList()
|
||||
// this.getLossList()
|
||||
},
|
||||
// 核心查询逻辑
|
||||
getList() {
|
||||
@@ -264,7 +266,8 @@ export default {
|
||||
computedWidth: parseFloat(width),
|
||||
}
|
||||
})
|
||||
this.loading = false
|
||||
this.getLossList()
|
||||
// this.loading = false
|
||||
})
|
||||
},
|
||||
async getLossList() {
|
||||
@@ -333,7 +336,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getLossList()
|
||||
// this.getLossList()
|
||||
this.loadColumns()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,8 @@
|
||||
<el-descriptions-item label="损耗率">{{ summary.lossRate }}</el-descriptions-item>
|
||||
<!-- 异常率 -->
|
||||
<el-descriptions-item label="异常率">{{ summary.abRate }}</el-descriptions-item>
|
||||
<!-- 正品率 -->
|
||||
<el-descriptions-item label="正品率">{{ summary.passRate2 }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<!-- 异常统计 -->
|
||||
@@ -259,7 +261,7 @@ export default {
|
||||
// 统一查询入口(兼容回车和按钮点击)
|
||||
handleQuery() {
|
||||
this.getList()
|
||||
this.getLossList()
|
||||
// this.getLossList()
|
||||
},
|
||||
// 核心查询逻辑
|
||||
getList() {
|
||||
@@ -294,7 +296,9 @@ export default {
|
||||
computedWidth: parseFloat(width),
|
||||
}
|
||||
})
|
||||
this.loading = false
|
||||
// this.loading = false
|
||||
this.getLossList()
|
||||
// this.loading = false
|
||||
})
|
||||
},
|
||||
async getLossList() {
|
||||
@@ -363,7 +367,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getLossList()
|
||||
// this.getLossList()
|
||||
this.loadColumns()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,8 @@
|
||||
<el-descriptions-item label="成品率">{{ summary.passRate }}</el-descriptions-item>
|
||||
<el-descriptions-item label="损耗率">{{ summary.lossRate }}</el-descriptions-item>
|
||||
<el-descriptions-item label="异常率">{{ summary.abRate }}</el-descriptions-item>
|
||||
<!-- 正品率 -->
|
||||
<el-descriptions-item label="正品率">{{ summary.passRate2 }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions title="异常统计" :column="4" border>
|
||||
@@ -243,7 +245,7 @@ export default {
|
||||
},
|
||||
handleQuery() {
|
||||
this.getList();
|
||||
this.getLossList();
|
||||
// this.getLossList();
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
@@ -273,7 +275,9 @@ export default {
|
||||
computedWidth: parseFloat(width),
|
||||
}
|
||||
});
|
||||
this.loading = false;
|
||||
// this.loading = false;
|
||||
this.getLossList()
|
||||
// this.loading = false;
|
||||
}).catch(err => {
|
||||
console.error('查询失败:', err);
|
||||
this.loading = false;
|
||||
@@ -349,7 +353,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
this.getLossList();
|
||||
// this.getLossList();
|
||||
this.loadColumns();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -62,6 +62,8 @@
|
||||
<el-descriptions-item label="损耗率">{{ summary.lossRate }}</el-descriptions-item>
|
||||
<!-- 异常率 -->
|
||||
<el-descriptions-item label="异常率">{{ summary.abRate }}</el-descriptions-item>
|
||||
<!-- 正品率 -->
|
||||
<el-descriptions-item label="正品率">{{ summary.passRate2 }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<!-- 异常统计 -->
|
||||
@@ -238,7 +240,7 @@ export default {
|
||||
// 统一查询入口(兼容回车和按钮点击)
|
||||
handleQuery() {
|
||||
this.getList()
|
||||
this.getLossList()
|
||||
// this.getLossList()
|
||||
},
|
||||
// 核心查询逻辑
|
||||
getList() {
|
||||
@@ -273,7 +275,9 @@ export default {
|
||||
computedWidth: parseFloat(width),
|
||||
}
|
||||
})
|
||||
this.loading = false
|
||||
// this.loading = false
|
||||
this.getLossList()
|
||||
// this.loading = false
|
||||
})
|
||||
},
|
||||
async getLossList() {
|
||||
@@ -342,7 +346,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getLossList()
|
||||
// this.getLossList()
|
||||
this.loadColumns()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user