licp
2024-05-06 b98bb5a14531d68e3ee1a483a79899de0de47704
src/views/quality/finishedProductInspection/finishedProduct-form.vue
@@ -620,22 +620,31 @@
                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){
@@ -696,10 +705,14 @@
                                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
                                }
@@ -864,7 +877,7 @@
                                arr.splice((arr.length-1),1)
                                let obj = {
                                    devideId: i.eId,
                                    fpid: row.iid,
                                    fpid: i.iid,
                                    inspectionValue: arr.join(","),
                                    note : i.inote
                                }
@@ -885,7 +898,7 @@
            } 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);
                    });