guhongwei 3 年 前
コミット
361e5b8908
35 ファイル変更873 行追加98 行削除
  1. BIN
      public/数据模板.xlsx
  2. 16 0
      src/router/index.js
  3. 2 0
      src/store/index.js
  4. 1 1
      src/store/upload.js
  5. 1 0
      src/views/service/patent/admin/adminBtn.vue
  6. 64 0
      src/views/service/patent/admin/message/examine.vue
  7. 7 3
      src/views/service/patent/admin/message/notice.vue
  8. 21 7
      src/views/service/patent/admin/message/notice_create.vue
  9. 60 0
      src/views/service/patent/admin/message/parts/form-1.vue
  10. 4 4
      src/views/service/patent/admin/message/parts/list-2.vue
  11. 95 0
      src/views/service/patent/admin/message/parts/list-3.vue
  12. 1 1
      src/views/service/patent/admin/patent/assessment/list-1.vue
  13. 43 3
      src/views/service/patent/admin/patent/info.vue
  14. 2 2
      src/views/service/patent/admin/patent/info/detail-1.vue
  15. 7 1
      src/views/service/patent/admin/patent/info/list-1.vue
  16. 108 0
      src/views/service/patent/admin/patent/info/result-1.vue
  17. 132 0
      src/views/service/patent/admin/patent/info_import.vue
  18. 67 0
      src/views/service/patent/admin/patent/info_result.vue
  19. 5 5
      src/views/service/patent/mech/examine/contract_check.vue
  20. 9 4
      src/views/service/patent/mech/examine/trans.vue
  21. 8 3
      src/views/service/patent/mech/message/notice.vue
  22. 20 6
      src/views/service/patent/mech/message/notice_create.vue
  23. 58 0
      src/views/service/patent/mech/message/parts/form-1.vue
  24. 4 7
      src/views/service/patent/mech/message/parts/list-2.vue
  25. 7 5
      src/views/service/patent/mech/patent/information/index.vue
  26. 1 1
      src/views/service/patent/user/apply/analysis/parts/list-2.vue
  27. 1 1
      src/views/service/patent/user/apply/assessment/parts/detail-3.vue
  28. 13 25
      src/views/service/patent/user/message/notice.vue
  29. 10 8
      src/views/service/patent/user/message/parts/list-2.vue
  30. 1 1
      src/views/service/patent/user/patent/information/detail.vue
  31. 5 5
      src/views/service/patent/user/patent/information/index.vue
  32. 8 0
      src/views/service/patent/user/patent/information/parts/detail-1.vue
  33. 82 4
      src/views/service/patent/user/transaction/info.vue
  34. 5 1
      src/views/service/patent/user/transaction/parts/info-1.vue
  35. 5 0
      vue.config.js

BIN
public/数据模板.xlsx


+ 16 - 0
src/router/index.js

@@ -180,6 +180,12 @@ const zlyy = [
     meta: { title: '通知信息-编辑通知' },
     component: () => import('../views/service/patent/admin/message/notice_create.vue'),
   },
