guhongwei 3 years ago
parent
commit
0cf952f9ce

+ 1 - 0
src/views/service/patent/admin/examine/patent.vue

@@ -96,6 +96,7 @@ export default {
     },
     // 查看
     view(data) {
+      if (!data.questions) data.questions = {};
       this.$set(this, `info`, data);
       this.show = true;
     },

+ 1 - 1
src/views/service/patent/admin/examine/patent/list-1.vue

@@ -26,7 +26,7 @@
           <van-col span="24" class="btn">
             <van-button size="small" type="info" @click="view(item)">查看信息</van-button>
             <van-button size="small" type="info" @click="relation(item)">关联申请号</van-button>
-            <van-button size="small" type="info" @click="warning(item)">国知局专利预警</van-button>
+            <van-button size="small" type="info" @click="warning(item)">国知局反馈信息</van-button>
             <van-button size="small" type="info" @click="examine(item)" v-if="item.status == '1'">审核申请</van-button>
           </van-col>
         </van-col>

+ 1 - 0
src/views/service/patent/mech/examine/patent.vue

@@ -58,6 +58,7 @@ export default {
     },
     // 查看
     view(data) {
+      if (!data.questions) data.questions = {};
       this.$set(this, `info`, data);
       this.show = true;
     },

+ 17 - 9
src/views/service/patent/user/apply/analysis/detail.vue

@@ -22,20 +22,30 @@ export default {
   },
   data: function () {
     return {
-      form: {
-        questions: {},
-      },
+      form: {},
     };
   },
   async created() {
-    if (this.id) await this.search();
+    await this.search();
   },
   methods: {
     ...patentanalysis(['fetch', 'create', 'update']),
     async search() {
-      let res = await this.fetch(this.id);
-      if (this.$checkRes(res)) {
-        this.$set(this, `form`, res.data);
+      if (this.id) {
+        let res = await this.fetch(this.id);
+        if (this.$checkRes(res)) {
+          if (!res.data.questions) res.data.questions = {};
+          this.$set(this, `form`, res.data);
+        }
+      } else {
+        let data = this.form;
+        data.user_id = this.user._id;
+        data.apply_name = this.user.name;
+        data.status = '0';
+        data.inventer = this.user.name;
+        data.contact = this.user.name;
+        data.questions = {};
+        this.$set(this, `form`, data);
       }
     },
     async onSubmit({ data }) {
@@ -49,8 +59,6 @@ export default {
           this.$toast({ type: `success`, message: `${res.errmsg}` });
         }
       } else {
-        data.status = '0';
-        data.user_id = this.user._id;
         let res = await this.create(data);
         if (this.$checkRes(res)) {
           this.$toast({ type: `success`, message: `专利分析申请成功` });

+ 9 - 1
src/views/service/patent/user/apply/apply/detail.vue

@@ -35,10 +35,18 @@ export default {
       if (this.id) {
         let res = await this.fetch(this.id);
         if (this.$checkRes(res)) {
+          if (!res.data.questions) res.data.questions = {};
           this.$set(this, `form`, res.data);
         }
       } else {
-        let data = { inventer: [], contact: [], questions: {}, water_number: moment(new Date()).valueOf(), apply_name: this.user.name };
+        let data = {
+          inventer: [{ user_id: this.user._id, name: this.user.name }],
+          contact: [{ user_id: this.user._id, name: this.user.name }],
+          questions: {},
+          water_number: moment(new Date()).valueOf(),
+          apply_name: this.user.name,
+          is_mech: '0',
+        };
         this.$set(this, `form`, data);
       }
     },

+ 9 - 1
src/views/service/patent/user/apply/apply/parts/detail-1.vue

@@ -3,6 +3,7 @@
     <van-row>
       <van-col span="24" class="main">
         <van-form>
+          <van-col :span="24" class="remark">用户申请专利如需所在学校机构进行审核,请选择是;如不需要请选择否;</van-col>
           <van-field name="is_mech" label="是否需要机构" :rules="[{ required: false, message: '请选择' }]">
             <template #input>
               <van-radio-group v-model="form.is_mech" direction="horizontal">
@@ -232,7 +233,7 @@ export default {
         if (admin) {
           this.$set(this, `adminInfo`, admin);
           this.$set(this.form, `admin_id`, admin._id);
-          let arr = await this.query({ role: '2', pid: admin.id });
+          let arr = await this.query({ role: '2', pid: admin.id, code: 'JLKJQYCGD' });
           if (this.$checkRes(res)) {
             this.$set(this, `mechanismList`, arr.data);
           }
@@ -372,4 +373,11 @@ export default {
     }
   }
 }
+// 提醒信息
+.remark {
+  background-color: #ffffff;
+  padding: 8px;
+  font-size: 14px;
+  color: #ff0000;
+}
 </style>