浏览代码

专利交易

guhongwei 2 年之前
父节点
当前提交
86c388792a

+ 5 - 0
src/router/module/personal.ts

@@ -73,5 +73,10 @@ export default [
     path: '/ptrans/detail',
     path: '/ptrans/detail',
     meta: { title: '信息管理' },
     meta: { title: '信息管理' },
     component: () => import('@/views/ptrans/detail.vue')
     component: () => import('@/views/ptrans/detail.vue')
+  },
+  {
+    path: '/ptrans/contract',
+    meta: { title: '合同填写' },
+    component: () => import('@/views/ptrans/contract.vue')
   }
   }
 ];
 ];

+ 230 - 0
src/views/ptrans/contract.vue

@@ -0,0 +1,230 @@
+<template>
+  <div id="contract">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one">
+          <cSearch :is_title="false" :is_back="true" @toBack="toBack"></cSearch>
+        </el-col>
+        <el-col :span="24" class="two">
+          <el-col :span="24" class="two_1"> 专利转让合同 </el-col>
+          <el-col :span="24" class="two_2">
+            <cForm :span="24" :fields="formFields" :form="form" :rules="rules" @save="toSave" label-width="auto" @dataChange="dataChange">
+              <template #is_contract>
+                <el-option v-for="(i, index) in contractList" :key="index" :label="i.label" :value="i.value"></el-option>
+              </template>
+              <template #offine_contract>
+                <cUpload :model="`${'offine_contract'}`" :limit="1" url="/files/zkzx/patent/upload" :list="form.offine_contract" @change="onUpload"></cUpload>
+              </template>
+              <template #contract>
+                <el-row class="contract">
+                  <el-col :span="24" class="contract_1">
+                    <span>甲方(转让方):</span>
+                    <span>
+                      <el-input class="input inputlarge" v-model="form.contract.partya" placeholder="请输入甲方名称" :disabled="true" />
+                    </span>
+                    <span>;</span>
+                  </el-col>
+                  <el-col :span="24" class="contract_1">
+                    <span>乙方(受让方):</span>
+                    <span>
+                      <el-input class="input inputlarge" v-model="form.contract.partyb" placeholder="请输入甲方名称" />
+                    </span>
+                    <span>;</span>
+                  </el-col>
+                  <el-col :span="24" class="contract_1">
+                    <span>甲,乙方经过平等协商;自愿订立专利权转让合同,并共同遵照执行;</span>
+                  </el-col>
+                  <el-col :span="24" class="contract_1">
+                    <span>第一条:甲方将其享有的</span>
+                    <span>
+                      <el-input class="input" v-model="form.contract.patent_name" placeholder="请输入专利名称" :disabled="true" />
+                    </span>
+                    <span>专利权有偿转让给乙方,专利号为:</span>
+                    <span>
+                      <el-input class="input" v-model="form.contract.create_number" placeholder="请输入专利号" :disabled="true" />
+                    </span>
+                    <span>;</span>
+                  </el-col>
+                  <el-col :span="24" class="contract_1">
+                    <span>第二条:甲方向乙方转让</span>
+                    <span>
+                      <el-input class="input" v-model="form.contract.patent_name" placeholder="请输入专利名称" :disabled="true" />
+                    </span>
+                    <span>专利权;</span>
+                  </el-col>
+                  <el-col :span="24" class="contract_1">
+                    <span>第三条:乙方为此向甲方支付专利权转让费用</span>
+                    <span>
+                      <el-input class="input" v-model="form.contract.money" placeholder="请输入费用" />
+                    </span>
+                    <span>元,于本合同生效后</span>
+                    <span>
+                      <el-input class="input" v-model="form.contract.days" placeholder="请输入天数" />
+                    </span>
+                    <span>天内一次付清;</span>
+                  </el-col>
+                  <el-col :span="24" class="contract_1">
+                    <span>第四条:如任何一方违反本合同约定给对方造成损失,守约方可以要求对方承担违约责任;</span>
+                  </el-col>
+                  <el-col :span="24" class="contract_1">
+                    <span>第五条:甲方保证此转让行为不侵犯任何第三方的合法权益;</span>
+                  </el-col>
+                  <el-col :span="24" class="contract_1">
+                    <span>第六条:本合同于各方签字盖章后生效,未经各方同意,任何一方均无权修改或变更本合同约定;</span>
+                  </el-col>
+                  <el-col :span="24" class="contract_1">
+                    <span>第七条:任何因本合同的履行而产生的争议,均应当友好协商解决,如无法协商解决,各方同意交由</span>
+                    <span>
+                      <el-input class="input" v-model="form.contract.address" placeholder="请输入省市" />
+                    </span>
+                    <span>仲裁委员会按照该会现时有效的仲裁规则予以仲裁;</span>
+                  </el-col>
+                  <el-col :span="24" class="contract_1">
+                    <span>第八条:本合同一式三份,双方各执一份,备案一份; </span>
+                  </el-col>
+                </el-row>
+              </template>
+            </cForm>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+import { ref, reactive, onMounted } from 'vue';
+import { useRoute } from 'vue-router';
+import { ElMessage } from 'element-plus';
+import type { FormRules } from 'element-plus';
+
+// 接口
+import { TranstionStore } from '@common/src/stores/patent/transtion';
+import { DictDataStore } from '@common/src/stores/system/dictData'; // 字典表
+import type { IQueryResult } from '@/util/types.util';
+const transAxios = TranstionStore();
+const dictAxios = DictDataStore();
+
+// 路由
+const route = useRoute();
+
+// 加载中
+const loading: Ref<any> = ref(false);
+
+// 表单
+let form: Ref<any> = ref({ offine_contract: [], contract: {} });
+let formFields: Ref<any[]> = ref([{ label: '合同类型', model: 'is_contract', type: 'select' }]);
+const rules = reactive<FormRules>({});
+
+// 字典表
+const contractList: Ref<any> = ref([]);
+
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  await searchOther();
+  await search();
+  loading.value = false;
+});
+const search = async () => {
+  let id = route.query.id;
+  let res: IQueryResult;
+  let info: any = { offine_contract: [], contract: {} };
+  if (id) {
+    res = await transAxios.fetch(route.query.id);
+    if (res.errcode == '0') {
+      let resInfo: any = res.data as {};
+      if (!resInfo.offine_contract) resInfo.offine_contract = [];
+      if (!resInfo.contract)
+        resInfo.contract = {
+          partya: resInfo.on_obligee,
+          partyb: resInfo.on_afterobligee,
+          patent_name: resInfo.patent_name,
+          create_number: resInfo.create_number
+        };
+      info = resInfo;
+    }
+  }
+  form.value = info;
+  // 线上合同,线下合同
+  dataChange({ value: info.is_contract, model: 'is_contract' });
+};
+const dataChange = (e: { value; model }) => {
+  if (e.model == 'is_contract') {
+    let list = [];
+    formFields.value = formFields.value.filter((i) => i.model == 'is_contract');
+    if (e.value == '0') {
+      list = [{ label: '线下合同', model: 'offine_contract', custom: true }];
+    } else if (e.value == '1') {
+      list = [{ label: '线上合同', model: 'contract', custom: true }];
+    }
+    formFields.value = [...formFields.value, ...list];
+  }
+};
+const onUpload = (e: { model: string; value: Array<[]> }) => {
+  const { model, value } = e;
+  form.value[model] = value;
+};
+// 提交保存
+const toSave = async (data) => {
+  data.status = '3';
+  let res: IQueryResult = await transAxios.update(data);
+  if (res.errcode == 0) {
+    ElMessage({ type: `success`, message: `合同提交成功` });
+    toBack();
+  } else {
+    ElMessage({ type: `error`, message: `${res.errmsg}` });
+  }
+};
+const searchOther = async () => {
+  let res: IQueryResult;
+  // 类型
+
+  res = await dictAxios.query({ type: 'patent_trans_contract_type' });
+  if (res.errcode == '0') contractList.value = res.data;
+};
+// 放回上一页
+const toBack = () => {
+  window.history.go(-1);
+};
+</script>
+<style scoped lang="scss">
+.main {
+  .two {
+    .two_1 {
+      text-align: center;
+      font-size: 25px;
+      font-weight: bold;
+      font-family: monospace;
+      margin: 0 0 10px 0;
+    }
+  }
+}
+.contract {
+  .contract_1 {
+    margin: 0 0 10px 0;
+    span {
+      font-size: 16px;
+      font-family: monospace;
+      font-weight: bold;
+    }
+    .input {
+      width: 15%;
+      margin: 0 5px;
+      :deep(.el-input__wrapper) {
+        box-shadow: none;
+        border-bottom: 1px solid #000000;
+        border-radius: 0;
+      }
+      :deep(.el-input__inner) {
+        color: #000000;
+      }
+    }
+    .inputlarge {
+      width: 30%;
+    }
+  }
+}
+</style>

