| | |
| | | doInsOrder: "/insOrderPlan/doInsOrder", //执行检验操作 |
| | | saveInsContext: "/insOrderPlan/saveInsContext", //保存检验内容 |
| | | saveInsContext2: "/insOrderPlan/saveInsContext2", //保存检验内容--电路试验 |
| | | saveInsContext2s: "/insOrderPlan/saveInsContext2s", //保存检验内容--电路试验--一次性保存 |
| | | saveInsContext3: "/insOrderPlan/saveInsContext3", //保存检验内容--温湿度检验 |
| | | deleteInsContext: "/insOrderPlan/deleteInsContext", //删除频段 |
| | | deleteInsContext2: "/insOrderPlan/deleteInsContext2", //删除频点 |
| | |
| | | </el-drawer> |
| | | <el-dialog title="检验复核" :visible.sync="reviewDia" width="500px"> |
| | | <div class="body" style="display: flex;padding: 10px;" v-if="reviewDia"> |
| | | <div class="search_label" style="width: 150px;"><span class="required-span">* </span>不通过的理由:</div> |
| | | <div class="search_label" style="width: 150px;"><span class="required-span">* </span>再次试验的理由:</div> |
| | | <div class="search_input" style="width: 100%;"> |
| | | <el-input size="small" clearable v-model="noReason" type="textarea" :autosize="{ minRows: 4}"></el-input> |
| | | </div> |
| | |
| | | this.addVerifyDia = true |
| | | } |
| | | }, |
| | | handleSubmit(){ |
| | | async handleSubmit(){ |
| | | if(!this.otherForm.temperature){ |
| | | this.$message.error('请输入温度') |
| | | return |
| | |
| | | this.$message.error('请输入湿度') |
| | | return |
| | | } |
| | | if(this.sonLaboratory === '电路试验'&&!this.$refs.CircuitParameters.saveAll()){ |
| | | if(this.sonLaboratory === '电路试验'&&!(await this.$refs.CircuitParameters.saveAll())){ |
| | | return |
| | | } |
| | | this.experimentDia = true |
| | |
| | | } |
| | | } |
| | | }, |
| | | beforeUpload(file) { |
| | | async beforeUpload(file) { |
| | | if(this.sonLaboratory === '电路试验'&&!this.$refs.CircuitParameters.allBandList.find(m=>m.band)){ |
| | | this.$message.error('上传附件前请先填写并保存频段'); |
| | | return false |
| | | }else{ |
| | | this.$refs.CircuitParameters.saveAll() |
| | | await this.$refs.CircuitParameters.saveAll() |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('上传文件不超过10M'); |
| | | this.$refs.upload.clearFiles() |
| | |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | if(this.$refs.CircuitParameters.saveAll()){ |
| | | }).then(async () => { |
| | | if(await this.$refs.CircuitParameters.saveAll()){ |
| | | this.$emit('goback') |
| | | } |
| | | }) |
| | |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | saveAll(){ |
| | | async saveAll(){ |
| | | if(this.allBandList.find(m=>!m.band)){ |
| | | this.$message.error('请先填写频段') |
| | | return false |
| | | }else{ |
| | | let arr0 = [] |
| | | this.allBandList.forEach((h,j)=>{ |
| | | this.save(h,j) |
| | | // this.save(h,j) |
| | | let arr = h.projectList.map(item=>{ |
| | | if(item.portList&&item.portList.length>0){ |
| | | item.value.forEach(m=>{ |
| | | m = m.splice(item.portList.length) |
| | | }) |
| | | } |
| | | let obj = { |
| | | insProductId:item.id, |
| | | equipValue:this.insProductNew.find(m=>m.id==item.id).equipValue, |
| | | equipName:this.insProductNew.find(m=>m.id==item.id).equipName, |
| | | port:item.portList.map(m=>m.value).join(','), |
| | | angle:item.angleList.map(m=>m.value).join(','), |
| | | value:JSON.stringify(item.value), |
| | | often:item.often |
| | | } |
| | | return obj |
| | | }) |
| | | let obj0 = { |
| | | sampleId:this.orderId, |
| | | sonLaboratory:h.projectList[0].sonLaboratory, |
| | | frequency:h.band, |
| | | insProductResult2s:arr |
| | | } |
| | | arr0.push(obj0) |
| | | }) |
| | | return true |
| | | let res = await this.$axios.post(this.$api.insOrderPlan.saveInsContext2s, {insProductResultDtos:arr0 |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs:true}) |
| | | if(res.code===201){ |
| | | this.$message.error('保存失败') |
| | | return false |
| | | }else{ |
| | | this.$message.success('已保存') |
| | | return true |
| | | } |
| | | } |
| | | }, |
| | | // 更新模板 |
| | |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | saveAll(){ |
| | | async saveAll(){ |
| | | if(this.allBandList.find(m=>!m.band)){ |
| | | this.$message.error('请先填写频段') |
| | | return false |
| | | }else{ |
| | | let arr0 = [] |
| | | this.allBandList.forEach((h,j)=>{ |
| | | this.save(h,j) |
| | | // this.save(h,j) |
| | | let arr = h.projectList.map(item=>{ |
| | | if(item.portList&&item.portList.length>0){ |
| | | item.value.forEach(m=>{ |
| | | m = m.splice(item.portList.length) |
| | | }) |
| | | } |
| | | let obj = { |
| | | insProductId:item.id, |
| | | equipValue:this.insProductNew.find(m=>m.id==item.id).equipValue, |
| | | equipName:this.insProductNew.find(m=>m.id==item.id).equipName, |
| | | port:item.portList.map(m=>m.value).join(','), |
| | | angle:item.angleList.map(m=>m.value).join(','), |
| | | value:JSON.stringify(item.value), |
| | | often:item.often |
| | | } |
| | | return obj |
| | | }) |
| | | let obj0 = { |
| | | sampleId:this.orderId, |
| | | sonLaboratory:h.projectList[0].sonLaboratory, |
| | | frequency:h.band, |
| | | insProductResult2s:arr |
| | | } |
| | | arr0.push(obj0) |
| | | }) |
| | | return true |
| | | let res = await this.$axios.post(this.$api.insOrderPlan.saveInsContext2s, {insProductResultDtos:arr0 |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs:true}) |
| | | if(res.code===201){ |
| | | this.$message.error('保存失败') |
| | | return false |
| | | }else{ |
| | | this.$message.success('已保存') |
| | | return true |
| | | } |
| | | } |
| | | }, |
| | | // 更新模板 |
| | |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | if(obj.$refs.Inspection.$refs.CircuitParameters.saveAll()){ |
| | | }).then( async () => { |
| | | if(await obj.$refs.Inspection.$refs.CircuitParameters.saveAll()){ |
| | | this.tabs.splice(index, 1); |
| | | let data = this.tabs[this.tabs.length - 1] |
| | | this.upTabActive(data.k) |