diff --git a/src/views/activiti/form/ProcessMaterialWarehousingForm.vue b/src/views/activiti/form/ProcessMaterialWarehousingForm.vue index f457366..78cb553 100644 --- a/src/views/activiti/form/ProcessMaterialWarehousingForm.vue +++ b/src/views/activiti/form/ProcessMaterialWarehousingForm.vue @@ -472,6 +472,20 @@ if (res.result.materialType == 1) { this.isTargetLibrary = true } + if (res.result.materialType!=6){ + if (res.result.planType==1){ + this.isIfDirect=true + //isIfInspection + if (res.result.ifDirect==1){ + this.isIfInspection=true + } + }else { + this.isIfDirect=false + } + + }else { + this.isIfDirect=false + } let formData = res.result formData.tableName = r.tableName this.data = formData @@ -521,6 +535,19 @@ } else {//总库没有目标库 formData.targetLibrary = null } + if(formData.planType==1 && formData.materialType !=6){ + if (!formData.ifDirect){ + this.$message.error('请选择是否属于直达物资!') + return + }else { + if(formData.ifDirect==1){ + if (!formData.ifInspection){ + this.$message.error('请选择是否需要送检!') + return + } + } + } + } console.log('格式化后的数据', formData) this.form.validateFields((err, values) => { if (!err) { @@ -586,7 +613,19 @@ } } formData.describes = this.describes - + if(formData.planType==1 && formData.materialType !=6){ + if (!formData.ifDirect){ + this.$message.error('请选择是否属于直达物资!') + return + }else { + if(formData.ifDirect==1){ + if (!formData.ifInspection){ + this.$message.error('请选择是否需要送检!') + return + } + } + } + } this.form.validateFields((err, values) => { if (!err) { formData.procDefId = this.processData.id