|
@@ -413,7 +413,8 @@
|
|
|
loading: false,
|
|
loading: false,
|
|
|
cacheKeyUrl: 'maindata-25922-recordrules-index',
|
|
cacheKeyUrl: 'maindata-25922-recordrules-index',
|
|
|
typeTree: [],
|
|
typeTree: [],
|
|
|
- treeNode: null
|
|
|
|
|
|
|
+ treeNode: null,
|
|
|
|
|
+ qmsReportWorkType: ['5', '6', '7'],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -517,6 +518,28 @@
|
|
|
return this.$message.warning('请先修改规则停用时间!');
|
|
return this.$message.warning('请先修改规则停用时间!');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ console.log('row~~~~~', row)
|
|
|
|
|
+ if (!this.qmsReportWorkType.includes(row.reportWorkType)) {
|
|
|
|
|
+ if (row.details.length == 0) {
|
|
|
|
|
+ return this.$message.warning('至少条件一条规则项');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (row.reportWorkType == 4) {
|
|
|
|
|
+ // 生产统计过滤掉非成品统计的明细
|
|
|
|
|
+ row.details = row.details.filter(
|
|
|
|
|
+ (i) => i.statisticsType
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 判断参数类型是否选择
|
|
|
|
|
+ for (const detail of row.details) {
|
|
|
|
|
+ if (!detail.paramType) {
|
|
|
|
|
+ console.log('detail', detail);
|
|
|
|
|
+ return this.$message.warning('请选择规则明细中的参数类型!');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
try {
|
|
try {
|
|
|
await recordrulesPublish(row.id);
|
|
await recordrulesPublish(row.id);
|
|
|
this.$message.success('发布成功');
|
|
this.$message.success('发布成功');
|