guhongwei 3 éve
szülő
commit
cbd7844409

+ 11 - 8
src/layout/patentInfo/trans-1.vue

@@ -27,14 +27,16 @@
               placeholder="请输入电子邮箱"
               placeholder="请输入电子邮箱"
               :rules="[{ required: true, message: '请输入电子邮箱' }]"
               :rules="[{ required: true, message: '请输入电子邮箱' }]"
             />
             />
-            <van-field
-              v-model="form.budget"
-              name="budget"
-              type="digit"
-              label="意向价格(万元)"
-              placeholder="请输入意向价格"
-              :rules="[{ required: true, message: '请输入意向价格' }]"
-            />
+            <van-field name="budgetType" label="价格类型">
+              <template #input>
+                <van-radio-group v-model="form.budget_type" direction="horizontal">
+                  <van-radio name="1">面议</van-radio>
+                  <van-radio name="2">金额区间(万元)</van-radio>
+                </van-radio-group>
+              </template>
+            </van-field>
+            <van-field v-model="form.budget_min" name="budget_min" type="digit" label="最小价格" placeholder="请输入价格" v-if="form.budget_type == '2'" />
+            <van-field v-model="form.budget_max" name="budget_max" type="digit" label="最大价格" placeholder="请输入价格" v-if="form.budget_type == '2'" />
             <van-field name="type" label="交易类型" :rules="[{ required: true, message: '交易类型' }]">
             <van-field name="type" label="交易类型" :rules="[{ required: true, message: '交易类型' }]">
               <template #input>
               <template #input>
                 <van-radio-group v-model="form.type" direction="horizontal">
                 <van-radio-group v-model="form.type" direction="horizontal">
@@ -83,6 +85,7 @@
                 />
                 />
               </template>
               </template>
             </van-field>
             </van-field>
+            <van-field v-model="form.abstract" name="abstract" label="摘要" placeholder="请输入摘要" type="textarea" autosize readonly />
             <van-field v-model="form.requirementdesc" name="requirementdesc" label="技术说明" placeholder="请输入技术说明" type="textarea" autosize />
             <van-field v-model="form.requirementdesc" name="requirementdesc" label="技术说明" placeholder="请输入技术说明" type="textarea" autosize />
             <van-field v-model="form.expect" name="expect" label="商业预期" placeholder="请输入商业预期" type="textarea" autosize />
             <van-field v-model="form.expect" name="expect" label="商业预期" placeholder="请输入商业预期" type="textarea" autosize />
             <van-field v-model="form.condition" name="condition" label="合作条件及要求" placeholder="请输入合作条件及要求" type="textarea" autosize />
             <van-field v-model="form.condition" name="condition" label="合作条件及要求" placeholder="请输入合作条件及要求" type="textarea" autosize />

+ 2 - 1
src/layout/trans/info-1.vue

@@ -10,7 +10,7 @@
             <van-field v-model="info.contact" name="contact" label="联系人" readonly />
             <van-field v-model="info.contact" name="contact" label="联系人" readonly />
             <van-field v-model="info.phone" name="phone" label="联系电话" readonly />
             <van-field v-model="info.phone" name="phone" label="联系电话" readonly />
             <van-field v-model="info.email" name="email" label="电子邮箱" readonly />
             <van-field v-model="info.email" name="email" label="电子邮箱" readonly />
-            <van-field v-model="info.budget" name="budget" type="digit" label="意向价格(万元)" readonly />
+            <van-field v-model="info.budget" name="budget" label="意向价格(万元)" readonly />
             <van-field v-model="info.type" name="type" label="交易类型" readonly />
             <van-field v-model="info.type" name="type" label="交易类型" readonly />
             <van-col span="24" class="typeThr" v-if="info.type == '免费许可'">
             <van-col span="24" class="typeThr" v-if="info.type == '免费许可'">
               <van-col span="24" class="title"> 免费许可承诺书 </van-col>
               <van-col span="24" class="title"> 免费许可承诺书 </van-col>