+  // 管理员-审核通知
+  {
+    path: '/service/patent/admin/message/examine',
+    meta: { title: '审核通知' },
+    component: () => import('../views/service/patent/admin/message/examine.vue'),
+  },
   // 管理员-专利审核
   {
     path: '/service/patent/admin/examine/patent',
@@ -202,6 +208,16 @@ const zlyy = [
     meta: { title: '专利管理-添加专利' },
     component: () => import('../views/service/patent/admin/patent/info_create.vue'),
   },
+  {
+    path: '/service/patent/admin/patent/info_import',
+    meta: { title: '专利管理-导入专利' },
+    component: () => import('../views/service/patent/admin/patent/info_import.vue'),
+  },
+  {
+    path: '/service/patent/admin/patent/info_result',
+    meta: { title: '专利管理-导出结果' },
+    component: () => import('../views/service/patent/admin/patent/info_result.vue'),
+  },
   // 管理员-专利评估管理
   {
     path: '/service/patent/admin/patent/assessment',

+ 2 - 0
src/store/index.js

@@ -52,6 +52,7 @@ import patentassess from '@common/src/store/patent/patentassess';
 import patentinfo from '@common/src/store/patent/patentinfo';
 // 专利交易
 import patenttrans from '@common/src/store/patent/patenttrans';
+import mission from '@common/src/store/mission';
 const _ = require('lodash');
 
 Vue.use(Vuex);
@@ -107,5 +108,6 @@ export default new Vuex.Store({
     patentassess,
     patentinfo,
     patenttrans,
+    mission,
   },
 });

+ 1 - 1
src/store/upload.js

@@ -4,7 +4,7 @@ import _ from 'lodash';
 import axios from 'axios';
 Vue.use(Vuex);
 const api = {
-  upload: (dir) => `/files/article/${dir}/upload`,
+  upload: (dir) => `/files/jlstcompany/${dir}/upload`,
 };
 const state = () => ({});
 const mutations = {};

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

@@ -7,6 +7,7 @@
           <van-col span="24" class="one_1">
             <van-cell title="咨询服务管理" @click="pathBtn('admin/message', 'service')" is-link />
             <van-cell title="通知管理" @click="pathBtn('admin/message', 'notice')" is-link />
+            <van-cell title="审核通知管理" @click="pathBtn('admin/message', 'examine')" is-link />
           </van-col>
         </van-col>
         <van-col span="24" class="one">

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

@@ -0,0 +1,64 @@
+<template>
+  <div id="read">
+    <admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" :rightArrow="false" :useNav="false">
+      <template v-slot:info>
+        <list-3 :list="list"></list-3>
+      </template>
+    </admin-frame>
+  </div>
+</template>
+
+<script>
+import list3 from './parts/list-3.vue';
+import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: patentexamine } = createNamespacedHelpers('patentexamine');
+export default {
+  name: 'read',
+  props: {},
+  components: {
+    adminFrame,
+    list3,
+  },
+  data: function () {
+    return {
+      limit: 5,
+      total: 0,
+      list: [],
+    };
+  },
+  async created() {
+    this.search();
+  },
+  methods: {
+    ...patentexamine(['query']),
+    async search({ skip = 0, limit = this.limit, ...info } = {}) {
+      info.to = this.user.id;
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 返回
+    back() {
+      this.$router.push({ path: '/service/patent/index' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 7 - 3
src/views/service/patent/admin/message/notice.vue

@@ -12,7 +12,7 @@
 import list2 from './parts/list-2.vue';
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: patentexamine } = createNamespacedHelpers('patentexamine');
+const { mapActions: patentnotice } = createNamespacedHelpers('patentnotice');
 export default {
   name: 'read',
   props: {},
@@ -31,9 +31,13 @@ export default {
     this.search();
   },
   methods: {
-    ...patentexamine(['query']),
+    ...patentnotice(['query']),
     async search({ skip = 0, limit = this.limit, ...info } = {}) {
-      console.log('列表');
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
     },
     // 添加
     add() {

+ 21 - 7
src/views/service/patent/admin/message/notice_create.vue

@@ -1,20 +1,24 @@
 <template>
   <div id="notice_create">
     <admin-frame topType="2" @back="back" :rightArrow="false" :usePage="false" :useNav="false">
-      <template v-slot:info> 添加 </template>
+      <template v-slot:info>
+        <notice-form :form="form" @onSubmit="onSubmit"></notice-form>
+      </template>
     </admin-frame>
   </div>
 </template>
 
 <script>
+import noticeForm from './parts/form-1.vue';
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: patent } = createNamespacedHelpers('patent');
+const { mapActions: patentnotice } = createNamespacedHelpers('patentnotice');
 export default {
   name: 'detail',
   props: {},
   components: {
     adminFrame,
+    noticeForm,
   },
   data: function () {
     return {
@@ -22,16 +26,26 @@ export default {
     };
   },
   async created() {
-    if (this.id) await this.search();
+    this.search();
   },
   methods: {
-    ...patent(['fetch']),
-    async search() {
-      console.log('1');
+    ...patentnotice(['create']),
+    search() {
+      let data = { send_id: this.user.id, send_name: this.user.name };
+      this.$set(this, `form`, data);
+    },
+    async onSubmit(data) {
+      let res = await this.create(data);
+      if (this.$checkRes(res)) {
+        this.$toast({ type: `success`, message: `发送通知成功` });
+        this.back();
+      } else {
+        this.$toast({ type: `success`, message: `${res.errmsg}` });
+      }
     },
     // 返回
     back() {
-      this.$router.push({ path: '/service/patent/mech/message/notice' });
+      this.$router.push({ path: '/service/patent/admin/message/notice' });
     },
   },
   computed: {

+ 60 - 0
src/views/service/patent/admin/message/parts/form-1.vue

@@ -0,0 +1,60 @@
+<template>
+  <div id="form-1">
+    <van-row>
+      <van-col span="24" class="main">
+        <van-form @submit="onSubmit" label-width="4em">
+          <van-field v-model="form.send_id" name="send_id" label="发送人id" style="display: none" />
+          <van-field v-model="form.send_name" name="send_name" label="发送人" readonly />
+          <van-field name="to_type" label="接收用户">
+            <template #input>
+              <van-radio-group v-model="form.to_type" direction="horizontal">
+                <van-radio name="0">所有用户</van-radio>
+                <van-radio name="1">机构用户</van-radio>
+                <van-radio name="2">平台用户</van-radio>
+              </van-radio-group>
+            </template>
+          </van-field>
+          <van-field v-model="form.content" name="content" rows="2" autosize label="发送内容" type="textarea" placeholder="发送内容" />
+          <div style="margin: 16px">
+            <van-button round block type="info" native-type="submit">提交</van-button>
+          </div>
+        </van-form>
+      </van-col>
+    </van-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'form-1',
+  props: {
+    form: { type: Object },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    onSubmit(values) {
+      this.$emit('onSubmit', values);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 4 - 4
src/views/service/patent/admin/message/parts/list-2.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="list-1">
+  <div id="list-2">
     <van-col span="24" class="main">
       <van-col span="24" class="list" v-for="(item, index) in list" :key="index">
         <van-col span="24" class="other">
@@ -7,10 +7,10 @@
             <span>{{ item.content || '暂无' }}</span>
           </van-col>
           <van-col span="24" class="otherInfo">
-            发送时间:<span>{{ getDate(item.meta) }}</span>
+            发送人:<span>{{ item.send_name || '暂无' }}</span>
           </van-col>
           <van-col span="24" class="otherInfo">
-            是否已读:<span>{{ item.is_read ? '已读' : '未读' }}</span>
+            发送时间:<span>{{ getDate(item.meta) }}</span>
           </van-col>
         </van-col>
       </van-col>
@@ -22,7 +22,7 @@
 import { mapState, createNamespacedHelpers } from 'vuex';
 var moment = require('moment');
 export default {
-  name: 'list-1',
+  name: 'list-2',
   props: {
     list: { type: Array },
   },

+ 95 - 0
src/views/service/patent/admin/message/parts/list-3.vue

@@ -0,0 +1,95 @@
+<template>
+  <div id="list-1">
+    <van-col span="24" class="main">
+      <van-col span="24" class="list" v-for="(item, index) in list" :key="index">
+        <van-col span="24" class="other">
+          <van-col span="24" class="otherInfo">
+            <span>{{ item.content || '暂无' }}</span>
+          </van-col>
+          <van-col span="24" class="otherInfo">
+            发送时间:<span>{{ getDate(item.meta) }}</span>
+          </van-col>
+          <van-col span="24" class="otherInfo">
+            是否已读:<span>{{ item.is_read ? '已读' : '未读' }}</span>
+          </van-col>
+        </van-col>
+        <van-col span="24" class="btn" v-if="item.is_read == false">
+          <van-button size="small" type="info" @click="update(item)">取消提醒</van-button>
+        </van-col>
+      </van-col>
+    </van-col>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+var moment = require('moment');
+export default {
+  name: 'list-1',
+  props: {
+    list: { type: Array },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    update(data) {
+      this.$emit('update', data);
+    },
+    getDate(val) {
+      let newDate = moment(val.createdAt).format('YYYY-MM-DD hh:mm:ss');
+      if (newDate) return newDate;
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  padding: 8px 0 0 0;
+  .list {
+    background-color: #fff;
+    margin: 0 0 8px 0;
+    padding: 8px;
+    border-radius: 5px;
+    .title {
+      font-size: 16px;
+      font-weight: bold;
+      margin: 0 0 5px 0;
+    }
+    .other {
+      margin: 0 0 5px 0;
+      .otherInfo {
+        font-size: 14px;
+        color: #666;
+        margin: 0 0 5px 0;
+        span {
+          color: #000;
+          line-height: 20px;
+        }
+      }
+    }
+    .btn {
+      text-align: center;
+      .van-button {
+        margin: 0 5px;
+      }
+    }
+  }
+}
+</style>

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

@@ -11,7 +11,7 @@
               申请时间:<span>{{ getDate(item.meta) }}</span>
             </van-col>
             <van-col span="24" class="otherInfo">
-              是否缴费:<span>{{ item.is_money ? '未缴费' : '已缴费' }}</span>
+              是否缴费:<span>{{ item.is_money ? '已缴费' : '未缴费' }}</span>
             </van-col>
             <van-col span="24" class="otherInfo">
               申请状态:<span>{{ getStu(item.status) }}</span>

+ 43 - 3
src/views/service/patent/admin/patent/info.vue

@@ -2,7 +2,15 @@
   <div id="index">
     <admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" @add="add" :useNav="false">
       <template v-slot:info>
-        <list-1 :list="list" @detail="detail" @deletes="deletes"></list-1>
+        <van-col span="24" class="one">
+          <van-button type="info" size="small" @click="getTemplate">下载导入模板</van-button>
+          <van-button type="info" size="small" @click="toContinue">导入</van-button>
+          <van-button type="info" size="small" @click="exportView">导出</van-button>
+          <van-button type="info" size="small" @click="toResult">导出结果</van-button>
+        </van-col>
+        <van-col span="24" class="two">
+          <list-1 :list="list" @detail="detail" @deletes="deletes"></list-1>
+        </van-col>
       </template>
     </admin-frame>
   </div>
@@ -13,6 +21,7 @@ import list1 from './info/list-1.vue';
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: patentinfo } = createNamespacedHelpers('patentinfo');
+
 export default {
   name: 'index',
   props: {},
@@ -31,7 +40,8 @@ export default {
     await this.search();
   },
   methods: {
-    ...patentinfo(['query', 'delete']),
+    ...patentinfo(['query', 'delete', 'toExport']),
+
     async search({ skip = 0, limit = this.limit, ...info } = {}) {
       let res = await this.query({ skip, limit, ...info });
       if (this.$checkRes(res)) {
@@ -60,6 +70,28 @@ export default {
     back() {
       this.$router.push({ path: '/service/patent/index' });
     },
+    // 下载模板
+    getTemplate() {
+      // window.location.href = `${process.env.VUE_APP_HOST}/数据模板.xlsx`;
+      window.open('./数据模板.xlsx');
+    },
+    // 导入
+    toContinue() {
+      this.$router.push({ path: '/service/patent/admin/patent/info_import' });
+    },
+    // 导出
+    async exportView() {
+      let res = await this.toExport();
+      if (this.$checkRes(res)) {
+        this.$toast({ type: `success`, message: `导出成功` });
+      } else {
+        this.$toast({ type: `success`, message: `${res.errmsg}` });
+      }
+    },
+    // 导出结果
+    async toResult() {
+      this.$router.push({ path: '/service/patent/admin/patent/info_result' });
+    },
   },
   computed: {
     ...mapState(['user']),
@@ -77,4 +109,12 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.one {
+  text-align: center;
+  margin: 8px 0;
+  .van-button {
+    margin: 0 5px;
+  }
+}
+</style>

+ 2 - 2
src/views/service/patent/admin/patent/info/detail-1.vue

@@ -48,8 +48,8 @@
           <van-field name="status" label="状态" :rules="[{ required: true, message: '状态' }]">
             <template #input>
               <van-radio-group v-model="form.status" direction="horizontal">
-                <van-radio name="已授权">已授权</van-radio>
-                <van-radio name="已受理">已受理</van-radio>
+                <van-radio name="0">已授权</van-radio>
+                <van-radio name="1">已受理</van-radio>
               </van-radio-group>
             </template>
           </van-field>

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

@@ -11,7 +11,7 @@
               专利有效性:<span>{{ item.term || '暂无' }}</span>
             </van-col>
             <van-col span="24" class="otherInfo">
-              颁发时间:<span>{{ item.success_date || '暂无' }}</span>
+              颁发时间:<span>{{ getDate(item.success_date) }}</span>
             </van-col>
           </van-col>
           <van-col span="24" class="btn">
@@ -26,6 +26,7 @@
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
+const moment = require('moment');
 export default {
   name: 'list-1',
   props: { list: { type: Array } },
@@ -41,6 +42,11 @@ export default {
     deletes(data) {
       this.$emit('deletes', data);
     },
+    // 过滤时间
+    getDate(val) {
+      let newDate = moment(val).format('YYYY-MM-DD');
+      if (newDate) return newDate;
+    },
   },
   computed: {
     ...mapState(['user']),

+ 108 - 0
src/views/service/patent/admin/patent/info/result-1.vue

@@ -0,0 +1,108 @@
+<template>
+  <div id="list-1">
+    <van-row>
+      <van-col span="24" class="main">
+        <van-col span="24" class="list" v-for="(item, index) in list" :key="index">
+          <van-col span="24" class="title textOver">
+            {{ item.name }}
+          </van-col>
+          <van-col span="24" class="other">
+            <van-col span="24" class="otherInfo">
+              导出数据时间:<span>{{ getDate(item.meta.createdAt) }}</span>
+            </van-col>
+            <van-col span="24" class="otherInfo">
+              状态:<span>{{ getStu(item.status) }}</span>
+            </van-col>
+            <van-col span="24" class="otherInfo">
+              进度:<span>{{ item.progress || '暂无' }}</span>
+            </van-col>
+          </van-col>
+          <van-col span="24" class="btn">
+            <van-button type="info" size="small" @click="download(item)">下载</van-button>
+          </van-col>
+        </van-col>
+      </van-col>
+    </van-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const moment = require('moment');
+export default {
+  name: 'list-1',
+  props: { list: { type: Array } },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    download(data) {
+      this.$emit('download', data);
+    },
+    deletes(data) {
+      this.$emit('deletes', data);
+    },
+    // 过滤时间
+    getDate(val) {
+      let newDate = moment(val).format('YYYY-MM-DD hh:mm');
+      if (newDate) return newDate;
+    },
+    // 整理状态
+    getStu(data) {
+      if (data == '0') return '未开始';
+      else if (data == '1') return '进行中';
+      else if (data == '2') return '导出成功';
+      else if (data == '3') return '导出失败';
+      else return '未知状态';
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  margin: 8px 0 0 0;
+  .list {
+    background-color: #fff;
+    margin: 0 0 10px 0;
+    box-shadow: 0 0 5px #f1f1f1;
+    padding: 8px;
+    .title {
+      font-size: 16px;
+      font-weight: bold;
+      margin: 0 0 5px 0;
+    }
+    .other {
+      .otherInfo {
+        font-size: 14px;
+        color: #666;
+        margin: 0 0 5px 0;
+        span {
+          color: #000;
+        }
+      }
+    }
+    .btn {
+      text-align: center;
+      .van-button {
+        margin: 0 10px;
+      }
+    }
+  }
+}
+</style>

+ 132 - 0
src/views/service/patent/admin/patent/info_import.vue

@@ -0,0 +1,132 @@
+<template>
+  <div id="index">
+    <admin-frame topType="2" @back="back" :usePage="false" :rightArrow="false" :useNav="false">
+      <template v-slot:info>
+        <van-form @submit="onSubmit">
+          <van-field readonly clickable name="mechanism_name" :value="form.mechanism_name" label="选择机构" placeholder="点击选择" @click="showPicker = true" />
+          <van-popup v-model="showPicker" position="bottom">
+            <van-picker show-toolbar :columns="mechanismList" value-key="deptname" @confirm="mechanismCon" @cancel="showPicker = false" />
+          </van-popup>
+          <van-field readonly clickable name="user_id" :value="form.user_id" style="display: none" />
+          <van-field readonly clickable name="user_name" :value="form.user_name" label="选择用户" placeholder="点击选择" @click="twoUser = true" />
+          <van-popup v-model="twoUser" position="bottom">
+            <van-picker show-toolbar :columns="userList" value-key="name" @confirm="userCon" @cancel="twoUser = false" />
+          </van-popup>
+          <van-field v-model="form.origin" name="origin" label="数据来源" placeholder="数据来源" />
+          <van-field name="uri" label="文件">
+            <template #input>
+              <van-uploader :fileList="form.uri" :max-count="1" :after-read="(file) => toUpload(file, 'uri')" @delete="(file) => toDelete(file, 'uri')" />
+            </template>
+          </van-field>
+          <div style="margin: 16px">
+            <van-button round block type="info" native-type="submit">提交</van-button>
+          </div>
+        </van-form>
+      </template>
+    </admin-frame>
+  </div>
+</template>
+
+<script>
+import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: patentinfo } = createNamespacedHelpers('patentinfo');
+const { mapActions: adminLogin } = createNamespacedHelpers('adminLogin');
+const { mapActions: personal } = createNamespacedHelpers('personal');
+const { mapActions: upload } = createNamespacedHelpers('upload');
+var moment = require('moment');
+export default {
+  name: 'index',
+  props: {},
+  components: {
+    adminFrame,
+  },
+  data: function () {
+    return {
+      form: {},
+      // 机构列表
+      mechanismList: [],
+      showPicker: false,
+      // 用户
+      twoUser: false,
+      userList: [],
+    };
+  },
+  created() {
+    this.searchOther();
+  },
+  methods: {
+    ...upload(['upload']),
+    ...adminLogin(['query']),
+    ...personal({ perQuery: 'query' }),
+    ...patentinfo(['toImport']),
+    // 提交导入
+    async onSubmit(values) {
+      let data = values;
+      data.uri = data.uri ? data.uri[0].uri : '';
+      let res = await this.toImport(data);
+      console.log(res);
+    },
+    // 选择机构
+    async mechanismCon(values) {
+      this.$set(this.form, `mechanism_name`, values.deptname);
+      let res = await this.perQuery({ code: values.code });
+      if (this.$checkRes(res)) {
+        this.$set(this, `userList`, res.data);
+        this.showPicker = false;
+      }
+    },
+    // 返回
+    back() {
+      this.$router.push({ path: '/service/patent/admin/patent/info' });
+    },
+    // 查询机构
+    async searchOther() {
+      let res = await this.query({ pid: this.user._id });
+      if (this.$checkRes(res)) {
+        this.$set(this, `mechanismList`, res.data);
+      }
+    },
+    // 选择用户
+    userCon(values) {
+      this.$set(this.form, `user_name`, values.name);
+      this.$set(this.form, `user_id`, values._id);
+      this.twoUser = false;
+    },
+    async toUpload({ file }, model) {
+      // 上传,赋值
+      const res = await this.upload({ file, dir: 'patent' });
+      if (this.$checkRes(res)) {
+        this.$set(this.form, model, [{ name: res.name, uri: res.uri }]);
+      }
+    },
+    toDelete(file, model) {
+      const index = this.form[model].findIndex((f) => _.isEqual(f, file));
+      this.form[model].splice(index, 1);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.one {
+  text-align: center;
+  margin: 8px 0;
+  .van-button {
+    margin: 0 5px;
+  }
+}
+</style>

+ 67 - 0
src/views/service/patent/admin/patent/info_result.vue

@@ -0,0 +1,67 @@
+<template>
+  <div id="info_result">
+    <admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" :rightArrow="false" :useNav="false">
+      <template v-slot:info>
+        <result-1 :list="list" @download="download"></result-1>
+      </template>
+    </admin-frame>
+  </div>
+</template>
+
+<script>
+import result1 from './info/result-1.vue';
+import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: mission } = createNamespacedHelpers('mission');
+export default {
+  name: 'info_result',
+  props: {},
+  components: {
+    adminFrame,
+    result1,
+  },
+  data: function () {
+    return {
+      list: [],
+      limit: 5,
+      total: 0,
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...mission(['query']),
+    async search({ skip = 0, limit = this.limit, ...info } = {}) {
+      const res = await this.query({ skip, limit });
+      if (this.$checkRes(res)) {
+        this.$set(this, 'list', res.data);
+        this.$set(this, 'total', res.total);
+      }
+    },
+    // 下载导出文件
+    download(data) {
+      window.location.href = `${process.env.VUE_APP_HOST}/${data.uri}`;
+    },
+    // 返回
+    back() {
+      this.$router.push({ path: '/service/patent/admin/patent/info' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 5 - 5
src/views/service/patent/mech/examine/contract_check.vue

@@ -2,14 +2,14 @@
   <div id="contract_check">
     <admin-frame topType="2" @back="back" :rightArrow="false" :usePage="false" :useNav="false">
       <template v-slot:info>
-        <check-1 :form="form" @onSubmit="onSubmit"></check-1>
+        <trans-check :form="form" @onSubmit="onSubmit"></trans-check>
       </template>
     </admin-frame>
   </div>
 </template>
 
 <script>
-import check1 from './contract/check-1.vue';
+import transCheck from './contract/check-1.vue';
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: patenttrans } = createNamespacedHelpers('patenttrans');
@@ -18,7 +18,7 @@ export default {
   props: {},
   components: {
     adminFrame,
-    check1,
+    transCheck,
   },
   data: function () {
     return {
@@ -31,7 +31,7 @@ export default {
     if (this.id) this.search();
   },
   methods: {
-    ...patenttrans(['fetch', 'update']),
+    ...patenttrans(['fetch', 'check']),
     async search() {
       let res = await this.fetch(this.id);
       if (this.$checkRes(res)) {
@@ -42,7 +42,7 @@ export default {
     async onSubmit(status) {
       let data = this.form;
       data.status = status;
-      let res = await this.update(data);
+      let res = await this.check(data);
       if (this.$checkRes(res)) {
         this.$toast({ type: `success`, message: `审核成功` });
         this.back();

+ 9 - 4
src/views/service/patent/mech/examine/trans.vue

@@ -17,6 +17,7 @@ import info1 from './contract/info-1.vue';
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: patenttrans } = createNamespacedHelpers('patenttrans');
+const { mapActions: patentinfo } = createNamespacedHelpers('patentinfo');
 export default {
   name: 'trans',
   props: {},
@@ -39,7 +40,8 @@ export default {
     await this.search();
   },
   methods: {
-    ...patenttrans(['query', 'update']),
+    ...patenttrans(['query', 'check']),
+    ...patentinfo(['update']),
     async search({ skip = 0, limit = this.limit, ...info } = {}) {
       info.admin_id = this.user._id;
       info.status = '3';
@@ -57,10 +59,13 @@ export default {
     // 归档确认
     async confirm(data) {
       data.status = '4';
-      let res = await this.update(data);
+      let res = await this.check(data);
       if (this.$checkRes(res)) {
-        this.$toast({ type: `success`, message: `归档成功,交易结束` });
-        this.search();
+        let arr = await this.update({ id: data.patent_id, trans_status: '1' });
+        if (this.$checkRes(arr)) {
+          this.$toast({ type: `success`, message: `归档成功,交易结束` });
+          this.search();
+        }
       } else {
         this.$toast({ type: `success`, message: `${res.errmsg}` });
       }

+ 8 - 3
src/views/service/patent/mech/message/notice.vue

@@ -12,7 +12,7 @@
 import list2 from './parts/list-2.vue';
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: patentexamine } = createNamespacedHelpers('patentexamine');
+const { mapActions: patentnotice } = createNamespacedHelpers('patentnotice');
 export default {
   name: 'read',
   props: {},
@@ -31,9 +31,14 @@ export default {
     this.search();
   },
   methods: {
-    ...patentexamine(['query']),
+    ...patentnotice(['query']),
     async search({ skip = 0, limit = this.limit, ...info } = {}) {
-      console.log('列表');
+      info.to_id = this.user._id;
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
     },
     // 添加
     add() {

+ 20 - 6
src/views/service/patent/mech/message/notice_create.vue

@@ -1,20 +1,24 @@
 <template>
   <div id="notice_create">
     <admin-frame topType="2" @back="back" :rightArrow="false" :usePage="false" :useNav="false">
-      <template v-slot:info> 添加 </template>
+      <template v-slot:info>
+        <notice-form :form="form" @onSubmit="onSubmit"></notice-form>
+      </template>
     </admin-frame>
   </div>
 </template>
 
 <script>
+import noticeForm from './parts/form-1.vue';
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: patent } = createNamespacedHelpers('patent');
+const { mapActions: patentnotice } = createNamespacedHelpers('patentnotice');
 export default {
   name: 'detail',
   props: {},
   components: {
     adminFrame,
+    noticeForm,
   },
   data: function () {
     return {
@@ -22,12 +26,22 @@ export default {
     };
   },
   async created() {
-    if (this.id) await this.search();
+    this.search();
   },
   methods: {
-    ...patent(['fetch']),
-    async search() {
-      console.log('1');
+    ...patentnotice(['create']),
+    search() {
+      let data = { send_id: this.user.id, send_name: this.user.name, to_type: '3' };
+      this.$set(this, `form`, data);
+    },
+    async onSubmit(data) {
+      let res = await this.create(data);
+      if (this.$checkRes(res)) {
+        this.$toast({ type: `success`, message: `发送通知成功` });
+        this.back();
+      } else {
+        this.$toast({ type: `success`, message: `${res.errmsg}` });
+      }
     },
     // 返回
     back() {

+ 58 - 0
src/views/service/patent/mech/message/parts/form-1.vue

@@ -0,0 +1,58 @@
+<template>
+  <div id="form-1">
+    <van-row>
+      <van-col span="24" class="main">
+        <van-form @submit="onSubmit" label-width="4em">
+          <van-field v-model="form.send_id" name="send_id" label="发送人id" style="display: none" />
+          <van-field v-model="form.send_name" name="send_name" label="发送人" readonly />
+          <van-field name="to_type" label="接收用户">
+            <template #input>
+              <van-radio-group v-model="form.to_type" direction="horizontal">
+                <van-radio name="3">平台用户</van-radio>
+              </van-radio-group>
+            </template>
+          </van-field>
+          <van-field v-model="form.content" name="content" rows="2" autosize label="发送内容" type="textarea" placeholder="发送内容" />
+          <div style="margin: 16px">
+            <van-button round block type="info" native-type="submit">提交</van-button>
+          </div>
+        </van-form>
+      </van-col>
+    </van-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'form-1',
+  props: {
+    form: { type: Object },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    onSubmit(values) {
+      this.$emit('onSubmit', values);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 4 - 7
src/views/service/patent/mech/message/parts/list-2.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="list-1">
+  <div id="list-2">
     <van-col span="24" class="main">
       <van-col span="24" class="list" v-for="(item, index) in list" :key="index">
         <van-col span="24" class="other">
@@ -7,15 +7,12 @@
             <span>{{ item.content || '暂无' }}</span>
           </van-col>
           <van-col span="24" class="otherInfo">
-            发送时间:<span>{{ getDate(item.meta) }}</span>
+            发送人:<span>{{ item.send_name || '暂无' }}</span>
           </van-col>
           <van-col span="24" class="otherInfo">
-            是否已读:<span>{{ item.is_read ? '已读' : '未读' }}</span>
+            发送时间:<span>{{ getDate(item.meta) }}</span>
           </van-col>
         </van-col>
-        <!-- <van-col span="24" class="btn" v-if="item.is_read == false">
-          <van-button size="small" type="info" @click="update(item)">取消提醒</van-button>
-        </van-col> -->
       </van-col>
     </van-col>
   </div>
@@ -25,7 +22,7 @@
 import { mapState, createNamespacedHelpers } from 'vuex';
 var moment = require('moment');
 export default {
-  name: 'list-1',
+  name: 'list-2',
   props: {
     list: { type: Array },
   },

+ 7 - 5
src/views/service/patent/mech/patent/information/index.vue

@@ -39,18 +39,20 @@ export default {
     await this.search();
   },
   methods: {
-    ...patentinfo(['query']),
+    ...patentinfo(['queryByOrg']),
     async search({ skip = 0, limit = this.limit, ...info } = {}) {
       if (this.active == '有效') {
-        info.status = '已授权';
-        let res = await this.query({ skip, limit, ...info });
+        info.status = '0';
+        info.code = this.user.code;
+        let res = await this.queryByOrg({ skip, limit, ...info });
         if (this.$checkRes(res)) {
           this.$set(this, `list`, res.data);
           this.$set(this, `total`, res.total);
         }
       } else if (this.active == '审中') {
-        info.status = '已受理';
-        let res = await this.query({ skip, limit, ...info });
+        info.status = '1';
+        info.code = this.user.code;
+        let res = await this.queryByOrg({ skip, limit, ...info });
         if (this.$checkRes(res)) {
           this.$set(this, `list`, res.data);
           this.$set(this, `total`, res.total);

+ 1 - 1
src/views/service/patent/user/apply/analysis/parts/list-2.vue

@@ -41,7 +41,7 @@ export default {
   methods: {
     // 整理状态
     getStu(status) {
-      if (status == '0') return '已提交给相应机构,请等待审核';
+      if (status == '0') return '已提交给管理员,请等待审核';
       else if (status == '1') return '管理员审核通过!';
       else if (status == '-1') return '管理员审核未通过,请查看审核意见,并重新提交申请';
     },

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

@@ -53,7 +53,7 @@ export default {
           this.$set(this.form, `patent_id`, res.data._id);
         }
       } else {
-        let res = await this.query({ inventor: this.user.name });
+        let res = await this.query({ user_id: this.user._id });
         if (this.$checkRes(res)) {
           this.$set(this, `patentList`, res.data);
         }

+ 13 - 25
src/views/service/patent/user/message/notice.vue

@@ -1,52 +1,43 @@
 <template>
-  <div id="login">
+  <div id="read">
     <admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" :rightArrow="false" :useNav="false">
       <template v-slot:info>
-        <!-- <frame-list :list="list" @update="update"></frame-list> -->
-        通知信息
+        <list-2 :list="list"></list-2>
       </template>
     </admin-frame>
   </div>
 </template>
 
 <script>
+import list2 from './parts/list-2.vue';
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: notice } = createNamespacedHelpers('notice');
+const { mapActions: patentnotice } = createNamespacedHelpers('patentnotice');
 export default {
-  name: 'login',
+  name: 'read',
   props: {},
   components: {
     adminFrame,
+    list2,
   },
   data: function () {
     return {
-      list: [],
       limit: 5,
       total: 0,
+      list: [],
     };
   },
   async created() {
-    await this.search();
+    this.search();
   },
   methods: {
-    ...notice(['query', 'update']),
+    ...patentnotice(['query']),
     async search({ skip = 0, limit = this.limit, ...info } = {}) {
-      // info.to = this.user.id;
-      // if (this.is_read) info.is_read = this.is_read;
-      // let res = await this.query({ skip, limit, ...info });
-      // if (this.$checkRes(res)) {
-      //   this.$set(this, `list`, res.data);
-      //   this.$set(this, `total`, res.total);
-      // }
-    },
-    // 详情
-    async update(data) {
-      data.is_read = true;
-      let res = await this.update(data);
+      info.to_id = this.user._id;
+      let res = await this.query({ skip, limit, ...info });
       if (this.$checkRes(res)) {
-        this.$toast({ type: 'success', message: '取消提醒成功' });
-        this.search();
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
       }
     },
     // 返回
@@ -56,9 +47,6 @@ export default {
   },
   computed: {
     ...mapState(['user']),
-    is_read() {
-      return this.$route.query.is_read;
-    },
   },
   metaInfo() {
     return { title: this.$route.meta.title };

+ 10 - 8
src/views/service/patent/user/message/parts/list-2.vue

@@ -1,21 +1,18 @@
 <template>
-  <div id="list-1">
+  <div id="list-2">
     <van-col span="24" class="main">
       <van-col span="24" class="list" v-for="(item, index) in list" :key="index">
         <van-col span="24" class="other">
           <van-col span="24" class="otherInfo">
-            <span>{{ item.name || '暂无' }}</span>
+            <span>{{ item.content || '暂无' }}</span>
           </van-col>
           <van-col span="24" class="otherInfo">
-            发送时间:<span>{{ item.create_time || '暂无' }}</span>
+            发送人:<span>{{ item.send_name || '暂无' }}</span>
           </van-col>
           <van-col span="24" class="otherInfo">
-            是否已读:<span>{{ item.is_read ? '已读' : '未读' }}</span>
+            发送时间:<span>{{ getDate(item.meta) }}</span>
           </van-col>
         </van-col>
-        <van-col span="24" class="btn" v-if="item.is_read == false">
-          <van-button size="small" type="info" @click="update(item)">查看信息</van-button>
-        </van-col>
       </van-col>
     </van-col>
   </div>
@@ -23,8 +20,9 @@
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
+var moment = require('moment');
 export default {
-  name: 'list-1',
+  name: 'list-2',
   props: {
     list: { type: Array },
   },
@@ -37,6 +35,10 @@ export default {
     update(data) {
       this.$emit('update', data);
     },
+    getDate(val) {
+      let newDate = moment(val.createdAt).format('YYYY-MM-DD hh:mm:ss');
+      if (newDate) return newDate;
+    },
   },
   computed: {
     ...mapState(['user']),

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

@@ -7,7 +7,7 @@
           <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 16px' }">专利交易</van-divider>
           <van-col span="24" class="one_1">
             <van-button type="info" size="small" @click="assessment(form)">评估报告</van-button>
-            <van-button type="info" size="small" @click="trans(form)">专利交易</van-button>
+            <van-button type="info" size="small" @click="trans(form)" v-if="form.trans_status == '0'">专利交易</van-button>
           </van-col>
         </van-col>
       </template>

+ 5 - 5
src/views/service/patent/user/patent/information/index.vue

@@ -36,22 +36,22 @@ export default {
     };
   },
   async created() {
-    await this.search({ term: '有效' });
+    await this.search();
   },
   methods: {
     ...patentinfo(['query']),
     async search({ skip = 0, limit = this.limit, ...info } = {}) {
       if (this.active == '有效') {
-        info.status = '已授权';
-        info.inventor = this.user.name;
+        info.status = '0';
+        info.user_id = this.user._id;
         let res = await this.query({ skip, limit, ...info });
         if (this.$checkRes(res)) {
           this.$set(this, `list`, res.data);
           this.$set(this, `total`, res.total);
         }
       } else if (this.active == '审中') {
-        info.status = '已受理';
-        info.inventor = this.user.name;
+        info.status = '1';
+        info.user_id = this.user._id;
         let res = await this.query({ skip, limit, ...info });
         if (this.$checkRes(res)) {
           this.$set(this, `list`, res.data);

+ 8 - 0
src/views/service/patent/user/patent/information/parts/detail-1.vue

@@ -20,6 +20,14 @@
             <van-field v-model="form.agent_personal" name="agent_personal" label="代理人" />
             <van-field v-model="form.agent" name="agent" label="代理机构" />
             <van-field v-model="form.abstract" name="abstract" label="摘要" rows="1" autosize type="textarea" />
+            <van-field name="trans_status" label="是否交易">
+              <template #input>
+                <van-radio-group v-model="form.trans_status" direction="horizontal" disabled>
+                  <van-radio name="0">未交易</van-radio>
+                  <van-radio name="1">已交易</van-radio>
+                </van-radio-group>
+              </template>
+            </van-field>
           </van-form>
         </van-col>
       </van-col>

+ 82 - 4
src/views/service/patent/user/transaction/info.vue

@@ -2,9 +2,28 @@
   <div id="detail">
     <admin-frame topType="2" @back="back" :rightArrow="false" :usePage="false" :useNav="false">
       <template v-slot:info>
-        <info-1 :form="form" @addContract="addContract" @revoke="revoke" @confirm="confirm"></info-1>
+        <info-1 :form="form" @addContract="addContract" @revoke="revoke" @confirm="confirm" @endTrans="endTrans"></info-1>
       </template>
     </admin-frame>
+    <van-dialog class="dialog" v-model="show" title="上传合同" :show-confirm-button="false" :show-cancel-button="false">
+      <van-form>
+        <van-field v-model="contartForm.patent_name" name="专利名称" label="专利名称" row="1" type="textarea" />
+        <van-field name="offine_contract" label="合同">
+          <template #input>
+            <van-uploader
+              :fileList="contartForm.offine_contract"
+              :max-count="1"
+              :after-read="(file) => toUpload(file, 'offine_contract')"
+              @delete="(file) => toDelete(file, 'offine_contract')"
+            />
+          </template>
+        </van-field>
+        <van-col span="24" class="btn">
+          <van-button type="info" size="small" @click="onSubmit">提交合同</van-button>
+          <van-button type="danger" size="small" @click="resetBtn">取消提交</van-button>
+        </van-col>
+      </van-form>
+    </van-dialog>
   </div>
 </template>
 
@@ -13,6 +32,9 @@ import info1 from './parts/info-1.vue';
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: patenttrans } = createNamespacedHelpers('patenttrans');
+const { mapActions: patentinfo } = createNamespacedHelpers('patentinfo');
+const { mapActions: upload } = createNamespacedHelpers('upload');
+var moment = require('moment');
 export default {
   name: 'detail',
   props: {},
@@ -23,13 +45,18 @@ export default {
   data: function () {
     return {
       form: {},
+      // 结束交易
+      show: false,
+      contartForm: {},
     };
   },
   async created() {
     await this.search();
   },
   methods: {
-    ...patenttrans(['fetch', 'update']),
+    ...upload(['upload']),
+    ...patenttrans(['fetch', 'update', 'check']),
+    ...patentinfo({ infoUpdate: 'update' }),
     async search() {
       let res = await this.fetch(this.id);
       if (this.$checkRes(res)) {
@@ -57,7 +84,7 @@ export default {
     async confirm() {
       let data = this.form;
       data.status = '3';
-      let res = await this.update(data);
+      let res = await this.check(data);
       if (this.$checkRes(res)) {
         this.$toast({ type: `success`, message: `用户确认成功,待机构审核通过,交易结束` });
         this.back();
@@ -65,10 +92,47 @@ export default {
         this.$toast({ type: `success`, message: `${res.errmsg}` });
       }
     },
+    // 结束交易
+    endTrans() {
+      this.$set(this, `contartForm`, this.form);
+      this.show = true;
+    },
+    // 提交合同
+    async onSubmit() {
+      let data = this.contartForm;
+      data.is_contract = '0';
+      data.status = '4';
+      let res = await this.update(data);
+      if (this.$checkRes(res)) {
+        let arr = await this.infoUpdate({ id: data.patent_id, trans_status: '1' });
+        if (this.$checkRes(arr)) {
+          this.$toast({ type: `success`, message: `合同上传成功,交易完成` });
+          this.back();
+        }
+      } else {
+        this.$toast({ type: `success`, message: `${res.errmsg}` });
+      }
+    },
+    // 取消提交
+    resetBtn() {
+      this.contartForm = {};
+      this.show = false;
+    },
     // 返回
     back() {
       this.$router.push({ path: '/service/patent/user/transaction/index', query: { type: this.type } });
     },
+    async toUpload({ file }, model) {
+      // 上传,赋值
+      const res = await this.upload({ file, dir: 'file' });
+      if (this.$checkRes(res)) {
+        this.$set(this.contartForm, model, [{ name: res.name, url: res.uri }]);
+      }
+    },
+    toDelete(file, model) {
+      const index = this.contartForm[model].findIndex((f) => _.isEqual(f, file));
+      this.contartForm[model].splice(index, 1);
+    },
   },
   computed: {
     ...mapState(['user']),
@@ -92,4 +156,18 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.dialog {
+  /deep/.van-dialog__content {
+    height: 250px;
+    overflow-y: auto;
+  }
+  .btn {
+    text-align: center;
+    margin: 15px 0;
+    .van-button {
+      margin: 0 10px;
+    }
+  }
+}
+</style>

+ 5 - 1
src/views/service/patent/user/transaction/parts/info-1.vue

@@ -42,7 +42,7 @@
           <van-button type="info" size="small" @click="addContract" v-if="form.status == '0' || form.status == '-1'">填写合同</van-button>
           <van-button type="danger" size="small" @click="revoke" v-if="form.status == '0'">撤回交易</van-button>
           <van-button type="info" size="small" @click="confirm" v-if="form.status == '2'">用户确认</van-button>
-          <van-button type="info" size="small" v-if="form.status == '0'">结束交易</van-button>
+          <van-button type="info" size="small" @click="endTrans" v-if="form.status == '0'">结束交易</van-button>
         </van-col>
       </van-col>
     </van-row>
@@ -75,6 +75,10 @@ export default {
     confirm() {
       this.$emit('confirm');
     },
+    // 结束交易
+    endTrans() {
+      this.$emit('endTrans');
+    },
     download(data) {
       window.location.href = `${process.env.VUE_APP_HOST}/${data[0].url}`;
     },

+ 5 - 0
vue.config.js

@@ -24,6 +24,11 @@ module.exports = {
       '/files': {
         target: 'http://broadcast.waityou24.cn',
       },
+      '/api/mission': {
+        target: 'http://broadcast.waityou24.cn',
+        changeOrigin: true,
+        ws: false,
+      },
       '/api/question': {
         target: 'http://broadcast.waityou24.cn', //http://192.168.1.19:9101
         changeOrigin: true,