guhongwei 4 years ago
parent
commit
b3ff5e814e
1 changed files with 15 additions and 9 deletions
  1. 15 9
      src/views/notice/productForm.vue

+ 15 - 9
src/views/notice/productForm.vue

@@ -403,17 +403,23 @@ export default {
     // 技术需求提交
     async technologyBtn() {
       let data = this.technologyForm;
-      data.noticeid = this.noticeid;
-      data.type = '0';
-      data.status = '0';
-      let res = await this.create(data);
-      if (this.$checkRes(res)) {
+      if (data.company != null) {
+        data.noticeid = this.noticeid;
+        data.type = '0';
+        data.status = '0';
+        let res = await this.create(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '信息添加成功',
+            type: 'success',
+          });
+          this.technologyForm = {};
+        }
+      } else {
         this.$message({
-          message: '信息添加成功',
-          type: 'success',
+          message: '企业名称&需求名称不能为空哦',
+          type: 'warning',
         });
-        // window.location.reload();
-        this.technologyForm = {};
       }
     },
   },