王震
2023-12-29 b3cdb967634dddba8a88bca2550f7e07c9ac262c
src/views/quality/finishedProductInspection/finishedProduct-form.vue
@@ -298,7 +298,7 @@
                mcode: null,
                prname: null,
                sname: null,
                orderNumber: "ZTTIC20230001",
                orderNumber: null,
                qualityTraceability: null,
                quantity: null,
                specificationsModel: null,
@@ -337,7 +337,6 @@
        this.deviceCode = false
      },
      getDeviceResultInfo(val){
        console.log("扫描后数据",val);
        let id=val.split("id@")[1]
        if(id!=undefined&&id!=''&&id!=null){
            let filterData=this.deviceList.filter(item=>{
@@ -348,7 +347,7 @@
        this.updateDevice(this.row)
        }else{
        this.$message({
          message: '未识别出二位码计量器具信息!',
          message: '未识别出计量器具信息!',
          type: 'warning'
        });
        }
@@ -486,14 +485,30 @@
                        }
                    })
                    this.inspectionItems = result.children
                    let rVal = ''
                    let passNum = 0
                    let unPassNum = 0
                    this.inspectionItems.forEach(item => {
                        if (item.children) {
                            item.children.forEach(obj => {
                                if(obj.iresult == 0){
                                    unPassNum += 1
                                }
                                if(obj.iresult == 1){
                                    passNum+=1
                                }
                            })
                        }
                    })
                    rVal = (passNum+unPassNum)>0 ? unPassNum>0 ? '0' :'1' : ''
                    this.inspectionResultForm = [{
                        materialCode: result.materialCode,
                        material: result.material,
                        userName: Array.from(new Set(userList)).join(","),
                        result: this.resultVal==null ? '' : this.resultVal,
                        result: this.resultVal==null ? rVal : this.resultVal,
                    }]
                }).catch(error=>{
                    console.log(error)
                    console.error(error)
                })
            }
        },