| | |
| | | result: this.inspectionResultForm[0].result |
| | | } |
| | | if (pro > 0) { |
| | | this.$prompt('请输入不合格数量', '不合格数量', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | inputPattern: /^\d+$/, |
| | | inputErrorMessage: '请输入正确数字格式' |
| | | }).then(({ value }) => { |
| | | obj.number = value |
| | | updateFinishedInspectById(obj).then(res => { |
| | | if(res.data.data.indexOf("成功") > 0){ |
| | | this.$message.success("上报成功"); |
| | | this.checkTestState() |
| | | }else{ |
| | | this.$message.warning(res.data.data) |
| | | } |
| | | }); |
| | | }).catch(() => {}); |
| | | obj.number = 1; |
| | | updateFinishedInspectById(obj).then(res => { |
| | | if(res.data.data.indexOf("成功") > 0){ |
| | | this.$message.success("上报成功"); |
| | | this.checkTestState() |
| | | }else{ |
| | | this.$message.warning(res.data.data) |
| | | } |
| | | }); |
| | | // this.$prompt('请输入不合格数量', '不合格数量', { |
| | | // confirmButtonText: '确定', |
| | | // cancelButtonText: '取消', |
| | | // inputPattern: /^\d+$/, |
| | | // inputErrorMessage: '请输入正确数字格式' |
| | | // }).then(({ value }) => { |
| | | // obj.number = value |
| | | // updateFinishedInspectById(obj).then(res => { |
| | | // if(res.data.data.indexOf("成功") > 0){ |
| | | // this.$message.success("上报成功"); |
| | | // this.checkTestState() |
| | | // }else{ |
| | | // this.$message.warning(res.data.data) |
| | | // } |
| | | // }); |
| | | // }).catch(() => {}); |
| | | }else{ |
| | | updateFinishedInspectById(obj).then(res => { |
| | | if(res.data.data.indexOf("成功") > 0){ |
| | |
| | | if(obj.inspectionValue){ |
| | | arr = obj.inspectionValue.split(",") |
| | | } |
| | | obj.empiricalValueAddss = arr |
| | | this.$set(obj,'empiricalValueAddss',arr) |
| | | // obj.empiricalValueAddss = arr |
| | | if(obj.note){ |
| | | snote=obj.inote |
| | | } |
| | | // obj.inote=obj.note |
| | | this.$set(obj,'inote',obj.note) |
| | | }else{ |
| | | this.$set(obj,'inote',null) |
| | | } |
| | | if(arr.length > this.empiricalValueAdd){ |
| | | this.empiricalValueAdd = arr.length |
| | | } |
| | |
| | | arr.splice((arr.length-1),1) |
| | | let obj = { |
| | | devideId: i.eId, |
| | | fpid: row.iid, |
| | | fpid: i.iid, |
| | | inspectionValue: arr.join(","), |
| | | note : i.inote |
| | | } |
| | |
| | | } else { |
| | | if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) { |
| | | this.empiricalValueAdd = this.empiricalValueAdd - 1; |
| | | // this.changeRowResult() |
| | | this.changeRowResult() |
| | | this.inspectionItems.forEach(i => { |
| | | i.empiricalValueAddss.splice(this.empiricalValueAdd, 1); |
| | | }); |