@@ -33,6 +33,7 @@
             <van-field v-model="info.requirementdesc" name="requirementdesc" label="技术说明" readonly />
             <van-field v-model="info.requirementdesc" name="requirementdesc" label="技术说明" readonly />
             <van-field v-model="info.expect" name="expect" label="商业预期" readonly />
             <van-field v-model="info.expect" name="expect" label="商业预期" readonly />
             <van-field v-model="info.condition" name="condition" label="合作条件及要求" readonly />
             <van-field v-model="info.condition" name="condition" label="合作条件及要求" readonly />
+            <van-field v-model="info.abstract" name="abstract" label="摘要" readonly />
           </van-form>
           </van-form>
         </van-col>
         </van-col>
       </van-col>
       </van-col>

+ 1 - 1
src/views/account/users/index.vue

@@ -35,7 +35,7 @@ export default {
   methods: {
   methods: {
     ...personal(['query', 'delete', 'export', 'updatePassword']),
     ...personal(['query', 'delete', 'export', 'updatePassword']),
     async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
     async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
-      if (searchName) info.phone = searchName;
+      if (searchName) info.name = searchName;
       if (this.user.role != '1') info.code = this.user.code;
       if (this.user.role != '1') info.code = this.user.code;
       let res = await this.query({ skip, limit, ...info });
       let res = await this.query({ skip, limit, ...info });
       if (this.$checkRes(res)) {
       if (this.$checkRes(res)) {

+ 5 - 7
src/views/index.vue

@@ -13,7 +13,7 @@
 const { textname } = require('@frame/src/layout/test');
 const { textname } = require('@frame/src/layout/test');
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: patenttrans } = createNamespacedHelpers('patenttrans');
+const { mapActions: statistics } = createNamespacedHelpers('statistics');
 const moment = require('moment');
 const moment = require('moment');
 export default {
 export default {
   name: 'index',
   name: 'index',
@@ -83,15 +83,13 @@ export default {
   },
   },
   async created() {},
   async created() {},
   methods: {
   methods: {
-    ...patenttrans(['create', 'query']),
+    ...statistics(['patentInfoByApplyPerson']),
 
 
     // 添加用户
     // 添加用户
     async toAdd() {
     async toAdd() {
-      for (const val of this.textname) {
-        let res = await this.create(val);
-        if (this.$checkRes(res)) {
-          console.log(res);
-        }
+      let res = await this.patentInfoByApplyPerson();
+      if (this.$checkRes(res)) {
+        console.log(res);
       }
       }
     },
     },
   },
   },

+ 1 - 1
src/views/patent/admin/patent/import.vue

@@ -97,7 +97,7 @@ export default {
 
 
     // 返回
     // 返回
     back() {
     back() {
-      this.$router.push({ path: '/patent/admin/patent' });
+      this.$router.push({ path: '/patent/admin/patent/info' });
     },
     },
 
 
     async toUpload({ file }, model) {
     async toUpload({ file }, model) {

+ 29 - 11
src/views/patent/market/index.vue

@@ -3,13 +3,13 @@
     <admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" :rightArrow="false" :useNav="false">
     <admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" :rightArrow="false" :useNav="false">
       <template v-slot:info>
       <template v-slot:info>
         <van-tabs v-model="active" @change="change">
         <van-tabs v-model="active" @change="change">
-          <van-tab :title="`专利信息【${oneTotal}】`" name="1">
-            <list-1 :list="oneList" @detail="detail"></list-1>
+          <van-tab :title="`专利信息(${oneTotal})`" name="1">
+            <list-1 :list="oneList" @toView="oneView"></list-1>
           </van-tab>
           </van-tab>
-          <van-tab :title="`交易公告【${twoTotal}】`" name="2">
+          <van-tab :title="`交易公告(${twoTotal})`" name="2">
             <list-2 :list="twoList"></list-2>
             <list-2 :list="twoList"></list-2>
           </van-tab>
           </van-tab>
-          <van-tab :title="`专利转让【${thrTotal}】`" name="3">
+          <van-tab :title="`专利转让(${thrTotal})`" name="3">
             <list-3 :list="thrList" @toView="toView"></list-3>
             <list-3 :list="thrList" @toView="toView"></list-3>
           </van-tab>
           </van-tab>
         </van-tabs>
         </van-tabs>
@@ -17,18 +17,21 @@
     </admin-frame>
     </admin-frame>
     <van-dialog class="dialog" v-model="dialog.show" :title="dialog.title" :show-confirm-button="false" show-cancel-button cancel-button-text="返回">
     <van-dialog class="dialog" v-model="dialog.show" :title="dialog.title" :show-confirm-button="false" show-cancel-button cancel-button-text="返回">
       <info-3 :info="info" v-if="dialog.type == '1'"></info-3>
       <info-3 :info="info" v-if="dialog.type == '1'"></info-3>
+      <info-1 :info="info" v-else-if="dialog.type == '2'"></info-1>
     </van-dialog>
     </van-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import list1 from './parts/list-1.vue';
+import list1 from '@/layout/patentInfo/list-2.vue';
 import list2 from './parts/list-2.vue';
 import list2 from './parts/list-2.vue';
 import list3 from '@/layout/trans/list-2.vue';
 import list3 from '@/layout/trans/list-2.vue';
 import info3 from '@/layout/trans/info-1.vue';
 import info3 from '@/layout/trans/info-1.vue';
+import info1 from '@/layout/patentInfo/info-1.vue';
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: patent } = createNamespacedHelpers('patent');
+const { mapActions: adminLogin } = createNamespacedHelpers('adminLogin');
+const { mapActions: patentinfo } = createNamespacedHelpers('patentinfo');
 const { mapActions: patenttrans } = createNamespacedHelpers('patenttrans');
 const { mapActions: patenttrans } = createNamespacedHelpers('patenttrans');
 export default {
 export default {
   name: 'index',
   name: 'index',
@@ -36,12 +39,14 @@ export default {
   components: {
   components: {
     adminFrame,
     adminFrame,
     list1,
     list1,
+    info1,
     list2,
     list2,
     list3,
     list3,
     info3,
     info3,
   },
   },
   data: function () {
   data: function () {
     return {
     return {
+      adminInfo: {},
       active: '1',
       active: '1',
       limit: 5,
       limit: 5,
       total: 0,
       total: 0,
@@ -60,15 +65,17 @@ export default {
     };
     };
   },
   },
   async created() {
   async created() {
+    await this.searchOther();
     await this.searchTotal();
     await this.searchTotal();
     await this.search();
     await this.search();
   },
   },
   methods: {
   methods: {
-    ...patent(['query']),
+    ...adminLogin({ adminLoginQuery: 'query' }),
+    ...patentinfo(['query', 'fetch']),
     ...patenttrans({ transQuery: 'query' }),
     ...patenttrans({ transQuery: 'query' }),
     async search({ skip = 0, limit = this.limit, ...info } = {}) {
     async search({ skip = 0, limit = this.limit, ...info } = {}) {
       if (this.active == '1') {
       if (this.active == '1') {
-        let res = await this.query({ skip, limit, ...info });
+        let res = await this.query({ skip, limit, first_apply: this.adminInfo.deptname, ...info });
         if (this.$checkRes(res)) {
         if (this.$checkRes(res)) {
           this.$set(this, `oneList`, res.data);
           this.$set(this, `oneList`, res.data);
           this.$set(this, `total`, res.total);
           this.$set(this, `total`, res.total);
@@ -89,7 +96,7 @@ export default {
     },
     },
     // 查询总数
     // 查询总数
     async searchTotal({ skip = 0, limit = this.limit, ...info } = {}) {
     async searchTotal({ skip = 0, limit = this.limit, ...info } = {}) {
-      let res = await this.query({ skip, limit, ...info });
+      let res = await this.query({ skip, limit, first_apply: this.adminInfo.deptname, ...info });
       if (this.$checkRes(res)) this.$set(this, `oneTotal`, res.total);
       if (this.$checkRes(res)) this.$set(this, `oneTotal`, res.total);
       res = await this.transQuery({ ...info });
       res = await this.transQuery({ ...info });
       let p1 = res.data.filter((i) => i.status == '5');
       let p1 = res.data.filter((i) => i.status == '5');
@@ -98,8 +105,12 @@ export default {
       if (p2) this.$set(this, `thrTotal`, p2.length);
       if (p2) this.$set(this, `thrTotal`, p2.length);
     },
     },
     // 专利详情
     // 专利详情
-    detail(data) {
-      this.$router.push({ path: '/patent/market/detail', query: { id: data._id } });
+    async oneView(data) {
+      let res = await this.fetch(data.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `info`, res.data);
+      }
+      this.dialog = { show: true, title: '详细信息', type: '2' };
     },
     },
     // 交易详情
     // 交易详情
     twoDetail(data) {
     twoDetail(data) {
@@ -115,6 +126,13 @@ export default {
       this.$set(this, `info`, data);
       this.$set(this, `info`, data);
       this.dialog = { show: true, title: '详细信息', type: '1' };
       this.dialog = { show: true, title: '详细信息', type: '1' };
     },
     },
+    // 查询其他信息
+    async searchOther() {
+      let res = await this.adminLoginQuery({ code: this.user.code });
+      if (this.$checkRes(res)) {
+        this.$set(this, `adminInfo`, res.data[0]);
+      }
+    },
     // 返回
     // 返回
     back() {
     back() {
       this.$router.push({ path: '/patent/index' });
       this.$router.push({ path: '/patent/index' });

+ 3 - 3
src/views/patent/mech/patent/information/index.vue

@@ -4,15 +4,15 @@
       <template v-slot:info>
       <template v-slot:info>
         <van-tabs v-model="active" @change="change">
         <van-tabs v-model="active" @change="change">
           <van-tab name="有效">
           <van-tab name="有效">
-            <template #title>已授权({{ total1 }}) </template>
+            <template #title>有效({{ total1 }}) </template>
             <list-1 :list="list" @toView="toView"></list-1>
             <list-1 :list="list" @toView="toView"></list-1>
           </van-tab>
           </van-tab>
           <van-tab name="审中">
           <van-tab name="审中">
-            <template #title>已受理({{ total2 }})</template>
+            <template #title>审中({{ total2 }})</template>
             <list-1 :list="list" @toView="toView"></list-1>
             <list-1 :list="list" @toView="toView"></list-1>
           </van-tab>
           </van-tab>
           <van-tab name="失效">
           <van-tab name="失效">
-            <template #title>失效({{ total3 }}) </template>
+            <template #title>失效({{ total3 }}) </template>
             <list-1 :list="list" @toView="toView"></list-1>
             <list-1 :list="list" @toView="toView"></list-1>
           </van-tab>
           </van-tab>
         </van-tabs>
         </van-tabs>

+ 39 - 8
src/views/patent/parts/patent-1.vue

@@ -2,41 +2,66 @@
   <div id="patent-1">
   <div id="patent-1">
     <el-row>
     <el-row>
       <el-col :span="24" class="main">
       <el-col :span="24" class="main">
-        <list-1 :list="list" @detail="detail"></list-1>
+        <list-2 :list="list" @toView="toView"></list-2>
       </el-col>
       </el-col>
     </el-row>
     </el-row>
+    <van-dialog class="dialog" v-model="dialog.show" :title="dialog.title" :show-confirm-button="false" show-cancel-button cancel-button-text="返回">
+      <info-1 :info="info" v-if="dialog.type == '1'"></info-1>
+    </van-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import list1 from '../market/parts/list-1.vue';
+import list2 from '@/layout/patentInfo/list-2.vue';
+import info1 from '@/layout/patentInfo/info-1.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: patent } = createNamespacedHelpers('patent');
+const { mapActions: adminLogin } = createNamespacedHelpers('adminLogin');
+const { mapActions: patentinfo } = createNamespacedHelpers('patentinfo');
 export default {
 export default {
   name: 'patent-1',
   name: 'patent-1',
   props: {},
   props: {},
   components: {
   components: {
-    list1,
+    list2,
+    info1,
   },
   },
   data: function () {
   data: function () {
     return {
     return {
+      adminInfo: {},
       list: [],
       list: [],
+      // 弹框
+      dialog: { show: false, title: '详细信息', type: '1' },
+      // 详细信息
+      info: {},
     };
     };
   },
   },
   async created() {
   async created() {
+    await this.searchOther();
     await this.search();
     await this.search();
   },
   },
   methods: {
   methods: {
-    ...patent(['query']),
+    ...adminLogin({ adminLoginQuery: 'query' }),
+    ...patentinfo(['query', 'fetch']),
     async search({ skip = 0, limit = 4, searchName, ...info } = {}) {
     async search({ skip = 0, limit = 4, searchName, ...info } = {}) {
+      info.first_apply = this.adminInfo.deptname;
       let res = await this.query({ skip, limit, ...info });
       let res = await this.query({ skip, limit, ...info });
       if (this.$checkRes(res)) {
       if (this.$checkRes(res)) {
         this.$set(this, `list`, res.data);
         this.$set(this, `list`, res.data);
       }
       }
     },
     },
-    // 查看详情
-    detail(data) {
-      this.$router.push({ path: '/patent/market/detail', query: { id: data._id } });
+    // 查看信息
+    async toView(data) {
+      let res = await this.fetch(data.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `info`, res.data);
+        this.dialog = { show: true, title: '详细信息', type: '1' };
+      }
+    },
+    // 查询其他信息
+    async searchOther() {
+      let res = await this.adminLoginQuery({ code: this.user.code });
+      if (this.$checkRes(res)) {
+        this.$set(this, `adminInfo`, res.data[0]);
+      }
     },
     },
   },
   },
   computed: {
   computed: {
@@ -59,4 +84,10 @@ export default {
 .main {
 .main {
   padding: 0 8px;
   padding: 0 8px;
 }
 }
+.dialog {
+  /deep/.van-dialog__content {
+    max-height: 350px;
+    overflow-y: auto;
+  }
+}
 </style>
 </style>

+ 3 - 3
src/views/patent/user/patent/information/index.vue

@@ -4,15 +4,15 @@
       <template v-slot:info>
       <template v-slot:info>
         <van-tabs v-model="active" @change="change">
         <van-tabs v-model="active" @change="change">
           <van-tab name="有效">
           <van-tab name="有效">
-            <template #title>已授权({{ total1 }}) </template>
+            <template #title>有效({{ total1 }}) </template>
             <list-1 :list="list" @toView="toView"></list-1>
             <list-1 :list="list" @toView="toView"></list-1>
           </van-tab>
           </van-tab>
           <van-tab name="审中">
           <van-tab name="审中">
-            <template #title>已受理({{ total2 }})</template>
+            <template #title>审中({{ total2 }})</template>
             <list-1 :list="list" @toView="toView"></list-1>
             <list-1 :list="list" @toView="toView"></list-1>
           </van-tab>
           </van-tab>
           <van-tab name="失效">
           <van-tab name="失效">
-            <template #title>失效({{ total3 }}) </template>
+            <template #title>失效({{ total3 }}) </template>
             <list-1 :list="list" @toView="toView"></list-1>
             <list-1 :list="list" @toView="toView"></list-1>
           </van-tab>
           </van-tab>
         </van-tabs>
         </van-tabs>

+ 3 - 0
src/views/patent/user/patent/information/trans_create.vue

@@ -70,6 +70,7 @@ export default {
         patent_name: this.patentInfo.name,
         patent_name: this.patentInfo.name,
         create_number: this.patentInfo.create_number,
         create_number: this.patentInfo.create_number,
         on_obligee: this.patentInfo.on_obligee,
         on_obligee: this.patentInfo.on_obligee,
+        abstract: this.patentInfo.abstract || '',
         contact: this.user.name,
         contact: this.user.name,
         phone: this.user.phone,
         phone: this.user.phone,
         email: this.user.email,
         email: this.user.email,
@@ -85,6 +86,8 @@ export default {
     },
     },
     // 发起专利交易
     // 发起专利交易
     async onSubmit({ data }) {
     async onSubmit({ data }) {
+      if (data.budget_type == '1') data.budget = '面议';
+      else if (data.budget_type == '2') data.budget = data.budget_min + '-' + data.budget_max;
       if (data.id) {
       if (data.id) {
         data.status = '0';
         data.status = '0';
         let res = await this.update(data);
         let res = await this.update(data);