diff --git a/src/api/qualityManagement/qualityStatistics_V2.js b/src/api/qualityManagement/qualityStatistics_V2.js
index cef9321..a3d2c10 100644
--- a/src/api/qualityManagement/qualityStatistics_V2.js
+++ b/src/api/qualityManagement/qualityStatistics_V2.js
@@ -51,4 +51,13 @@ export function downloadStatisticsTableExcel(query) {
},
responseType: 'blob'
})
+}
+
+// 获取 首检 倒车雷达数量
+export function getParkingSensorTotal(query) {
+ return request({
+ url: 'mes/qc/statistics/getParkingSensorTotal',
+ method: 'get',
+ params: query,
+ })
}
\ No newline at end of file
diff --git a/src/views/qualityManagement/FQC/qualityStatistics.vue b/src/views/qualityManagement/FQC/qualityStatistics.vue
index 9456b58..95dc956 100644
--- a/src/views/qualityManagement/FQC/qualityStatistics.vue
+++ b/src/views/qualityManagement/FQC/qualityStatistics.vue
@@ -67,13 +67,7 @@
@@ -84,6 +78,8 @@
抛光数:{{ totalPaoguangTotal }}
打磨数:{{ totalDamoTotal }}
报废数:{{ totalBaofeiTotal }}
+ 倒车雷达:{{ parkingSensor }}
+
@@ -250,6 +246,7 @@ import {
GetQualityStatisticsTable_final,
GetQualityStatisticsTable_total,
deleteStatisticsTable,
+ getParkingSensorTotal,
downloadStatisticsTableExcel,
} from '@/api/qualityManagement/qualityStatistics_V2'
export default {
@@ -348,7 +345,10 @@ export default {
},
visibleMethod: this.visibleMethod,
},
- allDataList:[],
+ // 统计数据
+ allDataList: [],
+ // 倒车雷达
+ parkingSensor:0,
// 自适应
screenWidth: '1920px',
screenHeight: '1080px',
@@ -375,28 +375,71 @@ export default {
computed: {
// 投入数
totalQuantity() {
- return this.allDataList.reduce((acc, data) => acc + data.requireNumber, 0) / 3
+ return (
+ this.allDataList.reduce((acc, data) => {
+ if (!data.productDescription.includes('倒车雷达')) {
+ return acc + data.requireNumber
+ } else {
+ return acc
+ }
+ }, 0) / 3
+ )
},
// 合格数
totalQualifiedNumber() {
- return this.allDataList.reduce((acc, data) => acc + data.qualifiedNumber, 0) / 3
+ return (
+ this.allDataList.reduce((acc, data) => {
+ if (!data.productDescription.includes('倒车雷达')) {
+ return acc + data.qualifiedNumber
+ } else {
+ return acc
+ }
+ }, 0) / 3
+ )
},
// 抛光数
totalPaoguangTotal() {
- return this.allDataList.reduce((acc, data) => acc + data.paoguangTotal, 0) / 3
+ return (
+ this.allDataList.reduce((acc, data) => {
+ let str = data.productDescription
+ if (!str.includes('倒车雷达')) {
+ return acc + data.paoguangTotal
+ } else {
+ return acc
+ }
+ }, 0) / 3
+ )
},
// 打磨数
totalDamoTotal() {
- return this.allDataList.reduce((acc, data) => acc + data.damoTotal, 0) / 3
+ return (
+ this.allDataList.reduce((acc, data) => {
+ let str = data.productDescription
+ if (!str.includes('倒车雷达')) {
+ return acc + data.damoTotal
+ } else {
+ return acc
+ }
+ }, 0) / 3
+ )
},
// 报废数
totalBaofeiTotal() {
- return this.allDataList.reduce((acc, data) => acc + data.baofeiTotal, 0) / 3
+ return (
+ this.allDataList.reduce((acc, data) => {
+ let str = data.productDescription
+ if (!str.includes('倒车雷达')) {
+ return acc + data.baofeiTotal
+ } else {
+ return acc
+ }
+ }, 0) / 3
+ )
},
// 总合格率
passRate() {
if (this.totalQuantity > 0) {
- return Math.floor((this.totalQualifiedNumber / this.totalQuantity) * 100) + '%'
+ return Math.ceil((this.totalQualifiedNumber / this.totalQuantity) * 100) + '%'
} else {
return '0%'
}
@@ -530,6 +573,11 @@ export default {
})
break
}
+ getParkingSensorTotal(params).then((res) => {
+ if (res.code == 200) {
+ this.parkingSensor = res.data
+ }
+ })
},
//todo 设置表头颜色