diff --git a/src/views/base/stationDefectRelation/index.vue b/src/views/base/stationDefectRelation/index.vue
index 1d3f48f..cb652ac 100644
--- a/src/views/base/stationDefectRelation/index.vue
+++ b/src/views/base/stationDefectRelation/index.vue
@@ -24,7 +24,7 @@
plain
icon="el-icon-plus"
size="mini"
- @click="handleAdd"
+ @click="handleBatchAdd"
v-hasPermi="['base:stationDefectRelation:add']"
>新增
@@ -186,6 +186,36 @@
取 消
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -217,6 +247,7 @@ export default {
title: "",
// 是否显示弹出层
open: false,
+ batchOpen: false,
// 查询参数
queryParams: {
pageNum: 1,
@@ -230,7 +261,8 @@ export default {
createdBy: null,
createdTime: null,
updatedBy: null,
- updatedTime: null
+ updatedTime: null,
+ defectCodeList: [],
},
// 表单参数
form: {},
@@ -278,6 +310,7 @@ export default {
// 取消按钮
cancel() {
this.open = false;
+ this.batchOpen = false;
this.reset();
},
// 表单重置
@@ -320,6 +353,12 @@ export default {
this.open = true;
this.title = "添加质检工位/缺陷维护";
},
+ handleBatchAdd() {
+ this.reset();
+ this.form.stationCode = this.queryParams.stationCode;
+ this.batchOpen = true;
+ this.title = "添加质检工位/缺陷维护";
+ },
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
@@ -338,12 +377,14 @@ export default {
updateStationDefectRelation(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
+ this.batchOpen = false;
this.getList();
});
} else {
addStationDefectRelation(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
+ this.batchOpen = false;
this.getList();
});
}
diff --git a/src/views/report/codeBandingReport/index.vue b/src/views/report/codeBandingReport/index.vue
index 44caa42..43b8c9d 100644
--- a/src/views/report/codeBandingReport/index.vue
+++ b/src/views/report/codeBandingReport/index.vue
@@ -43,6 +43,14 @@
@keyup.enter.native="handleQuery"
/>
+
+
+
+
+
+
+
+
+
{
//分页查询
this.total = response?.total || 0
diff --git a/src/views/report/qualityDefectsStatisticalAnalysisReport/index.vue b/src/views/report/qualityDefectsStatisticalAnalysisReport/index.vue
index 52f20c8..def498c 100644
--- a/src/views/report/qualityDefectsStatisticalAnalysisReport/index.vue
+++ b/src/views/report/qualityDefectsStatisticalAnalysisReport/index.vue
@@ -82,6 +82,7 @@
+
@@ -128,13 +129,15 @@
-
+
-
+
-
+
-
+
+
+
@@ -222,7 +225,8 @@ export default {
{key: 4, label: `质检工位编号`, visible: false},
{key: 5, label: `质检工位名称`, visible: true},
{key: 6, label: `检测数不合格数`, visible: true},
- {key: 7, label: `合格率(%)`, visible: true}
+ {key: 7, label: `合格率(%)`, visible: true},
+ {key: 8, label: `合计数量`, visible: true},
],
// 产线选项
productLineList: [],
@@ -317,6 +321,16 @@ export default {
endBeginTime: this.queryParams.endBeginTime
}).then(response => {
this.qualityDefectstList = response.data
+ const resultList = Object.values(response.data.reduce((acc, item) => {
+ const defectName = item.QUALITY_DEFECT_NAME;
+ acc[defectName] = acc[defectName] || {
+ QUALITY_DEFECT_NAME: defectName,
+ DEFECT_NUMBER: 0
+ };
+ acc[defectName].DEFECT_NUMBER += item.DEFECT_NUMBER;
+ return acc;
+ }, {}));
+
this.form.PRODUCT_LINE_NAME = row.PRODUCT_LINE_NAME
this.form.STATION_NAME = row.STATION_NAME
this.open = true
@@ -338,7 +352,7 @@ export default {
// xAxis: [
// {
// type: 'category',
- // data: response.data.map(val => val.QUALITY_DEFECT_NAME),
+ // data: resultList.map(val => val.QUALITY_DEFECT_NAME),
// axisTick: {
// alignWithLabel: true,
// },
@@ -392,7 +406,7 @@ export default {
// ]),
// },
// },
- // data: response.data.map(val => val.DEFECT_NUMBER),
+ // data: resultList.map(val => val.DEFECT_NUMBER),
// }
// ]
// })
@@ -405,7 +419,7 @@ export default {
name: '缺陷名称',
type: 'pie',
radius: '60%',
- data: response.data.map(e=>{
+ data: resultList.map(e=>{
return {
name:e.QUALITY_DEFECT_NAME,
value:e.DEFECT_NUMBER