diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue index 7fce2a5f..f9450d48 100644 --- a/src/views/wpm_bx/mlog_detail.vue +++ b/src/views/wpm_bx/mlog_detail.vue @@ -919,6 +919,20 @@ export default { }, //表单提交方法 mlogSubmit() { + let that = this; + if(that.route_code=='tuomoceliang'){ + let canSubmit = this.$refs.checkTable.hasNull(); + console.log('canSubmit',canSubmit) + if(canSubmit){ + that.submitFun(); + }else{ + that.$message.error('有未填的检测项,请完善后提交。'); + } + }else{ + that.submitFun(); + } + }, + submitFun(){ let that = this; that.isSaveing = true; that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => { diff --git a/src/views/wpm_bx/mlogbw_check_table.vue b/src/views/wpm_bx/mlogbw_check_table.vue index 08c63a0f..059cd0a6 100644 --- a/src/views/wpm_bx/mlogbw_check_table.vue +++ b/src/views/wpm_bx/mlogbw_check_table.vue @@ -1100,6 +1100,18 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => { this.$message.error("导入失败,请重新尝试"); }); }, + hasNull(){ + let that = this; + let canSubmit = true; + that.mlogbwlist.forEach(item=>{ + that.qct_testitems.forEach(testitem=>{ + if(item[testitem.testitem_name]==null||item[testitem.testitem_name]==''||item[testitem.testitem_name]==undefined){ + canSubmit = false; + } + }) + }) + return canSubmit; + }, }, };