diff --git a/hb_client/src/components/customForm/review.vue b/hb_client/src/components/customForm/review.vue index 5b91572..78cadc0 100644 --- a/hb_client/src/components/customForm/review.vue +++ b/hb_client/src/components/customForm/review.vue @@ -333,10 +333,10 @@ checkForm:{}, originForm:{}, testrecord:{ - form:this.formID, + // form:this.formID, record_data:[], is_testok:true, - wproduct:null, + // wproduct:null, }, origin_test:null, canvas:null, @@ -804,6 +804,7 @@ // that.testrecord.wproduct = that.wproductId;//半成品ID // that.testrecord.is_submited = true; that.testrecord.id = that.recordId; + debugger; if(submit){//提交 this.$emit('recordSubmit',that.testrecord); }else {//保存 diff --git a/hb_client/src/views/wpm/need.vue b/hb_client/src/views/wpm/need.vue index 58b5fab..3664c2c 100644 --- a/hb_client/src/views/wpm/need.vue +++ b/hb_client/src/views/wpm/need.vue @@ -295,6 +295,7 @@ :hasPicture="hasPicture" :wproduct="wproduct" :recordId="recordId" + @recordSave="recordSave" @recordSubmit="recordSubmit" @recordCancel="recordCancel" /> @@ -751,15 +752,18 @@ }, //半产品复检 handleReview() { + debugger; let that = this; testInit({ wproduct: this.wproduct,form: that.recordform}).then((response) => { if (response.data) { + debugger; that.hasPicture = false; - that.formName = response.data.name; - let fieldList = response.data.form_fields; + that.recordId = response.data.id; + that.formName = response.data.form_.name; + let fieldList = response.data.record_data; that.fieldList = [...fieldList]; that.origintest = response.data.origin_test; - that.recordform = response.data.origin_test_.form; + // that.recordform = response.data.origin_test_.form; let originList = response.data.origin_test_.record_data; that.originList = [...originList]; let arr = fieldList.filter(item => { @@ -775,6 +779,7 @@ //根据选择的表,渲染检查项目 submitrecordform(index) { + debugger; let that = this; this.outerVisible = false; if (that.recordform != "") { @@ -800,6 +805,7 @@ } }); }else if(index==='2'){//复检 + debugger; that.handleReview(); } } else this.$message.error("请选择检查表!"); @@ -858,14 +864,17 @@ }, //保存检查项目 recordSave(value) { + debugger; let that = this; let id = value.id; let params = {}; params.record_data = value.record_data; params.is_testok = value.is_testok; putTestRecordItem(id,params).then((res) => { + debugger; if (res.code >= 200) { that.recordVisible = false; + that.limitedReview = false; that.getList(); that.getList2(); that.getList1(); @@ -890,6 +899,8 @@ subTestRecordItem(id,params).then((res) => { if (res.code >= 200) { that.recordVisible = false; + that.limitedReview = false; + that.limitedCheckRecord = false; that.getList(); that.getList2(); that.getList1();