| | |
| | | // } |
| | | // } |
| | | let sampleList = this.HaveJson(this.sampleList) |
| | | for (let i = 0; i < sampleList.length; i++) { |
| | | if (sampleList[i].insProduct.length > 0) { |
| | | let set = new Set() |
| | | for (let j = 0; j < sampleList[i].insProduct.length; j++) { |
| | | if(sampleList[i].insProduct[j].state == 1){ |
| | | let num0 = set.size |
| | | set.add(sampleList[i].insProduct[j].inspectionItem+'-'+sampleList[i].insProduct[j].inspectionItemSubclass) |
| | | let num1 = set.size |
| | | if(num0==num1){ |
| | | this.$message.error(sampleList[i].insProduct[j].inspectionItem+'-'+sampleList[i].insProduct[j].inspectionItemSubclass+'重复') |
| | | return |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | let projectNum = this.totalArr.filter(a => a.state == 1).length |
| | | if(projectNum==0){ |
| | | this.$confirm('检验项目为空,是否确认提交?', "提示", { |
| | |
| | | this.saveMethod(sampleList) |
| | | }).catch(() => {}) |
| | | }else{ |
| | | let isRTS = this.totalArr.find(a => a.ask != null && this.symbolList.find(b=>a.ask.includes(b)) && a.state == 1) |
| | | let isRTS = this.totalArr.find(a => a.ask != null && this.symbolList.find(b=>a.ask&&a.ask.includes(b)) && a.state == 1) |
| | | if (isRTS&&this.PROJECT=='检测中心') { |
| | | this.editTable = this.handleData(sampleList,this.containsValue, 0) |
| | | this.editTable.forEach(item => { |
| | |
| | | let arr = this.editTable.filter(b => b.sampleId == item.id) |
| | | for (var i=0;i<arr.length;i++){ |
| | | if(a.ask){ |
| | | if(a.ask.includes(arr[i].symbolItem)){ |
| | | if(a.ask&&a.ask.includes(arr[i].symbolItem)){ |
| | | let ask = calBack(a.ask, arr[i].symbolItem,arr[i].value) |
| | | if (ask) { |
| | | a.ask = ask |