feat: 禅道323
This commit is contained in:
parent
f93f7d3095
commit
0f0620e8db
|
|
@ -919,6 +919,20 @@ export default {
|
||||||
},
|
},
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
mlogSubmit() {
|
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;
|
let that = this;
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
||||||
|
|
|
||||||
|
|
@ -1100,6 +1100,18 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||||
this.$message.error("导入失败,请重新尝试");
|
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;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue