diff --git a/klp-ui/src/views/wms/report/js/calc.js b/klp-ui/src/views/wms/report/js/calc.js
index 79e6d870..b81917a4 100644
--- a/klp-ui/src/views/wms/report/js/calc.js
+++ b/klp-ui/src/views/wms/report/js/calc.js
@@ -25,6 +25,9 @@ const calcSummary = (list, lossList) => {
return item.warehouseId == '2019583656787259393' || item.warehouseId == '2019583325311414274' || item.warehouseId == '2019583429955104769' || item.warehouseId == '2019583137616310273'
}).length / totalCount : 0
+ // 正品率(1-异常率)
+ const passRate2 = totalCount != 0 ? (1 - abRate * totalCount) : 0
+
return {
outCount,
outTotalWeight: outTotalWeight.toFixed(2),
@@ -38,6 +41,7 @@ const calcSummary = (list, lossList) => {
passRate: (passRate * 100)?.toFixed(2) + '%',
lossRate: (lossRate * 100)?.toFixed(2) + '%',
abRate: (abRate * 100)?.toFixed(2) || 0,
+ passRate2: (passRate2 * 100)?.toFixed(2) || 0,
}
}
@@ -45,14 +49,25 @@ const calcAbSummary = (list) => {
// 异常统计,统计四个异常库中的各自的数量和总重
let o = {
jishuCount: 0,
- jishuWeight: 0,
miniCount: 0,
- miniWeight: 0,
rubbishCount: 0,
- rubbishWeight: 0,
returnCount: 0,
+
+ jishuWeight: 0,
+ miniWeight: 0,
+ rubbishWeight: 0,
returnWeight: 0,
+
+ // 计入技术部的钢卷占比
+ jishuRate: 0,
+ // 计入小钢卷库的钢卷占比
+ miniRate: 0,
+ // 计入废品库的钢卷占比
+ rubbishRate: 0,
+ // 计入退货库的钢卷占比
+ returnRate: 0,
}
+ const totalCount = list.length
for (let i = 0; i < list.length; i++) {
// { label: '技术部', value: '2019583656787259393' },
// { label: '小钢卷库', value: '2019583325311414274' },
@@ -83,13 +98,19 @@ const calcAbSummary = (list) => {
}
return [
{ label: '技术部钢卷数', value: o['jishuCount'] },
- { label: '技术部钢卷重量', value: o['jishuWeight'] },
{ label: '小钢卷库钢卷数', value: o['miniCount'] },
- { label: '小钢卷库钢卷重量', value: o['miniWeight'] },
{ label: '废品库钢卷数', value: o['rubbishCount'] },
- { label: '废品库钢卷重量', value: o['rubbishWeight'] },
{ label: '退货库钢卷数', value: o['returnCount'] },
+
+ { label: '技术部钢卷重量', value: o['jishuWeight'] },
+ { label: '小钢卷库钢卷重量', value: o['miniWeight'] },
+ { label: '废品库钢卷重量', value: o['rubbishWeight'] },
{ label: '退货库钢卷重量', value: o['returnWeight'] },
+
+ { label: '技术部占比', value: (o['jishuCount'] / totalCount * 100).toFixed(2) + '%' },
+ { label: '小钢卷库占比', value: (o['miniCount'] / totalCount * 100).toFixed(2) + '%' },
+ { label: '废品库占比', value: (o['rubbishCount'] / totalCount * 100).toFixed(2) + '%' },
+ { label: '退货库占比', value: (o['returnCount'] / totalCount * 100).toFixed(2) + '%' },
]
}
diff --git a/klp-ui/src/views/wms/report/template/day.vue b/klp-ui/src/views/wms/report/template/day.vue
index 88e37c14..6cdcbef6 100644
--- a/klp-ui/src/views/wms/report/template/day.vue
+++ b/klp-ui/src/views/wms/report/template/day.vue
@@ -62,6 +62,8 @@
{{ summary.lossRate }}
{{ summary.abRate }}
+
+ {{ summary.passRate2 }}
@@ -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()
}
}
diff --git a/klp-ui/src/views/wms/report/template/month.vue b/klp-ui/src/views/wms/report/template/month.vue
index d2405d58..45aaf022 100644
--- a/klp-ui/src/views/wms/report/template/month.vue
+++ b/klp-ui/src/views/wms/report/template/month.vue
@@ -62,6 +62,8 @@
{{ summary.lossRate }}
{{ summary.abRate }}
+
+ {{ summary.passRate2 }}
@@ -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()
}
}
diff --git a/klp-ui/src/views/wms/report/template/team.vue b/klp-ui/src/views/wms/report/template/team.vue
index 70e7dd29..6c6dfd14 100644
--- a/klp-ui/src/views/wms/report/template/team.vue
+++ b/klp-ui/src/views/wms/report/template/team.vue
@@ -67,6 +67,8 @@
{{ summary.passRate }}
{{ summary.lossRate }}
{{ summary.abRate }}
+
+ {{ summary.passRate2 }}
@@ -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();
}
};
diff --git a/klp-ui/src/views/wms/report/template/year.vue b/klp-ui/src/views/wms/report/template/year.vue
index ae74bbb9..24911d4b 100644
--- a/klp-ui/src/views/wms/report/template/year.vue
+++ b/klp-ui/src/views/wms/report/template/year.vue
@@ -62,6 +62,8 @@
{{ summary.lossRate }}
{{ summary.abRate }}
+
+ {{ summary.passRate2 }}
@@ -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()
}
}