JX.Li hace 1 año
padre
commit
69cec79392
Se han modificado 1 ficheros con 12 adiciones y 10 borrados
  1. 12 10
      src/views/zdsz/engineeringIndustry/index.vue

+ 12 - 10
src/views/zdsz/engineeringIndustry/index.vue

@@ -958,16 +958,6 @@ export default {
 
 
     /** 提交按钮 */
     /** 提交按钮 */
     submitForm() {
     submitForm() {
-      this.form.zEngineeringNodeBo = null
-      if (this.zEngineeringNodeBo.type !== '') {
-        this.form.zEngineeringNodeBo = this.zEngineeringNodeBo
-        this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
-      }
-      if (this.form.enginClassification && this.form.enginClassification != [] && this.form.enginClassification.length > 0) {
-        this.form.enginClassification = this.form.enginClassification.join(',');
-      } else {
-        this.form.enginClassification = ""
-      }
       this.$refs["form"].validate(valid => {
       this.$refs["form"].validate(valid => {
         if (valid) {
         if (valid) {
           this.form.files = this.$refs.obsFileUpload.fileList;
           this.form.files = this.$refs.obsFileUpload.fileList;
@@ -975,6 +965,18 @@ export default {
             this.$message.warning('必须上传附件!')
             this.$message.warning('必须上传附件!')
             return
             return
           }
           }
+
+          this.form.zEngineeringNodeBo = null
+          if (this.zEngineeringNodeBo.type !== '') {
+            this.form.zEngineeringNodeBo = this.zEngineeringNodeBo
+            this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
+          }
+          if (this.form.enginClassification && this.form.enginClassification != [] && this.form.enginClassification.length > 0) {
+            this.form.enginClassification = this.form.enginClassification.join(',');
+          } else {
+            this.form.enginClassification = ""
+          }
+
           if (this.form.id == null) {
           if (this.form.id == null) {
             addEngineeEngineeIndustry(this.form).then(res => {
             addEngineeEngineeIndustry(this.form).then(res => {
               this.$modal.msgSuccess("新增成功");
               this.$modal.msgSuccess("新增成功");