diff --git a/src/views/modules/lab/labRecord.vue b/src/views/modules/lab/labRecord.vue index 014b6b0..7e65655 100644 --- a/src/views/modules/lab/labRecord.vue +++ b/src/views/modules/lab/labRecord.vue @@ -2827,6 +2827,31 @@ export default { this.$message.warning('当前状态不允许保存') return } + const isAddMode = !this.isEditMode + if (isAddMode && !String(this.modalData.applicant || '').trim()) { + this.$message.warning('申请人不能为空') + return + } + if (isAddMode && !String(this.modalData.site || '').trim()) { + this.$message.warning('申请工厂不能为空') + return + } + if (isAddMode && !String(this.modalData.applyDepartment || '').trim()) { + this.$message.warning('申请部门不能为空') + return + } + if (isAddMode && !String(this.modalData.customerId || '').trim()) { + this.$message.warning('客户不能为空') + return + } + if (isAddMode && !String(this.modalData.projectId || '').trim()) { + this.$message.warning('项目不能为空') + return + } + if (isAddMode && !String(this.modalData.sampleName || '').trim()) { + this.$message.warning('样品名称不能为空') + return + } this.syncTesterField() this.syncPropertyItemList() const payload = this.buildLabPayload(this.modalData)