+ 1 - 0
src/views/ptrans/detail.vue

@@ -248,4 +248,5 @@ const toBack = () => {
     font-weight: bold;
     font-weight: bold;
   }
   }
 }
 }
+
 </style>
 </style>

+ 26 - 4
src/views/ptrans/index.vue

@@ -13,7 +13,18 @@
           </cSearch>
           </cSearch>
         </el-col>
         </el-col>
         <el-col :span="24" class="thr">
         <el-col :span="24" class="thr">
-          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @view="toView" @edit="toEdit" @tract="toTract" @del="toDel">
+          <cTable
+            :fields="fields"
+            :opera="opera"
+            :list="list"
+            @query="search"
+            :total="total"
+            @view="toView"
+            @edit="toEdit"
+            @tract="toTract"
+            @trans="toTrans"
+            @del="toDel"
+          >
           </cTable>
           </cTable>
         </el-col>
         </el-col>
       </el-col>
       </el-col>
@@ -59,8 +70,8 @@ let fields: Ref<any[]> = ref([
 let opera: Ref<any[]> = ref([
 let opera: Ref<any[]> = ref([
   { label: '查看', method: 'view' },
   { label: '查看', method: 'view' },
   { label: '修改', method: 'edit', display: (i) => i.status == '1' },
   { label: '修改', method: 'edit', display: (i) => i.status == '1' },
-  { label: '合同填写', method: 'tract', display: (i) => i.status == '2' },
-
+  { label: '合同填写', method: 'tract', display: (i) => i.status == '2' || i.status == '4' },
+  { label: '交易确认', method: 'trans', confirm: true, type: 'success', display: (i) => i.status == '5' },
   { label: '删除', method: 'del', confirm: true, type: 'danger', display: (i: any) => i.status == '0' }
   { label: '删除', method: 'del', confirm: true, type: 'danger', display: (i: any) => i.status == '0' }
 ]);
 ]);
 
 
@@ -114,7 +125,18 @@ const toEdit = (data) => {
 };
 };
 // 合同填写
 // 合同填写
 const toTract = (data) => {
 const toTract = (data) => {
-  console.log(data);
+  router.push({ path: '/ptrans/contract', query: { id: data._id } });
+};
+// 确认交易
+const toTrans = async (data) => {
+  data.status = '6';
+  let res: IQueryResult = await transAxios.update(data);
+  if (res.errcode == 0) {
+    ElMessage({ type: `success`, message: `交易确认完成` });
+    search({ skip, limit });
+  } else {
+    ElMessage({ type: `error`, message: `${res.errmsg}` });
+  }
 };
 };
 // 删除
 // 删除
 const toDel = async (data) => {
 const toDel = async (data) => {

+ 160 - 22
src/views/uexam/contract/index.vue

@@ -2,37 +2,175 @@
   <div id="index">
   <div id="index">
     <el-row>
     <el-row>
       <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
       <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
-        <el-col :span="24" class="one">系统首页</el-col>
+        <el-col :span="24" class="one">
+          <cSearch :is_title="false" :is_search="true" :fields="fields" @search="toSearch">
+            <template #type>
+              <el-option v-for="(i, index) in typeList" :key="index" :label="i.label" :value="i.value"></el-option>
+            </template>
+            <template #status>
+              <el-option v-for="(i, index) in statusList" :key="index" :label="i.label" :value="i.value"></el-option>
+            </template>
+          </cSearch>
+        </el-col>
+        <el-col :span="24" class="thr">
+          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @view="toView" @exam="toExam"> </cTable>
+        </el-col>
       </el-col>
       </el-col>
     </el-row>
     </el-row>
+    <cDialog :dialog="dialog" @toClose="toClose">
+      <template v-slot:info>
+        <el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
+          <cForm :span="24" :fields="formFields" :form="form" :rules="{}" @save="toSave" label-width="auto">
+            <template #status>
+              <el-option v-for="(i, index) in examstatusList" :key="index" :label="i.label" :value="i.value"></el-option>
+            </template>
+          </cForm>
+        </el-col>
+      </template>
+    </cDialog>
   </div>
   </div>
 </template>
 </template>
-
-<script setup lang="ts">
-// 基础
+<script lang="ts" setup>
+import _ from 'lodash';
 import type { Ref } from 'vue';
 import type { Ref } from 'vue';
-// reactive,
-import { onMounted, ref, getCurrentInstance } from 'vue';
+import { ref, onMounted, getCurrentInstance } from 'vue';
+import { ElMessage } from 'element-plus';
+import { useRouter } from 'vue-router';
+
 // 接口
 // 接口
-//import { TestStore } from '@common/src/stores/test';
-//import type { IQueryResult } from '@/util/types.util';
-//const testAxios = TestStore();
+import { TranstionStore } from '@common/src/stores/patent/transtion';
+import { DictDataStore } from '@common/src/stores/system/dictData'; // 字典表
+import type { IQueryResult } from '@/util/types.util';
+import store from '@/stores/counter';
+const transAxios = TranstionStore();
+const dictAxios = DictDataStore();
+
+// 路由
+const router = useRouter();
+
 const { proxy } = getCurrentInstance() as any;
 const { proxy } = getCurrentInstance() as any;
+
 // 加载中
 // 加载中
-const loading: Ref<any> = ref(false);
-// 分页数据
-//  const skip = 0;
-//  const limit = proxy.limit;;
-// 请求
+const loading = ref(false);
+// 列表数据
+let list: Ref<any> = ref([]);
+let total: Ref<number> = ref(0);
+let skip = 0;
+let limit: number = proxy.$limit;
+let fields: Ref<any[]> = ref([
+  { label: '申请号', model: 'create_number' },
+  { label: '专利名称', model: 'patent_name', isSearch: true },
+  { label: '交易类型', model: 'type', format: (i: any) => getDict(i, 'type'), isSearch: true, type: 'select' },
+  { label: '联系人', model: 'contact' },
+  { label: '手机号', model: 'phone' },
+  { label: '状态', model: 'status', format: (i: any) => getDict(i, 'status'), isSearch: true, type: 'select' }
+]);
+// 操作
+let opera: Ref<any[]> = ref([
+  { label: '查看', method: 'view' },
+  { label: '审核', method: 'exam', type: 'warning', display: (i: any) => i.status == '3' }
+]);
+
+// 查询数据
+let searchForm: Ref<any> = ref({});
+
+// 字典表
+const typeList: Ref<any> = ref([]);
+const statusList: Ref<any> = ref([]);
+const examstatusList: Ref<any> = ref([]);
+// 弹框
+const dialog: Ref<any> = ref({ title: '审核管理', show: false, type: '1' });
+const form: Ref<any> = ref({});
+const formFields: Ref<any> = ref([]);
+
 onMounted(async () => {
 onMounted(async () => {
-  loading.value = true;
-  //  await search({ skip, limit });
+  loading.value = false;
+  await searchOther();
+  await search({ skip, limit });
   loading.value = false;
   loading.value = false;
 });
 });
-//const search = async (e: { skip: number; limit: number }) => {
-//  const info = { skip: e.skip, limit: e.limit, ...searchInfo.value  };
-//  const res: IQueryResult = await testAxios.query(info);
-//  console.log(res);
-//};
+// 查询
+const search = async (e: { skip: number; limit: number }) => {
+  let user = store.state.user;
+  const { skip, limit } = e;
+  const condition = _.cloneDeep(searchForm.value);
+  let info = { limit: limit, skip: skip, ...condition, mech_id: user._id, status: '3' };
+  let res: IQueryResult = await transAxios.query(info);
+  if (res.errcode == 0) {
+    list.value = res.data;
+    total.value = res.total;
+  }
+};
+const toSearch = (query) => {
+  searchForm.value = query;
+  search({ skip, limit });
+};
+const getDict = (value, model) => {
+  if (model == 'type') {
+    let data = typeList.value.find((i) => i.value == value);
+    if (data) return data.label;
+    else return '暂无';
+  } else if (model == 'status') {
+    let data = statusList.value.find((i) => i.value == value);
+    if (data) return data.label;
+    else return '暂无';
+  }
+};
+// 查看
+const toView = (data) => {
+  router.push({ path: '/common/trans/info', query: { id: data._id } });
+};
+// 审核
+const toExam = async (data) => {
+  let res: IQueryResult = await transAxios.fetch(data._id);
+  if (res.errcode == '0') {
+    form.value = res.data;
+    let list: any = [
+      { label: '审核状态', model: 'status', type: 'select' },
+      { label: '审核意见', model: 'desc', type: 'textarea' }
+    ];
+    formFields.value = list;
+    dialog.value = { title: '审核管理', show: true, type: '1' };
+  }
+};
+const toSave = async (data) => {
+  let res: IQueryResult = await transAxios.update(data);
+  if (res.errcode == '0') {
+    ElMessage({ message: '信息维护成功', type: 'success' });
+    toClose();
+  } else {
+    ElMessage({ message: `${res.errmsg}`, type: 'error' });
+  }
+};
+
+// 关闭弹框
+const toClose = () => {
+  dialog.value = { title: '审核管理', show: false, type: '1' };
+  search({ skip, limit });
+};
+
+// 查询其他信息
+const searchOther = async () => {
+  let res: IQueryResult;
+  // 类型
+  res = await dictAxios.query({ type: 'patent_trans_type' });
+  if (res.errcode == '0') typeList.value = res.data;
+  // 状态
+  res = await dictAxios.query({ type: 'patent_trans_status' });
+  if (res.errcode == '0') {
+    let list: any = res.data as [];
+    statusList.value = list;
+    examstatusList.value = list.filter((i) => i.value == '3' || i.value == '4' || i.value == '5');
+  }
+};
 </script>
 </script>
-<style scoped lang="scss"></style>
+<style lang="scss" scoped>
+.main {
+  .one {
+    margin: 0 0 10px 0;
+  }
+  .two {
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 17 - 18
src/views/uexam/file/index.vue

@@ -1,8 +1,17 @@
 <template>
 <template>
   <div id="index">
   <div id="index">
     <el-row>
     <el-row>
-      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
-        <el-col :span="24" class="one">系统首页</el-col>
+      <el-col :span="24" class="main" v-loading="loading">
+        <el-col :span="24" class="one">
+          <el-tabs v-model="active" type="card">
+            <el-tab-pane label="用户确认" name="1">
+              <component :is="cConfirm"></component>
+            </el-tab-pane>
+            <el-tab-pane label="交易归档" name="2">
+              <component :is="cFile"></component>
+            </el-tab-pane>
+          </el-tabs>
+        </el-col>
       </el-col>
       </el-col>
     </el-row>
     </el-row>
   </div>
   </div>
@@ -10,29 +19,19 @@
 
 
 <script setup lang="ts">
 <script setup lang="ts">
 // 基础
 // 基础
+import cConfirm from './parts/c-confirm.vue';
+import cFile from './parts/c-file.vue';
 import type { Ref } from 'vue';
 import type { Ref } from 'vue';
-// reactive,
-import { onMounted, ref, getCurrentInstance } from 'vue';
-// 接口
-//import { TestStore } from '@common/src/stores/test';
-//import type { IQueryResult } from '@/util/types.util';
-//const testAxios = TestStore();
-const { proxy } = getCurrentInstance() as any;
+import { onMounted, ref } from 'vue';
 // 加载中
 // 加载中
 const loading: Ref<any> = ref(false);
 const loading: Ref<any> = ref(false);
-// 分页数据
-//  const skip = 0;
-//  const limit = proxy.limit;;
+
+const active: Ref<any> = ref('1');
+
 // 请求
 // 请求
 onMounted(async () => {
 onMounted(async () => {
   loading.value = true;
   loading.value = true;
-  //  await search({ skip, limit });
   loading.value = false;
   loading.value = false;
 });
 });
-//const search = async (e: { skip: number; limit: number }) => {
-//  const info = { skip: e.skip, limit: e.limit, ...searchInfo.value  };
-//  const res: IQueryResult = await testAxios.query(info);
-//  console.log(res);
-//};
 </script>
 </script>
 <style scoped lang="scss"></style>
 <style scoped lang="scss"></style>

+ 142 - 0
src/views/uexam/file/parts/c-confirm.vue

@@ -0,0 +1,142 @@
+<template>
+  <div id="c-confirm">
+    <el-row>
+      <el-col :span="24" class="c-confirm animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one">
+          <cSearch :is_title="false" :is_search="true" :fields="fields" @search="toSearch">
+            <template #type>
+              <el-option v-for="(i, index) in typeList" :key="index" :label="i.label" :value="i.value"></el-option>
+            </template>
+            <template #status>
+              <el-option v-for="(i, index) in statusList" :key="index" :label="i.label" :value="i.value"></el-option>
+            </template>
+          </cSearch>
+        </el-col>
+        <el-col :span="24" class="thr">
+          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @view="toView" @file="toFile"> </cTable>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+<script lang="ts" setup>
+import _ from 'lodash';
+import type { Ref } from 'vue';
+import { ref, onMounted, getCurrentInstance } from 'vue';
+import { ElMessage } from 'element-plus';
+import { useRouter } from 'vue-router';
+
+// 接口
+import { TranstionStore } from '@common/src/stores/patent/transtion';
+import { DictDataStore } from '@common/src/stores/system/dictData'; // 字典表
+import type { IQueryResult } from '@/util/types.util';
+import store from '@/stores/counter';
+const transAxios = TranstionStore();
+const dictAxios = DictDataStore();
+
+// 路由
+const router = useRouter();
+
+const { proxy } = getCurrentInstance() as any;
+
+// 加载中
+const loading = ref(false);
+// 列表数据
+let list: Ref<any> = ref([]);
+let total: Ref<number> = ref(0);
+let skip = 0;
+let limit: number = proxy.$limit;
+let fields: Ref<any[]> = ref([
+  { label: '申请号', model: 'create_number' },
+  { label: '专利名称', model: 'patent_name', isSearch: true },
+  { label: '交易类型', model: 'type', format: (i: any) => getDict(i, 'type'), isSearch: true, type: 'select' },
+  { label: '联系人', model: 'contact' },
+  { label: '手机号', model: 'phone' },
+  { label: '状态', model: 'status', format: (i: any) => getDict(i, 'status'), isSearch: true, type: 'select' }
+]);
+// 操作
+let opera: Ref<any[]> = ref([
+  { label: '查看', method: 'view' },
+  { label: '交易归档', method: 'file', confirm: true, type: 'warning', display: (i: any) => i.status == '6' }
+]);
+
+// 查询数据
+let searchForm: Ref<any> = ref({});
+
+// 字典表
+const typeList: Ref<any> = ref([]);
+const statusList: Ref<any> = ref([]);
+
+onMounted(async () => {
+  loading.value = false;
+  await searchOther();
+  await search({ skip, limit });
+  loading.value = false;
+});
+// 查询
+const search = async (e: { skip: number; limit: number }) => {
+  let user = store.state.user;
+  const { skip, limit } = e;
+  const condition = _.cloneDeep(searchForm.value);
+  let info = { limit: limit, skip: skip, ...condition, mech_id: user._id, status: '6' };
+  let res: IQueryResult = await transAxios.query(info);
+  if (res.errcode == 0) {
+    list.value = res.data;
+    total.value = res.total;
+  }
+};
+const toSearch = (query) => {
+  searchForm.value = query;
+  search({ skip, limit });
+};
+const getDict = (value, model) => {
+  if (model == 'type') {
+    let data = typeList.value.find((i) => i.value == value);
+    if (data) return data.label;
+    else return '暂无';
+  } else if (model == 'status') {
+    let data = statusList.value.find((i) => i.value == value);
+    if (data) return data.label;
+    else return '暂无';
+  }
+};
+// 查看
+const toView = (data) => {
+  router.push({ path: '/common/trans/info', query: { id: data._id } });
+};
+// 交易归档
+const toFile = async (data) => {
+  data.status = '7';
+  let res: IQueryResult = await transAxios.update(data);
+  if (res.errcode == '0') {
+    ElMessage({ message: '交易归档成功,交易完成', type: 'success' });
+    toClose();
+  } else {
+    ElMessage({ message: `${res.errmsg}`, type: 'error' });
+  }
+};
+
+// 查询其他信息
+const searchOther = async () => {
+  let res: IQueryResult;
+  // 类型
+  res = await dictAxios.query({ type: 'patent_trans_type' });
+  if (res.errcode == '0') typeList.value = res.data;
+  // 状态
+  res = await dictAxios.query({ type: 'patent_trans_status' });
+  if (res.errcode == '0') {
+    let list: any = res.data as [];
+    statusList.value = list;
+  }
+};
+</script>
+<style lang="scss" scoped>
+.main {
+  .one {
+    margin: 0 0 10px 0;
+  }
+  .two {
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 127 - 0
src/views/uexam/file/parts/c-file.vue

@@ -0,0 +1,127 @@
+<template>
+  <div id="c-file">
+    <el-row>
+      <el-col :span="24" class="c-file animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one">
+          <cSearch :is_title="false" :is_search="true" :fields="fields" @search="toSearch">
+            <template #type>
+              <el-option v-for="(i, index) in typeList" :key="index" :label="i.label" :value="i.value"></el-option>
+            </template>
+            <template #status>
+              <el-option v-for="(i, index) in statusList" :key="index" :label="i.label" :value="i.value"></el-option>
+            </template>
+          </cSearch>
+        </el-col>
+        <el-col :span="24" class="thr">
+          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @view="toView"> </cTable>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+<script lang="ts" setup>
+import _ from 'lodash';
+import type { Ref } from 'vue';
+import { ref, onMounted, getCurrentInstance } from 'vue';
+import { useRouter } from 'vue-router';
+
+// 接口
+import { TranstionStore } from '@common/src/stores/patent/transtion';
+import { DictDataStore } from '@common/src/stores/system/dictData'; // 字典表
+import type { IQueryResult } from '@/util/types.util';
+import store from '@/stores/counter';
+const transAxios = TranstionStore();
+const dictAxios = DictDataStore();
+
+// 路由
+const router = useRouter();
+
+const { proxy } = getCurrentInstance() as any;
+
+// 加载中
+const loading = ref(false);
+// 列表数据
+let list: Ref<any> = ref([]);
+let total: Ref<number> = ref(0);
+let skip = 0;
+let limit: number = proxy.$limit;
+let fields: Ref<any[]> = ref([
+  { label: '申请号', model: 'create_number' },
+  { label: '专利名称', model: 'patent_name', isSearch: true },
+  { label: '交易类型', model: 'type', format: (i: any) => getDict(i, 'type'), isSearch: true, type: 'select' },
+  { label: '联系人', model: 'contact' },
+  { label: '手机号', model: 'phone' },
+  { label: '状态', model: 'status', format: (i: any) => getDict(i, 'status'), isSearch: true, type: 'select' }
+]);
+// 操作
+let opera: Ref<any[]> = ref([{ label: '查看', method: 'view' }]);
+
+// 查询数据
+let searchForm: Ref<any> = ref({});
+
+// 字典表
+const typeList: Ref<any> = ref([]);
+const statusList: Ref<any> = ref([]);
+
+onMounted(async () => {
+  loading.value = false;
+  await searchOther();
+  await search({ skip, limit });
+  loading.value = false;
+});
+// 查询
+const search = async (e: { skip: number; limit: number }) => {
+  let user = store.state.user;
+  const { skip, limit } = e;
+  const condition = _.cloneDeep(searchForm.value);
+  let info = { limit: limit, skip: skip, ...condition, mech_id: user._id, status: '7' };
+  let res: IQueryResult = await transAxios.query(info);
+  if (res.errcode == 0) {
+    list.value = res.data;
+    total.value = res.total;
+  }
+};
+const toSearch = (query) => {
+  searchForm.value = query;
+  search({ skip, limit });
+};
+const getDict = (value, model) => {
+  if (model == 'type') {
+    let data = typeList.value.find((i) => i.value == value);
+    if (data) return data.label;
+    else return '暂无';
+  } else if (model == 'status') {
+    let data = statusList.value.find((i) => i.value == value);
+    if (data) return data.label;
+    else return '暂无';
+  }
+};
+// 查看
+const toView = (data) => {
+  router.push({ path: '/common/trans/info', query: { id: data._id } });
+};
+
+// 查询其他信息
+const searchOther = async () => {
+  let res: IQueryResult;
+  // 类型
+  res = await dictAxios.query({ type: 'patent_trans_type' });
+  if (res.errcode == '0') typeList.value = res.data;
+  // 状态
+  res = await dictAxios.query({ type: 'patent_trans_status' });
+  if (res.errcode == '0') {
+    let list: any = res.data as [];
+    statusList.value = list;
+  }
+};
+</script>
+<style lang="scss" scoped>
+.main {
+  .one {
+    margin: 0 0 10px 0;
+  }
+  .two {
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 1 - 1
src/views/uexam/trans/index.vue

@@ -94,7 +94,7 @@ const search = async (e: { skip: number; limit: number }) => {
   let user = store.state.user;
   let user = store.state.user;
   const { skip, limit } = e;
   const { skip, limit } = e;
   const condition = _.cloneDeep(searchForm.value);
   const condition = _.cloneDeep(searchForm.value);
-  let info = { limit: limit, skip: skip, ...condition, mech_id: user._id };
+  let info = { limit: limit, skip: skip, ...condition, mech_id: user._id, status: '0' };
   let res: IQueryResult = await transAxios.query(info);
   let res: IQueryResult = await transAxios.query(info);
   if (res.errcode == 0) {
   if (res.errcode == 0) {
     list.value = res.data;
     list.value = res.data;